nus-yam/ex-repair huggingface dataset:
Program: 128981
Project: 128981
Buggy source:
public void modify(Object element,String property,Object value){
  TreeItem treeItem=(TreeItem)element;
  FOXTreeNode node=(FOXTreeNode)treeItem.getData();
  if (property.equals("String_Node_Str")) {
    node.setLabel((String)value);
  }
  if (property.equals("String_Node_Str")) {
    node.setDefaultValue((String)value);
  }
  xmlViewer.refresh(node);
}

Fixed version (ground truth):
@Override public void modify(Object element,String property,Object value){
  TreeItem treeItem=(TreeItem)element;
  FOXTreeNode node=(FOXTreeNode)treeItem.getData();
  if (property.equals("String_Node_Str")) {
    node.setLabel((String)value);
  }
  if (property.equals("String_Node_Str")) {
    node.setDefaultValue((String)value);
  }
  xmlViewer.refresh(node);
}
Program: 128982
Project: 128982
Buggy source:
public Object getValue(Object element,String property){
  FOXTreeNode node=(FOXTreeNode)element;
  if (property.equals("String_Node_Str")) {
    return node.getLabel();
  }
  if (property.equals("String_Node_Str")) {
    return node.getDefaultValue();
  }
  return null;
}

Fixed version (ground truth):
@Override public Object getValue(Object element,String property){
  FOXTreeNode node=(FOXTreeNode)element;
  if (property.equals("String_Node_Str")) {
    return node.getLabel();
  }
  if (property.equals("String_Node_Str")) {
    return node.getDefaultValue();
  }
  return null;
}
Program: 128983
Project: 128983
Buggy source:
@Override protected void addFieldsListeners(){
  rootComboViewer.addSelectionChangedListener(new ISelectionChangedListener(){
    public void selectionChanged(    SelectionChangedEvent event){
      IStructuredSelection selection=(IStructuredSelection)event.getSelection();
      ATreeNode node=(ATreeNode)selection.getFirstElement();
      List<FOXTreeNode> nodeList=getCorrespondingFoxTreeNodes(node,false);
      if (nodeList.size() == 0) {
        return;
      }
      if (ConnectionHelper.getTables(getConnection()).size() > 0) {
        EList schemaMetadataColumn=ConnectionHelper.getTables(getConnection()).toArray(new MetadataTable[0])[0].getColumns();
        schemaMetadataColumn.clear();
        initMetadataTable(nodeList,schemaMetadataColumn);
      }
      updateConnectionProperties(nodeList.get(0));
      initXmlTreeData();
      initSchemaTable();
      xmlViewer.setInput(treeData);
      xmlViewer.expandAll();
      redrawLinkers();
      if (!creation) {
        checkFieldsValue();
      }
    }
  }
);
}

Fixed version (ground truth):
@Override protected void addFieldsListeners(){
  rootComboViewer.addSelectionChangedListener(new ISelectionChangedListener(){
    @Override public void selectionChanged(    SelectionChangedEvent event){
      IStructuredSelection selection=(IStructuredSelection)event.getSelection();
      ATreeNode node=(ATreeNode)selection.getFirstElement();
      List<FOXTreeNode> nodeList=getCorrespondingFoxTreeNodes(node,false);
      if (nodeList.size() == 0) {
        return;
      }
      if (ConnectionHelper.getTables(getConnection()).size() > 0) {
        EList schemaMetadataColumn=ConnectionHelper.getTables(getConnection()).toArray(new MetadataTable[0])[0].getColumns();
        schemaMetadataColumn.clear();
        initMetadataTable(nodeList,schemaMetadataColumn);
      }
      updateConnectionProperties(nodeList.get(0));
      initXmlTreeData();
      initSchemaTable();
      xmlViewer.setInput(treeData);
      xmlViewer.expandAll();
      redrawLinkers();
      if (!creation) {
        checkFieldsValue();
      }
    }
  }
);
}
Program: 128984
Project: 128984
Buggy source:
public void selectionChanged(SelectionChangedEvent event){
  IStructuredSelection selection=(IStructuredSelection)event.getSelection();
  ATreeNode node=(ATreeNode)selection.getFirstElement();
  List<FOXTreeNode> nodeList=getCorrespondingFoxTreeNodes(node,false);
  if (nodeList.size() == 0) {
    return;
  }
  if (ConnectionHelper.getTables(getConnection()).size() > 0) {
    EList schemaMetadataColumn=ConnectionHelper.getTables(getConnection()).toArray(new MetadataTable[0])[0].getColumns();
    schemaMetadataColumn.clear();
    initMetadataTable(nodeList,schemaMetadataColumn);
  }
  updateConnectionProperties(nodeList.get(0));
  initXmlTreeData();
  initSchemaTable();
  xmlViewer.setInput(treeData);
  xmlViewer.expandAll();
  redrawLinkers();
  if (!creation) {
    checkFieldsValue();
  }
}

Fixed version (ground truth):
@Override public void selectionChanged(SelectionChangedEvent event){
  IStructuredSelection selection=(IStructuredSelection)event.getSelection();
  ATreeNode node=(ATreeNode)selection.getFirstElement();
  List<FOXTreeNode> nodeList=getCorrespondingFoxTreeNodes(node,false);
  if (nodeList.size() == 0) {
    return;
  }
  if (ConnectionHelper.getTables(getConnection()).size() > 0) {
    EList schemaMetadataColumn=ConnectionHelper.getTables(getConnection()).toArray(new MetadataTable[0])[0].getColumns();
    schemaMetadataColumn.clear();
    initMetadataTable(nodeList,schemaMetadataColumn);
  }
  updateConnectionProperties(nodeList.get(0));
  initXmlTreeData();
  initSchemaTable();
  xmlViewer.setInput(treeData);
  xmlViewer.expandAll();
  redrawLinkers();
  if (!creation) {
    checkFieldsValue();
  }
}
Program: 128985
Project: 128985
Buggy source:
public void updateStatus(){
  checkFieldsValue();
}

Fixed version (ground truth):
@Override public void updateStatus(){
  checkFieldsValue();
}
Program: 128987
Project: 128987
Buggy source:
public void mouseDown(MouseEvent mouseEvent){
  controlClicked=mouseEvent.getSource();
}

Fixed version (ground truth):
@Override public void mouseDown(MouseEvent mouseEvent){
  controlClicked=mouseEvent.getSource();
}
Program: 128988
Project: 128988
Buggy source:
public void setContentProvider(IStructuredContentProvider contentProvider){
  if (tableViewer != null && tableViewer.getContentProvider() != contentProvider) {
    tableViewer.setContentProvider(contentProvider);
  }
  this.contentProvider=contentProvider;
}

