nus-yam/ex-repair huggingface dataset:
Program: 124962
Project: 124962
Buggy source:
/** 
 * Updates all buttons status, enabled or not.
 */
public void updateAllEnabledOrNot(){
  String jobIdInOozie=getJobIdInOozie();
  String pathValue=executeJobComposite.getPathValue();
  Button runBtn=executeJobComposite.getRunBtn();
  Button scheduleBtn=executeJobComposite.getScheduleBtn();
  Button killBtn=executeJobComposite.getKillBtn();
  if (pathValue != null && !"String_Node_Str".equals(pathValue) && isSettingDone()) {
    if (jobIdInOozie != null && !"String_Node_Str".equals(jobIdInOozie)) {
      try {
        JobSubmission.Status status=checkJobSubmissionStaus(jobIdInOozie);
switch (status) {
case RUNNING:
          isRunBtnEnabled=false;
        isScheduleBtnEnabled=false;
      isKillBtnEnabled=true;
    break;
case PREP:
case SUCCEEDED:
case KILLED:
  isRunBtnEnabled=true;
isScheduleBtnEnabled=true;
isKillBtnEnabled=false;
break;
case FAILED:
case SUSPENDED:
isKillBtnEnabled=true;
isScheduleBtnEnabled=true;
isRunBtnEnabled=true;
}
}
 catch (JobSubmissionException e) {
isRunBtnEnabled=true;
isScheduleBtnEnabled=true;
isKillBtnEnabled=false;
org.talend.commons.exception.ExceptionHandler.process(e);
}
}
 else {
isRunBtnEnabled=true;
isScheduleBtnEnabled=true;
isKillBtnEnabled=false;
}
}
updateBtn(runBtn,isRunBtnEnabled);
updateBtn(scheduleBtn,isScheduleBtnEnabled);
updateBtn(killBtn,isKillBtnEnabled);
updatePathTxtEnabledOrNot();
updateOutputTxtEnabledOrNot();
}

Fixed version (ground truth):
/** 
 * Updates all buttons status, enabled or not.
 */
public void updateAllEnabledOrNot(){
  String jobIdInOozie=getJobIdInOozie();
  String pathValue=executeJobComposite.getPathValue();
  Button runBtn=executeJobComposite.getRunBtn();
  Button scheduleBtn=executeJobComposite.getScheduleBtn();
  Button killBtn=executeJobComposite.getKillBtn();
  boolean isRunBtnEnabled=false;
  boolean isScheduleBtnEnabled=false;
  boolean isKillBtnEnabled=false;
  if (pathValue != null && !"String_Node_Str".equals(pathValue) && isSettingDone()) {
    if (jobIdInOozie != null && !"String_Node_Str".equals(jobIdInOozie)) {
      try {
        JobSubmission.Status status=checkJobSubmissionStaus(jobIdInOozie);
switch (status) {
case RUNNING:
          isRunBtnEnabled=false;
        isScheduleBtnEnabled=false;
      isKillBtnEnabled=true;
    break;
case PREP:
case SUCCEEDED:
case KILLED:
  isRunBtnEnabled=true;
isScheduleBtnEnabled=true;
isKillBtnEnabled=false;
break;
case FAILED:
case SUSPENDED:
isKillBtnEnabled=true;
isScheduleBtnEnabled=true;
isRunBtnEnabled=true;
}
}
 catch (JobSubmissionException e) {
isRunBtnEnabled=true;
isScheduleBtnEnabled=true;
isKillBtnEnabled=false;
org.talend.commons.exception.ExceptionHandler.process(e);
}
}
 else {
isRunBtnEnabled=true;
isScheduleBtnEnabled=true;
isKillBtnEnabled=false;
}
}
updateBtn(runBtn,isRunBtnEnabled);
updateBtn(scheduleBtn,isScheduleBtnEnabled);
updateBtn(killBtn,isKillBtnEnabled);
updatePathTxtEnabledOrNot();
updateOutputTxtEnabledOrNot();
}
Program: 124965
Project: 124965
Buggy source:
@Override protected void addTable(){
  final OutputTable createOutputTable=PigmapFactory.eINSTANCE.createOutputTable();
  CommandStack commandStack=externalPart.getViewer().getEditDomain().getCommandStack();
  commandStack.execute(new Command(){
    @Override public void execute(){
      if (externalPart.getViewer() instanceof PigMapGraphicViewer) {
        PigMapGraphicViewer viewer=(PigMapGraphicViewer)externalPart.getViewer();
        MapperManager manager=viewer.getMapperManager();
        String outputName=manager.getMapperUI().openNewOutputCreationDialog();
        if (outputName == null) {
          return;
        }
        createOutputTable.setName(outputName);
        externalData.getOutputTables().add(createOutputTable);
        MetadataTable metadataTable=new MetadataTable();
        metadataTable.setLabel(outputName);
        metadataTable.setTableName(outputName);
        mapperComponent.getMetadataList().add(metadataTable);
        mapperComponent.getProcess().addUniqueConnectionName(outputName);
        int indexOf=externalPart.getModelChildren().indexOf(createOutputTable);
        if (indexOf != -1) {
          externalPart.getViewer().select((EditPart)externalPart.getChildren().get(indexOf));
        }
        if (!min_size.isEnabled()) {
          min_size.setEnabled(true);
        }
        mapperManger.getMapperUI().updateStatusBar();
      }
    }
  }
);
}

