Program: 22682
Project: 22682
Buggy source:
/** 
 * Get derivatives features (to be submitted in an ExecutorService)
 * @param originalImage input image
 * @param sigma isotropic smoothing scale
 * @param xOrder x-order of differentiation
 * @param yOrder y-order of differentiation
 * @param zOrder z-order of differentiation
 * @return filter image after specific order derivatives
 */
public Callable<ArrayList<ImagePlus>> getDerivatives(final ImagePlus originalImage,final double sigma,final int xOrder,final int yOrder,final int zOrder){
  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 ImagePlus ip=ImageScience.computeDifferentialImage(sigma,xOrder,yOrder,zOrder,channel);
        if (xOrder + yOrder + zOrder == 0)         ip.setTitle(availableFeatures[GAUSSIAN] + "String_Node_Str" + sigma);
 else         ip.setTitle(availableFeatures[DERIVATIVES] + "String_Node_Str" + xOrder+ "String_Node_Str"+ yOrder+ "String_Node_Str"+ zOrder+ "String_Node_Str"+ sigma);
        ip.getImageStack().deleteLastSlice();
        ip.getImageStack().deleteSlice(1);
        results[ch].add(ip);
      }
      return mergeResultChannels(results);
    }
  }
;
}

Fixed version (ground truth):
/** 
 * Get derivatives features (to be submitted in an ExecutorService)
 * @param originalImage input image
 * @param sigma isotropic smoothing scale
 * @param xOrder x-order of differentiation
 * @param yOrder y-order of differentiation
 * @param zOrder z-order of differentiation
 * @return filter image after specific order derivatives
 */
public Callable<ArrayList<ImagePlus>> getDerivatives(final ImagePlus originalImage,final double sigma,final int xOrder,final int yOrder,final int zOrder){
  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 ImagePlus ip=ImageScience.computeDifferentialImage(sigma,xOrder,yOrder,zOrder,channel);
        if (xOrder + yOrder + zOrder == 0)         ip.setTitle(availableFeatures[GAUSSIAN] + "String_Node_Str" + sigma);
 else         ip.setTitle(availableFeatures[DERIVATIVES] + "String_Node_Str" + xOrder+ "String_Node_Str"+ yOrder+ "String_Node_Str"+ zOrder+ "String_Node_Str"+ sigma);
        ip.getImageStack().deleteLastSlice();
        ip.getImageStack().deleteSlice(1);
        results[ch].add(ip);
      }
      return mergeResultChannels(results);
    }
  }
;
}