nus-yam/ex-repair huggingface dataset:
Program: 122296
Project: 122296
Buggy source:
@Override protected void run() throws LoginException, PersistenceException {
  repositoryFactory.create(processItem,mainPage.getDestinationPath());
}

Fixed version (ground truth):
@Override public void run(IProgressMonitor monitor) throws CoreException {
  try {
    property.setId(repositoryFactory.getNextId());
    property.setLabel(property.getDisplayName());
    ProcessType process=TalendFileFactory.eINSTANCE.createProcessType();
    ParametersType parameterType=TalendFileFactory.eINSTANCE.createParametersType();
    List<RoutinesParameterType> dependenciesInPreference=RoutinesUtil.createDependenciesInPreference();
    parameterType.getRoutinesParameter().addAll(dependenciesInPreference);
    process.setParameters(parameterType);
    processItem.setProcess(process);
    repositoryFactory.create(processItem,mainPage.getDestinationPath());
  }
 catch (  PersistenceException e) {
    MessageDialog.openError(getShell(),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str") + "String_Node_Str" + e.getMessage());
    ExceptionHandler.process(e);
  }
}
Program: 122297
Project: 122297
Buggy source:
/** 
 * @see org.eclipse.jface.wizard.Wizard#performFinish()
 */
@SuppressWarnings("String_Node_Str") @Override public boolean performFinish(){
  try {
    property.setId(repositoryFactory.getNextId());
    property.setLabel(property.getDisplayName());
    ProcessType process=TalendFileFactory.eINSTANCE.createProcessType();
    ParametersType parameterType=TalendFileFactory.eINSTANCE.createParametersType();
    List<RoutinesParameterType> dependenciesInPreference=RoutinesUtil.createDependenciesInPreference();
    parameterType.getRoutinesParameter().addAll(dependenciesInPreference);
    process.setParameters(parameterType);
    processItem.setProcess(process);
    RepositoryWorkUnit<Object> workUnit=new RepositoryWorkUnit<Object>(this.getWindowTitle(),this){
      @Override protected void run() throws LoginException, PersistenceException {
        repositoryFactory.create(processItem,mainPage.getDestinationPath());
      }
    }
;
    workUnit.setAvoidUnloadResources(true);
    repositoryFactory.executeRepositoryWorkUnit(workUnit);
  }
 catch (  PersistenceException e) {
    MessageDialog.openError(getShell(),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str") + "String_Node_Str" + e.getMessage());
    ExceptionHandler.process(e);
  }
  return processItem != null;
}

Fixed version (ground truth):
/** 
 * @see org.eclipse.jface.wizard.Wizard#performFinish()
 */
@SuppressWarnings("String_Node_Str") @Override public boolean performFinish(){
  RepositoryWorkUnit<Object> workUnit=new RepositoryWorkUnit<Object>(this.getWindowTitle(),this){
    @Override protected void run() throws LoginException, PersistenceException {
      IWorkspace workspace=ResourcesPlugin.getWorkspace();
      IWorkspaceRunnable operation=new IWorkspaceRunnable(){
        @Override public void run(        IProgressMonitor monitor) throws CoreException {
          try {
            property.setId(repositoryFactory.getNextId());
            property.setLabel(property.getDisplayName());
            ProcessType process=TalendFileFactory.eINSTANCE.createProcessType();
            ParametersType parameterType=TalendFileFactory.eINSTANCE.createParametersType();
            List<RoutinesParameterType> dependenciesInPreference=RoutinesUtil.createDependenciesInPreference();
            parameterType.getRoutinesParameter().addAll(dependenciesInPreference);
            process.setParameters(parameterType);
            processItem.setProcess(process);
            repositoryFactory.create(processItem,mainPage.getDestinationPath());
          }
 catch (          PersistenceException e) {
            MessageDialog.openError(getShell(),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str") + "String_Node_Str" + e.getMessage());
            ExceptionHandler.process(e);
          }
        }
      }
;
      try {
        workspace.run(operation,null);
      }
 catch (      CoreException e) {
        ExceptionHandler.process(e);
      }
    }
  }
;
  workUnit.setAvoidUnloadResources(true);
  repositoryFactory.executeRepositoryWorkUnit(workUnit);
  return processItem != null;
}
Program: 122298
Project: 122298
Buggy source:
@Override protected void run() throws LoginException, PersistenceException {
  repositoryFactory.create(processItem,mainPage.getDestinationPath());
}

Fixed version (ground truth):
@Override public void run(IProgressMonitor monitor) throws CoreException {
  try {
    property.setId(repositoryFactory.getNextId());
    property.setLabel(property.getDisplayName());
    ProcessType process=TalendFileFactory.eINSTANCE.createProcessType();
    ParametersType parameterType=TalendFileFactory.eINSTANCE.createParametersType();
    List<RoutinesParameterType> dependenciesInPreference=RoutinesUtil.createDependenciesInPreference();
    parameterType.getRoutinesParameter().addAll(dependenciesInPreference);
    process.setParameters(parameterType);
    processItem.setProcess(process);
    repositoryFactory.create(processItem,mainPage.getDestinationPath());
  }
 catch (  PersistenceException e) {
    MessageDialog.openError(getShell(),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str") + "String_Node_Str" + e.getMessage());
    ExceptionHandler.process(e);
  }
}
Program: 122299
Project: 122299
Buggy source:
/** 
 * @see org.eclipse.jface.wizard.Wizard#performFinish()
 */
@SuppressWarnings("String_Node_Str") @Override public boolean performFinish(){
  try {
    property.setId(repositoryFactory.getNextId());
    property.setLabel(property.getDisplayName());
    ProcessType process=TalendFileFactory.eINSTANCE.createProcessType();
    ParametersType parameterType=TalendFileFactory.eINSTANCE.createParametersType();
    List<RoutinesParameterType> dependenciesInPreference=RoutinesUtil.createDependenciesInPreference();
    parameterType.getRoutinesParameter().addAll(dependenciesInPreference);
    process.setParameters(parameterType);
    processItem.setProcess(process);
    RepositoryWorkUnit<Object> workUnit=new RepositoryWorkUnit<Object>(this.getWindowTitle(),this){
      @Override protected void run() throws LoginException, PersistenceException {
        repositoryFactory.create(processItem,mainPage.getDestinationPath());
      }
    }
;
    workUnit.setAvoidUnloadResources(true);
    repositoryFactory.executeRepositoryWorkUnit(workUnit);
  }
 catch (  PersistenceException e) {
    MessageDialog.openError(getShell(),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str") + "String_Node_Str" + e.getMessage());
    ExceptionHandler.process(e);
  }
  return processItem != null;
}

Fixed version (ground truth):
/** 
 * @see org.eclipse.jface.wizard.Wizard#performFinish()
 */
@SuppressWarnings("String_Node_Str") @Override public boolean performFinish(){
  RepositoryWorkUnit<Object> workUnit=new RepositoryWorkUnit<Object>(this.getWindowTitle(),this){
    @Override protected void run() throws LoginException, PersistenceException {
      IWorkspace workspace=ResourcesPlugin.getWorkspace();
      IWorkspaceRunnable operation=new IWorkspaceRunnable(){
        @Override public void run(        IProgressMonitor monitor) throws CoreException {
          try {
            property.setId(repositoryFactory.getNextId());
            property.setLabel(property.getDisplayName());
            ProcessType process=TalendFileFactory.eINSTANCE.createProcessType();
            ParametersType parameterType=TalendFileFactory.eINSTANCE.createParametersType();
            List<RoutinesParameterType> dependenciesInPreference=RoutinesUtil.createDependenciesInPreference();
            parameterType.getRoutinesParameter().addAll(dependenciesInPreference);
            process.setParameters(parameterType);
            processItem.setProcess(process);
            repositoryFactory.create(processItem,mainPage.getDestinationPath());
          }
 catch (          PersistenceException e) {
            MessageDialog.openError(getShell(),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str") + "String_Node_Str" + e.getMessage());
            ExceptionHandler.process(e);
          }
        }
      }
;
      try {
        workspace.run(operation,null);
      }
 catch (      CoreException e) {
        ExceptionHandler.process(e);
      }
    }
  }
;
  workUnit.setAvoidUnloadResources(true);
  repositoryFactory.executeRepositoryWorkUnit(workUnit);
  return processItem != null;
}
Program: 122305
Project: 122305
Buggy source:
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
  try {
    final EventLoopProgressMonitor progressMonitor=new EventLoopProgressMonitor(monitor);
    progressMonitor.beginTask(Messages.getString("String_Node_Str",type),IProgressMonitor.UNKNOWN);
    if (nodes != null && nodes.size() > 0) {
      int size=nodes.size();
      if (size == 1) {
        if (jobVersion != null && jobVersion.equals(RelationshipItemBuilder.LATEST_VERSION)) {
          String[] allVersions=JobVersionUtils.getAllVersions(nodes.get(0));
          for (          String version : allVersions) {
            monitor.subTask(Messages.getString("String_Node_Str",type,nodes.get(0).getLabel(),version));
            if (!exportJobScript(nodes,version,bundleVersion,progressMonitor)) {
              return;
            }
          }
        }
 else {
          if (!exportJobScript(nodes,jobVersion,bundleVersion,progressMonitor)) {
            return;
          }
          monitor.subTask(Messages.getString("String_Node_Str",type,nodes.get(0).getLabel(),jobVersion));
        }
      }
 else       if (size > 1) {
        if (!exportJobScript(nodes,jobVersion,bundleVersion,progressMonitor)) {
          return;
        }
        monitor.subTask(Messages.getString("String_Node_Str","String_Node_Str"));
      }
    }
    progressMonitor.done();
  }
  finally {
    ProcessorUtilities.resetExportConfig();
  }
}

Fixed version (ground truth):
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
  final EventLoopProgressMonitor progressMonitor=new EventLoopProgressMonitor(monitor);
  progressMonitor.beginTask(Messages.getString("String_Node_Str",type),IProgressMonitor.UNKNOWN);
  try {
    if (nodes != null && nodes.size() > 0) {
      int size=nodes.size();
      if (size == 1) {
        if (jobVersion != null && jobVersion.equals(RelationshipItemBuilder.LATEST_VERSION)) {
          ProcessItem item=ItemCacheManager.getProcessItem(nodes.get(0).getId(),RelationshipItemBuilder.LATEST_VERSION);
          String version=item.getProperty().getVersion();
          if (!exportJobScript(nodes,version,version,progressMonitor)) {
            return;
          }
        }
 else {
          if (!exportJobScript(nodes,jobVersion,bundleVersion,progressMonitor)) {
            return;
          }
          monitor.subTask(Messages.getString("String_Node_Str",type,nodes.get(0).getLabel(),jobVersion));
        }
      }
 else       if (size > 1) {
        if (!exportJobScript(nodes,jobVersion,bundleVersion,progressMonitor)) {
          return;
        }
        monitor.subTask(Messages.getString("String_Node_Str","String_Node_Str"));
      }
    }
  }
  finally {
    progressMonitor.done();
    ProcessorUtilities.resetExportConfig();
  }
}
Program: 122306
Project: 122306
Buggy source:
private List<ExportFileResource> getProcesses(List<RepositoryNode> nodes,String path){
  List<ExportFileResource> value=new ArrayList<ExportFileResource>();
  for (  final RepositoryNode node : nodes) {
    if (node.getType() == ENodeType.SYSTEM_FOLDER || node.getType() == ENodeType.SIMPLE_FOLDER) {
      @SuppressWarnings({"String_Node_Str","String_Node_Str"}) List<RepositoryNode> children=new ArrayList<RepositoryNode>(){
{
          addAll((Collection<? extends RepositoryNode>)node.getChildren());
        }
      }
;
      value.addAll(getProcesses(children,node.getProperties(EProperties.LABEL).toString() + "String_Node_Str"));
    }
    if (node.getType() == ENodeType.REPOSITORY_ELEMENT) {
      IRepositoryViewObject repositoryObject=node.getObject();
      if (repositoryObject.getProperty().getItem() instanceof ProcessItem) {
        ProcessItem processItem=(ProcessItem)repositoryObject.getProperty().getItem();
        ExportFileResource resource=new ExportFileResource(processItem,path + processItem.getProperty().getLabel());
        processItem.getProcess().getNode();
        resource.setNode(node);
        value.add(resource);
      }
    }
  }
  return value;
}

Fixed version (ground truth):
private List<ExportFileResource> getProcesses(List<RepositoryNode> nodes,String path){
  List<ExportFileResource> value=new ArrayList<ExportFileResource>();
  for (  final RepositoryNode node : nodes) {
    if (node.getType() == ENodeType.SYSTEM_FOLDER || node.getType() == ENodeType.SIMPLE_FOLDER) {
      List<RepositoryNode> children=new ArrayList<RepositoryNode>((Collection<? extends RepositoryNode>)node.getChildren());
      value.addAll(getProcesses(children,node.getProperties(EProperties.LABEL).toString() + "String_Node_Str"));
    }
    if (node.getType() == ENodeType.REPOSITORY_ELEMENT) {
      IRepositoryViewObject repositoryObject=node.getObject();
      if (repositoryObject.getProperty().getItem() instanceof ProcessItem) {
        ProcessItem processItem=(ProcessItem)repositoryObject.getProperty().getItem();
        ExportFileResource resource=new ExportFileResource(processItem,path + processItem.getProperty().getLabel());
        processItem.getProcess().getNode();
        resource.setNode(node);
        value.add(resource);
      }
    }
  }
  return value;
}
Program: 122309
Project: 122309
Buggy source:
/** 
 * This should be same as @see isIncludedLib. But, there are some special jar to exclude temp.
 */
@Override protected boolean isCompiledLib(ModuleNeeded module){
  if (module != null) {
    if (isIncludedLib(module)) {
      return !isSpecialLib(module.getModuleName());
    }
  }
  return false;
}

Fixed version (ground truth):
/** 
 * This should be same as @see isIncludedLib. But, there are some special jar to exclude temp.
 */
@Override protected boolean isCompiledLib(ModuleNeeded module){
  if (module != null) {
    if (isIncludedLib(module)) {
      return true;
    }
  }
  return false;
}
Program: 122319
Project: 122319
Buggy source:
@Override public void widgetSelected(SelectionEvent e){
  if (tableViewerCreator != null && tableViewerCreator.isReadOnly()) {
    return;
  }
  String columnId=tableViewerCreatorColumn.getId();
  IBeanPropertyAccessors accessor=tableViewerCreator.getColumn(columnId).getBeanPropertyAccessors();
  List inputList=tableViewerCreator.getInputList();
  for (int i=0; i < inputList.size(); i++) {
    accessor.set(inputList.get(i),checked ? false : true);
  }
  if (checked) {
    checked=false;
  }
 else {
    checked=true;
  }
  tableViewerCreatorColumn.getTableColumn().setImage(checked ? ImageProvider.getImage(EImage.CHECKED_ICON) : ImageProvider.getImage(EImage.UNCHECKED_ICON));
  tableViewerCreator.refreshTableEditorControls();
}

Fixed version (ground truth):
@Override public void widgetSelected(SelectionEvent e){
  if (tableViewerCreator != null && tableViewerCreator.isReadOnly()) {
    return;
  }
  String columnId=tableViewerCreatorColumn.getId();
  TableViewerCreatorColumnNotModifiable column=tableViewerCreator.getColumn(columnId);
  IBeanPropertyAccessors accessor=column.getBeanPropertyAccessors();
  List inputList=tableViewerCreator.getInputList();
  for (int i=0; i < inputList.size(); i++) {
    if (tableViewerCreator instanceof TableViewerCreator && column instanceof TableViewerCreatorColumn) {
      ((TableViewerCreator)tableViewerCreator).setBeanValue((TableViewerCreatorColumn)column,inputList.get(i),checked ? false : true,true);
    }
 else {
      accessor.set(inputList.get(i),checked ? false : true);
    }
  }
  if (checked) {
    checked=false;
  }
 else {
    checked=true;
  }
  tableViewerCreatorColumn.getTableColumn().setImage(checked ? ImageProvider.getImage(EImage.CHECKED_ICON) : ImageProvider.getImage(EImage.UNCHECKED_ICON));
  this.param.setValue(new Boolean(checked));
  tableViewerCreator.refreshTableEditorControls();
}
Program: 122322
Project: 122322
Buggy source:
@Override public void performRequest(Request req){
  IFigure figure=null;
  Figure selectedFigure=null;
  if (RequestConstants.REQ_DIRECT_EDIT.equals(req.getType())) {
    DirectEditRequest drequest=(DirectEditRequest)req;
    Point figureLocation=drequest.getLocation();
    if (getFigure() instanceof VarNodeFigure) {
      figure=((VarNodeFigure)getFigure()).findFigureAt(figureLocation);
    }
    if (figure != null) {
      if (figure instanceof VariableContainerFigure) {
        figure=((VariableContainerFigure)figure).getVariableLabel();
      }
      selectedFigure=(Figure)figure;
      directEditManager=new XmlMapNodeDirectEditManager(this,new XmlMapNodeCellEditorLocator(selectedFigure));
    }
    directEditManager.show();
    ((XmlMapGraphicViewer)getViewer()).getMapperManager().setCurrentDirectEditManager(directEditManager);
  }
}

Fixed version (ground truth):
@Override public void performRequest(Request req){
  IFigure figure=null;
  Figure selectedFigure=null;
  if (RequestConstants.REQ_DIRECT_EDIT.equals(req.getType())) {
    DirectEditRequest drequest=(DirectEditRequest)req;
    Point figureLocation=drequest.getLocation();
    if (getFigure() instanceof VarNodeFigure) {
      figure=((VarNodeFigure)getFigure()).findFigureAt(figureLocation);
    }
    if (figure != null) {
      if (figure instanceof VariableContainerFigure) {
        figure=((VariableContainerFigure)figure).getVariableLabel();
      }
      selectedFigure=(Figure)figure;
      directEditManager=new XmlMapNodeDirectEditManager(this,new XmlMapNodeCellEditorLocator(selectedFigure));
    }
    if (directEditManager != null) {
      directEditManager.show();
      ((XmlMapGraphicViewer)getViewer()).getMapperManager().setCurrentDirectEditManager(directEditManager);
    }
  }
}
Program: 122325
Project: 122325
Buggy source:
@Override public void widgetSelected(SelectionEvent e){
  if (tableViewerCreator != null && tableViewerCreator.isReadOnly()) {
    return;
  }
  String columnId=tableViewerCreatorColumn.getId();
  IBeanPropertyAccessors accessor=tableViewerCreator.getColumn(columnId).getBeanPropertyAccessors();
  List inputList=tableViewerCreator.getInputList();
  for (int i=0; i < inputList.size(); i++) {
    accessor.set(inputList.get(i),checked ? false : true);
  }
  if (checked) {
    checked=false;
  }
 else {
    checked=true;
  }
  tableViewerCreatorColumn.getTableColumn().setImage(checked ? ImageProvider.getImage(EImage.CHECKED_ICON) : ImageProvider.getImage(EImage.UNCHECKED_ICON));
  tableViewerCreator.refreshTableEditorControls();
}

Fixed version (ground truth):
@Override public void widgetSelected(SelectionEvent e){
  if (tableViewerCreator != null && tableViewerCreator.isReadOnly()) {
    return;
  }
  String columnId=tableViewerCreatorColumn.getId();
  TableViewerCreatorColumnNotModifiable column=tableViewerCreator.getColumn(columnId);
  IBeanPropertyAccessors accessor=column.getBeanPropertyAccessors();
  List inputList=tableViewerCreator.getInputList();
  for (int i=0; i < inputList.size(); i++) {
    if (tableViewerCreator instanceof TableViewerCreator && column instanceof TableViewerCreatorColumn) {
      ((TableViewerCreator)tableViewerCreator).setBeanValue((TableViewerCreatorColumn)column,inputList.get(i),checked ? false : true,true);
    }
 else {
      accessor.set(inputList.get(i),checked ? false : true);
    }
  }
  if (checked) {
    checked=false;
  }
 else {
    checked=true;
  }
  tableViewerCreatorColumn.getTableColumn().setImage(checked ? ImageProvider.getImage(EImage.CHECKED_ICON) : ImageProvider.getImage(EImage.UNCHECKED_ICON));
  this.param.setValue(new Boolean(checked));
  tableViewerCreator.refreshTableEditorControls();
}
Program: 122331
Project: 122331
Buggy source:
@Override public void performRequest(Request req){
  IFigure figure=null;
  Figure selectedFigure=null;
  if (RequestConstants.REQ_DIRECT_EDIT.equals(req.getType())) {
    DirectEditRequest drequest=(DirectEditRequest)req;
    Point figureLocation=drequest.getLocation();
    if (getFigure() instanceof VarNodeFigure) {
      figure=((VarNodeFigure)getFigure()).findFigureAt(figureLocation);
    }
    if (figure != null) {
      if (figure instanceof VariableContainerFigure) {
        figure=((VariableContainerFigure)figure).getVariableLabel();
      }
      selectedFigure=(Figure)figure;
      directEditManager=new XmlMapNodeDirectEditManager(this,new XmlMapNodeCellEditorLocator(selectedFigure));
    }
    directEditManager.show();
    ((XmlMapGraphicViewer)getViewer()).getMapperManager().setCurrentDirectEditManager(directEditManager);
  }
}

Fixed version (ground truth):
@Override public void performRequest(Request req){
  IFigure figure=null;
  Figure selectedFigure=null;
  if (RequestConstants.REQ_DIRECT_EDIT.equals(req.getType())) {
    DirectEditRequest drequest=(DirectEditRequest)req;
    Point figureLocation=drequest.getLocation();
    if (getFigure() instanceof VarNodeFigure) {
      figure=((VarNodeFigure)getFigure()).findFigureAt(figureLocation);
    }
    if (figure != null) {
      if (figure instanceof VariableContainerFigure) {
        figure=((VariableContainerFigure)figure).getVariableLabel();
      }
      selectedFigure=(Figure)figure;
      directEditManager=new XmlMapNodeDirectEditManager(this,new XmlMapNodeCellEditorLocator(selectedFigure));
    }
    if (directEditManager != null) {
      directEditManager.show();
      ((XmlMapGraphicViewer)getViewer()).getMapperManager().setCurrentDirectEditManager(directEditManager);
    }
  }
}
Program: 122337
Project: 122337
Buggy source:
@Override public void doSave(IProgressMonitor monitor){
  monitor.beginTask("String_Node_Str",100);
  monitor.worked(10);
  savePreviewPictures();
  try {
    if (getEditorInput() instanceof JobEditorInput) {
      boolean saved=((JobEditorInput)getEditorInput()).saveProcess(new SubProgressMonitor(monitor,80),null);
      if (!saved) {
        monitor.setCanceled(true);
        throw new InterruptedException();
      }
    }
    getCommandStack().markSaveLocation();
    setDirty(false);
    boolean isneedReload=false;
    for (int i=0; i < getProcess().getGraphicalNodes().size(); i++) {
      Node node=(Node)getProcess().getGraphicalNodes().get(i);
      if (node.isNeedloadLib()) {
        isneedReload=true;
        node.setNeedLoadLib(false);
      }
    }
    if (isneedReload) {
      ((ILibrariesService)GlobalServiceRegister.getDefault().getService(ILibrariesService.class)).updateModulesNeededForCurrentJob(getProcess());
    }
    monitor.worked(10);
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
    monitor.setCanceled(true);
  }
 finally {
    monitor.done();
  }
}

Fixed version (ground truth):
@Override public void doSave(IProgressMonitor monitor){
  if (monitor == null) {
    monitor=new NullProgressMonitor();
  }
  monitor.beginTask("String_Node_Str",100);
  monitor.worked(10);
  savePreviewPictures();
  try {
    if (getEditorInput() instanceof JobEditorInput) {
      boolean saved=((JobEditorInput)getEditorInput()).saveProcess(new SubProgressMonitor(monitor,80),null);
      if (!saved) {
        monitor.setCanceled(true);
        throw new InterruptedException();
      }
    }
    getCommandStack().markSaveLocation();
    setDirty(false);
    boolean isneedReload=false;
    for (int i=0; i < getProcess().getGraphicalNodes().size(); i++) {
      Node node=(Node)getProcess().getGraphicalNodes().get(i);
      if (node.isNeedloadLib()) {
        isneedReload=true;
        node.setNeedLoadLib(false);
      }
    }
    if (isneedReload) {
      ((ILibrariesService)GlobalServiceRegister.getDefault().getService(ILibrariesService.class)).updateModulesNeededForCurrentJob(getProcess());
    }
    monitor.worked(10);
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
    monitor.setCanceled(true);
  }
 finally {
    monitor.done();
  }
}
Program: 122338
Project: 122338
Buggy source:
/** 
 * Getter for id_Document lookup(for tXMLMap) Purpose : Get all value data storing in the lookup Object  Use case : When no basic lookup(not Document lookup) exists,but Document lookup exists for ALL,First Matching(When no basic lookup,not override the hashCode(),equals() method,so no List<V> value,only V value)
 */
public void lookup(){
  List<V> localList=new ArrayList<V>();
  if (matchingMode == MATCHING_MODE.UNIQUE_MATCH) {
    for (    V value : uniqueHash.values()) {
      localList.add(value);
    }
  }
 else {
    for (    Object value : mapOfCol.values()) {
      localList.add((V)value);
    }
  }
  listResult=localList;
  sizeResultList=localList.size();
  objectResult=null;
  currentIndex=0;
}

Fixed version (ground truth):
/** 
 * Getter for id_Document lookup(for tXMLMap) Purpose : Get all value data storing in the lookup Object Use case : When no basic lookup(not Document lookup) exists,but Document lookup exists for ALL,First Matching(When no basic lookup,not override the hashCode(),equals() method,so no List<V> value,only V value)
 */
public void lookup(){
  List<V> localList=new ArrayList<V>();
  if (matchingMode == MATCHING_MODE.UNIQUE_MATCH) {
    for (    V value : uniqueHash.values()) {
      localList.add(value);
    }
  }
 else {
    for (    Object value : mapOfCol.values()) {
      localList.add((V)value);
    }
  }
  listResult=localList;
  sizeResultList=localList.size();
  objectResult=null;
  currentIndex=0;
}
Program: 122340
Project: 122340
Buggy source:
/** 
 * Getter for id_Document lookup(for tXMLMap) Purpose : Get all value data storing in the lookup Object  Use case : When no basic lookup(not Document lookup) exists,but Document lookup exists for ALL,First Matching(When no basic lookup,not override the hashCode(),equals() method,so no List<V> value,only V value)
 */
public void lookup(){
  List<V> localList=new ArrayList<V>();
  if (matchingMode == MATCHING_MODE.UNIQUE_MATCH) {
    for (    V value : uniqueHash.values()) {
      localList.add(value);
    }
  }
 else {
    for (    Object value : mapOfCol.values()) {
      localList.add((V)value);
    }
  }
  listResult=localList;
  sizeResultList=localList.size();
  objectResult=null;
  currentIndex=0;
}

Fixed version (ground truth):
/** 
 * Getter for id_Document lookup(for tXMLMap) Purpose : Get all value data storing in the lookup Object Use case : When no basic lookup(not Document lookup) exists,but Document lookup exists for ALL,First Matching(When no basic lookup,not override the hashCode(),equals() method,so no List<V> value,only V value)
 */
public void lookup(){
  List<V> localList=new ArrayList<V>();
  if (matchingMode == MATCHING_MODE.UNIQUE_MATCH) {
    for (    V value : uniqueHash.values()) {
      localList.add(value);
    }
  }
 else {
    for (    Object value : mapOfCol.values()) {
      localList.add((V)value);
    }
  }
  listResult=localList;
  sizeResultList=localList.size();
  objectResult=null;
  currentIndex=0;
}
Program: 122341
Project: 122341
Buggy source:
@Override public void doSave(IProgressMonitor monitor){
  monitor.beginTask("String_Node_Str",100);
  monitor.worked(10);
  savePreviewPictures();
  try {
    if (getEditorInput() instanceof JobEditorInput) {
      boolean saved=((JobEditorInput)getEditorInput()).saveProcess(new SubProgressMonitor(monitor,80),null);
      if (!saved) {
        monitor.setCanceled(true);
        throw new InterruptedException();
      }
    }
    getCommandStack().markSaveLocation();
    setDirty(false);
    boolean isneedReload=false;
    for (int i=0; i < getProcess().getGraphicalNodes().size(); i++) {
      Node node=(Node)getProcess().getGraphicalNodes().get(i);
      if (node.isNeedloadLib()) {
        isneedReload=true;
        node.setNeedLoadLib(false);
      }
    }
    if (isneedReload) {
      ((ILibrariesService)GlobalServiceRegister.getDefault().getService(ILibrariesService.class)).updateModulesNeededForCurrentJob(getProcess());
    }
    monitor.worked(10);
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
    monitor.setCanceled(true);
  }
 finally {
    monitor.done();
  }
}

Fixed version (ground truth):
@Override public void doSave(IProgressMonitor monitor){
  if (monitor == null) {
    monitor=new NullProgressMonitor();
  }
  monitor.beginTask("String_Node_Str",100);
  monitor.worked(10);
  savePreviewPictures();
  try {
    if (getEditorInput() instanceof JobEditorInput) {
      boolean saved=((JobEditorInput)getEditorInput()).saveProcess(new SubProgressMonitor(monitor,80),null);
      if (!saved) {
        monitor.setCanceled(true);
        throw new InterruptedException();
      }
    }
    getCommandStack().markSaveLocation();
    setDirty(false);
    boolean isneedReload=false;
    for (int i=0; i < getProcess().getGraphicalNodes().size(); i++) {
      Node node=(Node)getProcess().getGraphicalNodes().get(i);
      if (node.isNeedloadLib()) {
        isneedReload=true;
        node.setNeedLoadLib(false);
      }
    }
    if (isneedReload) {
      ((ILibrariesService)GlobalServiceRegister.getDefault().getService(ILibrariesService.class)).updateModulesNeededForCurrentJob(getProcess());
    }
    monitor.worked(10);
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
    monitor.setCanceled(true);
  }
 finally {
    monitor.done();
  }
}
Program: 122342
Project: 122342
Buggy source:
/** 
 * Getter for id_Document lookup(for tXMLMap) Purpose : Get all value data storing in the lookup Object  Use case : When no basic lookup(not Document lookup) exists,but Document lookup exists for ALL,First Matching(When no basic lookup,not override the hashCode(),equals() method,so no List<V> value,only V value)
 */
public void lookup(){
  List<V> localList=new ArrayList<V>();
  if (matchingMode == MATCHING_MODE.UNIQUE_MATCH) {
    for (    V value : uniqueHash.values()) {
      localList.add(value);
    }
  }
 else {
    for (    Object value : mapOfCol.values()) {
      localList.add((V)value);
    }
  }
  listResult=localList;
  sizeResultList=localList.size();
  objectResult=null;
  currentIndex=0;
}

Fixed version (ground truth):
/** 
 * Getter for id_Document lookup(for tXMLMap) Purpose : Get all value data storing in the lookup Object Use case : When no basic lookup(not Document lookup) exists,but Document lookup exists for ALL,First Matching(When no basic lookup,not override the hashCode(),equals() method,so no List<V> value,only V value)
 */
public void lookup(){
  List<V> localList=new ArrayList<V>();
  if (matchingMode == MATCHING_MODE.UNIQUE_MATCH) {
    for (    V value : uniqueHash.values()) {
      localList.add(value);
    }
  }
 else {
    for (    Object value : mapOfCol.values()) {
      localList.add((V)value);
    }
  }
  listResult=localList;
  sizeResultList=localList.size();
  objectResult=null;
  currentIndex=0;
}
Program: 122343
Project: 122343
Buggy source:
public void init(IWorkbench workbench){
  setPreferenceStore(RepositoryManager.getPreferenceStore());
}

Fixed version (ground truth):
@Override public void init(IWorkbench workbench){
  setPreferenceStore(RepositoryManager.getRepositoryPreferenceStore());
}
Program: 122344
Project: 122344
Buggy source:
@Override public void initializeDefaultPreferences(){
  final IPreferenceStore preferenceStore=RepositoryPlugin.getDefault().getPreferenceStore();
  preferenceStore.setDefault(IRepositoryPrefConstants.MERGE_REFERENCE_PROJECT,true);
}

Fixed version (ground truth):
@Override public void initializeDefaultPreferences(){
  final IPreferenceStore preferenceStore=RepositoryPlugin.getDefault().getPreferenceStore();
}
Program: 122345
Project: 122345
Buggy source:
public void init(IWorkbench workbench){
  setPreferenceStore(RepositoryManager.getPreferenceStore());
}

Fixed version (ground truth):
public void init(IWorkbench workbench){
  setPreferenceStore(RepositoryManager.getRepositoryPreferenceStore());
}
Program: 122346
Project: 122346
Buggy source:
public void widgetSelected(SelectionEvent e){
  boolean value=creatingRefreshEditor.getBooleanValue() || savingRefreshEditor.getBooleanValue() || deletingRefreshEditor.getBooleanValue();
  manuallyRefreshEditor.setChecked(!value);
}

Fixed version (ground truth):
@Override public void widgetSelected(SelectionEvent e){
  boolean value=creatingRefreshEditor.getBooleanValue() || savingRefreshEditor.getBooleanValue() || deletingRefreshEditor.getBooleanValue();
  manuallyRefreshEditor.setChecked(!value);
}
Program: 122347
Project: 122347
Buggy source:
private void addListeners(){
  manuallyRefreshEditor.getButton().addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      boolean value=manuallyRefreshEditor.getBooleanValue();
      creatingRefreshEditor.setChecked(!value);
      savingRefreshEditor.setChecked(!value);
      deletingRefreshEditor.setChecked(!value);
    }
  }
);
  final SelectionAdapter listener=new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      boolean value=creatingRefreshEditor.getBooleanValue() || savingRefreshEditor.getBooleanValue() || deletingRefreshEditor.getBooleanValue();
      manuallyRefreshEditor.setChecked(!value);
    }
  }
