nus-yam/ex-repair huggingface dataset:
Program: 128007
Project: 128007
Buggy source:
@Override protected void run() throws LoginException, PersistenceException {
  resetItem();
  if (getItem() instanceof JobletProcessItem) {
    ((JobletProcessItem)getItem()).setJobletProcess((JobletProcess)processType);
  }
 else   if (getItem() instanceof ProcessItem) {
    ((ProcessItem)getItem()).setProcess(processType);
  }
  factory.save(getItem());
  loadedProcess.setProperty(getItem().getProperty());
  if (!avoidSaveRelations) {
    RelationshipItemBuilder.getInstance().addOrUpdateItem(getItem());
  }
}

Fixed version (ground truth):
@Override protected void run() throws LoginException, PersistenceException {
  resetItem();
  ProcessType processType;
  try {
    processType=loadedProcess.saveXmlFile();
  }
 catch (  IOException e) {
    throw new PersistenceException(e);
  }
  if (monitor != null) {
    monitor.worked(40);
  }
  if (getItem() instanceof JobletProcessItem) {
    ((JobletProcessItem)getItem()).setJobletProcess((JobletProcess)processType);
  }
 else   if (getItem() instanceof ProcessItem) {
    ((ProcessItem)getItem()).setProcess(processType);
  }
  factory.save(getItem());
  loadedProcess.setProperty(getItem().getProperty());
  if (!avoidSaveRelations) {
    RelationshipItemBuilder.getInstance().addOrUpdateItem(getItem());
  }
}
Program: 128008
Project: 128008
Buggy source:
private void synDuplicatedRoutine(RoutineItem item){
  ICodeGeneratorService codeGenService=(ICodeGeneratorService)GlobalServiceRegister.getDefault().getService(ICodeGeneratorService.class);
  if (codeGenService != null) {
    codeGenService.createRoutineSynchronizer().renameRoutineClass(item);
    try {
      codeGenService.createRoutineSynchronizer().syncRoutine(item,true);
    }
 catch (    SystemException e) {
      ExceptionHandler.process(e);
    }
  }
}

Fixed version (ground truth):
private void synDuplicatedRoutine(RoutineItem item,String oldLabel){
  ICodeGeneratorService codeGenService=(ICodeGeneratorService)GlobalServiceRegister.getDefault().getService(ICodeGeneratorService.class);
  if (codeGenService != null) {
    if (item instanceof PigudfItem) {
      codeGenService.createRoutineSynchronizer().renamePigudfClass((PigudfItem)item,oldLabel);
    }
 else {
      codeGenService.createRoutineSynchronizer().renameRoutineClass(item);
    }
    try {
      codeGenService.createRoutineSynchronizer().syncRoutine(item,true);
    }
 catch (    SystemException e) {
      ExceptionHandler.process(e);
    }
  }
}
Program: 128012
Project: 128012
Buggy source:
private void synDuplicatedRoutine(RoutineItem item){
  ICodeGeneratorService codeGenService=(ICodeGeneratorService)GlobalServiceRegister.getDefault().getService(ICodeGeneratorService.class);
  if (codeGenService != null) {
    codeGenService.createRoutineSynchronizer().renameRoutineClass(item);
    try {
      codeGenService.createRoutineSynchronizer().syncRoutine(item,true);
    }
 catch (    SystemException e) {
      ExceptionHandler.process(e);
    }
  }
}

Fixed version (ground truth):
private void synDuplicatedRoutine(RoutineItem item,String oldLable){
  ICodeGeneratorService codeGenService=(ICodeGeneratorService)GlobalServiceRegister.getDefault().getService(ICodeGeneratorService.class);
  if (codeGenService != null) {
    if (item instanceof PigudfItem) {
      codeGenService.createRoutineSynchronizer().renamePigudfClass((PigudfItem)item,oldLable);
    }
 else {
      codeGenService.createRoutineSynchronizer().renameRoutineClass(item);
    }
    try {
      codeGenService.createRoutineSynchronizer().syncRoutine(item,true);
    }
 catch (    SystemException e) {
      ExceptionHandler.process(e);
    }
  }
}
Program: 128016
Project: 128016
Buggy source:
public Resource getScreenshotResource(Item item,boolean createIfNotExist){
  URI itemResourceURI=null;
  itemResourceURI=getScreenshotResourceURI(getItemURI(item));
  boolean fileExist=false;
  if (itemResourceURI.isFile()) {
    fileExist=new File(itemResourceURI.toFileString()).exists();
  }
 else {
    IPath path=URIHelper.convert(itemResourceURI);
    if (path != null) {
      IFile file=ResourcesPlugin.getWorkspace().getRoot().getFile(path);
      if (file.exists()) {
        fileExist=true;
      }
    }
 else {
      fileExist=false;
    }
  }
  Resource itemResource=null;
  if (fileExist) {
    List<Resource> resources=new ArrayList<Resource>(resourceSet.getResources());
    try {
      itemResource=resourceSet.getResource(itemResourceURI,true);
    }
 catch (    Exception e) {
      itemResource=null;
    }
  }
  if (itemResource == null && createIfNotExist) {
    itemResource=resourceSet.createResource(itemResourceURI);
  }
  return itemResource;
}

Fixed version (ground truth):
public Resource getScreenshotResource(Item item,boolean createIfNotExist,boolean forceReload){
  URI itemResourceURI=null;
  itemResourceURI=getScreenshotResourceURI(getItemURI(item));
  boolean fileExist=false;
  if (itemResourceURI.isFile()) {
    fileExist=new File(itemResourceURI.toFileString()).exists();
  }
 else {
    IPath path=URIHelper.convert(itemResourceURI);
    if (path != null) {
      IFile file=ResourcesPlugin.getWorkspace().getRoot().getFile(path);
      if (file.exists()) {
        fileExist=true;
      }
    }
 else {
      fileExist=false;
    }
  }
  Resource itemResource=null;
  if (fileExist) {
    List<Resource> resources=new ArrayList<Resource>(resourceSet.getResources());
    if (forceReload) {
      for (      Resource res : resources) {
        if (res != null) {
          if (itemResourceURI.toString().equals(res.getURI().toString())) {
            res.unload();
            resourceSet.getResources().remove(res);
            break;
          }
        }
      }
    }
    try {
      itemResource=resourceSet.getResource(itemResourceURI,true);
    }
 catch (    Exception e) {
      itemResource=null;
    }
  }
  if (itemResource == null && createIfNotExist) {
    itemResource=resourceSet.createResource(itemResourceURI);
  }
  return itemResource;
}
Program: 128019
Project: 128019
Buggy source:
private void moveOldContentToNewFolder(Project project,String completeNewPath,FolderItem emfFolder,FolderItem newFolder,Item child) throws PersistenceException {
  emfFolder.getChildren().remove(child);
  newFolder.getChildren().add(child);
  child.setParent(newFolder);
  moveDQItemToNewFolder(project,completeNewPath,child);
  List<Resource> affectedResources=xmiResourceManager.getAffectedResources(child.getProperty());
  for (  Resource resource : affectedResources) {
    IPath path=getPhysicalProject(project).getFullPath().append(completeNewPath).append(resource.getURI().lastSegment());
    List<Resource> needSaves=findCrossReference(resource);
    moveResource(resource,path);
    saveCrossReference(needSaves);
  }
  affectedResources=xmiResourceManager.getAffectedResources(child.getProperty());
  for (  Resource resource : affectedResources) {
    xmiResourceManager.saveResource(resource);
  }
}

