Program: 149526
Project: 149526
Buggy source:
private void addSummary(StringBuilder sb,MemoryPeakResults result){
  final DescriptiveStatistics[] stats=new DescriptiveStatistics[2];
  char[] suffix=new char[2];
  for (int i=0; i < stats.length; i++) {
    stats[i]=new DescriptiveStatistics();
    suffix[i]=0;
  }
  if (result.hasNullResults()) {
    IJ.log("String_Node_Str" + result.getName());
    if (removeNullResults == UNKNOWN) {
      GenericDialog gd=new GenericDialog(TITLE);
      gd.addMessage("String_Node_Str");
      gd.enableYesNoCancel();
      gd.hideCancelButton();
      gd.showDialog();
      removeNullResults=(gd.wasOKed()) ? YES : NO;
    }
    if (removeNullResults == NO)     result=result.copy();
    result.removeNullResults();
  }
  final int size=result.size();
  if (size > 0) {
    if (result.hasStoredPrecision()) {
      suffix[0]='*';
      result.forEach(new PeakResultProcedure(){
        public void execute(        PeakResult peakResult){
          stats[0].addValue(peakResult.getPrecision());
        }
      }
);
    }
 else {
      try {
        PrecisionResultProcedure pp=new PrecisionResultProcedure(result);
        pp.getLSEPrecision();
        for (        double v : pp.precision)         stats[0].addValue(v);
      }
 catch (      DataException e) {
      }
    }
    if (result.hasNoise()) {
      result.forEach(new PeakResultProcedure(){
        public void execute(        PeakResult peakResult){
          stats[1].addValue(peakResult.getSignal() / peakResult.noise);
        }
      }
);
    }
  }
  CalibrationReader calibration=result.getCalibrationReader();
  sb.append(result.getName());
  sb.append('\t').append(result.size());
  int maxT=result.getMaxFrame();
  sb.append('\t').append(maxT);
  if (calibration != null && calibration.hasExposureTime()) {
    sb.append('\t').append(Utils.timeToString(maxT * calibration.getExposureTime()));
  }
 else {
    sb.append("String_Node_Str");
  }
  if (size > 0) {
    boolean includeDeviations=result.hasDeviations();
    long memorySize=MemoryPeakResults.estimateMemorySize(size,includeDeviations);
    String memory=MemoryPeakResults.memorySizeString(memorySize);
    sb.append('\t').append(memory);
  }
 else {
    sb.append("String_Node_Str");
  }
  Rectangle bounds=result.getBounds(true);
  sb.append(String.format("String_Node_Str",bounds.x,bounds.y,bounds.x + bounds.width,bounds.y + bounds.height));
  if (calibration != null) {
    sb.append('\t').append(calibration.hasNmPerPixel() ? Utils.rounded(calibration.getNmPerPixel()) : '-');
    sb.append('\t').append(calibration.hasExposureTime() ? Utils.rounded(calibration.getExposureTime()) : '-');
    if (calibration.hasCameraType()) {
      sb.append('\t').append(CalibrationProtosHelper.getName(calibration.getCameraType()));
      if (calibration.isCCDCamera()) {
        sb.append("String_Node_Str").append(calibration.getBias());
        sb.append("String_Node_Str").append(calibration.getCountPerPhoton());
      }
    }
 else {
      sb.append("String_Node_Str");
    }
    sb.append('\t').append(calibration.hasDistanceUnit() ? UnitHelper.getShortName(calibration.getDistanceUnit()) : '-');
    sb.append('\t').append(calibration.hasIntensityUnit() ? UnitHelper.getShortName(calibration.getIntensityUnit()) : '-');
  }
 else {
    sb.append("String_Node_Str");
  }
  for (int i=0; i < stats.length; i++) {
    if (Double.isNaN(stats[i].getMean())) {
      sb.append("String_Node_Str");
    }
 else {
      sb.append('\t').append(IJ.d2s(stats[i].getMean(),3));
      if (suffix[i] != 0)       sb.append(suffix[i]);
      sb.append('\t').append(IJ.d2s(stats[i].getPercentile(50),3));
      sb.append('\t').append(IJ.d2s(stats[i].getMin(),3));
      sb.append('\t').append(IJ.d2s(stats[i].getMax(),3));
    }
  }
  sb.append("String_Node_Str");
}