;
  creatingRefreshEditor.getButton().addSelectionListener(listener);
  savingRefreshEditor.getButton().addSelectionListener(listener);
  deletingRefreshEditor.getButton().addSelectionListener(listener);
}

Fixed version (ground truth):
private void addListeners(){
  manuallyRefreshEditor.getButton().addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      boolean value=manuallyRefreshEditor.getBooleanValue();
      creatingRefreshEditor.setChecked(!value);
      savingRefreshEditor.setChecked(!value);
      deletingRefreshEditor.setChecked(!value);
    }
  }
);
  final SelectionAdapter listener=new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      boolean value=creatingRefreshEditor.getBooleanValue() || savingRefreshEditor.getBooleanValue() || deletingRefreshEditor.getBooleanValue();
      manuallyRefreshEditor.setChecked(!value);
    }
  }
;
  creatingRefreshEditor.getButton().addSelectionListener(listener);
  savingRefreshEditor.getButton().addSelectionListener(listener);
  deletingRefreshEditor.getButton().addSelectionListener(listener);
}
Program: 122348
Project: 122348
Buggy source:
@Override public void selectionChanged(IStructuredSelection selection){
  FOXTreeNode node=(FOXTreeNode)this.getStructuredSelection().getFirstElement();
  if (node == null) {
    this.setEnabled(false);
  }
 else {
    if (node.getParent() == null) {
      this.setEnabled(false);
    }
 else     if (node.getColumn() != null) {
      this.setEnabled(false);
    }
 else     if (node.getChildren() != null && !node.getChildren().isEmpty()) {
      this.setEnabled(false);
    }
 else {
      this.setEnabled(true);
    }
  }
}

