Program: 126814
Project: 126814
Buggy source:
private List<UpdateResult> updateAllProcess(IProgressMonitor parentMonitor,List<UpdateResult> resultList,List<IProcess2> openedProcessList,final Set<EUpdateItemType> types,final boolean onlySimpleShow){
  IProxyRepositoryFactory factory=CoreRuntimePlugin.getInstance().getProxyRepositoryFactory();
  if (factory == null) {
    return resultList;
  }
  IDesignerCoreService designerCoreService=CoreRuntimePlugin.getInstance().getDesignerCoreService();
  if (designerCoreService == null) {
    return resultList;
  }
  List<IRepositoryViewObject> processRep=new ArrayList<IRepositoryViewObject>();
  List<IProcess> processList=new ArrayList<IProcess>();
  try {
    ERepositoryObjectType jobType=ERepositoryObjectType.PROCESS;
    if (jobType != null) {
      processRep.addAll(factory.getAll(jobType,true));
    }
    ERepositoryObjectType jobletType=ERepositoryObjectType.JOBLET;
    if (jobletType != null) {
      processRep.addAll(factory.getAll(jobletType,true));
    }
    for (    IRepositoryViewObject obj : processRep) {
      Item item=obj.getProperty().getItem();
      IProcess process=null;
      if (item instanceof ProcessItem) {
        process=designerCoreService.getProcessFromProcessItem((ProcessItem)item);
      }
 else       if (item instanceof JobletProcessItem) {
        process=designerCoreService.getProcessFromJobletProcessItem((JobletProcessItem)item);
      }
      processList.add(process);
    }
  }
 catch (  PersistenceException e) {
    ExceptionHandler.process(e);
  }
  for (  IProcess process : processList) {
    if (process instanceof IProcess2) {
      IProcess2 ip2=(IProcess2)process;
      boolean found=false;
      for (      IProcess2 open : openedProcessList) {
        if (open.getId().equals(ip2.getId())) {
          found=true;
        }
      }
      if (found) {
        continue;
      }
      checkMonitorCanceled(parentMonitor);
      parentMonitor.subTask(getUpdateJobInfor(ip2.getProperty()));
      List<UpdateResult> resultFromProcess=getUpdatesNeededFromItems(parentMonitor,((IProcess2)process).getProperty().getItem(),types,onlySimpleShow);
      if (resultFromProcess != null) {
        resultList.addAll(resultFromProcess);
      }
      parentMonitor.worked(1);
    }
  }
  return resultList;
}

Fixed version (ground truth):
private List<UpdateResult> updateAllProcess(IProgressMonitor parentMonitor,List<UpdateResult> resultList,List<IProcess2> openedProcessList,final Set<EUpdateItemType> types,final boolean onlySimpleShow){
  IProxyRepositoryFactory factory=CoreRuntimePlugin.getInstance().getProxyRepositoryFactory();
  if (factory == null) {
    return resultList;
  }
  IDesignerCoreService designerCoreService=CoreRuntimePlugin.getInstance().getDesignerCoreService();
  if (designerCoreService == null) {
    return resultList;
  }
  List<IRepositoryViewObject> processRep=new ArrayList<IRepositoryViewObject>();
  List<IProcess> processList=new ArrayList<IProcess>();
  try {
    ERepositoryObjectType jobType=ERepositoryObjectType.PROCESS;
    if (jobType != null) {
      processRep.addAll(factory.getAll(jobType,true));
    }
    ERepositoryObjectType jobletType=ERepositoryObjectType.JOBLET;
    if (jobletType != null) {
      processRep.addAll(factory.getAll(jobletType,true));
    }
  }
 catch (  PersistenceException e) {
    ExceptionHandler.process(e);
  }
  for (  IRepositoryViewObject process : processRep) {
    Item item=process.getProperty().getItem();
    boolean found=false;
    for (    IProcess2 open : openedProcessList) {
      if (open.getId().equals(item.getProperty().getId())) {
        found=true;
      }
    }
    if (found) {
      continue;
    }
    checkMonitorCanceled(parentMonitor);
    parentMonitor.subTask(getUpdateJobInfor(item.getProperty()));
    List<UpdateResult> resultFromProcess=getUpdatesNeededFromItems(parentMonitor,item,types,onlySimpleShow);
    if (resultFromProcess != null) {
      resultList.addAll(resultFromProcess);
    }
    parentMonitor.worked(1);
  }
  return resultList;
}