Fixed version (ground truth):
@Override protected void addTable(){
  final OutputTable createOutputTable=PigmapFactory.eINSTANCE.createOutputTable();
  CommandStack commandStack=externalPart.getViewer().getEditDomain().getCommandStack();
  commandStack.execute(new Command(){
    @Override public void execute(){
      if (externalPart.getViewer() instanceof PigMapGraphicViewer) {
        PigMapGraphicViewer viewer=(PigMapGraphicViewer)externalPart.getViewer();
        MapperManager manager=viewer.getMapperManager();
        String outputName=manager.getMapperUI().openNewOutputCreationDialog();
        if (outputName == null) {
          return;
        }
        createOutputTable.setName(outputName);
        externalData.getOutputTables().add(createOutputTable);
        MetadataTable metadataTable=new MetadataTable();
        metadataTable.setLabel(outputName);
        metadataTable.setTableName(outputName);
        mapperComponent.getMetadataList().add(metadataTable);
        mapperComponent.getProcess().addUniqueConnectionName(outputName);
        int indexOf=externalPart.getModelChildren().indexOf(createOutputTable);
        if (indexOf != -1) {
          externalPart.getViewer().select((EditPart)externalPart.getChildren().get(indexOf));
        }
        if (!min_size.isEnabled()) {
          min_size.setEnabled(true);
        }
        if (!externalData.getOutputTables().isEmpty() && !externalData.getInputTables().isEmpty()) {
          auto_map.setEnabled(true);
        }
        mapperManger.getMapperUI().updateStatusBar();
      }
    }
  }
);
}
Program: 124966
Project: 124966
Buggy source:
@Override public void selectionChanged(SelectionChangedEvent event){
  if (!event.getSelection().isEmpty() && event.getSelection() instanceof IStructuredSelection) {
    Iterator iterator=((IStructuredSelection)event.getSelection()).iterator();
    while (iterator.hasNext()) {
      Object firstElement=iterator.next();
      if (firstElement instanceof TableEntityPart) {
        AbstractNode model=(AbstractNode)((TableEntityPart)firstElement).getModel();
        boolean isInputMain=false;
        if (model != null && model instanceof TableNode && model.eContainer() != null) {
          if (model.eContainer() instanceof OutputTable) {
            onEntitySelection((IStructuredSelection)event.getSelection(),selectedOutputTable);
          }
 else {
            onEntitySelection((IStructuredSelection)event.getSelection(),selectedInputTable);
          }
        }
        if (!isInputMain) {
          refreshStyledTextEditor((TableEntityPart)firstElement);
        }
 else {
          refreshStyledTextEditor(null);
        }
      }
 else       if (firstElement instanceof PigMapInputTablePart) {
        selectInputTable((InputTable)((PigMapInputTablePart)firstElement).getModel());
        refreshStyledTextEditor(null);
      }
 else       if (firstElement instanceof PigMapOutputTablePart) {
        selectOutputTable((OutputTable)((PigMapOutputTablePart)firstElement).getModel());
        refreshStyledTextEditor(null);
      }
    }
  }
}

Fixed version (ground truth):
@Override public void selectionChanged(SelectionChangedEvent event){
  if (!event.getSelection().isEmpty() && event.getSelection() instanceof IStructuredSelection) {
    Iterator iterator=((IStructuredSelection)event.getSelection()).iterator();
    while (iterator.hasNext()) {
      Object firstElement=iterator.next();
      if (firstElement instanceof TableEntityPart) {
        AbstractNode model=(AbstractNode)((TableEntityPart)firstElement).getModel();
        boolean isInputMain=false;
        if (model != null && model instanceof TableNode && model.eContainer() != null) {
          if (model.eContainer() instanceof OutputTable) {
            selectOutputTable((OutputTable)model.eContainer());
            onEntitySelection((IStructuredSelection)event.getSelection(),selectedOutputTable);
          }
 else {
            selectInputTable((InputTable)model.eContainer());
            onEntitySelection((IStructuredSelection)event.getSelection(),selectedInputTable);
          }
        }
        if (!isInputMain) {
          refreshStyledTextEditor((TableEntityPart)firstElement);
        }
 else {
          refreshStyledTextEditor(null);
        }
      }
 else       if (firstElement instanceof PigMapInputTablePart) {
        selectInputTable((InputTable)((PigMapInputTablePart)firstElement).getModel());
        refreshStyledTextEditor(null);
      }
 else       if (firstElement instanceof PigMapOutputTablePart) {
        selectOutputTable((OutputTable)((PigMapOutputTablePart)firstElement).getModel());
        refreshStyledTextEditor(null);
      }
    }
  }
}
Program: 124967
Project: 124967
Buggy source:
public void doModifyPathAction(){
  if (OozieJobTrackerListener.getProcess() != null) {
    String path=executeJobComposite.getPathValue();
    IProcess2 process=OozieJobTrackerListener.getProcess();
    process.getElementParameter(EOozieParameterName.HADOOP_APP_PATH.getName()).setValue(path);
  }
  updateRunBtnEnabledOrNot();
  updateScheduleBtnEnabledOrNot();
  updateKillBtnEnabledOrNot();
  updatePathTxtEnabledOrNot();
  updateOutputTxtEnabledOrNot();
}

Fixed version (ground truth):
public void doModifyPathAction(){
  if (OozieJobTrackerListener.getProcess() != null) {
    String path=executeJobComposite.getPathValue();
    IProcess2 process=OozieJobTrackerListener.getProcess();
    process.getElementParameter(EOozieParameterName.HADOOP_APP_PATH.getName()).setValue(path);
  }
  updateAllEnabledOrNot();
}
Program: 124968
Project: 124968
Buggy source:
/** 
 * Updates all buttons status, enabled or not.
 */
public void updateAllEnabledOrNot(){
  updateRunBtnEnabledOrNot();
  updateScheduleBtnEnabledOrNot();
  updateKillBtnEnabledOrNot();
  updatePathTxtEnabledOrNot();
  updateOutputTxtEnabledOrNot();
}

Fixed version (ground truth):
/** 
 * Updates all buttons status, enabled or not.
 */
public void updateAllEnabledOrNot(){
  String jobIdInOozie=getJobIdInOozie();
  String pathValue=executeJobComposite.getPathValue();
  Button runBtn=executeJobComposite.getRunBtn();
  Button scheduleBtn=executeJobComposite.getScheduleBtn();
  Button killBtn=executeJobComposite.getKillBtn();
  if (pathValue != null && !"String_Node_Str".equals(pathValue) && isSettingDone()) {
    if (jobIdInOozie != null && !"String_Node_Str".equals(jobIdInOozie)) {
      try {
        JobSubmission.Status status=checkJobSubmissionStaus(jobIdInOozie);
switch (status) {
case RUNNING:
          isRunBtnEnabled=false;
        isScheduleBtnEnabled=false;
      isKillBtnEnabled=true;
    break;
case PREP:
case SUCCEEDED:
case KILLED:
  isRunBtnEnabled=true;
isScheduleBtnEnabled=true;
isKillBtnEnabled=false;
break;
case FAILED:
case SUSPENDED:
isKillBtnEnabled=true;
isScheduleBtnEnabled=true;
isRunBtnEnabled=true;
}
}
 catch (JobSubmissionException e) {
isRunBtnEnabled=true;
isScheduleBtnEnabled=true;
isKillBtnEnabled=false;
org.talend.commons.exception.ExceptionHandler.process(e);
}
}
 else {
isRunBtnEnabled=true;
isScheduleBtnEnabled=true;
isKillBtnEnabled=false;
}
}
updateBtn(runBtn,isRunBtnEnabled);
updateBtn(scheduleBtn,isScheduleBtnEnabled);
updateBtn(killBtn,isKillBtnEnabled);
updatePathTxtEnabledOrNot();
updateOutputTxtEnabledOrNot();
}
Program: 124969
Project: 124969
Buggy source:
@Override public Status status(String jobHandle,String oozieEndPoint) throws JobSubmissionException {
  try {
    OozieClient oozieClient=createOozieClient(oozieEndPoint,0);
    WorkflowJob workflowJob=oozieClient.getJobInfo(jobHandle);
    if (workflowJob == null) {
      throw new OozieClientException(OozieClientException.INVALID_INPUT,"String_Node_Str");
    }
    String status=oozieClient.getJobInfo(jobHandle).getStatus().name();
    return Status.valueOf(status);
  }
 catch (  OozieClientException e) {
    throw new JobSubmissionException("String_Node_Str" + jobHandle,e);
  }
}

