nus-yam/ex-repair huggingface dataset:
Program: 126164
Project: 126164
Buggy source:
/** 
 * This method is invoked when an item of Hive mode is selected. If the selected is Embedded, it invokes  {@link #handleEmbeddedMode()},   {@link #handleStandaloneMode()} otherwise. Then it invokes the method{@link #doUpdateConnection()} to update connection. Added by Marvin Wang on Aug. 3, 2012.
 */
protected void doHiveModeModify(){
  int distributionIndex=distributionCombo.getSelectionIndex();
  int hiveVersionIndex=hiveVersionCombo.getSelectionIndex();
  int hiveModeIndex=hiveModeCombo.getSelectionIndex();
  int hiveServerIndex=hiveServerVersionCombo.getSelectionIndex();
  boolean isEmbeddedMode=HiveConnUtils.isEmbeddedMode(distributionIndex,hiveVersionIndex,hiveModeIndex,hiveServerIndex);
  getConnection().setURL(getStringConnection());
  if (isEmbeddedMode) {
    handleUIWhenEmbeddedModeSelected();
  }
 else {
    handleUIWhenStandaloneModeSelected();
  }
  fillDefaultsWhenHiveModeChanged(isEmbeddedMode);
  doUpdateConnection();
}

Fixed version (ground truth):
/** 
 * This method is invoked when an item of Hive mode is selected. If the selected is Embedded, it invokes  {@link #handleEmbeddedMode()},   {@link #handleStandaloneMode()} otherwise. Then it invokes the method{@link #doUpdateConnection()} to update connection. Added by Marvin Wang on Aug. 3, 2012.
 */
protected void doHiveModeModify(){
  int distributionIndex=distributionCombo.getSelectionIndex();
  int hiveVersionIndex=hiveVersionCombo.getSelectionIndex();
  int hiveModeIndex=hiveModeCombo.getSelectionIndex();
  int hiveServerIndex=getRealHiveServerIndex(distributionIndex,hiveVersionIndex,hiveServerVersionCombo.getSelectionIndex());
  boolean isEmbeddedMode=HiveConnUtils.isEmbeddedMode(distributionIndex,hiveVersionIndex,hiveModeIndex,hiveServerIndex);
  getConnection().setURL(getStringConnection());
  if (isEmbeddedMode) {
    handleUIWhenEmbeddedModeSelected();
  }
 else {
    handleUIWhenStandaloneModeSelected();
  }
  fillDefaultsWhenHiveModeChanged(isEmbeddedMode);
  doUpdateConnection();
}
Program: 126165
Project: 126165
Buggy source:
protected void doHiveServerSelected(){
  if (!isContextMode()) {
    modifyFieldValue();
    getConnection().getParameters().put(ConnParameterKeys.HIVE_SERVER_VERSION,HiveServerVersionUtils.extractKey(hiveServerVersionCombo.getSelectionIndex()));
  }
  int distributionIndex=distributionCombo.getSelectionIndex();
  int currSelectedIndex=hiveVersionCombo.getSelectionIndex();
  updateHiveServerAndMakeSelection(distributionIndex,currSelectedIndex);
}

Fixed version (ground truth):
protected void doHiveServerSelected(){
  int distributionIndex=distributionCombo.getSelectionIndex();
  int currSelectedIndex=hiveVersionCombo.getSelectionIndex();
  if (!isContextMode()) {
    modifyFieldValue();
    getConnection().getParameters().put(ConnParameterKeys.HIVE_SERVER_VERSION,HiveServerVersionUtils.extractKey(getRealHiveServerIndex(distributionIndex,currSelectedIndex,hiveServerVersionCombo.getSelectionIndex())));
  }
  updateHiveServerAndMakeSelection(distributionIndex,currSelectedIndex);
}
Program: 126166
Project: 126166
Buggy source:
public ELibraryInstallStatus getStatus(){
  if (status == ELibraryInstallStatus.UNKNOWN) {
    ILibraryManagerService libManagerService=(ILibraryManagerService)GlobalServiceRegister.getDefault().getService(ILibraryManagerService.class);
    Set<String> existLibraries=libManagerService.list();
    if (existLibraries.contains(getModuleName())) {
      status=ELibraryInstallStatus.INSTALLED;
    }
 else {
      String localMavenUri=getMavenUri();
      localMavenUri.replace("String_Node_Str","String_Node_Str" + MavenConstants.LOCAL_RESOLUTION_URL + "String_Node_Str");
      try {
        mavenResolver.resolve(localMavenUri);
        status=ELibraryInstallStatus.INSTALLED;
      }
 catch (      IOException e) {
        status=ELibraryInstallStatus.NOT_INSTALLED;
      }
    }
  }
  return this.status;
}

Fixed version (ground truth):
public ELibraryInstallStatus getStatus(){
  if (status == ELibraryInstallStatus.UNKNOWN) {
    ILibraryManagerService libManagerService=(ILibraryManagerService)GlobalServiceRegister.getDefault().getService(ILibraryManagerService.class);
    Set<String> existLibraries=libManagerService.list();
    if (existLibraries.contains(getModuleName())) {
      status=ELibraryInstallStatus.INSTALLED;
    }
 else {
      String localMavenUri=getMavenUri().replace("String_Node_Str","String_Node_Str" + MavenConstants.LOCAL_RESOLUTION_URL + "String_Node_Str");
      try {
        mavenResolver.resolve(localMavenUri);
        status=ELibraryInstallStatus.INSTALLED;
      }
 catch (      IOException e) {
        status=ELibraryInstallStatus.NOT_INSTALLED;
      }
    }
  }
  return this.status;
}
Program: 126168
Project: 126168
Buggy source:
@Override public void updateUIInThreadIfThreadFinally(){
  if (!previewButton.isDisposed()) {
    previewButton.setText(Messages.getString("String_Node_Str"));
    previewButton.setEnabled(true);
  }
}

Fixed version (ground truth):
@Override public void updateUIInThreadIfThreadFinally(){
  checkFieldsValue();
  if (!previewButton.isDisposed()) {
    previewButton.setText(Messages.getString("String_Node_Str"));
    previewButton.setEnabled(true);
  }
}
Program: 126169
Project: 126169
Buggy source:
@Override public void postProcessCancle(){
  previewButton.setEnabled(false);
}

Fixed version (ground truth):
@Override public void postProcessCancle(){
  checkFieldsValue();
  previewButton.setEnabled(false);
}
Program: 126171
Project: 126171
Buggy source:
public void run(){
  handleErrorOutput(outputComposite,tabFolder,outputTabItem);
}

