nus-yam/ex-repair huggingface dataset:
Program: 125270
Project: 125270
Buggy source:
public static void buildAndInstallCodesProject(IProgressMonitor monitor,ERepositoryObjectType codeType,boolean install,boolean forceBuild) throws Exception {
  if (!CommonsPlugin.isHeadless()) {
    Job job=new Job("String_Node_Str" + codeType.getLabel()){
      @Override protected IStatus run(      IProgressMonitor monitor){
        try {
          build(codeType,install,forceBuild,monitor);
          return org.eclipse.core.runtime.Status.OK_STATUS;
        }
 catch (        Exception e) {
          return new org.eclipse.core.runtime.Status(IStatus.ERROR,DesignerMavenPlugin.PLUGIN_ID,1,e.getMessage(),e);
        }
      }
    }
;
    job.setUser(false);
    job.setPriority(Job.INTERACTIVE);
    job.schedule();
  }
 else {
synchronized (codeType) {
      build(codeType,install,forceBuild,monitor);
    }
  }
}

Fixed version (ground truth):
public static void buildAndInstallCodesProject(IProgressMonitor monitor,ERepositoryObjectType codeType,boolean install,boolean forceBuild) throws Exception {
  if (forceBuild || !BuildCacheManager.getInstance().isCodesBuild(codeType)) {
    if (!CommonsPlugin.isHeadless()) {
      Job job=new Job("String_Node_Str" + codeType.getLabel()){
        @Override protected IStatus run(        IProgressMonitor monitor){
          try {
            build(codeType,install,forceBuild,monitor);
            return org.eclipse.core.runtime.Status.OK_STATUS;
          }
 catch (          Exception e) {
            return new org.eclipse.core.runtime.Status(IStatus.ERROR,DesignerMavenPlugin.PLUGIN_ID,1,e.getMessage(),e);
          }
        }
      }
;
      job.setUser(false);
      job.setPriority(Job.INTERACTIVE);
      job.schedule();
    }
 else {
synchronized (codeType) {
        build(codeType,install,forceBuild,monitor);
      }
    }
  }
}
Program: 125272
Project: 125272
Buggy source:
public IFolder getDeploymentsFolder(){
  return getProjectPomsFolder().getFolder(DIR_AGGREGATORS);
}

Fixed version (ground truth):
@Deprecated public IFolder getDeploymentsFolder(){
  return getProjectPomsFolder().getFolder(DIR_AGGREGATORS);
}
Program: 125273
Project: 125273
Buggy source:
/** 
 * sync the bat/sh/jobInfo to resources template folder.
 */
public void syncTemplates(boolean overwrite) throws Exception {
  IFolder templateFolder=codeProject.getTemplatesFolder();
  IFile shFile=templateFolder.getFile(IProjectSettingTemplateConstants.JOB_RUN_SH_TEMPLATE_FILE_NAME);
  IFile batFile=templateFolder.getFile(IProjectSettingTemplateConstants.JOB_RUN_BAT_TEMPLATE_FILE_NAME);
  IFile psFile=templateFolder.getFile(IProjectSettingTemplateConstants.JOB_RUN_PS_TEMPLATE_FILE_NAME);
  IFile infoFile=templateFolder.getFile(IProjectSettingTemplateConstants.JOB_INFO_TEMPLATE_FILE_NAME);
  final Map<String,Object> templateParameters=PomUtil.getTemplateParameters(codeProject.getPropery());
  String shContent=MavenTemplateManager.getProjectSettingValue(IProjectSettingPreferenceConstants.TEMPLATE_SH,templateParameters);
  String batContent=MavenTemplateManager.getProjectSettingValue(IProjectSettingPreferenceConstants.TEMPLATE_BAT,templateParameters);
  String psContent=MavenTemplateManager.getProjectSettingValue(IProjectSettingPreferenceConstants.TEMPLATE_PS,templateParameters);
  String jobInfoContent=MavenTemplateManager.getProjectSettingValue(IProjectSettingPreferenceConstants.TEMPLATE_JOB_INFO,templateParameters);
  MavenTemplateManager.saveContent(shFile,shContent,overwrite);
  MavenTemplateManager.saveContent(batFile,batContent,overwrite);
  MavenTemplateManager.saveContent(psFile,psContent,overwrite);
  MavenTemplateManager.saveContent(infoFile,jobInfoContent,overwrite);
}

Fixed version (ground truth):
/** 
 * sync the bat/sh/jobInfo to resources template folder.
 */
public void syncTemplates(boolean overwrite) throws Exception {
  IFolder templateFolder=codeProject.getTemplatesFolder();
  IFile shFile=templateFolder.getFile(IProjectSettingTemplateConstants.JOB_RUN_SH_TEMPLATE_FILE_NAME);
  IFile batFile=templateFolder.getFile(IProjectSettingTemplateConstants.JOB_RUN_BAT_TEMPLATE_FILE_NAME);
  IFile psFile=templateFolder.getFile(IProjectSettingTemplateConstants.JOB_RUN_PS_TEMPLATE_FILE_NAME);
  IFile infoFile=templateFolder.getFile(IProjectSettingTemplateConstants.JOB_INFO_TEMPLATE_FILE_NAME);
  Property property=codeProject.getPropery();
  if (property != null) {
    final Map<String,Object> templateParameters=PomUtil.getTemplateParameters(property);
    String shContent=MavenTemplateManager.getProjectSettingValue(IProjectSettingPreferenceConstants.TEMPLATE_SH,templateParameters);
    String batContent=MavenTemplateManager.getProjectSettingValue(IProjectSettingPreferenceConstants.TEMPLATE_BAT,templateParameters);
    String psContent=MavenTemplateManager.getProjectSettingValue(IProjectSettingPreferenceConstants.TEMPLATE_PS,templateParameters);
    String jobInfoContent=MavenTemplateManager.getProjectSettingValue(IProjectSettingPreferenceConstants.TEMPLATE_JOB_INFO,templateParameters);
    MavenTemplateManager.saveContent(shFile,shContent,overwrite);
    MavenTemplateManager.saveContent(batFile,batContent,overwrite);
    MavenTemplateManager.saveContent(psFile,psContent,overwrite);
    MavenTemplateManager.saveContent(infoFile,jobInfoContent,overwrite);
  }
}
Program: 125274
Project: 125274
Buggy source:
public static void buildAndInstallCodesProject(IProgressMonitor monitor,ERepositoryObjectType codeType,boolean install) throws Exception {
  Job job=new Job("String_Node_Str" + codeType.getLabel()){
    @Override protected IStatus run(    IProgressMonitor monitor){
      try {
        if (!BuildCacheManager.getInstance().isCodesBuild(codeType)) {
          ITalendProcessJavaProject codeProject=getCodesProject(codeType);
          codeProject.buildModules(monitor,null,null);
          if (install) {
            Map<String,Object> argumentsMap=new HashMap<>();
            argumentsMap.put(TalendProcessArgumentConstant.ARG_GOAL,TalendMavenConstants.GOAL_INSTALL);
            argumentsMap.put(TalendProcessArgumentConstant.ARG_PROGRAM_ARGUMENTS,"String_Node_Str");
            codeProject.buildModules(monitor,null,argumentsMap);
            BuildCacheManager.getInstance().updateCodeLastBuildDate(codeType);
          }
        }
        return org.eclipse.core.runtime.Status.OK_STATUS;
      }
 catch (      Exception e) {
        return new org.eclipse.core.runtime.Status(IStatus.ERROR,DesignerMavenPlugin.PLUGIN_ID,1,e.getMessage(),e);
      }
    }
  }
;
  job.setUser(false);
  job.setPriority(Job.INTERACTIVE);
  if (!CommonsPlugin.isHeadless()) {
    job.schedule();
  }
 else {
    job.join();
  }
}