Fixed version (ground truth):
@Override public void selectionChanged(IStructuredSelection selection){
  FOXTreeNode node=(FOXTreeNode)this.getStructuredSelection().getFirstElement();
  if (node == null) {
    this.setEnabled(false);
  }
 else {
    if (node.getParent() == null) {
      this.setEnabled(false);
    }
 else     if (node.getColumn() != null) {
      this.setEnabled(false);
    }
 else     if (node.getChildren() != null && !node.getChildren().isEmpty()) {
      boolean haveElementChild=false;
      for (      FOXTreeNode child : node.getChildren()) {
        if (child instanceof Element) {
          haveElementChild=true;
          break;
        }
      }
      if (haveElementChild) {
        setEnabled(false);
      }
 else {
        setEnabled(true);
      }
    }
 else {
      this.setEnabled(true);
    }
  }
}
Program: 122350
Project: 122350
Buggy source:
public void dragEnter(DropTargetEvent event){
}

Fixed version (ground truth):
@Override public void dragEnter(DropTargetEvent event){
}
Program: 122351
Project: 122351
Buggy source:
public void dropAccept(DropTargetEvent event){
}

Fixed version (ground truth):
@Override public void dropAccept(DropTargetEvent event){
}
Program: 122352
Project: 122352
Buggy source:
public void dragStart(DragSourceEvent event){
  TableItem[] items=linker.getSource().getSelection();
  if (items.length == 0) {
    event.doit=false;
  }
 else {
    LocalDraggedData draggedData=new LocalDraggedData();
    for (    TableItem treeItem : items) {
      draggedData.add(treeItem.getData());
    }
    IConnection connection=getManager().getUiManager().getFoxUI().getConnection();
    if (connection != null) {
      draggedData.setTable(connection.getMetadataTable());
    }
    LocalDataTransfer.getInstance().setLocalDraggedData(draggedData);
  }
}

