Program: 170788
Project: 170788
Buggy source:
protected void sendMessage(String text){
  try {
    Pattern p=Pattern.compile("String_Node_Str");
    Matcher m=p.matcher(text);
    boolean result=m.find();
    if (result) {
      StringBuffer sb=new StringBuffer();
      while (result) {
        String str=m.group(1);
        int unicode=Integer.parseInt(str,16);
        m.appendReplacement(sb,Matcher.quoteReplacement(String.valueOf((char)unicode)));
        result=m.find();
      }
      m.appendTail(sb);
      text=sb.toString();
    }
  }
 catch (  Throwable e) {
  }
  boolean hacked=false;
  Pattern p=getEmphasisPattern();
  Matcher m=p.matcher(text);
  boolean result=m.find();
  if (result) {
    StringBuffer sb=new StringBuffer();
    while (result) {
      String match=m.group(1);
      boolean is_italic=match.length() == 1 || match.toLowerCase(Locale.US).contains("String_Node_Str");
      String str=m.group(3);
      str=str.replaceAll("String_Node_Str","String_Node_Str");
      hacked=true;
      String emphasis=is_italic ? "String_Node_Str" : "String_Node_Str";
      m.appendReplacement(sb,Matcher.quoteReplacement(emphasis + str + emphasis));
      result=m.find();
    }
    m.appendTail(sb);
    text=sb.toString();
  }
  while (text.length() > MAX_MSG_CHUNK_LENGTH) {
    char[] chars=text.toCharArray();
    int pos=MAX_MSG_CHUNK_LENGTH - 1;
    boolean chunked=false;
    while (pos > MAX_MSG_CHUNK_LENGTH / 2) {
      if (chars[pos] == ' ') {
        String chunk=text.substring(0,pos).trim();
        if (!chunk.isEmpty()) {
          if (hacked) {
            chunk=chunk.replaceAll("String_Node_Str","String_Node_Str");
          }
          chat.sendMessage(chunk,new HashMap<String,Object>());
        }
        text=text.substring(pos).trim();
        chunked=true;
        break;
      }
      pos--;
    }
    if (!chunked) {
      String chunk=text.substring(0,MAX_MSG_CHUNK_LENGTH).trim();
      if (!chunk.isEmpty()) {
        if (hacked) {
          chunk=chunk.replaceAll("String_Node_Str","String_Node_Str");
        }
        chat.sendMessage(chunk,new HashMap<String,Object>());
      }
      text=text.substring(MAX_MSG_CHUNK_LENGTH).trim();
    }
  }
  if (text.length() > 0) {
    if (hacked) {
      text=text.replaceAll("String_Node_Str","String_Node_Str");
    }
    chat.sendMessage(text,new HashMap<String,Object>());
  }
}

Fixed version (ground truth):
protected void sendMessage(String text){
  try {
    Pattern p=Pattern.compile("String_Node_Str");
    Matcher m=p.matcher(text);
    boolean result=m.find();
    if (result) {
      StringBuffer sb=new StringBuffer();
      while (result) {
        String str=m.group(1);
        int unicode=Integer.parseInt(str,16);
        m.appendReplacement(sb,Matcher.quoteReplacement(String.valueOf((char)unicode)));
        result=m.find();
      }
      m.appendTail(sb);
      text=sb.toString();
    }
  }
 catch (  Throwable e) {
  }
  boolean hacked=false;
  Pattern p=getEmphasisPattern();
  Matcher m=p.matcher(text);
  boolean result=m.find();
  if (result) {
    StringBuffer sb=new StringBuffer();
    while (result) {
      String match_start=m.group(1);
      String emp_text=m.group(3);
      String match_end=m.group(4);
      if (emp_text.contains("String_Node_Str")) {
        emp_text=emp_text.replaceAll("String_Node_Str","String_Node_Str");
        hacked=true;
      }
      m.appendReplacement(sb,Matcher.quoteReplacement(match_start + emp_text + match_end));
      result=m.find();
    }
    m.appendTail(sb);
    text=sb.toString();
  }
  while (text.length() > MAX_MSG_CHUNK_LENGTH) {
    char[] chars=text.toCharArray();
    int pos=MAX_MSG_CHUNK_LENGTH - 1;
    boolean chunked=false;
    while (pos > MAX_MSG_CHUNK_LENGTH / 2) {
      if (chars[pos] == ' ') {
        String chunk=text.substring(0,pos).trim();
        if (!chunk.isEmpty()) {
          if (hacked) {
            chunk=chunk.replaceAll("String_Node_Str","String_Node_Str");
          }
          chat.sendMessage(chunk,new HashMap<String,Object>());
        }
        text=text.substring(pos).trim();
        chunked=true;
        break;
      }
      pos--;
    }
    if (!chunked) {
      String chunk=text.substring(0,MAX_MSG_CHUNK_LENGTH).trim();
      if (!chunk.isEmpty()) {
        if (hacked) {
          chunk=chunk.replaceAll("String_Node_Str","String_Node_Str");
        }
        chat.sendMessage(chunk,new HashMap<String,Object>());
      }
      text=text.substring(MAX_MSG_CHUNK_LENGTH).trim();
    }
  }
  if (text.length() > 0) {
    if (hacked) {
      text=text.replaceAll("String_Node_Str","String_Node_Str");
    }
    chat.sendMessage(text,new HashMap<String,Object>());
  }
}