Fixed version (ground truth):
@Override public Status status(String jobHandle,String oozieEndPoint) throws JobSubmissionException {
  Status status=null;
  Callable<Status> statusCallable=null;
  statusCallable=getStatus(jobHandle,oozieEndPoint);
  ExecutorService executor=Executors.newSingleThreadExecutor();
  Future<Status> future=executor.submit(statusCallable);
  try {
    status=future.get(TIMEOUT,TimeUnit.SECONDS);
  }
 catch (  Exception e) {
    future.cancel(true);
    throw new JobSubmissionException("String_Node_Str" + jobHandle,e);
  }
  return status;
}
Program: 124970
Project: 124970
Buggy source:
/** 
 * @param parent
 * @param style
 */
public ExecuteJobComposite(Composite parent,int style){
  super(parent,style);
  parent.setLayout(new FillLayout());
  setExpandHorizontal(true);
  setExpandVertical(true);
  this.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_DARK_GRAY));
  Composite comp=new Composite(this,SWT.NONE);
  setContent(comp);
  executeJobCompController=new ExecuteJobCompositeController(this);
  createExecuteJobAreas(comp);
  this.setMinSize(comp.computeSize(SWT.DEFAULT,SWT.DEFAULT));
  executeJobCompController.updateAllEnabledOrNot();
}

Fixed version (ground truth):
/** 
 * @param parent
 * @param style
 */
public ExecuteJobComposite(Composite parent,int style){
  super(parent,style);
  parent.setLayout(new FillLayout());
  setExpandHorizontal(true);
  setExpandVertical(true);
  this.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_DARK_GRAY));
  Composite comp=new Composite(this,SWT.NONE);
  setContent(comp);
  executeJobCompController=new ExecuteJobCompositeController(this);
  createExecuteJobAreas(comp);
  this.setMinSize(comp.computeSize(SWT.DEFAULT,SWT.DEFAULT));
}
Program: 124971
Project: 124971
Buggy source:
public void initValues(){
  executeJobCompController.initValues();
  executeJobCompController.updateAllEnabledOrNot();
}

Fixed version (ground truth):
public void initValues(){
  executeJobCompController.initValues();
}
Program: 124972
Project: 124972
Buggy source:
public void refresh(){
  IProcess2 process=OozieJobTrackerListener.getProcess();
  if (process != null) {
    String label=process.getLabel();
    if (executeJobComposite != null && !executeJobComposite.isDisposed()) {
      executeJobComposite.initValues();
      executeJobComposite.setContextComposite(contextComposite);
    }
    tabFactory.setTitle(Messages.getString("String_Node_Str",label),null);
    setPartName(Messages.getString("String_Node_Str",label));
    contextComposite.setProcess(process);
  }
 else {
    tabFactory.setTitle(Messages.getString("String_Node_Str"),null);
    setPartName(Messages.getString("String_Node_Str"));
    if (executeJobComposite != null && !executeJobComposite.isDisposed()) {
      executeJobComposite.initValues();
    }
    contextComposite.setProcess(null);
  }
}

Fixed version (ground truth):
public void refresh(){
  IProcess2 process=OozieJobTrackerListener.getProcess();
  if (process != null) {
    String label=process.getLabel();
    if (executeJobComposite != null && !executeJobComposite.isDisposed()) {
      executeJobComposite.initValues();
      executeJobComposite.setContextComposite(contextComposite);
    }
    tabFactory.setTitle(Messages.getString("String_Node_Str",label),null);
    setPartName(Messages.getString("String_Node_Str",label));
    contextComposite.setProcess(process);
  }
 else {
    tabFactory.setTitle(Messages.getString("String_Node_Str"),null);
    setPartName(Messages.getString("String_Node_Str"));
    if (executeJobComposite != null && !executeJobComposite.isDisposed()) {
      executeJobComposite.initValues();
    }
    contextComposite.setProcess(null);
  }
  executeJobComposite.getExecuteJobCompController().updateAllEnabledOrNot();
}
Program: 124973
Project: 124973
Buggy source:
public void createDynamicComposite(Composite parent,Element element,EComponentCategory category){
  if (category == EComponentCategory.SCHEDULE_4_HADOOP_EXECUTE_JOB) {
    executeJobComposite=new ExecuteJobComposite(parent,SWT.H_SCROLL | SWT.V_SCROLL | SWT.NO_FOCUS);
    dc=executeJobComposite;
  }
 else   if (category == EComponentCategory.SCHEDULE_4_HADOOP_MONITORING) {
    monitoringComposite=new OozieMonitoringComposite(parent,SWT.H_SCROLL | SWT.V_SCROLL);
    dc=monitoringComposite;
  }
  refresh();
  if (dc != null) {
    dc.refresh();
  }
}

Fixed version (ground truth):
public void createDynamicComposite(Composite parent,Element element,EComponentCategory category){
  if (category == EComponentCategory.SCHEDULE_4_HADOOP_EXECUTE_JOB) {
    executeJobComposite=new ExecuteJobComposite(parent,SWT.H_SCROLL | SWT.V_SCROLL | SWT.NO_FOCUS);
    dc=executeJobComposite;
  }
 else   if (category == EComponentCategory.SCHEDULE_4_HADOOP_MONITORING) {
    monitoringComposite=new OozieMonitoringComposite(parent,SWT.H_SCROLL | SWT.V_SCROLL);
    dc=monitoringComposite;
  }
  if (dc != null) {
    dc.refresh();
  }
}
Program: 124974
Project: 124974
Buggy source:
private String getRelativePath(HDFSConnectionBean connection,String absPath){
  String nameNodeURI=TalendQuoteUtils.removeQuotesIfExist(connection.getNameNodeURI());
  if (absPath.startsWith(nameNodeURI)) {
    absPath=absPath.substring(absPath.indexOf(nameNodeURI) + nameNodeURI.length());
  }
  if (absPath.indexOf(COLON) != -1) {
    absPath=absPath.substring(absPath.lastIndexOf(COLON) + 1);
  }
  if (!absPath.startsWith(PATH_SEPARATOR)) {
    absPath=PATH_SEPARATOR + absPath;
  }
  return absPath;
}

