Program: 101719
Project: 101719
Buggy source:
/** 
 * Turn the string into a list of tags in the order that they appear in the original string.
 */
private List parseTags(String remains){
  List taglist=new ArrayList();
  while (true) {
    int ltpos=remains.indexOf('<');
    int gtpos=remains.indexOf('>');
    if (ltpos == -1 && gtpos == -1) {
      taglist.add(createText(remains));
      remains=null;
      break;
    }
    if (ltpos == -1 || gtpos == -1) {
      DataPolice.report("String_Node_Str" + remains);
      taglist.add(createText(remains));
      remains=null;
      break;
    }
    if (ltpos > gtpos) {
      DataPolice.report("String_Node_Str" + remains);
      taglist.add(createText(remains));
      remains=null;
      break;
    }
    String start=remains.substring(0,ltpos);
    int strLen=start.length();
    if (strLen > 0) {
      int beginIndex=0;
      boolean inSepStr=SEPARATORS.indexOf(start.charAt(0)) >= 0;
      for (int i=1; inSepStr && i < strLen; i++) {
        char currentChar=start.charAt(i);
        if (!(SEPARATORS.indexOf(currentChar) >= 0)) {
          taglist.add(createText(start.substring(beginIndex,i)));
          beginIndex=i;
          inSepStr=false;
        }
      }
      if (beginIndex < strLen) {
        taglist.add(createText(start.substring(beginIndex)));
      }
    }
    String tag=remains.substring(ltpos + 1,gtpos);
    if (tag.length() > 0) {
      Tag reply=null;
      for (int i=0; i < BUILDERS.length; i++) {
        reply=BUILDERS[i].createTag(tag);
        if (reply != null) {
          break;
        }
      }
      if (reply == null) {
        log.warn("String_Node_Str" + tag + "String_Node_Str");
      }
      taglist.add(reply);
    }
    remains=remains.substring(gtpos + 1);
  }
  return taglist;
}

Fixed version (ground truth):
/** 
 * Turn the string into a list of tags in the order that they appear in the original string.
 */
private List parseTags(String remains){
  List taglist=new ArrayList();
  while (true) {
    int ltpos=remains.indexOf('<');
    int gtpos=remains.indexOf('>');
    if (ltpos == -1 && gtpos == -1) {
      taglist.add(createText(remains));
      remains=null;
      break;
    }
    if (ltpos == -1 || gtpos == -1) {
      DataPolice.report("String_Node_Str" + remains);
      taglist.add(createText(remains));
      remains=null;
      break;
    }
    if (ltpos > gtpos) {
      DataPolice.report("String_Node_Str" + remains);
      taglist.add(createText(remains));
      remains=null;
      break;
    }
    String start=remains.substring(0,ltpos);
    int strLen=start.length();
    if (strLen > 0) {
      int beginIndex=0;
      boolean inSepStr=SEPARATORS.indexOf(start.charAt(0)) >= 0;
      for (int i=1; inSepStr && i < strLen; i++) {
        char currentChar=start.charAt(i);
        if (!(SEPARATORS.indexOf(currentChar) >= 0)) {
          taglist.add(createText(start.substring(beginIndex,i)));
          beginIndex=i;
          inSepStr=false;
        }
      }
      if (beginIndex < strLen) {
        taglist.add(createText(start.substring(beginIndex)));
      }
    }
    String tag=remains.substring(ltpos + 1,gtpos);
    if (tag.length() > 0) {
      Tag reply=null;
      for (int i=0; i < BUILDERS.length; i++) {
        reply=BUILDERS[i].createTag(tag);
        if (reply != null) {
          break;
        }
      }
      if (reply == null) {
        log.warn("String_Node_Str" + tag + "String_Node_Str");
      }
 else {
        taglist.add(reply);
      }
    }
    remains=remains.substring(gtpos + 1);
  }
  return taglist;
}