Program: 11432
Project: 11432
Buggy source:
/** 
 * Find all pixels in the adaptive neighbourhood of a given pixel.
 * @param xc         X coordinate of the given pixel
 * @param yc         Y coordinate of the given pixel
 * @param sx0        X coordinate of the pixel at the upper left corner of the source rectangle
 * @param sy0        Y coordinate of the pixel at the upper left corner of the source rectangle
 * @param sw         Width of the source rectangle
 * @param sh         Height of the source rectangle
 * @param srcTileIntensity Source tile intensity.
 * @param noDataValue      Place holder for no data value.
 * @param seed       The initial seed value
 * @return anPixelList List of pixels in the adaptive neighbourhood
 */
private Pix[] getIDANPixels(final int xc,final int yc,final int sx0,final int sy0,final int sw,final int sh,final double[][] srcTileIntensity,final double noDataValue,final double seed){
  final double threshold50=(2 / 3) * sigmaV;
  final java.util.List<Pix> anPixelList=new ArrayList<>(anSize);
  final Pix[] bgPixelList=regionGrowing(xc,yc,sx0,sy0,sw,sh,srcTileIntensity,noDataValue,seed,threshold50,anPixelList);
  double newSeed=0.0;
  if (!anPixelList.isEmpty()) {
    for (    Pix pixel : anPixelList) {
      newSeed+=srcTileIntensity[pixel.y - sy0][pixel.x - sx0];
    }
    newSeed/=anPixelList.size();
  }
 else {
    newSeed=seed;
  }
  final double threshold95=2 * sigmaV;
  reExamBackgroundPixels(sx0,sy0,srcTileIntensity,noDataValue,newSeed,threshold95,anPixelList,bgPixelList);
  if (anPixelList.isEmpty()) {
    return new Pix[]{new Pix(xc,yc)};
  }
  return anPixelList.toArray(new Pix[anPixelList.size()]);
}

Fixed version (ground truth):
/** 
 * Find all pixels in the adaptive neighbourhood of a given pixel.
 * @param xc         X coordinate of the given pixel
 * @param yc         Y coordinate of the given pixel
 * @param sx0        X coordinate of the pixel at the upper left corner of the source rectangle
 * @param sy0        Y coordinate of the pixel at the upper left corner of the source rectangle
 * @param sw         Width of the source rectangle
 * @param sh         Height of the source rectangle
 * @param srcTileIntensity Source tile intensity.
 * @param noDataValue      Place holder for no data value.
 * @param seed       The initial seed value
 * @return anPixelList List of pixels in the adaptive neighbourhood
 */
private Pix[] getIDANPixels(final int xc,final int yc,final int sx0,final int sy0,final int sw,final int sh,final double[][] srcTileIntensity,final double noDataValue,final double seed){
  final double threshold50=(2.0 / 3.0) * sigmaV;
  final java.util.List<Pix> anPixelList=new ArrayList<>(anSize);
  final Pix[] bgPixelList=regionGrowing(xc,yc,sx0,sy0,sw,sh,srcTileIntensity,noDataValue,seed,threshold50,anPixelList);
  double newSeed=0.0;
  if (!anPixelList.isEmpty()) {
    for (    Pix pixel : anPixelList) {
      newSeed+=srcTileIntensity[pixel.y - sy0][pixel.x - sx0];
    }
    newSeed/=anPixelList.size();
  }
 else {
    newSeed=seed;
  }
  final double threshold95=2.0 * sigmaV;
  reExamBackgroundPixels(sx0,sy0,srcTileIntensity,noDataValue,newSeed,threshold95,anPixelList,bgPixelList);
  if (anPixelList.isEmpty()) {
    return new Pix[]{new Pix(xc,yc)};
  }
  return anPixelList.toArray(new Pix[anPixelList.size()]);
}