Fixed version (ground truth):
private String getRelativePath(HDFSConnectionBean connection,String absPath){
  String nameNodeURI=TalendQuoteUtils.removeQuotesIfExist(connection.getNameNodeURI());
  if (absPath.startsWith(nameNodeURI)) {
    absPath=absPath.substring(absPath.indexOf(nameNodeURI) + nameNodeURI.length());
  }
 else   if (nameNodeURI.endsWith(HadoopParameterUtil.DEFAULT_NAMENODE_PORT)) {
    String nameNodeURIWithoutPort=nameNodeURI.substring(0,nameNodeURI.lastIndexOf(HadoopParameterUtil.DEFAULT_NAMENODE_PORT) - 1);
    if (absPath.startsWith(nameNodeURIWithoutPort)) {
      absPath=absPath.substring(absPath.indexOf(nameNodeURIWithoutPort) + nameNodeURIWithoutPort.length());
    }
  }
  if (absPath.indexOf(COLON) != -1) {
    absPath=absPath.substring(absPath.lastIndexOf(COLON) + 1);
  }
  if (!absPath.startsWith(PATH_SEPARATOR)) {
    absPath=PATH_SEPARATOR + absPath;
  }
  return absPath;
}
Program: 124975
Project: 124975
Buggy source:
private void updateVersionPart(EHadoopDistributions distribution){
  GridData distriData=(GridData)hadoopDistributionCombo.getCombo().getLayoutData();
  if (distribution == EHadoopDistributions.CUSTOM) {
    hadoopVersionCombo.setHideWidgets(true);
    distriData.horizontalSpan=1;
    hideControl(customButton,false);
  }
 else {
    hadoopVersionCombo.setHideWidgets(false);
    distriData.horizontalSpan=2;
    hideControl(customButton,true);
    List<String> items=getDistributionVersions(distribution);
    String[] versions=new String[items.size()];
    items.toArray(versions);
    hadoopVersionCombo.getCombo().setItems(versions);
    if (versions.length > 0) {
      hadoopVersionCombo.getCombo().select(0);
    }
  }
}

Fixed version (ground truth):
private void updateVersionPart(EHadoopDistributions distribution){
  GridData distriData=(GridData)hadoopDistributionCombo.getCombo().getLayoutData();
  if (distribution == EHadoopDistributions.CUSTOM) {
    hadoopVersionCombo.setHideWidgets(true);
    distriData.horizontalSpan=1;
    hideControl(customButton,false);
  }
 else {
    hadoopVersionCombo.setHideWidgets(false);
    distriData.horizontalSpan=2;
    hideControl(customButton,true);
    List<String> items=getDistributionVersions(distribution);
    if (distribution == EHadoopDistributions.MAPR) {
      items.remove(EHadoopVersion4Drivers.MAPR1.getVersionDisplay());
    }
    String[] versions=new String[items.size()];
    items.toArray(versions);
    hadoopVersionCombo.getCombo().setItems(versions);
    if (versions.length > 0) {
      hadoopVersionCombo.getCombo().select(0);
    }
  }
}
Program: 124976
Project: 124976
Buggy source:
private void addVersionFields(Composite parent){
  Group versionGroup=Form.createGroup(parent,3,TOozieUIConstants.OOZIE_LBL_VERSION_GROUP);
  versionGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  hadoopDistributionCombo=new LabelledCombo(versionGroup,TOozieUIConstants.OOZIE_LBL_HADOOP_DISTRIBUTION,"String_Node_Str",EHadoopDistributions.getAllDistributionDisplayNames().toArray(new String[0]),2,true);
  hadoopVersionCombo=new LabelledCombo(versionGroup,TOozieUIConstants.OOZIE_LBL_HADOOP_VERSION,"String_Node_Str",new String[0],2,true);
  customButton=new Button(versionGroup,SWT.NULL);
  customButton.setImage(ImageProvider.getImage(EImage.THREE_DOTS_ICON));
  customButton.setLayoutData(new GridData(SWT.BEGINNING,SWT.CENTER,true,false,1,1));
  EHadoopDistributions distribution=EHadoopDistributions.getDistributionByName(hadoopDistributionValue,false);
  updateVersionPart(distribution);
}

Fixed version (ground truth):
private void addVersionFields(Composite parent){
  Group versionGroup=Form.createGroup(parent,3,TOozieUIConstants.OOZIE_LBL_VERSION_GROUP);
  versionGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  List<String> filterDistributionDisplayNames=EHadoopDistributions.getAllDistributionDisplayNames();
  filterDistributionDisplayNames.remove(EHadoopDistributions.APACHE.getDisplayName());
  filterDistributionDisplayNames.remove(EHadoopDistributions.AMAZON_EMR.getDisplayName());
  hadoopDistributionCombo=new LabelledCombo(versionGroup,TOozieUIConstants.OOZIE_LBL_HADOOP_DISTRIBUTION,"String_Node_Str",filterDistributionDisplayNames.toArray(new String[0]),2,true);
  hadoopVersionCombo=new LabelledCombo(versionGroup,TOozieUIConstants.OOZIE_LBL_HADOOP_VERSION,"String_Node_Str",new String[0],2,true);
  customButton=new Button(versionGroup,SWT.NULL);
  customButton.setImage(ImageProvider.getImage(EImage.THREE_DOTS_ICON));
  customButton.setLayoutData(new GridData(SWT.BEGINNING,SWT.CENTER,true,false,1,1));
  EHadoopDistributions distribution=EHadoopDistributions.getDistributionByName(hadoopDistributionValue,false);
  updateVersionPart(distribution);
}
Program: 124978
Project: 124978
Buggy source:
private String getRelativePath(HDFSConnectionBean connection,String absPath){
  String nameNodeURI=TalendQuoteUtils.removeQuotesIfExist(connection.getNameNodeURI());
  if (absPath.startsWith(nameNodeURI)) {
    absPath=absPath.substring(absPath.indexOf(nameNodeURI) + nameNodeURI.length());
  }
 else   if (nameNodeURI.endsWith(HadoopParameterUtil.DEFAULT_NAMENODE_PORT)) {
    String nameNodeURIWithoutPort=nameNodeURI.substring(0,nameNodeURI.lastIndexOf(HadoopParameterUtil.DEFAULT_NAMENODE_PORT) - 1);
    if (absPath.startsWith(nameNodeURIWithoutPort)) {
      absPath=absPath.substring(absPath.indexOf(nameNodeURIWithoutPort) + nameNodeURIWithoutPort.length());
    }
  }
  if (absPath.indexOf(COLON) != -1) {
    absPath=absPath.substring(absPath.lastIndexOf(COLON) + 1);
  }
  if (!absPath.startsWith(PATH_SEPARATOR)) {
    absPath=PATH_SEPARATOR + absPath;
  }
  return absPath;
}

Fixed version (ground truth):
private String getRelativePath(HDFSConnectionBean connection,String absPath){
  return URI.create(absPath).getPath();
}
Program: 124979
Project: 124979
Buggy source:
private TableNode findConnectionSource(TableNode tableNode,TableEntryLocation matchedLocation){
  return null;
}

