nus-yam/ex-repair huggingface dataset:
Program: 11496
Project: 11496
Buggy source:
@Override public void updateParameters(){
  paramMap.put("String_Node_Str",Integer.parseInt(orbitDegree.getText()));
  paramMap.put("String_Node_Str",demName.getSelectedItem());
  final String extFileStr=externalDEMFile.getText();
  if (!extFileStr.isEmpty()) {
    paramMap.put("String_Node_Str",new File(extFileStr));
    paramMap.put("String_Node_Str",Double.parseDouble(externalDEMNoDataValue.getText()));
  }
  paramMap.put("String_Node_Str",topoPhaseBandName.getText());
}

Fixed version (ground truth):
@Override public void updateParameters(){
  paramMap.put("String_Node_Str",Integer.parseInt(orbitDegree.getText()));
  paramMap.put("String_Node_Str",demName.getSelectedItem());
  final String extFileStr=externalDEMFile.getText();
  if (!extFileStr.isEmpty()) {
    paramMap.put("String_Node_Str",new File(extFileStr));
    paramMap.put("String_Node_Str",Double.parseDouble(externalDEMNoDataValue.getText()));
  }
  paramMap.put("String_Node_Str",topoPhaseBandName.getText());
  paramMap.put("String_Node_Str",tileExtensionPercent.getSelectedItem());
}
Program: 11499
Project: 11499
Buggy source:
private void getSlvApproxSceneCentreAzimuthTime() throws Exception {
  final MetadataElement root=AbstractMetadata.getOriginalProductMetadata(sourceProduct);
  final MetadataElement slvRoot=AbstractMetadata.getSlaveMetadata(root);
  final double firstLineTime=slvRoot.getAttributeUTC(AbstractMetadata.first_line_time).getMJD() * Constants.secondsInDay;
  final double lastLineTime=slvRoot.getAttributeUTC(AbstractMetadata.last_line_time).getMJD() * Constants.secondsInDay;
  slvScenseCentreAzimuthTime=0.5 * (firstLineTime + lastLineTime);
}

Fixed version (ground truth):
private void getSlvApproxSceneCentreAzimuthTime() throws Exception {
  MetadataElement slaveElem=sourceProduct.getMetadataRoot().getElement(AbstractMetadata.SLAVE_METADATA_ROOT);
  MetadataElement[] slaveRoot=slaveElem.getElements();
  final MetadataElement slvRoot=slaveRoot[0];
  final double firstLineTimeInDays=slvRoot.getAttributeUTC(AbstractMetadata.first_line_time).getMJD();
  final double firstLineTime=(firstLineTimeInDays - (int)firstLineTimeInDays) * Constants.secondsInDay;
  final double lastLineTimeInDays=slvRoot.getAttributeUTC(AbstractMetadata.last_line_time).getMJD();
  final double lastLineTime=(lastLineTimeInDays - (int)lastLineTimeInDays) * Constants.secondsInDay;
  slvScenseCentreAzimuthTime=0.5 * (firstLineTime + lastLineTime);
}
Program: 11502
Project: 11502
Buggy source:
private void constructFlatEarthPolynomialsForTOPSARProduct() throws Exception {
  for (  Integer keyMaster : masterMap.keySet()) {
    CplxContainer master=masterMap.get(keyMaster);
    for (    Integer keySlave : slaveMap.keySet()) {
      CplxContainer slave=slaveMap.get(keySlave);
      for (int s=0; s < numSubSwaths; s++) {
        final int numBursts=subSwath[s].numOfBursts;
        for (int b=0; b < numBursts; b++) {
          final String polynomialName=slave.name + "String_Node_Str" + s+ "String_Node_Str"+ b;
          flatEarthPolyMap.put(polynomialName,estimateFlatEarthPolynomial(master.metaData,master.orbit,slave.metaData,slave.orbit,s,b));
        }
      }
    }
  }
}

Fixed version (ground truth):
private void constructFlatEarthPolynomialsForTOPSARProduct() throws Exception {
  for (  Integer keyMaster : masterMap.keySet()) {
    CplxContainer master=masterMap.get(keyMaster);
    for (    Integer keySlave : slaveMap.keySet()) {
      CplxContainer slave=slaveMap.get(keySlave);
      for (int s=0; s < numSubSwaths; s++) {
        final int numBursts=subSwath[s].numOfBursts;
        for (int b=0; b < numBursts; b++) {
          final String polynomialName=slave.name + "String_Node_Str" + s+ "String_Node_Str"+ b;
          flatEarthPolyMap.put(polynomialName,estimateFlatEarthPolynomial(master.metaData,master.orbit,slave.metaData,slave.orbit,s + 1,b));
        }
      }
    }
  }
}
Program: 11503
Project: 11503
Buggy source:
private int getPolyCoeffIndex(final double time){
  final int nv=orbitStateVectors.length;
  if (time < orbitStateVectors[0].time_mjd) {
    return 0;
  }
  if (time > orbitStateVectors[nv - 1].time_mjd) {
    return nv - 2;
  }
  for (int i=0; i < nv - 1; i++) {
    if (time >= orbitStateVectors[i].time_mjd && time < orbitStateVectors[i + 1].time_mjd) {
      return i;
    }
  }
  return -1;
}

Fixed version (ground truth):
private int getPolyCoeffIndex(final double time){
  final int nv=orbitStateVectors.length;
  if (time < orbitStateVectors[0].time_mjd) {
    return 0;
  }
  if (time >= orbitStateVectors[nv - 1].time_mjd) {
    return nv - 2;
  }
  for (int i=0; i < nv - 1; i++) {
    if (time >= orbitStateVectors[i].time_mjd && time < orbitStateVectors[i + 1].time_mjd) {
      return i;
    }
  }
  return -1;
}
Program: 11508
Project: 11508
Buggy source:
public static String getPolarType(final Product product) throws Exception {
  final MetadataElement absRoot=AbstractMetadata.getAbstractedMetadata(product);
  if (absRoot != null) {
    final String pol1=absRoot.getAttributeString(AbstractMetadata.mds1_tx_rx_polar,"String_Node_Str").trim();
    final String pol2=absRoot.getAttributeString(AbstractMetadata.mds2_tx_rx_polar,"String_Node_Str").trim();
    final String pol3=absRoot.getAttributeString(AbstractMetadata.mds3_tx_rx_polar,"String_Node_Str").trim();
    final String pol4=absRoot.getAttributeString(AbstractMetadata.mds4_tx_rx_polar,"String_Node_Str").trim();
    if (!pol1.isEmpty() && !pol2.isEmpty()) {
      if (!pol3.isEmpty() && !pol4.isEmpty()) {
        return "String_Node_Str";
      }
      return "String_Node_Str";
    }
  }
  return "String_Node_Str";
}