Fixed version (ground truth):
public void setContentProvider(ILazyContentProvider contentProvider){
  if (tableViewer != null && tableViewer.getContentProvider() != contentProvider) {
    tableViewer.setContentProvider(contentProvider);
  }
  this.contentProvider=contentProvider;
}
Program: 128989
Project: 128989
Buggy source:
/** 
 * <p> Create a new instance of <code>Table</code> with its <code>TableColumn</code>s and create also a new instance of <code>TableViewer</code> if these objects doesn't exist already. </p> <p> Initialize the <code>TableViewer</code> with by default the <code>DefaultStructuredContentProvider</code>, the <code>DefaultTableLabelProvider</code> and the <code>DefaultTableViewerSorter</code>. </p> <p> If you use the default ContentProvider, you must set as input an object which extends <code>Collection</code>. </p> <p> <b> If it is the second or more time than you call this method, only the input object is loaded. Call methods of <code>TableViewer</code> for others operations. </b> </p>
 * @param input by default a object which extends <code>Collection</code>.
 */
public void init(List list){
  if (!initCalled) {
    initCalled=true;
    if (this.table == null) {
      createTable();
    }
    attachLabelProvider();
    buildAndLayoutTable();
    attachViewerSorter();
    attachContentProvider();
    attachCellEditors();
    addListeners();
  }
  boolean hasChanged=false;
  if (this.list != list) {
    hasChanged=true;
  }
  setInputList(list);
  if (tableEditorManager != null && list != null) {
    tableEditorManager.init(this.listenableList);
  }
  if (hasChanged) {
    refreshTableEditorControls();
  }
}

Fixed version (ground truth):
/** 
 * <p> Create a new instance of <code>Table</code> with its <code>TableColumn</code>s and create also a new instance of <code>TableViewer</code> if these objects doesn't exist already. </p> <p> Initialize the <code>TableViewer</code> with by default the <code>DefaultStructuredContentProvider</code>, the <code>DefaultTableLabelProvider</code> and the <code>DefaultTableViewerSorter</code>. </p> <p> If you use the default ContentProvider, you must set as input an object which extends <code>Collection</code>. </p> <p> <b> If it is the second or more time than you call this method, only the input object is loaded. Call methods of <code>TableViewer</code> for others operations. </b> </p>
 * @param input by default a object which extends <code>Collection</code>.
 */
public void init(List list){
  if (!initCalled) {
    initCalled=true;
    if (this.table == null) {
      createTable();
    }
    attachLabelProvider();
    buildAndLayoutTable();
    attachViewerSorter();
    attachContentProvider();
    attachCellEditors();
    addListeners();
  }
  boolean hasChanged=false;
  if (this.list != list) {
    hasChanged=true;
  }
  setInputList(list);
  if (tableEditorManager != null && list != null) {
    tableEditorManager.init(this.listenableList);
  }
  if (hasChanged) {
  }
}
Program: 128990
Project: 128990
Buggy source:
public void mouseUp(MouseEvent e){
}

Fixed version (ground truth):
@Override public void mouseUp(MouseEvent e){
}
Program: 128991
Project: 128991
Buggy source:
/** 
 * DOC amaumont Comment method "forceTableFocus".
 */
private void forceTableFocus(){
  new AsynchronousThreading(10,false,getTable().getDisplay(),new Runnable(){
    public void run(){
      getTable().forceFocus();
    }
  }
).start();
}

Fixed version (ground truth):
/** 
 * DOC amaumont Comment method "forceTableFocus".
 */
private void forceTableFocus(){
  new AsynchronousThreading(10,false,getTable().getDisplay(),new Runnable(){
    @Override public void run(){
      getTable().forceFocus();
    }
  }
).start();
}
Program: 128992
Project: 128992
Buggy source:
public void keyReleased(KeyEvent e){
}

Fixed version (ground truth):
@Override public void keyReleased(KeyEvent e){
}
Program: 128993
Project: 128993
Buggy source:
protected void attachContentProvider(){
  if (this.contentProvider == null) {
    this.contentProvider=new DefaultStructuredContentProvider(this);
  }
  tableViewer.setContentProvider(this.contentProvider);
}

Fixed version (ground truth):
protected void attachContentProvider(){
  if (this.contentProvider == null) {
    this.contentProvider=new LazyContentProvider(this);
  }
  tableViewer.setContentProvider(this.contentProvider);
}
Program: 128994
Project: 128994
Buggy source:
public void notifyEvent(TableEditorManagerEvent event){
  Control editor=event.getTableEditor().getEditor();
  if (event.getEventType() == EVENT_TYPE.CONTROL_CREATED) {
    editor.addMouseListener(mouseListener);
    editor.addTraverseListener(traverseListenerForControls);
  }
}

Fixed version (ground truth):
@Override public void notifyEvent(TableEditorManagerEvent event){
  Control editor=event.getTableEditor().getEditor();
  if (event.getEventType() == EVENT_TYPE.CONTROL_CREATED) {
    editor.addMouseListener(mouseListener);
    editor.addTraverseListener(traverseListenerForControls);
  }
}
Program: 128995
Project: 128995
Buggy source:
@Override public void replace(Object element,int index){
  super.replace(element,index);
  refreshTableEditorControls();
}

Fixed version (ground truth):
@Override public void replace(Object element,int index){
  super.replace(element,index);
  refreshTableEditorColumn(index);
}
Program: 128998
Project: 128998
Buggy source:
public void widgetDisposed(DisposeEvent e){
  if (tableEditorManager != null) {
    tableEditorManager.release();
  }
}

Fixed version (ground truth):
@Override public void widgetDisposed(DisposeEvent e){
  if (tableEditorManager != null) {
    tableEditorManager.release();
  }
}
Program: 128999
Project: 128999
Buggy source:
public void keyPressed(KeyEvent e){
  if (!keyboardManagementForCellEdition) {
    return;
  }
  int key=e.keyCode;
  if (key == SWT.F2) {
    keyPressed=key;
    editOtherEditor(null);
  }
}

Fixed version (ground truth):
@Override public void keyPressed(KeyEvent e){
  if (!keyboardManagementForCellEdition) {
    return;
  }
  int key=e.keyCode;
  if (key == SWT.F2) {
    keyPressed=key;
    editOtherEditor(null);
  }
}
Program: 129000
Project: 129000
Buggy source:
public void mouseDoubleClick(MouseEvent e){
}

