Program: 94925
Project: 94925
Buggy source:
private void append(ID fromID,String body){
  if (!isFirstMessage) {
    chatText.append(Text.DELIMITER);
  }
  int length=chatText.getCharCount();
  String name=getUserName(fromID);
  if (fromID.equals(remoteID)) {
    if (showTimestamps) {
      chatText.append(FORMATTER.format(new Date(System.currentTimeMillis())) + ' ');
      chatText.setStyleRange(new StyleRange(length,13,redColor,null));
      length=chatText.getCharCount();
    }
    chatText.append(name + "String_Node_Str" + body);
    chatText.setStyleRange(new StyleRange(length,name.length() + 1,redColor,null,SWT.BOLD));
    setContentDescription("String_Node_Str");
    if (isFirstMessage) {
      final MessageNotificationPopup popup=new MessageNotificationPopup(getSite().getWorkbenchWindow(),tabFolder.getShell(),remoteID);
      popup.setContent(name,body);
      popup.open();
      new UIJob(tabFolder.getDisplay(),"String_Node_Str"){
        public IStatus runInUIThread(        IProgressMonitor monitor){
          Shell shell=popup.getShell();
          if (shell != null && !shell.isDisposed()) {
            popup.close();
          }
          return Status.OK_STATUS;
        }
      }
.schedule(5000);
    }
  }
 else {
    if (showTimestamps) {
      chatText.append(FORMATTER.format(new Date(System.currentTimeMillis())) + ' ');
      chatText.setStyleRange(new StyleRange(length,13,blueColor,null));
      length=chatText.getCharCount();
    }
    chatText.append(name + "String_Node_Str" + body);
    chatText.setStyleRange(new StyleRange(length,name.length() + 1,blueColor,null,SWT.BOLD));
  }
  isFirstMessage=false;
  chatText.invokeAction(ST.PAGE_DOWN);
}

Fixed version (ground truth):
private void append(ID fromID,String body){
  boolean scrollToEnd=shouldScrollToEnd(chatText);
  if (!isFirstMessage) {
    chatText.append(Text.DELIMITER);
  }
  int length=chatText.getCharCount();
  String name=getUserName(fromID);
  if (fromID.equals(remoteID)) {
    if (showTimestamps) {
      chatText.append(FORMATTER.format(new Date(System.currentTimeMillis())) + ' ');
      chatText.setStyleRange(new StyleRange(length,13,redColor,null));
      length=chatText.getCharCount();
    }
    chatText.append(name + "String_Node_Str" + body);
    chatText.setStyleRange(new StyleRange(length,name.length() + 1,redColor,null,SWT.BOLD));
    setContentDescription("String_Node_Str");
    if (isFirstMessage) {
      final MessageNotificationPopup popup=new MessageNotificationPopup(getSite().getWorkbenchWindow(),tabFolder.getShell(),remoteID);
      popup.setContent(name,body);
      popup.open();
      new UIJob(tabFolder.getDisplay(),"String_Node_Str"){
        public IStatus runInUIThread(        IProgressMonitor monitor){
          Shell shell=popup.getShell();
          if (shell != null && !shell.isDisposed()) {
            popup.close();
          }
          return Status.OK_STATUS;
        }
      }
.schedule(5000);
    }
  }
 else {
    if (showTimestamps) {
      chatText.append(FORMATTER.format(new Date(System.currentTimeMillis())) + ' ');
      chatText.setStyleRange(new StyleRange(length,13,blueColor,null));
      length=chatText.getCharCount();
    }
    chatText.append(name + "String_Node_Str" + body);
    chatText.setStyleRange(new StyleRange(length,name.length() + 1,blueColor,null,SWT.BOLD));
  }
  isFirstMessage=false;
  if (scrollToEnd)   chatText.invokeAction(ST.TEXT_END);
  boldTabTitle(!scrollToEnd);
}