Program: 40800
Project: 40800
Buggy source:
/** 
 * For each statement s, return the set of statements that may def the heap value read by s.
 * @param node the node we are computing heap reaching defs for
 * @param ir IR for the node
 * @param pa governing pointer analysis
 * @param mod the set of heap locations which may be written (transitively) by this node. These are logically return values in the SDG.
 * @param statements the statements whose def-use are considered interesting
 * @param exclusions heap locations that should be excluded from data dependence tracking
 * @throws IllegalArgumentException if pa is null
 * @throws IllegalArgumentException if statements is null
 */
public static Map<Statement,OrdinalSet<Statement>> computeReachingDefs(CGNode node,IR ir,PointerAnalysis pa,Map<CGNode,OrdinalSet<PointerKey>> mod,Collection<Statement> statements,HeapExclusions exclusions){
  if (statements == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (pa == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  System.err.println("String_Node_Str" + node);
  System.err.println(ir);
  if (VERBOSE) {
    System.err.println(statements.size());
  }
  ExpandedControlFlowGraph cfg=new ExpandedControlFlowGraph(ir);
  OrdinalSetMapping<Statement> domain=createStatementDomain(statements);
  Map<Integer,NormalStatement> ssaInstructionIndex2Statement=mapInstructionsToStatements(domain);
  BitVectorFramework<IBasicBlock,Statement> rd=new BitVectorFramework<IBasicBlock,Statement>(cfg,new RD(node,cfg,pa,domain,ssaInstructionIndex2Statement,exclusions),domain);
  if (VERBOSE) {
    System.err.println("String_Node_Str");
  }
  BitVectorSolver<IBasicBlock> solver=new BitVectorSolver<IBasicBlock>(rd);
  solver.solve();
  if (VERBOSE) {
    System.err.println("String_Node_Str");
  }
  return makeResult(solver,domain,node,new DelegatingExtendedHeapModel(pa.getHeapModel()),pa,mod,cfg,ssaInstructionIndex2Statement,exclusions);
}

Fixed version (ground truth):
/** 
 * For each statement s, return the set of statements that may def the heap value read by s.
 * @param node the node we are computing heap reaching defs for
 * @param ir IR for the node
 * @param pa governing pointer analysis
 * @param mod the set of heap locations which may be written (transitively) by this node. These are logically return values in the SDG.
 * @param statements the statements whose def-use are considered interesting
 * @param exclusions heap locations that should be excluded from data dependence tracking
 * @throws IllegalArgumentException if pa is null
 * @throws IllegalArgumentException if statements is null
 */
public static Map<Statement,OrdinalSet<Statement>> computeReachingDefs(CGNode node,IR ir,PointerAnalysis pa,Map<CGNode,OrdinalSet<PointerKey>> mod,Collection<Statement> statements,HeapExclusions exclusions){
  if (statements == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (pa == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  System.err.println("String_Node_Str" + node);
  if (VERBOSE) {
    System.err.println(statements.size());
  }
  ExpandedControlFlowGraph cfg=new ExpandedControlFlowGraph(ir);
  OrdinalSetMapping<Statement> domain=createStatementDomain(statements);
  Map<Integer,NormalStatement> ssaInstructionIndex2Statement=mapInstructionsToStatements(domain);
  BitVectorFramework<IBasicBlock,Statement> rd=new BitVectorFramework<IBasicBlock,Statement>(cfg,new RD(node,cfg,pa,domain,ssaInstructionIndex2Statement,exclusions),domain);
  if (VERBOSE) {
    System.err.println("String_Node_Str");
  }
  BitVectorSolver<IBasicBlock> solver=new BitVectorSolver<IBasicBlock>(rd);
  solver.solve();
  if (VERBOSE) {
    System.err.println("String_Node_Str");
  }
  return makeResult(solver,domain,node,new DelegatingExtendedHeapModel(pa.getHeapModel()),pa,mod,cfg,ssaInstructionIndex2Statement,exclusions);
}