Program: 140945
Project: 140945
Buggy source:
@Override protected void operate(Grid src,Grid dst,int startRow,int endRow){
  if (src == null) {
    throw new IllegalArgumentException();
  }
  final int filterSize=filterSize();
  final int halfFilterSize=filterSize / 2;
  final int cols=src.getCols();
  final int rows=src.getRows();
  float[][] srcGrid=src.getGrid();
  float[][] dstGrid=dst.getGrid();
  float[] weights=laplacianPyramid.createConstantWeights(0);
  for (int i=0; i < Math.min(levels,weights.length); i++) {
    weights[i]=1;
  }
  Grid highPassGrid=laplacianPyramid.sumLevels(weights,true);
  for (int row=startRow; row < halfFilterSize; row++) {
    for (int col=0; col < cols; col++) {
      operateBorder(src,dst,col,row,highPassGrid);
    }
  }
  for (int row=rows - halfFilterSize; row < endRow; row++) {
    for (int col=0; col < cols; col++) {
      operateBorder(src,dst,col,row,highPassGrid);
    }
  }
  startRow=Math.max(halfFilterSize,startRow);
  endRow=Math.min(src.getRows() - halfFilterSize,endRow);
  for (int col=0; col < halfFilterSize; col++) {
    for (int row=startRow; row < endRow; row++) {
      operateBorder(src,dst,col,row,highPassGrid);
    }
  }
  for (int col=cols - halfFilterSize; col < cols; col++) {
    for (int row=startRow; row < endRow; row++) {
      operateBorder(src,dst,col,row,highPassGrid);
    }
  }
  final float npts=filterSize * filterSize;
  for (int row=startRow; row < endRow; row++) {
    float[] dstRow=dstGrid[row];
    for (int col=halfFilterSize; col < cols - halfFilterSize; col++) {
      float sqDif=0;
      for (int r=row - halfFilterSize; r <= row + halfFilterSize; r++) {
        float[] srcRow=srcGrid[r];
        for (int c=col - halfFilterSize; c <= col + halfFilterSize; c++) {
          float dif=highPassGrid.getValue(c,r);
          sqDif+=dif * dif;
        }
      }
      float std=(float)Math.sqrt(sqDif / npts);
      dstRow[col]=std;
    }
  }
}

Fixed version (ground truth):
@Override protected void operate(Grid src,Grid dst,int startRow,int endRow){
  if (src == null) {
    throw new IllegalArgumentException();
  }
  final int filterSize=filterSize();
  final int halfFilterSize=filterSize / 2;
  final int cols=src.getCols();
  final int rows=src.getRows();
  float[][] srcGrid=src.getGrid();
  float[][] dstGrid=dst.getGrid();
  for (int row=startRow; row < halfFilterSize; row++) {
    for (int col=0; col < cols; col++) {
      operateBorder(src,dst,col,row,highPassGrid);
    }
  }
  for (int row=rows - halfFilterSize; row < endRow; row++) {
    for (int col=0; col < cols; col++) {
      operateBorder(src,dst,col,row,highPassGrid);
    }
  }
  startRow=Math.max(halfFilterSize,startRow);
  endRow=Math.min(src.getRows() - halfFilterSize,endRow);
  for (int col=0; col < halfFilterSize; col++) {
    for (int row=startRow; row < endRow; row++) {
      operateBorder(src,dst,col,row,highPassGrid);
    }
  }
  for (int col=cols - halfFilterSize; col < cols; col++) {
    for (int row=startRow; row < endRow; row++) {
      operateBorder(src,dst,col,row,highPassGrid);
    }
  }
  final float npts=filterSize * filterSize;
  for (int row=startRow; row < endRow; row++) {
    float[] dstRow=dstGrid[row];
    for (int col=halfFilterSize; col < cols - halfFilterSize; col++) {
      float sqDif=0;
      for (int r=row - halfFilterSize; r <= row + halfFilterSize; r++) {
        float[] srcRow=srcGrid[r];
        for (int c=col - halfFilterSize; c <= col + halfFilterSize; c++) {
          float dif=highPassGrid.getValue(c,r);
          sqDif+=dif * dif;
        }
      }
      float std=(float)Math.sqrt(sqDif / npts);
      dstRow[col]=std;
    }
  }
}