Program: 11556
Project: 11556
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 targetTileMap The target tiles associated with all target bands to be computed.
 * @param targetRectangle The rectangle of target tile.
 * @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 computeTileStack(Map<Band,Tile> targetTileMap,Rectangle targetRectangle,ProgressMonitor pm) throws OperatorException {
  try {
    if (!statsCalculated) {
      calculateStatistics();
    }
    final ProductData[] bandsRawSamples=new ProductData[numOfSourceBands];
    for (int i=0; i < numOfSourceBands; i++) {
      bandsRawSamples[i]=getSourceTile(sourceProduct.getBand(sourceBandNames[i]),targetRectangle).getRawSamples();
    }
    final int n=bandsRawSamples[0].getNumElems();
    for (int i=0; i < numPCA; i++) {
      final Band targetBand=targetProduct.getBand("String_Node_Str" + i);
      final Tile targetTile=targetTileMap.get(targetBand);
      final ProductData trgData=targetTile.getDataBuffer();
      for (int k=0; k < n; k++) {
        double vPCA=0.0;
        for (int j=0; j < numOfSourceBands; j++) {
          vPCA+=bandsRawSamples[j].getElemDoubleAt(k) * eigenVectorMatrices[j][i];
        }
        trgData.setElemDoubleAt(k,vPCA - minPCA[i]);
      }
    }
  }
 catch (  Throwable e) {
    throw new OperatorException(e);
  }
 finally {
    pm.done();
  }
  pcaImageComputed=true;
}

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 targetTileMap The target tiles associated with all target bands to be computed.
 * @param targetRectangle The rectangle of target tile.
 * @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 computeTileStack(Map<Band,Tile> targetTileMap,Rectangle targetRectangle,ProgressMonitor pm) throws OperatorException {
  try {
    final int x0=targetRectangle.x;
    final int y0=targetRectangle.y;
    final int w=targetRectangle.width;
    final int h=targetRectangle.height;
    if (!statsCalculated) {
      calculateStatistics();
    }
    final ProductData[] bandsRawSamples=new ProductData[numOfSourceBands];
    for (int i=0; i < numOfSourceBands; i++) {
      bandsRawSamples[i]=getSourceTile(sourceProduct.getBand(sourceBandNames[i]),targetRectangle).getRawSamples();
    }
    for (int i=0; i < numPCA; i++) {
      final Band targetBand=targetProduct.getBand("String_Node_Str" + i);
      final Tile targetTile=targetTileMap.get(targetBand);
      final ProductData trgData=targetTile.getDataBuffer();
      final TileIndex targetIndex=new TileIndex(targetTile);
      int index;
      int k=0;
      for (int y=y0; y < y0 + h; y++) {
        targetIndex.calculateStride(y);
        for (int x=x0; x < x0 + w; x++) {
          index=targetIndex.getIndex(x);
          double vPCA=0.0;
          for (int j=0; j < numOfSourceBands; j++) {
            vPCA+=bandsRawSamples[j].getElemDoubleAt(k) * eigenVectorMatrices[j][i];
          }
          k++;
          trgData.setElemDoubleAt(index,vPCA - minPCA[i]);
        }
      }
    }
  }
 catch (  Throwable e) {
    throw new OperatorException(e);
  }
 finally {
    pm.done();
  }
  pcaImageComputed=true;
}