Program: 85327
Project: 85327
Buggy source:
@Override public void initFlowGraph(GeomPointsTo ptAnalyzer){
  int k;
  int n_legal_cons;
  int nf1, nf2;
  int code;
  CgEdge q;
  IVarAbstraction my_lhs, my_rhs;
  n_legal_cons=0;
  for (  PlainConstraint cons : ptAnalyzer.constraints) {
    if (!cons.isActive)     continue;
    my_lhs=cons.getLHS().getRepresentative();
    my_rhs=cons.getRHS().getRepresentative();
    nf1=ptAnalyzer.getMappedMethodID(my_lhs);
    nf2=ptAnalyzer.getMappedMethodID(my_rhs);
    code=((nf1 == Constants.SUPER_MAIN ? 1 : 0) << 1) | (nf2 == Constants.SUPER_MAIN ? 1 : 0);
switch (cons.type) {
case Constants.NEW_CONS:
      my_rhs.add_points_to_3((AllocNode)my_lhs.getWrappedNode(),nf2 == Constants.SUPER_MAIN ? 0 : 1,nf1 == Constants.SUPER_MAIN ? 0 : 1,nf2 == Constants.SUPER_MAIN ? ptAnalyzer.context_size[nf1] : ptAnalyzer.context_size[nf2]);
    ptAnalyzer.getWorklist().push(my_rhs);
  break;
case Constants.ASSIGN_CONS:
if (cons.interCallEdges != null) {
  for (Iterator<Edge> it=cons.interCallEdges.iterator(); it.hasNext(); ) {
    Edge sEdge=it.next();
    q=ptAnalyzer.getInternalEdgeFromSootEdge(sEdge);
    if (q.is_obsoleted == true) {
      continue;
    }
    if (nf2 == q.t) {
      if (nf1 == Constants.SUPER_MAIN) {
        my_lhs.add_simple_constraint_3(my_rhs,0,q.map_offset,ptAnalyzer.max_context_size_block[q.s]);
      }
 else {
        if (q.s == q.t) {
          my_lhs.add_simple_constraint_3(my_rhs,1,1,ptAnalyzer.context_size[nf1]);
        }
 else {
          for (k=0; k < ptAnalyzer.block_num[nf1]; ++k) {
            my_lhs.add_simple_constraint_3(my_rhs,k * ptAnalyzer.max_context_size_block[nf1] + 1,q.map_offset,ptAnalyzer.max_context_size_block[nf1]);
          }
        }
      }
    }
 else {
      if (q.s == q.t) {
        my_lhs.add_simple_constraint_3(my_rhs,1,1,ptAnalyzer.context_size[nf2]);
      }
 else {
        for (k=0; k < ptAnalyzer.block_num[nf2]; ++k) {
          my_lhs.add_simple_constraint_3(my_rhs,q.map_offset,k * ptAnalyzer.max_context_size_block[nf2] + 1,ptAnalyzer.max_context_size_block[nf2]);
        }
      }
    }
  }
}
 else {
  my_lhs.add_simple_constraint_3(my_rhs,nf1 == Constants.SUPER_MAIN ? 0 : 1,nf2 == Constants.SUPER_MAIN ? 0 : 1,nf1 == Constants.SUPER_MAIN ? ptAnalyzer.context_size[nf2] : ptAnalyzer.context_size[nf1]);
}
break;
case Constants.LOAD_CONS:
cons.code=full_convertor[code];
cons.otherSide=my_rhs;
my_lhs.put_complex_constraint(cons);
break;
case Constants.STORE_CONS:
cons.code=full_convertor[code];
cons.otherSide=my_lhs;
my_rhs.put_complex_constraint(cons);
break;
default :
throw new RuntimeException("String_Node_Str");
}
++n_legal_cons;
}
ptAnalyzer.ps.printf("String_Node_Str",n_legal_cons,((double)n_legal_cons / ptAnalyzer.n_init_constraints) * 100);
}