Fixed version (ground truth):
@Override public void run(){
  handleErrorOutput(outputComposite,tabFolder,outputTabItem);
}
Program: 126173
Project: 126173
Buggy source:
@Override public void updateUIInThreadIfThreadFinally(){
  if (!previewButton.isDisposed()) {
    previewButton.setText(Messages.getString("String_Node_Str"));
    previewButton.setEnabled(true);
  }
}

Fixed version (ground truth):
@Override public void updateUIInThreadIfThreadFinally(){
  checkFieldsValue();
  if (!previewButton.isDisposed()) {
    previewButton.setText(Messages.getString("String_Node_Str"));
    previewButton.setEnabled(true);
  }
}
Program: 126174
Project: 126174
Buggy source:
public void refresh(){
  refreshPreview();
}

Fixed version (ground truth):
@Override public void refresh(){
  refreshPreview();
}
Program: 126175
Project: 126175
Buggy source:
/** 
 * add Controls of Group Delimited File Settings.
 */
private void addFieldsListenersGroupDelimitedFileSettings(){
  encodingCombo.addModifyListener(new ModifyListener(){
    public void modifyText(    final ModifyEvent e){
      if (!isContextMode()) {
        getConnection().setEncoding(encodingCombo.getText());
        checkFieldsValue();
      }
    }
  }
);
  advanceSeparatorCheckbox.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      boolean select=advanceSeparatorCheckbox.getSelection();
      getConnection().setAdvancedSpearator(select);
      if (!isContextMode()) {
        decimalSeparatorText.setEnabled(select);
        thousandSeparaotrText.setEnabled(select);
        getConnection().setThousandSeparator(thousandSeparaotrText.getText());
        getConnection().setDecimalSeparator(decimalSeparatorText.getText());
        checkFieldsValue();
      }
    }
  }
);
  decimalSeparatorText.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      if (!isContextMode()) {
        getConnection().setDecimalSeparator(decimalSeparatorText.getText());
        checkFieldsValue();
      }
    }
  }
);
  thousandSeparaotrText.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      if (!isContextMode()) {
        getConnection().setThousandSeparator(thousandSeparaotrText.getText());
        checkFieldsValue();
      }
    }
  }
);
}

Fixed version (ground truth):
/** 
 * add Controls of Group Delimited File Settings.
 */
private void addFieldsListenersGroupDelimitedFileSettings(){
  encodingCombo.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      if (!isContextMode()) {
        getConnection().setEncoding(encodingCombo.getText());
        checkFieldsValue();
      }
    }
  }
);
  advanceSeparatorCheckbox.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      boolean select=advanceSeparatorCheckbox.getSelection();
      getConnection().setAdvancedSpearator(select);
      if (!isContextMode()) {
        decimalSeparatorText.setEnabled(select);
        thousandSeparaotrText.setEnabled(select);
        getConnection().setThousandSeparator(thousandSeparaotrText.getText());
        getConnection().setDecimalSeparator(decimalSeparatorText.getText());
        checkFieldsValue();
      }
    }
  }
);
  decimalSeparatorText.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    ModifyEvent e){
      if (!isContextMode()) {
        getConnection().setDecimalSeparator(decimalSeparatorText.getText());
        checkFieldsValue();
      }
    }
  }
);
  thousandSeparaotrText.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    ModifyEvent e){
      if (!isContextMode()) {
        getConnection().setThousandSeparator(thousandSeparaotrText.getText());
        checkFieldsValue();
      }
    }
  }
);
}
Program: 126176
Project: 126176
Buggy source:
@Override public void postProcessCancle(){
  previewButton.setEnabled(false);
}

Fixed version (ground truth):
@Override public void postProcessCancle(){
  checkFieldsValue();
  previewButton.setEnabled(false);
}
Program: 126177
Project: 126177
Buggy source:
public void modifyText(ModifyEvent e){
  if (!isContextMode()) {
    getConnection().setThousandSeparator(thousandSeparaotrText.getText());
    checkFieldsValue();
  }
}

Fixed version (ground truth):
@Override public void modifyText(ModifyEvent e){
  if (!isContextMode()) {
    getConnection().setThousandSeparator(thousandSeparaotrText.getText());
    checkFieldsValue();
  }
}
Program: 126178
Project: 126178
Buggy source:
@Override public void updateUIInThreadIfThreadIsNotCanceled(){
  if (previewInformationLabel.isDisposed()) {
    return;
  }
  previewInformationLabel.setText(previewInformationLabelMsg);
  if (getException() != null) {
    previewInformationLabel.setText("String_Node_Str" + Messages.getString("String_Node_Str"));
    Display.getDefault().asyncExec(new Runnable(){
      public void run(){
        handleErrorOutput(outputComposite,tabFolder,outputTabItem);
      }
    }
);
    return;
  }
  if (csvArray == null) {
    previewInformationLabel.setText("String_Node_Str" + Messages.getString("String_Node_Str"));
  }
 else {
    previewInformationLabel.setText("String_Node_Str" + Messages.getString("String_Node_Str"));
    excelProcessPreview.refreshTablePreview(csvArray,getConnection().isFirstLineCaption(),processDescription);
    previewInformationLabel.setText("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void updateUIInThreadIfThreadIsNotCanceled(){
  if (previewInformationLabel.isDisposed()) {
    return;
  }
  previewInformationLabel.setText(previewInformationLabelMsg);
  if (getException() != null) {
    previewInformationLabel.setText("String_Node_Str" + Messages.getString("String_Node_Str"));
    Display.getDefault().asyncExec(new Runnable(){
      @Override public void run(){
        handleErrorOutput(outputComposite,tabFolder,outputTabItem);
      }
    }
);
    return;
  }
  if (csvArray == null) {
    previewInformationLabel.setText("String_Node_Str" + Messages.getString("String_Node_Str"));
  }
 else {
    previewInformationLabel.setText("String_Node_Str" + Messages.getString("String_Node_Str"));
    excelProcessPreview.refreshTablePreview(csvArray,getConnection().isFirstLineCaption(),processDescription);
    previewInformationLabel.setText("String_Node_Str");
  }
}
Program: 126179
Project: 126179
Buggy source:
private void addFieldsListenersDieOnError(){
  firstColumnText.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      if (!isContextMode()) {
        getConnection().setFirstColumn(firstColumnText.getText());
        checkFieldsValue();
      }
    }
  }
);
  lastColumnText.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      if (!isContextMode()) {
        getConnection().setLastColumn(lastColumnText.getText());
        checkFieldsValue();
      }
    }
  }
);
}

