Program: 118418
Project: 118418
Buggy source:
public static void checkLastGenerationHasCompilationError(boolean updateProblemsView) throws ProcessorException {
  if (updateProblemsView && CommonsPlugin.isHeadless()) {
    updateProblemsView=false;
  }
  boolean hasError=false;
  boolean isJob=true;
  Item item=null;
  final IProxyRepositoryFactory proxyRepositoryFactory=CorePlugin.getDefault().getRepositoryService().getProxyRepositoryFactory();
  final ITalendSynchronizer synchronizer=CorePlugin.getDefault().getCodeGeneratorService().createRoutineSynchronizer();
  Integer line=null;
  String errorMessage=null;
  try {
    for (    JobInfo jobInfo : LastGenerationInfo.getInstance().getLastGeneratedjobs()) {
      if (jobInfo.isTestContainer()) {
        continue;
      }
      item=null;
      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 file=synchronizer.getFile(item);
      if (file == null) {
        return;
      }
      final IResource[] members=file.getParent().members();
      for (      IResource member : members) {
        if (member instanceof IFile && "String_Node_Str".equals(member.getFileExtension())) {
          IMarker[] markers=((IFile)member).findMarkers(IMarker.PROBLEM,true,IResource.DEPTH_ONE);
          for (          IMarker marker : markers) {
            Integer lineNr=(Integer)marker.getAttribute(IMarker.LINE_NUMBER);
            String message=(String)marker.getAttribute(IMarker.MESSAGE);
            Integer severity=(Integer)marker.getAttribute(IMarker.SEVERITY);
            Integer start=(Integer)marker.getAttribute(IMarker.CHAR_START);
            Integer end=(Integer)marker.getAttribute(IMarker.CHAR_END);
            if (lineNr != null && message != null && severity != null && start != null && end != null) {
switch (severity) {
case IMarker.SEVERITY_ERROR:
                hasError=true;
              line=lineNr;
            errorMessage=message;
          break;
default :
        break;
    }
  }
}
}
}
if (updateProblemsView) {
Problems.addRoutineFile(file,ProblemType.JOB,item.getProperty().getLabel(),item.getProperty().getVersion(),true);
}
if (hasError) {
break;
}
}
}
 catch (Exception e) {
ExceptionHandler.process(e);
}
if (hasError && item != null) {
if (isJob) {
throw new ProcessorException(Messages.getString("String_Node_Str") + '\n' + Messages.getString("String_Node_Str",item.getProperty().getLabel())+ '\n'+ Messages.getString("String_Node_Str")+ ':'+ ' '+ line+ '\n'+ Messages.getString("String_Node_Str")+ ':'+ ' '+ errorMessage+ '\n'+ Messages.getString("String_Node_Str"));
}
 else {
throw new ProcessorException(Messages.getString("String_Node_Str") + '\n' + Messages.getString("String_Node_Str",item.getProperty().getLabel())+ '\n'+ Messages.getString("String_Node_Str")+ ':'+ ' '+ line+ '\n'+ Messages.getString("String_Node_Str")+ ':'+ ' '+ errorMessage+ '\n'+ Messages.getString("String_Node_Str"));
}
}
}

Fixed version (ground truth):
public static void checkLastGenerationHasCompilationError(boolean updateProblemsView) throws ProcessorException {
  if (updateProblemsView && CommonsPlugin.isHeadless()) {
    updateProblemsView=false;
  }
  boolean hasError=false;
  boolean isJob=true;
  Item item=null;
  final IProxyRepositoryFactory proxyRepositoryFactory=CorePlugin.getDefault().getRepositoryService().getProxyRepositoryFactory();
  final ITalendSynchronizer synchronizer=CorePlugin.getDefault().getCodeGeneratorService().createRoutineSynchronizer();
  Integer line=null;
  String errorMessage=null;
  try {
    for (    JobInfo jobInfo : LastGenerationInfo.getInstance().getLastGeneratedjobs()) {
      if (jobInfo.isTestContainer()) {
        continue;
      }
      item=null;
      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 file=synchronizer.getFile(item);
      if (file == null) {
        return;
      }
      final IResource[] members=file.getParent().members();
      for (      IResource member : members) {
        if (member instanceof IFile && "String_Node_Str".equals(member.getFileExtension())) {
          IMarker[] markers=((IFile)member).findMarkers(IMarker.PROBLEM,true,IResource.DEPTH_ONE);
          for (          IMarker marker : markers) {
            Integer lineNr=(Integer)marker.getAttribute(IMarker.LINE_NUMBER);
            String message=(String)marker.getAttribute(IMarker.MESSAGE);
            Integer severity=(Integer)marker.getAttribute(IMarker.SEVERITY);
            Integer start=(Integer)marker.getAttribute(IMarker.CHAR_START);
            Integer end=(Integer)marker.getAttribute(IMarker.CHAR_END);
            if (lineNr != null && message != null && severity != null && start != null && end != null) {
switch (severity) {
case IMarker.SEVERITY_ERROR:
                hasError=true;
              line=lineNr;
            errorMessage=message;
          break;
default :
        break;
    }
  }
}
}
}
if (updateProblemsView) {
Problems.addRoutineFile(file,ProblemType.JOB,item.getProperty().getLabel(),item.getProperty().getVersion(),true);
}
if (hasError) {
break;
}
}
}
 catch (Exception e) {
ExceptionHandler.process(e);
}
if (hasError && item != null) {
if (isJob) {
throw new ProcessorException(Messages.getString("String_Node_Str") + "String_Node_Str" + '\n'+ Messages.getString("String_Node_Str",item.getProperty().getLabel())+ '\n'+ Messages.getString("String_Node_Str")+ ':'+ ' '+ line+ '\n'+ Messages.getString("String_Node_Str")+ ':'+ ' '+ errorMessage+ '\n'+ Messages.getString("String_Node_Str"));
}
 else {
throw new ProcessorException(Messages.getString("String_Node_Str") + "String_Node_Str" + '\n'+ Messages.getString("String_Node_Str",item.getProperty().getLabel())+ '\n'+ Messages.getString("String_Node_Str")+ ':'+ ' '+ line+ '\n'+ Messages.getString("String_Node_Str")+ ':'+ ' '+ errorMessage+ '\n'+ Messages.getString("String_Node_Str"));
}
}
}