public String computeSystemProperties(boolean showSystemProperties) {
    Properties sysprops = getSystemProperties();

    if (sysprops == null) {
      return Bundle.OverviewController_NotAvailableMsg();
    }

    String propertiesRes = Icons.getResource(HeapWalkerIcons.PROPERTIES);
    return "<b><img border='0' align='bottom' src='nbresloc:/"
        + propertiesRes
        + "'>&nbsp;&nbsp;" // NOI18N
        + Bundle.OverviewController_SystemPropertiesString()
        + "</b><br><hr>" // NOI18N
        + (showSystemProperties
            ? formatSystemProperties(sysprops)
            : ("&nbsp;&nbsp;&nbsp;&nbsp;<a href='"
                + SHOW_SYSPROPS_URL
                + "'>"
                + Bundle.OverviewController_ShowSysPropsLinkString()
                + "</a>")); // NOI18N
  }
  public String computeEnvironment() {
    Properties sysprops = getSystemProperties();

    if (sysprops == null) {
      return Bundle.OverviewController_NotAvailableMsg();
    }

    String patchLevel = sysprops.getProperty("sun.os.patch.level", ""); // NOI18N
    String os =
        "&nbsp;&nbsp;&nbsp;&nbsp;" // NOI18N
            + Bundle.OverviewController_OsItemString(
                sysprops.getProperty(
                    "os.name", Bundle.OverviewController_NotAvailableMsg()), // NOI18N
                sysprops.getProperty("os.version", ""), // NOI18N
                ("unknown".equals(patchLevel) ? "" : patchLevel) // NOI18N
                );

    String arch =
        "&nbsp;&nbsp;&nbsp;&nbsp;" // NOI18N
            + Bundle.OverviewController_ArchitectureItemString(
                sysprops.getProperty(
                    "os.arch", Bundle.OverviewController_NotAvailableMsg()), // NOI18N
                sysprops.getProperty("sun.arch.data.model", "?") + "bit" // NOI18N
                );

    String jdk =
        "&nbsp;&nbsp;&nbsp;&nbsp;" // NOI18N
            + Bundle.OverviewController_JavaHomeItemString(
                sysprops.getProperty(
                    "java.home", Bundle.OverviewController_NotAvailableMsg())); // NOI18N

    String version =
        "&nbsp;&nbsp;&nbsp;&nbsp;" // NOI18N
            + Bundle.OverviewController_JavaVersionItemString(
                sysprops.getProperty(
                    "java.version", Bundle.OverviewController_NotAvailableMsg())); // NOI18N

    String jvm =
        "&nbsp;&nbsp;&nbsp;&nbsp;" // NOI18N
            + Bundle.OverviewController_JvmItemString(
                sysprops.getProperty(
                    "java.vm.name", Bundle.OverviewController_NotAvailableMsg()), // NOI18N
                sysprops.getProperty("java.vm.version", ""), // NOI18N
                sysprops.getProperty("java.vm.info", "") // NOI18N
                );

    String vendor =
        "&nbsp;&nbsp;&nbsp;&nbsp;" // NOI18N
            + Bundle.OverviewController_JavaVendorItemString(
                sysprops.getProperty(
                    "java.vendor", Bundle.OverviewController_NotAvailableMsg())); // NOI18N

    String sysinfoRes = Icons.getResource(HeapWalkerIcons.SYSTEM_INFO);
    return "<b><img border='0' align='bottom' src='nbresloc:/"
        + sysinfoRes
        + "'>&nbsp;&nbsp;" // NOI18N
        + Bundle.OverviewController_EnvironmentString()
        + "</b><br><hr>"
        + os
        + "<br>"
        + arch
        + "<br>"
        + jdk
        + "<br>"
        + version
        + "<br>"
        + jvm
        + "<br>"
        + vendor; // NOI18N
  }
  public String computeSummary() {
    File file = heapFragmentWalker.getHeapDumpFile();
    Heap heap = heapFragmentWalker.getHeapFragment();
    HeapSummary hsummary = heap.getSummary();
    long finalizers = computeFinalizers(heap);
    int nclassloaders = 0;
    JavaClass cl = heap.getJavaClassByName("java.lang.ClassLoader"); // NOI18N
    NumberFormat numberFormat = (NumberFormat) NumberFormat.getInstance().clone();
    numberFormat.setMaximumFractionDigits(1);

    oome = getOOMEThread(heap);
    if (cl != null) {
      nclassloaders = cl.getInstancesCount();

      Collection<JavaClass> jcs = cl.getSubClasses();

      for (JavaClass jc : jcs) {
        nclassloaders += jc.getInstancesCount();
      }
    }

    String filename =
        "&nbsp;&nbsp;&nbsp;&nbsp;" // NOI18N
            + Bundle.OverviewController_FileItemString(
                file != null && file.exists()
                    ? file.getAbsolutePath()
                    : Bundle.OverviewController_NotAvailableMsg());

    String filesize =
        "&nbsp;&nbsp;&nbsp;&nbsp;" // NOI18N
            + Bundle.OverviewController_FileSizeItemString(
                file != null && file.exists()
                    ? numberFormat.format(file.length() / (1024 * 1024.0)) + " MB"
                    : // NOI18N
                    Bundle.OverviewController_NotAvailableMsg());

    String dateTaken =
        "&nbsp;&nbsp;&nbsp;&nbsp;" // NOI18N
            + Bundle.OverviewController_DateTakenItemString(
                new Date(hsummary.getTime()).toString());

    String liveBytes =
        "&nbsp;&nbsp;&nbsp;&nbsp;" // NOI18N
            + Bundle.OverviewController_TotalBytesItemString(
                numberFormat.format(hsummary.getTotalLiveBytes()));

    String liveClasses =
        "&nbsp;&nbsp;&nbsp;&nbsp;" // NOI18N
            + Bundle.OverviewController_TotalClassesItemString(
                numberFormat.format(heap.getAllClasses().size()));

    String liveInstances =
        "&nbsp;&nbsp;&nbsp;&nbsp;" // NOI18N
            + Bundle.OverviewController_TotalInstancesItemString(
                numberFormat.format(hsummary.getTotalLiveInstances()));

    String classloaders =
        "&nbsp;&nbsp;&nbsp;&nbsp;" // NOI18N
            + Bundle.OverviewController_ClassloadersItemString(numberFormat.format(nclassloaders));

    String gcroots =
        "&nbsp;&nbsp;&nbsp;&nbsp;" // NOI18N
            + Bundle.OverviewController_GcRootsItemString(
                numberFormat.format(heap.getGCRoots().size()));

    String finalizersInfo =
        "&nbsp;&nbsp;&nbsp;&nbsp;" // NOI18N
            + Bundle.OverviewController_FinalizersItemString(numberFormat.format(finalizers));

    String oomeString = "";
    if (oome != null) {
      Instance thread = oome.getInstance();
      String threadName = htmlize(getThreadName(thread));
      String threadUrl =
          "<a href='"
              + THREAD_URL_PREFIX
              + thread.getJavaClass().getName()
              + "/"
              + thread.getInstanceId()
              + "'>"
              + threadName
              + "</a>"; // NOI18N
      oomeString =
          "<br><br>&nbsp;&nbsp;&nbsp;&nbsp;" // NOI18N
              + Bundle.OverviewController_OOMELabelString()
              + "<br>&nbsp;&nbsp;&nbsp;&nbsp;"
              + Bundle.OverviewController_OOMEItemString(threadUrl);
    }
    String memoryRes = Icons.getResource(ProfilerIcons.HEAP_DUMP);
    return "<b><img border='0' align='bottom' src='nbresloc:/"
        + memoryRes
        + "'>&nbsp;&nbsp;" // NOI18N
        + Bundle.OverviewController_SummaryString()
        + "</b><br><hr>"
        + dateTaken
        + "<br>"
        + filename
        + "<br>"
        + filesize
        + "<br><br>"
        + liveBytes // NOI18N
        + "<br>"
        + liveClasses
        + "<br>"
        + liveInstances
        + "<br>"
        + classloaders
        + "<br>"
        + gcroots
        + "<br>"
        + finalizersInfo
        + oomeString; // NOI18N
  }