Fixed version (ground truth):
protected AbstractNode findConnectionSource(PigMapData mapperData,TableEntryLocation matchedLocation){
  if (mapperData == null) {
    return null;
  }
  for (  InputTable inputTable : mapperData.getInputTables()) {
    for (    TableNode node : inputTable.getNodes()) {
      TableEntryLocation sourceLocation=expressionManager.parseTableEntryLocation(inputTable.getName() + "String_Node_Str" + node.getName()).get(0);
      if (matchedLocation.equals(sourceLocation)) {
        return node;
      }
    }
  }
  return null;
}
Program: 124981
Project: 124981
Buggy source:
@Override public List<IHDFSNode> getChildren(){
  if (!hasFetchedChildren) {
    super.getChildren().clear();
    try {
      loadHDFSFolderChildren();
      hasFetchedChildren=true;
    }
 catch (    Exception e) {
      log.error(e);
    }
 finally {
      provider.refresh(HDFSFolder.this);
    }
  }
  return super.getChildren();
}

Fixed version (ground truth):
@Override public List<IHDFSNode> getChildren(){
  boolean checkConnection=true;
  if (!hasFetchedChildren) {
    super.getChildren().clear();
    try {
      loadHDFSFolderChildren();
      hasFetchedChildren=true;
    }
 catch (    Exception e) {
      log.error(e);
      checkConnection=false;
      PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable(){
        @Override public void run(){
          String mainMsg=Messages.getString("String_Node_Str");
          String detailMsg=Messages.getString("String_Node_Str",connection.getNameNodeURI());
          new ErrorDialogWidthDetailArea(PlatformUI.getWorkbench().getDisplay().getActiveShell(),HDFSPlugin.PLUGIN_ID,mainMsg,detailMsg);
          return;
        }
      }
);
    }
 finally {
      if (checkConnection) {
        provider.refresh(HDFSFolder.this);
      }
    }
  }
  return super.getChildren();
}
Program: 124983
Project: 124983
Buggy source:
protected HDFSConnectionBean getHDFSConnectionBean(){
  INode node=(INode)elem;
  String useExistingConnection=ElementParameterParser.getValue(elem,"String_Node_Str");
  if ("String_Node_Str".equalsIgnoreCase(useExistingConnection)) {
    String connectionName=ElementParameterParser.getValue(node,"String_Node_Str");
    List<? extends INode> nodes=node.getProcess().getGeneratingNodes();
    for (    INode iNode : nodes) {
      if (iNode.getUniqueName().equals(connectionName)) {
        node=iNode;
        break;
      }
    }
  }
  String distribution=(String)getParameterValue(node,EHadoopParameter.DISTRIBUTION.getName());
  String version=(String)getParameterValue(node,EHadoopParameter.VERSION.getName());
  String nameNodeUri=(String)getParameterValue(node,EHadoopParameter.NAMENODE_URI.getName());
  String userName=(String)getParameterValue(node,EHadoopParameter.USERNAME.getName());
  Boolean useKrb=(Boolean)getParameterValue(node,EHadoopParameter.USE_KRB.getName());
  String principal=(String)getParameterValue(node,EHadoopParameter.NAMENODE_PRINCIPAL.getName());
  String group=(String)getParameterValue(node,EHadoopParameter.GROUP.getName());
  HDFSConnectionBean connectionBean=new HDFSConnectionBean();
  connectionBean.setDistribution(distribution);
  connectionBean.setDfVersion(version);
  connectionBean.setNameNodeURI(nameNodeUri);
  connectionBean.setUserName(userName);
  connectionBean.setEnableKerberos(useKrb);
  connectionBean.setPrincipal(principal);
  connectionBean.setGroup(group);
  return connectionBean;
}

Fixed version (ground truth):
protected HDFSConnectionBean getHDFSConnectionBean(){
  INode node=(INode)elem;
  String useExistingConnection=ElementParameterParser.getValue(elem,"String_Node_Str");
  if ("String_Node_Str".equalsIgnoreCase(useExistingConnection)) {
    String connectionName=ElementParameterParser.getValue(node,"String_Node_Str");
    List<? extends INode> nodes=node.getProcess().getGeneratingNodes();
    for (    INode iNode : nodes) {
      if (iNode.getUniqueName().equals(connectionName)) {
        node=iNode;
        break;
      }
    }
  }
  String distribution=(String)getParameterValue(node,EHadoopParameter.DISTRIBUTION.getName());
  String version=(String)getParameterValue(node,EHadoopParameter.VERSION.getName());
  String nameNodeUri=(String)getParameterValue(node,EHadoopParameter.NAMENODE_URI.getName());
  String userName=(String)getParameterValue(node,EHadoopParameter.USERNAME.getName());
  Boolean useKrb=(Boolean)getParameterValue(node,EHadoopParameter.USE_KRB.getName());
  String principal=(String)getParameterValue(node,EHadoopParameter.NAMENODE_PRINCIPAL.getName());
  String group=(String)getParameterValue(node,EHadoopParameter.GROUP.getName());
  HDFSConnectionBean connectionBean=new HDFSConnectionBean();
  connectionBean.setDistribution(distribution);
  connectionBean.setDfVersion(version);
  connectionBean.setNameNodeURI(nameNodeUri);
  connectionBean.setUserName(userName);
  connectionBean.setEnableKerberos(useKrb != null ? useKrb : false);
  connectionBean.setPrincipal(principal);
  connectionBean.setGroup(group);
  return connectionBean;
}
Program: 124984
Project: 124984
Buggy source:
@Override public void renameInputConnection(String oldName,String newName){
}

Fixed version (ground truth):
@Override public void renameInputConnection(String oldName,String newName){
  PigMapData externalEmfData=(PigMapData)getExternalEmfData();
  for (  InputTable inputTable : externalEmfData.getInputTables()) {
    if (inputTable.getName() != null && inputTable.getName().equals(oldName) && !oldName.equals(newName)) {
      inputTable.setName(newName);
      PigMapUtil.updateExpression(oldName,newName,externalEmfData,expressionManager);
    }
  }
}
Program: 124985
Project: 124985
Buggy source:
public PigMapComponent(){
}

Fixed version (ground truth):
public PigMapComponent(){
  expressionManager=new PigMapExpressionManager();
}
Program: 124986
Project: 124986
Buggy source:
@Override public void renameOutputConnection(String oldName,String newName){
}

Fixed version (ground truth):
@Override public void renameOutputConnection(String oldName,String newName){
  PigMapData externalEmfData=(PigMapData)getExternalEmfData();
  for (  OutputTable outputTable : externalEmfData.getOutputTables()) {
    if (outputTable.getName() != null && outputTable.getName().equals(oldName) && !oldName.equals(newName)) {
      outputTable.setName(newName);
    }
  }
}
Program: 124987
Project: 124987
Buggy source:
public String replaceExpression(String expression,TableEntryLocation oldLocation,TableEntryLocation newLocation){
  return "String_Node_Str";
}

