Program: 119230
Project: 119230
Buggy source:
private void doAppendToConsole(final IProcessMessage message){
  if (consoleText.isDisposed()) {
    return;
  }
  setConsoleFont();
  String[] rows=message.getContent().split("String_Node_Str");
  int rowLimit=getConsoleRowLimit();
  String content=null;
  if (rowLimit != SWT.DEFAULT) {
    int currentRows=consoleText.getLineCount();
    currentRows--;
    if (currentRows >= rowLimit) {
      return;
    }
 else     if (currentRows + rows.length <= rowLimit) {
      content=message.getContent();
    }
 else {
      StringBuilder sb=new StringBuilder();
      for (int i=0; i < rowLimit - currentRows; i++) {
        sb.append(rows[i]).append("String_Node_Str");
      }
      content=sb.toString();
    }
  }
  if (content == null) {
    content=message.getContent();
  }
  StyleRange style=new StyleRange();
  style.start=consoleText.getText().length();
  String[] contents=content.split("String_Node_Str");
  for (int i=0; i < contents.length; i++) {
    if (isPattern(contents[i]) || isPatternFor(contents[i])) {
      consoleText.append("String_Node_Str");
      content="String_Node_Str";
    }
 else {
      consoleText.append(contents[i]);
      consoleText.append("String_Node_Str");
    }
  }
  style.length=content.length();
  if (message.getType() == MsgType.CORE_OUT || message.getType() == MsgType.CORE_ERR) {
    style.fontStyle=SWT.ITALIC;
  }
  Color color;
switch ((MsgType)message.getType()) {
case CORE_OUT:
    color=getDisplay().getSystemColor(SWT.COLOR_BLUE);
  break;
case CORE_ERR:
color=getDisplay().getSystemColor(SWT.COLOR_DARK_RED);
break;
case STD_ERR:
color=getDisplay().getSystemColor(SWT.COLOR_RED);
break;
case STD_OUT:
default :
color=getDisplay().getSystemColor(SWT.COLOR_BLACK);
break;
}
style.foreground=color;
if ((style.start + style.length) > consoleText.getCharCount()) {
style.length=consoleText.getCharCount() - style.start;
}
consoleText.setStyleRange(style);
}

Fixed version (ground truth):
private void doAppendToConsole(final IProcessMessage message){
  if (consoleText.isDisposed()) {
    return;
  }
  setConsoleFont();
  String[] rows=message.getContent().split("String_Node_Str");
  int rowLimit=getConsoleRowLimit();
  String content=null;
  if (rowLimit != SWT.DEFAULT) {
    int currentRows=consoleText.getLineCount();
    currentRows--;
    if (currentRows >= rowLimit) {
      return;
    }
 else     if (currentRows + rows.length <= rowLimit) {
      content=message.getContent();
    }
 else {
      StringBuilder sb=new StringBuilder();
      for (int i=0; i < rowLimit - currentRows; i++) {
        sb.append(rows[i]).append("String_Node_Str");
      }
      content=sb.toString();
    }
  }
  if (content == null) {
    content=message.getContent();
  }
  StyleRange style=new StyleRange();
  style.start=consoleText.getText().length();
  String[] contents=content.split("String_Node_Str");
  for (  String content2 : contents) {
    if (isPattern(content2) || isPatternFor(content2)) {
      consoleText.append("String_Node_Str");
      content="String_Node_Str";
    }
 else {
      consoleText.append(content2);
      consoleText.append("String_Node_Str");
    }
  }
  style.length=content.length();
  if (message.getType() == MsgType.CORE_OUT || message.getType() == MsgType.CORE_ERR) {
    style.fontStyle=SWT.ITALIC;
  }
  Color color;
switch ((MsgType)message.getType()) {
case CORE_OUT:
    color=getDisplay().getSystemColor(SWT.COLOR_BLUE);
  break;
case CORE_ERR:
color=getDisplay().getSystemColor(SWT.COLOR_DARK_RED);
break;
case STD_ERR:
color=getDisplay().getSystemColor(SWT.COLOR_RED);
break;
case STD_OUT:
default :
color=getDisplay().getSystemColor(SWT.COLOR_BLACK);
break;
}
style.foreground=color;
if ((style.start + style.length) > consoleText.getCharCount()) {
style.length=consoleText.getCharCount() - style.start;
}
consoleText.setStyleRange(style);
}