Fixed version (ground truth):
@Override public void mouseDoubleClick(MouseEvent e){
}
Program: 129001
Project: 129001
Buggy source:
public int getSwtStyle(){
  return swtStyle;
}

Fixed version (ground truth):
@Override public int getSwtStyle(){
  return swtStyle;
}
Program: 129005
Project: 129005
Buggy source:
@Override public void insert(Object element,int position){
  super.insert(element,position);
}

Fixed version (ground truth):
@Override public void insert(Object element,int position){
  super.insert(element,position);
  refreshTableEditorControls();
}
Program: 129008
Project: 129008
Buggy source:
public void keyTraversed(TraverseEvent e){
  if (!keyboardManagementForCellEdition) {
    return;
  }
  int key=e.detail;
  if (key == SWT.TRAVERSE_TAB_NEXT || key == SWT.TRAVERSE_TAB_PREVIOUS) {
    keyPressed=key;
    e.doit=false;
    editOtherEditor(null);
  }
 else   if (key == SWT.TRAVERSE_RETURN && getTable().getSelectionIndex() != -1 && getTable().isFocusControl()) {
    keyPressed=key;
    editOtherEditor(null);
  }
}

Fixed version (ground truth):
@Override public void keyTraversed(TraverseEvent e){
  if (!keyboardManagementForCellEdition) {
    return;
  }
  int key=e.detail;
  if (key == SWT.TRAVERSE_TAB_NEXT || key == SWT.TRAVERSE_TAB_PREVIOUS) {
    keyPressed=key;
    e.doit=false;
    editOtherEditor(null);
  }
 else   if (key == SWT.TRAVERSE_RETURN && getTable().getSelectionIndex() != -1 && getTable().isFocusControl()) {
    keyPressed=key;
    editOtherEditor(null);
  }
}
Program: 129009
Project: 129009
Buggy source:
public void checkInit(Boolean lastVersion,Boolean readonly,boolean load) throws PersistenceException {
  if (loadedProcess instanceof ILastVersionChecker) {
    ((ILastVersionChecker)loadedProcess).setLastVersion(lastVersion);
  }
  if (load) {
    loadProcess();
  }
 else {
    saveProcessBefore();
    saveProcess(null,null);
  }
  if (readonly == null) {
    checkReadOnly();
  }
 else {
    setReadOnly(readonly);
  }
}

Fixed version (ground truth):
public void checkInit(Boolean lastVersion,Boolean readonly,boolean load) throws PersistenceException {
  if (loadedProcess instanceof ILastVersionChecker) {
    ((ILastVersionChecker)loadedProcess).setLastVersion(lastVersion);
  }
  if (load) {
    loadProcess();
  }
 else {
    saveProcessBefore();
    saveProcess(null,null,true);
  }
  if (readonly == null) {
    checkReadOnly();
  }
 else {
    setReadOnly(readonly);
  }
}
Program: 129011
Project: 129011
Buggy source:
@Override protected void run() throws LoginException, PersistenceException {
  resetItem();
  if (getItem() instanceof JobletProcessItem) {
    ((JobletProcessItem)getItem()).setJobletProcess((JobletProcess)processType);
  }
 else   if (getItem() instanceof ProcessItem) {
    ((ProcessItem)getItem()).setProcess(processType);
  }
  factory.save(getItem());
  loadedProcess.setProperty(getItem().getProperty());
  RelationshipItemBuilder.getInstance().addOrUpdateItem(getItem());
}

Fixed version (ground truth):
@Override protected void run() throws LoginException, PersistenceException {
  resetItem();
  if (getItem() instanceof JobletProcessItem) {
    ((JobletProcessItem)getItem()).setJobletProcess((JobletProcess)processType);
  }
 else   if (getItem() instanceof ProcessItem) {
    ((ProcessItem)getItem()).setProcess(processType);
  }
  factory.save(getItem());
  loadedProcess.setProperty(getItem().getProperty());
  if (!avoidSaveRelations) {
    RelationshipItemBuilder.getInstance().addOrUpdateItem(getItem());
  }
}
Program: 129012
Project: 129012
Buggy source:
public void setReadOnly(boolean readOnly){
  super.setReadOnly(readOnly);
  if (loadedProcess != null) {
    loadedProcess.setReadOnly(readOnly);
  }
}

Fixed version (ground truth):
@Override public void setReadOnly(boolean readOnly){
  super.setReadOnly(readOnly);
  if (loadedProcess != null) {
    loadedProcess.setReadOnly(readOnly);
  }
}
Program: 129013
Project: 129013
Buggy source:
public void redrawLinkers(){
  int maxColumnsNumber=CoreRuntimePlugin.getInstance().getPreferenceStore().getInt(ITalendCorePrefConstants.MAXIMUM_AMOUNT_OF_COLUMNS_FOR_XML);
  if (schemaViewer.getTable().getItems().length <= maxColumnsNumber + 1) {
    linker.removeAllLinks();
    TreeItem root=xmlViewer.getTree().getItem(0);
    TableItem[] tableItems=schemaViewer.getTable().getItems();
    initLinker(root,tableItems);
    linker.updateLinksStyleAndControlsSelection(xmlViewer.getTree(),true);
  }
}

Fixed version (ground truth):
public void redrawLinkers(){
  int maxColumnsNumber=CoreRuntimePlugin.getInstance().getPreferenceStore().getInt(ITalendCorePrefConstants.MAXIMUM_AMOUNT_OF_COLUMNS_FOR_XML);
  if (schemaViewer.getTable().getItems().length <= maxColumnsNumber + 1) {
    linker.removeAllLinks();
    TreeItem root=xmlViewer.getTree().getItem(0);
    TableItem[] tableItems=schemaViewer.getTable().getItems();
    initLinker(root,tableItems);
    if (linker.linkSize() == 0) {
      linker.updateLinksStyleAndControlsSelection(xmlViewer.getTree(),true);
    }
  }
}
Program: 129017
Project: 129017
Buggy source:
public void stop(){
  final IWorkbench workbench=PlatformUI.getWorkbench();
  if (workbench == null) {
    return;
  }
  final Display display=workbench.getDisplay();
  display.syncExec(new Runnable(){
    public void run(){
      if (!display.isDisposed()) {
        workbench.close();
      }
    }
  }
);
}

Fixed version (ground truth):
@Override public void stop(){
  final IWorkbench workbench=PlatformUI.getWorkbench();
  if (workbench == null) {
    return;
  }
  final Display display=workbench.getDisplay();
  display.syncExec(new Runnable(){
    @Override public void run(){
      if (!display.isDisposed()) {
        workbench.close();
      }
    }
  }
);
}
Program: 129019
Project: 129019
Buggy source:
public void run(){
  if (!display.isDisposed()) {
    workbench.close();
  }
}