Fixed version (ground truth):
public static String getPolarType(final Product product) throws Exception {
  final MetadataElement absRoot=AbstractMetadata.getAbstractedMetadata(product);
  if (absRoot != null) {
    if (!AbstractMetadata.isNoData(absRoot,AbstractMetadata.mds1_tx_rx_polar) && !AbstractMetadata.isNoData(absRoot,AbstractMetadata.mds2_tx_rx_polar)) {
      if (!AbstractMetadata.isNoData(absRoot,AbstractMetadata.mds3_tx_rx_polar) && !AbstractMetadata.isNoData(absRoot,AbstractMetadata.mds4_tx_rx_polar)) {
        return "String_Node_Str";
      }
      return "String_Node_Str";
    }
  }
  return "String_Node_Str";
}
Program: 11511
Project: 11511
Buggy source:
private static String getPolarization(final Product product,final int cnt){
  final MetadataElement globalElem=AbstractMetadata.getOriginalProductMetadata(product).getElement(NetcdfConstants.GLOBAL_ATTRIBUTES_NAME);
  if (globalElem != null) {
    final MetadataElement s01Elem=globalElem.getElement("String_Node_Str" + cnt);
    if (s01Elem != null) {
      final String polStr=s01Elem.getAttributeString("String_Node_Str","String_Node_Str");
      if (!polStr.isEmpty())       return polStr;
    }
  }
  return null;
}

Fixed version (ground truth):
private static String getPolarization(final Product product,final int cnt){
  final MetadataElement globalElem=AbstractMetadata.getOriginalProductMetadata(product).getElement(NetcdfConstants.GLOBAL_ATTRIBUTES_NAME);
  if (globalElem != null) {
    final MetadataElement s01Elem=globalElem.getElement("String_Node_Str" + cnt);
    if (s01Elem != null) {
      final String polStr=s01Elem.getAttributeString("String_Node_Str","String_Node_Str");
      if (!polStr.isEmpty())       return polStr;
    }
 else {
      final String prefix="String_Node_Str" + cnt + '_';
      final String polStr=globalElem.getAttributeString(prefix + "String_Node_Str","String_Node_Str");
      if (!polStr.isEmpty())       return polStr;
    }
  }
  return null;
}
Program: 11512
Project: 11512
Buggy source:
/** 
 * Get calibration factors from abstracted metadata.
 */
private void getCalibrationFactors(){
  String pol;
  double factor=0.0;
  final MetadataElement globalElem=origMetadataRoot.getElement("String_Node_Str");
  final MetadataElement s01Elem=globalElem.getElement("String_Node_Str");
  if (s01Elem != null) {
    pol=s01Elem.getAttributeString("String_Node_Str").toUpperCase();
    factor=s01Elem.getAttributeDouble("String_Node_Str");
    calibrationFactor.put(pol,factor);
  }
  final MetadataElement s02Elem=globalElem.getElement("String_Node_Str");
  if (s02Elem != null) {
    pol=s02Elem.getAttributeString("String_Node_Str").toUpperCase();
    factor=s02Elem.getAttributeDouble("String_Node_Str");
    calibrationFactor.put(pol,factor);
  }
  referenceSlantRange=absRoot.getAttributeDouble(AbstractMetadata.ref_slant_range);
  referenceSlantRangeExp=absRoot.getAttributeDouble(AbstractMetadata.ref_slant_range_exp);
  referenceIncidenceAngle=absRoot.getAttributeDouble(AbstractMetadata.ref_inc_angle) * Math.PI / 180.0;
  rescalingFactor=absRoot.getAttributeDouble(AbstractMetadata.rescaling_factor);
}

Fixed version (ground truth):
/** 
 * Get calibration factors from abstracted metadata.
 */
private void getCalibrationFactors(){
  String pol;
  double factor=0.0;
  final MetadataElement globalElem=origMetadataRoot.getElement("String_Node_Str");
  final MetadataElement s01Elem=globalElem.getElement("String_Node_Str");
  if (s01Elem != null) {
    pol=s01Elem.getAttributeString("String_Node_Str").toUpperCase();
    factor=s01Elem.getAttributeDouble("String_Node_Str");
    calibrationFactor.put(pol,factor);
  }
 else {
    pol=globalElem.getAttributeString("String_Node_Str" + "String_Node_Str","String_Node_Str").toUpperCase();
    if (!pol.isEmpty()) {
      factor=globalElem.getAttributeDouble("String_Node_Str" + "String_Node_Str");
      calibrationFactor.put(pol,factor);
    }
  }
  final MetadataElement s02Elem=globalElem.getElement("String_Node_Str");
  if (s02Elem != null) {
    pol=s02Elem.getAttributeString("String_Node_Str").toUpperCase();
    factor=s02Elem.getAttributeDouble("String_Node_Str");
    calibrationFactor.put(pol,factor);
  }
 else {
    pol=globalElem.getAttributeString("String_Node_Str" + "String_Node_Str","String_Node_Str").toUpperCase();
    if (!pol.isEmpty()) {
      factor=globalElem.getAttributeDouble("String_Node_Str" + "String_Node_Str");
      calibrationFactor.put(pol,factor);
    }
  }
  referenceSlantRange=absRoot.getAttributeDouble(AbstractMetadata.ref_slant_range);
  referenceSlantRangeExp=absRoot.getAttributeDouble(AbstractMetadata.ref_slant_range_exp);
  referenceIncidenceAngle=absRoot.getAttributeDouble(AbstractMetadata.ref_inc_angle) * Math.PI / 180.0;
  rescalingFactor=absRoot.getAttributeDouble(AbstractMetadata.rescaling_factor);
}
Program: 11513
Project: 11513
Buggy source:
@Test public void testProcessAllCosmo() throws Exception {
  TestUtils.testProcessAllInPath(spi,TestUtils.rootPathsCosmoSkymed,null,exceptionExemptions);
}

Fixed version (ground truth):
@Test public void testProcessAllCosmo() throws Exception {
  TestUtils.testProcessAllInPath(spi,TestUtils.rootPathsCosmoSkymed,productTypeExemptions,exceptionExemptions);
}
Program: 11514
Project: 11514
Buggy source:
@Test public void testProcessAllALOS() throws Exception {
  TestUtils.testProcessAllInPath(spi,TestUtils.rootPathsALOS,null,exceptionExemptions);
}

Fixed version (ground truth):
@Test public void testProcessAllALOS() throws Exception {
  TestUtils.testProcessAllInPath(spi,TestUtils.rootPathsALOS,productTypeExemptions,exceptionExemptions);
}
Program: 11515
Project: 11515
Buggy source:
@Test public void testProcessAllRadarsat2() throws Exception {
  TestUtils.testProcessAllInPath(spi,TestUtils.rootPathsRadarsat2,null,exceptionExemptions);
}