Fixed version (ground truth):
private void addFieldsListenersDieOnError(){
  firstColumnText.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    ModifyEvent e){
      if (!isContextMode()) {
        getConnection().setFirstColumn(firstColumnText.getText());
        checkFieldsValue();
      }
    }
  }
);
  lastColumnText.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    ModifyEvent e){
      if (!isContextMode()) {
        getConnection().setLastColumn(lastColumnText.getText());
        checkFieldsValue();
      }
    }
  }
);
}
Program: 126180
Project: 126180
Buggy source:
@Override public boolean preProcessStart(){
  previewButton.setText(Messages.getString("String_Node_Str"));
  clearPreview();
  String filePath=getConnection().getFilePath();
  LdifFileConnection originalValueConnection=null;
  if (isContextMode() && getContextModeManager() != null) {
    filePath=getContextModeManager().getOriginalValue(getConnection().getFilePath());
    filePath=TalendQuoteUtils.removeQuotes(filePath);
    originalValueConnection=OtherConnectionContextUtils.cloneOriginalValueLdifFileConnection(getConnection(),getContextModeManager().getSelectedContextType());
  }
  if (filePath == null || filePath.equals("String_Node_Str")) {
    previewInformationLabel.setText("String_Node_Str" + Messages.getString("String_Node_Str"));
    return false;
  }
  if (!checkFieldsValue()) {
    previewInformationLabel.setText("String_Node_Str" + Messages.getString("String_Node_Str"));
    return false;
  }
  previewInformationLabel.setText("String_Node_Str" + Messages.getString("String_Node_Str"));
  if (originalValueConnection == null) {
    originalValueConnection=getConnection();
  }
  TableItem[] items=tableEditorView.getTableViewerCreator().getTable().getItems();
  for (  TableItem item : items) {
    if (item.getChecked() && !getConnection().getValue().contains(item.getText())) {
      getConnection().getValue().add(item.getText());
    }
  }
  processDescription=getProcessDescription(originalValueConnection);
  return true;
}

Fixed version (ground truth):
@Override public boolean preProcessStart(){
  previewButton.setText(Messages.getString("String_Node_Str"));
  clearPreview();
  String filePath=getConnection().getFilePath();
  LdifFileConnection originalValueConnection=null;
  if (isContextMode() && getContextModeManager() != null) {
    filePath=getContextModeManager().getOriginalValue(getConnection().getFilePath());
    filePath=TalendQuoteUtils.removeQuotes(filePath);
    originalValueConnection=OtherConnectionContextUtils.cloneOriginalValueLdifFileConnection(getConnection(),getContextModeManager().getSelectedContextType());
  }
  if (filePath == null || filePath.equals("String_Node_Str")) {
    previewInformationLabel.setText("String_Node_Str" + Messages.getString("String_Node_Str"));
    return false;
  }
  if (!checkFieldsValue()) {
    previewInformationLabel.setText("String_Node_Str" + Messages.getString("String_Node_Str"));
    return false;
  }
  previewInformationLabel.setText("String_Node_Str" + Messages.getString("String_Node_Str"));
  if (originalValueConnection == null) {
    originalValueConnection=getConnection();
  }
  TableItem[] items=tableEditorView.getTableViewerCreator().getTable().getItems();
  for (  TableItem item : items) {
    if (item.getChecked() && !getConnection().getValue().contains(item.getText())) {
      getConnection().getValue().add(item.getText());
    }
  }
  processDescription=getProcessDescription(originalValueConnection);
  updateStatus(IStatus.ERROR,null);
  return true;
}
Program: 126181
Project: 126181
Buggy source:
@Override public void updateUIInThreadIfThreadFinally(){
  if (!previewButton.isDisposed()) {
    previewButton.setText(Messages.getString("String_Node_Str"));
    previewButton.setEnabled(true);
  }
}

Fixed version (ground truth):
@Override public void updateUIInThreadIfThreadFinally(){
  checkFieldsValue();
  if (!previewButton.isDisposed()) {
    previewButton.setText(Messages.getString("String_Node_Str"));
    previewButton.setEnabled(true);
  }
}
Program: 126182
Project: 126182
Buggy source:
@Override public void postProcessCancle(){
  previewButton.setEnabled(false);
}

Fixed version (ground truth):
@Override public void postProcessCancle(){
  checkFieldsValue();
  previewButton.setEnabled(false);
}
Program: 126185
Project: 126185
Buggy source:
public void run(){
  handleErrorOutput(outputComposite,tabFolder,outputTabItem);
}