Fixed version (ground truth):
@Override public void run(){
  if (!display.isDisposed()) {
    workbench.close();
  }
}
Program: 129021
Project: 129021
Buggy source:
@Override protected List<String> getTablesToFilter(IMetadataConnection metadataConnection){
  List<String> tablesToFilter=new ArrayList<String>();
  Statement stmt;
  try {
    stmt=ExtractMetaDataUtils.conn.createStatement();
    ExtractMetaDataUtils.setQueryStatementTimeout(stmt);
    if (metadataConnection.getDbVersionString() != null && !metadataConnection.getDbVersionString().equals(EDatabaseVersion4Drivers.ORACLE_8.getVersionValue())) {
      ResultSet rsTables=stmt.executeQuery(ORACLE_10G_RECBIN_SQL);
      tablesToFilter=ExtractMetaDataFromDataBase.getTableNamesFromQuery(rsTables);
      rsTables.close();
    }
    stmt.close();
  }
 catch (  SQLException e) {
    ExceptionHandler.process(e);
  }
  return tablesToFilter;
}

Fixed version (ground truth):
@Override protected List<String> getTablesToFilter(IMetadataConnection metadataConnection){
  List<String> tablesToFilter=new ArrayList<String>();
  Statement stmt;
  try {
    stmt=ExtractMetaDataUtils.conn.createStatement();
    ExtractMetaDataUtils.setQueryStatementTimeout(stmt);
    if (EDatabaseTypeName.ORACLEFORSID.getDisplayName().equals(metadataConnection.getDbType()) || EDatabaseTypeName.ORACLESN.getDisplayName().equals(metadataConnection.getDbType()) || EDatabaseTypeName.ORACLE_RAC.getDisplayName().equals(metadataConnection.getDbType())|| EDatabaseTypeName.ORACLE_OCI.getDisplayName().equals(metadataConnection.getDbType())) {
      ResultSet rsTables=stmt.executeQuery(ORACLE_10G_RECBIN_SQL);
      tablesToFilter=ExtractMetaDataFromDataBase.getTableNamesFromQuery(rsTables);
      rsTables.close();
    }
    stmt.close();
  }
 catch (  SQLException e) {
    ExceptionHandler.process(e);
  }
  return tablesToFilter;
}
Program: 129022
Project: 129022
Buggy source:
public static boolean isBrandingChanged(){
  if (!isBrandingChanged) {
    if (CommonsPlugin.isHeadless()) {
      isBrandingChanged=true;
    }
 else {
      IBrandingService brandingService=(IBrandingService)GlobalServiceRegister.getDefault().getService(IBrandingService.class);
      final String fullProductName=brandingService.getFullProductName();
      Display display=Display.getDefault();
      if (display == null) {
        display=Display.getCurrent();
      }
      display.syncExec(new Runnable(){
        public void run(){
          IPreferenceStore preferenceStore=CorePlugin.getDefault().getPreferenceStore();
          String oldBrandingName=preferenceStore.getString(LAST_STARTED_PRODUCT);
          if (oldBrandingName == null || oldBrandingName.equals("String_Node_Str") || !oldBrandingName.equals(fullProductName)) {
            isBrandingChanged=true;
            preferenceStore.setValue(LAST_STARTED_PRODUCT,fullProductName);
          }
        }
      }
);
    }
  }
  return isBrandingChanged;
}

Fixed version (ground truth):
public static boolean isBrandingChanged(){
  if (!isBrandingChanged) {
    if (CommonsPlugin.isHeadless()) {
      isBrandingChanged=false;
    }
 else {
      IBrandingService brandingService=(IBrandingService)GlobalServiceRegister.getDefault().getService(IBrandingService.class);
      final String fullProductName=brandingService.getFullProductName();
      Display display=Display.getDefault();
      if (display == null) {
        display=Display.getCurrent();
      }
      display.syncExec(new Runnable(){
        public void run(){
          IPreferenceStore preferenceStore=CorePlugin.getDefault().getPreferenceStore();
          String oldBrandingName=preferenceStore.getString(LAST_STARTED_PRODUCT);
          if (oldBrandingName == null || oldBrandingName.equals("String_Node_Str") || !oldBrandingName.equals(fullProductName)) {
            isBrandingChanged=true;
            preferenceStore.setValue(LAST_STARTED_PRODUCT,fullProductName);
          }
        }
      }
);
    }
  }
  return isBrandingChanged;
}
Program: 129027
Project: 129027
Buggy source:
public static boolean isBrandingChanged(){
  if (!isBrandingChanged) {
    if (CommonsPlugin.isHeadless()) {
      isBrandingChanged=true;
    }
 else {
      IBrandingService brandingService=(IBrandingService)GlobalServiceRegister.getDefault().getService(IBrandingService.class);
      final String fullProductName=brandingService.getFullProductName();
      Display display=Display.getDefault();
      if (display == null) {
        display=Display.getCurrent();
      }
      display.syncExec(new Runnable(){
        public void run(){
          IPreferenceStore preferenceStore=CorePlugin.getDefault().getPreferenceStore();
          String oldBrandingName=preferenceStore.getString(LAST_STARTED_PRODUCT);
          if (oldBrandingName == null || oldBrandingName.equals("String_Node_Str") || !oldBrandingName.equals(fullProductName)) {
            isBrandingChanged=true;
            preferenceStore.setValue(LAST_STARTED_PRODUCT,fullProductName);
          }
        }
      }
);
    }
  }
  return isBrandingChanged;
}

Fixed version (ground truth):
public static boolean isBrandingChanged(){
  if (!isBrandingChanged) {
    if (CommonsPlugin.isHeadless()) {
      isBrandingChanged=false;
    }
 else {
      IBrandingService brandingService=(IBrandingService)GlobalServiceRegister.getDefault().getService(IBrandingService.class);
      final String fullProductName=brandingService.getFullProductName();
      Display display=Display.getDefault();
      if (display == null) {
        display=Display.getCurrent();
      }
      display.syncExec(new Runnable(){
        public void run(){
          IPreferenceStore preferenceStore=CorePlugin.getDefault().getPreferenceStore();
          String oldBrandingName=preferenceStore.getString(LAST_STARTED_PRODUCT);
          if (oldBrandingName == null || oldBrandingName.equals("String_Node_Str") || !oldBrandingName.equals(fullProductName)) {
            isBrandingChanged=true;
            preferenceStore.setValue(LAST_STARTED_PRODUCT,fullProductName);
          }
        }
      }
);
    }
  }
  return isBrandingChanged;
}
Program: 129028
Project: 129028
Buggy source:
public int compare(IWorkspaceMigrationTask o1,IWorkspaceMigrationTask o2){
  return o1.getOrder().compareTo(o2.getOrder());
}

