nus-yam/ex-repair huggingface dataset:
Program: 123021
Project: 123021
Buggy source:
public IMultiPageTalendEditor getPart(){
  return null;
}

Fixed version (ground truth):
@Override public IMultiPageTalendEditor getPart(){
  return null;
}
Program: 123023
Project: 123023
Buggy source:
public String getRepositoryAliasName(ConnectionItem connectionItem){
  return null;
}

Fixed version (ground truth):
@Override public String getRepositoryAliasName(ConnectionItem connectionItem){
  return null;
}
Program: 123024
Project: 123024
Buggy source:
public Map<String,String> getTableIdAndDbSchemaMap(){
  return null;
}

Fixed version (ground truth):
@Override public Map<String,String> getTableIdAndDbSchemaMap(){
  return null;
}
Program: 123025
Project: 123025
Buggy source:
protected void appendToConsole(final IProcessMessage message){
  getDisplay().asyncExec(new Runnable(){
    public void run(){
      if (message.getType() == MsgType.CORE_OUT || message.getType() == MsgType.CORE_ERR) {
        callViewToDisplayMsg(message);
      }
 else {
        if (!isHideConsoleLine()) {
          callViewToDisplayMsg(message);
        }
      }
    }
    /** 
 * DOC yexiaowei Comment method "callViewToDisplayMsg".
 * @param message
 */
    private void callViewToDisplayMsg(    final IProcessMessage message){
      doAppendToConsole(message);
      scrollToEnd();
    }
  }
);
}

Fixed version (ground truth):
protected void appendToConsole(final IProcessMessage message){
  getDisplay().asyncExec(new Runnable(){
    @Override public void run(){
      if (message.getType() == MsgType.CORE_OUT || message.getType() == MsgType.CORE_ERR) {
        callViewToDisplayMsg(message);
      }
 else {
        if (!isHideConsoleLine()) {
          callViewToDisplayMsg(message);
        }
      }
    }
    /** 
 * DOC yexiaowei Comment method "callViewToDisplayMsg".
 * @param message
 */
    private void callViewToDisplayMsg(    final IProcessMessage message){
      doAppendToConsole(message);
      scrollToEnd();
    }
  }
);
}
Program: 123027
Project: 123027
Buggy source:
public Element getElement(){
  return null;
}

Fixed version (ground truth):
@Override public Element getElement(){
  return null;
}
Program: 123028
Project: 123028
Buggy source:
public BidiMap getHashCurControls(){
  return null;
}

Fixed version (ground truth):
@Override public BidiMap getHashCurControls(){
  return null;
}
Program: 123031
Project: 123031
Buggy source:
protected void addListeners(){
  clearTracePerfBtn.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      if (processContext == null) {
        clearTracePerfBtn.setEnabled(false);
        return;
      }
      ClearPerformanceAction clearPerfAction=new ClearPerformanceAction();
      clearPerfAction.setProcess(processContext.getProcess());
      clearPerfAction.run();
      ClearTraceAction clearTraceAction=new ClearTraceAction();
      clearTraceAction.setProcess(processContext.getProcess());
      clearTraceAction.run();
    }
  }
);
  killBtn.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    final SelectionEvent e){
      kill();
    }
  }
);
}

Fixed version (ground truth):
protected void addListeners(){
  clearTracePerfBtn.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      if (processContext == null) {
        clearTracePerfBtn.setEnabled(false);
        return;
      }
      ClearPerformanceAction clearPerfAction=new ClearPerformanceAction();
      clearPerfAction.setProcess(processContext.getProcess());
      clearPerfAction.run();
      ClearTraceAction clearTraceAction=new ClearTraceAction();
      clearTraceAction.setProcess(processContext.getProcess());
      clearTraceAction.run();
      consoleText.setText("String_Node_Str");
      processContext.clearMessages();
    }
  }
);
  killBtn.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    final SelectionEvent e){
      kill();
    }
  }
);
}
Program: 123037
Project: 123037
Buggy source:
public IWizardPage getNextPage(IWizardPage page){
  return super.getNextPage(page);
}

