Program: 118905
Project: 118905
Buggy source:
private void addListeners(){
  runtimeButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent event){
      getRemoteStatus();
      if (lock && runtimeButton.getText().equals(Messages.getString("String_Node_Str"))) {
        MessageDialog.openWarning(getShell(),"String_Node_Str",Messages.getString("String_Node_Str"));
        return;
      }
      if (isCommandlineRun) {
        MessageDialog.openWarning(getShell(),"String_Node_Str",Messages.getString("String_Node_Str"));
        return;
      }
      if (isRemoteRun && !isRemoteMonitoring) {
        MessageDialog.openWarning(getShell(),"String_Node_Str",Messages.getString("String_Node_Str"));
        return;
      }
      if (processContext != null && !processContext.isRunning() && runtimeButton.getText().equals(Messages.getString("String_Node_Str"))) {
        runtimeButton.setEnabled(false);
        exec();
      }
      if (processContext != null && processContext.isRunning()) {
        if (runtimeButton.getText().equals(Messages.getString("String_Node_Str"))) {
          if (!acquireJVM()) {
            runtimeButton.setEnabled(true);
            MessageDialog.openWarning(getShell(),"String_Node_Str",Messages.getString("String_Node_Str"));
            return;
          }
          initMonitoringModel();
          refreshMonitorComposite();
          processContext.setMonitoring(true);
          setRuntimeButtonByStatus(false);
          if (periodCombo.isEnabled() && periodCombo.getSelectionIndex() != 0) {
            startCustomerGCSchedule();
          }
          String content=getExecutionInfo("String_Node_Str");
          messageManager.setStartMessage(content,getDisplay().getSystemColor(SWT.COLOR_BLUE),getDisplay().getSystemColor(SWT.COLOR_WHITE));
          ((RuntimeGraphcsComposite)chartComposite).displayReportField();
          lock=true;
        }
 else         if (runtimeButton.getText().equals(Messages.getString("String_Node_Str"))) {
          processContext.kill();
          disconnectJVM();
          processContext.setMonitoring(false);
          setRuntimeButtonByStatus(!processContext.isMonitoring());
          lock=false;
        }
      }
 else {
        MessageDialog.openWarning(getShell(),"String_Node_Str",Messages.getString("String_Node_Str"));
      }
      runtimeButton.setEnabled(true);
    }
  }
);
  gcCheckButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      isGCSelected=gcCheckButton.getSelection();
      periodCombo.setEnabled(isGCSelected);
      if (!isGCSelected) {
        periodCombo.select(0);
        if (processContext != null && processContext.isRunning()) {
          doScheduledGc(0);
        }
      }
    }
  }
);
  periodCombo.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      startCustomerGCSchedule();
    }
  }
);
  propertyChangeListener=new PropertyChangeListener(){
    @Override public void propertyChange(    PropertyChangeEvent evt){
      runProcessContextChanged(evt);
    }
  }
;
}

Fixed version (ground truth):
private void addListeners(){
  runtimeButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent event){
      getRemoteStatus();
      if (lock && runtimeButton.getText().equals(Messages.getString("String_Node_Str"))) {
        MessageDialog.openWarning(getShell(),"String_Node_Str",Messages.getString("String_Node_Str"));
        return;
      }
      if (isCommandlineRun) {
        MessageDialog.openWarning(getShell(),"String_Node_Str",Messages.getString("String_Node_Str"));
        return;
      }
      if (isRemoteRun && !isRemoteMonitoring) {
        MessageDialog.openWarning(getShell(),"String_Node_Str",Messages.getString("String_Node_Str"));
        return;
      }
      if (processContext != null && !processContext.isRunning() && runtimeButton.getText().equals(Messages.getString("String_Node_Str"))) {
        runtimeButton.setEnabled(false);
        exec();
      }
      if (processContext != null && processContext.isRunning()) {
        if (runtimeButton.getText().equals(Messages.getString("String_Node_Str"))) {
          if (!acquireJVM()) {
            runtimeButton.setEnabled(true);
            MessageDialog.openWarning(getShell(),"String_Node_Str",Messages.getString("String_Node_Str"));
            return;
          }
          initMonitoringModel();
          refreshMonitorComposite();
          processContext.setMonitoring(true);
          AbstractRuntimeGraphcsComposite.setMonitoring(true);
          setRuntimeButtonByStatus(false);
          if (periodCombo.isEnabled() && periodCombo.getSelectionIndex() != 0) {
            startCustomerGCSchedule();
          }
          String content=getExecutionInfo("String_Node_Str");
          messageManager.setStartMessage(content,getDisplay().getSystemColor(SWT.COLOR_BLUE),getDisplay().getSystemColor(SWT.COLOR_WHITE));
          ((RuntimeGraphcsComposite)chartComposite).displayReportField();
          lock=true;
        }
 else         if (runtimeButton.getText().equals(Messages.getString("String_Node_Str"))) {
          processContext.kill();
        }
      }
 else {
        MessageDialog.openWarning(getShell(),"String_Node_Str",Messages.getString("String_Node_Str"));
      }
      runtimeButton.setEnabled(true);
    }
  }
);
  gcCheckButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      isGCSelected=gcCheckButton.getSelection();
      periodCombo.setEnabled(isGCSelected);
      if (!isGCSelected) {
        periodCombo.select(0);
        if (processContext != null && processContext.isRunning()) {
          doScheduledGc(0);
        }
      }
    }
  }
);
  periodCombo.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      startCustomerGCSchedule();
    }
  }
);
  propertyChangeListener=new PropertyChangeListener(){
    @Override public void propertyChange(    PropertyChangeEvent evt){
      runProcessContextChanged(evt);
    }
  }
;
}