Fixed version (ground truth):
@Override public int compare(IWorkspaceMigrationTask o1,IWorkspaceMigrationTask o2){
  return o1.getOrder().compareTo(o2.getOrder());
}
Program: 129029
Project: 129029
Buggy source:
private void sortMigrationTasks(List<? extends IMigrationTask> tasks){
  Collections.sort(tasks,new Comparator<IMigrationTask>(){
    public int compare(    IMigrationTask t1,    IMigrationTask t2){
      return t1.getOrder().compareTo(t2.getOrder());
    }
  }
);
}

Fixed version (ground truth):
private void sortMigrationTasks(List<? extends IMigrationTask> tasks){
  Collections.sort(tasks,new Comparator<IMigrationTask>(){
    @Override public int compare(    IMigrationTask t1,    IMigrationTask t2){
      return t1.getOrder().compareTo(t2.getOrder());
    }
  }
);
}
Program: 129030
Project: 129030
Buggy source:
public void initNewProjectTasks(Project project){
  List<IProjectMigrationTask> toExecute=GetTasksHelper.getProjectTasks(true);
  toExecute.addAll(GetTasksHelper.getProjectTasks(false));
  List<MigrationTask> done=new ArrayList<MigrationTask>();
  for (  IProjectMigrationTask task : toExecute) {
    done.add(MigrationUtil.convertMigrationTask(task));
  }
  saveProjectMigrationTasksDone(project,done);
}

Fixed version (ground truth):
@Override public void initNewProjectTasks(Project project){
  List<IProjectMigrationTask> toExecute=GetTasksHelper.getProjectTasks(true);
  toExecute.addAll(GetTasksHelper.getProjectTasks(false));
  List<MigrationTask> done=new ArrayList<MigrationTask>();
  for (  IProjectMigrationTask task : toExecute) {
    done.add(MigrationUtil.convertMigrationTask(task));
  }
  saveProjectMigrationTasksDone(project,done);
}
Program: 129032
Project: 129032
Buggy source:
public boolean needExecutemigration(){
  return !AlertUserOnLogin.executed;
}

Fixed version (ground truth):
@Override public boolean needExecutemigration(){
  return !AlertUserOnLogin.executed;
}
Program: 129034
Project: 129034
Buggy source:
public void executeWorspaceTasks(){
  log.trace("String_Node_Str");
  List<IWorkspaceMigrationTask> toExecute=GetTasksHelper.getWorkspaceTasks();
  List<String> done=coreService.readWorkspaceTasksDone();
  String lastUser=coreService.getLastUser();
  if (lastUser == null || lastUser.length() == 0) {
    if (done.isEmpty()) {
      initNewWorkspaceTasks();
      done=coreService.readWorkspaceTasksDone();
    }
  }
  Collections.sort(toExecute,new Comparator<IWorkspaceMigrationTask>(){
    public int compare(    IWorkspaceMigrationTask o1,    IWorkspaceMigrationTask o2){
      return o1.getOrder().compareTo(o2.getOrder());
    }
  }
);
  for (  IWorkspaceMigrationTask task : toExecute) {
    if (!done.contains(task.getId())) {
      if (task.execute()) {
        coreService.addWorkspaceTaskDone(task.getId());
        log.debug("String_Node_Str" + task.getName() + "String_Node_Str");
      }
 else {
        log.debug("String_Node_Str" + task.getName() + "String_Node_Str");
      }
    }
  }
}

Fixed version (ground truth):
@Override public void executeWorspaceTasks(){
  log.trace("String_Node_Str");
  List<IWorkspaceMigrationTask> toExecute=GetTasksHelper.getWorkspaceTasks();
  List<String> done=coreService.readWorkspaceTasksDone();
  String lastUser=coreService.getLastUser();
  if (lastUser == null || lastUser.length() == 0) {
    if (done.isEmpty()) {
      initNewWorkspaceTasks();
      done=coreService.readWorkspaceTasksDone();
    }
  }
  Collections.sort(toExecute,new Comparator<IWorkspaceMigrationTask>(){
    @Override public int compare(    IWorkspaceMigrationTask o1,    IWorkspaceMigrationTask o2){
      return o1.getOrder().compareTo(o2.getOrder());
    }
  }
);
  for (  IWorkspaceMigrationTask task : toExecute) {
    if (!done.contains(task.getId())) {
      if (task.execute()) {
        coreService.addWorkspaceTaskDone(task.getId());
        log.debug("String_Node_Str" + task.getName() + "String_Node_Str");
      }
 else {
        log.debug("String_Node_Str" + task.getName() + "String_Node_Str");
      }
    }
  }
}
Program: 129035
Project: 129035
Buggy source:
public void executeMigration(boolean underPluginModel){
  new AlertUserOnLogin().startup(underPluginModel);
}

Fixed version (ground truth):
@Override public void executeMigration(boolean underPluginModel){
  new AlertUserOnLogin().startup(underPluginModel);
}
Program: 129038
Project: 129038
Buggy source:
public void updateMigrationSystem(org.talend.core.model.properties.Project project,boolean persistence){
  IProjectMigrationTask task=GetTasksHelper.getInstance().getProjectTask(MigrationUtil.ADAPT_NEW_MIGRATION_TASK_SYSTEM_ID);
  task.execute(new org.talend.core.model.general.Project(project),persistence);
  project.getMigrationTask().add(MigrationUtil.convertMigrationTask(task));
}

Fixed version (ground truth):
@Override public void updateMigrationSystem(org.talend.core.model.properties.Project project,boolean persistence){
  IProjectMigrationTask task=GetTasksHelper.getInstance().getProjectTask(MigrationUtil.ADAPT_NEW_MIGRATION_TASK_SYSTEM_ID);
  task.execute(new org.talend.core.model.general.Project(project),persistence);
  project.getMigrationTask().add(MigrationUtil.convertMigrationTask(task));
}
Program: 129040
Project: 129040
Buggy source:
/** 
 * qli Comment method "validateColumnName".
 */