Fixed version (ground truth):
@Override public void dragStart(DragSourceEvent event){
  TableItem[] items=linker.getSource().getSelection();
  if (items.length == 0) {
    event.doit=false;
  }
 else {
    LocalDraggedData draggedData=new LocalDraggedData();
    for (    TableItem treeItem : items) {
      draggedData.add(treeItem.getData());
    }
    IConnection connection=getManager().getUiManager().getFoxUI().getConnection();
    if (connection != null) {
      draggedData.setTable(connection.getMetadataTable());
    }
    LocalDataTransfer.getInstance().setLocalDraggedData(draggedData);
  }
}
Program: 122353
Project: 122353
Buggy source:
public void dragSetData(DragSourceEvent event){
  event.getSource();
}

Fixed version (ground truth):
@Override public void dragSetData(DragSourceEvent event){
  event.getSource();
}
Program: 122354
Project: 122354
Buggy source:
public void dragFinished(DragSourceEvent event){
  event.getSource();
}

Fixed version (ground truth):
@Override public void dragFinished(DragSourceEvent event){
  event.getSource();
}
Program: 122355
Project: 122355
Buggy source:
public void dragOperationChanged(DropTargetEvent event){
}

Fixed version (ground truth):
@Override public void dragOperationChanged(DropTargetEvent event){
}
Program: 122356
Project: 122356
Buggy source:
public Transfer getTransfer(){
  return LocalDataTransfer.getInstance();
}

