Program: 17441
Project: 17441
Buggy source:
public CFPartitionScanner(){
  IToken doctype=new Token(DOCTYPE);
  IToken cfComment=new Token(CF_COMMENT);
  IToken htmComment=new Token(HTM_COMMENT);
  IToken tag=new Token(ALL_TAG);
  IToken cftag=new Token(CF_TAG);
  IToken cfendtag=new Token(CF_END_TAG);
  IToken cfscript=new Token(CF_SCRIPT);
  IToken jscript=new Token(J_SCRIPT);
  IToken css=new Token(CSS_TAG);
  IToken unktag=new Token(UNK_TAG);
  IToken form=new Token(FORM_TAG);
  IToken table=new Token(TABLE_TAG);
  List rules=new ArrayList();
  rules.add(new NestableMultiLineRule("String_Node_Str","String_Node_Str",cfComment));
  rules.add(new NestableMultiLineRule("String_Node_Str","String_Node_Str",htmComment));
  rules.add(new MultiLineRule("String_Node_Str","String_Node_Str",doctype));
  rules.add(new MultiLineRule("String_Node_Str","String_Node_Str",css));
  rules.add(new MultiLineRule("String_Node_Str","String_Node_Str",css));
  rules.add(new MultiLineRule("String_Node_Str","String_Node_Str",jscript));
  rules.add(new MultiLineRule("String_Node_Str","String_Node_Str",jscript));
  SyntaxDictionary sd=DictionaryManager.getDictionary(DictionaryManager.CFDIC);
  Tag tg=null;
  try {
    Set elements=((SyntaxDictionaryInterface)sd).getAllElements();
    Iterator it=elements.iterator();
    while (it.hasNext()) {
      String ename=(String)it.next();
      if (!ename.equals("String_Node_Str")) {
        tg=sd.getTag(ename);
        rules.add(new CFTagRule("String_Node_Str" + ename,"String_Node_Str",cftag));
        rules.add(new CFTagRule("String_Node_Str" + ename.toUpperCase(),"String_Node_Str",cftag));
        if (!tg.isSingle()) {
          rules.add(new CFTagRule("String_Node_Str" + ename,"String_Node_Str",cfendtag));
          rules.add(new CFTagRule("String_Node_Str" + ename.toUpperCase(),"String_Node_Str",cfendtag));
        }
      }
    }
  }
 catch (  Exception e) {
    e.printStackTrace(System.err);
  }
  rules.add(new CFTagRule("String_Node_Str","String_Node_Str",cftag));
  rules.add(new CFTagRule("String_Node_Str","String_Node_Str",cfendtag));
  rules.add(new CFTagRule("String_Node_Str","String_Node_Str",cftag));
  rules.add(new CFTagRule("String_Node_Str","String_Node_Str",cfendtag));
  sd=DictionaryManager.getDictionary(DictionaryManager.HTDIC);
  try {
    Set elements=((SyntaxDictionaryInterface)sd).getAllElements();
    IToken tmp=tag;
    Iterator it=elements.iterator();
    while (it.hasNext()) {
      String ename=(String)it.next();
      if (!ename.equals("String_Node_Str") && !ename.equals("String_Node_Str")) {
        tg=sd.getTag(ename);
        if (tg.isTableTag()) {
          tmp=table;
        }
 else         if (tg.isFormTag()) {
          tmp=form;
        }
 else {
          tmp=tag;
        }
        rules.add(new MultiLineRule("String_Node_Str" + ename,"String_Node_Str",tmp));
        rules.add(new MultiLineRule("String_Node_Str" + ename.toUpperCase(),"String_Node_Str",tmp));
        if (!tg.isSingle()) {
          rules.add(new MultiLineRule("String_Node_Str" + ename,"String_Node_Str",tmp));
          rules.add(new MultiLineRule("String_Node_Str" + ename.toUpperCase(),"String_Node_Str",tmp));
        }
      }
    }
  }
 catch (  Exception e) {
    e.printStackTrace(System.err);
  }
  rules.add(new TagRule(unktag));
  IPredicateRule[] rulearry=new IPredicateRule[rules.size()];
  rules.toArray(rulearry);
  setPredicateRules(rulearry);
}

