Program: 120372
Project: 120372
Buggy source:
private void runProcessContextChanged(final PropertyChangeEvent evt){
  if (isDisposed()) {
    return;
  }
  String propName=evt.getPropertyName();
  if (ProcessMessageManager.PROP_MESSAGE_ADD.equals(propName) || ProcessMessageManager.PROP_DEBUG_MESSAGE_ADD.equals(propName)) {
    IProcessMessage psMess=(IProcessMessage)evt.getNewValue();
    if (errorMessMap.size() <= CorePlugin.getDefault().getPreferenceStore().getInt(ITalendCorePrefConstants.PREVIEW_LIMIT)) {
      if (!(LanguageManager.getCurrentLanguage().equals(ECodeLanguage.PERL))) {
        getAllErrorMess(psMess);
      }
 else {
        addPerlMark(psMess);
      }
    }
    appendToConsole(psMess);
  }
 else   if (ProcessMessageManager.PROP_MESSAGE_CLEAR.equals(propName)) {
    getDisplay().asyncExec(new Runnable(){
      @Override public void run(){
        if (!consoleText.isDisposed()) {
          consoleText.setText("String_Node_Str");
        }
      }
    }
);
  }
 else   if (RunProcessContext.PROP_MONITOR.equals(propName)) {
  }
 else   if (RunProcessContext.TRACE_MONITOR.equals(propName)) {
  }
 else   if (RunProcessContext.PROP_RUNNING.equals(propName)) {
    getDisplay().asyncExec(new Runnable(){
      @Override public void run(){
        if (isDisposed()) {
          return;
        }
        boolean running=((Boolean)evt.getNewValue()).booleanValue();
        setRunnable(!running);
        killBtn.setEnabled(running);
        doAppendToConsole(messagesToDisplay);
        scrollToEnd();
        messagesToDisplay.clear();
        setConsoleReady(true);
      }
    }
);
  }
}

Fixed version (ground truth):
private void runProcessContextChanged(final PropertyChangeEvent evt){
  if (isDisposed()) {
    return;
  }
  String propName=evt.getPropertyName();
  if (ProcessMessageManager.UPDATE_CONSOLE.equals(propName)) {
    processNextMessage();
  }
 else   if (ProcessMessageManager.PROP_MESSAGE_ADD.equals(propName) || ProcessMessageManager.PROP_DEBUG_MESSAGE_ADD.equals(propName)) {
    IProcessMessage psMess=(IProcessMessage)evt.getNewValue();
    if (errorMessMap.size() <= CorePlugin.getDefault().getPreferenceStore().getInt(ITalendCorePrefConstants.PREVIEW_LIMIT)) {
      if (!(LanguageManager.getCurrentLanguage().equals(ECodeLanguage.PERL))) {
        getAllErrorMess(psMess);
      }
 else {
        addPerlMark(psMess);
      }
    }
    appendToConsole(psMess);
  }
 else   if (ProcessMessageManager.PROP_MESSAGE_CLEAR.equals(propName)) {
    newMessages.clear();
    messagesToDisplay.clear();
    getDisplay().asyncExec(new Runnable(){
      @Override public void run(){
        if (!consoleText.isDisposed()) {
          consoleText.setText("String_Node_Str");
        }
      }
    }
);
  }
 else   if (RunProcessContext.PROP_MONITOR.equals(propName)) {
  }
 else   if (RunProcessContext.TRACE_MONITOR.equals(propName)) {
  }
 else   if (RunProcessContext.PROP_RUNNING.equals(propName)) {
    getDisplay().asyncExec(new Runnable(){
      @Override public void run(){
        if (isDisposed()) {
          return;
        }
        boolean running=((Boolean)evt.getNewValue()).booleanValue();
        setRunnable(!running);
        killBtn.setEnabled(running);
        while (!newMessages.isEmpty()) {
          messagesToDisplay.add(newMessages.poll());
        }
        doAppendToConsole(messagesToDisplay);
        scrollToEnd();
        messagesToDisplay.clear();
      }
    }
);
  }
}