Program: 22686
Project: 22686
Buggy source:
/** 
 * Get Hessian features (to be submitted in an ExecutorService)
 * @param originalImage input image
 * @param sigma isotropic smoothing scale	
 * @return filter Hessian filter images
 */
public Callable<ArrayList<ImagePlus>> getHessian(final ImagePlus originalImage,final double sigma,final boolean absolute){
  if (Thread.currentThread().isInterrupted())   return null;
  return new Callable<ArrayList<ImagePlus>>(){
    public ArrayList<ImagePlus> call(){
      ImagePlus[] channels=extractChannels(originalImage);
      ArrayList<ImagePlus>[] results=new ArrayList[channels.length];
      for (int ch=0; ch < channels.length; ch++) {
        results[ch]=new ArrayList<ImagePlus>();
        final ImagePlus channel=channels[ch].duplicate();
        channel.getImageStack().addSlice("String_Node_Str",channels[ch].getImageStack().getProcessor(channels[ch].getImageStackSize()));
        channel.getImageStack().addSlice("String_Node_Str",channels[ch].getImageStack().getProcessor(1),1);
        Calibration c=channel.getCalibration();
        c.pixelWidth=scaleFactor[0];
        c.pixelHeight=scaleFactor[1];
        c.pixelDepth=scaleFactor[2];
        final ArrayList<ImagePlus> result=ImageScience.computeHessianImages(sigma,absolute,channel);
        final ImageStack smallest=result.get(0).getImageStack();
        final ImageStack middle=result.get(1).getImageStack();
        final ImageStack largest=result.get(2).getImageStack();
        smallest.deleteLastSlice();
        smallest.deleteSlice(1);
        middle.deleteLastSlice();
        middle.deleteSlice(1);
        largest.deleteLastSlice();
        largest.deleteSlice(1);
        results[ch].add(new ImagePlus(availableFeatures[HESSIAN] + "String_Node_Str" + sigma+ "String_Node_Str"+ absolute,smallest));
        results[ch].add(new ImagePlus(availableFeatures[HESSIAN] + "String_Node_Str" + sigma+ "String_Node_Str"+ absolute,middle));
        results[ch].add(new ImagePlus(availableFeatures[HESSIAN] + "String_Node_Str" + sigma+ "String_Node_Str"+ absolute,largest));
      }
      return mergeResultChannels(results);
    }
  }
;
}

Fixed version (ground truth):
/** 
 * Get Hessian features (to be submitted in an ExecutorService)
 * @param originalImage input image
 * @param sigma isotropic smoothing scale	
 * @return filter Hessian filter images
 */
public Callable<ArrayList<ImagePlus>> getHessian(final ImagePlus originalImage,final double sigma,final boolean absolute){
  if (Thread.currentThread().isInterrupted())   return null;
  return new Callable<ArrayList<ImagePlus>>(){
    public ArrayList<ImagePlus> call(){
      ImagePlus[] channels=extractChannels(originalImage);
      ArrayList<ImagePlus>[] results=new ArrayList[channels.length];
      for (int ch=0; ch < channels.length; ch++) {
        results[ch]=new ArrayList<ImagePlus>();
        final ImagePlus channel=channels[ch].duplicate();
        channel.getImageStack().addSlice("String_Node_Str",channels[ch].getImageStack().getProcessor(channels[ch].getImageStackSize()));
        channel.getImageStack().addSlice("String_Node_Str",channels[ch].getImageStack().getProcessor(1),1);
        Calibration c=channel.getCalibration();
        c.pixelWidth=1.0 / scaleFactor[0];
        c.pixelHeight=1.0 / scaleFactor[1];
        c.pixelDepth=1.0 / scaleFactor[2];
        final ArrayList<ImagePlus> result=ImageScience.computeHessianImages(sigma,absolute,channel);
        final ImageStack smallest=result.get(0).getImageStack();
        final ImageStack middle=result.get(1).getImageStack();
        final ImageStack largest=result.get(2).getImageStack();
        smallest.deleteLastSlice();
        smallest.deleteSlice(1);
        middle.deleteLastSlice();
        middle.deleteSlice(1);
        largest.deleteLastSlice();
        largest.deleteSlice(1);
        results[ch].add(new ImagePlus(availableFeatures[HESSIAN] + "String_Node_Str" + sigma+ "String_Node_Str"+ absolute,smallest));
        results[ch].add(new ImagePlus(availableFeatures[HESSIAN] + "String_Node_Str" + sigma+ "String_Node_Str"+ absolute,middle));
        results[ch].add(new ImagePlus(availableFeatures[HESSIAN] + "String_Node_Str" + sigma+ "String_Node_Str"+ absolute,largest));
      }
      return mergeResultChannels(results);
    }
  }
;
}