Fixed version (ground truth):
@Override public IWizardPage getNextPage(IWizardPage page){
  return super.getNextPage(page);
}
Program: 123038
Project: 123038
Buggy source:
public boolean canFinish(){
  if (ftpPage != null && ftpPage.isPageComplete()) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean canFinish(){
  if (ftpPage != null && ftpPage.isPageComplete()) {
    return true;
  }
  return false;
}
Program: 123039
Project: 123039
Buggy source:
public void addPages(){
  setWindowTitle("String_Node_Str");
  setDefaultPageImageDescriptor(ImageProvider.getImageDesc(ECoreImage.UNKNOWN));
  if (isToolBar) {
    pathToSave=null;
  }
  propertiesWizardPage=new Step0WizardPage(connectionProperty,pathToSave,ERepositoryObjectType.METADATA_FILE_FTP,!isRepositoryObjectEditable(),creation);
  propertiesWizardPage.setTitle("String_Node_Str");
  propertiesWizardPage.setDescription(Messages.getString("String_Node_Str"));
  ftpPage=new FTPPage(connectionItem,isRepositoryObjectEditable(),existingNames);
  addPage(propertiesWizardPage);
  addPage(ftpPage);
}

Fixed version (ground truth):
@Override public void addPages(){
  setWindowTitle("String_Node_Str");
  setDefaultPageImageDescriptor(ImageProvider.getImageDesc(ECoreImage.UNKNOWN));
  if (isToolBar) {
    pathToSave=null;
  }
  propertiesWizardPage=new Step0WizardPage(connectionProperty,pathToSave,ERepositoryObjectType.METADATA_FILE_FTP,!isRepositoryObjectEditable(),creation);
  propertiesWizardPage.setTitle("String_Node_Str");
  propertiesWizardPage.setDescription(Messages.getString("String_Node_Str"));
  ftpPage=new FTPPage(connectionItem,isRepositoryObjectEditable(),existingNames);
  addPage(propertiesWizardPage);
  addPage(ftpPage);
}
Program: 123040
Project: 123040
Buggy source:
public boolean performFinish(){
  final IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
  try {
    if (creation) {
      String nextId=factory.getNextId();
      connectionProperty.setId(nextId);
      factory.create(connectionItem,propertiesWizardPage.getDestinationPath());
    }
 else {
      RepositoryUpdateManager.updateFileConnection(connectionItem);
      IWorkspace workspace=ResourcesPlugin.getWorkspace();
      IWorkspaceRunnable operation=new IWorkspaceRunnable(){
        public void run(        IProgressMonitor monitor) throws CoreException {
          try {
            factory.save(connectionItem);
            closeLockStrategy();
          }
 catch (          PersistenceException e) {
            throw new CoreException(new Status(IStatus.ERROR,"String_Node_Str","String_Node_Str",e));
          }
        }
      }
;
      workspace.run(operation,null);
    }
  }
 catch (  Exception e) {
    String detailError=e.toString();
    new ErrorDialogWidthDetailArea(getShell(),PID,"String_Node_Str",detailError);
    return false;
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean performFinish(){
  final IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
  try {
    if (creation) {
      String nextId=factory.getNextId();
      connectionProperty.setId(nextId);
      factory.create(connectionItem,propertiesWizardPage.getDestinationPath());
    }
 else {
      RepositoryUpdateManager.updateFileConnection(connectionItem);
      boolean isModified=propertiesWizardPage.isNameModifiedByUser();
      if (isModified) {
        if (GlobalServiceRegister.getDefault().isServiceRegistered(IDesignerCoreService.class)) {
          IDesignerCoreService service=(IDesignerCoreService)GlobalServiceRegister.getDefault().getService(IDesignerCoreService.class);
          if (service != null) {
            service.refreshComponentView(connectionItem);
          }
        }
      }
      IWorkspace workspace=ResourcesPlugin.getWorkspace();
      IWorkspaceRunnable operation=new IWorkspaceRunnable(){
        public void run(        IProgressMonitor monitor) throws CoreException {
          try {
            factory.save(connectionItem);
            closeLockStrategy();
          }
 catch (          PersistenceException e) {
            throw new CoreException(new Status(IStatus.ERROR,"String_Node_Str","String_Node_Str",e));
          }
        }
      }
;
      workspace.run(operation,null);
    }
  }
 catch (  Exception e) {
    String detailError=e.toString();
    new ErrorDialogWidthDetailArea(getShell(),PID,"String_Node_Str",detailError);
    return false;
  }
  return true;
}
Program: 123041
Project: 123041
Buggy source:
public void init(IWorkbench workbench,IStructuredSelection selection){
}

Fixed version (ground truth):
@Override public void init(IWorkbench workbench,IStructuredSelection selection){
}
Program: 123042
Project: 123042
Buggy source:
public IWizardPage getNextPage(IWizardPage page){
  return super.getNextPage(page);
}

Fixed version (ground truth):
@Override public IWizardPage getNextPage(IWizardPage page){
  return super.getNextPage(page);
}
Program: 123043
Project: 123043
Buggy source:
public boolean canFinish(){
  if (ftpPage != null && ftpPage.isPageComplete()) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean canFinish(){
  if (ftpPage != null && ftpPage.isPageComplete()) {
    return true;
  }
  return false;
}
Program: 123044
Project: 123044
Buggy source:
public void addPages(){
  setWindowTitle("String_Node_Str");
  setDefaultPageImageDescriptor(ImageProvider.getImageDesc(ECoreImage.UNKNOWN));
  if (isToolBar) {
    pathToSave=null;
  }
  propertiesWizardPage=new Step0WizardPage(connectionProperty,pathToSave,ERepositoryObjectType.METADATA_FILE_FTP,!isRepositoryObjectEditable(),creation);
  propertiesWizardPage.setTitle("String_Node_Str");
  propertiesWizardPage.setDescription(Messages.getString("String_Node_Str"));
  ftpPage=new FTPPage(connectionItem,isRepositoryObjectEditable(),existingNames);
  addPage(propertiesWizardPage);
  addPage(ftpPage);
}

Fixed version (ground truth):
@Override public void addPages(){
  setWindowTitle("String_Node_Str");
  setDefaultPageImageDescriptor(ImageProvider.getImageDesc(ECoreImage.UNKNOWN));
  if (isToolBar) {
    pathToSave=null;
  }
  propertiesWizardPage=new Step0WizardPage(connectionProperty,pathToSave,ERepositoryObjectType.METADATA_FILE_FTP,!isRepositoryObjectEditable(),creation);
  propertiesWizardPage.setTitle("String_Node_Str");
  propertiesWizardPage.setDescription(Messages.getString("String_Node_Str"));
  ftpPage=new FTPPage(connectionItem,isRepositoryObjectEditable(),existingNames);
  addPage(propertiesWizardPage);
  addPage(ftpPage);
}
Program: 123045
Project: 123045
Buggy source:
public void run(IProgressMonitor monitor) throws CoreException {
  try {
    factory.save(connectionItem);
    closeLockStrategy();
  }
 catch (  PersistenceException e) {
    throw new CoreException(new Status(IStatus.ERROR,"String_Node_Str","String_Node_Str",e));
  }
}

Fixed version (ground truth):
@Override public void run(IProgressMonitor monitor) throws CoreException {
  try {
    factory.save(connectionItem);
    closeLockStrategy();
  }
 catch (  PersistenceException e) {
    throw new CoreException(new Status(IStatus.ERROR,"String_Node_Str","String_Node_Str",e));
  }
}
Program: 123046
Project: 123046
Buggy source:
public boolean performFinish(){
  final IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
  try {
    if (creation) {
      String nextId=factory.getNextId();
      connectionProperty.setId(nextId);
      factory.create(connectionItem,propertiesWizardPage.getDestinationPath());
    }
 else {
      RepositoryUpdateManager.updateFileConnection(connectionItem);
      IWorkspace workspace=ResourcesPlugin.getWorkspace();
      IWorkspaceRunnable operation=new IWorkspaceRunnable(){
        public void run(        IProgressMonitor monitor) throws CoreException {
          try {
            factory.save(connectionItem);
            closeLockStrategy();
          }
 catch (          PersistenceException e) {
            throw new CoreException(new Status(IStatus.ERROR,"String_Node_Str","String_Node_Str",e));
          }
        }
      }
;
      workspace.run(operation,null);
    }
  }
 catch (  Exception e) {
    String detailError=e.toString();
    new ErrorDialogWidthDetailArea(getShell(),PID,"String_Node_Str",detailError);
    return false;
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean performFinish(){
  final IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
  try {
    if (creation) {
      String nextId=factory.getNextId();
      connectionProperty.setId(nextId);
      factory.create(connectionItem,propertiesWizardPage.getDestinationPath());
    }
 else {
      RepositoryUpdateManager.updateFileConnection(connectionItem);
      boolean isModified=propertiesWizardPage.isNameModifiedByUser();
      if (isModified) {
        if (GlobalServiceRegister.getDefault().isServiceRegistered(IDesignerCoreService.class)) {
          IDesignerCoreService service=(IDesignerCoreService)GlobalServiceRegister.getDefault().getService(IDesignerCoreService.class);
          if (service != null) {
            service.refreshComponentView(connectionItem);
          }
        }
      }
      IWorkspace workspace=ResourcesPlugin.getWorkspace();
      IWorkspaceRunnable operation=new IWorkspaceRunnable(){
        @Override public void run(        IProgressMonitor monitor) throws CoreException {
          try {
            factory.save(connectionItem);
            closeLockStrategy();
          }
 catch (          PersistenceException e) {
            throw new CoreException(new Status(IStatus.ERROR,"String_Node_Str","String_Node_Str",e));
          }
        }
      }
;
      workspace.run(operation,null);
    }
  }
 catch (  Exception e) {
    String detailError=e.toString();
    new ErrorDialogWidthDetailArea(getShell(),PID,"String_Node_Str",detailError);
    return false;
  }
  return true;
}
Program: 123053
Project: 123053
Buggy source:
private Property findObject(String idOrName,String name){
  for (  Project p : allRoutineItems.keySet()) {
    List<Property> list=allRoutineItems.get(p);
    if (list != null) {
      for (      Property property : list) {
        String objIdOrName=property.getId();
        String objName=property.getLabel();
        if (objIdOrName.equals(idOrName) && property.getItem() instanceof RoutineItem) {
          return property;
        }
 else         if (name.equals(objName) && property.getItem() instanceof RoutineItem) {
          return property;
        }
      }
    }
  }
  return null;
}

Fixed version (ground truth):
private Property findObject(String idOrName,String name){
  for (  Project p : allRoutineItems.keySet()) {
    List<Property> list=allRoutineItems.get(p);
    if (list != null) {
      for (      Property property : list) {
        String objIdOrName=property.getId();
        String objName=property.getLabel();
        if (objIdOrName != null && objIdOrName.equals(idOrName) && property.getItem() instanceof RoutineItem) {
          return property;
        }
 else         if (objName != null && objName.equals(name) && property.getItem() instanceof RoutineItem) {
          return property;
        }
      }
    }
  }
  return null;
}
Program: 123054
Project: 123054
Buggy source:
public void doubleClick(DoubleClickEvent event){
  okPressed();
}

Fixed version (ground truth):
@Override public void doubleClick(DoubleClickEvent event){
  okPressed();
}
Program: 123055
Project: 123055
Buggy source:
@Override protected Control createDialogArea(Composite parent){
  TnsParser tnsparser=new TnsParser(tnsFile);
  treeViewer=new TreeViewer(parent);
  Tree tree=treeViewer.getTree();
  tree.setHeaderVisible(true);
  tree.setLinesVisible(true);
  GridData layoutData=new GridData(GridData.FILL_BOTH);
  layoutData.heightHint=400;
  layoutData.widthHint=300;
  tree.setLayoutData(layoutData);
  TreeColumn column1st=new TreeColumn(tree,SWT.NONE);
  column1st.setText(Messages.getString("String_Node_Str"));
  column1st.setWidth(200);
  TreeColumn column2nd=new TreeColumn(tree,SWT.NONE);
  column2nd.setText(Messages.getString("String_Node_Str"));
  column2nd.setWidth(200);
  treeViewer.setContentProvider(new TnsContentProvider());
  treeViewer.setLabelProvider(new TnsTableProvider());
  treeViewer.setInput(tnsparser.getTree());
  treeViewer.expandAll();
  treeViewer.addDoubleClickListener(new IDoubleClickListener(){
    public void doubleClick(    DoubleClickEvent event){
      okPressed();
    }
  }
);
  return tree;
}

Fixed version (ground truth):
@Override protected Control createDialogArea(Composite parent){
  TnsParser tnsparser=new TnsParser(tnsFile);
  treeViewer=new TreeViewer(parent);
  Tree tree=treeViewer.getTree();
  tree.setHeaderVisible(true);
  tree.setLinesVisible(true);
  GridData layoutData=new GridData(GridData.FILL_BOTH);
  layoutData.heightHint=400;
  layoutData.widthHint=300;
  tree.setLayoutData(layoutData);
  TreeColumn column1st=new TreeColumn(tree,SWT.NONE);
  column1st.setText(Messages.getString("String_Node_Str"));
  column1st.setWidth(200);
  TreeColumn column2nd=new TreeColumn(tree,SWT.NONE);
  column2nd.setText(Messages.getString("String_Node_Str"));
  column2nd.setWidth(200);
  treeViewer.setContentProvider(new TnsContentProvider());
  treeViewer.setLabelProvider(new TnsTableProvider());
  treeViewer.setInput(tnsparser.getTree());
  treeViewer.expandAll();
  treeViewer.addDoubleClickListener(new IDoubleClickListener(){
    @Override public void doubleClick(    DoubleClickEvent event){
      okPressed();
    }
  }
);
  if (tnsparser.getTree().getChildren().size() == 0) {
    MessageDialog.openInformation(getParentShell(),"String_Node_Str","String_Node_Str");
  }
  return tree;
}
Program: 123056
Project: 123056
Buggy source:
public void propertyChange(PropertyChangeEvent evt){
}

Fixed version (ground truth):
@Override public void propertyChange(PropertyChangeEvent evt){
}
Program: 123057
Project: 123057
Buggy source:
@Override public int estimateRowSize(Composite subComposite,final IElementParameter param){
  final DecoratedField dField=new DecoratedField(subComposite,SWT.BORDER,new IControlCreator(){
    public Control createControl(    Composite parent,    int style){
      return getWidgetFactory().createGroup(parent,param.getDisplayName());
    }
  }
);
  Point initialSize=dField.getLayoutControl().computeSize(SWT.DEFAULT,SWT.DEFAULT);
  dField.getLayoutControl().dispose();
  return initialSize.y + ITabbedPropertyConstants.VSPACE;
}

Fixed version (ground truth):
@Override public int estimateRowSize(Composite subComposite,final IElementParameter param){
  final DecoratedField dField=new DecoratedField(subComposite,SWT.BORDER,new IControlCreator(){
    @Override public Control createControl(    Composite parent,    int style){
      return getWidgetFactory().createGroup(parent,param.getDisplayName());
    }
  }
);
  Point initialSize=dField.getLayoutControl().computeSize(SWT.DEFAULT,SWT.DEFAULT);
  dField.getLayoutControl().dispose();
  return initialSize.y + ITabbedPropertyConstants.VSPACE;
}
Program: 123058
Project: 123058
Buggy source:
public Control createControl(Composite parent,int style){
  return getWidgetFactory().createGroup(parent,param.getDisplayName());
}

Fixed version (ground truth):
@Override public Control createControl(Composite parent,int style){
  return getWidgetFactory().createGroup(parent,param.getDisplayName());
}
Program: 123063
Project: 123063
Buggy source:
@SuppressWarnings("String_Node_Str") private void init(ProcessType process){
  allRoutineItems.clear();
  ProjectManager projectManager=ProjectManager.getInstance();
  Project currentProject=projectManager.getCurrentProject();
  initModels(currentProject);
  initRefProjects(currentProject);
  List<RoutinesParameterType> routinesDependencies=(List<RoutinesParameterType>)process.getParameters().getRoutinesParameter();
  for (  RoutinesParameterType type : routinesDependencies) {
    RoutineItemRecord record=new RoutineItemRecord();
    record.setName(type.getName());
    Property property=findObject(type.getId(),type.getName());
    if (property != null) {
      record.setId(property.getId());
      record.setLabel(property.getLabel());
    }
 else {
      record.setHasProblem(true);
      record.setLabel(type.getName());
    }
    if (!record.hasProblem()) {
      if (((RoutineItem)property.getItem()).isBuiltIn()) {
        systemRoutines.add(record);
      }
 else {
        userRoutines.add(record);
      }
    }
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private void init(ProcessType process){
  allRoutineItems.clear();
  ProjectManager projectManager=ProjectManager.getInstance();
  Project currentProject=projectManager.getCurrentProject();
  initModels(currentProject);
  initRefProjects(currentProject);
  List<RoutinesParameterType> routinesDependencies=process.getParameters().getRoutinesParameter();
  for (  RoutinesParameterType type : routinesDependencies) {
    RoutineItemRecord record=new RoutineItemRecord();
    record.setName(type.getName());
    Property property=findObject(type.getId(),type.getName());
    if (property != null) {
      record.setId(property.getId());
      record.setLabel(property.getLabel());
    }
 else {
      record.setHasProblem(true);
      record.setLabel(type.getName());
    }
    if (!record.hasProblem()) {
      if (((RoutineItem)property.getItem()).isBuiltIn()) {
        systemRoutines.add(record);
      }
 else {
        userRoutines.add(record);
      }
    }
  }
}
Program: 123064
Project: 123064
Buggy source:
public void widgetSelected(SelectionEvent e){
  moveDatas(false);
}

Fixed version (ground truth):
@Override public void widgetSelected(SelectionEvent e){
  moveDatas(false);
}
Program: 123066
Project: 123066
Buggy source:
private Property findObject(String idOrName,String name){
  for (  Project p : allRoutineItems.keySet()) {
    List<Property> list=allRoutineItems.get(p);
    if (list != null) {
      for (      Property property : list) {
        String objIdOrName=property.getId();
        String objName=property.getLabel();
        if (objIdOrName.equals(idOrName) && property.getItem() instanceof RoutineItem) {
          return property;
        }
 else         if (name.equals(objName) && property.getItem() instanceof RoutineItem) {
          return property;
        }
      }
    }
  }
  return null;
}

Fixed version (ground truth):
private Property findObject(String idOrName,String name){
  for (  Project p : allRoutineItems.keySet()) {
    List<Property> list=allRoutineItems.get(p);
    if (list != null) {
      for (      Property property : list) {
        String objIdOrName=property.getId();
        String objName=property.getLabel();
        if (objIdOrName != null && objIdOrName.equals(idOrName) && property.getItem() instanceof RoutineItem) {
          return property;
        }
 else         if (objName != null && objName.equals(name) && property.getItem() instanceof RoutineItem) {
          return property;
        }
      }
    }
  }
  return null;
}
Program: 123067
Project: 123067
Buggy source:
public void selectionChanged(SelectionChangedEvent event){
  updateButtons();
}

Fixed version (ground truth):
@Override public void selectionChanged(SelectionChangedEvent event){
  updateButtons();
}
Program: 123069
Project: 123069
Buggy source:
protected Control createContents(Composite parent){
  Control contents=super.createContents(parent);
  updateButtons();
  return contents;
}

Fixed version (ground truth):
@Override protected Control createContents(Composite parent){
  Control contents=super.createContents(parent);
  updateButtons();
  return contents;
}
Program: 123070
Project: 123070
Buggy source:
@Override protected Control createDialogArea(Composite parent){
  TnsParser tnsparser=new TnsParser(tnsFile);
  treeViewer=new TreeViewer(parent);
  Tree tree=treeViewer.getTree();
  tree.setHeaderVisible(true);
  tree.setLinesVisible(true);
  GridData layoutData=new GridData(GridData.FILL_BOTH);
  layoutData.heightHint=400;
  layoutData.widthHint=300;
  tree.setLayoutData(layoutData);
  TreeColumn column1st=new TreeColumn(tree,SWT.NONE);
  column1st.setText(Messages.getString("String_Node_Str"));
  column1st.setWidth(200);
  TreeColumn column2nd=new TreeColumn(tree,SWT.NONE);
  column2nd.setText(Messages.getString("String_Node_Str"));
  column2nd.setWidth(200);
  treeViewer.setContentProvider(new TnsContentProvider());
  treeViewer.setLabelProvider(new TnsTableProvider());
  treeViewer.setInput(tnsparser.getTree());
  treeViewer.expandAll();
  treeViewer.addDoubleClickListener(new IDoubleClickListener(){
    public void doubleClick(    DoubleClickEvent event){
      okPressed();
    }
  }
);
  return tree;
}

Fixed version (ground truth):
@Override protected Control createDialogArea(Composite parent){
  TnsParser tnsparser=new TnsParser(tnsFile);
  treeViewer=new TreeViewer(parent);
  Tree tree=treeViewer.getTree();
  tree.setHeaderVisible(true);
  tree.setLinesVisible(true);
  GridData layoutData=new GridData(GridData.FILL_BOTH);
  layoutData.heightHint=400;
  layoutData.widthHint=300;
  tree.setLayoutData(layoutData);
  TreeColumn column1st=new TreeColumn(tree,SWT.NONE);
  column1st.setText(Messages.getString("String_Node_Str"));
  column1st.setWidth(200);
  TreeColumn column2nd=new TreeColumn(tree,SWT.NONE);
  column2nd.setText(Messages.getString("String_Node_Str"));
  column2nd.setWidth(200);
  treeViewer.setContentProvider(new TnsContentProvider());
  treeViewer.setLabelProvider(new TnsTableProvider());
  treeViewer.setInput(tnsparser.getTree());
  treeViewer.expandAll();
  treeViewer.addDoubleClickListener(new IDoubleClickListener(){
    public void doubleClick(    DoubleClickEvent event){
      okPressed();
    }
  }
);
  if (tnsparser.getTree().getChildren().size() == 0) {
    MessageDialog.openInformation(getParentShell(),"String_Node_Str","String_Node_Str");
  }
  return tree;
}
Program: 123075
Project: 123075
Buggy source:
/** 
 * DOC hcw Comment method "createTableViewer".
 * @param parent
 */
private void createTable(Composite parent){
  Composite composite=new Composite(parent,SWT.NONE);
  composite.setLayout(new GridLayout());
  composite.setLayoutData(new GridData(GridData.FILL_BOTH));
  table=new Table(composite,SWT.BORDER);
  GridData gd=new GridData(SWT.FILL,SWT.FILL,true,true);
  table.setLayoutData(gd);
  table.setLinesVisible(true);
  table.setHeaderVisible(true);
  TableColumn nameColumn=new TableColumn(table,SWT.NONE);
  nameColumn.setWidth(119);
  nameColumn.setText(Messages.getString("String_Node_Str"));
  TableColumn defaultColumn=new TableColumn(table,SWT.NONE);
  defaultColumn.setWidth(139);
  defaultColumn.setText(Messages.getString("String_Node_Str"));
  editors=new ArrayList<TableEditor>();
}

Fixed version (ground truth):
/** 
 * DOC hcw Comment method "createTableViewer".
 * @param parent
 */
private void createTable(Composite parent){
  Composite composite=new Composite(parent,SWT.NONE);
  composite.setLayout(new GridLayout());
  composite.setLayoutData(new GridData(GridData.FILL_BOTH));
  table=new Table(composite,SWT.BORDER);
  GridData gd=new GridData(SWT.FILL,SWT.FILL,true,true);
  table.setLayoutData(gd);
  table.setLinesVisible(true);
  table.setHeaderVisible(true);
  TableColumn nameColumn=new TableColumn(table,SWT.NONE);
  nameColumn.setWidth(120);
  nameColumn.setText(Messages.getString("String_Node_Str"));
  TableColumn defaultColumn=new TableColumn(table,SWT.NONE);
  defaultColumn.setWidth(108);
  defaultColumn.setText(Messages.getString("String_Node_Str"));
  editors=new ArrayList<TableEditor>();
}
Program: 123076
Project: 123076
Buggy source:
@Override protected Control createDialogArea(Composite parent){
  Composite composite=(Composite)super.createDialogArea(parent);
  initializeDialogUnits(composite);
  GridData data=new GridData(GridData.FILL_BOTH);
  data.heightHint=240;
  data.widthHint=290;
  composite.setLayoutData(data);
  createTable(composite);
  return composite;
}

Fixed version (ground truth):
@Override protected Control createDialogArea(Composite parent){
  Composite composite=(Composite)super.createDialogArea(parent);
  initializeDialogUnits(composite);
  GridData data=new GridData(GridData.FILL_BOTH);
  data.heightHint=240;
  data.widthHint=260;
  composite.setLayoutData(data);
  createTable(composite);
  return composite;
}
Program: 123077
Project: 123077
Buggy source:
private void createComboEditor(TableItem item,int column,String[] displayText,int selectIndex){
  TableEditor editor=new TableEditor(table);
  final CCombo combo=new CCombo(table,SWT.READ_ONLY);
  for (  String text : displayText) {
    combo.add(text);
  }
  combo.select(selectIndex);
  editor.grabHorizontal=true;
  editor.setEditor(combo,item,column);
  editor.minimumWidth=combo.computeSize(SWT.DEFAULT,SWT.DEFAULT).x;
  editor.layout();
  editors.add(editor);
}

Fixed version (ground truth):
private void createComboEditor(TableItem item,int column,String[] displayText,int selectIndex){
  TableEditor editor=new TableEditor(table);
  final CCombo combo=new CCombo(table,SWT.READ_ONLY);
  for (  String text : displayText) {
    combo.add(text);
  }
  combo.select(selectIndex);
  editor.grabHorizontal=true;
  editor.setEditor(combo,item,column);
  editor.layout();
  editors.add(editor);
}
Program: 123078
Project: 123078
Buggy source:
public void partBroughtToTop(IWorkbenchPart part){
  IProcess2 process=getJobFromActivatedEditor(part);
  if (process != null && currentProcess != process) {
    changedProcess=true;
    currentProcess=process;
    setContextsView(process);
    JobSettings.switchToCurJobSettingsView();
    for (    IJobTrackerListener listener : jobTrackerListeners) {
      listener.focusOnJob(process);
    }
  }
}

Fixed version (ground truth):
public void partBroughtToTop(IWorkbenchPart part){
  IProcess2 process=getJobFromActivatedEditor(part);
  if (process != null && currentProcess != process) {
    changedProcess=true;
    currentProcess=process;
    setContextsView(process);
    JobSettings.switchToCurJobSettingsView();
    refreshProcessView();
    for (    IJobTrackerListener listener : jobTrackerListeners) {
      listener.focusOnJob(process);
    }
  }
}
Program: 123079
Project: 123079
Buggy source:
public static ProcessView findProcessView(){
  try {
    IWorkbenchPage page=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
    return (ProcessView)page.findView(ID);
  }
 catch (  Exception e) {
    return null;
  }
}

Fixed version (ground truth):
public static ProcessView findProcessView(){
  IWorkbenchWindow ww=PlatformUI.getWorkbench().getActiveWorkbenchWindow();
  if (ww != null) {
    IWorkbenchPage activePage=ww.getActivePage();
    if (activePage != null) {
      IViewPart part=activePage.findView(ID);
      try {
        if (part == null) {
          part=activePage.showView(ID);
        }
      }
 catch (      Exception e) {
      }
      return (ProcessView)part;
    }
  }
  return null;
}
Program: 123080
Project: 123080
Buggy source:
@Override protected boolean calculateEnabled(){
  List objects=getSelectedObjects();
  if (!objects.isEmpty()) {
    for (    Object o : objects) {
      if (o instanceof NoteEditPart) {
        return true;
      }
      if (o instanceof NodeLabelEditPart) {
        return true;
      }
      if (o instanceof ConnLabelEditPart) {
        return true;
      }
      if (o instanceof SubjobContainerPart) {
        return true;
      }
      if (!(o instanceof NodePart) && !(o instanceof NoteEditPart)) {
        return false;
      }
      AbstractProcessProvider pProvider=AbstractProcessProvider.findProcessProviderFromPID(IComponent.JOBLET_PID);
      if (pProvider != null && !pProvider.canCopyNode((Node)((NodePart)o).getModel())) {
        return false;
      }
    }
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override protected boolean calculateEnabled(){
  List objects=getSelectedObjects();
  if (!objects.isEmpty()) {
    for (    Object o : objects) {
      if (o instanceof NoteEditPart) {
        return true;
      }
      if (o instanceof NodeLabelEditPart) {
        return true;
      }
      if (o instanceof SubjobContainerPart) {
        return true;
      }
      if (!(o instanceof NodePart) && !(o instanceof NoteEditPart)) {
        return false;
      }
      AbstractProcessProvider pProvider=AbstractProcessProvider.findProcessProviderFromPID(IComponent.JOBLET_PID);
      if (pProvider != null && !pProvider.canCopyNode((Node)((NodePart)o).getModel())) {
        return false;
      }
    }
    return true;
  }
  return false;
}
Program: 123081
Project: 123081
Buggy source:
@Override protected boolean calculateEnabled(){
  List objects=getSelectedObjects();
  if (objects.isEmpty()) {
    return false;
  }
  if (!(objects.get(0) instanceof EditPart)) {
    return false;
  }
  AbstractProcessProvider pProvider=AbstractProcessProvider.findProcessProviderFromPID(IComponent.JOBLET_PID);
  if (pProvider != null) {
    boolean allJobletnode=true;
    boolean hasNode=false;
    for (    Object o : objects) {
      if (o instanceof NodePart) {
        hasNode=true;
        Node no=(Node)((NodePart)o).getModel();
        if (no.getJobletNode() == null) {
          allJobletnode=false;
        }
        if (!pProvider.canDeleteNode(no)) {
          return false;
        }
      }
    }
    if (allJobletnode && hasNode) {
      return false;
    }
  }
  return true;
}

Fixed version (ground truth):
@Override protected boolean calculateEnabled(){
  List objects=getSelectedObjects();
  if (objects.isEmpty() || (objects.size() == 1 && objects.get(0) instanceof ProcessPart)) {
    return false;
  }
  if (!(objects.get(0) instanceof EditPart)) {
    return false;
  }
  AbstractProcessProvider pProvider=AbstractProcessProvider.findProcessProviderFromPID(IComponent.JOBLET_PID);
  if (pProvider != null) {
    boolean allJobletnode=true;
    boolean hasNode=false;
    for (    Object o : objects) {
      if (o instanceof NodePart) {
        hasNode=true;
        Node no=(Node)((NodePart)o).getModel();
        if (no.getJobletNode() == null) {
          allJobletnode=false;
        }
        if (!pProvider.canDeleteNode(no)) {
          return false;
        }
      }
    }
    if (allJobletnode && hasNode) {
      return false;
    }
  }
  return true;
}
Program: 123082
Project: 123082
Buggy source:
public void partBroughtToTop(IWorkbenchPart part){
  IProcess2 process=getJobFromActivatedEditor(part);
  if (process != null && currentProcess != process) {
    changedProcess=true;
    currentProcess=process;
    setContextsView(process);
    JobSettings.switchToCurJobSettingsView();
    for (    IJobTrackerListener listener : jobTrackerListeners) {
      listener.focusOnJob(process);
    }
  }
}

Fixed version (ground truth):
public void partBroughtToTop(IWorkbenchPart part){
  IProcess2 process=getJobFromActivatedEditor(part);
  if (process != null && currentProcess != process) {
    changedProcess=true;
    currentProcess=process;
    setContextsView(process);
    JobSettings.switchToCurJobSettingsView();
    refreshProcessView();
    for (    IJobTrackerListener listener : jobTrackerListeners) {
      listener.focusOnJob(process);
    }
  }
}
Program: 123083
Project: 123083
Buggy source:
public void selectTab(final EComponentCategory category){
  if (tabFactory.getSelection().getCategory().equals(category)) {
    return;
  }
  List<TalendPropertyTabDescriptor> allTabs=tabFactory.getInput();
  final List<TalendPropertyTabDescriptor> selection=new ArrayList<TalendPropertyTabDescriptor>();
  for (  TalendPropertyTabDescriptor talendPropertyTabDescriptor : allTabs) {
    if (talendPropertyTabDescriptor.getCategory().equals(category)) {
      dc=new ProcessComposite(tabFactory.getTabComposite(),SWT.H_SCROLL | SWT.V_SCROLL | SWT.NO_FOCUS);
      refresh();
      selection.add(talendPropertyTabDescriptor);
    }
  }
  tabFactory.setSelection(new StructuredSelection(){
    public List toList(){
      return selection;
    }
  }
);
}

Fixed version (ground truth):
public void selectTab(final EComponentCategory category){
  if (tabFactory.getSelection().getCategory().equals(category)) {
    return;
  }
  List<TalendPropertyTabDescriptor> allTabs=tabFactory.getInput();
  final List<TalendPropertyTabDescriptor> selection=new ArrayList<TalendPropertyTabDescriptor>();
  for (  TalendPropertyTabDescriptor talendPropertyTabDescriptor : allTabs) {
    if (talendPropertyTabDescriptor.getCategory().equals(category)) {
      dc=new ProcessComposite(tabFactory.getTabComposite(),SWT.H_SCROLL | SWT.V_SCROLL | SWT.NO_FOCUS);
      refresh();
      selection.add(talendPropertyTabDescriptor);
    }
  }
  tabFactory.setSelection(new StructuredSelection(){
    @Override public List toList(){
      return selection;
    }
  }
);
}
Program: 123084
Project: 123084
Buggy source:
public List toList(){
  return selection;
}

Fixed version (ground truth):
@Override public List toList(){
  return selection;
}
Program: 123085
Project: 123085
Buggy source:
public Iterator iterator(){
  return null;
}

Fixed version (ground truth):
@Override public Iterator iterator(){
  return null;
}
Program: 123086
Project: 123086
Buggy source:
public void focusLost(FocusEvent e){
  log.trace(Messages.getString("String_Node_Str"));
  if (ca != null) {
    IContextService contextService=(IContextService)RunProcessPlugin.getDefault().getWorkbench().getAdapter(IContextService.class);
    contextService.deactivateContext(ca);
  }
}

Fixed version (ground truth):
@Override public void focusLost(FocusEvent e){
  log.trace(Messages.getString("String_Node_Str"));
  if (ca != null) {
    IContextService contextService=(IContextService)RunProcessPlugin.getDefault().getWorkbench().getAdapter(IContextService.class);
    contextService.deactivateContext(ca);
  }
}
Program: 123087
Project: 123087
Buggy source:
public Object[] toArray(){
  return null;
}

Fixed version (ground truth):
@Override public Object[] toArray(){
  return null;
}
Program: 123088
Project: 123088
Buggy source:
public void propertyChange(PropertyChangeEvent evt){
  if (RunProcessContextManager.PROP_ACTIVE.equals(evt.getPropertyName())) {
    runningProcessChanged();
  }
}

Fixed version (ground truth):
@Override public void propertyChange(PropertyChangeEvent evt){
  if (RunProcessContextManager.PROP_ACTIVE.equals(evt.getPropertyName())) {
    runningProcessChanged();
  }
}
Program: 123089
Project: 123089
Buggy source:
public void setElement(){
  EComponentCategory[] categories=getCategories();
  final List<TalendPropertyTabDescriptor> descriptors=new ArrayList<TalendPropertyTabDescriptor>();
  for (  EComponentCategory category : categories) {
    TalendPropertyTabDescriptor d=new TalendPropertyTabDescriptor(category);
    descriptors.add(d);
  }
  tabFactory.setInput(descriptors);
  tabFactory.setSelection(new IStructuredSelection(){
    public Object getFirstElement(){
      return null;
    }
    public Iterator iterator(){
      return null;
    }
    public int size(){
      return 0;
    }
    public Object[] toArray(){
      return null;
    }
    public List toList(){
      List<TalendPropertyTabDescriptor> d=new ArrayList<TalendPropertyTabDescriptor>();
      if (descriptors.size() > 0) {
        if (currentSelectedTab != null) {
          for (          TalendPropertyTabDescriptor ds : descriptors) {
            if (ds.getCategory() == currentSelectedTab.getCategory()) {
              d.add(ds);
              return d;
            }
          }
        }
        d.add(descriptors.get(0));
      }
      return d;
    }
    public boolean isEmpty(){
      return false;
    }
  }
);
}

Fixed version (ground truth):
public void setElement(){
  EComponentCategory[] categories=getCategories();
  final List<TalendPropertyTabDescriptor> descriptors=new ArrayList<TalendPropertyTabDescriptor>();
  for (  EComponentCategory category : categories) {
    TalendPropertyTabDescriptor d=new TalendPropertyTabDescriptor(category);
    descriptors.add(d);
  }
  tabFactory.setInput(descriptors);
  tabFactory.setSelection(new IStructuredSelection(){
    @Override public Object getFirstElement(){
      return null;
    }
    @Override public Iterator iterator(){
      return null;
    }
    @Override public int size(){
      return 0;
    }
    @Override public Object[] toArray(){
      return null;
    }
    @Override public List toList(){
      List<TalendPropertyTabDescriptor> d=new ArrayList<TalendPropertyTabDescriptor>();
      if (descriptors.size() > 0) {
        if (currentSelectedTab != null) {
          for (          TalendPropertyTabDescriptor ds : descriptors) {
            if (ds.getCategory() == currentSelectedTab.getCategory()) {
              d.add(ds);
              return d;
            }
          }
        }
        d.add(descriptors.get(0));
      }
      return d;
    }
    @Override public boolean isEmpty(){
      return false;
    }
  }
);
}
Program: 123090
Project: 123090
Buggy source:
public void focusGained(FocusEvent e){
  log.trace(Messages.getString("String_Node_Str"));
  IContextService contextService=(IContextService)RunProcessPlugin.getDefault().getWorkbench().getAdapter(IContextService.class);
  ca=contextService.activateContext("String_Node_Str");
}

Fixed version (ground truth):
@Override public void focusGained(FocusEvent e){
  log.trace(Messages.getString("String_Node_Str"));
  IContextService contextService=(IContextService)RunProcessPlugin.getDefault().getWorkbench().getAdapter(IContextService.class);
  ca=contextService.activateContext("String_Node_Str");
}
Program: 123091
Project: 123091
Buggy source:
public void widgetSelected(final SelectionEvent e){
  if (moveButton.getText().equals("String_Node_Str")) {
    sash.setWeights(new int[]{23,1});
    moveButton.setToolTipText(Messages.getString("String_Node_Str"));
    moveButton.setText("String_Node_Str");
  }
 else   if (moveButton.getText().equals("String_Node_Str")) {
    sash.setWeights(new int[]{18,5});
    moveButton.setToolTipText(Messages.getString("String_Node_Str"));
    moveButton.setText("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void widgetSelected(final SelectionEvent e){
  if (moveButton.getText().equals("String_Node_Str")) {
    sash.setWeights(new int[]{23,1});
    moveButton.setToolTipText(Messages.getString("String_Node_Str"));
    moveButton.setText("String_Node_Str");
  }
 else   if (moveButton.getText().equals("String_Node_Str")) {
    sash.setWeights(new int[]{18,5});
    moveButton.setToolTipText(Messages.getString("String_Node_Str"));
    moveButton.setText("String_Node_Str");
  }
}
Program: 123092
Project: 123092
Buggy source:
public boolean isEmpty(){
  return false;
}

Fixed version (ground truth):
@Override public boolean isEmpty(){
  return false;
}
Program: 123093
Project: 123093
Buggy source:
public static ProcessView findProcessView(){
  try {
    IWorkbenchPage page=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
    return (ProcessView)page.findView(ID);
  }
 catch (  Exception e) {
    return null;
  }
}

Fixed version (ground truth):
public static ProcessView findProcessView(){
  IWorkbenchWindow ww=PlatformUI.getWorkbench().getActiveWorkbenchWindow();
  if (ww != null) {
    IWorkbenchPage activePage=ww.getActivePage();
    if (activePage != null) {
      IViewPart part=activePage.findView(ID);
      try {
        if (part == null) {
          part=activePage.showView(ID);
        }
      }
 catch (      Exception e) {
      }
      return (ProcessView)part;
    }
  }
  return null;
}
Program: 123095
Project: 123095
Buggy source:
public int size(){
  return 0;
}

Fixed version (ground truth):
@Override public int size(){
  return 0;
}
Program: 123096
Project: 123096
Buggy source:
public void selectionChanged(SelectionChangedEvent event){
  IStructuredSelection selection=(IStructuredSelection)event.getSelection();
  TalendPropertyTabDescriptor descriptor=(TalendPropertyTabDescriptor)selection.getFirstElement();
  if (descriptor == null) {
    return;
  }
  if (currentSelectedTab != null && (currentSelectedTab.getCategory() != descriptor.getCategory())) {
    for (    Control curControl : tabFactory.getTabComposite().getChildren()) {
      curControl.dispose();
    }
  }
  if (currentSelectedTab == null || currentSelectedTab.getCategory() != descriptor.getCategory() || selectedPrimary) {
    currentSelectedTab=descriptor;
    createDynamicComposite(tabFactory.getTabComposite(),(Element)descriptor.getData(),descriptor.getCategory());
    selectedPrimary=false;
  }
}

Fixed version (ground truth):
@Override public void selectionChanged(SelectionChangedEvent event){
  IStructuredSelection selection=(IStructuredSelection)event.getSelection();
  TalendPropertyTabDescriptor descriptor=(TalendPropertyTabDescriptor)selection.getFirstElement();
  if (descriptor == null) {
    return;
  }
  if (currentSelectedTab != null && (currentSelectedTab.getCategory() != descriptor.getCategory())) {
    for (    Control curControl : tabFactory.getTabComposite().getChildren()) {
      curControl.dispose();
    }
  }
  if (currentSelectedTab == null || currentSelectedTab.getCategory() != descriptor.getCategory() || selectedPrimary) {
    currentSelectedTab=descriptor;
    createDynamicComposite(tabFactory.getTabComposite(),(Element)descriptor.getData(),descriptor.getCategory());
    selectedPrimary=false;
  }
}
Program: 123098
Project: 123098
Buggy source:
public Object getFirstElement(){
  return null;
}

Fixed version (ground truth):
@Override public Object getFirstElement(){
  return null;
}
Program: 123099
Project: 123099
Buggy source:
/** 
 * DOC Administrator Comment method "addListeners".
 */
private void addListeners(){
  moveButton.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    final SelectionEvent e){
      if (moveButton.getText().equals("String_Node_Str")) {
        sash.setWeights(new int[]{23,1});
        moveButton.setToolTipText(Messages.getString("String_Node_Str"));
        moveButton.setText("String_Node_Str");
      }
 else       if (moveButton.getText().equals("String_Node_Str")) {
        sash.setWeights(new int[]{18,5});
        moveButton.setToolTipText(Messages.getString("String_Node_Str"));
        moveButton.setText("String_Node_Str");
      }
    }
  }
);
}

Fixed version (ground truth):
/** 
 * DOC Administrator Comment method "addListeners".
 */
private void addListeners(){
  moveButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    final SelectionEvent e){
      if (moveButton.getText().equals("String_Node_Str")) {
        sash.setWeights(new int[]{23,1});
        moveButton.setToolTipText(Messages.getString("String_Node_Str"));
        moveButton.setText("String_Node_Str");
      }
 else       if (moveButton.getText().equals("String_Node_Str")) {
        sash.setWeights(new int[]{18,5});
        moveButton.setToolTipText(Messages.getString("String_Node_Str"));
        moveButton.setText("String_Node_Str");
      }
    }
  }
);
}
Program: 123100
Project: 123100
Buggy source:
public Color getForegroundColor(B bean){
  return null;
}

Fixed version (ground truth):
@Override public Color getForegroundColor(B bean){
  return null;
}
Program: 123102
Project: 123102
Buggy source:
public String getLabel(Object bean){
  if (bean instanceof Map) {
    Map<String,Object> valueMap=(Map<String,Object>)bean;
    String value=(String)valueMap.get(IRuleConstant.FIELD_RULE);
    if (value != null && !"String_Node_Str".equals(value)) {
      IMetadataTable metadataTable=MetadataTool.getMetadataTableFromNodeTableName(node1,value);
      if (metadataTable != null) {
        return metadataTable.getTableName();
      }
 else {
        return value;
      }
    }
  }
  return "String_Node_Str";
}

Fixed version (ground truth):
@Override public String getLabel(Object bean){
  if (bean instanceof Map) {
    Map<String,Object> valueMap=(Map<String,Object>)bean;
    String value=(String)valueMap.get(IRuleConstant.FIELD_RULE);
    if (value != null && !"String_Node_Str".equals(value)) {
      IMetadataTable metadataTable=MetadataTool.getMetadataTableFromNodeTableName(node1,value);
      if (metadataTable != null) {
        return metadataTable.getTableName();
      }
 else {
        return value;
      }
    }
  }
  return "String_Node_Str";
}