Program: 141662
Project: 141662
Buggy source:
public void deploy() throws Exception {
  File target=null;
  IRepositoryViewObject viewObject=findJob(process.getId());
  RepositoryNode node=new RepositoryNode(viewObject,null,ENodeType.REPOSITORY_ELEMENT);
  ProcessItem processItem=(ProcessItem)node.getObject().getProperty().getItem();
  monitor.setTaskName("String_Node_Str");
  if (ComponentCategory.CATEGORY_4_DI.getName().equals(process.getComponentsType())) {
    if (EmfModelUtils.getComponentByName(processItem,"String_Node_Str") != null) {
      List<Item> items=new ArrayList<Item>(1);
      items.add(processItem);
      Collection<IRepositoryViewObject> allDependencies=ProcessUtils.getProcessDependencies(ERepositoryObjectType.METADATA,items,false);
      if (!allDependencies.isEmpty()) {
        target=File.createTempFile("String_Node_Str",FileConstants.KAR_FILE_SUFFIX,null);
        for (        IRepositoryViewObject object : allDependencies) {
          if (object.getProperty().getItem() != null && object.getProperty().getItem() instanceof ServiceItem) {
            ServiceItem serviceItem=(ServiceItem)object.getProperty().getItem();
            ExportServiceAction action=new ExportServiceAction(serviceItem,target.getAbsolutePath(),null,new ServiceExportForESBRuntimeManager(null,statisticsPort,tracePort));
            action.run(monitor);
            kars=JMXUtil.installKar(target);
          }
        }
      }
    }
 else {
      target=File.createTempFile("String_Node_Str",FileConstants.JAR_FILE_SUFFIX,null);
      JobScriptsManager jobScriptsManager=new JobJavaScriptOSGIForESBRuntimeManager(JobScriptsManagerFactory.getDefaultExportChoiceMap(),processItem.getProcess().getDefaultContext(),JobScriptsManager.LAUNCHER_ALL,statisticsPort,tracePort);
      jobScriptsManager.setDestinationPath(target.getAbsolutePath());
      JobExportAction jobAction=new JobExportAction(Collections.singletonList(node),node.getObject().getProperty().getVersion(),node.getObject().getProperty().getVersion(),jobScriptsManager,System.getProperty("String_Node_Str"));
      jobAction.run(monitor);
      if (jobAction.isBuildSuccessful()) {
        bundles=JMXUtil.installBundle(target);
      }
    }
  }
 else   if (ComponentCategory.CATEGORY_4_CAMEL.getName().equals(process.getComponentsType())) {
    target=File.createTempFile("String_Node_Str",FileConstants.KAR_FILE_SUFFIX,null);
    JavaCamelJobScriptsExportWSAction camelAction=new JavaCamelJobScriptsExportWSAction(node,process.getVersion(),target.getAbsolutePath(),true,statisticsPort,tracePort);
    camelAction.run(monitor);
    kars=JMXUtil.installKar(target);
  }
  if (target != null && target.exists()) {
    target.delete();
  }
}

Fixed version (ground truth):
public void deploy() throws Exception {
  File target=null;
  IRepositoryViewObject viewObject=findJob(process.getId());
  RepositoryNode node=new RepositoryNode(viewObject,null,ENodeType.REPOSITORY_ELEMENT);
  ProcessItem processItem=(ProcessItem)node.getObject().getProperty().getItem();
  String configID=node.getObject().getLabel();
  monitor.setTaskName("String_Node_Str");
  if (ComponentCategory.CATEGORY_4_DI.getName().equals(process.getComponentsType())) {
    if (EmfModelUtils.getComponentByName(processItem,"String_Node_Str") != null) {
      List<Item> items=new ArrayList<Item>(1);
      items.add(processItem);
      Collection<IRepositoryViewObject> allDependencies=ProcessUtils.getProcessDependencies(ERepositoryObjectType.METADATA,items,false);
      if (!allDependencies.isEmpty()) {
        target=File.createTempFile("String_Node_Str",FileConstants.KAR_FILE_SUFFIX,null);
        for (        IRepositoryViewObject object : allDependencies) {
          if (object.getProperty().getItem() != null && object.getProperty().getItem() instanceof ServiceItem) {
            ServiceItem serviceItem=(ServiceItem)object.getProperty().getItem();
            ExportServiceAction action=new ExportServiceAction(serviceItem,target.getAbsolutePath(),null,new ServiceExportForESBRuntimeManager(null,statisticsPort,tracePort));
            action.run(monitor);
            applyContextConfiguration(configID);
            kars=JMXUtil.installKar(target);
          }
        }
      }
    }
 else {
      target=File.createTempFile("String_Node_Str",FileConstants.JAR_FILE_SUFFIX,null);
      JobScriptsManager jobScriptsManager=new JobJavaScriptOSGIForESBRuntimeManager(JobScriptsManagerFactory.getDefaultExportChoiceMap(),processItem.getProcess().getDefaultContext(),JobScriptsManager.LAUNCHER_ALL,statisticsPort,tracePort);
      jobScriptsManager.setDestinationPath(target.getAbsolutePath());
      JobExportAction jobAction=new JobExportAction(Collections.singletonList(node),node.getObject().getProperty().getVersion(),node.getObject().getProperty().getVersion(),jobScriptsManager,System.getProperty("String_Node_Str"));
      jobAction.run(monitor);
      if (jobAction.isBuildSuccessful()) {
        applyContextConfiguration(configID);
        bundles=JMXUtil.installBundle(target);
      }
    }
  }
 else   if (ComponentCategory.CATEGORY_4_CAMEL.getName().equals(process.getComponentsType())) {
    target=File.createTempFile("String_Node_Str",FileConstants.KAR_FILE_SUFFIX,null);
    JavaCamelJobScriptsExportWSAction camelAction=new JavaCamelJobScriptsExportWSAction(node,process.getVersion(),target.getAbsolutePath(),true,statisticsPort,tracePort);
    camelAction.run(monitor);
    applyContextConfiguration(configID);
    kars=JMXUtil.installKar(target);
  }
  if (target != null && target.exists()) {
    target.delete();
  }
}