Program: 24558
Project: 24558
Buggy source:
public void saveData(){
  String idPolicy;
  if (idPolicyCombo.getValue().get("String_Node_Str").equals("String_Node_Str"))   idPolicy="String_Node_Str";
 else   idPolicy="String_Node_Str";
  String idXPath=idXPathField.getValue();
  String harvestMethod="String_Node_Str";
  if (harvestMethodCombo.getValue().get("String_Node_Str").equals("String_Node_Str"))   harvestMethod="String_Node_Str";
 else   if (harvestMethodCombo.getValue().get("String_Node_Str").equals("String_Node_Str"))   harvestMethod="String_Node_Str";
 else   harvestMethod="String_Node_Str";
  String charEnc=characterEncoding.getValue().get("String_Node_Str");
  String recordSyntax=recordSyntaxCombo.getValue().get("String_Node_Str");
  String userId=user.getValue();
  String pwd=password.getValue();
  String fileUploadPath=fileUploadField.getValue();
  String maxId=null;
  if (maximumID.getValue() != null)   maxId=String.valueOf(maximumID.getValue().longValue());
  Date earlyDate=earliestDate.getValue();
  String addr=address.getValue();
  String prt=port.getValue();
  String db=database.getValue();
  String desc=description.getValue();
  if (dataSourceUI == null) {
    dataSourceUI=new DataSourceUI(parent,desc.trim(),"String_Node_Str","String_Node_Str","String_Node_Str",parent.getCountry().trim(),desc.trim(),"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",idPolicy.trim(),"String_Node_Str");
  }
  dataSourceUI.setIngest("String_Node_Str");
  if (idXPath != null) {
    dataSourceUI.setIdXPath(idXPath.trim());
  }
  if (fileUploadPath != null) {
    dataSourceUI.setZ39IdListFile(fileUploadPath.trim());
  }
  if (maxId != null) {
    dataSourceUI.setZ39MaximumId(maxId.trim());
  }
  if (userId != null) {
    dataSourceUI.setZ39User(userId.trim());
  }
  if (pwd != null) {
    dataSourceUI.setZ39Password(pwd.trim());
  }
  dataSourceUI.setCharacterEncoding(charEnc.trim());
  dataSourceUI.setRecordIdPolicy(idPolicy.trim());
  dataSourceUI.setZ39HarvestMethod(harvestMethod.trim());
  dataSourceUI.setZ39RecordSyntax(recordSyntax.trim());
  if (earlyDate != null) {
    dataSourceUI.setZ39EarliestDate(earlyDate);
  }
  dataSourceUI.setZ39Address(addr.trim());
  dataSourceUI.setZ39Port(prt.trim());
  dataSourceUI.setZ39Database(db.trim());
  List<String> namespaces=namespacePanelExtension.getFinalNamespacesList();
  dataSourceUI.setNamespaceList(namespaces);
  dataSourceUI.setExportDirectory(exportPath.getValue() != null ? exportPath.getValue().trim() : "String_Node_Str");
  if (HarvesterUI.getProjectType() == ProjectType.DEFAULT)   saveDataSource(dataSourceUI,oldDataSetId,DatasetType.Z39,"String_Node_Str","String_Node_Str","String_Node_Str",name.getValue(),nameCode.getValue(),exportPath.getValue());
 else   saveDataSource(dataSourceUI,oldDataSetId,DatasetType.Z39,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
public void saveData(){
  String idPolicy;
  if (idPolicyCombo.getValue().get("String_Node_Str").equals("String_Node_Str"))   idPolicy=IdGeneratedRecordIdPolicy.IDGENERATED;
 else   idPolicy=IdExtractedRecordIdPolicy.IDEXTRACTED;
  String idXPath=idXPathField.getValue();
  String harvestMethod="String_Node_Str";
  if (harvestMethodCombo.getValue().get("String_Node_Str").equals("String_Node_Str"))   harvestMethod="String_Node_Str";
 else   if (harvestMethodCombo.getValue().get("String_Node_Str").equals("String_Node_Str"))   harvestMethod="String_Node_Str";
 else   harvestMethod="String_Node_Str";
  String charEnc=characterEncoding.getValue().get("String_Node_Str");
  String recordSyntax=recordSyntaxCombo.getValue().get("String_Node_Str");
  String userId=user.getValue();
  String pwd=password.getValue();
  String fileUploadPath=fileUploadField.getValue();
  String maxId=null;
  if (maximumID.getValue() != null)   maxId=String.valueOf(maximumID.getValue().longValue());
  Date earlyDate=earliestDate.getValue();
  String addr=address.getValue();
  String prt=port.getValue();
  String db=database.getValue();
  String desc=description.getValue();
  if (dataSourceUI == null) {
    dataSourceUI=new DataSourceUI(parent,desc.trim(),"String_Node_Str","String_Node_Str","String_Node_Str",parent.getCountry().trim(),desc.trim(),"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",idPolicy.trim(),"String_Node_Str");
  }
  dataSourceUI.setIngest("String_Node_Str");
  if (idXPath != null) {
    dataSourceUI.setIdXPath(idXPath.trim());
  }
  if (fileUploadPath != null) {
    dataSourceUI.setZ39IdListFile(fileUploadPath.trim());
  }
  if (maxId != null) {
    dataSourceUI.setZ39MaximumId(maxId.trim());
  }
  if (userId != null) {
    dataSourceUI.setZ39User(userId.trim());
  }
  if (pwd != null) {
    dataSourceUI.setZ39Password(pwd.trim());
  }
  dataSourceUI.setCharacterEncoding(charEnc.trim());
  dataSourceUI.setRecordIdPolicy(idPolicy.trim());
  dataSourceUI.setZ39HarvestMethod(harvestMethod.trim());
  dataSourceUI.setZ39RecordSyntax(recordSyntax.trim());
  if (earlyDate != null) {
    dataSourceUI.setZ39EarliestDate(earlyDate);
  }
  dataSourceUI.setZ39Address(addr.trim());
  dataSourceUI.setZ39Port(prt.trim());
  dataSourceUI.setZ39Database(db.trim());
  List<String> namespaces=namespacePanelExtension.getFinalNamespacesList();
  dataSourceUI.setNamespaceList(namespaces);
  dataSourceUI.setExportDirectory(exportPath.getValue() != null ? exportPath.getValue().trim() : "String_Node_Str");
  if (HarvesterUI.getProjectType() == ProjectType.DEFAULT)   saveDataSource(dataSourceUI,oldDataSetId,DatasetType.Z39,"String_Node_Str","String_Node_Str","String_Node_Str",name.getValue(),nameCode.getValue(),exportPath.getValue());
 else   saveDataSource(dataSourceUI,oldDataSetId,DatasetType.Z39,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
}