Fixed version (ground truth):
private void addSummary(StringBuilder sb,MemoryPeakResults result){
  final DescriptiveStatistics[] stats=new DescriptiveStatistics[2];
  char[] suffix=new char[2];
  for (int i=0; i < stats.length; i++) {
    stats[i]=new DescriptiveStatistics();
    suffix[i]=0;
  }
  if (result.hasNullResults()) {
    IJ.log("String_Node_Str" + result.getName());
    if (removeNullResults == UNKNOWN) {
      GenericDialog gd=new GenericDialog(TITLE);
      gd.addMessage("String_Node_Str");
      gd.enableYesNoCancel();
      gd.hideCancelButton();
      gd.showDialog();
      removeNullResults=(gd.wasOKed()) ? YES : NO;
    }
    if (removeNullResults == NO)     result=result.copy();
    result.removeNullResults();
  }
  final int size=result.size();
  if (size > 0) {
    if (result.hasStoredPrecision()) {
      suffix[0]='*';
      result.forEach(new PeakResultProcedure(){
        public void execute(        PeakResult peakResult){
          stats[0].addValue(peakResult.getPrecision());
        }
      }
);
    }
 else {
      try {
        PrecisionResultProcedure pp=new PrecisionResultProcedure(result);
        pp.getLSEPrecision();
        for (        double v : pp.precision)         stats[0].addValue(v);
      }
 catch (      DataException e) {
      }
    }
    if (result.hasNoise()) {
      result.forEach(new PeakResultProcedure(){
        public void execute(        PeakResult peakResult){
          stats[1].addValue(peakResult.getSignal() / peakResult.noise);
        }
      }
);
    }
  }
  CalibrationReader calibration=result.getCalibrationReader();
  sb.append(result.getName());
  int maxT=0;
  if (result.size() == 0) {
    sb.append("String_Node_Str");
  }
 else {
    sb.append('\t').append(result.size());
    maxT=result.getMaxFrame();
    sb.append('\t').append(maxT);
  }
  if (calibration != null && calibration.hasExposureTime()) {
    sb.append('\t').append(Utils.timeToString(maxT * calibration.getExposureTime()));
  }
 else {
    sb.append("String_Node_Str");
  }
  if (size > 0) {
    boolean includeDeviations=result.hasDeviations();
    long memorySize=MemoryPeakResults.estimateMemorySize(size,includeDeviations);
    String memory=MemoryPeakResults.memorySizeString(memorySize);
    sb.append('\t').append(memory);
  }
 else {
    sb.append("String_Node_Str");
  }
  Rectangle bounds=result.getBounds(true);
  sb.append(String.format("String_Node_Str",bounds.x,bounds.y,bounds.x + bounds.width,bounds.y + bounds.height));
  if (calibration != null) {
    sb.append('\t').append(calibration.hasNmPerPixel() ? Utils.rounded(calibration.getNmPerPixel()) : '-');
    sb.append('\t').append(calibration.hasExposureTime() ? Utils.rounded(calibration.getExposureTime()) : '-');
    if (calibration.hasCameraType()) {
      sb.append('\t').append(CalibrationProtosHelper.getName(calibration.getCameraType()));
      if (calibration.isCCDCamera()) {
        sb.append("String_Node_Str").append(calibration.getBias());
        sb.append("String_Node_Str").append(calibration.getCountPerPhoton());
      }
    }
 else {
      sb.append("String_Node_Str");
    }
    sb.append('\t').append(calibration.hasDistanceUnit() ? UnitHelper.getShortName(calibration.getDistanceUnit()) : '-');
    sb.append('\t').append(calibration.hasIntensityUnit() ? UnitHelper.getShortName(calibration.getIntensityUnit()) : '-');
  }
 else {
    sb.append("String_Node_Str");
  }
  for (int i=0; i < stats.length; i++) {
    if (Double.isNaN(stats[i].getMean())) {
      sb.append("String_Node_Str");
    }
 else {
      sb.append('\t').append(IJ.d2s(stats[i].getMean(),3));
      if (suffix[i] != 0)       sb.append(suffix[i]);
      sb.append('\t').append(IJ.d2s(stats[i].getPercentile(50),3));
      sb.append('\t').append(IJ.d2s(stats[i].getMin(),3));
      sb.append('\t').append(IJ.d2s(stats[i].getMax(),3));
    }
  }
  sb.append("String_Node_Str");
}