nus-yam/ex-repair huggingface dataset:
Program: 119089
Project: 119089
Buggy source:
@Override public void build(String destinationPath) throws Exception {
  talendProcessJavaProject.buildModules(TalendMavenConstants.GOAL_PACKAGE,null,getProgramArgs());
  IFile jobTargetFile=getJobTargetFile();
  if (jobTargetFile.exists()) {
    File jobFileSource=new File(jobTargetFile.getLocation().toFile().getAbsolutePath());
    File jobFileTarget=new File(destinationPath);
    FilesUtils.copyFile(jobFileSource,jobFileTarget);
  }
}

Fixed version (ground truth):
@Override public void build(String destinationPath) throws Exception {
  talendProcessJavaProject.buildModules(TalendMavenConstants.GOAL_CLEAN + "String_Node_Str" + TalendMavenConstants.GOAL_PACKAGE,null,getProgramArgs());
  IFile jobTargetFile=getJobTargetFile();
  if (jobTargetFile.exists()) {
    File jobFileSource=new File(jobTargetFile.getLocation().toFile().getAbsolutePath());
    File jobFileTarget=new File(destinationPath);
    FilesUtils.copyFile(jobFileSource,jobFileTarget);
  }
}
Program: 119090
Project: 119090
Buggy source:
public ProjectPreferenceManager getProjectPreferenceManager(){
  return projectPreferenceManager;
}

Fixed version (ground truth):
public ProjectPreferenceManager getProjectPreferenceManager(){
  if (projectPreferenceManager == null) {
    projectPreferenceManager=new ProjectPreferenceManager(PLUGIN_ID);
  }
  return projectPreferenceManager;
}
Program: 119091
Project: 119091
Buggy source:
public void start(BundleContext context) throws Exception {
  super.start(context);
  plugin=this;
  projectPreferenceManager=new ProjectPreferenceManager(PLUGIN_ID);
}

Fixed version (ground truth):
public void start(BundleContext context) throws Exception {
  super.start(context);
  plugin=this;
}
Program: 119092
Project: 119092
Buggy source:
public ProjectPreferenceManager getProjectPreferenceManager(){
  return projectPreferenceManager;
}

Fixed version (ground truth):
public ProjectPreferenceManager getProjectPreferenceManager(){
  if (projectPreferenceManager == null) {
    projectPreferenceManager=new ProjectPreferenceManager(PLUGIN_ID);
  }
  return projectPreferenceManager;
}
Program: 119093
Project: 119093
Buggy source:
public void start(BundleContext context) throws Exception {
  super.start(context);
  IExtensionPointLimiter extensionPointLimiter=new ExtensionPointLimiterImpl("String_Node_Str","String_Node_Str");
  runProcessContextManager=ExtensionImplementationProvider.getSingleInstance(extensionPointLimiter,null);
  if (runProcessContextManager == null) {
    runProcessContextManager=new RunProcessContextManager();
  }
  projectPreferenceManager=new ProjectPreferenceManager(PLUGIN_ID);
}