Fixed version (ground truth):
@Override public Transfer getTransfer(){
  return LocalDataTransfer.getInstance();
}
Program: 122357
Project: 122357
Buggy source:
public boolean isEnabled(DropTargetEvent event){
  FOXManager manager=getManager();
  if (manager != null) {
    String currentSchema=manager.getCurrentSchema();
    if (currentSchema != null) {
      Item targetItem=(Item)event.item;
      if (targetItem != null) {
        Object data=targetItem.getData();
        if (data instanceof FOXTreeNode) {
          FOXTreeNode rootElement=getRootElement((FOXTreeNode)data);
          if (rootElement != null) {
            return currentSchema.equals(rootElement.getRow());
          }
        }
      }
    }
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean isEnabled(DropTargetEvent event){
  FOXManager manager=getManager();
  if (manager != null) {
    String currentSchema=manager.getCurrentSchema();
    if (currentSchema != null) {
      Item targetItem=(Item)event.item;
      if (targetItem != null) {
        Object data=targetItem.getData();
        if (data instanceof FOXTreeNode) {
          FOXTreeNode rootElement=getRootElement((FOXTreeNode)data);
          if (rootElement != null) {
            return currentSchema.equals(rootElement.getRow());
          }
        }
      }
    }
  }
  return true;
}
Program: 122358
Project: 122358
Buggy source:
public void dragOver(DropTargetEvent event){
  DropTarget dropTarget=(DropTarget)event.getSource();
  Item targetItem=(Item)event.item;
  if (targetItem == null || !isEnabled(event)) {
    event.detail=DND.DROP_NONE;
    return;
  }
  FOXTreeNode targetNode=(FOXTreeNode)(targetItem.getData());
  LocalDraggedData draggedData=LocalDataTransfer.getInstance().getDraggedData();
  List<Object> dragdedData=draggedData.getTransferableEntryList();
  if (dragdedData.size() == 1 && isDropRelatedColumn(event)) {
    if (targetNode instanceof Element) {
      Element element=(Element)targetNode;
      if (!element.getElementChildren().isEmpty() || element.getParent() == null) {
        event.detail=DND.DROP_NONE;
        return;
      }
    }
 else {
      FOXTreeNode parent=targetNode.getParent();
      if (parent == null) {
        event.detail=DND.DROP_NONE;
        return;
      }
    }
  }
  event.detail=DND.DROP_LINK;
}

Fixed version (ground truth):
@Override public void dragOver(DropTargetEvent event){
  DropTarget dropTarget=(DropTarget)event.getSource();
  Item targetItem=(Item)event.item;
  if (targetItem == null || !isEnabled(event)) {
    event.detail=DND.DROP_NONE;
    return;
  }
  FOXTreeNode targetNode=(FOXTreeNode)(targetItem.getData());
  LocalDraggedData draggedData=LocalDataTransfer.getInstance().getDraggedData();
  List<Object> dragdedData=draggedData.getTransferableEntryList();
  if (dragdedData.size() == 1 && isDropRelatedColumn(event)) {
    if (targetNode instanceof Element) {
      Element element=(Element)targetNode;
      if (!element.getElementChildren().isEmpty() || element.getParent() == null) {
        event.detail=DND.DROP_NONE;
        return;
      }
    }
 else {
      FOXTreeNode parent=targetNode.getParent();
      if (parent == null) {
        event.detail=DND.DROP_NONE;
        return;
      }
    }
  }
  event.detail=DND.DROP_LINK;
}
Program: 122359
Project: 122359
Buggy source:
public void dragLeave(DropTargetEvent event){
}

Fixed version (ground truth):
@Override public void dragLeave(DropTargetEvent event){
}
Program: 122360
Project: 122360
Buggy source:
private void setTreeNodeRow(FOXTreeNode root,String row){
  if (root == null)   return;
  root.setRow(row);
  if (root instanceof Element) {
    Element element=(Element)root;
    List<FOXTreeNode> children=element.getElementChildren();
    for (    FOXTreeNode child : children) {
      setTreeNodeRow(child,row);
    }
    final List<? extends FOXTreeNode> nameSpaceChildren=element.getNameSpaceChildren();
    for (    FOXTreeNode child : nameSpaceChildren) {
      setTreeNodeRow(child,row);
    }
  }
  List<FOXTreeNode> children=root.getChildren();
  for (  FOXTreeNode child : children) {
    setTreeNodeRow(child,row);
  }
}

Fixed version (ground truth):
private void setTreeNodeRow(FOXTreeNode root,String row){
  if (root == null) {
    return;
  }
  root.setRow(row);
  if (root instanceof Element) {
    Element element=(Element)root;
    List<FOXTreeNode> children=element.getElementChildren();
    for (    FOXTreeNode child : children) {
      setTreeNodeRow(child,row);
    }
    final List<? extends FOXTreeNode> nameSpaceChildren=element.getNameSpaceChildren();
    for (    FOXTreeNode child : nameSpaceChildren) {
      setTreeNodeRow(child,row);
    }
  }
  List<FOXTreeNode> children=root.getChildren();
  for (  FOXTreeNode child : children) {
    setTreeNodeRow(child,row);
  }
}
Program: 122361
Project: 122361
Buggy source:
protected void removeComments(Element ele){
  Iterator commentIterator=ele.nodeIterator();
  while (commentIterator.hasNext()) {
    Object commentObj=commentIterator.next();
    if (commentObj instanceof Comment) {
      Comment comment=(Comment)commentObj;
      if (comment.getNodeType() == Node.COMMENT_NODE) {
        ele.remove(comment);
      }
    }
  }
}

Fixed version (ground truth):
protected void removeComments(Element ele){
  Iterator commentIterator=ele.nodeIterator();
  while (commentIterator.hasNext()) {
    Object commentObj=commentIterator.next();
    if (commentObj instanceof Comment) {
      Comment comment=(Comment)commentObj;
      if (comment.getNodeType() == Node.COMMENT_NODE) {
        commentIterator.remove();
      }
    }
  }
}
Program: 122363
Project: 122363
Buggy source:
protected void setMavenBuildScriptModules(Document pomDocument){
  Element rootElement=pomDocument.getRootElement();
  Element parentEle=rootElement.element("String_Node_Str");
  if (parentEle != null) {
    removeComments(parentEle);
  }
}

Fixed version (ground truth):
protected void setMavenBuildScriptModules(Document pomDocument){
  Element rootElement=pomDocument.getRootElement();
  Element parentEle=rootElement.element("String_Node_Str");
  if (parentEle != null) {
    removeComments(parentEle);
    List originalElements=parentEle.elements();
    List oldElements=new ArrayList(originalElements);
    originalElements.clear();
    List<String> mavenModules=getMavenModules();
    for (    String module : mavenModules) {
      Element moduleElement=parentEle.addElement("String_Node_Str");
      moduleElement.setText(module);
    }
    for (    Object eleObj : oldElements) {
      if (eleObj instanceof Element) {
        parentEle.add((Element)eleObj);
      }
    }
  }
}
Program: 122364
Project: 122364
Buggy source:
protected void updateMavenBuildFileContent(File mavenBuildFile,Map<String,String> mavenPropertiesMap,boolean addDependencies) throws DocumentException, IOException {
  SAXReader saxReader=new SAXReader();
  Document pomDocument=saxReader.read(mavenBuildFile);
  setMavenBuildScriptProperties(pomDocument,mavenPropertiesMap);
  if (addDependencies) {
    addMavenDependencyElements(pomDocument,getCompiledModuleNeededs(),MAVEN_PROP_LIB_PATH);
    addMavenDependencyElements(pomDocument,getExcludedModuleNeededs(),MAVEN_PROP_PROVIDED_LIB_PATH);
  }
  saveXmlDocoment(pomDocument,mavenBuildFile);
}

Fixed version (ground truth):
protected void updateMavenBuildFileContent(File mavenBuildFile,Map<String,String> mavenPropertiesMap) throws DocumentException, IOException {
  updateMavenBuildFileContent(mavenBuildFile,mavenPropertiesMap,false,false);
}
Program: 122365
Project: 122365
Buggy source:
/** 
 * DOC nrousseau Comment method "addMavenScriptToExport".
 * @param list
 * @param processes
 * @param codeOptions
 */
private void addMavenScriptToExport(List<ExportFileResource> list,ExportFileResource[] processes,Map<String,String> mavenPropertiesMap){
  List<URL> scriptsUrls=new ArrayList<URL>();
  addMavenBuildScripts(scriptsUrls,mavenPropertiesMap);
  ExportFileResource mavenResource=new ExportFileResource(null,"String_Node_Str");
  mavenResource.addResources("String_Node_Str",scriptsUrls);
  list.add(mavenResource);
}

Fixed version (ground truth):
/** 
 * DOC nrousseau Comment method "addMavenScriptToExport".
 * @param list
 * @param processes
 * @param codeOptions
 */
protected void addMavenScriptToExport(List<ExportFileResource> list,ExportFileResource[] processes,Map<String,String> mavenPropertiesMap){
  List<URL> scriptsUrls=new ArrayList<URL>();
  addMavenBuildScripts(scriptsUrls,mavenPropertiesMap);
  ExportFileResource mavenResource=new ExportFileResource(null,"String_Node_Str");
  mavenResource.addResources("String_Node_Str",scriptsUrls);
  list.add(mavenResource);
}