Fixed version (ground truth):
private void moveOldContentToNewFolder(Project project,String completeNewPath,FolderItem emfFolder,FolderItem newFolder,Item child) throws PersistenceException {
  emfFolder.getChildren().remove(child);
  newFolder.getChildren().add(child);
  child.setParent(newFolder);
  moveDQItemToNewFolder(project,completeNewPath,child);
  List<Resource> affectedResources=xmiResourceManager.getAffectedResources(child.getProperty());
  Map<Resource,IPath> resourceAndPathMap=new HashMap<Resource,IPath>();
  for (  Resource resource : affectedResources) {
    IPath path=getPhysicalProject(project).getFullPath().append(completeNewPath).append(resource.getURI().lastSegment());
    resourceAndPathMap.put(resource,path);
    List<Resource> needSaves=findCrossReference(resource);
    moveResource(resource,path);
    saveCrossReference(needSaves);
  }
  IPath parentPath=getPhysicalProject(project).getFullPath().append(completeNewPath);
  svnMoveResource(affectedResources,parentPath,resourceAndPathMap);
  affectedResources=xmiResourceManager.getAffectedResources(child.getProperty());
  for (  Resource resource : affectedResources) {
    xmiResourceManager.saveResource(resource);
  }
}
Program: 128024
Project: 128024
Buggy source:
@Override public void run(IProgressMonitor monitor) throws CoreException {
  try {
    for (    Object obj : ((StructuredSelection)data).toArray()) {
      final RepositoryNode sourceNode=(RepositoryNode)obj;
      monitor.subTask(Messages.getString("String_Node_Str") + sourceNode.getObject().getLabel());
      MoveObjectAction.getInstance().execute(sourceNode,targetNode,true);
    }
  }
 catch (  Exception e) {
    throw new CoreException(new org.eclipse.core.runtime.Status(IStatus.ERROR,FrameworkUtil.getBundle(this.getClass()).getSymbolicName(),"String_Node_Str",e));
  }
}

Fixed version (ground truth):
@Override public void run(IProgressMonitor monitor) throws CoreException {
  try {
    RepositoryNode[] nodeArray=new RepositoryNode[((StructuredSelection)data).toArray().length];
    for (int i=0; i < ((StructuredSelection)data).toArray().length; i++) {
      final RepositoryNode sourceNode=(RepositoryNode)((StructuredSelection)data).toArray()[i];
      nodeArray[i]=sourceNode;
    }
    MoveObjectAction.getInstance().executeMulti(nodeArray,targetNode,null,true);
  }
 catch (  Exception e) {
    throw new CoreException(new org.eclipse.core.runtime.Status(IStatus.ERROR,FrameworkUtil.getBundle(this.getClass()).getSymbolicName(),"String_Node_Str",e));
  }
}
Program: 128025
Project: 128025
Buggy source:
public static DatabaseMetaData getConnectionMetadata(java.sql.Connection conn) throws SQLException {
  if (conn != null) {
    DatabaseMetaData dbMetaData=conn.getMetaData();
    if (dbMetaData != null && dbMetaData.getDatabaseProductName() != null) {
      return getDatabaseMetaData(conn,dbMetaData.getDatabaseProductName(),false,null);
    }
    return dbMetaData;
  }
  return null;
}

Fixed version (ground truth):
/** 
 * @param conn
 * @return
 * @throws SQLException this method will pass a mistake databaseType to get DatabaseMetDdata(e.x. db2->db2 for zos) if you can, you should use getDatabaseMetaData() instead of this method
 */
public static DatabaseMetaData getConnectionMetadata(java.sql.Connection conn) throws SQLException {
  if (conn != null) {
    DatabaseMetaData dbMetaData=conn.getMetaData();
    if (dbMetaData != null && dbMetaData.getDatabaseProductName() != null) {
      return getDatabaseMetaData(conn,dbMetaData.getDatabaseProductName(),false,null);
    }
    return dbMetaData;
  }
  return null;
}
Program: 128026
Project: 128026
Buggy source:
/** 
 * only for db2 on z/os right now.
 * @param conn2
 * @return
 */
private static DatabaseMetaData createDB2ForZosFakeDatabaseMetaData(Connection conn){
  DB2ForZosDataBaseMetadata dmd=new DB2ForZosDataBaseMetadata(conn);
  return dmd;
}

Fixed version (ground truth):
/** 
 * only for db2 on z/os right now.
 * @param conn2
 * @return
 */
public static DatabaseMetaData createDB2ForZosFakeDatabaseMetaData(Connection conn){
  DB2ForZosDataBaseMetadata dmd=new DB2ForZosDataBaseMetadata(conn);
  return dmd;
}
Program: 128028
Project: 128028
Buggy source:
private void hideHCLinkSettings(boolean hide){
  GridData hadoopLinkData=(GridData)hadoopLinkComp.getLayoutData();
  hadoopLinkComp.setVisible(!hide);
  hadoopLinkData.exclude=hide;
  hcPropertyTypeCombo.setHideWidgets(hide);
}

Fixed version (ground truth):
private void hideHCLinkSettings(boolean hide){
  if (hadoopLinkComp == null) {
    return;
  }
  GridData hadoopLinkData=(GridData)hadoopLinkComp.getLayoutData();
  hadoopLinkComp.setVisible(!hide);
  hadoopLinkData.exclude=hide;
  hcPropertyTypeCombo.setHideWidgets(hide);
}
Program: 128032
Project: 128032
Buggy source:
@Override public Object defaultCase(EObject object){
  throw new IllegalStateException();
}