Fixed version (ground truth):
@Test public void testProcessAllRadarsat2() throws Exception {
  TestUtils.testProcessAllInPath(spi,TestUtils.rootPathsRadarsat2,productTypeExemptions,exceptionExemptions);
}
Program: 11516
Project: 11516
Buggy source:
@Test public void testProcessAllTerraSARX() throws Exception {
  TestUtils.testProcessAllInPath(spi,TestUtils.rootPathsTerraSarX,null,exceptionExemptions);
}

Fixed version (ground truth):
@Test public void testProcessAllTerraSARX() throws Exception {
  TestUtils.testProcessAllInPath(spi,TestUtils.rootPathsTerraSarX,productTypeExemptions,exceptionExemptions);
}
Program: 11517
Project: 11517
Buggy source:
@Test public void testProcessAllSentinel1() throws Exception {
  TestUtils.testProcessAllInPath(spi,TestUtils.rootPathsSentinel1,null,exceptionExemptions);
}

Fixed version (ground truth):
@Test public void testProcessAllSentinel1() throws Exception {
  TestUtils.testProcessAllInPath(spi,TestUtils.rootPathsSentinel1,productTypeExemptions,exceptionExemptions);
}
Program: 11518
Project: 11518
Buggy source:
/** 
 * Processes a product and compares it to processed product known to be correct
 * @throws Exception general exception
 */
@Test public void testProcessing() throws Exception {
  final File inputFile=TestData.inputASAR_WSM;
  if (!inputFile.exists()) {
    TestUtils.skipTest(this,inputFile + "String_Node_Str");
    return;
  }
  final Product sourceProduct=TestUtils.readSourceProduct(inputFile);
  final GeolocationGridGeocodingOp op=(GeolocationGridGeocodingOp)spi.createOperator();
  assertNotNull(op);
  op.setSourceProduct(sourceProduct);
  final String[] excemptionList={"String_Node_Str"};
  final Product targetProduct=op.getTargetProduct();
  TestUtils.verifyProduct(targetProduct,true,true,true);
}

Fixed version (ground truth):
/** 
 * Processes a product and compares it to processed product known to be correct
 * @throws Exception general exception
 */
@Test public void testProcessing() throws Exception {
  final File inputFile=TestData.inputASAR_WSM;
  if (!inputFile.exists()) {
    TestUtils.skipTest(this,inputFile + "String_Node_Str");
    return;
  }
  final Product sourceProduct=TestUtils.readSourceProduct(inputFile);
  final GeolocationGridGeocodingOp op=(GeolocationGridGeocodingOp)spi.createOperator();
  assertNotNull(op);
  op.setSourceProduct(sourceProduct);
  final Product targetProduct=op.getTargetProduct();
  TestUtils.verifyProduct(targetProduct,true,true,true);
}
Program: 11519
Project: 11519
Buggy source:
/** 
 * Processes a product and compares it to processed product known to be correct
 * @throws Exception general exception
 */
@Test public void testProcessing() throws Exception {
  final File inputFile=new File(s1FolderFilePath);
  final Product sourceProduct=TestUtils.readSourceProduct(inputFile);
  final TOPSARDeburstOp op=(TOPSARDeburstOp)spi.createOperator();
  assertNotNull(op);
  op.setSourceProduct(sourceProduct);
  final Product targetProduct=op.getTargetProduct();
  TestUtils.verifyProduct(targetProduct,false,false);
  final Band targetBand=targetProduct.getBandAt(0);
  assertNotNull(targetBand);
  final int bandWidth=5000;
  final int bandHeight=5000;
  final float[] floatValues=new float[bandWidth * bandHeight];
  targetBand.readPixels(0,0,bandWidth,bandHeight,floatValues,ProgressMonitor.NULL);
}

Fixed version (ground truth):
/** 
 * Processes a product and compares it to processed product known to be correct
 * @throws Exception general exception
 */
@Test @Ignore public void testProcessing() throws Exception {
  final File inputFile=new File(s1FolderFilePath);
  final Product sourceProduct=TestUtils.readSourceProduct(inputFile);
  final TOPSARDeburstOp op=(TOPSARDeburstOp)spi.createOperator();
  assertNotNull(op);
  op.setSourceProduct(sourceProduct);
  final Product targetProduct=op.getTargetProduct();
  TestUtils.verifyProduct(targetProduct,false,false);
  final Band targetBand=targetProduct.getBandAt(0);
  assertNotNull(targetBand);
  final int bandWidth=5000;
  final int bandHeight=5000;
  final float[] floatValues=new float[bandWidth * bandHeight];
  targetBand.readPixels(0,0,bandWidth,bandHeight,floatValues,ProgressMonitor.NULL);
}
Program: 11520
Project: 11520
Buggy source:
public static void resetPolarizations(final MetadataElement absRoot,final int isPolsar,final int isCal){
  if (isPolsar > 0) {
    absRoot.setAttributeString(AbstractMetadata.mds1_tx_rx_polar,"String_Node_Str");
    absRoot.setAttributeString(AbstractMetadata.mds2_tx_rx_polar,"String_Node_Str");
    absRoot.setAttributeString(AbstractMetadata.mds3_tx_rx_polar,"String_Node_Str");
    absRoot.setAttributeString(AbstractMetadata.mds4_tx_rx_polar,"String_Node_Str");
    absRoot.setAttributeInt(AbstractMetadata.polsarData,1);
  }
  if (isCal > 0) {
    absRoot.setAttributeInt(AbstractMetadata.abs_calibration_flag,1);
  }
}

Fixed version (ground truth):
public static void resetPolarizations(final MetadataElement absRoot,final int isPolsar,final int isCal){
  if (isPolsar > 0) {
    absRoot.setAttributeString(AbstractMetadata.mds1_tx_rx_polar,AbstractMetadata.NO_METADATA_STRING);
    absRoot.setAttributeString(AbstractMetadata.mds2_tx_rx_polar,AbstractMetadata.NO_METADATA_STRING);
    absRoot.setAttributeString(AbstractMetadata.mds3_tx_rx_polar,AbstractMetadata.NO_METADATA_STRING);
    absRoot.setAttributeString(AbstractMetadata.mds4_tx_rx_polar,AbstractMetadata.NO_METADATA_STRING);
    absRoot.setAttributeInt(AbstractMetadata.polsarData,1);
  }
  if (isCal > 0) {
    absRoot.setAttributeInt(AbstractMetadata.abs_calibration_flag,1);
  }
}
Program: 11521
Project: 11521
Buggy source:
@Override protected String getCSName(final RasterDataNode raster){
  final MetadataElement absRoot=AbstractMetadata.getAbstractedMetadata(raster.getProduct());
  final String mapProjStr=absRoot.getAttributeString(AbstractMetadata.map_projection,"String_Node_Str").trim();
  if (!mapProjStr.isEmpty()) {
    return mapProjStr;
  }
  final GeoCoding geoCoding=raster.getGeoCoding();
  if (geoCoding instanceof MapGeoCoding || geoCoding instanceof CrsGeoCoding) {
    return geoCoding.getMapCRS().getName().toString();
  }
 else {
    return "String_Node_Str";
  }
}

