Program: 11411
Project: 11411
Buggy source:
@Override public void initParameters(){
  OperatorUIUtils.initParamList(bandList,getBandNames());
  final String demNameParam=(String)paramMap.get("String_Node_Str");
  if (demNameParam != null) {
    ElevationModelDescriptor descriptor=ElevationModelRegistry.getInstance().getDescriptor(demNameParam);
    if (descriptor != null) {
      demName.setSelectedItem(DEMFactory.getDEMDisplayName(descriptor));
    }
 else {
      demName.setSelectedItem(demNameParam);
    }
  }
  demResamplingMethod.setSelectedItem(paramMap.get("String_Node_Str"));
  imgResamplingMethod.setSelectedItem(paramMap.get("String_Node_Str"));
  incidenceAngleForGamma0.setSelectedItem(paramMap.get("String_Node_Str"));
  incidenceAngleForSigma0.setSelectedItem(paramMap.get("String_Node_Str"));
  final String mapProjection=(String)paramMap.get("String_Node_Str");
  mapProjHandler.initParameters(mapProjection,sourceProducts);
  crsButton.setText(mapProjHandler.getCRSName());
  pixMSaved=(Double)paramMap.get("String_Node_Str");
  if (pixMSaved != null && pixMSaved != 0.0) {
    pixelSpacingInMeter.setText(String.valueOf(pixMSaved));
  }
  pixDSaved=(Double)paramMap.get("String_Node_Str");
  if (pixDSaved != null && pixDSaved != 0.0) {
    pixelSpacingInDegree.setText(String.valueOf(pixDSaved));
  }
  if (sourceProducts != null) {
    try {
      azimuthPixelSpacing=SARGeocoding.getAzimuthPixelSpacing(sourceProducts[0]);
      rangePixelSpacing=SARGeocoding.getRangePixelSpacing(sourceProducts[0]);
      azimuthPixelSpacing=(double)((int)(azimuthPixelSpacing * 100 + 0.5)) / 100.0;
      rangePixelSpacing=(double)((int)(rangePixelSpacing * 100 + 0.5)) / 100.0;
    }
 catch (    Exception e) {
      azimuthPixelSpacing=0.0;
      rangePixelSpacing=0.0;
    }
    final String text=Double.toString(azimuthPixelSpacing) + "String_Node_Str" + Double.toString(rangePixelSpacing)+ "String_Node_Str";
    sourcePixelSpacingsLabelPart2.setText(text);
    if (savedAzimuthPixelSpacing != 0 && savedRangePixelSpacing != 0) {
      if (savedAzimuthPixelSpacing != azimuthPixelSpacing || savedRangePixelSpacing != rangePixelSpacing) {
        pixDSaved=null;
      }
    }
    if (pixDSaved == null || pixDSaved == 0.0) {
      Double pixM, pixD;
      try {
        pixM=Math.max(azimuthPixelSpacing,rangePixelSpacing);
        pixD=SARGeocoding.getPixelSpacingInDegree(pixM);
      }
 catch (      Exception e) {
        pixM=0.0;
        pixD=0.0;
      }
      pixelSpacingInMeter.setText(String.valueOf(pixM));
      pixelSpacingInDegree.setText(String.valueOf(pixD));
      pixMSaved=pixM;
      pixDSaved=pixD;
      savedAzimuthPixelSpacing=azimuthPixelSpacing;
      savedRangePixelSpacing=rangePixelSpacing;
    }
    final MetadataElement absRoot=AbstractMetadata.getAbstractedMetadata(sourceProducts[0]);
    if (absRoot != null) {
      boolean isComplex=absRoot.getAttributeString(AbstractMetadata.sample_type).equals("String_Node_Str");
      outputComplexCheckBox.setEnabled(isComplex);
    }
  }
  final File extDEMFile=(File)paramMap.get("String_Node_Str");
  if (extDEMFile != null) {
    externalDEMFile.setText(extDEMFile.getAbsolutePath());
    extNoDataValue=(Double)paramMap.get("String_Node_Str");
    if (extNoDataValue != null) {
      externalDEMNoDataValue.setText(String.valueOf(extNoDataValue));
    }
    Boolean paramVal=(Boolean)paramMap.get("String_Node_Str");
    if (paramVal != null) {
      externalDEMApplyEGM=paramVal;
      externalDEMApplyEGMCheckBox.setSelected(externalDEMApplyEGM);
    }
  }
  Boolean paramVal;
  paramVal=(Boolean)paramMap.get("String_Node_Str");
  if (paramVal != null) {
    nodataValueAtSea=paramVal;
    nodataValueAtSeaCheckBox.setSelected(nodataValueAtSea);
  }
  paramVal=(Boolean)paramMap.get("String_Node_Str");
  if (paramVal != null) {
    outputComplex=paramVal;
    outputComplexCheckBox.setSelected(outputComplex);
  }
  paramVal=(Boolean)paramMap.get("String_Node_Str");
  if (paramVal != null) {
    saveDEM=paramVal;
    saveDEMCheckBox.setSelected(saveDEM);
  }
  paramVal=(Boolean)paramMap.get("String_Node_Str");
  if (paramVal != null) {
    saveLatLon=paramVal;
    saveLatLonCheckBox.setSelected(saveLatLon);
  }
  paramVal=(Boolean)paramMap.get("String_Node_Str");
  if (paramVal != null) {
    saveIncidenceAngleFromEllipsoid=paramVal;
    saveIncidenceAngleFromEllipsoidCheckBox.setSelected(saveIncidenceAngleFromEllipsoid);
  }
  paramVal=(Boolean)paramMap.get("String_Node_Str");
  if (paramVal != null) {
    saveLocalIncidenceAngle=paramVal;
    saveLocalIncidenceAngleCheckBox.setSelected(saveLocalIncidenceAngle);
  }
  paramVal=(Boolean)paramMap.get("String_Node_Str");
  if (paramVal != null) {
    saveProjectedLocalIncidenceAngle=paramVal;
    saveProjectedLocalIncidenceAngleCheckBox.setSelected(saveProjectedLocalIncidenceAngle);
  }
  paramVal=(Boolean)paramMap.get("String_Node_Str");
  if (paramVal != null) {
    saveSelectedSourceBand=paramVal;
    saveSelectedSourceBandCheckBox.setSelected(saveSelectedSourceBand);
  }
  paramVal=(Boolean)paramMap.get("String_Node_Str");
  if (paramVal != null) {
    applyRadiometricNormalization=paramVal;
    applyRadiometricNormalizationCheckBox.setSelected(applyRadiometricNormalization);
    incidenceAngleForGamma0.setEnabled(applyRadiometricNormalization);
    incidenceAngleForSigma0.setEnabled(applyRadiometricNormalization);
    saveSigmaNoughtCheckBox.setEnabled(applyRadiometricNormalization);
    saveGammaNoughtCheckBox.setEnabled(applyRadiometricNormalization);
    saveBetaNoughtCheckBox.setEnabled(applyRadiometricNormalization);
  }
 else {
    enableRadiometricNormalization(false);
    saveSelectedSourceBandCheckBox.setSelected(true);
  }
  paramVal=(Boolean)paramMap.get("String_Node_Str");
  if (paramVal != null) {
    saveBetaNought=paramVal;
    saveBetaNoughtCheckBox.setSelected(saveBetaNought);
  }
  paramVal=(Boolean)paramMap.get("String_Node_Str");
  if (paramVal != null) {
    saveGammaNought=paramVal;
    saveGammaNoughtCheckBox.setSelected(saveGammaNought);
  }
  paramVal=(Boolean)paramMap.get("String_Node_Str");
  if (paramVal != null) {
    saveSigmaNought=paramVal;
    saveSigmaNoughtCheckBox.setSelected(saveSigmaNought);
  }
  if (sourceProducts != null) {
    final MetadataElement absRoot=AbstractMetadata.getAbstractedMetadata(sourceProducts[0]);
    if (absRoot != null) {
      final String sampleType=absRoot.getAttributeString(AbstractMetadata.SAMPLE_TYPE);
      if (sampleType.equals("String_Node_Str")) {
        auxFile.removeItem(CalibrationOp.PRODUCT_AUX);
      }
 else       if (auxFile.getItemCount() == 2) {
        auxFile.addItem(CalibrationOp.PRODUCT_AUX);
      }
    }
  }
  final String auxFileStr=(String)paramMap.get("String_Node_Str");
  if (auxFileStr != null) {
    auxFile.setSelectedItem(auxFileStr);
  }
  final File extAuxFile=(File)paramMap.get("String_Node_Str");
  if (extAuxFile != null) {
    externalAuxFile.setText(extAuxFile.getAbsolutePath());
  }
  if (applyRadiometricNormalization != null) {
    auxFile.setEnabled(applyRadiometricNormalization);
    auxFileLabel.setEnabled(applyRadiometricNormalization);
    externalAuxFile.setEnabled(applyRadiometricNormalization);
    externalAuxFileLabel.setEnabled(applyRadiometricNormalization);
    externalAuxFileBrowseButton.setEnabled(applyRadiometricNormalization);
  }
}

