Program: 99816
Project: 99816
Buggy source:
/** 
 * similar to makeConstRead(), but desired property is some expression instead of a constant
 * @see #makeConstRead(CAstNode,CAstNode,CAstNode,RewriteContext,Map)
 */
private CAstNode makeVarRead(CAstNode root,CAstNode receiver,CAstNode element,RewriteContext context,Map<Pair<CAstNode,NoKey>,CAstNode> nodeMap){
  String receiverTemp=TEMP_NAME + (readTempCounter++);
  String elementTemp=TEMP_NAME + (readTempCounter++);
  if (context.inAssignment()) {
    context.setAssign(Ast.makeNode(CAstNode.VAR,Ast.makeConstant(receiverTemp)),Ast.makeNode(CAstNode.VAR,Ast.makeConstant(elementTemp)));
  }
  CAstNode get;
  CAstNode result=Ast.makeNode(CAstNode.BLOCK_EXPR,Ast.makeNode(CAstNode.DECL_STMT,Ast.makeConstant(new InternalCAstSymbol(receiverTemp,false,false)),receiver),Ast.makeNode(CAstNode.DECL_STMT,Ast.makeConstant(new InternalCAstSymbol(elementTemp,false,false)),element),Ast.makeNode(CAstNode.LOOP,Ast.makeNode(CAstNode.UNARY_EXPR,CAstOperator.OP_NOT,Ast.makeNode(CAstNode.IS_DEFINED_EXPR,Ast.makeNode(CAstNode.VAR,Ast.makeConstant(receiverTemp)),Ast.makeNode(CAstNode.VAR,Ast.makeConstant(elementTemp)))),Ast.makeNode(CAstNode.ASSIGN,Ast.makeNode(CAstNode.VAR,Ast.makeConstant(receiverTemp)),Ast.makeNode(CAstNode.OBJECT_REF,Ast.makeNode(CAstNode.VAR,Ast.makeConstant(receiverTemp)),Ast.makeConstant("String_Node_Str")))),get=Ast.makeNode(CAstNode.OBJECT_REF,Ast.makeNode(CAstNode.VAR,Ast.makeConstant(receiverTemp)),Ast.makeNode(CAstNode.VAR,Ast.makeConstant(elementTemp))));
  nodeMap.put(Pair.make(root,context.key()),get);
  return result;
}

Fixed version (ground truth):
/** 
 * similar to makeConstRead(), but desired property is some expression instead of a constant
 * @see #makeConstRead(CAstNode,CAstNode,CAstNode,RewriteContext,Map)
 */
private CAstNode makeVarRead(CAstNode root,CAstNode receiver,CAstNode element,RewriteContext context,Map<Pair<CAstNode,ExpanderKey>,CAstNode> nodeMap){
  String receiverTemp=TEMP_NAME + (readTempCounter++);
  String elementTemp=TEMP_NAME + (readTempCounter++);
  if (context.inAssignment()) {
    context.setAssign(Ast.makeNode(CAstNode.VAR,Ast.makeConstant(receiverTemp)),Ast.makeNode(CAstNode.VAR,Ast.makeConstant(elementTemp)));
  }
  CAstNode get;
  CAstNode result=Ast.makeNode(CAstNode.BLOCK_EXPR,Ast.makeNode(CAstNode.DECL_STMT,Ast.makeConstant(new InternalCAstSymbol(receiverTemp,false,false)),receiver),Ast.makeNode(CAstNode.DECL_STMT,Ast.makeConstant(new InternalCAstSymbol(elementTemp,false,false)),element),Ast.makeNode(CAstNode.LOOP,Ast.makeNode(CAstNode.UNARY_EXPR,CAstOperator.OP_NOT,Ast.makeNode(CAstNode.IS_DEFINED_EXPR,Ast.makeNode(CAstNode.VAR,Ast.makeConstant(receiverTemp)),Ast.makeNode(CAstNode.VAR,Ast.makeConstant(elementTemp)))),Ast.makeNode(CAstNode.ASSIGN,Ast.makeNode(CAstNode.VAR,Ast.makeConstant(receiverTemp)),Ast.makeNode(CAstNode.OBJECT_REF,Ast.makeNode(CAstNode.VAR,Ast.makeConstant(receiverTemp)),Ast.makeConstant("String_Node_Str")))),get=Ast.makeNode(CAstNode.OBJECT_REF,Ast.makeNode(CAstNode.VAR,Ast.makeConstant(receiverTemp)),Ast.makeNode(CAstNode.VAR,Ast.makeConstant(elementTemp))));
  nodeMap.put(Pair.make(root,context.key()),get);
  return result;
}