Fixed version (ground truth):
public static void buildAndInstallCodesProject(IProgressMonitor monitor,ERepositoryObjectType codeType,boolean install,boolean forceBuild) throws Exception {
  if (!CommonsPlugin.isHeadless()) {
    Job job=new Job("String_Node_Str" + codeType.getLabel()){
      @Override protected IStatus run(      IProgressMonitor monitor){
        try {
          build(codeType,install,forceBuild,monitor);
          return org.eclipse.core.runtime.Status.OK_STATUS;
        }
 catch (        Exception e) {
          return new org.eclipse.core.runtime.Status(IStatus.ERROR,DesignerMavenPlugin.PLUGIN_ID,1,e.getMessage(),e);
        }
      }
    }
;
    job.setUser(false);
    job.setPriority(Job.INTERACTIVE);
    job.schedule();
  }
 else {
synchronized (codeType) {
      build(codeType,install,forceBuild,monitor);
    }
  }
}
Program: 125275
Project: 125275
Buggy source:
public static void buildAndInstallCodesProject(IProgressMonitor monitor,ERepositoryObjectType codeType) throws Exception {
  if (!BuildCacheManager.getInstance().isCodesBuild(codeType)) {
    Job job=new Job("String_Node_Str" + codeType.getLabel()){
      @Override protected IStatus run(      IProgressMonitor monitor){
        try {
          ITalendProcessJavaProject codeProject=getCodesProject(codeType);
          codeProject.buildModules(new NullProgressMonitor(),null,null);
          Map<String,Object> argumentsMap=new HashMap<>();
          argumentsMap.put(TalendProcessArgumentConstant.ARG_GOAL,TalendMavenConstants.GOAL_INSTALL);
          argumentsMap.put(TalendProcessArgumentConstant.ARG_PROGRAM_ARGUMENTS,"String_Node_Str");
          codeProject.buildModules(new NullProgressMonitor(),null,argumentsMap);
          BuildCacheManager.getInstance().updateCodeLastBuildDate(codeType);
          return org.eclipse.core.runtime.Status.OK_STATUS;
        }
 catch (        Exception e) {
          return new org.eclipse.core.runtime.Status(IStatus.ERROR,DesignerMavenPlugin.PLUGIN_ID,1,e.getMessage(),e);
        }
      }
    }
;
    job.setUser(false);
    job.setPriority(Job.INTERACTIVE);
    job.schedule();
  }
}

Fixed version (ground truth):
public static void buildAndInstallCodesProject(IProgressMonitor monitor,ERepositoryObjectType codeType,boolean install) throws Exception {
  Job job=new Job("String_Node_Str" + codeType.getLabel()){
    @Override protected IStatus run(    IProgressMonitor monitor){
      try {
        if (!BuildCacheManager.getInstance().isCodesBuild(codeType)) {
          ITalendProcessJavaProject codeProject=getCodesProject(codeType);
          codeProject.buildModules(monitor,null,null);
          if (install) {
            Map<String,Object> argumentsMap=new HashMap<>();
            argumentsMap.put(TalendProcessArgumentConstant.ARG_GOAL,TalendMavenConstants.GOAL_INSTALL);
            argumentsMap.put(TalendProcessArgumentConstant.ARG_PROGRAM_ARGUMENTS,"String_Node_Str");
            codeProject.buildModules(monitor,null,argumentsMap);
            BuildCacheManager.getInstance().updateCodeLastBuildDate(codeType);
          }
        }
        return org.eclipse.core.runtime.Status.OK_STATUS;
      }
 catch (      Exception e) {
        return new org.eclipse.core.runtime.Status(IStatus.ERROR,DesignerMavenPlugin.PLUGIN_ID,1,e.getMessage(),e);
      }
    }
  }
;
  job.setUser(false);
  job.setPriority(Job.INTERACTIVE);
  if (!CommonsPlugin.isHeadless()) {
    job.schedule();
  }
 else {
    job.join();
  }
}
Program: 125276
Project: 125276
Buggy source:
@Override public void run(){
  String message="String_Node_Str";
  Set<String> installedModule=job.getInstalledModule();
  if (!installedModule.isEmpty()) {
    message=Messages.getString("String_Node_Str",data.getName());
    ImportExternalJarAction.cleanupLib(installedModule);
  }
 else {
    message=Messages.getString("String_Node_Str",data.getName());
    ;
    button.setEnabled(true);
  }
  MessageDialog.openInformation(getShell(),Messages.getString("String_Node_Str"),message);
  if (enabledButtonCount.get() == 0) {
    if (GlobalServiceRegister.getDefault().isServiceRegistered(IDesignerCoreService.class)) {
      IDesignerCoreService service=(IDesignerCoreService)GlobalServiceRegister.getDefault().getService(IDesignerCoreService.class);
      if (service != null) {
        service.refreshComponentView();
      }
    }
  }
}