Fixed version (ground truth):
public CFPartitionScanner(){
  IToken doctype=new Token(DOCTYPE);
  IToken cfComment=new Token(CF_COMMENT);
  IToken htmComment=new Token(HTM_COMMENT);
  IToken tag=new Token(ALL_TAG);
  IToken cftag=new Token(CF_TAG);
  IToken cfendtag=new Token(CF_END_TAG);
  IToken cfscript=new Token(CF_SCRIPT);
  IToken jscript=new Token(J_SCRIPT);
  IToken css=new Token(CSS_TAG);
  IToken unktag=new Token(UNK_TAG);
  IToken form=new Token(FORM_TAG);
  IToken table=new Token(TABLE_TAG);
  List rules=new ArrayList();
  rules.add(new NestableMultiLineRule("String_Node_Str","String_Node_Str",cfComment));
  rules.add(new NestableMultiLineRule("String_Node_Str","String_Node_Str",htmComment));
  rules.add(new MultiLineRule("String_Node_Str","String_Node_Str",doctype));
  rules.add(new MultiLineRule("String_Node_Str","String_Node_Str",css));
  rules.add(new MultiLineRule("String_Node_Str","String_Node_Str",css));
  rules.add(new MultiLineRule("String_Node_Str","String_Node_Str",jscript));
  rules.add(new MultiLineRule("String_Node_Str","String_Node_Str",jscript));
  SyntaxDictionary sd=DictionaryManager.getDictionary(DictionaryManager.CFDIC);
  Tag tg=null;
  try {
    Set elements=((SyntaxDictionaryInterface)sd).getAllElements();
    Iterator it=elements.iterator();
    while (it.hasNext()) {
      String ename=(String)it.next();
      if (!ename.equals("String_Node_Str")) {
        tg=sd.getTag(ename);
        rules.add(new NamedTagRule("String_Node_Str" + ename,"String_Node_Str",cftag));
        rules.add(new NamedTagRule("String_Node_Str" + ename.toUpperCase(),"String_Node_Str",cftag));
        if (!tg.isSingle()) {
          rules.add(new NamedTagRule("String_Node_Str" + ename,"String_Node_Str",cfendtag));
          rules.add(new NamedTagRule("String_Node_Str" + ename.toUpperCase(),"String_Node_Str",cfendtag));
        }
      }
    }
  }
 catch (  Exception e) {
    e.printStackTrace(System.err);
  }
  rules.add(new NamedTagRule("String_Node_Str","String_Node_Str",cftag));
  rules.add(new NamedTagRule("String_Node_Str","String_Node_Str",cfendtag));
  rules.add(new NamedTagRule("String_Node_Str","String_Node_Str",cftag));
  rules.add(new NamedTagRule("String_Node_Str","String_Node_Str",cfendtag));
  sd=DictionaryManager.getDictionary(DictionaryManager.HTDIC);
  try {
    Set elements=((SyntaxDictionaryInterface)sd).getAllElements();
    IToken tmp=tag;
    Iterator it=elements.iterator();
    while (it.hasNext()) {
      String ename=(String)it.next();
      if (!ename.equals("String_Node_Str") && !ename.equals("String_Node_Str")) {
        tg=sd.getTag(ename);
        if (tg.isTableTag()) {
          tmp=table;
        }
 else         if (tg.isFormTag()) {
          tmp=form;
        }
 else {
          tmp=tag;
        }
        rules.add(new NamedTagRule("String_Node_Str" + ename,"String_Node_Str",tmp));
        rules.add(new NamedTagRule("String_Node_Str" + ename.toUpperCase(),"String_Node_Str",tmp));
        if (!tg.isSingle()) {
          rules.add(new NamedTagRule("String_Node_Str" + ename,"String_Node_Str",tmp));
          rules.add(new NamedTagRule("String_Node_Str" + ename.toUpperCase(),"String_Node_Str",tmp));
        }
      }
    }
  }
 catch (  Exception e) {
    e.printStackTrace(System.err);
  }
  rules.add(new TagRule(unktag));
  IPredicateRule[] rulearry=new IPredicateRule[rules.size()];
  rules.toArray(rulearry);
  setPredicateRules(rulearry);
}