Program: 11549
Project: 11549
Buggy source:
/** 
 * Called by the framework in order to compute a tile for the given target band. <p>The default implementation throws a runtime exception with the message "not implemented".</p>
 * @param targetBand The target band.
 * @param targetTile The current tile associated with the target band to be computed.
 * @param pm         A progress monitor which should be used to determine computation cancelation requests.
 * @throws org.esa.beam.framework.gpf.OperatorException If an error occurs during computation of the target raster.
 */
@Override public void computeTile(Band targetBand,Tile targetTile,ProgressMonitor pm) throws OperatorException {
  final Rectangle targetTileRectangle=targetTile.getRectangle();
  final int tx0=targetTileRectangle.x;
  final int ty0=targetTileRectangle.y;
  final int tw=targetTileRectangle.width;
  final int th=targetTileRectangle.height;
  final Rectangle sourceTileRectangle=new Rectangle(tx0,ty0,tw,th);
  try {
    final String bandName=targetBand.getName();
    final Band srcBand=sourceProduct.getBand(bandName);
    final Tile srcTile=getSourceTile(srcBand,sourceTileRectangle);
    if (srcTile == null) {
      throw new OperatorException("String_Node_Str" + targetBand.getName());
    }
    final ProductData srcData=srcTile.getDataBuffer();
    final ProductData tgtData=targetTile.getDataBuffer();
    final int maxy=ty0 + th;
    final int maxx=tx0 + tw;
    ArrayList<double[]> calibrationValue=null;
    final NOISE_BAND_TYPE noiseBandType=getNoiseBandType(bandName);
switch (noiseBandType) {
case SIGMA0:
      calibrationValue=sigma0;
    break;
case BETA0:
  calibrationValue=beta0;
break;
case GAMMA:
calibrationValue=gamma;
break;
case DN:
calibrationValue=dn;
break;
case INVALID:
throw new OperatorException("String_Node_Str" + bandName);
}
for (int y=ty0; y < maxy; y++) {
for (int x=tx0; x < maxx; x++) {
final int index=targetTile.getDataBufferIndex(x,y);
final Double srcValue=srcData.getElemDoubleAt(index);
final double eta=computeValue(x,y,noiseLine,noisePixel,noiseValue);
final double A=computeValue(x,y,calibrationLine,calibrationPixel,calibrationValue);
final double noise=performCorrection ? eta / A : -eta / A;
final double tgtValue=srcValue + noise;
tgtData.setElemDoubleAt(index,tgtValue);
}
}
}
 catch (Throwable e) {
OperatorUtils.catchOperatorException(getId(),e);
}
 finally {
pm.done();
}
}

Fixed version (ground truth):
/** 
 * Called by the framework in order to compute a tile for the given target band. <p>The default implementation throws a runtime exception with the message "not implemented".</p>
 * @param targetBand The target band.
 * @param targetTile The current tile associated with the target band to be computed.
 * @param pm         A progress monitor which should be used to determine computation cancelation requests.
 * @throws org.esa.beam.framework.gpf.OperatorException If an error occurs during computation of the target raster.
 */
@Override public void computeTile(Band targetBand,Tile targetTile,ProgressMonitor pm) throws OperatorException {
  final Rectangle targetTileRectangle=targetTile.getRectangle();
  final int tx0=targetTileRectangle.x;
  final int ty0=targetTileRectangle.y;
  final int tw=targetTileRectangle.width;
  final int th=targetTileRectangle.height;
  final Rectangle sourceTileRectangle=new Rectangle(tx0,ty0,tw,th);
  try {
    final String bandName=targetBand.getName();
    final Band srcBand=sourceProduct.getBand(bandName);
    final Tile srcTile=getSourceTile(srcBand,sourceTileRectangle);
    if (srcTile == null) {
      throw new OperatorException("String_Node_Str" + targetBand.getName());
    }
    final ProductData srcData=srcTile.getDataBuffer();
    final ProductData tgtData=targetTile.getDataBuffer();
    final int maxy=ty0 + th;
    final int maxx=tx0 + tw;
    ArrayList<double[]> calibrationValue=null;
    final NOISE_BAND_TYPE noiseBandType=getNoiseBandType(bandName);
switch (noiseBandType) {
case SIGMA0:
      calibrationValue=sigma0;
    break;
case BETA0:
  calibrationValue=beta0;
break;
case GAMMA:
calibrationValue=gamma;
break;
case DN:
calibrationValue=dn;
break;
case INVALID:
throw new OperatorException("String_Node_Str" + bandName);
}
for (int y=ty0; y < maxy; y++) {
for (int x=tx0; x < maxx; x++) {
final int index=targetTile.getDataBufferIndex(x,y);
final Double srcValue=srcData.getElemDoubleAt(index);
final double eta=computeValue(x,y,noiseLine,noisePixel,noiseValue);
final double A=computeValue(x,y,calibrationLine,calibrationPixel,calibrationValue);
final double noise=removeNoise ? eta / A : -eta / A;
final double tgtValue=srcValue - noise;
tgtData.setElemDoubleAt(index,tgtValue);
}
}
}
 catch (Throwable e) {
OperatorUtils.catchOperatorException(getId(),e);
}
 finally {
pm.done();
}
}