Fixed version (ground truth):
@Override public void run(){
  String message="String_Node_Str";
  Set<String> installedModule=job.getInstalledModule();
  if (!installedModule.isEmpty()) {
    message=Messages.getString("String_Node_Str",data.getName());
    ImportExternalJarAction.cleanupLib(installedModule);
  }
 else {
    message=Messages.getString("String_Node_Str",data.getName());
    ;
    button.setEnabled(true);
  }
  MessageDialog.openInformation(getShell(),Messages.getString("String_Node_Str"),message);
  if (enabledButtonCount.get() == 0) {
    if (GlobalServiceRegister.getDefault().isServiceRegistered(IDesignerCoreService.class)) {
      IDesignerCoreService service=(IDesignerCoreService)GlobalServiceRegister.getDefault().getService(IDesignerCoreService.class);
      if (service != null) {
        service.refreshComponentView();
      }
    }
  }
  ILibrariesService librariesService=(ILibrariesService)GlobalServiceRegister.getDefault().getService(ILibrariesService.class);
  librariesService.checkLibraries();
}
Program: 125278
Project: 125278
Buggy source:
@Override public void done(IJobChangeEvent event){
  Display.getDefault().asyncExec(new Runnable(){
    @Override public void run(){
      String message="String_Node_Str";
      Set<String> installedModule=job.getInstalledModule();
      if (!installedModule.isEmpty()) {
        message=Messages.getString("String_Node_Str",data.getName());
        ImportExternalJarAction.cleanupLib(installedModule);
      }
 else {
        message=Messages.getString("String_Node_Str",data.getName());
        ;
        button.setEnabled(true);
      }
      MessageDialog.openInformation(getShell(),Messages.getString("String_Node_Str"),message);
      if (enabledButtonCount.get() == 0) {
        if (GlobalServiceRegister.getDefault().isServiceRegistered(IDesignerCoreService.class)) {
          IDesignerCoreService service=(IDesignerCoreService)GlobalServiceRegister.getDefault().getService(IDesignerCoreService.class);
          if (service != null) {
            service.refreshComponentView();
          }
        }
      }
    }
  }
);
}

Fixed version (ground truth):
@Override public void done(IJobChangeEvent event){
  Display.getDefault().asyncExec(new Runnable(){
    @Override public void run(){
      String message="String_Node_Str";
      Set<String> installedModule=job.getInstalledModule();
      if (!installedModule.isEmpty()) {
        message=Messages.getString("String_Node_Str",data.getName());
        ImportExternalJarAction.cleanupLib(installedModule);
      }
 else {
        message=Messages.getString("String_Node_Str",data.getName());
        ;
        button.setEnabled(true);
      }
      MessageDialog.openInformation(getShell(),Messages.getString("String_Node_Str"),message);
      if (enabledButtonCount.get() == 0) {
        if (GlobalServiceRegister.getDefault().isServiceRegistered(IDesignerCoreService.class)) {
          IDesignerCoreService service=(IDesignerCoreService)GlobalServiceRegister.getDefault().getService(IDesignerCoreService.class);
          if (service != null) {
            service.refreshComponentView();
          }
        }
      }
      ILibrariesService librariesService=(ILibrariesService)GlobalServiceRegister.getDefault().getService(ILibrariesService.class);
      librariesService.checkLibraries();
    }
  }
);
}
Program: 125280
Project: 125280
Buggy source:
/** 
 * DOC sgandon DownloadModuleRunnable constructor comment.
 * @param shell, never null, used to ask the user to accept the licenses
 * @param toDownload
 */
public DownloadModuleRunnable(List<ModuleToInstall> toDownload){
  this.toDownload=toDownload;
  downloadFailed=new HashSet<String>();
  installedModules=new HashSet<String>();
}

Fixed version (ground truth):
public DownloadModuleRunnable(List<ModuleToInstall> toDownload,boolean checkLibraries){
  this(toDownload);
  this.checkLibraries=checkLibraries;
}
Program: 125281
Project: 125281
Buggy source:
/** 
 * DOC sgandon DownloadModuleRunnableWithLicenseDialog constructor comment.
 */
public DownloadModuleRunnableWithLicenseDialog(List<ModuleToInstall> toDownload,Shell shell){
  super(toDownload);
  this.shell=shell;
}

Fixed version (ground truth):
/** 
 * DOC sgandon DownloadModuleRunnableWithLicenseDialog constructor comment.
 */
public DownloadModuleRunnableWithLicenseDialog(List<ModuleToInstall> toDownload,Shell shell){
  super(toDownload,false);
  this.shell=shell;
}
Program: 125282
Project: 125282
Buggy source:
public static void buildAndInstallCodesProject(IProgressMonitor monitor,ERepositoryObjectType codeType) throws Exception {
  if (!BuildCacheManager.getInstance().isCodesBuild(codeType)) {
    ITalendProcessJavaProject codeProject=getCodesProject(codeType);
    codeProject.buildModules(new NullProgressMonitor(),null,null);
    Map<String,Object> argumentsMap=new HashMap<>();
    argumentsMap.put(TalendProcessArgumentConstant.ARG_GOAL,TalendMavenConstants.GOAL_INSTALL);
    argumentsMap.put(TalendProcessArgumentConstant.ARG_PROGRAM_ARGUMENTS,"String_Node_Str");
    codeProject.buildModules(new NullProgressMonitor(),null,argumentsMap);
    BuildCacheManager.getInstance().updateCodeLastBuildDate(codeType);
  }
}