Fixed version (ground truth):
@Override public void initParameters(){
  OperatorUIUtils.initParamList(bandList,getBandNames());
  final String demNameParam=(String)paramMap.get("String_Node_Str");
  if (demNameParam != null) {
    ElevationModelDescriptor descriptor=ElevationModelRegistry.getInstance().getDescriptor(demNameParam);
    if (descriptor != null) {
      demName.setSelectedItem(DEMFactory.getDEMDisplayName(descriptor));
    }
 else {
      demName.setSelectedItem(demNameParam);
    }
  }
  demResamplingMethod.setSelectedItem(paramMap.get("String_Node_Str"));
  imgResamplingMethod.setSelectedItem(paramMap.get("String_Node_Str"));
  incidenceAngleForGamma0.setSelectedItem(paramMap.get("String_Node_Str"));
  incidenceAngleForSigma0.setSelectedItem(paramMap.get("String_Node_Str"));
  final String mapProjection=(String)paramMap.get("String_Node_Str");
  mapProjHandler.initParameters(mapProjection,sourceProducts);
  crsButton.setText(mapProjHandler.getCRSName());
  pixMSaved=(Double)paramMap.get("String_Node_Str");
  if (pixMSaved != null && pixMSaved != 0.0) {
    pixelSpacingInMeter.setText(String.valueOf(pixMSaved));
  }
  pixDSaved=(Double)paramMap.get("String_Node_Str");
  if (pixDSaved != null && pixDSaved != 0.0) {
    pixelSpacingInDegree.setText(String.valueOf(pixDSaved));
  }
  if (sourceProducts != null) {
    try {
      azimuthPixelSpacing=SARGeocoding.getAzimuthPixelSpacing(sourceProducts[0]);
      rangePixelSpacing=SARGeocoding.getRangePixelSpacing(sourceProducts[0]);
      azimuthPixelSpacing=(double)((int)(azimuthPixelSpacing * 100 + 0.5)) / 100.0;
      rangePixelSpacing=(double)((int)(rangePixelSpacing * 100 + 0.5)) / 100.0;
    }
 catch (    Exception e) {
      azimuthPixelSpacing=0.0;
      rangePixelSpacing=0.0;
    }
    final String text=Double.toString(azimuthPixelSpacing) + "String_Node_Str" + Double.toString(rangePixelSpacing)+ "String_Node_Str";
    sourcePixelSpacingsLabelPart2.setText(text);
    if (savedAzimuthPixelSpacing.compareTo(0.0) != 0 && savedRangePixelSpacing.compareTo(0.0) != 0) {
      if (savedAzimuthPixelSpacing.compareTo(azimuthPixelSpacing) != 0 || savedRangePixelSpacing.compareTo(rangePixelSpacing) != 0) {
        pixDSaved=null;
      }
    }
    if (pixDSaved == null || pixDSaved == 0.0) {
      Double pixM, pixD;
      try {
        pixM=Math.max(azimuthPixelSpacing,rangePixelSpacing);
        pixD=SARGeocoding.getPixelSpacingInDegree(pixM);
      }
 catch (      Exception e) {
        pixM=0.0;
        pixD=0.0;
      }
      pixelSpacingInMeter.setText(String.valueOf(pixM));
      pixelSpacingInDegree.setText(String.valueOf(pixD));
      pixMSaved=pixM;
      pixDSaved=pixD;
      savedAzimuthPixelSpacing=azimuthPixelSpacing;
      savedRangePixelSpacing=rangePixelSpacing;
    }
    final MetadataElement absRoot=AbstractMetadata.getAbstractedMetadata(sourceProducts[0]);
    if (absRoot != null) {
      boolean isComplex=absRoot.getAttributeString(AbstractMetadata.sample_type).equals("String_Node_Str");
      outputComplexCheckBox.setEnabled(isComplex);
    }
  }
  final File extDEMFile=(File)paramMap.get("String_Node_Str");
  if (extDEMFile != null) {
    externalDEMFile.setText(extDEMFile.getAbsolutePath());
    extNoDataValue=(Double)paramMap.get("String_Node_Str");
    if (extNoDataValue != null) {
      externalDEMNoDataValue.setText(String.valueOf(extNoDataValue));
    }
    Boolean paramVal=(Boolean)paramMap.get("String_Node_Str");
    if (paramVal != null) {
      externalDEMApplyEGM=paramVal;
      externalDEMApplyEGMCheckBox.setSelected(externalDEMApplyEGM);
    }
  }
  Boolean paramVal;
  paramVal=(Boolean)paramMap.get("String_Node_Str");
  if (paramVal != null) {
    nodataValueAtSea=paramVal;
    nodataValueAtSeaCheckBox.setSelected(nodataValueAtSea);
  }
  paramVal=(Boolean)paramMap.get("String_Node_Str");
  if (paramVal != null) {
    outputComplex=paramVal;
    outputComplexCheckBox.setSelected(outputComplex);
  }
  paramVal=(Boolean)paramMap.get("String_Node_Str");
  if (paramVal != null) {
    saveDEM=paramVal;
    saveDEMCheckBox.setSelected(saveDEM);
  }
  paramVal=(Boolean)paramMap.get("String_Node_Str");
  if (paramVal != null) {
    saveLatLon=paramVal;
    saveLatLonCheckBox.setSelected(saveLatLon);
  }
  paramVal=(Boolean)paramMap.get("String_Node_Str");
  if (paramVal != null) {
    saveIncidenceAngleFromEllipsoid=paramVal;
    saveIncidenceAngleFromEllipsoidCheckBox.setSelected(saveIncidenceAngleFromEllipsoid);
  }
  paramVal=(Boolean)paramMap.get("String_Node_Str");
  if (paramVal != null) {
    saveLocalIncidenceAngle=paramVal;
    saveLocalIncidenceAngleCheckBox.setSelected(saveLocalIncidenceAngle);
  }
  paramVal=(Boolean)paramMap.get("String_Node_Str");
  if (paramVal != null) {
    saveProjectedLocalIncidenceAngle=paramVal;
    saveProjectedLocalIncidenceAngleCheckBox.setSelected(saveProjectedLocalIncidenceAngle);
  }
  paramVal=(Boolean)paramMap.get("String_Node_Str");
  if (paramVal != null) {
    saveSelectedSourceBand=paramVal;
    saveSelectedSourceBandCheckBox.setSelected(saveSelectedSourceBand);
  }
  paramVal=(Boolean)paramMap.get("String_Node_Str");
  if (paramVal != null) {
    applyRadiometricNormalization=paramVal;
    applyRadiometricNormalizationCheckBox.setSelected(applyRadiometricNormalization);
    incidenceAngleForGamma0.setEnabled(applyRadiometricNormalization);
    incidenceAngleForSigma0.setEnabled(applyRadiometricNormalization);
    saveSigmaNoughtCheckBox.setEnabled(applyRadiometricNormalization);
    saveGammaNoughtCheckBox.setEnabled(applyRadiometricNormalization);
    saveBetaNoughtCheckBox.setEnabled(applyRadiometricNormalization);
  }
 else {
    enableRadiometricNormalization(false);
    saveSelectedSourceBandCheckBox.setSelected(true);
  }
  paramVal=(Boolean)paramMap.get("String_Node_Str");
  if (paramVal != null) {
    saveBetaNought=paramVal;
    saveBetaNoughtCheckBox.setSelected(saveBetaNought);
  }
  paramVal=(Boolean)paramMap.get("String_Node_Str");
  if (paramVal != null) {
    saveGammaNought=paramVal;
    saveGammaNoughtCheckBox.setSelected(saveGammaNought);
  }
  paramVal=(Boolean)paramMap.get("String_Node_Str");
  if (paramVal != null) {
    saveSigmaNought=paramVal;
    saveSigmaNoughtCheckBox.setSelected(saveSigmaNought);
  }
  if (sourceProducts != null) {
    final MetadataElement absRoot=AbstractMetadata.getAbstractedMetadata(sourceProducts[0]);
    if (absRoot != null) {
      final String sampleType=absRoot.getAttributeString(AbstractMetadata.SAMPLE_TYPE);
      if (sampleType.equals("String_Node_Str")) {
        auxFile.removeItem(CalibrationOp.PRODUCT_AUX);
      }
 else       if (auxFile.getItemCount() == 2) {
        auxFile.addItem(CalibrationOp.PRODUCT_AUX);
      }
    }
  }
  final String auxFileStr=(String)paramMap.get("String_Node_Str");
  if (auxFileStr != null) {
    auxFile.setSelectedItem(auxFileStr);
  }
  final File extAuxFile=(File)paramMap.get("String_Node_Str");
  if (extAuxFile != null) {
    externalAuxFile.setText(extAuxFile.getAbsolutePath());
  }
  if (applyRadiometricNormalization != null) {
    auxFile.setEnabled(applyRadiometricNormalization);
    auxFileLabel.setEnabled(applyRadiometricNormalization);
    externalAuxFile.setEnabled(applyRadiometricNormalization);
    externalAuxFileLabel.setEnabled(applyRadiometricNormalization);
    externalAuxFileBrowseButton.setEnabled(applyRadiometricNormalization);
  }
}