public static String validateColumnName(final String columnName,final int index){
  String originalColumnName=new String(mapSpecialChar(columnName));
  final String underLine="String_Node_Str";
  boolean isKeyword=KeywordsValidator.isKeyword(originalColumnName);
  String returnedColumnName="String_Node_Str";
  if (!isKeyword) {
    boolean isAllowSpecific=isAllowSpecificCharacters();
    for (int i=0; i < originalColumnName.length(); i++) {
      Character car=originalColumnName.charAt(i);
      if (car.toString().getBytes().length == 1 && !isAllowSpecific) {
        if (((car >= 'a') && (car <= 'z')) || ((car >= 'A') && (car <= 'Z')) || car == '_' || ((car >= '0') && (car <= '9') && (i != 0))) {
          returnedColumnName+=car;
        }
 else {
          returnedColumnName+=underLine;
        }
      }
 else {
        returnedColumnName+=car;
      }
    }
  }
  if (isKeyword || org.apache.commons.lang.StringUtils.countMatches(returnedColumnName,underLine) > (originalColumnName.length() / 2)) {
    returnedColumnName="String_Node_Str" + index;
  }
  return returnedColumnName;
}

Fixed version (ground truth):
public static String validateColumnName(final String columnName,final int index,List<String> labels){
  String name=validateColumnName(columnName,index);
  UniqueStringGenerator<String> uniqueStringGenerator=new UniqueStringGenerator<String>(name,labels){
    @Override protected String getBeanString(    String bean){
      return bean;
    }
  }
;
  return uniqueStringGenerator.getUniqueString();
}
Program: 129041
Project: 129041
Buggy source:
/** 
 * qli Comment method "validateColumnName".
 */
public static String validateColumnName(String columnName,int index){
  String originalColumnName=new String(columnName);
  final String underLine="String_Node_Str";
  boolean isKeyword=KeywordsValidator.isKeyword(originalColumnName);
  columnName="String_Node_Str";
  if (!isKeyword) {
    boolean isAllowSpecific=isAllowSpecificCharacters();
    for (int i=0; i < originalColumnName.length(); i++) {
      Character car=originalColumnName.charAt(i);
      if (car.toString().getBytes().length == 1 && !isAllowSpecific) {
        if (((car >= 'a') && (car <= 'z')) || ((car >= 'A') && (car <= 'Z')) || car == '_' || ((car >= '0') && (car <= '9') && (i != 0))) {
          columnName+=car;
        }
 else {
          columnName+=underLine;
        }
      }
 else {
        columnName+=car;
      }
    }
  }
  if (isKeyword || org.apache.commons.lang.StringUtils.countMatches(columnName,underLine) > (originalColumnName.length() / 2)) {
    columnName="String_Node_Str" + index;
  }
  return columnName;
}

Fixed version (ground truth):
public static String validateColumnName(final String columnName,final int index,List<String> labels){
  String name=validateColumnName(columnName,index);
  UniqueStringGenerator<String> uniqueStringGenerator=new UniqueStringGenerator<String>(name,labels){
    @Override protected String getBeanString(    String bean){
      return bean;
    }
  }
;
  return uniqueStringGenerator.getUniqueString();
}
Program: 129047
Project: 129047
Buggy source:
private void propagateFileName(Project project,Property property) throws PersistenceException {
  List<IRepositoryViewObject> allVersionToMove=getAllVersion(project,property.getId(),false);
  for (  IRepositoryViewObject object : allVersionToMove) {
    xmiResourceManager.propagateFileName(property,object.getProperty());
  }
}

Fixed version (ground truth):
private void propagateFileName(Project project,Property property) throws PersistenceException {
  String originalVersionText=null;
  URI uri=property.eResource().getURI();
  String fileNameString=uri.trimFileExtension().lastSegment();
  int index=fileNameString.lastIndexOf("String_Node_Str");
  originalVersionText=fileNameString.substring(index + 1);
  Version originalVersion=new Version(originalVersionText);
  List<IRepositoryViewObject> allVersionToMove=getAllVersion(project,property.getId(),false);
  int lastVersionCheck=0;
  for (  IRepositoryViewObject object : allVersionToMove) {
    if (originalVersion != null && new Version(object.getVersion()).compareTo(originalVersion) > 0) {
      lastVersionCheck++;
    }
  }
  if (lastVersionCheck > 1) {
    for (    IRepositoryViewObject object : allVersionToMove) {
      ResourceFilenameHelper.FileName fileNameTest=ResourceFilenameHelper.create(object.getProperty().eResource(),object.getProperty(),property);
      if (fileNameTest.getResourceVersion().equals(originalVersionText)) {
        if (ResourceFilenameHelper.mustChangeLabel(fileNameTest)) {
          throw new PersistenceException("String_Node_Str");
        }
        xmiResourceManager.propagateFileName(property,object.getProperty());
      }
    }
  }
 else {
    for (    IRepositoryViewObject object : allVersionToMove) {
      xmiResourceManager.propagateFileName(property,object.getProperty());
    }
  }
}
Program: 129048
Project: 129048
Buggy source:
public int compare(IWorkspaceMigrationTask o1,IWorkspaceMigrationTask o2){
  return o1.getOrder().compareTo(o2.getOrder());
}

Fixed version (ground truth):
@Override public int compare(IWorkspaceMigrationTask o1,IWorkspaceMigrationTask o2){
  return o1.getOrder().compareTo(o2.getOrder());
}
Program: 129050
Project: 129050
Buggy source:
public void initNewProjectTasks(Project project){
  List<IProjectMigrationTask> toExecute=GetTasksHelper.getProjectTasks(true);
  toExecute.addAll(GetTasksHelper.getProjectTasks(false));
  List<String> done=new ArrayList<String>();
  for (  IProjectMigrationTask task : toExecute) {
    done.add(task.getId());
  }
  saveProjectMigrationTasksDone(project,done);
}

Fixed version (ground truth):
@Override public void initNewProjectTasks(Project project){
  List<IProjectMigrationTask> toExecute=GetTasksHelper.getProjectTasks(true);
  toExecute.addAll(GetTasksHelper.getProjectTasks(false));
  List<String> done=new ArrayList<String>();
  for (  IProjectMigrationTask task : toExecute) {
    done.add(task.getId());
  }
  saveProjectMigrationTasksDone(project,done);
}
Program: 129052
Project: 129052
Buggy source:
public void executeMigration(boolean underPluginModel){
  new AlertUserOnLogin().startup(underPluginModel);
}

Fixed version (ground truth):
@Override public void executeMigration(boolean underPluginModel){
  new AlertUserOnLogin().startup(underPluginModel);
}
Program: 129053
Project: 129053
Buggy source:
public boolean needExecutemigration(){
  return !AlertUserOnLogin.executed;
}

