Program: 37618
Project: 37618
Buggy source:
/** 
 * ��������˻��ꤵ�줿�롼�빽¤��롼�륪�֥������Ȥ˥���ѥ��뤹��
 */
Rule compile() throws CompileException {
  Env.c("String_Node_Str");
  if (debug2) {
    Util.println("String_Node_Str");
    Util.println("String_Node_Str" + rs);
    Util.println(rs.leftMem + "String_Node_Str" + rs.guardMem+ "String_Node_Str"+ rs.rightMem+ "String_Node_Str");
  }
  liftupActiveAtoms(rs.leftMem);
  simplify();
  theRule=new Rule(rs.leftMem.getFirstAtomName(),rs.toString());
  theRule.name=rs.name;
  hc=new HeadCompiler();
  hc.enumFormals(rs.leftMem);
  hc2=new HeadCompiler();
  hc2.enumFormals(rs.leftMem);
  if (true) {
    theRule.guardLabel=new InstructionList();
    guard=theRule.guardLabel.insts;
  }
 else   guard=null;
  theRule.bodyLabel=new InstructionList();
  body=theRule.bodyLabel.insts;
  contLabel=(guard != null ? theRule.guardLabel : theRule.bodyLabel);
  compile_l();
  compile_g();
  if (debug2) {
    Util.println("String_Node_Str");
    Rule tmpRule=new Rule();
    tmpRule.memMatch=memMatch;
    tmpRule.tempMatch=tempMatch;
    tmpRule.atomMatch=atomMatch;
    tmpRule.guard=guard;
    tmpRule.body=body;
    tmpRule.showDetail();
  }
  hc=new HeadCompiler();
  hc.enumFormals(rs.leftMem);
  hc.firsttime=false;
  theRule.guardLabel=new InstructionList();
  guard=theRule.guardLabel.insts;
  contLabel=(guard != null ? theRule.guardLabel : theRule.bodyLabel);
  compile_l();
  compile_g();
  compile_r();
  theRule.memMatch=memMatch;
  theRule.tempMatch=tempMatch;
  theRule.atomMatch=atomMatch;
  theRule.guard=guard;
  theRule.body=body;
  theRule.body.add(1,Instruction.commit(theRule.name,theRule.lineno));
  if (debug2) {
    Util.println("String_Node_Str");
    theRule.showDetail();
    Util.println("String_Node_Str");
  }
  optimize();
  return theRule;
}

Fixed version (ground truth):
/** 
 * ��������˻��ꤵ�줿�롼�빽¤��롼�륪�֥������Ȥ˥���ѥ��뤹��
 */
Rule compile() throws CompileException {
  Env.c("String_Node_Str");
  if (debug2) {
    Util.println("String_Node_Str");
    Util.println("String_Node_Str" + rs);
    Util.println(rs.leftMem + "String_Node_Str" + rs.guardMem+ "String_Node_Str"+ rs.rightMem+ "String_Node_Str");
  }
  liftupActiveAtoms(rs.leftMem);
  simplify();
  theRule=new Rule(rs.leftMem.getFirstAtomName(),rs.toString());
  theRule.name=rs.name;
  hc=new HeadCompiler();
  hc.enumFormals(rs.leftMem);
  hc2=new HeadCompiler();
  hc2.enumFormals(rs.leftMem);
  if (true) {
    theRule.guardLabel=new InstructionList();
    guard=theRule.guardLabel.insts;
  }
 else   guard=null;
  theRule.bodyLabel=new InstructionList();
  body=theRule.bodyLabel.insts;
  contLabel=(guard != null ? theRule.guardLabel : theRule.bodyLabel);
  compile_l();
  compile_g();
  if (debug2) {
    Util.println("String_Node_Str");
    Rule tmpRule=new Rule();
    tmpRule.memMatch=memMatch;
    tmpRule.tempMatch=tempMatch;
    tmpRule.atomMatch=atomMatch;
    tmpRule.guard=guard;
    tmpRule.body=body;
    tmpRule.showDetail();
  }
  hc=new HeadCompiler();
  hc.enumFormals(rs.leftMem);
  hc.firsttime=false;
  theRule.guardLabel=new InstructionList();
  guard=theRule.guardLabel.insts;
  contLabel=(guard != null ? theRule.guardLabel : theRule.bodyLabel);
  compile_l();
  compile_g();
  compile_r();
  theRule.memMatch=memMatch;
  theRule.tempMatch=tempMatch;
  theRule.atomMatch=atomMatch;
  theRule.guard=guard;
  theRule.body=body;
  if (theRule.name != null)   theRule.body.add(1,Instruction.commit(theRule.name,theRule.lineno));
 else   theRule.body.add(1,Instruction.commit(rs.toString(),theRule.lineno));
  if (debug2) {
    Util.println("String_Node_Str");
    theRule.showDetail();
    Util.println("String_Node_Str");
  }
  optimize();
  return theRule;
}