Fixed version (ground truth):
public String replaceExpression(String expression,TableEntryLocation oldLocation,TableEntryLocation newLocation){
  String returnedExpression=expression;
  String tempPattern=StringHelper.replacePrms(SUBST_PATTERN_FOR_REPLACE_LOCATION,new Object[]{oldLocation.getTableName(),oldLocation.getColumnValue()});
  recompilePatternIfNecessary(tempPattern);
  if (returnedExpression != null) {
    matcher.setMultiline(true);
    Perl5Substitution substitution=new Perl5Substitution(PREFIX_TABLE_NAME_REGEXP + "String_Node_Str" + newLocation.getTableName()+ "String_Node_Str"+ SUFFIX_TABLE_NAME_REGEXP+ "String_Node_Str"+ PREFIX_FIELD_NAME_REGEXP+ "String_Node_Str"+ newLocation.getColumnValue()+ "String_Node_Str"+ SUFFIX_FIELD_NAME_REGEXP,Perl5Substitution.INTERPOLATE_ALL);
    returnedExpression=substitute(matcher,pattern,substitution,returnedExpression,Util.SUBSTITUTE_ALL);
  }
  return returnedExpression;
}
Program: 124988
Project: 124988
Buggy source:
public TableEntryLocation(String tableName,String columnValue){
  this("String_Node_Str",tableName,columnValue,"String_Node_Str");
}

Fixed version (ground truth):
public TableEntryLocation(String tableName){
  this.tableName=tableName;
  this.prefix="String_Node_Str";
  this.sufix="String_Node_Str";
}
Program: 124989
Project: 124989
Buggy source:
@Override protected void createEntityItems(TableEntityElement entityElement){
  this.tableNode=getEntityManager().getModel();
  boolean isLookup=false;
  TableEntityPart tableEntityPart=getEntityManager().getEditPart();
  if (tableEntityPart != null && tableEntityPart.getParent() != null) {
    if (tableEntityPart.getParent() instanceof PigMapInputTablePart) {
      PigMapInputTablePart inputTablePart=(PigMapInputTablePart)tableEntityPart.getParent();
      Object model=inputTablePart.getModel();
      if (model != null && model instanceof InputTable) {
        isLookup=((InputTable)model).isLookup();
      }
    }
 else     if (tableEntityPart.getParent() instanceof PigMapOutputTablePart) {
      isLookup=true;
    }
  }
  if (isLookup) {
    expression=new ExpressionFigure();
    expression.setText(tableNode.getExpression());
    expression.setOpaque(false);
    entityElement.add(expression);
  }
  branchContent=new PigMapBranchContent(getEntityManager());
  entityElement.add(branchContent);
}

Fixed version (ground truth):
@Override protected void createEntityItems(TableEntityElement entityElement){
  this.tableNode=getEntityManager().getModel();
  boolean isLookup=false;
  TableEntityPart tableEntityPart=getEntityManager().getEditPart();
  if (tableEntityPart != null && tableEntityPart.getParent() != null) {
    if (tableEntityPart.getParent() instanceof PigMapInputTablePart) {
      PigMapInputTablePart inputTablePart=(PigMapInputTablePart)tableEntityPart.getParent();
      Object model=inputTablePart.getModel();
      if (model != null && model instanceof InputTable) {
        isLookup=((InputTable)model).isLookup();
      }
    }
 else     if (tableEntityPart.getParent() instanceof PigMapOutputTablePart) {
      isLookup=true;
    }
  }
  if (isLookup) {
    expression=new ExpressionFigure();
    expression.setText(tableNode.getExpression());
    expression.setOpaque(false);
    entityElement.add(expression);
  }
  branchContent=new PigMapBranchContent(getEntityManager());
  TreeBranch treeBranch=new TreeBranch(branchContent,!isRoot());
  entityElement.add(treeBranch);
}
Program: 124990
Project: 124990
Buggy source:
@Override public void selectionChanged(SelectionChangedEvent event){
  if (!event.getSelection().isEmpty() && event.getSelection() instanceof IStructuredSelection) {
    Iterator iterator=((IStructuredSelection)event.getSelection()).iterator();
    while (iterator.hasNext()) {
      Object firstElement=iterator.next();
      if (firstElement instanceof TableEntityPart) {
        AbstractNode model=(AbstractNode)((TableEntityPart)firstElement).getModel();
        boolean isInputMain=false;
        if (!isInputMain) {
          refreshStyledTextEditor((TableEntityPart)firstElement);
        }
 else {
          refreshStyledTextEditor(null);
        }
      }
 else       if (firstElement instanceof PigMapInputTablePart) {
        selectInputTable((InputTable)((PigMapInputTablePart)firstElement).getModel());
        refreshStyledTextEditor(null);
      }
 else       if (firstElement instanceof PigMapOutputTablePart) {
        selectOutputTable((OutputTable)((PigMapOutputTablePart)firstElement).getModel());
        refreshStyledTextEditor(null);
      }
    }
  }
}

Fixed version (ground truth):
@Override public void selectionChanged(SelectionChangedEvent event){
  if (!event.getSelection().isEmpty() && event.getSelection() instanceof IStructuredSelection) {
    Iterator iterator=((IStructuredSelection)event.getSelection()).iterator();
    while (iterator.hasNext()) {
      Object firstElement=iterator.next();
      if (firstElement instanceof TableEntityPart) {
        AbstractNode model=(AbstractNode)((TableEntityPart)firstElement).getModel();
        boolean isInputMain=false;
        if (model != null && model instanceof TableNode && model.eContainer() != null) {
          if (model.eContainer() instanceof OutputTable) {
            onEntitySelection((IStructuredSelection)event.getSelection(),selectedOutputTable);
          }
 else {
            onEntitySelection((IStructuredSelection)event.getSelection(),selectedInputTable);
          }
        }
        if (!isInputMain) {
          refreshStyledTextEditor((TableEntityPart)firstElement);
        }
 else {
          refreshStyledTextEditor(null);
        }
      }
 else       if (firstElement instanceof PigMapInputTablePart) {
        selectInputTable((InputTable)((PigMapInputTablePart)firstElement).getModel());
        refreshStyledTextEditor(null);
      }
 else       if (firstElement instanceof PigMapOutputTablePart) {
        selectOutputTable((OutputTable)((PigMapOutputTablePart)firstElement).getModel());
        refreshStyledTextEditor(null);
      }
    }
  }
}
Program: 124992
Project: 124992
Buggy source:
@Override public void performRequest(Request req){
  if (RequestConstants.REQ_DIRECT_EDIT.equals(req.getType())) {
    DirectEditRequest drequest=(DirectEditRequest)req;
    Point figureLocation=drequest.getLocation();
    IFigure findFigureAt=getFigure().findFigureAt(figureLocation.x,figureLocation.y);
    if (findFigureAt instanceof IWidgetCell) {
      directEditManager=new PigMapNodeDirectEditManager(this,new PigMapNodeCellEditorLocator((Figure)findFigureAt));
      directEditManager.show();
    }
  }
}