Fixed version (ground truth):
@Override public Object defaultCase(EObject object){
  return null;
}
Program: 128033
Project: 128033
Buggy source:
public static String checkStringQuotationMarks(String str){
  if (str == null) {
    return "String_Node_Str";
  }
 else   if (!str.contains("String_Node_Str")) {
    return str;
  }
  return str.replace("String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
public static String checkStringQuotationMarks(String str){
  String newStr=str;
  if (str == null) {
    return "String_Node_Str";
  }
  if (newStr.contains("String_Node_Str")) {
    newStr=newStr.replace("String_Node_Str","String_Node_Str");
  }
  if (newStr.contains("String_Node_Str")) {
    newStr=newStr.replace("String_Node_Str","String_Node_Str");
  }
  return newStr;
}
Program: 128034
Project: 128034
Buggy source:
private static void generateBuildInfo(JobInfo jobInfo,IProgressMonitor progressMonitor,boolean isMainJob,IProcess currentProcess,String currentJobName) throws ProcessorException {
  if (isMainJob) {
    progressMonitor.subTask(Messages.getString("String_Node_Str") + currentJobName);
    Set<String> jarList=new HashSet<String>();
    Set<ModuleNeeded> neededModules=LastGenerationInfo.getInstance().getModulesNeededWithSubjobPerJob(jobInfo.getJobId(),jobInfo.getJobVersion());
    for (    ModuleNeeded module : neededModules) {
      jarList.add(module.getModuleName());
    }
    CorePlugin.getDefault().getRunProcessService().updateLibraries(jarList,currentProcess);
    if (LanguageManager.getCurrentLanguage() == ECodeLanguage.JAVA && codeModified) {
      try {
        CorePlugin.getDefault().getRunProcessService().getJavaProject().getProject().build(IncrementalProjectBuilder.AUTO_BUILD,null);
      }
 catch (      CoreException e) {
        throw new ProcessorException(e);
      }
    }
    needContextInCurrentGeneration=true;
    codeModified=false;
  }
}

Fixed version (ground truth):
private static void generateBuildInfo(JobInfo jobInfo,IProgressMonitor progressMonitor,boolean isMainJob,IProcess currentProcess,String currentJobName,IProcessor processor) throws ProcessorException {
  if (isMainJob) {
    progressMonitor.subTask(Messages.getString("String_Node_Str") + currentJobName);
    Set<String> jarList=new HashSet<String>();
    Set<ModuleNeeded> neededModules=LastGenerationInfo.getInstance().getModulesNeededWithSubjobPerJob(jobInfo.getJobId(),jobInfo.getJobVersion());
    for (    ModuleNeeded module : neededModules) {
      jarList.add(module.getModuleName());
    }
    CorePlugin.getDefault().getRunProcessService().updateLibraries(jarList,currentProcess);
    if (codeModified) {
      try {
        CorePlugin.getDefault().getRunProcessService().getJavaProject().getProject().build(IncrementalProjectBuilder.AUTO_BUILD,null);
      }
 catch (      CoreException e) {
        throw new ProcessorException(e);
      }
      processor.syntaxCheck();
    }
    needContextInCurrentGeneration=true;
    codeModified=false;
  }
}
Program: 128035
Project: 128035
Buggy source:
protected Item copyFromResource(Resource createResource,String newItemLabel) throws PersistenceException, BusinessException {
  if (newItemLabel != null) {
    Item newItem=(Item)EcoreUtil.getObjectByType(createResource.getContents(),PropertiesPackage.eINSTANCE.getItem());
    Property property=newItem.getProperty();
    property.setId(getNextId());
    property.setAuthor(getRepositoryContext().getUser());
    property.setLabel(newItemLabel);
    property.setDisplayName(newItemLabel);
    if (!isNameAvailable(getRepositoryContext().getProject(),property.getItem(),null)) {
      throw new BusinessException(Messages.getString("String_Node_Str"));
    }
    EcoreUtil.resolveAll(createResource);
    return newItem;
  }
 else {
    boolean changeLabelWithCopyPrefix=true;
    return copyFromResource(createResource,changeLabelWithCopyPrefix);
  }
}

Fixed version (ground truth):
protected Item copyFromResource(Resource createResource,String newItemLabel) throws PersistenceException, BusinessException {
  if (newItemLabel != null) {
    Item newItem=(Item)EcoreUtil.getObjectByType(createResource.getContents(),PropertiesPackage.eINSTANCE.getItem());
    Property property=newItem.getProperty();
    property.setId(getNextId());
    property.setAuthor(getRepositoryContext().getUser());
    property.setLabel(newItemLabel);
    property.setDisplayName(newItemLabel);
    EcoreUtil.resolveAll(createResource);
    return newItem;
  }
 else {
    boolean changeLabelWithCopyPrefix=true;
    return copyFromResource(createResource,changeLabelWithCopyPrefix);
  }
}
Program: 128037
Project: 128037
Buggy source:
@Override public Object defaultCase(EObject object){
  throw new IllegalStateException();
}

Fixed version (ground truth):
@Override public Object defaultCase(EObject object){
  return null;
}
Program: 128038
Project: 128038
Buggy source:
private boolean isRepository(INode node){
  IElementParameter schemaParam=node.getElementParameter("String_Node_Str");
  if (schemaParam != null) {
    String schemaType=(String)schemaParam.getValue();
    if (schemaType.equals("String_Node_Str")) {
      return true;
    }
  }
  schemaParam=node.getElementParameter("String_Node_Str");
  if (schemaParam != null) {
    List schemaType=(List)schemaParam.getValue();
    for (int i=0; i < schemaType.size(); i++) {
      HashMap map=(HashMap)schemaType.get(i);
      if (map.containsKey("String_Node_Str") && map.containsValue("String_Node_Str")) {
        return true;
      }
    }
  }
  return false;
}

Fixed version (ground truth):
private boolean isRepository(INode node){
  IElementParameter schemaParam=node.getElementParameter("String_Node_Str");
  if (schemaParam != null) {
    String schemaType=(String)schemaParam.getValue();
    if (schemaType.equals("String_Node_Str")) {
      return true;
    }
  }
  schemaParam=node.getElementParameter("String_Node_Str");
  if (schemaParam != null) {
    List schemaType=(List)schemaParam.getValue();
    for (int i=0; i < schemaType.size(); i++) {
      HashMap map=(HashMap)schemaType.get(i);
      Set set=map.keySet();
      Iterator it=set.iterator();
      while (it.hasNext()) {
        String key=(String)it.next();
        if (key.equals("String_Node_Str")) {
          String value=(String)map.get(key);
          if (this.outputMetaTable.getLabel().equals(TalendQuoteUtils.removeQuotes(value))) {
            if (map.containsKey("String_Node_Str") && map.containsValue("String_Node_Str")) {
              return true;
            }
          }
        }
      }
    }
  }
  return false;
}
Program: 128041
Project: 128041
Buggy source:
protected void writeDeclaration() throws IOException {
  OutputFormat formatTmp=this.getOutputFormat();
  String encoding=formatTmp.getEncoding();
  if (!formatTmp.isSuppressDeclaration()) {
    if (encoding.equals("String_Node_Str")) {
      writer.write("String_Node_Str");
      if (!formatTmp.isOmitEncoding()) {
        writer.write("String_Node_Str");
      }
      writer.write("String_Node_Str");
    }
 else {
      writer.write("String_Node_Str");
      if (!formatTmp.isOmitEncoding()) {
        writer.write("String_Node_Str" + encoding + "String_Node_Str");
      }
      writer.write("String_Node_Str");
    }
    if (formatTmp.isNewLineAfterDeclaration()) {
      println();
    }
  }
}

Fixed version (ground truth):
@Override protected void writeDeclaration() throws IOException {
  OutputFormat formatTmp=this.getOutputFormat();
  String encoding=formatTmp.getEncoding();
  if (!formatTmp.isSuppressDeclaration()) {
    if (encoding.equals("String_Node_Str")) {
      writer.write("String_Node_Str");
      if (!formatTmp.isOmitEncoding()) {
        writer.write("String_Node_Str");
      }
      writer.write("String_Node_Str");
    }
 else {
      writer.write("String_Node_Str");
      if (!formatTmp.isOmitEncoding()) {
        writer.write("String_Node_Str" + encoding + "String_Node_Str");
      }
      writer.write("String_Node_Str");
    }
    if (formatTmp.isNewLineAfterDeclaration()) {
      println();
    }
  }
}
Program: 128042
Project: 128042
Buggy source:
/** 
 * Export the resources contained in the previously-defined resourcesToExport collection.
 */
protected void exportSpecifiedResources() throws InterruptedException {
  for (  ExportFileResource fileResource : resourcesListToExport) {
    String rootName=fileResource.getDirectoryName();
    Set<String> paths=fileResource.getRelativePathList();
    for (Iterator iter=paths.iterator(); iter.hasNext(); ) {
      String relativePath=(String)iter.next();
      Set<URL> resource=fileResource.getResourcesByRelativePath(relativePath);
      for (      URL url : resource) {
        String currentResource=FilesUtils.getFileRealPath(url.getPath());
        exportResource(rootName,relativePath,currentResource,1);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Export the resources contained in the previously-defined resourcesToExport collection.
 */
protected void exportSpecifiedResources() throws InterruptedException {
  for (  ExportFileResource fileResource : resourcesListToExport) {
    String rootName=fileResource.getDirectoryName();
    Set<String> paths=fileResource.getRelativePathList();
    for (    Object element : paths) {
      String relativePath=(String)element;
      Set<URL> resource=fileResource.getResourcesByRelativePath(relativePath);
      for (      URL url : resource) {
        String currentResource=FilesUtils.getFileRealPath(url.getPath());
        exportResource(rootName,relativePath,currentResource,1);
      }
    }
  }
}
Program: 128045
Project: 128045
Buggy source:
public static RepositoryComponentSetting getSetting(Item item,ERepositoryObjectType type){
  if (item == null) {
    return null;
  }
  boolean subItem=(type == ERepositoryObjectType.METADATA_CON_TABLE);
  for (  RepositoryComponentSetting setting : getSettings()) {
    Class<Item>[] classes=setting.getClasses();
    if (classes != null) {
      for (      Class<Item> clazz : classes) {
        if (clazz == item.eClass().getInstanceClass()) {
          if (clazz.isAssignableFrom(DatabaseConnectionItem.class)) {
            EDatabaseTypeName[] dbTypes=setting.getDbTypes();
            if (dbTypes != null) {
              for (              EDatabaseTypeName dbType : dbTypes) {
                DatabaseConnectionItem dbItem=(DatabaseConnectionItem)item;
                DatabaseConnection dbConnection=(DatabaseConnection)dbItem.getConnection();
                if (dbType.getDisplayName().equals(dbConnection.getDatabaseType())) {
                  if (!subItem) {
                    return setting;
                  }
                  if (subItem && setting.withSchema()) {
                    return setting;
                  }
                }
              }
            }
          }
 else {
            return setting;
          }
        }
      }
    }
  }
  return null;
}

Fixed version (ground truth):
public static RepositoryComponentSetting getSetting(Item item,ERepositoryObjectType type){
  if (item == null) {
    return null;
  }
  boolean subItem=(type == ERepositoryObjectType.METADATA_CON_TABLE);
  for (  RepositoryComponentSetting setting : getSettings()) {
    Class<Item>[] classes=setting.getClasses();
    if (classes != null) {
      for (      Class<Item> clazz : classes) {
        if (clazz.isAssignableFrom(item.getClass())) {
          if (clazz.isAssignableFrom(DatabaseConnectionItem.class)) {
            EDatabaseTypeName[] dbTypes=setting.getDbTypes();
            if (dbTypes != null) {
              for (              EDatabaseTypeName dbType : dbTypes) {
                DatabaseConnectionItem dbItem=(DatabaseConnectionItem)item;
                DatabaseConnection dbConnection=(DatabaseConnection)dbItem.getConnection();
                if (dbType.getDisplayName().equals(dbConnection.getDatabaseType())) {
                  if (!subItem) {
                    return setting;
                  }
                  if (subItem && setting.withSchema()) {
                    return setting;
                  }
                }
              }
            }
          }
 else           if (clazz.isAssignableFrom(ProcessItem.class)) {
            if (item.eClass() == PropertiesPackage.Literals.PROCESS_ITEM) {
              return setting;
            }
          }
 else {
            return setting;
          }
        }
      }
    }
  }
  return null;
}
Program: 128048
Project: 128048
Buggy source:
public static String getTableComment(String tableName,ResultSet tablesSet,boolean needRemark) throws SQLException {
  String tableComment="String_Node_Str";
  if (needRemark) {
    tableComment=tablesSet.getString(GetTable.REMARKS.name());
  }
  if (StringUtils.isBlank(tableComment)) {
    String selectRemarkOnTable=getSelectRemarkOnTable(tableName);
    if (selectRemarkOnTable != null && ExtractMetaDataUtils.conn != null) {
      tableComment=executeGetCommentStatement(selectRemarkOnTable,ExtractMetaDataUtils.conn);
    }
  }
  return tableComment;
}

Fixed version (ground truth):
public static String getTableComment(String tableName,ResultSet tablesSet,boolean needRemark,Connection connection) throws SQLException {
  String tableComment="String_Node_Str";
  if (needRemark) {
    tableComment=tablesSet.getString(GetTable.REMARKS.name());
  }
  if (StringUtils.isBlank(tableComment)) {
    String selectRemarkOnTable=getSelectRemarkOnTable(tableName);
    if (selectRemarkOnTable != null && connection != null) {
      tableComment=executeGetCommentStatement(selectRemarkOnTable,connection);
    }
  }
  return tableComment;
}
Program: 128049
Project: 128049
Buggy source:
/** 
 * DOC qzhang Comment method "getTableNamesFromQuery".
 * @param rsTables
 * @return
 * @throws SQLException
 */
public static List<String> getTableNamesFromQuery(ResultSet resultSet) throws SQLException {
  List<String> itemTablesName=new ArrayList<String>();
  tableCommentsMap.clear();
  while (resultSet.next()) {
    String nameKey=resultSet.getString(1).trim();
    String tableComment=getTableComment(nameKey,resultSet,false);
    if (tableCommentsMap.containsKey(nameKey)) {
      if (tableComment == null) {
        tableComment="String_Node_Str";
      }
      tableCommentsMap.remove(nameKey);
      tableCommentsMap.put(nameKey,tableComment);
    }
    itemTablesName.add(nameKey);
    tableCommentsMap.put(nameKey,tableComment);
  }
  return itemTablesName;
}

Fixed version (ground truth):
/** 
 * DOC qzhang Comment method "getTableNamesFromQuery".
 * @param rsTables
 * @return
 * @throws SQLException
 */
public static List<String> getTableNamesFromQuery(ResultSet resultSet,Connection connection) throws SQLException {
  List<String> itemTablesName=new ArrayList<String>();
  tableCommentsMap.clear();
  while (resultSet.next()) {
    String nameKey=resultSet.getString(1).trim();
    String tableComment=getTableComment(nameKey,resultSet,false,connection);
    if (tableCommentsMap.containsKey(nameKey)) {
      if (tableComment == null) {
        tableComment="String_Node_Str";
      }
      tableCommentsMap.remove(nameKey);
      tableCommentsMap.put(nameKey,tableComment);
    }
    itemTablesName.add(nameKey);
    tableCommentsMap.put(nameKey,tableComment);
  }
  return itemTablesName;
}
Program: 128051
Project: 128051
Buggy source:
public String getTableComment(IMetadataConnection metadataConnection,ResultSet resultSet,String nameKey) throws SQLException {
  return ExtractMetaDataFromDataBase.getTableComment(nameKey,resultSet,true);
}

Fixed version (ground truth):
public String getTableComment(IMetadataConnection metadataConnection,ResultSet resultSet,String nameKey) throws SQLException {
  return ExtractMetaDataFromDataBase.getTableComment(nameKey,resultSet,true,ExtractMetaDataUtils.conn);
}
Program: 128052
Project: 128052
Buggy source:
@Override protected void filterTablesFromRecycleBin(IMetadataConnection metadataConnection,List<String> itemTablesName){
  if (metadataConnection.getDbVersionString() != null && !metadataConnection.getDbVersionString().equals(EDatabaseVersion4Drivers.ORACLE_8.getVersionValue())) {
    try {
      Statement stmt=ExtractMetaDataUtils.conn.createStatement();
      ExtractMetaDataUtils.setQueryStatementTimeout(stmt);
      ResultSet rsTables=stmt.executeQuery(TableInfoParameters.ORACLE_10G_RECBIN_SQL);
      itemTablesName.removeAll(ExtractMetaDataFromDataBase.getTableNamesFromQuery(rsTables));
      rsTables.close();
      stmt.close();
    }
 catch (    SQLException e) {
    }
  }
}

Fixed version (ground truth):
@Override protected void filterTablesFromRecycleBin(IMetadataConnection metadataConnection,List<String> itemTablesName){
  if (metadataConnection.getDbVersionString() != null && !metadataConnection.getDbVersionString().equals(EDatabaseVersion4Drivers.ORACLE_8.getVersionValue())) {
    try {
      Statement stmt=ExtractMetaDataUtils.conn.createStatement();
      ExtractMetaDataUtils.setQueryStatementTimeout(stmt);
      ResultSet rsTables=stmt.executeQuery(TableInfoParameters.ORACLE_10G_RECBIN_SQL);
      itemTablesName.removeAll(ExtractMetaDataFromDataBase.getTableNamesFromQuery(rsTables,ExtractMetaDataUtils.conn));
      rsTables.close();
      stmt.close();
    }
 catch (    SQLException e) {
    }
  }
}
Program: 128053
Project: 128053
Buggy source:
@Override protected List<String> retrieveItemTables(IMetadataConnection metadataConnection,TableInfoParameters tableInfoParameters,List<String> itemTablesName) throws SQLException {
  if (ExtractMetaDataUtils.conn != null && ExtractMetaDataUtils.conn.toString().contains("String_Node_Str") && ExtractMetaDataUtils.isUseAllSynonyms()) {
    Set<String> nameFiters=tableInfoParameters.getNameFilters();
    Statement stmt=ExtractMetaDataUtils.conn.createStatement();
    ExtractMetaDataUtils.setQueryStatementTimeout(stmt);
    StringBuffer filters=new StringBuffer();
    if (!nameFiters.isEmpty()) {
      filters.append("String_Node_Str");
      final String tStr="String_Node_Str";
      int i=0;
      for (      String s : nameFiters) {
        if (i != 0) {
          filters.append("String_Node_Str");
        }
        filters.append(tStr);
        filters.append(s);
        filters.append('\'');
        i++;
      }
      filters.append(')');
    }
    ResultSet rsTables=stmt.executeQuery(GET_ALL_SYNONYMS + filters.toString());
    itemTablesName=ExtractMetaDataFromDataBase.getTableNamesFromQuery(rsTables);
    rsTables.close();
    stmt.close();
    for (    String synonymName : itemTablesName) {
      getTableTypeMap().put(synonymName,ETableTypes.TABLETYPE_SYNONYM.getName());
    }
  }
 else {
    itemTablesName=super.retrieveItemTables(metadataConnection,tableInfoParameters,itemTablesName);
  }
  return itemTablesName;
}

Fixed version (ground truth):
@Override protected List<String> retrieveItemTables(IMetadataConnection metadataConnection,TableInfoParameters tableInfoParameters,List<String> itemTablesName) throws SQLException {
  if (ExtractMetaDataUtils.conn != null && ExtractMetaDataUtils.conn.toString().contains("String_Node_Str") && ExtractMetaDataUtils.isUseAllSynonyms()) {
    Set<String> nameFiters=tableInfoParameters.getNameFilters();
    Statement stmt=ExtractMetaDataUtils.conn.createStatement();
    ExtractMetaDataUtils.setQueryStatementTimeout(stmt);
    StringBuffer filters=new StringBuffer();
    if (!nameFiters.isEmpty()) {
      filters.append("String_Node_Str");
      final String tStr="String_Node_Str";
      int i=0;
      for (      String s : nameFiters) {
        if (i != 0) {
          filters.append("String_Node_Str");
        }
        filters.append(tStr);
        filters.append(s);
        filters.append('\'');
        i++;
      }
      filters.append(')');
    }
    ResultSet rsTables=stmt.executeQuery(GET_ALL_SYNONYMS + filters.toString());
    itemTablesName=ExtractMetaDataFromDataBase.getTableNamesFromQuery(rsTables,ExtractMetaDataUtils.conn);
    rsTables.close();
    stmt.close();
    for (    String synonymName : itemTablesName) {
      getTableTypeMap().put(synonymName,ETableTypes.TABLETYPE_SYNONYM.getName());
    }
  }
 else {
    itemTablesName=super.retrieveItemTables(metadataConnection,tableInfoParameters,itemTablesName);
  }
  return itemTablesName;
}
Program: 128054
Project: 128054
Buggy source:
@Override protected List<String> getTablesToFilter(IMetadataConnection metadataConnection){
  List<String> tablesToFilter=new ArrayList<String>();
  Statement stmt;
  try {
    stmt=ExtractMetaDataUtils.conn.createStatement();
    ExtractMetaDataUtils.setQueryStatementTimeout(stmt);
    if (EDatabaseTypeName.ORACLEFORSID.getDisplayName().equals(metadataConnection.getDbType()) || EDatabaseTypeName.ORACLESN.getDisplayName().equals(metadataConnection.getDbType()) || EDatabaseTypeName.ORACLE_RAC.getDisplayName().equals(metadataConnection.getDbType())|| EDatabaseTypeName.ORACLE_OCI.getDisplayName().equals(metadataConnection.getDbType())) {
      ResultSet rsTables=stmt.executeQuery(ORACLE_10G_RECBIN_SQL);
      tablesToFilter=ExtractMetaDataFromDataBase.getTableNamesFromQuery(rsTables);
      rsTables.close();
    }
    stmt.close();
  }
 catch (  SQLException e) {
    ExceptionHandler.process(e);
  }
  return tablesToFilter;
}

Fixed version (ground truth):
@Override protected List<String> getTablesToFilter(IMetadataConnection metadataConnection){
  List<String> tablesToFilter=new ArrayList<String>();
  Statement stmt;
  try {
    stmt=ExtractMetaDataUtils.conn.createStatement();
    ExtractMetaDataUtils.setQueryStatementTimeout(stmt);
    if (EDatabaseTypeName.ORACLEFORSID.getDisplayName().equals(metadataConnection.getDbType()) || EDatabaseTypeName.ORACLESN.getDisplayName().equals(metadataConnection.getDbType()) || EDatabaseTypeName.ORACLE_RAC.getDisplayName().equals(metadataConnection.getDbType())|| EDatabaseTypeName.ORACLE_OCI.getDisplayName().equals(metadataConnection.getDbType())) {
      ResultSet rsTables=stmt.executeQuery(ORACLE_10G_RECBIN_SQL);
      tablesToFilter=ExtractMetaDataFromDataBase.getTableNamesFromQuery(rsTables,ExtractMetaDataUtils.conn);
      rsTables.close();
    }
    stmt.close();
  }
 catch (  SQLException e) {
    ExceptionHandler.process(e);
  }
  return tablesToFilter;
}
Program: 128055
Project: 128055
Buggy source:
@Override public String getTableComment(IMetadataConnection metadataConnection,ResultSet resultSet,String nameKey) throws SQLException {
  if (EDatabaseVersion4Drivers.ORACLE_8.getVersionValue().equals(metadataConnection.getDbVersionString())) {
    return ExtractMetaDataFromDataBase.getTableComment(nameKey,resultSet,false);
  }
  return super.getTableComment(metadataConnection,resultSet,nameKey);
}

Fixed version (ground truth):
@Override public String getTableComment(IMetadataConnection metadataConnection,ResultSet resultSet,String nameKey) throws SQLException {
  if (EDatabaseVersion4Drivers.ORACLE_8.getVersionValue().equals(metadataConnection.getDbVersionString())) {
    return ExtractMetaDataFromDataBase.getTableComment(nameKey,resultSet,false,ExtractMetaDataUtils.conn);
  }
  return super.getTableComment(metadataConnection,resultSet,nameKey);
}
Program: 128056
Project: 128056
Buggy source:
@Override protected void createBottomPart(Composite parent){
  convertBtn=new Button(parent,SWT.BORDER);
  convertBtn.setText(Messages.getString("String_Node_Str"));
  GridDataFactory.swtDefaults().span(2,1).align(SWT.CENTER,SWT.CENTER).grab(false,false).applyTo(convertBtn);
  convertBtn.setEnabled(!isReadOnly());
}

Fixed version (ground truth):
@Override protected void createBottomPart(Composite parent){
  convertBtn=new Button(parent,SWT.PUSH);
  convertBtn.setText(Messages.getString("String_Node_Str"));
  GridDataFactory.swtDefaults().span(2,1).align(SWT.CENTER,SWT.CENTER).grab(false,false).applyTo(convertBtn);
  convertBtn.setEnabled(!isReadOnly());
}
Program: 128057
Project: 128057
Buggy source:
/** 
 * Test method for  {@link org.talend.core.model.metadata.builder.database.ExtractMetaDataFromDataBase#getTableNamesFromQuery(java.sql.ResultSet)}.
 * @throws SQLException
 */
@Test public void testGetTableNamesFromQuery() throws SQLException {
  assertTrue(ExtractMetaDataFromDataBase.tableCommentsMap instanceof HashMap<?,?>);
  assertTrue(ExtractMetaDataFromDataBase.tableCommentsMap.isEmpty());
  ResultSet mockResultSet=mock(ResultSet.class);
  when(mockResultSet.getString(1)).thenReturn("String_Node_Str");
  String nameKey=mockResultSet.getString(1).trim();
  String tableComment=ExtractMetaDataFromDataBase.getTableComment(nameKey,mockResultSet,false);
  assertNotNull(tableComment);
  ExtractMetaDataFromDataBase.tableCommentsMap.put(nameKey,tableComment);
  assertNotNull(ExtractMetaDataFromDataBase.tableCommentsMap);
  assertNotNull(ExtractMetaDataFromDataBase.getTableNamesFromQuery(mockResultSet));
}

Fixed version (ground truth):
/** 
 * Test method for  {@link org.talend.core.model.metadata.builder.database.ExtractMetaDataFromDataBase#getTableNamesFromQuery(java.sql.ResultSet)}.
 * @throws SQLException
 */
@Test public void testGetTableNamesFromQuery() throws SQLException {
  assertTrue(ExtractMetaDataFromDataBase.tableCommentsMap instanceof HashMap<?,?>);
  assertTrue(ExtractMetaDataFromDataBase.tableCommentsMap.isEmpty());
  ResultSet mockResultSet=mock(ResultSet.class);
  when(mockResultSet.getString(1)).thenReturn("String_Node_Str");
  String nameKey=mockResultSet.getString(1).trim();
  String tableComment=ExtractMetaDataFromDataBase.getTableComment(nameKey,mockResultSet,false,ExtractMetaDataUtils.conn);
  assertNotNull(tableComment);
  ExtractMetaDataFromDataBase.tableCommentsMap.put(nameKey,tableComment);
  assertNotNull(ExtractMetaDataFromDataBase.tableCommentsMap);
  assertNotNull(ExtractMetaDataFromDataBase.getTableNamesFromQuery(mockResultSet,ExtractMetaDataUtils.conn));
}
Program: 128058
Project: 128058
Buggy source:
protected Item copyFromResource(Resource createResource,String newItemLabel) throws PersistenceException, BusinessException {
  if (newItemLabel != null) {
    Item newItem=(Item)EcoreUtil.getObjectByType(createResource.getContents(),PropertiesPackage.eINSTANCE.getItem());
    Property property=newItem.getProperty();
    property.setId(getNextId());
    property.setAuthor(getRepositoryContext().getUser());
    property.setLabel(newItemLabel);
    property.setDisplayName(newItemLabel);
    if (!isPocess(newItem) && !isNameAvailable(getRepositoryContext().getProject(),property.getItem(),null)) {
      throw new BusinessException(Messages.getString("String_Node_Str"));
    }
    EcoreUtil.resolveAll(createResource);
    return newItem;
  }
 else {
    boolean changeLabelWithCopyPrefix=true;
    return copyFromResource(createResource,changeLabelWithCopyPrefix);
  }
}

Fixed version (ground truth):
protected Item copyFromResource(Resource createResource,String newItemLabel) throws PersistenceException, BusinessException {
  if (newItemLabel != null) {
    Item newItem=(Item)EcoreUtil.getObjectByType(createResource.getContents(),PropertiesPackage.eINSTANCE.getItem());
    Property property=newItem.getProperty();
    property.setId(getNextId());
    property.setAuthor(getRepositoryContext().getUser());
    property.setLabel(newItemLabel);
    property.setDisplayName(newItemLabel);
    EcoreUtil.resolveAll(createResource);
    return newItem;
  }
 else {
    boolean changeLabelWithCopyPrefix=true;
    return copyFromResource(createResource,changeLabelWithCopyPrefix);
  }
}
Program: 128059
Project: 128059
Buggy source:
public static RepositoryComponentSetting getSetting(Item item,ERepositoryObjectType type){
  if (item == null) {
    return null;
  }
  boolean subItem=(type == ERepositoryObjectType.METADATA_CON_TABLE);
  for (  RepositoryComponentSetting setting : getSettings()) {
    Class<Item>[] classes=setting.getClasses();
    if (classes != null) {
      for (      Class<Item> clazz : classes) {
        if (clazz.isAssignableFrom(item.getClass())) {
          if (clazz.isAssignableFrom(DatabaseConnectionItem.class)) {
            EDatabaseTypeName[] dbTypes=setting.getDbTypes();
            if (dbTypes != null) {
              for (              EDatabaseTypeName dbType : dbTypes) {
                DatabaseConnectionItem dbItem=(DatabaseConnectionItem)item;
                DatabaseConnection dbConnection=(DatabaseConnection)dbItem.getConnection();
                if (dbType.getDisplayName().equals(dbConnection.getDatabaseType())) {
                  if (!subItem) {
                    return setting;
                  }
                  if (subItem && setting.withSchema()) {
                    return setting;
                  }
                }
              }
            }
          }
 else {
            return setting;
          }
        }
      }
    }
  }
  return null;
}

Fixed version (ground truth):
public static RepositoryComponentSetting getSetting(Item item,ERepositoryObjectType type){
  if (item == null) {
    return null;
  }
  boolean subItem=(type == ERepositoryObjectType.METADATA_CON_TABLE);
  for (  RepositoryComponentSetting setting : getSettings()) {
    Class<Item>[] classes=setting.getClasses();
    if (classes != null) {
      for (      Class<Item> clazz : classes) {
        if (clazz == item.eClass().getInstanceClass()) {
          if (clazz.isAssignableFrom(DatabaseConnectionItem.class)) {
            EDatabaseTypeName[] dbTypes=setting.getDbTypes();
            if (dbTypes != null) {
              for (              EDatabaseTypeName dbType : dbTypes) {
                DatabaseConnectionItem dbItem=(DatabaseConnectionItem)item;
                DatabaseConnection dbConnection=(DatabaseConnection)dbItem.getConnection();
                if (dbType.getDisplayName().equals(dbConnection.getDatabaseType())) {
                  if (!subItem) {
                    return setting;
                  }
                  if (subItem && setting.withSchema()) {
                    return setting;
                  }
                }
              }
            }
          }
 else {
            return setting;
          }
        }
      }
    }
  }
  return null;
}
Program: 128061
Project: 128061
Buggy source:
protected Item copyFromResource(Resource createResource,String newItemLabel) throws PersistenceException, BusinessException {
  if (newItemLabel != null) {
    Item newItem=(Item)EcoreUtil.getObjectByType(createResource.getContents(),PropertiesPackage.eINSTANCE.getItem());
    Property property=newItem.getProperty();
    property.setId(getNextId());
    property.setAuthor(getRepositoryContext().getUser());
    property.setLabel(newItemLabel);
    property.setDisplayName(newItemLabel);
    if (!isNameAvailable(getRepositoryContext().getProject(),property.getItem(),null)) {
      throw new BusinessException(Messages.getString("String_Node_Str"));
    }
    EcoreUtil.resolveAll(createResource);
    return newItem;
  }
 else {
    boolean changeLabelWithCopyPrefix=true;
    return copyFromResource(createResource,changeLabelWithCopyPrefix);
  }
}

Fixed version (ground truth):
protected Item copyFromResource(Resource createResource,String newItemLabel) throws PersistenceException, BusinessException {
  if (newItemLabel != null) {
    Item newItem=(Item)EcoreUtil.getObjectByType(createResource.getContents(),PropertiesPackage.eINSTANCE.getItem());
    Property property=newItem.getProperty();
    property.setId(getNextId());
    property.setAuthor(getRepositoryContext().getUser());
    property.setLabel(newItemLabel);
    property.setDisplayName(newItemLabel);
    if (!isPocess(newItem) && !isNameAvailable(getRepositoryContext().getProject(),property.getItem(),null)) {
      throw new BusinessException(Messages.getString("String_Node_Str"));
    }
    EcoreUtil.resolveAll(createResource);
    return newItem;
  }
 else {
    boolean changeLabelWithCopyPrefix=true;
    return copyFromResource(createResource,changeLabelWithCopyPrefix);
  }
}
Program: 128062
Project: 128062
Buggy source:
public boolean process(){
  boolean result=false;
  try {
    TokenCollectorFactory.getFactory().priorCollect();
    if (isActiveAndValid(true)) {
      send();
      final IPreferenceStore preferenceStore=CoreRuntimePlugin.getInstance().getPreferenceStore();
      preferenceStore.setValue(ITalendCorePrefConstants.DATA_COLLECTOR_LAST_TIME,DATE_FORMAT.format(new Date()));
      result=true;
    }
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
  return result;
}

Fixed version (ground truth):
public boolean process(){
  boolean result=false;
  try {
    if (isActiveAndValid(true)) {
      TokenCollectorFactory.getFactory().priorCollect();
      send();
      final IPreferenceStore preferenceStore=CoreRuntimePlugin.getInstance().getPreferenceStore();
      preferenceStore.setValue(ITalendCorePrefConstants.DATA_COLLECTOR_LAST_TIME,DATE_FORMAT.format(new Date()));
      result=true;
    }
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
  return result;
}
Program: 128064
Project: 128064
Buggy source:
public boolean process(){
  boolean result=false;
  if (isActiveAndValid(true)) {
    send();
    final IPreferenceStore preferenceStore=CoreRuntimePlugin.getInstance().getPreferenceStore();
    preferenceStore.setValue(ITalendCorePrefConstants.DATA_COLLECTOR_LAST_TIME,DATE_FORMAT.format(new Date()));
    result=true;
  }
  return result;
}

Fixed version (ground truth):
public boolean process(){
  boolean result=false;
  try {
    TokenCollectorFactory.getFactory().priorCollect();
    if (isActiveAndValid(true)) {
      send();
      final IPreferenceStore preferenceStore=CoreRuntimePlugin.getInstance().getPreferenceStore();
      preferenceStore.setValue(ITalendCorePrefConstants.DATA_COLLECTOR_LAST_TIME,DATE_FORMAT.format(new Date()));
      result=true;
    }
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
  return result;
}
Program: 128066
Project: 128066
Buggy source:
public boolean process(){
  boolean result=false;
  if (isActiveAndValid(true)) {
    send();
    final IPreferenceStore preferenceStore=CoreRuntimePlugin.getInstance().getPreferenceStore();
    preferenceStore.setValue(ITalendCorePrefConstants.DATA_COLLECTOR_LAST_TIME,DATE_FORMAT.format(new Date()));
    result=true;
  }
  return result;
}

Fixed version (ground truth):
public boolean process(){
  boolean result=false;
  try {
    TokenCollectorFactory.getFactory().priorCollect();
    if (isActiveAndValid(true)) {
      send();
      final IPreferenceStore preferenceStore=CoreRuntimePlugin.getInstance().getPreferenceStore();
      preferenceStore.setValue(ITalendCorePrefConstants.DATA_COLLECTOR_LAST_TIME,DATE_FORMAT.format(new Date()));
      result=true;
    }
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
  return result;
}
Program: 128067
Project: 128067
Buggy source:
public boolean process(){
  boolean result=false;
  try {
    TokenCollectorFactory.getFactory().priorCollect();
    if (isActiveAndValid(true)) {
      send();
      final IPreferenceStore preferenceStore=CoreRuntimePlugin.getInstance().getPreferenceStore();
      preferenceStore.setValue(ITalendCorePrefConstants.DATA_COLLECTOR_LAST_TIME,DATE_FORMAT.format(new Date()));
      result=true;
    }
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
  return result;
}

Fixed version (ground truth):
public boolean process(){
  boolean result=false;
  try {
    if (isActiveAndValid(true)) {
      TokenCollectorFactory.getFactory().priorCollect();
      send();
      final IPreferenceStore preferenceStore=CoreRuntimePlugin.getInstance().getPreferenceStore();
      preferenceStore.setValue(ITalendCorePrefConstants.DATA_COLLECTOR_LAST_TIME,DATE_FORMAT.format(new Date()));
      result=true;
    }
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
  return result;
}
Program: 128068
Project: 128068
Buggy source:
public static String checkStringQuotationMarks(String str){
  if (str == null) {
    return "String_Node_Str";
  }
  return str.replace("String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
public static String checkStringQuotationMarks(String str){
  if (str == null) {
    return "String_Node_Str";
  }
 else   if (!str.contains("String_Node_Str")) {
    return str;
  }
  return str.replace("String_Node_Str","String_Node_Str");
}