Program: 24557
Project: 24557
Buggy source:
public void setEditMode(DataSourceUI ds){
  editIsSampleCheckBox(ds.isSample());
  setScrollMode(Style.Scroll.AUTO);
  dataSourceUI=ds;
  edit=true;
  oldDataSetId=ds.getDataSourceSet();
  editTagsContainer(dataSourceUI);
  setEditTransformationCombo(dataSourceUI);
  dataSourceServicesPanel.setEditServices(dataSourceUI);
  harvestMethodCombo.getStore().clearFilters();
  idPolicyCombo.getStore().clearFilters();
  recordSyntaxCombo.getStore().clearFilters();
  characterEncoding.getStore().clearFilters();
  String idPolicy=dataSourceUI.getRecordIdPolicy();
  if (idPolicy.equals("String_Node_Str")) {
    idPolicyCombo.setValue(idPolicyCombo.getStore().getAt(0));
  }
 else   if (idPolicy.equals("String_Node_Str")) {
    idPolicyCombo.setValue(idPolicyCombo.getStore().getAt(1));
    idXPathField.setValue(dataSourceUI.getIdXPath());
    setEditNamespaces(dataSourceUI);
  }
  for (  ModelData comboSel : recordSyntaxCombo.getStore().getModels()) {
    if (comboSel.get("String_Node_Str").equals(dataSourceUI.getZ39RecordSyntax()))     recordSyntaxCombo.setValue(comboSel);
  }
  for (  ModelData comboSel : characterEncoding.getStore().getModels()) {
    if (comboSel.get("String_Node_Str").equals(dataSourceUI.getCharacterEncoding()))     characterEncoding.setValue(comboSel);
  }
  if (dataSourceUI.getZ39HarvestMethod() == null) {
    harvestMethodCombo.setValue(harvestMethodCombo.getStore().getAt(2));
    maximumID.clear();
  }
 else   if (dataSourceUI.getZ39HarvestMethod().equals("String_Node_Str")) {
    harvestMethodCombo.setValue(harvestMethodCombo.getStore().getAt(2));
    if (!dataSourceUI.getZ39MaximumId().equals("String_Node_Str") && !dataSourceUI.getZ39MaximumId().isEmpty() && dataSourceUI.getZ39MaximumId() != null)     maximumID.setValue(Long.valueOf(dataSourceUI.getZ39MaximumId()));
  }
 else   if (dataSourceUI.getZ39HarvestMethod().equals("String_Node_Str")) {
    harvestMethodCombo.setValue(harvestMethodCombo.getStore().getAt(1));
    fileUploadField.setValue(dataSourceUI.getZ39IdListFile());
  }
 else   if (dataSourceUI.getZ39HarvestMethod().equals("String_Node_Str")) {
    harvestMethodCombo.setValue(harvestMethodCombo.getStore().getAt(0));
    earliestDate.setValue(dataSourceUI.getZ39EarlistDate());
  }
  address.setValue(dataSourceUI.getZ39Address());
  recordSet.setValue(dataSourceUI.getDataSourceSet());
  description.setValue(dataSourceUI.getDescription());
  address.setValue(dataSourceUI.getZ39Address());
  port.setValue(dataSourceUI.getZ39Port());
  database.setValue(dataSourceUI.getZ39Database());
  user.setValue(dataSourceUI.getZ39User());
  password.setValue(dataSourceUI.getZ39Password());
  exportPath.setValue(dataSourceUI.getExportDirectory());
  if (HarvesterUI.getProjectType() == ProjectType.DEFAULT) {
    name.setValue(dataSourceUI.getName());
    nameCode.setValue(dataSourceUI.getNameCode());
  }
}

Fixed version (ground truth):
public void setEditMode(DataSourceUI ds){
  editIsSampleCheckBox(ds.isSample());
  setScrollMode(Style.Scroll.AUTO);
  dataSourceUI=ds;
  edit=true;
  oldDataSetId=ds.getDataSourceSet();
  editTagsContainer(dataSourceUI);
  setEditTransformationCombo(dataSourceUI);
  dataSourceServicesPanel.setEditServices(dataSourceUI);
  harvestMethodCombo.getStore().clearFilters();
  idPolicyCombo.getStore().clearFilters();
  recordSyntaxCombo.getStore().clearFilters();
  characterEncoding.getStore().clearFilters();
  String idPolicy=dataSourceUI.getRecordIdPolicy();
  if (idPolicy.equals(IdGeneratedRecordIdPolicy.IDGENERATED)) {
    idPolicyCombo.setValue(idPolicyCombo.getStore().getAt(0));
  }
 else   if (idPolicy.equals(IdExtractedRecordIdPolicy.IDEXTRACTED)) {
    idPolicyCombo.setValue(idPolicyCombo.getStore().getAt(1));
    idXPathField.setValue(dataSourceUI.getIdXPath());
    setEditNamespaces(dataSourceUI);
  }
  for (  ModelData comboSel : recordSyntaxCombo.getStore().getModels()) {
    if (comboSel.get("String_Node_Str").equals(dataSourceUI.getZ39RecordSyntax()))     recordSyntaxCombo.setValue(comboSel);
  }
  for (  ModelData comboSel : characterEncoding.getStore().getModels()) {
    if (comboSel.get("String_Node_Str").equals(dataSourceUI.getCharacterEncoding()))     characterEncoding.setValue(comboSel);
  }
  if (dataSourceUI.getZ39HarvestMethod() == null) {
    harvestMethodCombo.setValue(harvestMethodCombo.getStore().getAt(2));
    maximumID.clear();
  }
 else   if (dataSourceUI.getZ39HarvestMethod().equals("String_Node_Str")) {
    harvestMethodCombo.setValue(harvestMethodCombo.getStore().getAt(2));
    if (!dataSourceUI.getZ39MaximumId().equals("String_Node_Str") && !dataSourceUI.getZ39MaximumId().isEmpty() && dataSourceUI.getZ39MaximumId() != null)     maximumID.setValue(Long.valueOf(dataSourceUI.getZ39MaximumId()));
  }
 else   if (dataSourceUI.getZ39HarvestMethod().equals("String_Node_Str")) {
    harvestMethodCombo.setValue(harvestMethodCombo.getStore().getAt(1));
    fileUploadField.setValue(dataSourceUI.getZ39IdListFile());
  }
 else   if (dataSourceUI.getZ39HarvestMethod().equals("String_Node_Str")) {
    harvestMethodCombo.setValue(harvestMethodCombo.getStore().getAt(0));
    earliestDate.setValue(dataSourceUI.getZ39EarlistDate());
  }
  address.setValue(dataSourceUI.getZ39Address());
  recordSet.setValue(dataSourceUI.getDataSourceSet());
  description.setValue(dataSourceUI.getDescription());
  address.setValue(dataSourceUI.getZ39Address());
  port.setValue(dataSourceUI.getZ39Port());
  database.setValue(dataSourceUI.getZ39Database());
  user.setValue(dataSourceUI.getZ39User());
  password.setValue(dataSourceUI.getZ39Password());
  exportPath.setValue(dataSourceUI.getExportDirectory());
  if (HarvesterUI.getProjectType() == ProjectType.DEFAULT) {
    name.setValue(dataSourceUI.getName());
    nameCode.setValue(dataSourceUI.getNameCode());
  }
}