Fixed version (ground truth):
public void start(BundleContext context) throws Exception {
  super.start(context);
  IExtensionPointLimiter extensionPointLimiter=new ExtensionPointLimiterImpl("String_Node_Str","String_Node_Str");
  runProcessContextManager=ExtensionImplementationProvider.getSingleInstance(extensionPointLimiter,null);
  if (runProcessContextManager == null) {
    runProcessContextManager=new RunProcessContextManager();
  }
}
Program: 119094
Project: 119094
Buggy source:
private void addWsdlNeedLib(RoutineItem routineItem){
  List<IMPORTType> wsdlNeedImport=new ArrayList<IMPORTType>();
  IMPORTType type1=ComponentFactory.eINSTANCE.createIMPORTType();
  type1.setMODULE("String_Node_Str");
  type1.setREQUIRED(true);
  type1.setNAME(routineItem.getProperty().getLabel());
  wsdlNeedImport.add(type1);
  IMPORTType type2=ComponentFactory.eINSTANCE.createIMPORTType();
  type2.setMODULE("String_Node_Str");
  type2.setREQUIRED(true);
  type2.setNAME(routineItem.getProperty().getLabel());
  wsdlNeedImport.add(type2);
  routineItem.getImports().addAll(wsdlNeedImport);
  try {
    CorePlugin.getDefault().getProxyRepositoryFactory().save(routineItem);
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
  CorePlugin.getDefault().getLibrariesService().resetModulesNeeded();
  CorePlugin.getDefault().getRunProcessService().updateLibraries(new HashSet<String>(),null);
}

Fixed version (ground truth):
private void addWsdlNeedLib(RoutineItem routineItem){
  List<IMPORTType> wsdlNeedImport=new ArrayList<IMPORTType>();
  IMPORTType type1=ComponentFactory.eINSTANCE.createIMPORTType();
  type1.setMODULE("String_Node_Str");
  type1.setREQUIRED(true);
  type1.setNAME(routineItem.getProperty().getLabel());
  wsdlNeedImport.add(type1);
  IMPORTType type2=ComponentFactory.eINSTANCE.createIMPORTType();
  type2.setMODULE("String_Node_Str");
  type2.setREQUIRED(true);
  type2.setNAME(routineItem.getProperty().getLabel());
  wsdlNeedImport.add(type2);
  routineItem.getImports().addAll(wsdlNeedImport);
  try {
    CorePlugin.getDefault().getProxyRepositoryFactory().save(routineItem);
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
  CorePlugin.getDefault().getLibrariesService().resetModulesNeeded();
  CorePlugin.getDefault().getRunProcessService().updateLibraries(new HashSet<ModuleNeeded>(),null);
}
Program: 119095
Project: 119095
Buggy source:
@Override public void updateLibraries(Set<String> jobModuleList,IProcess process){
  JavaProcessorUtilities.computeLibrariesPath(new HashSet<String>(jobModuleList),process);
}

Fixed version (ground truth):
@Override public void updateLibraries(Set<ModuleNeeded> jobModuleList,IProcess process){
  JavaProcessorUtilities.computeLibrariesPath(new HashSet<ModuleNeeded>(jobModuleList),process);
}
Program: 119096
Project: 119096
Buggy source:
@Override public void updateLibraries(Set<String> jobModuleList,IProcess process){
  delegateService.updateLibraries(jobModuleList,process);
}

Fixed version (ground truth):
@Override public void updateLibraries(Set<ModuleNeeded> jobModuleList,IProcess process){
  delegateService.updateLibraries(jobModuleList,process);
}
Program: 119097
Project: 119097
Buggy source:
/** 
 * Returns all libs required by classpath, refer to this method   {@link #extractCPCommandSegments()}. Added by Marvin Wang on Mar 20, 2013.
 * @return
 */
protected Set<String> extractAllLibs(){
  Set<String> libsRequiredByJob=new HashSet<String>();
  Set<String> neededLibraries=JavaProcessorUtilities.getNeededLibrariesForProcess(process);
  if (!ProcessorUtilities.isExportConfig()) {
    JavaProcessorUtilities.addLog4jToJarList(neededLibraries);
  }
  JavaProcessorUtilities.checkJavaProjectLib(neededLibraries);
  libsRequiredByJob.addAll(neededLibraries);
  libsRequiredByJob.add("String_Node_Str");
  libsRequiredByJob.add("String_Node_Str");
  return libsRequiredByJob;
}

Fixed version (ground truth):
/** 
 * Returns all libs required by classpath, refer to this method   {@link #extractCPCommandSegments()}. Added by Marvin Wang on Mar 20, 2013.
 * @return
 */
protected Set<String> extractAllLibs(){
  Set<String> libsRequiredByJob=new HashSet<String>();
  Set<ModuleNeeded> neededModules=JavaProcessorUtilities.getNeededModulesForProcess(process);
  if (!ProcessorUtilities.isExportConfig()) {
    JavaProcessorUtilities.addLog4jToModuleList(neededModules);
  }
  JavaProcessorUtilities.checkJavaProjectLib(neededModules);
  for (  ModuleNeeded neededModule : neededModules) {
    libsRequiredByJob.add(neededModule.getModuleName());
  }
  libsRequiredByJob.add("String_Node_Str");
  libsRequiredByJob.add("String_Node_Str");
  return libsRequiredByJob;
}
Program: 119098
Project: 119098
Buggy source:
protected String getNeededModulesJarStr(){
  final boolean exportingJob=ProcessorUtilities.isExportConfig();
  final String classPathSeparator=extractClassPathSeparator();
  final String libPrefixPath=getLibPrefixPath(true);
  final File libDir=JavaProcessorUtilities.getJavaProjectLibFolder();
  Set<String> neededLibraries=getNeededLibraries();
  JavaProcessorUtilities.checkJavaProjectLib(neededLibraries);
  File[] jarFiles=libDir.listFiles(FilesUtils.getAcceptJARFilesFilter());
  StringBuffer libPath=new StringBuffer();
  if (jarFiles != null && jarFiles.length > 0) {
    for (    File jarFile : jarFiles) {
      if (jarFile.isFile() && neededLibraries.contains(jarFile.getName())) {
        libPath.append(libPrefixPath);
        String singleLibPath=new Path(jarFile.getAbsolutePath()).toPortableString();
        if (exportingJob) {
          singleLibPath=singleLibPath.replace(new Path(libDir.getAbsolutePath()).toPortableString(),getBaseLibPath());
        }
        libPath.append(singleLibPath).append(classPathSeparator);
      }
    }
  }
  final int lastSep=libPath.length() - 1;
  if (libPath.length() != 0 && classPathSeparator.equals(String.valueOf(libPath.charAt(lastSep)))) {
    libPath.deleteCharAt(lastSep);
  }
  return libPath.toString();
}

Fixed version (ground truth):
protected String getNeededModulesJarStr(){
  final boolean exportingJob=ProcessorUtilities.isExportConfig();
  final String classPathSeparator=extractClassPathSeparator();
  final String libPrefixPath=getLibPrefixPath(true);
  final File libDir=JavaProcessorUtilities.getJavaProjectLibFolder();
  Set<ModuleNeeded> neededModules=getNeededModules();
  JavaProcessorUtilities.checkJavaProjectLib(neededModules);
  Set<String> neededLibraries=new HashSet<String>();
  for (  ModuleNeeded neededModule : neededModules) {
    neededLibraries.add(neededModule.getModuleName());
  }
  File[] jarFiles=libDir.listFiles(FilesUtils.getAcceptJARFilesFilter());
  StringBuffer libPath=new StringBuffer();
  if (jarFiles != null && jarFiles.length > 0) {
    for (    File jarFile : jarFiles) {
      if (jarFile.isFile() && neededLibraries.contains(jarFile.getName())) {
        libPath.append(libPrefixPath);
        String singleLibPath=new Path(jarFile.getAbsolutePath()).toPortableString();
        if (exportingJob) {
          singleLibPath=singleLibPath.replace(new Path(libDir.getAbsolutePath()).toPortableString(),getBaseLibPath());
        }
        libPath.append(singleLibPath).append(classPathSeparator);
      }
    }
  }
  final int lastSep=libPath.length() - 1;
  if (libPath.length() != 0 && classPathSeparator.equals(String.valueOf(libPath.charAt(lastSep)))) {
    libPath.deleteCharAt(lastSep);
  }
  return libPath.toString();
}
Program: 119099
Project: 119099
Buggy source:
/** 
 * DOC ycbai Comment method "checkJavaProjectLib".
 * @param jarsNeeded
 */
public static void checkJavaProjectLib(Collection<String> jarsNeeded){
  File libDir=getJavaProjectLibFolder();
  if ((libDir != null) && (libDir.isDirectory())) {
    Set<String> jarsNeededOnlyIncludeName=ModuleNameExtractor.extractFileName(jarsNeeded);
    Set<String> jarsNeedRetrieve=new HashSet<String>(jarsNeededOnlyIncludeName);
    for (    File externalLib : libDir.listFiles(FilesUtils.getAcceptJARFilesFilter())) {
      jarsNeedRetrieve.remove(externalLib.getName());
    }
    if (!jarsNeedRetrieve.isEmpty()) {
      ILibraryManagerService repositoryBundleService=CorePlugin.getDefault().getRepositoryBundleService();
      repositoryBundleService.retrieve(jarsNeedRetrieve,libDir.getAbsolutePath(),false);
    }
  }
}

Fixed version (ground truth):
/** 
 * DOC ycbai Comment method "checkJavaProjectLib".
 * @param jarsNeeded
 */
public static void checkJavaProjectLib(Collection<ModuleNeeded> jarsNeeded){
  File libDir=getJavaProjectLibFolder();
  if ((libDir != null) && (libDir.isDirectory())) {
    Set<String> jarsNeedRetrieve=new HashSet<String>();
    for (    ModuleNeeded moduleNeeded : jarsNeeded) {
      jarsNeedRetrieve.add(moduleNeeded.getModuleName());
    }
    for (    File externalLib : libDir.listFiles(FilesUtils.getAcceptJARFilesFilter())) {
      jarsNeedRetrieve.remove(externalLib.getName());
    }
    if (!jarsNeedRetrieve.isEmpty()) {
      ILibraryManagerService repositoryBundleService=CorePlugin.getDefault().getRepositoryBundleService();
      repositoryBundleService.retrieve(jarsNeedRetrieve,libDir.getAbsolutePath(),false);
    }
  }
}
Program: 119100
Project: 119100
Buggy source:
public static void computeLibrariesPath(Set<String> jobModuleList,IProcess process){
  RepositoryContext repositoryContext=(RepositoryContext)CorePlugin.getContext().getProperty(Context.REPOSITORY_CONTEXT_KEY);
  Project project=repositoryContext.getProject();
  if (projectSetup == null || !projectSetup.equals(project.getTechnicalLabel())) {
    projectSetup=project.getTechnicalLabel();
  }
  try {
    sortClasspath(jobModuleList,process);
  }
 catch (  BusinessException be1) {
    ExceptionHandler.process(be1);
  }
catch (  CoreException e) {
    ExceptionHandler.process(e);
  }
  checkAndUpdateLog4jFile();
}

Fixed version (ground truth):
public static void computeLibrariesPath(Set<ModuleNeeded> jobModuleList,IProcess process){
  RepositoryContext repositoryContext=(RepositoryContext)CorePlugin.getContext().getProperty(Context.REPOSITORY_CONTEXT_KEY);
  Project project=repositoryContext.getProject();
  if (projectSetup == null || !projectSetup.equals(project.getTechnicalLabel())) {
    projectSetup=project.getTechnicalLabel();
  }
  try {
    sortClasspath(jobModuleList,process);
  }
 catch (  BusinessException be1) {
    ExceptionHandler.process(be1);
  }
catch (  CoreException e) {
    ExceptionHandler.process(e);
  }
  checkAndUpdateLog4jFile();
}
Program: 119104
Project: 119104
Buggy source:
/** 
 * update the project pom, and make sure the standard or fake(Preview/Data view) job can be compiled still.
 */
protected void updateProjectPom(IProgressMonitor monitor){
  try {
    if (monitor == null) {
      monitor=new NullProgressMonitor();
    }
    JavaProcessorUtilities.checkJavaProjectLib(getNeededLibraries());
    ProjectPomManager pomManager=new ProjectPomManager(getTalendJavaProject().getProject()){
      @Override protected boolean isStandardJob(){
        return MavenJavaProcessor.this.isStandardJob();
      }
      @Override protected IFile getBasePomFile(){
        return MavenJavaProcessor.this.getPomFile();
      }
    }
;
    pomManager.setUpdateModules(isStandardJob());
    pomManager.update(monitor,this);
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
}

Fixed version (ground truth):
/** 
 * update the project pom, and make sure the standard or fake(Preview/Data view) job can be compiled still.
 */
protected void updateProjectPom(IProgressMonitor monitor){
  try {
    if (monitor == null) {
      monitor=new NullProgressMonitor();
    }
    JavaProcessorUtilities.checkJavaProjectLib(getNeededModules());
    ProjectPomManager pomManager=new ProjectPomManager(getTalendJavaProject().getProject()){
      @Override protected boolean isStandardJob(){
        return MavenJavaProcessor.this.isStandardJob();
      }
      @Override protected IFile getBasePomFile(){
        return MavenJavaProcessor.this.getPomFile();
      }
    }
;
    pomManager.setUpdateModules(isStandardJob());
    pomManager.update(monitor,this);
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
}
Program: 119105
Project: 119105
Buggy source:
@Override protected void doRun(){
  if (repositoryNode == null) {
    repositoryNode=(RepositoryNode)((IStructuredSelection)getSelection()).getFirstElement();
  }
  RoutineItem routineItem=(RoutineItem)repositoryNode.getObject().getProperty().getItem();
  try {
    openRoutineEditor(routineItem,false);
    refresh(repositoryNode);
    CorePlugin.getDefault().getLibrariesService().resetModulesNeeded();
    CorePlugin.getDefault().getRunProcessService().updateLibraries(new HashSet<String>(),null);
  }
 catch (  PartInitException e) {
    MessageBoxExceptionHandler.process(e);
  }
catch (  SystemException e) {
    MessageBoxExceptionHandler.process(e);
  }
}

Fixed version (ground truth):
@Override protected void doRun(){
  if (repositoryNode == null) {
    repositoryNode=(RepositoryNode)((IStructuredSelection)getSelection()).getFirstElement();
  }
  RoutineItem routineItem=(RoutineItem)repositoryNode.getObject().getProperty().getItem();
  try {
    openRoutineEditor(routineItem,false);
    refresh(repositoryNode);
    CorePlugin.getDefault().getLibrariesService().resetModulesNeeded();
    CorePlugin.getDefault().getRunProcessService().updateLibraries(new HashSet<ModuleNeeded>(),null);
  }
 catch (  PartInitException e) {
    MessageBoxExceptionHandler.process(e);
  }
catch (  SystemException e) {
    MessageBoxExceptionHandler.process(e);
  }
}
Program: 119106
Project: 119106
Buggy source:
@Override public boolean finish(){
  BusyIndicator.showWhile(Display.getDefault(),new Runnable(){
    @Override public void run(){
      for (      File file : newJarFiles.values()) {
        try {
          CorePlugin.getDefault().getLibrariesService().deployLibrary(file.toURL());
        }
 catch (        Exception e) {
          ExceptionHandler.process(e);
        }
      }
      try {
        CorePlugin.getDefault().getProxyRepositoryFactory().save(getSelectedRoutine());
      }
 catch (      Exception e) {
        ExceptionHandler.process(e);
      }
      CorePlugin.getDefault().getLibrariesService().resetModulesNeeded();
      CorePlugin.getDefault().getRunProcessService().updateLibraries(new HashSet<String>(),null);
    }
  }
);
  return true;
}

Fixed version (ground truth):
@Override public boolean finish(){
  BusyIndicator.showWhile(Display.getDefault(),new Runnable(){
    @Override public void run(){
      for (      File file : newJarFiles.values()) {
        try {
          CorePlugin.getDefault().getLibrariesService().deployLibrary(file.toURL());
        }
 catch (        Exception e) {
          ExceptionHandler.process(e);
        }
      }
      try {
        CorePlugin.getDefault().getProxyRepositoryFactory().save(getSelectedRoutine());
      }
 catch (      Exception e) {
        ExceptionHandler.process(e);
      }
      CorePlugin.getDefault().getLibrariesService().resetModulesNeeded();
      CorePlugin.getDefault().getRunProcessService().updateLibraries(new HashSet<ModuleNeeded>(),null);
    }
  }
);
  return true;
}
Program: 119107
Project: 119107
Buggy source:
protected boolean isIncludeLibs(){
  return !isBinaries() && includeLibsButton != null && includeLibsButton.getSelection();
}

Fixed version (ground truth):
protected boolean isIncludeLibs(){
  if (isBinaries()) {
    return true;
  }
  return includeLibsButton != null && includeLibsButton.getSelection();
}
Program: 119108
Project: 119108
Buggy source:
protected StringBuffer getProfileArgs(){
  StringBuffer profileBuffer=new StringBuffer();
  profileBuffer.append(TalendMavenConstants.PREFIX_PROFILE);
  profileBuffer.append(SPACE);
  addArg(profileBuffer,true,isOptionChoosed(ExportChoice.binaries),TalendMavenConstants.PROFILE_INCLUDE_BINARIES);
  addArg(profileBuffer,false,isOptionChoosed(ExportChoice.needJobItem),TalendMavenConstants.PROFILE_INCLUDE_ITEMS);
  addArg(profileBuffer,false,isOptionChoosed(ExportChoice.needSourceCode),TalendMavenConstants.PROFILE_INCLUDE_JAVA_SOURCES);
  addArg(profileBuffer,false,isOptionChoosed(ExportChoice.includeTestSource),TalendMavenConstants.PROFILE_INCLUDE_TEST_SOURCES);
  addArg(profileBuffer,false,isOptionChoosed(ExportChoice.includeLibs),TalendMavenConstants.PROFILE_INCLUDE_LIBS);
  return profileBuffer;
}

Fixed version (ground truth):
protected StringBuffer getProfileArgs(){
  StringBuffer profileBuffer=new StringBuffer();
  profileBuffer.append(TalendMavenConstants.PREFIX_PROFILE);
  profileBuffer.append(SPACE);
  addArg(profileBuffer,true,isOptionChoosed(ExportChoice.binaries),TalendMavenConstants.PROFILE_INCLUDE_BINARIES);
  addArg(profileBuffer,false,isOptionChoosed(ExportChoice.needJobItem),TalendMavenConstants.PROFILE_INCLUDE_ITEMS);
  addArg(profileBuffer,false,isOptionChoosed(ExportChoice.needSourceCode),TalendMavenConstants.PROFILE_INCLUDE_JAVA_SOURCES);
  addArg(profileBuffer,false,isOptionChoosed(ExportChoice.includeTestSource),TalendMavenConstants.PROFILE_INCLUDE_TEST_SOURCES);
  addArg(profileBuffer,false,isOptionChoosed(ExportChoice.includeLibs),TalendMavenConstants.PROFILE_INCLUDE_LIBS);
  addArg(profileBuffer,false,isOptionChoosed(ExportChoice.needContext),TalendMavenConstants.PROFILE_INCLUDE_CONTEXTS);
  return profileBuffer;
}
Program: 119109
Project: 119109
Buggy source:
/** 
 * Create the build job handler according the job export type. Now only implement the handler of standalone job. <p> DOC ycbai Comment method "createBuildJobHandler".
 * @param exportChoiceMap
 * @param contextName
 * @param jobExportType
 * @return
 */
public static IBuildJobHandler createBuildJobHandler(ProcessItem processItem,String version,String contextName,Map<ExportChoice,Object> exportChoiceMap,JobExportType jobExportType){
  IBuildJobHandler handler=null;
switch (jobExportType) {
case POJO:
    handler=new BuildJobHandler(processItem,version,contextName,exportChoiceMap);
  break;
case WSWAR:
case WSZIP:
case JBOSSESB:
case PETALSESB:
case OSGI:
break;
default :
handler=new BuildJobHandler(processItem,version,contextName,exportChoiceMap);
}
return handler;
}

Fixed version (ground truth):
/** 
 * Create the build job handler according the job export type. Now only implement the handler of standalone job. <p> DOC ycbai Comment method "createBuildJobHandler".
 * @param exportChoiceMap
 * @param contextName
 * @param jobExportType
 * @return
 */
public static IBuildJobHandler createBuildJobHandler(ProcessItem processItem,String contextName,String version,Map<ExportChoice,Object> exportChoiceMap,JobExportType jobExportType){
  IBuildJobHandler handler=null;
switch (jobExportType) {
case POJO:
    handler=new BuildJobHandler(processItem,version,contextName,exportChoiceMap);
  break;
case WSWAR:
case WSZIP:
case JBOSSESB:
case PETALSESB:
case OSGI:
break;
default :
handler=new BuildJobHandler(processItem,version,contextName,exportChoiceMap);
}
return handler;
}
Program: 119110
Project: 119110
Buggy source:
private void exportJobForPOJO(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
  File tmpJob=null;
  try {
    tmpJob=File.createTempFile("String_Node_Str","String_Node_Str",null);
    ProcessItem processItem=(ProcessItem)node.getObject().getProperty().getItem();
    BuildJobManager.getInstance().buildJob(processItem,processItem.getProperty().getVersion(),processItem.getProcess().getDefaultContext(),exportChoiceMap,exportType);
    monitor.beginTask("String_Node_Str",IProgressMonitor.UNKNOWN);
    FeaturesModel featuresModel=getFeatureModel(tmpJob);
    process(processItem,featuresModel,monitor);
  }
 catch (  Exception e) {
    throw new InvocationTargetException(e);
  }
 finally {
    if (tmpJob != null && tmpJob.exists()) {
      tmpJob.delete();
    }
  }
}

Fixed version (ground truth):
private void exportJobForPOJO(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
  File tmpJob=null;
  try {
    tmpJob=File.createTempFile("String_Node_Str","String_Node_Str",null);
    ProcessItem processItem=(ProcessItem)node.getObject().getProperty().getItem();
    BuildJobManager.getInstance().buildJob(tmpJob.getAbsolutePath(),processItem,processItem.getProperty().getVersion(),processItem.getProcess().getDefaultContext(),exportChoiceMap,exportType);
    monitor.beginTask("String_Node_Str",IProgressMonitor.UNKNOWN);
    FeaturesModel featuresModel=getFeatureModel(tmpJob);
    process(processItem,featuresModel,monitor);
  }
 catch (  Exception e) {
    throw new InvocationTargetException(e);
  }
 finally {
    if (tmpJob != null && tmpJob.exists()) {
      tmpJob.delete();
    }
  }
}
Program: 119111
Project: 119111
Buggy source:
private void mavenBuildCodeProjectPom(String goals,String module){
  IFile childModulePomFile;
  if (TalendMavenConstants.CURRENT_PATH.equals(module)) {
    childModulePomFile=this.getProject().getFile(TalendMavenConstants.POM_FILE_NAME);
  }
 else {
    IFolder moduleFolder=this.getProject().getFolder(module);
    childModulePomFile=moduleFolder.getFile(TalendMavenConstants.POM_FILE_NAME);
  }
  if (childModulePomFile.getLocation().toFile().exists()) {
    MavenPomCommandLauncher mavenLauncher=null;
    if (goals == null || goals.trim().length() == 0 || goals.equals(TalendMavenConstants.GOAL_COMPILE)) {
    }
 else {
      mavenLauncher=new MavenPomCommandLauncher(childModulePomFile,goals);
      mavenLauncher.execute();
    }
    buildWholeCodeProject();
    buildWholeCodeProject();
  }
 else {
    throw new RuntimeException("String_Node_Str" + module);
  }
}

Fixed version (ground truth):
private void mavenBuildCodeProjectPom(String goals,String module,String programArgs){
  IFile childModulePomFile;
  if (TalendMavenConstants.CURRENT_PATH.equals(module)) {
    childModulePomFile=this.getProject().getFile(TalendMavenConstants.POM_FILE_NAME);
  }
 else {
    IFolder moduleFolder=this.getProject().getFolder(module);
    childModulePomFile=moduleFolder.getFile(TalendMavenConstants.POM_FILE_NAME);
  }
  if (childModulePomFile.getLocation().toFile().exists()) {
    MavenPomCommandLauncher mavenLauncher=null;
    if (goals == null || goals.trim().length() == 0 || goals.equals(TalendMavenConstants.GOAL_COMPILE)) {
    }
 else {
      mavenLauncher=new MavenPomCommandLauncher(childModulePomFile,goals);
      mavenLauncher.setProgramArguments(programArgs);
      mavenLauncher.execute();
    }
    buildWholeCodeProject();
    buildWholeCodeProject();
  }
 else {
    throw new RuntimeException("String_Node_Str" + module);
  }
}
Program: 119112
Project: 119112
Buggy source:
@Override public void buildModules(String goals,String[] childrenModules){
  if (childrenModules == null) {
    if (goals != null && goals.trim().length() > 0) {
      mavenBuildCodeProjectPom(goals,TalendMavenConstants.CURRENT_PATH);
    }
 else {
      buildWholeCodeProject();
    }
  }
 else   if (childrenModules.length > 0) {
    for (    String module : childrenModules) {
      IPath modulePath=new Path(module);
      if (modulePath.lastSegment().equals(TalendMavenConstants.POM_FILE_NAME)) {
        modulePath=modulePath.removeLastSegments(1);
      }
      String newModule=modulePath.toString();
      mavenBuildCodeProjectPom(goals,newModule);
    }
  }
 else {
  }
}

Fixed version (ground truth):
@Override public void buildModules(String goals,String[] childrenModules,String programArgs){
  if (childrenModules == null) {
    if (goals != null && goals.trim().length() > 0) {
      mavenBuildCodeProjectPom(goals,TalendMavenConstants.CURRENT_PATH,programArgs);
    }
 else {
      buildWholeCodeProject();
    }
  }
 else   if (childrenModules.length > 0) {
    for (    String module : childrenModules) {
      IPath modulePath=new Path(module);
      if (modulePath.lastSegment().equals(TalendMavenConstants.POM_FILE_NAME)) {
        modulePath=modulePath.removeLastSegments(1);
      }
      String newModule=modulePath.toString();
      mavenBuildCodeProjectPom(goals,newModule,programArgs);
    }
  }
 else {
  }
}
Program: 119113
Project: 119113
Buggy source:
@Override public void generateCode(boolean statistics,boolean trace,boolean javaProperties) throws ProcessorException {
  super.generateCode(statistics,trace,javaProperties);
  if (isStandardJob()) {
    generatePom();
  }
}

Fixed version (ground truth):
@Override public void generateCode(boolean statistics,boolean trace,boolean javaProperties) throws ProcessorException {
  super.generateCode(statistics,trace,javaProperties);
  if (isStandardJob()) {
    generatePom();
  }
  updateProjectPom(null);
}
Program: 119114
Project: 119114
Buggy source:
/** 
 * .Java/pom_TestJob.xml
 */
protected IFile getPomFile(){
  String pomFileName=PomUtil.getPomFileName(this.getProperty().getLabel());
  return this.getTalendJavaProject().getProject().getFile(pomFileName);
}

Fixed version (ground truth):
/** 
 * .Java/pom_TestJob.xml
 */
protected IFile getPomFile(){
  if (isStandardJob()) {
    String pomFileName=PomUtil.getPomFileName(this.getProperty().getLabel());
    return this.getTalendJavaProject().getProject().getFile(pomFileName);
  }
 else {
    return null;
  }
}
Program: 119115
Project: 119115
Buggy source:
/** 
 * .Java/src/main/assemblies/assembly_TestJob.xml
 */
protected IFile getAssemblyFile(){
  String assemblyFileName=PomUtil.getAssemblyFileName(this.getProperty().getLabel());
  return this.getTalendJavaProject().getAssembliesFolder().getFile(assemblyFileName);
}

Fixed version (ground truth):
/** 
 * .Java/src/main/assemblies/assembly_TestJob.xml
 */
protected IFile getAssemblyFile(){
  if (isStandardJob()) {
    String assemblyFileName=PomUtil.getAssemblyFileName(this.getProperty().getLabel());
    return this.getTalendJavaProject().getAssembliesFolder().getFile(assemblyFileName);
  }
 else {
    return null;
  }
}
Program: 119116
Project: 119116
Buggy source:
protected void updateProjectPom(IProgressMonitor progressMonitor) throws ProcessorException {
  JavaProcessorUtilities.checkJavaProjectLib(getNeededLibraries());
  ProjectPomManager pomManager=new ProjectPomManager(getTalendJavaProject().getProject());
  List<String> modulesList=new ArrayList<String>();
  for (  JobInfo childJob : getBuildChildrenJobs()) {
    modulesList.add(PomUtil.getPomFileName(childJob.getJobName()));
  }
  modulesList.add(PomUtil.getPomFileName(getProperty().getLabel()));
  pomManager.updateProjectPom(progressMonitor,modulesList,this.getPomFile());
  try {
    getCodeProject().refreshLocal(IResource.DEPTH_ONE,progressMonitor);
  }
 catch (  CoreException e) {
    ExceptionHandler.process(e);
  }
}

Fixed version (ground truth):
/** 
 * update the project pom, and make sure the standard or fake(Preview/Data view) job can be compiled still.
 */
protected void updateProjectPom(IProgressMonitor monitor){
  try {
    if (monitor == null) {
      monitor=new NullProgressMonitor();
    }
    JavaProcessorUtilities.checkJavaProjectLib(getNeededLibraries());
    ProjectPomManager pomManager=new ProjectPomManager(getTalendJavaProject().getProject()){
      @Override protected boolean isStandardJob(){
        return MavenJavaProcessor.this.isStandardJob();
      }
      @Override protected IFile getBasePomFile(){
        return MavenJavaProcessor.this.getPomFile();
      }
    }
;
    pomManager.setUpdateModules(isStandardJob());
    pomManager.update(monitor,this);
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
}
Program: 119117
Project: 119117
Buggy source:
@Override public void build(){
  final ITalendProcessJavaProject talendJavaProject=getTalendJavaProject();
  if (isStandardJob()) {
    try {
      updateProjectPom(null);
    }
 catch (    ProcessorException e) {
      ExceptionHandler.process(e);
    }
  }
  talendJavaProject.buildModules(getGoals(),null);
}

Fixed version (ground truth):
@Override public void build(){
  final ITalendProcessJavaProject talendJavaProject=getTalendJavaProject();
  talendJavaProject.buildModules(getGoals(),null);
}
Program: 119118
Project: 119118
Buggy source:
/** 
 * DOC YeXiaowei Comment method "updateParallelFigure".
 * @param status
 */
private void updateWindowFigure(int status){
  if (windowFigure == null) {
    return;
  }
  boolean visible=false;
  IElementParameter windowDuration=nodeContainer.getNode().getElementParameter(EParameterName.WINDOW_DURATION.getName());
  IElementParameter defineSlideDuration=nodeContainer.getNode().getElementParameter(EParameterName.DEFINE_SLIDE_DURATION.getName());
  boolean defSlideDuration=false;
  if (defineSlideDuration != null) {
    defSlideDuration=(Boolean)defineSlideDuration.getValue();
  }
  if (windowDuration != null) {
    visible=true;
    String slideDuration="String_Node_Str";
    if (defSlideDuration) {
      slideDuration="String_Node_Str" + NodeContainerUtils.formatTime((String)nodeContainer.getNode().getElementParameter("String_Node_Str").getValue());
    }
    windowFigure.setText("String_Node_Str" + NodeContainerUtils.formatTime((String)windowDuration.getValue()) + slideDuration);
    windowFigure.setVisible(visible);
  }
}

Fixed version (ground truth):
/** 
 * DOC YeXiaowei Comment method "updateParallelFigure".
 * @param status
 */
private void updateWindowFigure(int status){
  if (windowFigure == null) {
    return;
  }
  if ((status & Process.WINDOW_STATUS) != 0) {
    boolean visible=false;
    IElementParameter windowDuration=nodeContainer.getNode().getElementParameter(EParameterName.WINDOW_DURATION.getName());
    IElementParameter defineSlideDuration=nodeContainer.getNode().getElementParameter(EParameterName.DEFINE_SLIDE_DURATION.getName());
    boolean defSlideDuration=false;
    if (defineSlideDuration != null) {
      defSlideDuration=(Boolean)defineSlideDuration.getValue();
    }
    if (windowDuration != null) {
      visible=true;
      String slideDuration="String_Node_Str";
      if (defSlideDuration) {
        slideDuration="String_Node_Str" + NodeContainerUtils.formatTime((String)nodeContainer.getNode().getElementParameter("String_Node_Str").getValue());
      }
      windowFigure.setText("String_Node_Str" + NodeContainerUtils.formatTime((String)windowDuration.getValue()) + slideDuration);
      windowFigure.setVisible(visible);
    }
  }
 else {
    windowFigure.setVisible(false);
  }
}
Program: 119120
Project: 119120
Buggy source:
@Override protected String getExportJarsStr(){
  final String libPrefixPath=getLibPrefixPath(true);
  final String classPathSeparator=extractClassPathSeparator();
  String jarName=JavaResourcesHelper.getJobJarName(process.getName(),process.getVersion());
  String exportJar=libPrefixPath + jarName + FileExtensions.JAR_FILE_SUFFIX;
  Set<JobInfo> infos=getBuildChildrenJobs();
  for (  JobInfo jobInfo : infos) {
    String childJarName=JavaResourcesHelper.getJobJarName(jobInfo.getJobName(),jobInfo.getJobVersion());
    exportJar+=classPathSeparator + libPrefixPath + childJarName+ FileExtensions.JAR_FILE_SUFFIX;
  }
  return exportJar;
}

Fixed version (ground truth):
@Override protected String getExportJarsStr(){
  if (isOldBuildJob()) {
    return super.getExportJarsStr();
  }
  final String libPrefixPath=getLibPrefixPath(true);
  final String classPathSeparator=extractClassPathSeparator();
  String jarName=JavaResourcesHelper.getJobJarName(process.getName(),process.getVersion());
  String exportJar=libPrefixPath + jarName + FileExtensions.JAR_FILE_SUFFIX;
  Set<JobInfo> infos=getBuildChildrenJobs();
  for (  JobInfo jobInfo : infos) {
    String childJarName=JavaResourcesHelper.getJobJarName(jobInfo.getJobName(),jobInfo.getJobVersion());
    exportJar+=classPathSeparator + libPrefixPath + childJarName+ FileExtensions.JAR_FILE_SUFFIX;
  }
  return exportJar;
}
Program: 119121
Project: 119121
Buggy source:
@Override public void initJobClasspath(){
  String routinesJarPath=getBaseLibPath() + JavaUtils.PATH_SEPARATOR + JavaUtils.ROUTINE_JAR_NAME+ FileExtensions.JAR_FILE_SUFFIX+ ProcessorUtilities.TEMP_JAVA_CLASSPATH_SEPARATOR;
  ProcessorUtilities.setExportConfig(JavaUtils.JAVA_APP_NAME,routinesJarPath,getBaseLibPath());
  setClasspaths();
  ProcessorUtilities.resetExportConfig();
}

Fixed version (ground truth):
public void initJobClasspath(){
  String oldInterpreter=ProcessorUtilities.getInterpreter();
  String oldCodeLocation=ProcessorUtilities.getCodeLocation();
  String oldLibraryPath=ProcessorUtilities.getLibraryPath();
  boolean oldExportConfig=ProcessorUtilities.isExportConfig();
  Date oldExportTimestamp=ProcessorUtilities.getExportTimestamp();
  try {
    String routinesJarPath=getBaseLibPath() + JavaUtils.PATH_SEPARATOR + JavaUtils.ROUTINE_JAR_NAME+ FileExtensions.JAR_FILE_SUFFIX+ ProcessorUtilities.TEMP_JAVA_CLASSPATH_SEPARATOR;
    ProcessorUtilities.setExportConfig(JavaUtils.JAVA_APP_NAME,routinesJarPath,getBaseLibPath());
    String contextName=JavaResourcesHelper.getJobContextName(this.context);
    this.windowsClasspath=getClasspath(Platform.OS_WIN32,contextName);
    this.unixClasspath=getClasspath(Platform.OS_LINUX,contextName);
  }
  finally {
    ProcessorUtilities.setExportConfig(oldInterpreter,oldCodeLocation,oldLibraryPath,oldExportConfig,oldExportTimestamp);
  }
}
Program: 119122
Project: 119122
Buggy source:
@Override protected String getBaseLibPath(){
  return JavaUtils.JAVA_LIB_DIRECTORY;
}

Fixed version (ground truth):
@Override protected String getBaseLibPath(){
  if (isOldBuildJob()) {
    return super.getBaseLibPath();
  }
  return JavaUtils.JAVA_LIB_DIRECTORY;
}
Program: 119123
Project: 119123
Buggy source:
protected String getCommandByTalendJob(String targetPlatform,IProcess process,String context,boolean needContext,int statisticPort,int tracePort,String... codeOptions){
  String[] cmd=new String[]{};
  try {
    cmd=ProcessorUtilities.getCommandLine(targetPlatform,true,process,context,needContext,statisticPort,tracePort,codeOptions);
  }
 catch (  ProcessorException e) {
    ExceptionHandler.process(e);
  }
  return ProcessorUtilities.generateCmdByTalendJob(cmd);
}

Fixed version (ground truth):
protected String getCommandByTalendJob(String targetPlatform,IProcess process,String context,boolean needContext,int statisticPort,int tracePort,String... codeOptions){
  String[] cmd=new String[]{};
  try {
    cmd=ProcessorUtilities.getCommandLine(true,targetPlatform,true,process,null,context,needContext,statisticPort,tracePort,codeOptions);
  }
 catch (  ProcessorException e) {
    ExceptionHandler.process(e);
  }
  return ProcessorUtilities.generateCmdByTalendJob(cmd);
}
Program: 119125
Project: 119125
Buggy source:
/** 
 * DOC dev Comment method "getCommandByTalendJob".
 * @param project
 * @param jobName
 * @param context
 * @return
 * @throws ProcessorException
 * @throws ProcessorException
 */
public String getCommandByTalendJob(String project,String jobName,String context) throws ProcessorException {
  project=project.replace("String_Node_Str","String_Node_Str");
  if (jobName.split("String_Node_Str").length > 2) {
    jobName=jobName.substring(jobName.lastIndexOf("String_Node_Str") + 1,jobName.length());
  }
 else {
    jobName=jobName.replace("String_Node_Str","String_Node_Str");
  }
  context=context.replace("String_Node_Str","String_Node_Str");
  String[] cmd=ProcessorUtilities.getCommandLine(true,mainJobInfoByName.get(jobName).getJobId(),context,IProcessor.NO_STATISTICS,IProcessor.NO_TRACES);
  StringBuffer sb=new StringBuffer();
  sb.append("String_Node_Str");
  for (  String s : cmd) {
    sb.append(' ').append(s);
  }
  return sb.toString();
}

Fixed version (ground truth):
/** 
 * DOC dev Comment method "getCommandByTalendJob".
 * @param project
 * @param jobName
 * @param context
 * @return
 * @throws ProcessorException
 * @throws ProcessorException
 */
public String getCommandByTalendJob(String project,String jobName,String context) throws ProcessorException {
  project=project.replace("String_Node_Str","String_Node_Str");
  if (jobName.split("String_Node_Str").length > 2) {
    jobName=jobName.substring(jobName.lastIndexOf("String_Node_Str") + 1,jobName.length());
  }
 else {
    jobName=jobName.replace("String_Node_Str","String_Node_Str");
  }
  context=context.replace("String_Node_Str","String_Node_Str");
  ProcessItem selectedProcessItem=ItemCacheManager.getProcessItem(mainJobInfoByName.get(jobName).getJobId());
  StringBuffer sb=new StringBuffer();
  if (selectedProcessItem != null) {
    IDesignerCoreService service=CorePlugin.getDefault().getDesignerCoreService();
    IProcess currentProcess=service.getProcessFromProcessItem(selectedProcessItem);
    String[] cmd=ProcessorUtilities.getCommandLine(true,null,true,currentProcess,selectedProcessItem.getProperty(),context,true,IProcessor.NO_STATISTICS,IProcessor.NO_TRACES);
    sb.append("String_Node_Str");
    for (    String s : cmd) {
      sb.append(' ').append(s);
    }
  }
  return sb.toString();
}
Program: 119127
Project: 119127
Buggy source:
@Override public void generateCode(boolean statistics,boolean trace,boolean javaProperties) throws ProcessorException {
  super.generateCode(statistics,trace,javaProperties);
  if (property != null && property.getItem() != null && this.getProcess() instanceof IProcess2) {
    generatePom();
  }
}

Fixed version (ground truth):
@Override public void generateCode(boolean statistics,boolean trace,boolean javaProperties) throws ProcessorException {
  super.generateCode(statistics,trace,javaProperties);
  if (isStandardJob()) {
    generatePom();
  }
}
Program: 119128
Project: 119128
Buggy source:
@Override public void build(){
  final ITalendProcessJavaProject talendJavaProject=getTalendJavaProject();
  try {
    updateProjectPom(null);
  }
 catch (  ProcessorException e) {
    ExceptionHandler.process(e);
  }
  talendJavaProject.buildModules(getGoals(),null);
}

Fixed version (ground truth):
@Override public void build(){
  final ITalendProcessJavaProject talendJavaProject=getTalendJavaProject();
  if (isStandardJob()) {
    try {
      updateProjectPom(null);
    }
 catch (    ProcessorException e) {
      ExceptionHandler.process(e);
    }
  }
  talendJavaProject.buildModules(getGoals(),null);
}
Program: 119132
Project: 119132
Buggy source:
@Override public String getText(Object element){
  return ((Function)element).getName();
}

Fixed version (ground truth):
@Override public String getText(Object element){
  return ((Function)element).getFunctionString();
}
Program: 119133
Project: 119133
Buggy source:
@Override public void selectionChanged(SelectionChangedEvent event){
  Function function=(Function)((IStructuredSelection)event.getSelection()).getFirstElement();
  if (function != null && function.getDescription() != null) {
    if (docDisplayer instanceof Text) {
      ((Text)docDisplayer).setText(function.getDescription());
    }
 else     if (docDisplayer instanceof Browser) {
      ((Browser)docDisplayer).setText(function.getDescription());
    }
  }
 else {
    if (docDisplayer instanceof Text) {
      ((Text)docDisplayer).setText("String_Node_Str");
    }
 else     if (docDisplayer instanceof Browser) {
      ((Browser)docDisplayer).setText("String_Node_Str");
    }
  }
}

Fixed version (ground truth):
@Override public void selectionChanged(SelectionChangedEvent event){
  Function function=(Function)((IStructuredSelection)event.getSelection()).getFirstElement();
  if (function != null && function.getDescription() != null) {
    if (docDisplayer instanceof Text) {
      ((Text)docDisplayer).setText(function.getDescription());
    }
 else     if (docDisplayer instanceof Browser) {
      ((Browser)docDisplayer).setText(convert2HTML(function.getDescription()));
    }
  }
 else {
    if (docDisplayer instanceof Text) {
      ((Text)docDisplayer).setText("String_Node_Str");
    }
 else     if (docDisplayer instanceof Browser) {
      ((Browser)docDisplayer).setText("String_Node_Str");
    }
  }
}
Program: 119136
Project: 119136
Buggy source:
/** 
 * Create the dialog
 * @param parentShell
 */
public ExpressionBuilderDialog(Shell parentShell,IExpressionDataBean dataBean,INode component){
  super(parentShell);
  this.nodeStyle=parentShell.toString();
  setShellStyle(this.getShellStyle() | SWT.RESIZE);
  this.dataBean=dataBean;
  this.component=component;
}

Fixed version (ground truth):
/** 
 * Create the dialog
 * @param parentShell
 */
public ExpressionBuilderDialog(Shell parentShell,IExpressionDataBean dataBean,INode component){
  super(parentShell);
  this.nodeStyle=parentShell.toString();
  setShellStyle(this.getShellStyle() | SWT.RESIZE | SWT.MAX);
  this.dataBean=dataBean;
  this.component=component;
}
Program: 119139
Project: 119139
Buggy source:
private void mavenBuildCodeProjectPom(String goals,String module){
  IFile childModulePomFile;
  if (TalendMavenContants.CURRENT_PATH.equals(module)) {
    childModulePomFile=this.getProject().getFile(MavenConstants.POM_FILE_NAME);
  }
 else {
    IFolder moduleFolder=this.getProject().getFolder(module);
    childModulePomFile=moduleFolder.getFile(MavenConstants.POM_FILE_NAME);
  }
  if (childModulePomFile.getLocation().toFile().exists()) {
    if (Problems.buildWholeProject) {
      buildWholeCodeProject();
      buildWholeCodeProject();
    }
  }
 else {
    throw new RuntimeException("String_Node_Str" + module);
  }
}

Fixed version (ground truth):
private void mavenBuildCodeProjectPom(String goals,String module){
  IFile childModulePomFile;
  if (TalendMavenContants.CURRENT_PATH.equals(module)) {
    childModulePomFile=this.getProject().getFile(MavenConstants.POM_FILE_NAME);
  }
 else {
    IFolder moduleFolder=this.getProject().getFolder(module);
    childModulePomFile=moduleFolder.getFile(MavenConstants.POM_FILE_NAME);
  }
  if (childModulePomFile.getLocation().toFile().exists()) {
    TalendMavenLauncher mavenLauncher=null;
    if (goals == null || goals.trim().length() == 0 || goals.equals(MavenConstants.GOAL_COMPILE)) {
      buildWholeCodeProject();
      buildWholeCodeProject();
    }
 else {
      mavenLauncher=new TalendMavenLauncher(childModulePomFile,goals);
      mavenLauncher.execute();
    }
  }
 else {
    throw new RuntimeException("String_Node_Str" + module);
  }
}
Program: 119141
Project: 119141
Buggy source:
private void refreshJobAndSave(final IProxyRepositoryFactory repFactory){
  try {
    repFactory.save(item);
  }
 catch (  Exception e) {
  }
  setTitleImage(getTitleImage());
}

Fixed version (ground truth):
private void refreshJobAndSave(final IProxyRepositoryFactory repFactory) throws PersistenceException {
  repFactory.save(item);
  setTitleImage(getTitleImage());
}
Program: 119142
Project: 119142
Buggy source:
public boolean finish(){
  if (!ensureTargetIsValid()) {
    return false;
  }
  saveDirtyEditors();
  saveWidgetValues();
  final List<Boolean> results=new ArrayList<Boolean>(1);
  CoreRuntimePlugin.getInstance().getProxyRepositoryFactory().executeRepositoryWorkUnit(new RepositoryWorkUnit("String_Node_Str"){
    protected void run() throws LoginException, PersistenceException {
      try {
        ResourcesPlugin.getWorkspace().getRoot().refreshLocal(IResource.DEPTH_INFINITE,null);
      }
 catch (      CoreException e) {
        ExceptionHandler.process(e);
      }
      Display.getCurrent().syncExec(new Runnable(){
        public void run(){
          List resourcesToExport=getWhiteCheckedResources();
          boolean r=executeExportOperation(new ArchiveFileExportOperation(null,resourcesToExport,getDestinationValue()));
          results.add(r);
        }
      }
);
    }
  }
);
  return results.size() == 1 && results.get(0) == true;
}

Fixed version (ground truth):
@Override public boolean finish(){
  if (!ensureTargetIsValid()) {
    return false;
  }
  saveDirtyEditors();
  saveWidgetValues();
  final List<Boolean> results=new ArrayList<Boolean>(1);
  CoreRuntimePlugin.getInstance().getProxyRepositoryFactory().executeRepositoryWorkUnit(new RepositoryWorkUnit("String_Node_Str"){
    @Override protected void run() throws LoginException, PersistenceException {
      try {
        ResourcesPlugin.getWorkspace().getRoot().refreshLocal(IResource.DEPTH_INFINITE,null);
      }
 catch (      CoreException e) {
        ExceptionHandler.process(e);
      }
      Display.getCurrent().syncExec(new Runnable(){
        @Override public void run(){
          List resourcesToExport=getWhiteCheckedResources();
          boolean r=executeExportOperation(new ArchiveFileExportOperation(null,resourcesToExport,getDestinationValue()));
          results.add(r);
        }
      }
);
    }
  }
);
  return results.size() == 1 && results.get(0) == true;
}
Program: 119143
Project: 119143
Buggy source:
public void run(){
  List resourcesToExport=getWhiteCheckedResources();
  boolean r=executeExportOperation(new ArchiveFileExportOperation(null,resourcesToExport,getDestinationValue()));
  results.add(r);
}

Fixed version (ground truth):
@Override public void run(){
  List resourcesToExport=getWhiteCheckedResources();
  boolean r=executeExportOperation(new ArchiveFileExportOperation(null,resourcesToExport,getDestinationValue()));
  results.add(r);
}
Program: 119144
Project: 119144
Buggy source:
@Override public String extractMainClassSegments(){
  IPath classPath=getCodePath().removeFirstSegments(1);
  String className=classPath.toString().replace('/','.');
  return className;
}

Fixed version (ground truth):
@Override public String extractMainClassSegments(){
  return super.extractMainClassSegments();
}