Fixed version (ground truth):
@Override public void performRequest(Request req){
  if (RequestConstants.REQ_DIRECT_EDIT.equals(req.getType())) {
    DirectEditRequest drequest=(DirectEditRequest)req;
    Point figureLocation=drequest.getLocation();
    IFigure findFigureAt=getFigure().findFigureAt(figureLocation.x,figureLocation.y);
    if (findFigureAt != null && findFigureAt instanceof IWidgetCell) {
      directEditManager=new PigMapNodeDirectEditManager(this,new PigMapNodeCellEditorLocator((Figure)findFigureAt));
      directEditManager.show();
    }
    if (directEditManager != null) {
      if (findFigureAt != null && findFigureAt instanceof FilterTextArea) {
        if (figure.containsPoint(figureLocation)) {
          directEditManager.show();
          ((PigMapGraphicViewer)getViewer()).getMapperManager().setCurrentDirectEditManager(directEditManager);
        }
      }
    }
  }
}
Program: 124993
Project: 124993
Buggy source:
@Override public void performRequest(Request req){
  if (RequestConstants.REQ_DIRECT_EDIT.equals(req.getType())) {
    DirectEditRequest drequest=(DirectEditRequest)req;
    Point figureLocation=drequest.getLocation();
    IFigure findFigureAt=getFigure().findFigureAt(figureLocation.x,figureLocation.y);
    if (findFigureAt instanceof IWidgetCell) {
      directEditManager=new PigMapNodeDirectEditManager(this,new PigMapNodeCellEditorLocator((Figure)findFigureAt));
      directEditManager.show();
    }
  }
}

Fixed version (ground truth):
@Override public void performRequest(Request req){
  if (RequestConstants.REQ_DIRECT_EDIT.equals(req.getType())) {
    DirectEditRequest drequest=(DirectEditRequest)req;
    Point figureLocation=drequest.getLocation();
    IFigure findFigureAt=getFigure().findFigureAt(figureLocation.x,figureLocation.y);
    if (findFigureAt != null && findFigureAt instanceof IWidgetCell) {
      directEditManager=new PigMapNodeDirectEditManager(this,new PigMapNodeCellEditorLocator((Figure)findFigureAt));
      directEditManager.show();
    }
    if (directEditManager != null) {
      if (findFigureAt != null && findFigureAt instanceof FilterTextArea) {
        if (figure.containsPoint(figureLocation)) {
          directEditManager.show();
          ((PigMapGraphicViewer)getViewer()).getMapperManager().setCurrentDirectEditManager(directEditManager);
        }
      }
    }
  }
}
Program: 124994
Project: 124994
Buggy source:
/** 
 * When clicking the button named "Monitoring", this method will be invoked.
 */
public void doMonitoringBtnAction(){
  String oozieURL=getOozieEndPoint();
  if (oozieURL == null || "String_Node_Str".equals(oozieURL) || !LinkUtils.isRemoteFile(oozieURL)) {
    MessageDialog.openWarning(executeJobComposite.getShell(),TOozieOutputMessages.MSG_WARNING_URL_TITLE,TOozieOutputMessages.MSG_WARNING_URL_NOTVALID);
  }
 else {
    try {
      IWorkbenchBrowserSupport support=PlatformUI.getWorkbench().getBrowserSupport();
      IWebBrowser browser=support.getExternalBrowser();
      browser.openURL(new URL(oozieURL));
    }
 catch (    PartInitException e) {
    }
catch (    MalformedURLException e) {
    }
  }
}

Fixed version (ground truth):
/** 
 * When clicking the button named "Monitoring", this method will be invoked.
 */
public void doMonitoringBtnAction(){
  String oozieURL=getOozieEndPoint();
  if (oozieURL == null || "String_Node_Str".equals(oozieURL) || !oozieURL.startsWith("String_Node_Str")) {
    MessageDialog.openWarning(executeJobComposite.getShell(),TOozieOutputMessages.MSG_WARNING_URL_TITLE,TOozieOutputMessages.MSG_WARNING_URL_NOTVALID);
  }
 else {
    try {
      IWorkbenchBrowserSupport support=PlatformUI.getWorkbench().getBrowserSupport();
      IWebBrowser browser=support.getExternalBrowser();
      browser.openURL(new URL(oozieURL));
    }
 catch (    PartInitException e) {
    }
catch (    MalformedURLException e) {
    }
  }
}
Program: 124995
Project: 124995
Buggy source:
public void widgetSelected(SelectionEvent event){
  HDFSConnectionBean connection=getHDFSConnectionBean();
  if (checkHDFSConnection(connection)) {
    Command command=createCommand(event,connection);
    executeCommand(command);
  }
}

Fixed version (ground truth):
@Override public void widgetSelected(SelectionEvent event){
  HDFSConnectionBean connection=getHDFSConnectionBean();
  if (checkHDFSConnection(connection)) {
    Command command=createCommand(event,connection);
    executeCommand(command);
  }
}
Program: 124996
Project: 124996
Buggy source:
protected boolean checkHDFSConnection(final HDFSConnectionBean connection){
  final boolean[] result=new boolean[]{true};
  IRunnableWithProgress runnableWithProgress=new IRunnableWithProgress(){
    public void run(    IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
      monitor.beginTask(Messages.getString("String_Node_Str"),IProgressMonitor.UNKNOWN);
      Object dfs=null;
      try {
        dfs=HadoopOperationManager.getInstance().getDFS(connection);
      }
 catch (      Exception e) {
        ExceptionHandler.process(e);
      }
 finally {
        monitor.done();
      }
      if (dfs == null) {
        PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable(){
          @Override public void run(){
            String mainMsg=Messages.getString("String_Node_Str");
            String detailMsg=Messages.getString("String_Node_Str",connection.getNameNodeURI());
            new ErrorDialogWidthDetailArea(PlatformUI.getWorkbench().getDisplay().getActiveShell(),HDFSPlugin.PLUGIN_ID,mainMsg,detailMsg);
            result[0]=false;
            return;
          }
        }
);
      }
    }
  }
;
  ProgressMonitorDialog dialog=new ProgressMonitorDialog(PlatformUI.getWorkbench().getDisplay().getActiveShell());
  try {
    dialog.run(true,true,runnableWithProgress);
  }
 catch (  Exception e) {
    result[0]=false;
    ExceptionHandler.process(e);
  }
  return result[0];
}

