Program: 136110
Project: 136110
Buggy source:
private final void processFunction(TreeNode treeNode,Vector defs,ModuleNode cm) throws AbortException {
  TreeNode syntaxTreeNode=treeNode;
  boolean local=syntaxTreeNode.zero() != null;
  TreeNode[] ss=syntaxTreeNode.one();
  int ql=(ss.length - 4) / 2;
  OpApplNode oan;
  OpDefNode odn=null;
  FormalParamNode[][] quants=new FormalParamNode[ql][0];
  FormalParamNode[] fcnDeclForRecursion=new FormalParamNode[1];
  boolean[] tuples=new boolean[ql];
  ExprNode[] domains=new ExprNode[ql];
  ExprNode[] lhs=new ExprNode[1];
  Context newContext=new Context(moduleTable,errors);
  boolean isRecursive=false;
  symbolTable.pushContext(newContext);
  processQuantBoundArgs(ss,2,quants,tuples,domains,cm);
  UniqueString name=ss[0].getUS();
  SymbolNode symbolNode=symbolTable.resolveSymbol(name);
  SymbolTable st=null;
  if (symbolNode == null) {
    st=symbolTable;
  }
  ;
  fcnDeclForRecursion[0]=new FormalParamNode(name,0,treeNode,st,cm);
  symbolTable.popContext();
  oan=new OpApplNode(OP_nrfs,fcnDeclForRecursion,new ExprNode[0],quants,tuples,domains,syntaxTreeNode,cm);
  if (symbolNode == null) {
    odn=new OpDefNode(ss[0].getUS(),UserDefinedOpKind,nullParam,local,oan,cm,symbolTable,syntaxTreeNode,true,null);
    setOpDefNodeRecursionFields(odn,cm);
  }
 else {
    if (symbolNode instanceof OpDefNode) {
      odn=(OpDefNode)symbolNode;
    }
    ;
    if ((odn != null) && odn.inRecursive && (!odn.isDefined)) {
      if (odn.letInLevel == curLevel) {
        isRecursive=true;
        if (odn.getArity() == 0) {
          endOpDefNode(odn,oan,syntaxTreeNode);
        }
 else {
          errors.addError(treeNode.getLocation(),"String_Node_Str" + odn.getName() + "String_Node_Str"+ "String_Node_Str");
        }
        ;
      }
 else {
        errors.addError(treeNode.getLocation(),"String_Node_Str" + name.toString() + "String_Node_Str");
        odn=null;
      }
    }
 else {
      errors.addError(treeNode.getLocation(),"String_Node_Str" + name.toString() + "String_Node_Str");
    }
  }
  if (odn != null) {
    cm.appendDef(odn);
    if (defs != null)     defs.addElement(odn);
    symbolTable.pushContext(newContext);
  }
  ;
  functions.push(ss[0].getUS(),oan);
  pushLS();
  pushFormalParams(flattenParams(quants));
  lhs[0]=generateExpression(ss[ss.length - 1],cm);
  popFormalParams();
  Hashtable ht=popLabelNodeSet();
  if (odn != null) {
    odn.setLabels(ht);
  }
  ;
  functions.pop();
  oan.setArgs(lhs);
  symbolTable.popContext();
  if (oan.getOperator().getName() == OP_nrfs) {
    oan.makeNonRecursive();
  }
}

Fixed version (ground truth):
private final void processFunction(TreeNode treeNode,Vector defs,ModuleNode cm) throws AbortException {
  TreeNode syntaxTreeNode=treeNode;
  boolean local=syntaxTreeNode.zero() != null;
  TreeNode[] ss=syntaxTreeNode.one();
  int ql=(ss.length - 4) / 2;
  OpApplNode oan;
  OpDefNode odn=null;
  FormalParamNode[][] quants=new FormalParamNode[ql][0];
  FormalParamNode[] fcnDeclForRecursion=new FormalParamNode[1];
  boolean[] tuples=new boolean[ql];
  ExprNode[] domains=new ExprNode[ql];
  ExprNode[] lhs=new ExprNode[1];
  Context newContext=new Context(moduleTable,errors);
  boolean isRecursive=false;
  symbolTable.pushContext(newContext);
  processQuantBoundArgs(ss,2,quants,tuples,domains,cm);
  UniqueString name=ss[0].getUS();
  SymbolNode symbolNode=symbolTable.resolveSymbol(name);
  SymbolTable st=null;
  if (symbolNode == null) {
    st=symbolTable;
  }
  ;
  fcnDeclForRecursion[0]=new FormalParamNode(name,0,treeNode,st,cm);
  symbolTable.popContext();
  oan=new OpApplNode(OP_nrfs,fcnDeclForRecursion,new ExprNode[0],quants,tuples,domains,syntaxTreeNode,cm);
  if (symbolNode == null) {
    odn=new OpDefNode(ss[0].getUS(),UserDefinedOpKind,nullParam,local,oan,cm,symbolTable,syntaxTreeNode,true,null);
    setOpDefNodeRecursionFields(odn,cm);
  }
 else {
    if (symbolNode instanceof OpDefNode) {
      odn=(OpDefNode)symbolNode;
    }
    ;
    if ((odn != null) && odn.inRecursive && (!odn.isDefined)) {
      if (odn.letInLevel == curLevel) {
        isRecursive=true;
        if (odn.getArity() == 0) {
          endOpDefNode(odn,oan,syntaxTreeNode);
        }
 else {
          errors.addError(treeNode.getLocation(),"String_Node_Str" + odn.getName() + "String_Node_Str"+ "String_Node_Str");
        }
        ;
      }
 else {
        errors.addError(treeNode.getLocation(),"String_Node_Str" + name.toString() + "String_Node_Str");
        odn=null;
      }
    }
 else {
      errors.addError(treeNode.getLocation(),"String_Node_Str" + name.toString() + "String_Node_Str");
    }
  }
  if (odn != null) {
    cm.appendDef(odn);
    if (defs != null)     defs.addElement(odn);
    symbolTable.pushContext(newContext);
  }
  ;
  functions.push(ss[0].getUS(),oan);
  pushLS();
  pushFormalParams(flattenParams(quants));
  lhs[0]=generateExpression(ss[ss.length - 1],cm);
  popFormalParams();
  Hashtable ht=popLabelNodeSet();
  if (odn != null) {
    odn.setLabels(ht);
  }
  ;
  functions.pop();
  oan.setArgs(lhs);
  if (odn != null) {
    symbolTable.popContext();
  }
  if (oan.getOperator().getName() == OP_nrfs) {
    oan.makeNonRecursive();
  }
}