Fixed version (ground truth):
@Override public void initFlowGraph(GeomPointsTo ptAnalyzer){
  int k;
  int n_legal_cons;
  int nf1, nf2;
  int code;
  CgEdge q;
  IVarAbstraction my_lhs, my_rhs;
  n_legal_cons=0;
  for (  PlainConstraint cons : ptAnalyzer.constraints) {
    if (!cons.isActive)     continue;
    my_lhs=cons.getLHS().getRepresentative();
    my_rhs=cons.getRHS().getRepresentative();
    nf1=ptAnalyzer.getMethodIDFromPtr(my_lhs);
    nf2=ptAnalyzer.getMethodIDFromPtr(my_rhs);
    code=((nf1 == Constants.SUPER_MAIN ? 1 : 0) << 1) | (nf2 == Constants.SUPER_MAIN ? 1 : 0);
switch (cons.type) {
case Constants.NEW_CONS:
      my_rhs.add_points_to_3((AllocNode)my_lhs.getWrappedNode(),nf2 == Constants.SUPER_MAIN ? 0 : 1,nf1 == Constants.SUPER_MAIN ? 0 : 1,nf2 == Constants.SUPER_MAIN ? ptAnalyzer.context_size[nf1] : ptAnalyzer.context_size[nf2]);
    ptAnalyzer.getWorklist().push(my_rhs);
  break;
case Constants.ASSIGN_CONS:
if (cons.interCallEdges != null) {
  for (Iterator<Edge> it=cons.interCallEdges.iterator(); it.hasNext(); ) {
    Edge sEdge=it.next();
    q=ptAnalyzer.getInternalEdgeFromSootEdge(sEdge);
    if (q.is_obsoleted == true) {
      continue;
    }
    if (nf2 == q.t) {
      if (nf1 == Constants.SUPER_MAIN) {
        my_lhs.add_simple_constraint_3(my_rhs,0,q.map_offset,ptAnalyzer.max_context_size_block[q.s]);
      }
 else {
        if (q.s == q.t) {
          my_lhs.add_simple_constraint_3(my_rhs,1,1,ptAnalyzer.context_size[nf1]);
        }
 else {
          for (k=0; k < ptAnalyzer.block_num[nf1]; ++k) {
            my_lhs.add_simple_constraint_3(my_rhs,k * ptAnalyzer.max_context_size_block[nf1] + 1,q.map_offset,ptAnalyzer.max_context_size_block[nf1]);
          }
        }
      }
    }
 else {
      if (q.s == q.t) {
        my_lhs.add_simple_constraint_3(my_rhs,1,1,ptAnalyzer.context_size[nf2]);
      }
 else {
        for (k=0; k < ptAnalyzer.block_num[nf2]; ++k) {
          my_lhs.add_simple_constraint_3(my_rhs,q.map_offset,k * ptAnalyzer.max_context_size_block[nf2] + 1,ptAnalyzer.max_context_size_block[nf2]);
        }
      }
    }
  }
}
 else {
  my_lhs.add_simple_constraint_3(my_rhs,nf1 == Constants.SUPER_MAIN ? 0 : 1,nf2 == Constants.SUPER_MAIN ? 0 : 1,nf1 == Constants.SUPER_MAIN ? ptAnalyzer.context_size[nf2] : ptAnalyzer.context_size[nf1]);
}
break;
case Constants.LOAD_CONS:
cons.code=full_convertor[code];
cons.otherSide=my_rhs;
my_lhs.put_complex_constraint(cons);
break;
case Constants.STORE_CONS:
cons.code=full_convertor[code];
cons.otherSide=my_lhs;
my_rhs.put_complex_constraint(cons);
break;
default :
throw new RuntimeException("String_Node_Str");
}
++n_legal_cons;
}
ptAnalyzer.ps.printf("String_Node_Str",n_legal_cons,((double)n_legal_cons / ptAnalyzer.n_init_constraints) * 100);
}