Fixed version (ground truth):
public static void buildAndInstallCodesProject(IProgressMonitor monitor,ERepositoryObjectType codeType) throws Exception {
  if (!BuildCacheManager.getInstance().isCodesBuild(codeType)) {
    Job job=new Job("String_Node_Str" + codeType.getLabel()){
      @Override protected IStatus run(      IProgressMonitor monitor){
        try {
          ITalendProcessJavaProject codeProject=getCodesProject(codeType);
          codeProject.buildModules(new NullProgressMonitor(),null,null);
          Map<String,Object> argumentsMap=new HashMap<>();
          argumentsMap.put(TalendProcessArgumentConstant.ARG_GOAL,TalendMavenConstants.GOAL_INSTALL);
          argumentsMap.put(TalendProcessArgumentConstant.ARG_PROGRAM_ARGUMENTS,"String_Node_Str");
          codeProject.buildModules(new NullProgressMonitor(),null,argumentsMap);
          BuildCacheManager.getInstance().updateCodeLastBuildDate(codeType);
          return org.eclipse.core.runtime.Status.OK_STATUS;
        }
 catch (        Exception e) {
          return new org.eclipse.core.runtime.Status(IStatus.ERROR,DesignerMavenPlugin.PLUGIN_ID,1,e.getMessage(),e);
        }
      }
    }
;
    job.setUser(false);
    job.setPriority(Job.INTERACTIVE);
    job.schedule();
  }
}
Program: 125283
Project: 125283
Buggy source:
private static void updateCodeProject(IProgressMonitor monitor,ERepositoryObjectType codeType){
  try {
    ITalendProcessJavaProject codeProject=getCodesProject(codeType);
    updateCodeProjectPom(monitor,codeType,codeProject.getProjectPom());
    Job job=new Job("String_Node_Str" + codeType.getLabel()){
      @Override protected IStatus run(      IProgressMonitor monitor){
        try {
          buildAndInstallCodesProject(monitor,codeType);
          return org.eclipse.core.runtime.Status.OK_STATUS;
        }
 catch (        Exception e) {
          return new org.eclipse.core.runtime.Status(IStatus.ERROR,DesignerMavenPlugin.PLUGIN_ID,1,e.getMessage(),e);
        }
      }
    }
;
    job.setUser(false);
    job.setPriority(Job.INTERACTIVE);
    job.schedule();
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
}

Fixed version (ground truth):
private static void updateCodeProject(IProgressMonitor monitor,ERepositoryObjectType codeType){
  try {
    ITalendProcessJavaProject codeProject=getCodesProject(codeType);
    updateCodeProjectPom(monitor,codeType,codeProject.getProjectPom());
    buildAndInstallCodesProject(monitor,codeType);
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
}
Program: 125284
Project: 125284
Buggy source:
private static IFile getParentModulePomFile(IFile pomFile){
  IFile parentPom=null;
  if (pomFile == null || pomFile.getParent() == null || pomFile.getParent().getParent() == null) {
    return null;
  }
  if (pomFile.getParent().getName().equals(TalendMavenConstants.PROJECT_NAME)) {
    return null;
  }
  IContainer parentPomFolder=pomFile.getParent();
  int nb=10;
  while (parentPomFolder != null && !parentPomFolder.getName().equals(RepositoryConstants.POMS_DIRECTORY)) {
    parentPomFolder=parentPomFolder.getParent();
    nb--;
    if (nb < 0) {
      return null;
    }
  }
  if (parentPomFolder != null) {
    try {
      for (      IResource file : parentPomFolder.members()) {
        if (file.getName().equals(TalendMavenConstants.POM_FILE_NAME)) {
          parentPom=(IFile)file;
          break;
        }
      }
    }
 catch (    CoreException e) {
      ExceptionHandler.process(e);
    }
  }
  return parentPom;
}

Fixed version (ground truth):
private static IFile getParentModulePomFile(IFile pomFile){
  IFile parentPom=null;
  if (pomFile == null || pomFile.getParent() == null || pomFile.getParent().getParent() == null) {
    return null;
  }
  if (pomFile.getParent().getName().equals(TalendMavenConstants.PROJECT_NAME)) {
    return null;
  }
  IContainer parentPomFolder=pomFile.getParent();
  int nb=10;
  while (parentPomFolder != null && !parentPomFolder.getName().equals(RepositoryConstants.POMS_DIRECTORY)) {
    parentPomFolder=parentPomFolder.getParent();
    nb--;
    if (nb < 0) {
      return null;
    }
  }
  if (parentPomFolder != null) {
    if (!parentPomFolder.exists()) {
      if (GlobalServiceRegister.getDefault().isServiceRegistered(IRunProcessService.class)) {
        IRunProcessService runProcessService=(IRunProcessService)GlobalServiceRegister.getDefault().getService(IRunProcessService.class);
        runProcessService.initMavenJavaProject(new NullProgressMonitor(),ProjectManager.getInstance().getCurrentProject());
      }
    }
    try {
      for (      IResource file : parentPomFolder.members()) {
        if (file.getName().equals(TalendMavenConstants.POM_FILE_NAME)) {
          parentPom=(IFile)file;
          break;
        }
      }
    }
 catch (    CoreException e) {
      ExceptionHandler.process(e);
    }
  }
  return parentPom;
}
Program: 125286
Project: 125286
Buggy source:
public String getRepositoryURI(boolean isRelease){
  if (StringUtils.isEmpty(this.server)) {
    return null;
  }
  IRepositoryArtifactHandler repositoryHandler=RepositoryArtifactHandlerManager.getRepositoryHandler(this);
  if (repositoryHandler != null) {
    return repositoryHandler.getRepositoryURL(isRelease);
  }
 else {
    String repId="String_Node_Str";
    if (isRelease) {
      repId=repositoryId;
    }
 else {
      repId=snapshotRepId;
    }
    String repositoryBaseURI=this.server;
    if (repositoryBaseURI.endsWith(NexusConstants.SLASH)) {
      repositoryBaseURI=repositoryBaseURI.substring(0,repositoryBaseURI.length() - 1);
    }
    repositoryBaseURI+=NexusConstants.CONTENT_REPOSITORIES;
    repositoryBaseURI+=repId + NexusConstants.SLASH;
    return repositoryBaseURI;
  }
}

Fixed version (ground truth):
public String getRepositoryURI(boolean isRelease){
  if (StringUtils.isEmpty(this.server)) {
    return null;
  }
  if (isAbsoluteURL()) {
    return this.server;
  }
  IRepositoryArtifactHandler repositoryHandler=RepositoryArtifactHandlerManager.getRepositoryHandler(this);
  if (repositoryHandler != null) {
    return repositoryHandler.getRepositoryURL(isRelease);
  }
 else {
    String repId="String_Node_Str";
    if (isRelease) {
      repId=repositoryId;
    }
 else {
      repId=snapshotRepId;
    }
    String repositoryBaseURI=this.server;
    if (repositoryBaseURI.endsWith(NexusConstants.SLASH)) {
      repositoryBaseURI=repositoryBaseURI.substring(0,repositoryBaseURI.length() - 1);
    }
    repositoryBaseURI+=NexusConstants.CONTENT_REPOSITORIES;
    if (StringUtils.isNotBlank(repId)) {
      repositoryBaseURI+=repId + NexusConstants.SLASH;
    }
 else     if (!repositoryBaseURI.endsWith(NexusConstants.SLASH)) {
      repositoryBaseURI+=NexusConstants.SLASH;
    }
    return repositoryBaseURI;
  }
}
Program: 125288
Project: 125288
Buggy source:
@Override public String getRepositoryURL(boolean isRelease){
  String repositoryId="String_Node_Str";
  if (isRelease) {
    repositoryId=serverBean.getRepositoryId();
  }
 else {
    repositoryId=serverBean.getSnapshotRepId();
  }
  String repositoryBaseURI=serverBean.getServer();
  if (repositoryBaseURI.endsWith(NexusConstants.SLASH)) {
    repositoryBaseURI=repositoryBaseURI.substring(0,repositoryBaseURI.length() - 1);
  }
  repositoryBaseURI+=getRepositoryPrefixPath();
  repositoryBaseURI+=repositoryId + NexusConstants.SLASH;
  return repositoryBaseURI;
}

Fixed version (ground truth):
@Override public String getRepositoryURL(boolean isRelease){
  String repositoryId="String_Node_Str";
  if (isRelease) {
    repositoryId=serverBean.getRepositoryId();
  }
 else {
    repositoryId=serverBean.getSnapshotRepId();
  }
  String repositoryBaseURI=serverBean.getServer();
  if (repositoryBaseURI.endsWith(NexusConstants.SLASH)) {
    repositoryBaseURI=repositoryBaseURI.substring(0,repositoryBaseURI.length() - 1);
  }
  repositoryBaseURI+=getRepositoryPrefixPath();
  if (StringUtils.isNotBlank(repositoryId)) {
    repositoryBaseURI+=repositoryId + NexusConstants.SLASH;
  }
 else   if (!repositoryBaseURI.endsWith(NexusConstants.SLASH)) {
    repositoryBaseURI+=NexusConstants.SLASH;
  }
  return repositoryBaseURI;
}
Program: 125292
Project: 125292
Buggy source:
public void clearCurrentCache(){
  currentCache.clear();
  currentmodules.clear();
  subjobProjects.clear();
  aggregatorPomsHelper=new AggregatorPomsHelper();
}

Fixed version (ground truth):
public void clearCurrentCache(){
  currentCache.clear();
  currentmodules.clear();
  subjobProjects.clear();
  subjobMavenProjects.clear();
  aggregatorPomsHelper=new AggregatorPomsHelper();
}
Program: 125293
Project: 125293
Buggy source:
public void removeCache(Property property){
  currentCache.remove(getKey(property));
  currentmodules.remove(getModulePath(property));
  subjobProjects.remove(getTalendJobJavaProject(property));
}

Fixed version (ground truth):
public void removeCache(Property property){
  currentCache.remove(getKey(property));
  currentmodules.remove(getModulePath(property));
  ITalendProcessJavaProject subjobProject=getTalendJobJavaProject(property);
  subjobProjects.remove(subjobProject);
  if (MavenProjectUtils.hasMavenNature(subjobProject.getProject())) {
    subjobMavenProjects.remove(subjobProject);
  }
}
Program: 125294
Project: 125294
Buggy source:
public void putCache(Property property){
  currentCache.put(getKey(property),generateCacheInfo(property));
  currentmodules.add(getModulePath(property));
  subjobProjects.add(getTalendJobJavaProject(property));
}

Fixed version (ground truth):
public void putCache(Property property){
  currentCache.put(getKey(property),generateCacheInfo(property));
  currentmodules.add(getModulePath(property));
  ITalendProcessJavaProject subjobProject=getTalendJobJavaProject(property);
  subjobProjects.add(subjobProject);
  if (MavenProjectUtils.hasMavenNature(subjobProject.getProject())) {
    subjobMavenProjects.add(subjobProject);
  }
}
Program: 125295
Project: 125295
Buggy source:
public InputStream readProjectSettingStream(String projectSettingTemplateKey,Map<String,Object> parameters) throws Exception {
  ProjectPreferenceManager projectPreferenceManager=getProjectPreferenceManager(parameters);
  if (projectPreferenceManager == null || projectSettingTemplateKey == null) {
    throw new NullPointerException();
  }
  if (projectSettingTemplateKey.length() == 0) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  String value=projectPreferenceManager.getValue(projectSettingTemplateKey);
  if (value == null || value.length() == 0) {
    throw new Exception("String_Node_Str" + projectSettingTemplateKey + "String_Node_Str"+ projectPreferenceManager.getQualifier());
  }
  return new ByteArrayInputStream(value.getBytes(TalendMavenConstants.DEFAULT_ENCODING));
}

Fixed version (ground truth):
public InputStream readProjectSettingStream(String projectSettingTemplateKey,Map<String,Object> parameters) throws Exception {
  ProjectPreferenceManager projectPreferenceManager=getProjectPreferenceManager(parameters);
  if (projectPreferenceManager == null || projectSettingTemplateKey == null) {
    throw new NullPointerException();
  }
  if (projectSettingTemplateKey.length() == 0) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  String value=projectPreferenceManager.getValue(projectSettingTemplateKey);
  if (value == null || value.length() == 0) {
    if (parameters.containsKey(MavenTemplateManager.KEY_PROJECT_NAME)) {
      projectPreferenceManager=getProjectPreferenceManager();
      if (projectPreferenceManager == null || projectSettingTemplateKey == null) {
        throw new NullPointerException();
      }
      if (projectSettingTemplateKey.length() == 0) {
        throw new IllegalArgumentException("String_Node_Str");
      }
      value=projectPreferenceManager.getValue(projectSettingTemplateKey);
    }
    if (value == null || value.length() == 0) {
      throw new Exception("String_Node_Str" + projectSettingTemplateKey + "String_Node_Str"+ projectPreferenceManager.getQualifier());
    }
  }
  return new ByteArrayInputStream(value.getBytes(TalendMavenConstants.DEFAULT_ENCODING));
}
Program: 125296
Project: 125296
Buggy source:
public ModuleNeeded(String context,String moduleName,String informationMsg,boolean required,List<String> installURL,String requiredIf,String mavenUrl){
  super();
  this.context=context;
  setModuleName(moduleName);
  this.informationMsg=informationMsg;
  this.required=required;
  this.installURL=installURL;
  this.requiredIf=requiredIf;
  setMavenUri(mavenUrl);
}

Fixed version (ground truth):
public ModuleNeeded(String context,String moduleName,String informationMsg,boolean required,List<String> installURL,String requiredIf,String mavenUrl){
  super();
  this.context=context;
  this.informationMsg=informationMsg;
  this.required=required;
  this.installURL=installURL;
  this.requiredIf=requiredIf;
  String name=moduleName;
  String uri=mavenUrl;
  if (moduleName != null) {
    MavenArtifact artifact=MavenUrlHelper.parseMvnUrl(moduleName);
    if (artifact != null) {
      name=artifact.getFileName();
      if (mavenUrl == null) {
        uri=moduleName;
      }
    }
  }
  if (mavenUrl != null && moduleName == null) {
    MavenArtifact artifact=MavenUrlHelper.parseMvnUrl(mavenUrl);
    if (artifact != null) {
      name=artifact.getFileName();
    }
  }
  setModuleName(name);
  setMavenUri(uri);
}
Program: 125297
Project: 125297
Buggy source:
public void setModuleName(String moduleName){
  if (moduleName != null) {
    this.moduleName=MavenUrlHelper.generateModuleNameByMavenURI(moduleName);
    if (this.moduleName != null) {
      this.mavenUri=moduleName;
    }
 else {
      String mn=moduleName.replace(QUOTATION_MARK,"String_Node_Str").replace(SINGLE_QUOTE,"String_Node_Str");
      if (mn.indexOf("String_Node_Str") != -1 || mn.indexOf("String_Node_Str") != -1) {
        mn=new Path(mn).lastSegment();
      }
      this.moduleName=mn;
    }
  }
 else {
    this.moduleName=moduleName;
  }
}

Fixed version (ground truth):
public void setModuleName(String moduleName){
  if (moduleName != null) {
    String mn=moduleName.replace(QUOTATION_MARK,"String_Node_Str").replace(SINGLE_QUOTE,"String_Node_Str");
    if (mn.indexOf("String_Node_Str") != -1 || mn.indexOf("String_Node_Str") != -1) {
      mn=new Path(mn).lastSegment();
    }
    this.moduleName=mn;
  }
 else {
    this.moduleName=moduleName;
  }
}
Program: 125298
Project: 125298
Buggy source:
@Test public void testSetModuleName(){
  String moduleValue="String_Node_Str";
  ModuleNeeded moduleNeeded=new ModuleNeeded(null,moduleValue,null,true);
  moduleNeeded.setModuleName(moduleValue);
  Assert.assertEquals(moduleValue,moduleNeeded.getModuleName());
  moduleValue="String_Node_Str";
  moduleNeeded.setModuleName(moduleValue);
  Assert.assertEquals("String_Node_Str",moduleNeeded.getModuleName());
  moduleValue="String_Node_Str";
  moduleNeeded.setModuleName(moduleValue);
  Assert.assertEquals("String_Node_Str",moduleNeeded.getModuleName());
  moduleValue="String_Node_Str";
  moduleNeeded.setModuleName(moduleValue);
  Assert.assertEquals("String_Node_Str",moduleNeeded.getModuleName());
  moduleValue="String_Node_Str";
  moduleNeeded.setModuleName(moduleValue);
  Assert.assertEquals("String_Node_Str",moduleNeeded.getModuleName());
}

Fixed version (ground truth):
@Test public void testSetModuleName(){
  String moduleValue="String_Node_Str";
  ModuleNeeded moduleNeeded=new ModuleNeeded(null,moduleValue,null,true);
  moduleNeeded.setModuleName(moduleValue);
  Assert.assertEquals(moduleValue,moduleNeeded.getModuleName());
  moduleValue="String_Node_Str";
  moduleNeeded.setModuleName(moduleValue);
  Assert.assertEquals("String_Node_Str",moduleNeeded.getModuleName());
}
Program: 125299
Project: 125299
Buggy source:
private static int search(HttpURLConnection urlConnection,Document document,List<MavenArtifact> artifacts) throws Exception {
  List<Node> list=document.selectNodes("String_Node_Str");
  for (  Node arNode : list) {
    MavenArtifact artifact=new MavenArtifact();
    artifacts.add(artifact);
    artifact.setGroupId(arNode.selectSingleNode("String_Node_Str").getText());
    artifact.setArtifactId(arNode.selectSingleNode("String_Node_Str").getText());
    artifact.setVersion(arNode.selectSingleNode("String_Node_Str").getText());
    Node descNode=arNode.selectSingleNode("String_Node_Str");
    if (descNode != null) {
      artifact.setDescription(descNode.getText());
    }
    Node urlNode=arNode.selectSingleNode("String_Node_Str");
    if (urlNode != null) {
      artifact.setUrl(urlNode.getText());
    }
    Node licenseNode=arNode.selectSingleNode("String_Node_Str");
    if (licenseNode != null) {
      artifact.setLicense(licenseNode.getText());
    }
    Node licenseUrlNode=arNode.selectSingleNode("String_Node_Str");
    if (licenseUrlNode != null) {
      artifact.setLicenseUrl(licenseUrlNode.getText());
    }
    List<Node> artLinks=arNode.selectNodes("String_Node_Str");
    for (    Node link : artLinks) {
      Node extensionElement=link.selectSingleNode("String_Node_Str");
      String extension=null;
      String classifier=null;
      if (extensionElement != null) {
        if ("String_Node_Str".equals(extensionElement.getText())) {
          continue;
        }
        extension=extensionElement.getText();
      }
      Node classifierElement=link.selectSingleNode("String_Node_Str");
      if (classifierElement != null) {
        classifier=classifierElement.getText();
      }
      artifact.setType(extension);
      artifact.setClassifier(classifier);
    }
  }
  return list.size();
}

Fixed version (ground truth):
private static void search(String nexusUrl,final String userName,final String password,String repositoryId,String groupIdToSearch,String artifactId,String versionToSearch,int searchCount,List<MavenArtifact> artifacts) throws Exception {
  int totalCount=0;
  String service=NexusConstants.SERVICES_SEARCH + getSearchQuery(repositoryId,groupIdToSearch,artifactId,versionToSearch,0,searchCount);
  URI requestURI=getSearchURI(nexusUrl,service);
  Document document=downloadDocument(requestURI,userName,password);
  if (document != null) {
    Node countNode=document.selectSingleNode("String_Node_Str");
    if (countNode != null) {
      try {
        totalCount=Integer.parseInt(countNode.getText());
      }
 catch (      NumberFormatException e) {
        totalCount=0;
      }
    }
    int searchDone=readDocument(document,artifacts);
    while (searchDone < totalCount) {
      service=NexusConstants.SERVICES_SEARCH + getSearchQuery(repositoryId,groupIdToSearch,artifactId,versionToSearch,searchDone,searchCount);
      requestURI=getSearchURI(nexusUrl,service);
      document=downloadDocument(requestURI,userName,password);
      searchDone=searchDone + readDocument(document,artifacts);
    }
  }
}
Program: 125300
Project: 125300
Buggy source:
public static String resolveSha1(String nexusUrl,final String userName,final String password,String repositoryId,String groupId,String artifactId,String version,String type) throws Exception {
  HttpURLConnection urlConnection=null;
  final Authenticator defaultAuthenticator=NetworkUtil.getDefaultAuthenticator();
  if (StringUtils.isNotEmpty(userName)) {
    Authenticator.setDefault(new Authenticator(){
      @Override protected PasswordAuthentication getPasswordAuthentication(){
        return new PasswordAuthentication(userName,password.toCharArray());
      }
    }
);
  }
  try {
    String service=NexusConstants.SERVICES_RESOLVE + "String_Node_Str" + artifactId+ "String_Node_Str"+ groupId+ "String_Node_Str"+ repositoryId+ "String_Node_Str"+ version+ "String_Node_Str"+ type;
    urlConnection=getHttpURLConnection(nexusUrl,service,userName,password);
    SAXReader saxReader=new SAXReader();
    InputStream inputStream=urlConnection.getInputStream();
    Document document=saxReader.read(inputStream);
    Node sha1Node=document.selectSingleNode("String_Node_Str");
    String sha1=null;
    if (sha1Node != null) {
      sha1=sha1Node.getText();
    }
    return sha1;
  }
 catch (  FileNotFoundException e) {
    return null;
  }
 finally {
    Authenticator.setDefault(defaultAuthenticator);
    if (null != urlConnection) {
      urlConnection.disconnect();
    }
  }
}

Fixed version (ground truth):
public static String resolveSha1(String nexusUrl,final String userName,final String password,String repositoryId,String groupId,String artifactId,String version,String type) throws Exception {
  final String[] toReturn={null};
  String service=NexusConstants.SERVICES_RESOLVE + "String_Node_Str" + artifactId+ "String_Node_Str"+ groupId+ "String_Node_Str"+ repositoryId+ "String_Node_Str"+ version+ "String_Node_Str"+ type;
  final URI requestURI=getSearchURI(nexusUrl,service);
  NullProgressMonitor monitor=new NullProgressMonitor();
  new HttpClientTransport(nexusUrl,userName,password){
    @Override protected HttpResponse execute(    IProgressMonitor monitor,    DefaultHttpClient httpClient,    URI targetURI) throws Exception {
      HttpGet httpGet=new HttpGet(requestURI);
      httpClient.getParams().setParameter(CoreConnectionPNames.CONNECTION_TIMEOUT,getTimeout());
      HttpResponse response=httpClient.execute(httpGet);
      if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
        HttpEntity entity=response.getEntity();
        InputStream inputStream=entity.getContent();
        SAXReader saxReader=new SAXReader();
        Document document=saxReader.read(inputStream);
        if (document != null) {
          Node sha1Node=document.selectSingleNode("String_Node_Str");
          String sha1=null;
          if (sha1Node != null) {
            sha1=sha1Node.getText();
            toReturn[0]=sha1;
          }
        }
      }
      return response;
    }
  }
.doRequest(monitor,requestURI);
  return toReturn[0];
}
Program: 125301
Project: 125301
Buggy source:
public static boolean checkConnectionStatus(String nexusURL,final String username,final String password){
  if (StringUtils.isEmpty(nexusURL)) {
    return false;
  }
  final Authenticator defaultAuthenticator=NetworkUtil.getDefaultAuthenticator();
  if (StringUtils.isNotEmpty(username)) {
    Authenticator.setDefault(new Authenticator(){
      @Override protected PasswordAuthentication getPasswordAuthentication(){
        return new PasswordAuthentication(username,password.toCharArray());
      }
    }
);
  }
  int status=-1;
  try {
    URL url=new URL(nexusURL);
    HttpURLConnection urlConnection=(HttpURLConnection)url.openConnection();
    if (urlConnection instanceof HttpsURLConnection) {
      String userDir=Platform.getInstallLocation().getURL().getPath();
      final SSLSocketFactory socketFactory=SSLUtils.getSSLContext(userDir).getSocketFactory();
      HttpsURLConnection httpsConnection=(HttpsURLConnection)urlConnection;
      httpsConnection.setSSLSocketFactory(socketFactory);
      httpsConnection.setHostnameVerifier(new HostnameVerifier(){
        @Override public boolean verify(        String arg0,        SSLSession arg1){
          return true;
        }
      }
);
    }
    int timeout=getTimeout();
    urlConnection.setConnectTimeout(timeout);
    urlConnection.setReadTimeout(timeout);
    status=urlConnection.getResponseCode();
    if (status == CONNECTION_OK) {
      return true;
    }
  }
 catch (  Exception e) {
    if (CommonsPlugin.isDebugMode()) {
      ExceptionHandler.process(e);
    }
  }
 finally {
    Authenticator.setDefault(defaultAuthenticator);
  }
  return false;
}

Fixed version (ground truth):
public static boolean checkConnectionStatus(String nexusURL,String username,String password){
  if (StringUtils.isEmpty(nexusURL)) {
    return false;
  }
  final boolean status[]={false};
  try {
    NullProgressMonitor monitor=new NullProgressMonitor();
    new HttpClientTransport(nexusURL,username,password){
      @Override protected HttpResponse execute(      IProgressMonitor monitor,      DefaultHttpClient httpClient,      URI targetURI) throws Exception {
        httpClient.getParams().setParameter(CoreConnectionPNames.CONNECTION_TIMEOUT,getTimeout());
        HttpHead httpHead=new HttpHead(targetURI);
        HttpResponse response=httpClient.execute(httpHead);
        if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
          status[0]=true;
        }
        return response;
      }
    }
.doRequest(monitor,new URI(nexusURL));
  }
 catch (  Exception e) {
    status[0]=false;
  }
  return status[0];
}
Program: 125303
Project: 125303
Buggy source:
protected Set<P2ExtraFeature> retrieveComponentsFromIndex(IProgressMonitor monitor,ComponentNexusP2ExtraFeature defaultFeature) throws Exception {
  if (monitor == null) {
    monitor=new NullProgressMonitor();
  }
  if (monitor.isCanceled()) {
    throw new OperationCanceledException();
  }
  NexusComponentsTransport transport=new NexusComponentsTransport(defaultFeature.getNexusURL(),defaultFeature.getNexusUser(),defaultFeature.getNexusPass());
  if (transport.isAvailable()) {
    if (monitor.isCanceled()) {
      throw new OperationCanceledException();
    }
    final Document doc=transport.downloadXMLDocument(monitor,defaultFeature.getIndexArtifact());
    if (monitor.isCanceled()) {
      throw new OperationCanceledException();
    }
    final Set<P2ExtraFeature> p2Features=createFeatures(defaultFeature,doc);
    return p2Features;
  }
  return Collections.emptySet();
}

