Program: 26230
Project: 26230
Buggy source:
/** 
 * Build the coefficients pyramid.
 */
private void buildCoefficientPyramid(){
  int fullWidth;
  int fullHeight;
  double[] fullDual=new double[width * height];
  int halfWidth=width;
  int halfHeight=height;
  basicToCardinal2D(coefficient,fullDual,width,height,7);
  int extraSteps=(int)Math.round(Math.log((double)this.maxImageSubsamplingFactor) / Math.log(2));
  for (int depth=1; ((depth <= (pyramidDepth + extraSteps)) && (!t.isInterrupted())); depth++) {
    IJ.showStatus("String_Node_Str");
    IJ.showProgress((double)depth / (pyramidDepth + extraSteps));
    fullWidth=halfWidth;
    fullHeight=halfHeight;
    halfWidth/=2;
    halfHeight/=2;
    if (fullWidth <= BSplineModel.min_image_size || fullHeight <= BSplineModel.min_image_size) {
      if (this.bSubsampledOutput)       IJ.log("String_Node_Str" + fullWidth + "String_Node_Str"+ fullHeight);
      cpyramid.push(fullDual);
      cpyramid.push(new Integer(fullHeight));
      cpyramid.push(new Integer(fullWidth));
      halfWidth*=2;
      halfHeight*=2;
      continue;
    }
    final double[] halfDual=getHalfDual2D(fullDual,fullWidth,fullHeight);
    final double[] halfCoefficient=getBasicFromCardinal2D(halfDual,halfWidth,halfHeight,7);
    if (depth >= extraSteps) {
      if (this.bSubsampledOutput)       IJ.log("String_Node_Str" + halfWidth + "String_Node_Str"+ halfHeight);
      cpyramid.push(halfCoefficient);
      cpyramid.push(new Integer(halfHeight));
      cpyramid.push(new Integer(halfWidth));
    }
    fullDual=halfDual;
    if (this.bSubsampledOutput && halfWidth == this.subWidth) {
      this.subCoeffs=halfCoefficient;
    }
  }
  smallestWidth=halfWidth;
  smallestHeight=halfHeight;
  currentDepth=pyramidDepth + 1;
}

Fixed version (ground truth):
/** 
 * Build the coefficients pyramid.
 */
private void buildCoefficientPyramid(){
  int fullWidth;
  int fullHeight;
  double[] fullDual=new double[width * height];
  int halfWidth=width;
  int halfHeight=height;
  basicToCardinal2D(coefficient,fullDual,width,height,7);
  for (int depth=1; ((depth <= pyramidDepth) && (!t.isInterrupted())); depth++) {
    IJ.showStatus("String_Node_Str");
    IJ.showProgress((double)depth / pyramidDepth);
    fullWidth=halfWidth;
    fullHeight=halfHeight;
    halfWidth/=2;
    halfHeight/=2;
    if (fullWidth <= BSplineModel.min_image_size || fullHeight <= BSplineModel.min_image_size) {
      if (this.bSubsampledOutput)       IJ.log("String_Node_Str" + fullWidth + "String_Node_Str"+ fullHeight);
      cpyramid.push(fullDual);
      cpyramid.push(new Integer(fullHeight));
      cpyramid.push(new Integer(fullWidth));
      halfWidth*=2;
      halfHeight*=2;
      continue;
    }
    final double[] halfDual=getHalfDual2D(fullDual,fullWidth,fullHeight);
    final double[] halfCoefficient=getBasicFromCardinal2D(halfDual,halfWidth,halfHeight,7);
    if (this.bSubsampledOutput)     IJ.log("String_Node_Str" + halfWidth + "String_Node_Str"+ halfHeight);
    cpyramid.push(halfCoefficient);
    cpyramid.push(new Integer(halfHeight));
    cpyramid.push(new Integer(halfWidth));
    fullDual=halfDual;
    if (this.bSubsampledOutput && halfWidth == this.subWidth) {
      this.subCoeffs=halfCoefficient;
    }
  }
  smallestWidth=halfWidth;
  smallestHeight=halfHeight;
  currentDepth=pyramidDepth + 1;
}