Fixed version (ground truth):
@Override public void run(){
  handleErrorOutput(outputComposite,tabFolder,outputTabItem);
}
Program: 126186
Project: 126186
Buggy source:
public void updateUIInThreadIfThreadIsCanceled(){
  if (!previewInformationLabel.isDisposed()) {
    previewInformationLabel.setText("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void updateUIInThreadIfThreadIsCanceled(){
  if (!previewInformationLabel.isDisposed()) {
    previewInformationLabel.setText("String_Node_Str");
  }
}
Program: 126187
Project: 126187
Buggy source:
public boolean preProcessStart(){
  previewButton.setText(Messages.getString("String_Node_Str"));
  clearPreview();
  String filePath=getConnection().getFilePath();
  PositionalFileConnection originalValueConnection=null;
  if (isContextMode()) {
    boolean found=false;
    ContextType contextType=ConnectionContextHelper.getContextTypeForContextMode(getShell(),getConnection(),getConnection().getContextName(),false);
    if (contextType != null) {
      if (getContextModeManager() != null) {
        getContextModeManager().setSelectedContextType(contextType);
        filePath=getContextModeManager().getOriginalValue(getConnection().getFilePath());
        filePath=TalendQuoteUtils.removeQuotes(filePath);
        found=true;
      }
      originalValueConnection=(PositionalFileConnection)FileConnectionContextUtils.cloneOriginalValueConnection(getConnection(),contextType);
    }
    if (!found) {
      filePath=null;
    }
  }
  if (filePath == null || filePath.equals("String_Node_Str")) {
    previewInformationLabel.setText("String_Node_Str" + Messages.getString("String_Node_Str"));
    return false;
  }
  if (!checkFieldsValue()) {
    previewInformationLabel.setText("String_Node_Str" + Messages.getString("String_Node_Str"));
    return false;
  }
  previewInformationLabel.setText("String_Node_Str" + Messages.getString("String_Node_Str"));
  if (originalValueConnection == null) {
    originalValueConnection=getConnection();
  }
  processDescription=getProcessDescription(originalValueConnection);
  return true;
}

Fixed version (ground truth):
@Override public boolean preProcessStart(){
  previewButton.setText(Messages.getString("String_Node_Str"));
  clearPreview();
  String filePath=getConnection().getFilePath();
  PositionalFileConnection originalValueConnection=null;
  if (isContextMode()) {
    boolean found=false;
    ContextType contextType=ConnectionContextHelper.getContextTypeForContextMode(getShell(),getConnection(),getConnection().getContextName(),false);
    if (contextType != null) {
      if (getContextModeManager() != null) {
        getContextModeManager().setSelectedContextType(contextType);
        filePath=getContextModeManager().getOriginalValue(getConnection().getFilePath());
        filePath=TalendQuoteUtils.removeQuotes(filePath);
        found=true;
      }
      originalValueConnection=(PositionalFileConnection)FileConnectionContextUtils.cloneOriginalValueConnection(getConnection(),contextType);
    }
    if (!found) {
      filePath=null;
    }
  }
  if (filePath == null || filePath.equals("String_Node_Str")) {
    previewInformationLabel.setText("String_Node_Str" + Messages.getString("String_Node_Str"));
    return false;
  }
  if (!checkFieldsValue()) {
    previewInformationLabel.setText("String_Node_Str" + Messages.getString("String_Node_Str"));
    return false;
  }
  previewInformationLabel.setText("String_Node_Str" + Messages.getString("String_Node_Str"));
  if (originalValueConnection == null) {
    originalValueConnection=getConnection();
  }
  processDescription=getProcessDescription(originalValueConnection);
  updateStatus(IStatus.ERROR,null);
  return true;
}
Program: 126188
Project: 126188
Buggy source:
public void updateUIInThreadIfThreadFinally(){
  if (!previewButton.isDisposed()) {
    previewButton.setText(Messages.getString("String_Node_Str"));
    previewButton.setEnabled(true);
  }
}

Fixed version (ground truth):
@Override public void updateUIInThreadIfThreadFinally(){
  checkFieldsValue();
  if (!previewButton.isDisposed()) {
    previewButton.setText(Messages.getString("String_Node_Str"));
    previewButton.setEnabled(true);
  }
}
Program: 126189
Project: 126189
Buggy source:
protected void collectConnParams(){
  super.collectConnParams();
  addContextParams(EFileParamName.RowSeparator,true);
  addContextParams(EFileParamName.FieldSeparator,true);
  addContextParams(EFileParamName.Header,rowsToSkipHeaderCheckboxCombo.isChecked());
  addContextParams(EFileParamName.Footer,rowsToSkipFooterCheckboxCombo.isChecked());
  addContextParams(EFileParamName.Limit,rowsToSkipLimitCheckboxCombo.isChecked());
}

Fixed version (ground truth):
@Override protected void collectConnParams(){
  super.collectConnParams();
  addContextParams(EFileParamName.RowSeparator,true);
  addContextParams(EFileParamName.FieldSeparator,true);
  addContextParams(EFileParamName.Header,rowsToSkipHeaderCheckboxCombo.isChecked());
  addContextParams(EFileParamName.Footer,rowsToSkipFooterCheckboxCombo.isChecked());
  addContextParams(EFileParamName.Limit,rowsToSkipLimitCheckboxCombo.isChecked());
}
Program: 126190
Project: 126190
Buggy source:
public void refresh(){
  refreshPreview();
}

Fixed version (ground truth):
@Override public void refresh(){
  refreshPreview();
}
Program: 126191
Project: 126191
Buggy source:
public void postProcessCancle(){
  previewButton.setEnabled(false);
}

Fixed version (ground truth):
@Override public void postProcessCancle(){
  checkFieldsValue();
  previewButton.setEnabled(false);
}
Program: 126192
Project: 126192
Buggy source:
public void nonUIProcessInThread(){
  try {
    csvArray=ShadowProcessHelper.getCsvArray(processDescription,"String_Node_Str",true);
  }
 catch (  Exception e) {
    setException(e);
    log.error(Messages.getString("String_Node_Str") + "String_Node_Str" + e.getMessage());
  }
}

Fixed version (ground truth):
@Override public void nonUIProcessInThread(){
  try {
    csvArray=ShadowProcessHelper.getCsvArray(processDescription,"String_Node_Str",true);
  }
 catch (  Exception e) {
    setException(e);
    log.error(Messages.getString("String_Node_Str") + "String_Node_Str" + e.getMessage());
  }
}
Program: 126193
Project: 126193
Buggy source:
public void modifyText(final ModifyEvent e){
  if (!isContextMode()) {
    getConnection().setRowSeparatorValue(rowSeparatorText.getText());
    checkFieldsValue();
  }
}

Fixed version (ground truth):
@Override public void modifyText(final ModifyEvent e){
  if (!isContextMode()) {
    getConnection().setRowSeparatorValue(rowSeparatorText.getText());
    checkFieldsValue();
  }
}
Program: 126194
Project: 126194
Buggy source:
public void updateUIInThreadIfThreadIsNotCanceled(){
  if (previewInformationLabel.isDisposed()) {
    return;
  }
  if (getException() != null) {
    previewInformationLabel.setText("String_Node_Str" + Messages.getString("String_Node_Str"));
    Display.getDefault().syncExec(new Runnable(){
      public void run(){
        handleErrorOutput(outputComposite,tabFolder,outputTabItem);
      }
    }
);
    return;
  }
  if (csvArray == null) {
    previewInformationLabel.setText("String_Node_Str" + Messages.getString("String_Node_Str"));
    fileManager.clearTablePreview();
  }
 else {
    previewInformationLabel.setText("String_Node_Str" + Messages.getString("String_Node_Str"));
    fileManager.refreshTablePreview(csvArray,firstRowIsCaptionCheckbox.getSelection());
    previewInformationLabel.setText("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void updateUIInThreadIfThreadIsNotCanceled(){
  if (previewInformationLabel.isDisposed()) {
    return;
  }
  if (getException() != null) {
    previewInformationLabel.setText("String_Node_Str" + Messages.getString("String_Node_Str"));
    Display.getDefault().syncExec(new Runnable(){
      @Override public void run(){
        handleErrorOutput(outputComposite,tabFolder,outputTabItem);
      }
    }
);
    return;
  }
  if (csvArray == null) {
    previewInformationLabel.setText("String_Node_Str" + Messages.getString("String_Node_Str"));
    fileManager.clearTablePreview();
  }
 else {
    previewInformationLabel.setText("String_Node_Str" + Messages.getString("String_Node_Str"));
    fileManager.refreshTablePreview(csvArray,firstRowIsCaptionCheckbox.getSelection());
    previewInformationLabel.setText("String_Node_Str");
  }
}
Program: 126195
Project: 126195
Buggy source:
/** 
 * Constructor.
 * @param parent
 * @param style
 */
public ContextNebulaGridComposite(Composite parent,IContextModelManager manager){
  super(parent,SWT.NONE);
  modelManager=manager;
  buttonList=new ArrayList<Button>();
  this.helper=new ContextManagerHelper(manager.getContextManager());
  this.setBackground(parent.getBackground());
  this.setLayout(GridLayoutFactory.swtDefaults().spacing(0,0).create());
  initializeUI();
  CoreUIPlugin.setCSSClass(this,this.getClass().getSimpleName());
}

Fixed version (ground truth):
/** 
 * Constructor.
 * @param parent
 * @param style
 */
public ContextNebulaGridComposite(Composite parent,IContextModelManager manager){
  super(parent,SWT.NONE);
  modelManager=manager;
  buttonList=new ArrayList<Button>();
  this.helper=new ContextManagerHelper(manager.getContextManager());
  this.setLayout(GridLayoutFactory.swtDefaults().spacing(0,0).create());
  initializeUI();
  if (modelManager instanceof ContextComposite && ((ContextComposite)modelManager).isRepositoryContext()) {
    this.setBackground(parent.getBackground());
  }
 else {
    CoreUIPlugin.setCSSClass(this,this.getClass().getSimpleName());
  }
}
Program: 126197
Project: 126197
Buggy source:
public ILoginTask[] getAllCommandlineTaskListInstance(){
  List<LoginTask> commandlineTask=new ArrayList<LoginTask>();
  ILoginTask[] allTask=getAllTaskListInstance();
  for (  ILoginTask task : allTask) {
    if (task.isCommandlineTask()) {
      commandlineTask.add((LoginTask)task);
    }
  }
  return getAllRunnables(commandlineTask);
}

Fixed version (ground truth):
public ILoginTask[] getAllCommandlineTaskListInstance(){
  List<ILoginTask> commandlineTask=new ArrayList<ILoginTask>();
  ILoginTask[] allTask=getAllTaskListInstance();
  for (  ILoginTask task : allTask) {
    if (task.isCommandlineTask()) {
      commandlineTask.add(task);
    }
  }
  return commandlineTask.toArray(new ILoginTask[0]);
}
Program: 126200
Project: 126200
Buggy source:
/** 
 * Some code generators use the BuildJobHandler to execute job in the studio. This method is used to correctly generate the stats code if stats are enabled within the studio.
 * @param monitor
 * @param stats
 * @param trace
 * @throws Exception
 */
public void generateJobFiles(IProgressMonitor monitor,boolean stats,boolean trace) throws Exception ;

Fixed version (ground truth):
public void generateJobFiles(IProgressMonitor monitor) throws Exception ;
Program: 126203
Project: 126203
Buggy source:
@Override String getUrlTemplate(EDatabaseVersion4Drivers version){
switch (version) {
case HIVE:
    return URL_HIVE_1_STANDALONE;
case HIVE_EMBEDDED:
  return URL_HIVE_1_TEMPLATE;
case HIVE_2_EMBEDDED:
return URL_HIVE_2_TEMPLATE;
case HIVE_2_STANDALONE:
return URL_HIVE_2_STANDALONE;
default :
return super.getUrlTemplate(version);
}
}

Fixed version (ground truth):
@Override String getUrlTemplate(EDatabaseVersion4Drivers version){
  if (version == null) {
    return super.getUrlTemplate(version);
  }
switch (version) {
case HIVE:
    return URL_HIVE_1_STANDALONE;
case HIVE_EMBEDDED:
  return URL_HIVE_1_TEMPLATE;
case HIVE_2_EMBEDDED:
return URL_HIVE_2_TEMPLATE;
case HIVE_2_STANDALONE:
return URL_HIVE_2_STANDALONE;
default :
return super.getUrlTemplate(version);
}
}
Program: 126205
Project: 126205
Buggy source:
private void setHidAuthenticationForHive(boolean hide){
  GridData hadoopData=(GridData)authenticationGrp.getLayoutData();
  hadoopData.exclude=hide;
  authenticationGrp.setVisible(!hide);
  authenticationGrp.setLayoutData(hadoopData);
  authenticationGrp.getParent().layout();
}

Fixed version (ground truth):
private void setHidAuthenticationForHive(boolean hide){
  if (!hide) {
    GridData keytabGridData=(GridData)useKeyTab.getLayoutData();
    GridData keytabDetailGridData=(GridData)keyTabComponent.getLayoutData();
    if (!isHiveEmbeddedMode()) {
      useKeyTab.setVisible(false);
      keyTabComponent.setVisible(false);
      keytabGridData.exclude=true;
      keytabDetailGridData.exclude=true;
      useKeyTab.setSelection(false);
      getConnection().getParameters().put(ConnParameterKeys.CONN_PARA_KEY_USEKEYTAB,"String_Node_Str");
    }
 else {
      boolean keytabCompositeVisible=useKeyTab.getSelection();
      useKeyTab.setVisible(true);
      keyTabComponent.setVisible(keytabCompositeVisible);
      keytabGridData.exclude=false;
      keytabDetailGridData.exclude=!keytabCompositeVisible;
    }
    useKeyTab.setLayoutData(keytabGridData);
    keyTabComponent.setLayoutData(keytabDetailGridData);
    useKeyTab.getParent().layout();
  }
  GridData hadoopData=(GridData)authenticationGrp.getLayoutData();
  hadoopData.exclude=hide;
  authenticationGrp.setVisible(!hide);
  authenticationGrp.setLayoutData(hadoopData);
  authenticationGrp.layout();
  authenticationGrp.getParent().layout();
}
Program: 126207
Project: 126207
Buggy source:
/** 
 * Creates the menu manager for the drop-down.
 */
private void createDropDownMenuMgr(){
  if (dropDownMenuMgr == null) {
    dropDownMenuMgr=new MenuManager();
    final ChooseWorkspaceData data=new ChooseWorkspaceData(Platform.getInstanceLocation().getURL());
    data.readPersistedData();
    String current=data.getInitialDefault();
    String[] workspaces=data.getRecentWorkspaces();
    for (int i=0; i < workspaces.length; i++) {
      if (workspaces[i] != null && !workspaces[i].equals(current)) {
        dropDownMenuMgr.add(new WorkspaceMRUAction(workspaces[i],data));
      }
    }
    if (!dropDownMenuMgr.isEmpty()) {
      dropDownMenuMgr.add(new Separator());
    }
    dropDownMenuMgr.add(new OpenDialogAction());
  }
}

Fixed version (ground truth):
/** 
 * Creates the menu manager for the drop-down.
 */
private void createDropDownMenuMgr(){
  if (dropDownMenuMgr == null) {
    dropDownMenuMgr=new MenuManager();
    final ChooseWorkspaceData data=new ChooseWorkspaceData(Platform.getInstanceLocation().getURL());
    data.readPersistedData();
    filterUsefulWorkspaces(data);
    String current=data.getInitialDefault();
    String[] workspaces=data.getRecentWorkspaces();
    for (int i=0; i < workspaces.length; i++) {
      if (workspaces[i] != null && !workspaces[i].equals(current)) {
        dropDownMenuMgr.add(new WorkspaceMRUAction(workspaces[i],data));
      }
    }
    if (!dropDownMenuMgr.isEmpty()) {
      dropDownMenuMgr.add(new Separator());
    }
    dropDownMenuMgr.add(new OpenDialogAction());
  }
}
Program: 126209
Project: 126209
Buggy source:
/** 
 * get the jar name like maven "artifactId.version"
 */
public static String getJobJarName(String jobName,String version){
  String newJobName=escapeFileName(jobName);
  if (version != null) {
    newJobName+='-' + version;
  }
  return newJobName;
}

Fixed version (ground truth):
/** 
 * get the jar name like maven "artifactId.version"
 */
public static String getJobJarName(String jobName,String version){
  String newJobName=getJobFolderName(jobName,version);
  return newJobName;
}
Program: 126210
Project: 126210
Buggy source:
public void execute(IProgressMonitor monitor) throws Exception {
  ILaunchConfiguration launchConfiguration=createLaunchConfiguration();
  if (launchConfiguration == null) {
    throw new Exception("String_Node_Str");
  }
  TalendLauncherWaiter talendWaiter=new TalendLauncherWaiter(launchConfiguration);
  final ILaunch launch=buildAndLaunch(launchConfiguration,launcherMode,monitor);
  talendWaiter.waitFinish(launch);
  StringBuffer errors=new StringBuffer();
  for (  IProcess process : launch.getProcesses()) {
    String log=process.getStreamsProxy().getOutputStreamMonitor().getContents();
    TalendDebugHandler.debug("String_Node_Str");
    TalendDebugHandler.debug(log);
    TalendDebugHandler.debug("String_Node_Str");
    for (    String line : log.split("String_Node_Str")) {
      if (line.startsWith("String_Node_Str")) {
        errors.append(line + "String_Node_Str");
      }
    }
  }
}

Fixed version (ground truth):
public void execute(IProgressMonitor monitor) throws Exception {
  ILaunchConfiguration launchConfiguration=createLaunchConfiguration();
  if (launchConfiguration == null) {
    throw new Exception("String_Node_Str");
  }
  TalendLauncherWaiter talendWaiter=new TalendLauncherWaiter(launchConfiguration);
  final ILaunch launch=buildAndLaunch(launchConfiguration,launcherMode,monitor);
  talendWaiter.waitFinish(launch);
  StringBuffer errors=new StringBuffer();
  for (  IProcess process : launch.getProcesses()) {
    String log=process.getStreamsProxy().getOutputStreamMonitor().getContents();
    TalendDebugHandler.debug("String_Node_Str");
    TalendDebugHandler.debug(log);
    TalendDebugHandler.debug("String_Node_Str");
    for (    String line : log.split("String_Node_Str")) {
      if (line.startsWith("String_Node_Str")) {
        errors.append(line + "String_Node_Str");
      }
    }
  }
  if (errors.length() > 0) {
    ExceptionHandler.process(new Exception(errors.toString()));
  }
}
Program: 126211
Project: 126211
Buggy source:
/** 
 * Clean the pom_xxx.xml and assembly_xxx.xml and target folder, also clean the module and dependencies.
 */
public void cleanMavenFiles(IProgressMonitor monitor) throws Exception {
  final String routinesPomFileName=PomUtil.getPomFileName(TalendMavenConstants.DEFAULT_ROUTINES_ARTIFACT_ID);
  File[] pomFiles=codeProject.getProject().getLocation().toFile().listFiles(new FilenameFilter(){
    @Override public boolean accept(    File dir,    String name){
      return name.startsWith(TalendMavenConstants.POM_NAME + '_') && name.endsWith(TalendMavenConstants.XML_EXT) && !name.equals(routinesPomFileName);
    }
  }
);
  deleteFiles(pomFiles);
  IFolder assembliesFolder=codeProject.getAssembliesFolder();
  if (assembliesFolder != null && assembliesFolder.exists()) {
    File[] assembliesFiles=assembliesFolder.getLocation().toFile().listFiles(new FilenameFilter(){
      @Override public boolean accept(      File dir,      String name){
        return name.startsWith(TalendMavenConstants.ASSEMBLY_NAME + '_') && name.endsWith(TalendMavenConstants.XML_EXT);
      }
    }
);
    deleteFiles(assembliesFiles);
  }
  FilesUtils.deleteFile(codeProject.getOutputFolder().getParent().getLocation().toFile(),true);
  syncRoutinesPom(PomIdsHelper.FLAG_ROUTINES_OVERWRITE_ALWAYS);
  ProjectPomManager projectManager=new ProjectPomManager(codeProject.getProject());
  projectManager.update(monitor,null);
  codeProject.buildModules(TalendMavenConstants.GOAL_COMPILE,null,monitor);
}

Fixed version (ground truth):
/** 
 * Clean the pom_xxx.xml and assembly_xxx.xml and target folder, also clean the module and dependencies.
 */
public void cleanMavenFiles(IProgressMonitor monitor) throws Exception {
  final String routinesPomFileName=PomUtil.getPomFileName(TalendMavenConstants.DEFAULT_ROUTINES_ARTIFACT_ID);
  File[] pomFiles=codeProject.getProject().getLocation().toFile().listFiles(new FilenameFilter(){
    @Override public boolean accept(    File dir,    String name){
      return name.startsWith(TalendMavenConstants.POM_NAME + '_') && name.endsWith(TalendMavenConstants.XML_EXT) && !name.equals(routinesPomFileName);
    }
  }
);
  deleteFiles(pomFiles);
  IFolder assembliesFolder=codeProject.getAssembliesFolder();
  if (assembliesFolder != null && assembliesFolder.exists()) {
    File[] assembliesFiles=assembliesFolder.getLocation().toFile().listFiles(new FilenameFilter(){
      @Override public boolean accept(      File dir,      String name){
        return name.startsWith(TalendMavenConstants.ASSEMBLY_NAME + '_') && name.endsWith(TalendMavenConstants.XML_EXT);
      }
    }
);
    deleteFiles(assembliesFiles);
  }
  FilesUtils.deleteFile(codeProject.getOutputFolder().getParent().getLocation().toFile(),true);
  syncRoutinesPom(true);
  ProjectPomManager projectManager=new ProjectPomManager(codeProject.getProject());
  projectManager.update(monitor,null);
  codeProject.buildModules(TalendMavenConstants.GOAL_COMPILE,null,monitor);
}
Program: 126214
Project: 126214
Buggy source:
@Override public void create(IProgressMonitor monitor) throws Exception {
  IFile curPomFile=getPomFile();
  if (curPomFile == null) {
    return;
  }
  if (curPomFile.exists()) {
    if (isOverwrite()) {
      curPomFile.delete(true,monitor);
    }
 else {
      return;
    }
  }
  Model model=createModel();
  if (model == null) {
    throw new Exception("String_Node_Str" + curPomFile);
  }
  MODEL_MANAGER.createMavenModel(curPomFile,model);
  curPomFile.getParent().refreshLocal(IResource.DEPTH_ONE,monitor);
  PomUtil.installDependencies(model.getDependencies());
}

Fixed version (ground truth):
@Override public void create(IProgressMonitor monitor) throws Exception {
  IFile curPomFile=getPomFile();
  if (curPomFile == null) {
    return;
  }
  if (curPomFile.exists()) {
    if (isOverwrite()) {
      curPomFile.delete(true,monitor);
    }
 else {
      return;
    }
  }
  Model model=createModel();
  if (model == null) {
    throw new Exception("String_Node_Str" + curPomFile);
  }
  MODEL_MANAGER.createMavenModel(curPomFile,model);
  curPomFile.getParent().refreshLocal(IResource.DEPTH_ONE,monitor);
}
Program: 126216
Project: 126216
Buggy source:
@Override public void create(IProgressMonitor monitor) throws Exception {
  super.create(monitor);
  generateAssemblyFile(monitor);
  MavenPomSynchronizer pomSync=new MavenPomSynchronizer(this.getJobProcessor().getTalendJavaProject());
  pomSync.syncRoutinesPom(PomIdsHelper.FLAG_ROUTINES_OVERWRITE_ALWAYS);
  pomSync.syncTemplates(true);
  getPomFile().getParent().refreshLocal(IResource.DEPTH_ONE,monitor);
}

Fixed version (ground truth):
@Override public void create(IProgressMonitor monitor) throws Exception {
  super.create(monitor);
  generateAssemblyFile(monitor);
  MavenPomSynchronizer pomSync=new MavenPomSynchronizer(this.getJobProcessor().getTalendJavaProject());
  pomSync.syncRoutinesPom(true);
  pomSync.syncTemplates(true);
  getPomFile().getParent().refreshLocal(IResource.DEPTH_ONE,monitor);
}
Program: 126217
Project: 126217
Buggy source:
@Override public void create(IProgressMonitor monitor) throws Exception {
  super.create(monitor);
  MavenPomSynchronizer pomSync=new MavenPomSynchronizer(this.getJobProcessor().getTalendJavaProject());
  pomSync.syncRoutinesPom(PomIdsHelper.FLAG_ROUTINES_OVERWRITE_ALWAYS);
  getPomFile().getParent().refreshLocal(IResource.DEPTH_ONE,monitor);
}

Fixed version (ground truth):
@Override public void create(IProgressMonitor monitor) throws Exception {
  super.create(monitor);
  MavenPomSynchronizer pomSync=new MavenPomSynchronizer(this.getJobProcessor().getTalendJavaProject());
  pomSync.syncRoutinesPom(true);
  getPomFile().getParent().refreshLocal(IResource.DEPTH_ONE,monitor);
}
Program: 126219
Project: 126219
Buggy source:
private Set<JobInfo> getClonedJobInfos(){
  if (this.clonedJobInfos.isEmpty()) {
    Set<JobInfo> buildChildrenJobs=getJobProcessor().getBuildChildrenJobs();
    for (    JobInfo jobInfo : buildChildrenJobs) {
      JobInfo newJobInfo=new JobInfo(jobInfo.getJobId(),jobInfo.getContextName(),jobInfo.getJobVersion());
      newJobInfo.setJobName(jobInfo.getJobName());
      newJobInfo.setApplyContextToChildren(jobInfo.isApplyContextToChildren());
      newJobInfo.setContext(jobInfo.getContext());
      newJobInfo.setProjectFolderName(jobInfo.getProjectFolderName());
      newJobInfo.setProcessItem(jobInfo.getProcessItem());
      ProcessItem processItem=newJobInfo.getProcessItem();
      if (processItem == null) {
        try {
          final IRepositoryViewObject obj=CoreRuntimePlugin.getInstance().getProxyRepositoryFactory().getSpecificVersion(jobInfo.getJobId(),jobInfo.getJobVersion(),true);
          if (obj != null) {
            final Item item=obj.getProperty().getItem();
            if (item instanceof ProcessItem) {
              processItem=(ProcessItem)item;
              newJobInfo.setProcessItem(processItem);
            }
          }
        }
 catch (        PersistenceException e) {
        }
      }
      if (processItem != null) {
        IProcess process=jobInfo.getProcess();
        if (process == null && GlobalServiceRegister.getDefault().isServiceRegistered(IDesignerCoreService.class)) {
          IDesignerCoreService service=(IDesignerCoreService)GlobalServiceRegister.getDefault().getService(IDesignerCoreService.class);
          process=service.getProcessFromItem(processItem);
          newJobInfo.setProcess(process);
        }
        final String projectFolderName=JavaResourcesHelper.getProjectFolderName(processItem);
        newJobInfo.setProjectFolderName(projectFolderName);
      }
      clonedJobInfos.add(newJobInfo);
    }
  }
  return this.clonedJobInfos;
}

Fixed version (ground truth):
private Set<JobInfo> getClonedJobInfos(){
  if (this.clonedJobInfos.isEmpty()) {
    Set<JobInfo> buildChildrenJobs=getJobProcessor().getBuildChildrenJobs();
    for (    JobInfo jobInfo : buildChildrenJobs) {
      if (!clonedJobInfos.contains(jobInfo)) {
        JobInfo newJobInfo=newJobInfo(jobInfo);
        clonedJobInfos.add(newJobInfo);
        JobInfo fatherJobInfo=newJobInfo.getFatherJobInfo();
        if (fatherJobInfo != null && buildChildrenJobs.contains(fatherJobInfo)) {
          clonedJobInfos.add(fatherJobInfo);
        }
      }
    }
  }
  return this.clonedJobInfos;
}
Program: 126220
Project: 126220
Buggy source:
/** 
 * add dependencies for pom.
 */
protected void addDependencies(Model model){
  try {
    processorDependenciesManager.updateDependencies(null,model);
    final List<Dependency> dependencies=model.getDependencies();
    String parentId=getJobProcessor().getProperty().getId();
    final Set<JobInfo> clonedChildrenJobInfors=getClonedJobInfos();
    for (    JobInfo jobInfo : clonedChildrenJobInfors) {
      if (jobInfo.getFatherJobInfo() != null && jobInfo.getFatherJobInfo().getJobId().equals(parentId)) {
        Dependency d=PomUtil.createDependency(model.getGroupId(),jobInfo.getJobName(),jobInfo.getJobVersion(),null);
        dependencies.add(d);
      }
    }
  }
 catch (  ProcessorException e) {
    ExceptionHandler.process(e);
  }
}

Fixed version (ground truth):
/** 
 * add dependencies for pom.
 */
protected void addDependencies(Model model){
  try {
    processorDependenciesManager.updateDependencies(null,model);
    final List<Dependency> dependencies=model.getDependencies();
    String parentId=getJobProcessor().getProperty().getId();
    final Set<JobInfo> clonedChildrenJobInfors=getClonedJobInfos();
    for (    JobInfo jobInfo : clonedChildrenJobInfors) {
      if (jobInfo.getFatherJobInfo() != null && jobInfo.getFatherJobInfo().getJobId().equals(parentId)) {
        Dependency d=PomUtil.createDependency(model.getGroupId(),PomIdsHelper.getJobArtifactId(jobInfo),PomIdsHelper.getJobVersion(jobInfo),null);
        dependencies.add(d);
      }
    }
  }
 catch (  ProcessorException e) {
    ExceptionHandler.process(e);
  }
}
Program: 126221
Project: 126221
Buggy source:
/** 
 * @return "<jobVersion>-<projectName>[-<refProjectName>]".
 */
public static String getJobVersion(Property property){
  if (property != null) {
    ProjectManager pManager=ProjectManager.getInstance();
    Project currentProject=pManager.getCurrentProject();
    String version=property.getVersion();
    if (FLAG_VERSION_WITH_CLASSIFIER) {
      if (pManager.isInCurrentMainProject(property)) {
        if (currentProject != null) {
          version=version + '-' + currentProject.getTechnicalLabel();
        }
      }
 else {
        org.talend.core.model.properties.Project project=pManager.getProject(property);
        if (project != null) {
          version=version + '-' + currentProject.getTechnicalLabel()+ '-'+ project.getTechnicalLabel();
        }
      }
    }
    return version;
  }
  return null;
}

Fixed version (ground truth):
public static String getJobVersion(JobInfo jobInfo){
  if (jobInfo != null) {
    ProjectManager pManager=ProjectManager.getInstance();
    Project currentProject=pManager.getCurrentProject();
    String version=jobInfo.getJobVersion();
    if (FLAG_VERSION_WITH_CLASSIFIER) {
      if (currentProject != null) {
        version=version + '-' + currentProject.getTechnicalLabel();
      }
    }
    return version;
  }
  return null;
}
Program: 126222
Project: 126222
Buggy source:
/** 
 * @return "<projectName>[.<refProjectName>].<jobName>".
 */
public static String getJobArtifactId(Property property){
  if (property != null) {
    ProjectManager pManager=ProjectManager.getInstance();
    Project currentProject=pManager.getCurrentProject();
    String artifactId=JavaResourcesHelper.escapeFileName(property.getLabel());
    if (!FLAG_FIXING_ATIFACT_ID) {
      if (pManager.isInCurrentMainProject(property)) {
        if (currentProject != null) {
          artifactId=currentProject.getTechnicalLabel() + '.' + artifactId;
        }
      }
 else {
        org.talend.core.model.properties.Project project=pManager.getProject(property);
        if (project != null) {
          artifactId=currentProject.getTechnicalLabel() + '.' + project.getTechnicalLabel()+ '.'+ artifactId;
        }
      }
    }
    return artifactId;
  }
  return null;
}

Fixed version (ground truth):
public static String getJobArtifactId(JobInfo jobInfo){
  if (jobInfo != null) {
    ProjectManager pManager=ProjectManager.getInstance();
    Project currentProject=pManager.getCurrentProject();
    String artifactId=JavaResourcesHelper.escapeFileName(jobInfo.getJobName());
    if (!FLAG_FIXING_ATIFACT_ID) {
      if (currentProject != null) {
        artifactId=currentProject.getTechnicalLabel() + '.' + artifactId;
      }
    }
    return artifactId;
  }
  return null;
}
Program: 126223
Project: 126223
Buggy source:
/** 
 * @return "org.talend.job.<projectName>[.<refProjectName>]".
 */
public static String getJobGroupId(Property property){
  if (!FLAG_FIXING_GROUP_ID) {
    if (property != null) {
      ProjectManager pManager=ProjectManager.getInstance();
      Project currentProject=pManager.getCurrentProject();
      if (!pManager.isInCurrentMainProject(property)) {
        org.talend.core.model.properties.Project project=pManager.getProject(property);
        if (project != null) {
          return getJobGroupId(currentProject.getTechnicalLabel() + '.' + project.getTechnicalLabel());
        }
      }
      if (currentProject != null) {
        return getJobGroupId(currentProject.getTechnicalLabel());
      }
    }
  }
  return getJobGroupId((String)null);
}

Fixed version (ground truth):
/** 
 * @return "org.talend.job.<projectName>".
 */
public static String getJobGroupId(Property property){
  if (!FLAG_FIXING_GROUP_ID) {
    if (property != null) {
      ProjectManager pManager=ProjectManager.getInstance();
      Project currentProject=pManager.getCurrentProject();
      if (currentProject != null) {
        return getJobGroupId(currentProject.getTechnicalLabel());
      }
    }
  }
  return getJobGroupId((String)null);
}