Fixed version (ground truth):
@Override public boolean needExecutemigration(){
  return !AlertUserOnLogin.executed;
}
Program: 129054
Project: 129054
Buggy source:
public void executeWorspaceTasks(){
  log.trace("String_Node_Str");
  List<IWorkspaceMigrationTask> toExecute=GetTasksHelper.getWorkspaceTasks();
  List<String> done=coreService.readWorkspaceTasksDone();
  String lastUser=coreService.getLastUser();
  if (lastUser == null || lastUser.length() == 0) {
    if (done.isEmpty()) {
      initNewWorkspaceTasks();
      done=coreService.readWorkspaceTasksDone();
    }
  }
  Collections.sort(toExecute,new Comparator<IWorkspaceMigrationTask>(){
    public int compare(    IWorkspaceMigrationTask o1,    IWorkspaceMigrationTask o2){
      return o1.getOrder().compareTo(o2.getOrder());
    }
  }
);
  for (  IWorkspaceMigrationTask task : toExecute) {
    if (!done.contains(task.getId())) {
      if (task.execute()) {
        coreService.addWorkspaceTaskDone(task.getId());
        log.debug("String_Node_Str" + task.getName() + "String_Node_Str");
      }
 else {
        log.debug("String_Node_Str" + task.getName() + "String_Node_Str");
      }
    }
  }
}

Fixed version (ground truth):
@Override public void executeWorspaceTasks(){
  log.trace("String_Node_Str");
  List<IWorkspaceMigrationTask> toExecute=GetTasksHelper.getWorkspaceTasks();
  List<String> done=coreService.readWorkspaceTasksDone();
  String lastUser=coreService.getLastUser();
  if (lastUser == null || lastUser.length() == 0) {
    if (done.isEmpty()) {
      initNewWorkspaceTasks();
      done=coreService.readWorkspaceTasksDone();
    }
  }
  Collections.sort(toExecute,new Comparator<IWorkspaceMigrationTask>(){
    @Override public int compare(    IWorkspaceMigrationTask o1,    IWorkspaceMigrationTask o2){
      return o1.getOrder().compareTo(o2.getOrder());
    }
  }
);
  for (  IWorkspaceMigrationTask task : toExecute) {
    if (!done.contains(task.getId())) {
      if (task.execute()) {
        coreService.addWorkspaceTaskDone(task.getId());
        log.debug("String_Node_Str" + task.getName() + "String_Node_Str");
      }
 else {
        log.debug("String_Node_Str" + task.getName() + "String_Node_Str");
      }
    }
  }
}
Program: 129055
Project: 129055
Buggy source:
/** 
 * qli Comment method "validateColumnName".
 */
public static String validateColumnName(final String columnName,final int index){
  String originalColumnName=new String(mapSpecialChar(columnName));
  final String underLine="String_Node_Str";
  boolean isKeyword=KeywordsValidator.isKeyword(originalColumnName);
  String returnedColumnName="String_Node_Str";
  if (!isKeyword) {
    boolean isAllowSpecific=isAllowSpecificCharacters();
    for (int i=0; i < originalColumnName.length(); i++) {
      Character car=originalColumnName.charAt(i);
      if (car.toString().getBytes().length == 1 && !isAllowSpecific) {
        if (((car >= 'a') && (car <= 'z')) || ((car >= 'A') && (car <= 'Z')) || car == '_' || ((car >= '0') && (car <= '9') && (i != 0))) {
          returnedColumnName+=car;
        }
 else {
          returnedColumnName+=underLine;
        }
      }
 else {
        returnedColumnName+=car;
      }
    }
  }
  if (isKeyword || org.apache.commons.lang.StringUtils.countMatches(returnedColumnName,underLine) > (originalColumnName.length() / 2)) {
    returnedColumnName="String_Node_Str" + index;
  }
  return returnedColumnName;
}

Fixed version (ground truth):
public static String validateColumnName(final String columnName,final int index,List<String> labels){
  String name=validateColumnName(columnName,index);
  UniqueStringGenerator<String> uniqueStringGenerator=new UniqueStringGenerator<String>(name,labels){
    @Override protected String getBeanString(    String bean){
      return bean;
    }
  }
;
  return uniqueStringGenerator.getUniqueString();
}
Program: 129061
Project: 129061
Buggy source:
@Override protected void checkComments(IMetadataConnection metadataConnection,String tableName,List<TdColumn> metadataColumns){
  ResultSet keys=null;
  PreparedStatement statement=null;
  try {
    statement=ExtractMetaDataUtils.conn.prepareStatement("String_Node_Str" + tableName + "String_Node_Str");
    ExtractMetaDataUtils.setQueryStatementTimeout(statement);
    if (statement.execute()) {
      keys=statement.getResultSet();
      int i=0;
      while (keys.next()) {
        MetadataColumn metadataColumn=(MetadataColumn)metadataColumns.get(i++);
        metadataColumn.setComment(ManagementTextUtils.filterSpecialChar(keys.getString("String_Node_Str")));
      }
    }
  }
 catch (  Exception e) {
    log.error(e.toString());
  }
 finally {
    try {
      if (keys != null) {
        keys.close();
      }
      if (statement != null) {
        statement.close();
      }
    }
 catch (    SQLException e) {
      log.error(e.toString());
    }
  }
}

Fixed version (ground truth):
@Override protected void checkComments(IMetadataConnection metadataConnection,String tableName,List<TdColumn> metadataColumns){
  ResultSet keys=null;
  PreparedStatement statement=null;
  try {
    statement=ExtractMetaDataUtils.conn.prepareStatement("String_Node_Str" + tableName + "String_Node_Str");
    ExtractMetaDataUtils.setQueryStatementTimeout(statement);
    if (statement.execute()) {
      keys=statement.getResultSet();
      int i=0;
      while (keys.next()) {
        MetadataColumn metadataColumn=metadataColumns.get(i++);
        metadataColumn.setComment(ManagementTextUtils.filterSpecialChar(keys.getString("String_Node_Str")));
      }
    }
  }
 catch (  Exception e) {
    log.error(e.toString());
  }
 finally {
    try {
      if (keys != null) {
        keys.close();
      }
      if (statement != null) {
        statement.close();
      }
    }
 catch (    SQLException e) {
      log.error(e.toString());
    }
  }
}
Program: 129070
Project: 129070
Buggy source:
@Override public void renameFolder(ERepositoryObjectType type,IPath path,String label) throws PersistenceException {
  if (this.repositoryFactoryFromProvider.isLocalConnectionProvider()) {
    this.repositoryFactoryFromProvider.renameFolderForLocal(type,path,label);
  }
 else {
    this.repositoryFactoryFromProvider.renameFolder(type,path,label);
  }
  if (type == ERepositoryObjectType.PROCESS) {
    fireRepositoryPropertyChange(ERepositoryActionName.FOLDER_RENAME.getName(),path,label);
  }
  if (type == ERepositoryObjectType.JOBLET) {
    fireRepositoryPropertyChange(ERepositoryActionName.JOBLET_FOLDER_RENAME.getName(),path,label);
  }
  this.repositoryFactoryFromProvider.updateItemsPath(type,path.removeLastSegments(1).append(label));
}