Fixed version (ground truth):
protected Set<P2ExtraFeature> retrieveComponentsFromIndex(IProgressMonitor monitor,ComponentNexusP2ExtraFeature defaultFeature) throws Exception {
  if (monitor == null) {
    monitor=new NullProgressMonitor();
  }
  if (monitor.isCanceled()) {
    throw new OperationCanceledException();
  }
  NexusComponentsTransport transport=new NexusComponentsTransport(defaultFeature.getNexusURL(),defaultFeature.getNexusUser(),defaultFeature.getNexusPass());
  if (transport.isAvailable(monitor,defaultFeature.getIndexArtifact())) {
    if (monitor.isCanceled()) {
      throw new OperationCanceledException();
    }
    final Document doc=transport.downloadXMLDocument(monitor,defaultFeature.getIndexArtifact());
    if (monitor.isCanceled()) {
      throw new OperationCanceledException();
    }
    final Set<P2ExtraFeature> p2Features=createFeatures(defaultFeature,doc);
    return p2Features;
  }
  return Collections.emptySet();
}
Program: 125304
Project: 125304
Buggy source:
public List<ProjectReference> getProjectReferenceList(){
  List<ProjectReference> projectReferenceList=new ArrayList<ProjectReference>();
  if (!isLocal()) {
    if (referenceProjectProvider == null) {
      referenceProjectProvider=new ReferenceProjectProvider(project);
      try {
        referenceProjectProvider.initSettings();
      }
 catch (      BusinessException|PersistenceException e) {
        ExceptionHandler.process(e);
      }
    }
    try {
      projectReferenceList.addAll(referenceProjectProvider.getProjectReference());
    }
 catch (    PersistenceException e) {
      ExceptionHandler.process(e);
    }
  }
  return projectReferenceList;
}

