Program: 117853
Project: 117853
Buggy source:
public static List<IContainerEntry> getErrors(){
  List<IContainerEntry> input=new ArrayList<IContainerEntry>();
  try {
    Item item=null;
    IProxyRepositoryFactory proxyRepositoryFactory=CorePlugin.getDefault().getRepositoryService().getProxyRepositoryFactory();
    ITalendSynchronizer synchronizer=CorePlugin.getDefault().getCodeGeneratorService().createRoutineSynchronizer();
    Set<String> jobIds=new HashSet<String>();
    for (    JobInfo jobInfo : LastGenerationInfo.getInstance().getLastGeneratedjobs()) {
      List<IRepositoryViewObject> allVersions=proxyRepositoryFactory.getAllVersion(jobInfo.getJobId());
      for (      IRepositoryViewObject repositoryObject2 : allVersions) {
        Property property2=repositoryObject2.getProperty();
        if (jobInfo.getJobVersion().equals(property2.getVersion())) {
          item=property2.getItem();
          break;
        }
      }
      if (item == null) {
        continue;
      }
      IFile sourceFile=synchronizer.getFile(item);
      if (sourceFile == null) {
        continue;
      }
      jobIds.add(item.getProperty().getId());
      Problems.addJobRoutineFile(sourceFile,ProblemType.JOB,item,true);
    }
    if (!CommonsPlugin.isHeadless()) {
      List<IRepositoryViewObject> routinesObjects=proxyRepositoryFactory.getAll(ERepositoryObjectType.ROUTINES,false);
      Set<String> dependentRoutines=LastGenerationInfo.getInstance().getRoutinesNeededWithSubjobPerJob(LastGenerationInfo.getInstance().getLastMainJob().getJobId(),LastGenerationInfo.getInstance().getLastMainJob().getJobVersion());
      if (routinesObjects != null) {
        for (        IRepositoryViewObject obj : routinesObjects) {
          Property property=obj.getProperty();
          if (dependentRoutines.contains(property.getLabel())) {
            Item routinesitem=property.getItem();
            IFile routineFile=synchronizer.getFile(routinesitem);
            Problems.addJobRoutineFile(routineFile,ProblemType.ROUTINE,routinesitem,true);
          }
 else {
            Problems.clearAllComliationError(property.getLabel());
          }
        }
      }
    }
    Problems.refreshProblemTreeView();
    List<Problem> errors=Problems.getProblemList().getProblemsBySeverity(ProblemStatus.ERROR);
    ErrorDetailTreeBuilder builder=new ErrorDetailTreeBuilder();
    input.addAll(builder.createTreeInput(errors,jobIds));
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
  return input;
}

Fixed version (ground truth):
public static List<IContainerEntry> getErrors(){
  List<IContainerEntry> input=new ArrayList<IContainerEntry>();
  try {
    Item item=null;
    IProxyRepositoryFactory proxyRepositoryFactory=CorePlugin.getDefault().getRepositoryService().getProxyRepositoryFactory();
    ITalendSynchronizer synchronizer=CorePlugin.getDefault().getCodeGeneratorService().createRoutineSynchronizer();
    Set<String> jobIds=new HashSet<String>();
    HashSet<JobInfo> jobInfos=new HashSet<>();
    jobInfos.add(LastGenerationInfo.getInstance().getLastMainJob());
    for (    JobInfo jobInfo : jobInfos) {
      List<IRepositoryViewObject> allVersions=proxyRepositoryFactory.getAllVersion(jobInfo.getJobId());
      for (      IRepositoryViewObject repositoryObject2 : allVersions) {
        Property property2=repositoryObject2.getProperty();
        if (jobInfo.getJobVersion().equals(property2.getVersion())) {
          item=property2.getItem();
          break;
        }
      }
      if (item == null) {
        continue;
      }
      IFile sourceFile=synchronizer.getFile(item);
      if (sourceFile == null) {
        continue;
      }
      jobIds.add(item.getProperty().getId());
      Problems.addJobRoutineFile(sourceFile,ProblemType.JOB,item,true);
    }
    if (!CommonsPlugin.isHeadless()) {
      List<IRepositoryViewObject> routinesObjects=proxyRepositoryFactory.getAll(ERepositoryObjectType.ROUTINES,false);
      Set<String> dependentRoutines=LastGenerationInfo.getInstance().getRoutinesNeededWithSubjobPerJob(LastGenerationInfo.getInstance().getLastMainJob().getJobId(),LastGenerationInfo.getInstance().getLastMainJob().getJobVersion());
      if (routinesObjects != null) {
        for (        IRepositoryViewObject obj : routinesObjects) {
          Property property=obj.getProperty();
          if (dependentRoutines.contains(property.getLabel())) {
            Item routinesitem=property.getItem();
            IFile routineFile=synchronizer.getFile(routinesitem);
            Problems.addJobRoutineFile(routineFile,ProblemType.ROUTINE,routinesitem,true);
          }
 else {
            Problems.clearAllComliationError(property.getLabel());
          }
        }
      }
    }
    Problems.refreshProblemTreeView();
    List<Problem> errors=Problems.getProblemList().getProblemsBySeverity(ProblemStatus.ERROR);
    ErrorDetailTreeBuilder builder=new ErrorDetailTreeBuilder();
    input.addAll(builder.createTreeInput(errors,jobIds));
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
  return input;
}