Fixed version (ground truth):
@Override public void renameFolder(ERepositoryObjectType type,IPath path,String label) throws PersistenceException {
  this.repositoryFactoryFromProvider.renameFolder(type,path,label);
  if (type == ERepositoryObjectType.PROCESS) {
    fireRepositoryPropertyChange(ERepositoryActionName.FOLDER_RENAME.getName(),path,label);
  }
  if (type == ERepositoryObjectType.JOBLET) {
    fireRepositoryPropertyChange(ERepositoryActionName.JOBLET_FOLDER_RENAME.getName(),path,label);
  }
  this.repositoryFactoryFromProvider.updateItemsPath(type,path.removeLastSegments(1).append(label));
}
Program: 129072
Project: 129072
Buggy source:
@Override public void renameFolderForLocal(final ERepositoryObjectType type,final IPath sourcePath,final String label) throws PersistenceException {
  IPath lastPath=sourcePath;
  if (sourcePath.lastSegment().equalsIgnoreCase(label)) {
    String tmpLabel=label.concat(this.getNextId());
    renameFolder(type,sourcePath,tmpLabel);
    lastPath=sourcePath.removeLastSegments(1).append(tmpLabel);
  }
  renameFolder(type,lastPath,label);
}

Fixed version (ground truth):
private void renameFolderForLocal(final ERepositoryObjectType type,final IPath sourcePath,final String label) throws PersistenceException {
  IPath lastPath=sourcePath;
  if (sourcePath.lastSegment().equalsIgnoreCase(label)) {
    String tmpLabel=label.concat(this.getNextId());
    renameFolderExecute(type,sourcePath,tmpLabel);
    lastPath=sourcePath.removeLastSegments(1).append(tmpLabel);
  }
  renameFolderExecute(type,lastPath,label);
}
Program: 129073
Project: 129073
Buggy source:
private boolean isReadOnly(){
  if (GlobalServiceRegister.getDefault().isServiceRegistered(IProxyRepositoryService.class)) {
    IProxyRepositoryService service=(IProxyRepositoryService)GlobalServiceRegister.getDefault().getService(IProxyRepositoryService.class);
    IProxyRepositoryFactory repositoryFactory=service.getProxyRepositoryFactory();
    return !repositoryFactory.getStatus(object).isEditable() || alreadyEditedByUser;
  }
  return true;
}

Fixed version (ground truth):
private boolean isReadOnly(){
  if (GlobalServiceRegister.getDefault().isServiceRegistered(IProxyRepositoryService.class)) {
    IProxyRepositoryService service=(IProxyRepositoryService)GlobalServiceRegister.getDefault().getService(IProxyRepositoryService.class);
    IProxyRepositoryFactory repositoryFactory=service.getProxyRepositoryFactory();
    return !repositoryFactory.getStatus(object).isEditable() || alreadyEditedByUser || isLock;
  }
  return true;
}
Program: 129075
Project: 129075
Buggy source:
@Override public void addPages(){
  mainPage=new PropertiesWizardPage("String_Node_Str",object.getProperty(),path,isReadOnly(),false,lastVersionFound){
    @Override public void createControl(    Composite parent){
      Composite container=new Composite(parent,SWT.NONE);
      GridLayout layout=new GridLayout(2,false);
      container.setLayout(layout);
      if (alreadyEditedByUser) {
        Label label=new Label(container,SWT.NONE);
        label.setForeground(ColorConstants.red);
        label.setText(Messages.getString("String_Node_Str"));
        GridData gridData=new GridData();
        gridData.horizontalSpan=2;
        label.setLayoutData(gridData);
      }
      super.createControl(container);
      setControl(container);
      updateContent();
      addListeners();
      setPageComplete(false);
    }
    protected void evaluateTextField(){
      super.evaluateTextField();
      if (nameStatus.getSeverity() == IStatus.OK) {
        ERepositoryObjectType type=getRepositoryObjectType();
        if (type == ERepositoryObjectType.PROCESS) {
          evaluateNameInRoutine();
        }
 else         if (type == ERepositoryObjectType.ROUTINES || type == ERepositoryObjectType.METADATA_FILE_RULES) {
          evaluateNameInJob();
        }
      }
    }
    @Override public ERepositoryObjectType getRepositoryObjectType(){
      return object.getRepositoryObjectType();
    }
  }
;
  addPage(mainPage);
  setWindowTitle(Messages.getString("String_Node_Str"));
}

Fixed version (ground truth):
@Override public void addPages(){
  mainPage=new PropertiesWizardPage("String_Node_Str",object.getProperty(),path,isReadOnly(),false,lastVersionFound){
    @Override public void createControl(    Composite parent){
      Composite container=new Composite(parent,SWT.NONE);
      GridLayout layout=new GridLayout(2,false);
      container.setLayout(layout);
      if (alreadyEditedByUser && isLock) {
        Label label=new Label(container,SWT.NONE);
        label.setForeground(ColorConstants.red);
        label.setText(Messages.getString("String_Node_Str"));
        GridData gridData=new GridData();
        gridData.horizontalSpan=2;
        label.setLayoutData(gridData);
      }
      super.createControl(container);
      setControl(container);
      updateContent();
      addListeners();
      setPageComplete(false);
    }
    protected void evaluateTextField(){
      super.evaluateTextField();
      if (nameStatus.getSeverity() == IStatus.OK) {
        ERepositoryObjectType type=getRepositoryObjectType();
        if (type == ERepositoryObjectType.PROCESS) {
          evaluateNameInRoutine();
        }
 else         if (type == ERepositoryObjectType.ROUTINES || type == ERepositoryObjectType.METADATA_FILE_RULES) {
          evaluateNameInJob();
        }
      }
    }
    @Override public ERepositoryObjectType getRepositoryObjectType(){
      return object.getRepositoryObjectType();
    }
  }
;
  addPage(mainPage);
  setWindowTitle(Messages.getString("String_Node_Str"));
}
Program: 129076
Project: 129076
Buggy source:
@Override public void dispose(){
  unlockObject();
  super.dispose();
}

Fixed version (ground truth):
@Override public void dispose(){
  if (!isLock) {
    unlockObject();
  }
  super.dispose();
}