Fixed version (ground truth):
public List<ProjectReference> getProjectReferenceList(boolean isIgnoreProjectNotExist){
  List<ProjectReference> projectReferenceList=new ArrayList<ProjectReference>();
  if (!isLocal()) {
    if (referenceProjectProvider == null) {
      referenceProjectProvider=new ReferenceProjectProvider(project);
      try {
        referenceProjectProvider.initSettings();
      }
 catch (      BusinessException|PersistenceException e) {
        if (!isIgnoreProjectNotExist) {
          ExceptionHandler.process(e);
        }
      }
    }
    try {
      projectReferenceList.addAll(referenceProjectProvider.getProjectReference());
    }
 catch (    PersistenceException e) {
      ExceptionHandler.process(e);
    }
  }
  return projectReferenceList;
}
Program: 125306
Project: 125306
Buggy source:
private static DynamicClassLoader createCustomClassLoader(String index,Set<String> libraries){
  DynamicClassLoader classLoader=new DynamicClassLoader();
  loadLibraries(classLoader,libraries.toArray(new String[0]),true);
  classLoadersMap.put(index,classLoader);
  return classLoader;
}

Fixed version (ground truth):
private static DynamicClassLoader createCustomClassLoader(String index,Set<String> libraries){
  DynamicClassLoader classLoader=new DynamicClassLoader();
  loadLibraries(classLoader,libraries.toArray(new String[0]),true);
  getClassLoaderMap().put(index,classLoader);
  return classLoader;
}
Program: 125307
Project: 125307
Buggy source:
private static synchronized DynamicClassLoader findLoader(String index,ClassLoader parentLoader,boolean showDownloadIfNotExist){
  IConfigurationElement current=findIndex(index);
  if (current != null) {
    String parentKey=current.getAttribute(PARENT_ATTR);
    ClassLoader parentClassLoader=null;
    if (StringUtils.isNotEmpty(parentKey)) {
      parentClassLoader=getClassLoader(parentKey,showDownloadIfNotExist);
    }
    if (parentClassLoader == null) {
      parentClassLoader=parentLoader;
    }
    DynamicClassLoader classLoader=null;
    if (parentClassLoader == null) {
      classLoader=new DynamicClassLoader();
    }
 else {
      classLoader=new DynamicClassLoader(parentClassLoader);
    }
    boolean putInCache=true;
    String[] librariesArray=getLibs(current);
    if (librariesArray.length > 0) {
      putInCache=loadLibraries(classLoader,librariesArray,showDownloadIfNotExist);
    }
    if (putInCache) {
      classLoadersMap.put(index,classLoader);
    }
    return classLoader;
  }
  return null;
}

