Program: 121815
Project: 121815
Buggy source:
private void addButtonListeners(){
  reloadBtn.addSelectionListener(new SelectionListener(){
    public void widgetSelected(    SelectionEvent e){
      onReloadButtonClick();
    }
    public void widgetDefaultSelected(    SelectionEvent e){
      widgetSelected(e);
    }
  }
);
  saveBtn.addSelectionListener(new SelectionListener(){
    public void widgetSelected(    SelectionEvent e){
      onSaveButtonClick();
    }
    public void widgetDefaultSelected(    SelectionEvent e){
      widgetSelected(e);
    }
  }
);
  if (hasRunJobNode(false) && needApplyToChildren()) {
    applyToChildrenJob.addSelectionListener(new SelectionListener(){
      public void widgetDefaultSelected(      SelectionEvent e){
      }
      public void widgetSelected(      SelectionEvent e){
        final ProgressDialog progress=new ProgressDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell()){
          public void run(          IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
            IWorkbenchPage activePage=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
            IEditorReference[] editorReferences=activePage.getEditorReferences();
            CorePlugin defaultPlugin=CorePlugin.getDefault();
            IDesignerCoreService designerCoreService=defaultPlugin.getDesignerCoreService();
            List<IProcess2> openedProcessList=designerCoreService.getOpenedProcess(RepositoryUpdateManager.getEditors());
            List<String> activeProcessId=new ArrayList<String>();
            for (            IProcess process : openedProcessList) {
              activeProcessId.add(process.getId());
            }
            final int rate=1 / openedProcessList.size() - activeProcessId.size();
            for (            INode runjobNode : tRunJobNodes) {
              String id=(String)runjobNode.getElementParameter(EParameterName.PROCESS_TYPE_PROCESS.getName()).getValue();
              String version=(String)runjobNode.getElementParameter(EParameterName.PROCESS_TYPE_VERSION.getName()).getValue();
              if ("String_Node_Str".equals(id) || id == null) {
                MessageDialog.openWarning(getShell(),Messages.getString("String_Node_Str",runjobNode.getUniqueName()),Messages.getString("String_Node_Str",runjobNode.getUniqueName()));
                return;
              }
              if (activeProcessId.contains(id)) {
                IEditorPart activeEditorPart=activePage.getActiveEditor();
                for (                IEditorReference editorReference : editorReferences) {
                  IEditorPart editorPart=editorReference.getEditor(false);
                  if ((editorPart != activeEditorPart) && (editorPart instanceof MultiPageTalendEditor)) {
                    IElement element=((MultiPageTalendEditor)editorPart).getProcess();
                    StatsAndLogsViewHelper.applySettings(elem,element,AbstractPreferenceComposite.this);
                  }
                }
              }
 else {
                try {
                  SubProgressMonitor subMonitor=new SubProgressMonitor(monitor,1 * UpdatesConstants.SCALE,SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK);
                  subMonitor.beginTask(UpdatesConstants.EMPTY,1 * rate);
                  IRepositoryViewObject lastVersion=DesignerPlugin.getDefault().getProxyRepositoryFactory().getLastVersion(id);
                  if (lastVersion != null) {
                    Item item=lastVersion.getProperty().getItem();
                    IProcess processFromItem=designerCoreService.getProcessFromItem(item);
                    if (processFromItem instanceof Process) {
                      Process process=(Process)processFromItem;
                      StatsAndLogsViewHelper.applySettings(elem,process,AbstractPreferenceComposite.this);
                      IProxyRepositoryFactory factory=defaultPlugin.getProxyRepositoryFactory();
                      Property property=factory.getUptodateProperty(process.getProperty());
                      process.setProperty(property);
                      subMonitor.subTask(RepositoryUpdateManager.getUpdateJobInfor(process.getProperty()));
                      ProcessType processType=process.saveXmlFile();
                      Item item2=process.getProperty().getItem();
                      if (item2 instanceof JobletProcessItem) {
                        ((JobletProcessItem)item2).setJobletProcess((JobletProcess)processType);
                      }
 else {
                        ((ProcessItem)item2).setProcess(processType);
                      }
                      factory.save(item2);
                      subMonitor.done();
                    }
                  }
                }
 catch (                PersistenceException e1) {
                  e1.printStackTrace();
                }
catch (                IOException e2) {
                  e2.printStackTrace();
                }
              }
              applySettingsToSubJob(id,version);
            }
          }
        }
;
        try {
          progress.executeProcess();
        }
 catch (        InvocationTargetException e1) {
          e1.printStackTrace();
        }
catch (        InterruptedException e1) {
          e1.printStackTrace();
        }
      }
      /** 
 * yzhang Comment method "applySettingsToSubJob".
 * @param id
 * @param version
 */
      private void applySettingsToSubJob(      String id,      String version){
        ProcessType processType=ItemCacheManager.getProcessItem(id,version).getProcess();
        EList<ElementParameterType> parameters=processType.getParameters().getElementParameter();
        StatsAndLogsViewHelper.applySettings(parameters,elem);
        List<NodeType> nodes=findRunJobNode(processType.getNode());
        for (        NodeType nodeType : nodes) {
          EList<ElementParameterType> list=nodeType.getElementParameter();
          ElementParameterType idParam=getElementParameterType(list,PROCESS + "String_Node_Str" + EParameterName.PROCESS_TYPE_PROCESS.getName());
          ElementParameterType versionParam=getElementParameterType(list,PROCESS + "String_Node_Str" + EParameterName.PROCESS_TYPE_VERSION.getName());
          String subId=idParam.getValue();
          String subVersion=versionParam.getValue();
          applySettingsToSubJob(subId,subVersion);
        }
      }
    }
);
  }
}