Fixed version (ground truth):
@Override protected String getCSName(final RasterDataNode raster){
  final MetadataElement absRoot=AbstractMetadata.getAbstractedMetadata(raster.getProduct());
  if (!AbstractMetadata.isNoData(absRoot,AbstractMetadata.map_projection)) {
    return absRoot.getAttributeString(AbstractMetadata.map_projection,AbstractMetadata.NO_METADATA_STRING);
  }
  final GeoCoding geoCoding=raster.getGeoCoding();
  if (geoCoding instanceof MapGeoCoding || geoCoding instanceof CrsGeoCoding) {
    return geoCoding.getMapCRS().getName().toString();
  }
 else {
    return "String_Node_Str";
  }
}
Program: 11522
Project: 11522
Buggy source:
private static Product createSubsampledProduct(final Product product) throws IOException {
  final String quicklookBandName=ProductUtils.findSuitableQuicklookBandName(product);
  final ProductSubsetDef productSubsetDef=new ProductSubsetDef("String_Node_Str");
  int scaleFactor=product.getSceneRasterWidth() / 1000;
  if (scaleFactor < 1) {
    scaleFactor=1;
  }
  productSubsetDef.setSubSampling(scaleFactor,scaleFactor);
  productSubsetDef.setTreatVirtualBandsAsRealBands(true);
  productSubsetDef.setNodeNames(new String[]{quicklookBandName});
  Product productSubset=product.createSubset(productSubsetDef,quicklookBandName,null);
  if (!isMapProjected(product)) {
    try {
      final Map<String,Object> projParameters=new HashMap<String,Object>();
      Map<String,Product> projProducts=new HashMap<String,Product>();
      projProducts.put("String_Node_Str",productSubset);
      projParameters.put("String_Node_Str","String_Node_Str");
      productSubset=GPF.createProduct("String_Node_Str",projParameters,projProducts);
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
  return productSubset;
}

Fixed version (ground truth):
private static Product createSubsampledProduct(final Product product) throws IOException {
  final String quicklookBandName=ProductUtils.findSuitableQuicklookBandName(product);
  final ProductSubsetDef productSubsetDef=new ProductSubsetDef("String_Node_Str");
  int scaleFactor=product.getSceneRasterWidth() / 1000;
  if (scaleFactor < 1) {
    scaleFactor=1;
  }
  productSubsetDef.setSubSampling(scaleFactor,scaleFactor);
  productSubsetDef.setTreatVirtualBandsAsRealBands(true);
  productSubsetDef.setNodeNames(new String[]{quicklookBandName});
  Product productSubset=product.createSubset(productSubsetDef,quicklookBandName,null);
  if (!OperatorUtils.isMapProjected(product)) {
    try {
      final Map<String,Object> projParameters=new HashMap<String,Object>();
      Map<String,Product> projProducts=new HashMap<String,Product>();
      projProducts.put("String_Node_Str",productSubset);
      projParameters.put("String_Node_Str","String_Node_Str");
      productSubset=GPF.createProduct("String_Node_Str",projParameters,projProducts);
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
  return productSubset;
}
Program: 11523
Project: 11523
Buggy source:
/** 
 * Get the variance of pixel intensities in a given rectanglar region.
 * @param neighborValues The pixel values in the given rectanglar region.
 * @param mean           of neighbourhood
 * @return var The variance value.
 * @throws org.esa.beam.framework.gpf.OperatorException If an error occurs in computation of the variance.
 */
private static double getVarianceValue(final double[] neighborValues,final double mean){
  double var=0.0;
  if (neighborValues.length > 1) {
    for (    double neighborValue : neighborValues) {
      final double diff=neighborValue - mean;
      var+=diff * diff;
    }
    var/=neighborValues.length;
  }
  return var;
}

Fixed version (ground truth):
/** 
 * Get the variance of pixel intensities in a given rectanglar region.
 * @param neighborValues The pixel values in the given rectanglar region.
 * @param mean           of neighbourhood
 * @return var The variance value.
 * @throws org.esa.beam.framework.gpf.OperatorException If an error occurs in computation of the variance.
 */
private static double getVarianceValue(final double[] neighborValues,final double mean){
  double var=0.0;
  if (neighborValues.length > 1) {
    for (    double neighborValue : neighborValues) {
      final double diff=neighborValue - mean;
      var+=diff * diff;
    }
    var/=(neighborValues.length - 1);
  }
  return var;
}
Program: 11524
Project: 11524
Buggy source:
private void computeZ98Values(final Tile sourceTile,final Rectangle sourceRectangle,final ProductData[] sourceDataBuffers,Z98 z98){
  final TileIndex srcIndex=new TileIndex(sourceTile);
  final int sx0=sourceRectangle.x;
  final int sy0=sourceRectangle.y;
  final int sw=sourceRectangle.width;
  final int sh=sourceRectangle.height;
  final int maxY=sy0 + sh;
  final int maxX=sx0 + sw;
  final int z98Index=(int)(sw * sh * 0.98);
  double[] t11=new double[sw * sh];
  double[] t22=new double[sw * sh];
  double[] t33=new double[sw * sh];
  final double[][] Tr=new double[3][3];
  final double[][] Ti=new double[3][3];
  int k=0;
  for (int y=sy0; y < maxY; y++) {
    srcIndex.calculateStride(y);
    for (int x=sx0; x < maxX; x++) {
      final int index=srcIndex.getIndex(x);
      PolOpUtils.getT3(index,sourceProductType,sourceDataBuffers,Tr,Ti);
      t11[k]=Tr[0][0];
      t22[k]=Tr[1][1];
      t33[k]=Tr[2][2];
      k++;
    }
  }
  Arrays.sort(t11);
  Arrays.sort(t22);
  Arrays.sort(t33);
  z98.t11=t11[z98Index];
  z98.t22=t22[z98Index];
  z98.t33=t33[z98Index];
}

Fixed version (ground truth):
private void computeZ98Values(final Tile sourceTile,final Rectangle sourceRectangle,final ProductData[] sourceDataBuffers,Z98 z98){
  final TileIndex srcIndex=new TileIndex(sourceTile);
  final int sx0=sourceRectangle.x;
  final int sy0=sourceRectangle.y;
  final int sw=sourceRectangle.width;
  final int sh=sourceRectangle.height;
  final int maxY=sy0 + sh;
  final int maxX=sx0 + sw;
  final int z98Index=(int)(sw * sh * 0.98) - 1;
  double[] t11=new double[sw * sh];
  double[] t22=new double[sw * sh];
  double[] t33=new double[sw * sh];
  final double[][] Tr=new double[3][3];
  final double[][] Ti=new double[3][3];
  int k=0;
  for (int y=sy0; y < maxY; y++) {
    srcIndex.calculateStride(y);
    for (int x=sx0; x < maxX; x++) {
      final int index=srcIndex.getIndex(x);
      PolOpUtils.getT3(index,sourceProductType,sourceDataBuffers,Tr,Ti);
      t11[k]=Tr[0][0];
      t22[k]=Tr[1][1];
      t33[k]=Tr[2][2];
      k++;
    }
  }
  Arrays.sort(t11);
  Arrays.sort(t22);
  Arrays.sort(t33);
  z98.t11=t11[z98Index];
  z98.t22=t22[z98Index];
  z98.t33=t33[z98Index];
}
Program: 11528
Project: 11528
Buggy source:
public int getCalibrationVectorIndex(final int y){
  for (int i=0; i < count; i++) {
    if (y < calibrationVectorList[i].line) {
      return i - 1;
    }
  }
  return -1;
}

Fixed version (ground truth):
public int getCalibrationVectorIndex(final int y){
  for (int i=1; i < count; i++) {
    if (y < calibrationVectorList[i].line) {
      return i - 1;
    }
  }
  return -1;
}
Program: 11532
Project: 11532
Buggy source:
@Override public void initParameters(){
  if (sourceProducts != null && sourceProducts.length > 0) {
    final MetadataElement absRoot=AbstractMetadata.getAbstractedMetadata(sourceProducts[0]);
    final String[] polarisations=Sentinel1Utils.getProductPolarizations(absRoot);
    polList.setListData(polarisations);
    OperatorUIUtils.initParamList(polList,polarisations);
  }
}

Fixed version (ground truth):
@Override public void initParameters(){
  if (sourceProducts != null && sourceProducts.length > 0) {
    final MetadataElement absRoot=AbstractMetadata.getAbstractedMetadata(sourceProducts[0]);
    OperatorUIUtils.initParamList(polList,Sentinel1Utils.getProductPolarizations(absRoot),(String[])paramMap.get("String_Node_Str"));
  }
}
Program: 11533
Project: 11533
Buggy source:
@Override public void initParameters(){
  if (sourceProducts != null && sourceProducts.length > 0) {
    final MetadataElement absRoot=AbstractMetadata.getAbstractedMetadata(sourceProducts[0]);
    final String acquisitionMode=absRoot.getAttributeString(AbstractMetadata.ACQUISITION_MODE);
    subswathCombo.removeAllItems();
    if (acquisitionMode.equals("String_Node_Str")) {
      subswathCombo.addItem("String_Node_Str");
      subswathCombo.addItem("String_Node_Str");
      subswathCombo.addItem("String_Node_Str");
    }
 else     if (acquisitionMode.equals("String_Node_Str")) {
      subswathCombo.addItem("String_Node_Str");
      subswathCombo.addItem("String_Node_Str");
      subswathCombo.addItem("String_Node_Str");
      subswathCombo.addItem("String_Node_Str");
      subswathCombo.addItem("String_Node_Str");
    }
    String subswath=(String)paramMap.get("String_Node_Str");
    if (subswath == null) {
      subswath=acquisitionMode + '1';
    }
    subswathCombo.setSelectedItem(subswath);
    final String[] polarisations=Sentinel1Utils.getProductPolarizations(absRoot);
    polList.setListData(polarisations);
    OperatorUIUtils.initParamList(polList,polarisations);
  }
}

Fixed version (ground truth):
@Override public void initParameters(){
  if (sourceProducts != null && sourceProducts.length > 0) {
    final MetadataElement absRoot=AbstractMetadata.getAbstractedMetadata(sourceProducts[0]);
    final String acquisitionMode=absRoot.getAttributeString(AbstractMetadata.ACQUISITION_MODE);
    subswathCombo.removeAllItems();
    if (acquisitionMode.equals("String_Node_Str")) {
      subswathCombo.addItem("String_Node_Str");
      subswathCombo.addItem("String_Node_Str");
      subswathCombo.addItem("String_Node_Str");
    }
 else     if (acquisitionMode.equals("String_Node_Str")) {
      subswathCombo.addItem("String_Node_Str");
      subswathCombo.addItem("String_Node_Str");
      subswathCombo.addItem("String_Node_Str");
      subswathCombo.addItem("String_Node_Str");
      subswathCombo.addItem("String_Node_Str");
    }
    String subswath=(String)paramMap.get("String_Node_Str");
    if (subswath == null) {
      subswath=acquisitionMode + '1';
    }
    subswathCombo.setSelectedItem(subswath);
    OperatorUIUtils.initParamList(polList,Sentinel1Utils.getProductPolarizations(absRoot),(String[])paramMap.get("String_Node_Str"));
  }
}
Program: 11534
Project: 11534
Buggy source:
/** 
 * Initializes this operator and sets the one and only target product. <p>The target product can be either defined by a field of type   {@link org.esa.beam.framework.datamodel.Product} annotated with the{@link org.esa.beam.framework.gpf.annotations.TargetProduct TargetProduct} annotation orby calling  {@link #setTargetProduct} method.</p><p>The framework calls this method after it has created this operator. Any client code that must be performed before computation of tile data should be placed here.</p>
 * @throws org.esa.beam.framework.gpf.OperatorException If an error occurs during operator initialisation.
 * @see #getTargetProduct()
 */
@Override public void initialize() throws OperatorException {
  try {
    absRoot=AbstractMetadata.getAbstractedMetadata(sourceProduct);
    getMission();
    getProductType();
    getAcquisitionMode();
    getCalibrationFlag();
    su=new Sentinel1Utils(sourceProduct);
    if (selectedPolarisations == null || selectedPolarisations.length == 0) {
      selectedPolarisations=su.getPolarizations();
    }
    computeTargetStartEndTime();
    computeTargetSlantRangeTimeToFirstAndLastPixels();
    computeTargetWidthAndHeight();
    createTargetProduct();
    updateTargetProductMetadata();
  }
 catch (  Throwable e) {
    throw new OperatorException(e.getMessage());
  }
}

Fixed version (ground truth):
/** 
 * Initializes this operator and sets the one and only target product. <p>The target product can be either defined by a field of type   {@link org.esa.beam.framework.datamodel.Product} annotated with the{@link org.esa.beam.framework.gpf.annotations.TargetProduct TargetProduct} annotation orby calling  {@link #setTargetProduct} method.</p><p>The framework calls this method after it has created this operator. Any client code that must be performed before computation of tile data should be placed here.</p>
 * @throws org.esa.beam.framework.gpf.OperatorException If an error occurs during operator initialisation.
 * @see #getTargetProduct()
 */
@Override public void initialize() throws OperatorException {
  try {
    absRoot=AbstractMetadata.getAbstractedMetadata(sourceProduct);
    getMission();
    getProductType();
    getAcquisitionMode();
    getCalibrationFlag();
    su=new Sentinel1Utils(sourceProduct);
    subSwath=su.getSubSwath();
    if (selectedPolarisations == null || selectedPolarisations.length == 0) {
      selectedPolarisations=su.getPolarizations();
    }
    computeTargetStartEndTime();
    computeTargetSlantRangeTimeToFirstAndLastPixels();
    computeTargetWidthAndHeight();
    createTargetProduct();
    updateTargetProductMetadata();
  }
 catch (  Throwable e) {
    throw new OperatorException(e.getMessage());
  }
}
Program: 11535
Project: 11535
Buggy source:
private static String extractPolarization(String filename){
  final int idx=filename.lastIndexOf("String_Node_Str") + 13;
  return filename.substring(idx,idx + 2);
}

Fixed version (ground truth):
private static String extractPolarization(String filename){
  final int idx=filename.lastIndexOf("String_Node_Str") + 6;
  final String pp=filename.substring(idx,idx + 2);
  if (pp.equals("String_Node_Str") || pp.equals("String_Node_Str") || pp.equals("String_Node_Str")|| pp.equals("String_Node_Str")) {
    return pp + "String_Node_Str";
  }
 else {
    return "String_Node_Str";
  }
}
Program: 11538
Project: 11538
Buggy source:
/** 
 * Initializes this operator and sets the one and only target product. <p>The target product can be either defined by a field of type   {@link org.esa.beam.framework.datamodel.Product} annotated with the{@link org.esa.beam.framework.gpf.annotations.TargetProduct TargetProduct} annotation orby calling  {@link #setTargetProduct} method.</p><p>The framework calls this method after it has created this operator. Any client code that must be performed before computation of tile data should be placed here.</p>
 * @throws org.esa.beam.framework.gpf.OperatorException If an error occurs during operator initialisation.
 * @see #getTargetProduct()
 */
@Override public void initialize() throws OperatorException {
  try {
    GeoCoding sourceGeoCoding=sourceProduct.getGeoCoding();
    if (sourceGeoCoding instanceof CrsGeoCoding) {
      throw new OperatorException("String_Node_Str");
    }
    absRoot=AbstractMetadata.getAbstractedMetadata(sourceProduct);
    getRangeAzimuthSpacing();
    getRangeAzimuthLooks();
    getSourceImageDimension();
    createTargetProduct();
  }
 catch (  Throwable e) {
    OperatorUtils.catchOperatorException(getId(),e);
  }
}

Fixed version (ground truth):
/** 
 * Initializes this operator and sets the one and only target product. <p>The target product can be either defined by a field of type   {@link org.esa.beam.framework.datamodel.Product} annotated with the{@link org.esa.beam.framework.gpf.annotations.TargetProduct TargetProduct} annotation orby calling  {@link #setTargetProduct} method.</p><p>The framework calls this method after it has created this operator. Any client code that must be performed before computation of tile data should be placed here.</p>
 * @throws org.esa.beam.framework.gpf.OperatorException If an error occurs during operator initialisation.
 * @see #getTargetProduct()
 */
@Override public void initialize() throws OperatorException {
  try {
    GeoCoding sourceGeoCoding=sourceProduct.getGeoCoding();
    if (sourceGeoCoding instanceof CrsGeoCoding) {
      throw new OperatorException("String_Node_Str");
    }
    absRoot=AbstractMetadata.getAbstractedMetadata(sourceProduct);
    isPolsar=absRoot.getAttributeInt(AbstractMetadata.polsarData,0) == 1;
    getRangeAzimuthSpacing();
    getRangeAzimuthLooks();
    getSourceImageDimension();
    createTargetProduct();
  }
 catch (  Throwable e) {
    OperatorUtils.catchOperatorException(getId(),e);
  }
}
Program: 11542
Project: 11542
Buggy source:
/** 
 * Update target product metadata.
 */
private void updateTargetProductMetadata(){
  final MetadataElement origMetadataRoot=AbstractMetadata.getOriginalProductMetadata(targetProduct);
  final MetadataElement annotationElem=origMetadataRoot.getElement("String_Node_Str");
  final MetadataElement[] annotationDataSetListElem=annotationElem.getElements();
  for (  MetadataElement elem : annotationDataSetListElem) {
    final MetadataElement productElem=elem.getElement("String_Node_Str");
    final MetadataElement imageAnnotationElem=productElem.getElement("String_Node_Str");
    final MetadataElement processingInformationElem=imageAnnotationElem.getElement("String_Node_Str");
    if (removeThermalNoise) {
      processingInformationElem.getAttribute("String_Node_Str").getData().setElemBoolean(true);
    }
    if (reIntroduceThermalNoise) {
      processingInformationElem.getAttribute("String_Node_Str").getData().setElemBoolean(false);
    }
  }
}

Fixed version (ground truth):
/** 
 * Update target product metadata.
 */
private void updateTargetProductMetadata(){
  final MetadataElement origMetadataRoot=AbstractMetadata.getOriginalProductMetadata(targetProduct);
  final MetadataElement annotationElem=origMetadataRoot.getElement("String_Node_Str");
  final MetadataElement[] annotationDataSetListElem=annotationElem.getElements();
  for (  MetadataElement elem : annotationDataSetListElem) {
    final MetadataElement productElem=elem.getElement("String_Node_Str");
    final MetadataElement imageAnnotationElem=productElem.getElement("String_Node_Str");
    final MetadataElement processingInformationElem=imageAnnotationElem.getElement("String_Node_Str");
    if (removeThermalNoise) {
      processingInformationElem.getAttribute("String_Node_Str").getData().setElems("String_Node_Str");
    }
    if (reIntroduceThermalNoise) {
      processingInformationElem.getAttribute("String_Node_Str").getData().setElems("String_Node_Str");
    }
  }
}
Program: 11543
Project: 11543
Buggy source:
private static double linearInterpolate(int x0,int x1,int x,double y0,double y1){
  return y0 + (y1 - y0) * (x - x0) / (x1 - x0);
}

Fixed version (ground truth):
private static double linearInterpolate(final int x0,final int x1,final int x,final double y0,final double y1){
  if (x1 == x0) {
    return y0;
  }
 else {
    return y0 + (y1 - y0) * (x - x0) / (x1 - x0);
  }
}
Program: 11544
Project: 11544
Buggy source:
private static double computeValue(int x,int y,int[] line,ArrayList<int[]> pixel,ArrayList<double[]> value){
  final int leftYIdx=findLeftOfBracket(y,line);
  final int rightYIdx=(y == line[leftYIdx]) ? leftYIdx : leftYIdx + 1;
  double val=0.0;
  checkBracket(leftYIdx,rightYIdx,line.length - 1);
  if (leftYIdx == rightYIdx) {
    if (y != line[leftYIdx]) {
      throw new OperatorException("String_Node_Str" + y + "String_Node_Str"+ leftYIdx);
    }
  }
 else   if (y <= line[leftYIdx] || y >= line[rightYIdx]) {
    throw new OperatorException("String_Node_Str" + y + "String_Node_Str"+ leftYIdx+ "String_Node_Str"+ line[leftYIdx]+ "String_Node_Str"+ rightYIdx+ "String_Node_Str"+ line[rightYIdx]);
  }
  final double topVal=linearInterpolateAlongLine(x,leftYIdx,pixel,value);
  final double bottomVal=linearInterpolateAlongLine(x,rightYIdx,pixel,value);
  val=linearInterpolate(leftYIdx,rightYIdx,y,topVal,bottomVal);
  return val;
}

Fixed version (ground truth):
private static double computeValue(final int x,final int y,final int[] line,final ArrayList<int[]> pixel,final ArrayList<double[]> value){
  final int leftYIdx=findLeftOfBracket(y,line);
  final int rightYIdx=(y == line[leftYIdx]) ? leftYIdx : leftYIdx + 1;
  double val=0.0;
  checkBracket(leftYIdx,rightYIdx,line.length - 1);
  if (leftYIdx == rightYIdx) {
    if (y != line[leftYIdx]) {
      throw new OperatorException("String_Node_Str" + y + "String_Node_Str"+ leftYIdx);
    }
  }
 else   if (y <= line[leftYIdx] || y >= line[rightYIdx]) {
    throw new OperatorException("String_Node_Str" + y + "String_Node_Str"+ leftYIdx+ "String_Node_Str"+ line[leftYIdx]+ "String_Node_Str"+ rightYIdx+ "String_Node_Str"+ line[rightYIdx]);
  }
  final double topVal=linearInterpolateAlongLine(x,leftYIdx,pixel,value);
  final double bottomVal=linearInterpolateAlongLine(x,rightYIdx,pixel,value);
  val=linearInterpolate(line[leftYIdx],line[rightYIdx],y,topVal,bottomVal);
  return val;
}
Program: 11545
Project: 11545
Buggy source:
private int readValuesForOneVector(MetadataElement vector,String intNames[],ArrayList<int[]> intValues,String doubleNames[],ArrayList<double[]> doubleValues){
  if (vector == null || intNames.length == 0 && doubleNames.length == 0) {
    return -1;
  }
  final String lineStr=vector.getAttributeString("String_Node_Str");
  final int line=Integer.parseInt(lineStr);
  System.out.println(vector.getName() + "String_Node_Str" + vector.getAttributeString("String_Node_Str")+ "String_Node_Str"+ line);
  final int count=(intNames.length > 0) ? Integer.parseInt(getMetadataElement(vector,intNames[0]).getAttributeString("String_Node_Str")) : Integer.parseInt(getMetadataElement(vector,doubleNames[0]).getAttributeString("String_Node_Str"));
  for (  String name : intNames) {
    final String[] valuesAsArrayOfStrings=readValuesAsArrayOfStrings(vector,name,count);
    final int values[]=new int[count];
    for (int i=0; i < count; i++) {
      values[i]=Integer.parseInt(valuesAsArrayOfStrings[i]);
    }
    intValues.add(values);
  }
  for (  String name : doubleNames) {
    final String[] valuesAsArrayOfStrings=readValuesAsArrayOfStrings(vector,name,count);
    final double values[]=new double[count];
    for (int i=0; i < count; i++) {
      values[i]=Double.parseDouble(valuesAsArrayOfStrings[i]);
    }
    doubleValues.add(values);
  }
  return line;
}

Fixed version (ground truth):
private int readValuesForOneVector(MetadataElement vector,String intNames[],ArrayList<int[]> intValues,String doubleNames[],ArrayList<double[]> doubleValues){
  if (vector == null || intNames.length == 0 && doubleNames.length == 0) {
    return -1;
  }
  final String lineStr=vector.getAttributeString("String_Node_Str");
  final int line=Integer.parseInt(lineStr);
  final int count=(intNames.length > 0) ? Integer.parseInt(getMetadataElement(vector,intNames[0]).getAttributeString("String_Node_Str")) : Integer.parseInt(getMetadataElement(vector,doubleNames[0]).getAttributeString("String_Node_Str"));
  for (  String name : intNames) {
    final String[] valuesAsArrayOfStrings=readValuesAsArrayOfStrings(vector,name,count);
    final int values[]=new int[count];
    for (int i=0; i < count; i++) {
      values[i]=Integer.parseInt(valuesAsArrayOfStrings[i]);
    }
    intValues.add(values);
  }
  for (  String name : doubleNames) {
    final String[] valuesAsArrayOfStrings=readValuesAsArrayOfStrings(vector,name,count);
    final double values[]=new double[count];
    for (int i=0; i < count; i++) {
      values[i]=Double.parseDouble(valuesAsArrayOfStrings[i]);
    }
    doubleValues.add(values);
  }
  return line;
}
Program: 11546
Project: 11546
Buggy source:
private static double linearInterpolateAlongLine(int x,int yIdx,ArrayList<int[]> pixel,ArrayList<double[]> value){
  final int leftXIdx=findLeftOfBracket(x,pixel.get(yIdx));
  final int rightXIdx=(x == pixel.get(yIdx)[leftXIdx]) ? leftXIdx : leftXIdx + 1;
  checkBracket(leftXIdx,rightXIdx,pixel.get(yIdx).length);
  final double leftNoise=value.get(yIdx)[leftXIdx];
  final double rightNoise=value.get(yIdx)[rightXIdx];
  return linearInterpolate(leftXIdx,rightXIdx,x,leftNoise,rightNoise);
}

Fixed version (ground truth):
private static double linearInterpolateAlongLine(final int x,final int yIdx,final ArrayList<int[]> pixel,final ArrayList<double[]> value){
  final int leftXIdx=findLeftOfBracket(x,pixel.get(yIdx));
  final int rightXIdx=(x == pixel.get(yIdx)[leftXIdx]) ? leftXIdx : leftXIdx + 1;
  checkBracket(leftXIdx,rightXIdx,pixel.get(yIdx).length);
  final double leftNoise=value.get(yIdx)[leftXIdx];
  final double rightNoise=value.get(yIdx)[rightXIdx];
  return linearInterpolate(pixel.get(yIdx)[leftXIdx],pixel.get(yIdx)[rightXIdx],x,leftNoise,rightNoise);
}
Program: 11547
Project: 11547
Buggy source:
private static void checkBracket(int left,int right,int max){
  if (left < 0 || right < 0 || left > max || right > max) {
    throw new OperatorException("String_Node_Str" + left + "String_Node_Str"+ right+ "String_Node_Str"+ max);
  }
}

Fixed version (ground truth):
private static void checkBracket(final int left,final int right,final int max){
  if (left < 0 || right < 0 || left > max || right > max) {
    throw new OperatorException("String_Node_Str" + left + "String_Node_Str"+ right+ "String_Node_Str"+ max);
  }
}
Program: 11548
Project: 11548
Buggy source:
private void updateTargetProductMetadata(){
  final MetadataElement oriProdMetadata=AbstractMetadata.getOriginalProductMetadata(targetProduct);
  final MetadataElement finalMetadataElem=getParentMetadataElemForFlag(oriProdMetadata);
  if (performCorrection) {
    finalMetadataElem.setAttributeString(ANNOTATION_FLAG_NAME,"String_Node_Str");
  }
 else {
    finalMetadataElem.setAttributeString(ANNOTATION_FLAG_NAME,"String_Node_Str");
  }
}

Fixed version (ground truth):
private void updateTargetProductMetadata(){
  final MetadataElement oriProdMetadata=AbstractMetadata.getOriginalProductMetadata(targetProduct);
  final MetadataElement finalMetadataElem=getParentMetadataElemForFlag(oriProdMetadata);
  if (removeNoise) {
    finalMetadataElem.setAttributeString(ANNOTATION_FLAG_NAME,"String_Node_Str");
  }
 else {
    finalMetadataElem.setAttributeString(ANNOTATION_FLAG_NAME,"String_Node_Str");
  }
}
Program: 11550
Project: 11550
Buggy source:
/** 
 * Initializes this operator and sets the one and only target product. <p>The target product can be either defined by a field of type   {@link org.esa.beam.framework.datamodel.Product} annotated with the{@link org.esa.beam.framework.gpf.annotations.TargetProduct TargetProduct} annotation orby calling  {@link #setTargetProduct} method.</p><p>The framework calls this method after it has created this operator. Any client code that must be performed before computation of tile data should be placed here.</p>
 * @throws org.esa.beam.framework.gpf.OperatorException If an error occurs during operator initialisation.
 * @see #getTargetProduct()
 */
@Override public void initialize() throws OperatorException {
  try {
    final MetadataElement oriProdMetadata=AbstractMetadata.getOriginalProductMetadata(sourceProduct);
    final MetadataElement finalMetadataElem=getParentMetadataElemForFlag(oriProdMetadata);
    final String flag=finalMetadataElem.getAttributeString(ANNOTATION_FLAG_NAME);
    performCorrection=flag.toLowerCase().equals("String_Node_Str");
    createTargetProduct();
    updateTargetProductMetadata();
    readLUTs(oriProdMetadata);
  }
 catch (  Throwable e) {
    OperatorUtils.catchOperatorException(getId(),e);
  }
}

Fixed version (ground truth):
/** 
 * Initializes this operator and sets the one and only target product. <p>The target product can be either defined by a field of type   {@link org.esa.beam.framework.datamodel.Product} annotated with the{@link org.esa.beam.framework.gpf.annotations.TargetProduct TargetProduct} annotation orby calling  {@link #setTargetProduct} method.</p><p>The framework calls this method after it has created this operator. Any client code that must be performed before computation of tile data should be placed here.</p>
 * @throws org.esa.beam.framework.gpf.OperatorException If an error occurs during operator initialisation.
 * @see #getTargetProduct()
 */
@Override public void initialize() throws OperatorException {
  try {
    final MetadataElement oriProdMetadata=AbstractMetadata.getOriginalProductMetadata(sourceProduct);
    final MetadataElement finalMetadataElem=getParentMetadataElemForFlag(oriProdMetadata);
    final String flag=finalMetadataElem.getAttributeString(ANNOTATION_FLAG_NAME);
    removeNoise=flag.toLowerCase().equals("String_Node_Str");
    createTargetProduct();
    updateTargetProductMetadata();
    readLUTs(oriProdMetadata);
  }
 catch (  Throwable e) {
    OperatorUtils.catchOperatorException(getId(),e);
  }
}
Program: 11551
Project: 11551
Buggy source:
private static double computeValue(int x,int y,int[] line,ArrayList<int[]> pixel,ArrayList<double[]> value,int debugNum){
  final int leftYIdx=findLeftOfBracket(y,line);
  final int rightYIdx=(y == line[leftYIdx]) ? leftYIdx : leftYIdx + 1;
  double val=0.0;
  checkBracket(leftYIdx,rightYIdx,line.length - 1);
  if (leftYIdx == rightYIdx) {
    if (y != line[leftYIdx]) {
      throw new OperatorException("String_Node_Str" + y + "String_Node_Str"+ leftYIdx+ "String_Node_Str"+ debugNum);
    }
  }
 else   if (y <= line[leftYIdx] || y >= line[rightYIdx]) {
    throw new OperatorException("String_Node_Str" + y + "String_Node_Str"+ leftYIdx+ "String_Node_Str"+ rightYIdx+ "String_Node_Str"+ debugNum);
  }
  final double topVal=linearInterpolateAlongLine(x,leftYIdx,pixel,value);
  final double bottomVal=linearInterpolateAlongLine(x,rightYIdx,pixel,value);
  val=linearInterpolate(leftYIdx,rightYIdx,y,topVal,bottomVal);
  return val;
}

Fixed version (ground truth):
private static double computeValue(int x,int y,int[] line,ArrayList<int[]> pixel,ArrayList<double[]> value,int debugNum){
  final int leftYIdx=findLeftOfBracket(y,line);
  final int rightYIdx=(y == line[leftYIdx]) ? leftYIdx : leftYIdx + 1;
  double val=0.0;
  checkBracket(leftYIdx,rightYIdx,line.length - 1);
  if (leftYIdx == rightYIdx) {
    if (y != line[leftYIdx]) {
      throw new OperatorException("String_Node_Str" + y + "String_Node_Str"+ leftYIdx+ "String_Node_Str"+ debugNum);
    }
  }
 else   if (y <= line[leftYIdx] || y >= line[rightYIdx]) {
    throw new OperatorException("String_Node_Str" + y + "String_Node_Str"+ leftYIdx+ "String_Node_Str"+ line[leftYIdx]+ "String_Node_Str"+ rightYIdx+ "String_Node_Str"+ line[rightYIdx]+ "String_Node_Str"+ debugNum);
  }
  final double topVal=linearInterpolateAlongLine(x,leftYIdx,pixel,value);
  final double bottomVal=linearInterpolateAlongLine(x,rightYIdx,pixel,value);
  val=linearInterpolate(leftYIdx,rightYIdx,y,topVal,bottomVal);
  return val;
}