Fixed version (ground truth):
protected boolean checkHDFSConnection(final HDFSConnectionBean connection){
  final boolean[] result=new boolean[]{true};
  IRunnableWithProgress runnableWithProgress=new IRunnableWithProgress(){
    @Override public void run(    IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
      monitor.beginTask(Messages.getString("String_Node_Str"),IProgressMonitor.UNKNOWN);
      Object dfs=null;
      try {
        dfs=HadoopOperationManager.getInstance().getDFS(connection);
      }
 catch (      Exception e) {
        ExceptionHandler.process(e);
      }
 finally {
        monitor.done();
      }
      if (dfs == null) {
        PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable(){
          @Override public void run(){
            String mainMsg=Messages.getString("String_Node_Str");
            String detailMsg=Messages.getString("String_Node_Str",connection.getNameNodeURI());
            new ErrorDialogWidthDetailArea(PlatformUI.getWorkbench().getDisplay().getActiveShell(),HDFSPlugin.PLUGIN_ID,mainMsg,detailMsg);
            result[0]=false;
            return;
          }
        }
);
      }
    }
  }
;
  ProgressMonitorDialog dialog=new ProgressMonitorDialog(PlatformUI.getWorkbench().getDisplay().getActiveShell());
  try {
    dialog.run(true,true,runnableWithProgress);
  }
 catch (  Exception e) {
    result[0]=false;
    ExceptionHandler.process(e);
  }
  return result[0];
}
Program: 124997
Project: 124997
Buggy source:
public void widgetDefaultSelected(SelectionEvent e){
}

Fixed version (ground truth):
@Override public void widgetDefaultSelected(SelectionEvent e){
}
Program: 124998
Project: 124998
Buggy source:
public void propertyChange(PropertyChangeEvent arg0){
}

Fixed version (ground truth):
@Override public void propertyChange(PropertyChangeEvent arg0){
}
Program: 124999
Project: 124999
Buggy source:
public abstract void refresh();

Fixed version (ground truth):
@Override public abstract void refresh();
Program: 125001
Project: 125001
Buggy source:
public void doSelectComboAction(){
  Combo selectCombo=executeJobComposite.getServerCombo();
  Text repositaryText=executeJobComposite.getRepositoryText();
  Button editBtn=executeJobComposite.getBtnEdit();
  hideSettingBtn();
  if (selectCombo.getSelectionIndex() == FROM_REPOSITORY && repositaryText.getText().length() == 0) {
    editBtn.setEnabled(false);
  }
  if (selectCombo.getSelectionIndex() == FROM_PREFERNCES) {
    executeJobComposite.setRepositoryValue("String_Node_Str");
    repositaryText.setText("String_Node_Str");
    updateBtnButtonEnabledOrNot();
  }
}

Fixed version (ground truth):
public void doSelectComboAction(){
  Combo selectCombo=executeJobComposite.getServerCombo();
  Text repositaryText=executeJobComposite.getRepositoryText();
  Button editBtn=executeJobComposite.getBtnEdit();
  hideSettingBtn();
  if (selectCombo.getSelectionIndex() == FROM_REPOSITORY && executeJobComposite.getRepositoryTextValue().length() == 0) {
    repositaryText.setText("String_Node_Str");
    editBtn.setEnabled(false);
  }
  if (selectCombo.getSelectionIndex() == FROM_PREFERNCES) {
    executeJobComposite.setRepositoryValue("String_Node_Str");
    repositaryText.setText("String_Node_Str");
    updateBtnButtonEnabledOrNot();
  }
}
Program: 125002
Project: 125002
Buggy source:
private void createCenterContents(Composite parent){
  Label pathLbl=new Label(parent,SWT.NONE);
  pathLbl.setText(TOozieUIConstants.OOZIE_LBL_PATH);
  GridDataFactory.fillDefaults().grab(false,false).indent(SWT.DEFAULT,10).align(SWT.BEGINNING,SWT.CENTER).applyTo(pathLbl);
  pathText=new Text(parent,SWT.BORDER);
  pathText.setText(getPathValue() == null ? "String_Node_Str" : getPathValue());
  GridDataFactory.fillDefaults().span(3,1).grab(true,false).indent(-70,10).hint(SWT.DEFAULT,20).applyTo(pathText);
  btnEdit=new Button(parent,SWT.PUSH);
  btnEdit.setImage(ImageProvider.getImage(TOozieImages.IMG_DOTS));
  GridDataFactory.fillDefaults().span(1,1).grab(true,false).indent(SWT.DEFAULT,10).hint(30,30).align(SWT.BEGINNING,SWT.CENTER).applyTo(btnEdit);
  monitoringBtn=new Button(parent,SWT.NONE);
  monitoringBtn.setText(TOozieUIConstants.OOZIE_BTN_MONITOR);
  monitoringBtn.setImage(ImageProvider.getImage(TOozieImages.IMG_MONITOING));
  GridDataFactory.fillDefaults().span(1,1).grab(false,false).indent(SWT.DEFAULT,10).hint(computeBtnTxtSize(settingBtn).x + 60,30).align(SWT.END,SWT.CENTER).applyTo(monitoringBtn);
  monitoringBtn.setVisible(TOozieCommonUtils.isWindowsOS());
  regPathTextListener();
  regBtnEditListener();
  regMonitoringBtnListener();
}

Fixed version (ground truth):
private void createCenterContents(Composite parent){
  Label pathLbl=new Label(parent,SWT.NONE);
  pathLbl.setText(TOozieUIConstants.OOZIE_LBL_PATH);
  GridDataFactory.fillDefaults().grab(false,false).indent(SWT.DEFAULT,10).align(SWT.BEGINNING,SWT.CENTER).applyTo(pathLbl);
  pathText=new Text(parent,SWT.SINGLE | SWT.BORDER);
  Font font=new Font(Display.getCurrent(),"String_Node_Str",12,SWT.NORMAL);
  pathText.setFont(font);
  pathText.setText(getPathValue() == null ? "String_Node_Str" : getPathValue());
  GridDataFactory.fillDefaults().span(3,1).grab(true,false).indent(-70,10).hint(SWT.DEFAULT,20).applyTo(pathText);
  btnEdit=new Button(parent,SWT.PUSH);
  btnEdit.setImage(ImageProvider.getImage(TOozieImages.IMG_DOTS));
  GridDataFactory.fillDefaults().span(1,1).grab(true,false).indent(SWT.DEFAULT,10).hint(30,30).align(SWT.BEGINNING,SWT.CENTER).applyTo(btnEdit);
  monitoringBtn=new Button(parent,SWT.NONE);
  monitoringBtn.setText(TOozieUIConstants.OOZIE_BTN_MONITOR);
  monitoringBtn.setImage(ImageProvider.getImage(TOozieImages.IMG_MONITOING));
  GridDataFactory.fillDefaults().span(1,1).grab(false,false).indent(SWT.DEFAULT,10).hint(computeBtnTxtSize(settingBtn).x + 60,30).align(SWT.END,SWT.CENTER).applyTo(monitoringBtn);
  monitoringBtn.setVisible(TOozieCommonUtils.isWindowsOS());
  regPathTextListener();
  regBtnEditListener();
  regMonitoringBtnListener();
}