Fixed version (ground truth):
private void addButtonListeners(){
  reloadBtn.addSelectionListener(new SelectionListener(){
    @Override public void widgetSelected(    SelectionEvent e){
      onReloadButtonClick();
    }
    @Override public void widgetDefaultSelected(    SelectionEvent e){
      widgetSelected(e);
    }
  }
);
  saveBtn.addSelectionListener(new SelectionListener(){
    @Override public void widgetSelected(    SelectionEvent e){
      onSaveButtonClick();
    }
    @Override public void widgetDefaultSelected(    SelectionEvent e){
      widgetSelected(e);
    }
  }
);
  if (hasRunJobNode(false) && needApplyToChildren()) {
    applyToChildrenJob.addSelectionListener(new SelectionListener(){
      @Override public void widgetDefaultSelected(      SelectionEvent e){
      }
      @Override public void widgetSelected(      SelectionEvent e){
        final ProgressDialog progress=new ProgressDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell()){
          @Override public void run(          IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
            IWorkbenchPage activePage=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
            IEditorReference[] editorReferences=activePage.getEditorReferences();
            CorePlugin defaultPlugin=CorePlugin.getDefault();
            IDesignerCoreService designerCoreService=defaultPlugin.getDesignerCoreService();
            List<IProcess2> openedProcessList=designerCoreService.getOpenedProcess(RepositoryUpdateManager.getEditors());
            List<String> activeProcessId=new ArrayList<String>();
            for (            IProcess process : openedProcessList) {
              activeProcessId.add(process.getId());
            }
            final int rate=1 / openedProcessList.size() - activeProcessId.size();
            for (            INode runjobNode : tRunJobNodes) {
              String id=(String)runjobNode.getElementParameter(EParameterName.PROCESS_TYPE_PROCESS.getName()).getValue();
              String version=(String)runjobNode.getElementParameter(EParameterName.PROCESS_TYPE_VERSION.getName()).getValue();
              if ("String_Node_Str".equals(id) || id == null) {
                MessageDialog.openWarning(getShell(),Messages.getString("String_Node_Str",runjobNode.getUniqueName()),Messages.getString("String_Node_Str",runjobNode.getUniqueName()));
                return;
              }
              if (activeProcessId.contains(id)) {
                IEditorPart activeEditorPart=activePage.getActiveEditor();
                for (                IEditorReference editorReference : editorReferences) {
                  IEditorPart editorPart=editorReference.getEditor(false);
                  if ((editorPart != activeEditorPart) && (editorPart instanceof MultiPageTalendEditor)) {
                    IElement element=((MultiPageTalendEditor)editorPart).getProcess();
                    StatsAndLogsViewHelper.applySettings(elem,element,AbstractPreferenceComposite.this);
                  }
                }
              }
 else {
                try {
                  SubProgressMonitor subMonitor=new SubProgressMonitor(monitor,1 * UpdatesConstants.SCALE,SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK);
                  subMonitor.beginTask(UpdatesConstants.EMPTY,1 * rate);
                  IRepositoryViewObject lastVersion=DesignerPlugin.getDefault().getProxyRepositoryFactory().getLastVersion(id);
                  if (lastVersion != null) {
                    Item item=lastVersion.getProperty().getItem();
                    IProcess processFromItem=designerCoreService.getProcessFromItem(item);
                    if (processFromItem instanceof Process) {
                      Process process=(Process)processFromItem;
                      StatsAndLogsViewHelper.applySettings(elem,process,AbstractPreferenceComposite.this);
                      IProxyRepositoryFactory factory=defaultPlugin.getProxyRepositoryFactory();
                      Property property=factory.getUptodateProperty(process.getProperty());
                      process.setProperty(property);
                      subMonitor.subTask(RepositoryUpdateManager.getUpdateJobInfor(process.getProperty()));
                      ProcessType processType=process.saveXmlFile();
                      Item item2=process.getProperty().getItem();
                      if (item2 instanceof JobletProcessItem) {
                        ((JobletProcessItem)item2).setJobletProcess((JobletProcess)processType);
                      }
 else {
                        ((ProcessItem)item2).setProcess(processType);
                      }
                      factory.save(item2);
                      subMonitor.done();
                    }
                  }
                }
 catch (                PersistenceException e1) {
                  e1.printStackTrace();
                }
catch (                IOException e2) {
                  e2.printStackTrace();
                }
              }
              applySettingsToSubJob(id,version);
            }
          }
        }
;
        try {
          progress.executeProcess();
        }
 catch (        InvocationTargetException e1) {
          e1.printStackTrace();
        }
catch (        InterruptedException e1) {
          e1.printStackTrace();
        }
      }
      /** 
 * yzhang Comment method "applySettingsToSubJob".
 * @param id
 * @param version
 */
      private void applySettingsToSubJob(      String id,      String version){
        ProcessType processType=ItemCacheManager.getProcessItem(id,version).getProcess();
        EList<ElementParameterType> parameters=processType.getParameters().getElementParameter();
        StatsAndLogsViewHelper.applySettings(parameters,elem);
        List<NodeType> nodes=findRunJobNode(processType.getNode());
        for (        NodeType nodeType : nodes) {
          EList<ElementParameterType> list=nodeType.getElementParameter();
          ElementParameterType idParam=getElementParameterType(list,PROCESS + "String_Node_Str" + EParameterName.PROCESS_TYPE_PROCESS.getName());
          ElementParameterType versionParam=getElementParameterType(list,PROCESS + "String_Node_Str" + EParameterName.PROCESS_TYPE_VERSION.getName());
          String subId=idParam.getValue();
          String subVersion=versionParam.getValue();
          applySettingsToSubJob(subId,subVersion);
        }
      }
    }
);
  }
}