Fixed version (ground truth):
private static synchronized DynamicClassLoader findLoader(String index,ClassLoader parentLoader,boolean showDownloadIfNotExist){
  IConfigurationElement current=findIndex(index);
  if (current != null) {
    String parentKey=current.getAttribute(PARENT_ATTR);
    ClassLoader parentClassLoader=null;
    if (StringUtils.isNotEmpty(parentKey)) {
      parentClassLoader=getClassLoader(parentKey,showDownloadIfNotExist);
    }
    if (parentClassLoader == null) {
      parentClassLoader=parentLoader;
    }
    DynamicClassLoader classLoader=null;
    if (parentClassLoader == null) {
      classLoader=new DynamicClassLoader();
    }
 else {
      classLoader=new DynamicClassLoader(parentClassLoader);
    }
    boolean putInCache=true;
    String[] librariesArray=getLibs(current);
    if (librariesArray.length > 0) {
      putInCache=loadLibraries(classLoader,librariesArray,showDownloadIfNotExist);
    }
    if (putInCache) {
      getClassLoaderMap().put(index,classLoader);
    }
    return classLoader;
  }
  return null;
}
Program: 125308
Project: 125308
Buggy source:
private static boolean isCacheChanged(){
  if (configurationElements == null) {
    return true;
  }
  if (configurationElements != null) {
    for (    IConfigurationElement configElement : configurationElements) {
      if (!configElement.isValid()) {
        return true;
      }
    }
  }
  return false;
}

Fixed version (ground truth):
private static boolean isCacheChanged(){
  if (classLoadersMap == null) {
    return true;
  }
  if (configurationElements == null) {
    return true;
  }
  if (configurationElements != null) {
    for (    IConfigurationElement configElement : configurationElements) {
      if (!configElement.isValid()) {
        return true;
      }
    }
  }
  return false;
}