nus-yam/ex-repair huggingface dataset:
Program: 6299
Project: 6299
Buggy source:
private void generateDetailedReport(MethodInfo method){
  String page=pageOf(method);
  Hashtable<String,Object> ctx=new Hashtable<String,Object>();
  ctx.put("String_Node_Str",method);
  ctx.put("String_Node_Str",this.detailedReports.get(method));
  for (  DetailedMethodReport m : this.detailedReports.get(method)) {
    m.getGraph();
  }
  try {
    this.generateFile("String_Node_Str",config.getOutFile(page),ctx);
  }
 catch (  Exception e) {
    logger.error(e);
  }
  this.addPage("String_Node_Str" + method.getCli().clazz.getClassName() + "String_Node_Str"+ sanitizePageKey(method.methodId),page);
}

Fixed version (ground truth):
private void generateDetailedReport(MethodInfo method){
  String page=pageOf(method);
  Hashtable<String,Object> ctx=new Hashtable<String,Object>();
  ctx.put("String_Node_Str",method);
  ctx.put("String_Node_Str",project.getFlowGraph(method).dumpDFA());
  ctx.put("String_Node_Str",this.detailedReports.get(method));
  for (  DetailedMethodReport m : this.detailedReports.get(method)) {
    m.getGraph();
  }
  try {
    this.generateFile("String_Node_Str",config.getOutFile(page),ctx);
  }
 catch (  Exception e) {
    logger.error(e);
  }
  this.addPage("String_Node_Str" + method.getCli().clazz.getClassName() + "String_Node_Str"+ sanitizePageKey(method.methodId),page);
}
Program: 6300
Project: 6300
Buggy source:
/** 
 * get the filename for output files
 * @param method the method the outputfile should be created for
 * @param extension the filename extension (e.g. .xml)
 * @return the filename
 */
public File getOutFile(MethodInfo method,String extension){
  return new File(outDir,sanitizeFileName(method.getFQMethodName() + extension));
}

Fixed version (ground truth):
/** 
 * get the filename for output files
 * @param method the method the outputfile should be created for
 * @param extension the filename extension (e.g. .xml)
 * @return the filename
 */
public File getOutFile(MethodInfo method,String extension){
  return new File(outDir,MiscUtils.sanitizeFileName(method.getFQMethodName() + extension));
}
Program: 6301
Project: 6301
Buggy source:
private void computeMethodNestingDepths(){
  this.methodMNDs=new HashMap<MethodInfo,Integer>();
  for (  MethodInfo m : project.getCallGraph().getImplementedMethods()) {
    int maxCaller=0;
    ControlFlowGraph cfgInvoked=project.getFlowGraph(m);
    for (    Pair<SuperInvokeEdge,SuperReturnEdge> callSite : superGraph.getCallSites(cfgInvoked)) {
      InvokeNode callSiteNode=callSite.fst().getInvokeNode();
      ControlFlowGraph cfgInvoker=callSiteNode.invokerFlowGraph();
      int callerRootDepth=methodMNDs.get(cfgInvoker.getMethodInfo());
      int nestingDepth=cfgInvoker.getLoopColoring().getLoopColor(callSiteNode).size();
      maxCaller=Math.max(maxCaller,callerRootDepth + nestingDepth);
    }
    methodMNDs.put(m,maxCaller);
  }
  if (config.debug)   MiscUtils.printMap(System.out,methodMNDs,30);
}

Fixed version (ground truth):
private void computeMethodNestingDepths(){
  this.methodMNDs=new HashMap<MethodInfo,Integer>();
  for (  MethodInfo m : project.getCallGraph().getImplementedMethods(project.getTargetMethod())) {
    int maxCaller=0;
    ControlFlowGraph cfgInvoked=project.getFlowGraph(m);
    for (    Pair<SuperInvokeEdge,SuperReturnEdge> callSite : superGraph.getCallSites(cfgInvoked)) {
      InvokeNode callSiteNode=callSite.fst().getInvokeNode();
      ControlFlowGraph cfgInvoker=callSiteNode.invokerFlowGraph();
      int callerRootDepth=methodMNDs.get(cfgInvoker.getMethodInfo());
      int nestingDepth=cfgInvoker.getLoopColoring().getLoopColor(callSiteNode).size();
      maxCaller=Math.max(maxCaller,callerRootDepth + nestingDepth);
    }
    methodMNDs.put(m,maxCaller);
  }
  if (config.debug)   MiscUtils.printMap(System.out,methodMNDs,30);
}
Program: 6302
Project: 6302
Buggy source:
private void buildEdge(CFGEdge edge){
  FlowGraph<CFGNode,CFGEdge> graph=cfg.getGraph();
  Set<CFGNode> hols=cfg.getLoopColoring().getHeadOfLoops();
  Set<CFGEdge> backEdges=cfg.getLoopColoring().getBackEdges();
  Map<CFGEdge,IterationBranchLabel<CFGNode>> edgeColoring=cfg.getLoopColoring().getIterationBranchEdges();
  CFGNode src=graph.getEdgeSource(edge);
  CFGNode target=graph.getEdgeTarget(edge);
  Transition transition=tBuilder.createTransition(nodeTemplates.get(src).snd(),nodeTemplates.get(target).fst());
  TransitionAttributes attrs=transition.getAttrs();
  IterationBranchLabel<CFGNode> edgeColor=edgeColoring.get(edge);
  if (edgeColor != null) {
    for (    CFGNode loop : edgeColor.getContinues()) {
      attrs.appendGuard(tBuilder.contLoopGuard(loop));
      attrs.appendUpdate(tBuilder.incrLoopCounter(loop));
    }
    for (    CFGNode loop : edgeColor.getExits()) {
      attrs.appendGuard(tBuilder.exitLoopGuard(loop));
      attrs.appendUpdate(tBuilder.resetLoopCounter(loop));
    }
  }
  if (hols.contains(target) && !backEdges.contains(edge)) {
    attrs.appendUpdate(tBuilder.resetLoopCounter(target));
  }
}

Fixed version (ground truth):
private void buildEdge(CFGEdge edge){
  FlowGraph<CFGNode,CFGEdge> graph=cfg.getGraph();
  Set<CFGNode> hols=cfg.getLoopColoring().getHeadOfLoops();
  Set<CFGEdge> backEdges=cfg.getLoopColoring().getBackEdges();
  Map<CFGEdge,IterationBranchLabel<CFGNode>> edgeColoring=cfg.getLoopColoring().getIterationBranchEdges();
  CFGNode src=graph.getEdgeSource(edge);
  CFGNode target=graph.getEdgeTarget(edge);
  if (src == cfg.getEntry() && target == cfg.getExit())   return;
  Transition transition=tBuilder.createTransition(nodeTemplates.get(src).snd(),nodeTemplates.get(target).fst());
  TransitionAttributes attrs=transition.getAttrs();
  IterationBranchLabel<CFGNode> edgeColor=edgeColoring.get(edge);
  if (edgeColor != null) {
    for (    CFGNode loop : edgeColor.getContinues()) {
      attrs.appendGuard(tBuilder.contLoopGuard(loop));
      attrs.appendUpdate(tBuilder.incrLoopCounter(loop));
    }
    for (    CFGNode loop : edgeColor.getExits()) {
      attrs.appendGuard(tBuilder.exitLoopGuard(loop));
      attrs.appendUpdate(tBuilder.resetLoopCounter(loop));
    }
  }
  if (hols.contains(target) && !backEdges.contains(edge)) {
    attrs.appendUpdate(tBuilder.resetLoopCounter(target));
  }
}
Program: 6303
Project: 6303
Buggy source:
private StringBuilder initCache(String NUM_METHODS){
  Vector<Object> cacheElems=new Vector<Object>();
  cacheElems.add(0);
  int i;
  for (i=1; i < blocksOf(0); i++)   cacheElems.add(0);
  for (; i < cache.getNumBlocks(); i++)   cacheElems.add(NUM_METHODS);
  return CacheSimBuilder.constArray(cacheElems);
}

Fixed version (ground truth):
private StringBuilder initCache(String NUM_METHODS){
  Vector<Object> cacheElems=new Vector<Object>();
  for (int i=0; i < cache.getNumBlocks(); i++)   cacheElems.add(NUM_METHODS);
  cacheElems.set(blocksOf(0) - 1,0);
  return CacheSimBuilder.constArray(cacheElems);
}
Program: 6304
Project: 6304
Buggy source:
@Override public void appendDeclarations(NTASystem system,String NUM_METHODS){
  super.appendDeclarations(system,NUM_METHODS);
  system.appendDeclaration(String.format("String_Node_Str",NUM_METHODS,initNumBlocks()));
  system.appendDeclaration(String.format("String_Node_Str",NUM_METHODS,cache.getNumBlocks(),initCache(NUM_METHODS)));
  system.appendDeclaration(String.format("String_Node_Str"));
  system.appendDeclaration("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str" + cache.getNumBlocks() + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ (cache.getNumBlocks() - 1)+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ NUM_METHODS+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
}

Fixed version (ground truth):
@Override public void appendDeclarations(NTASystem system,String NUM_METHODS){
  super.appendDeclarations(system,NUM_METHODS);
  system.appendDeclaration(String.format("String_Node_Str",NUM_METHODS,initNumBlocks()));
  system.appendDeclaration(String.format("String_Node_Str",NUM_METHODS,cache.getNumBlocks(),initCache(NUM_METHODS)));
  system.appendDeclaration(String.format("String_Node_Str"));
  system.appendDeclaration("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str" + cache.getNumBlocks() + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ (cache.getNumBlocks() - 1)+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ NUM_METHODS+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
}
Program: 6305
Project: 6305
Buggy source:
public static void main(String[] args){
  DFAAppInfo program=new DFAAppInfo(new DFAClassInfo());
  program.parseOptions(args);
  try {
    program.load();
  }
 catch (  IOException exc) {
    exc.printStackTrace();
  }
  System.out.println("String_Node_Str");
  long startTime=System.currentTimeMillis();
  ReceiverTypes rt=new ReceiverTypes();
  program.setReceivers(program.runAnalysis(rt));
  long rtTime=System.currentTimeMillis();
  System.out.println("String_Node_Str" + (rtTime - startTime));
  LoopBounds lb=new LoopBounds();
  program.runAnalysis(lb);
  lb.printResult(program);
  long lbTime=System.currentTimeMillis();
  System.out.println("String_Node_Str" + (lbTime - rtTime));
}

Fixed version (ground truth):
public static void main(String[] args){
  DFAAppInfo program=new DFAAppInfo(new DFAClassInfo());
  program.parseOptions(args);
  try {
    program.load();
  }
 catch (  IOException exc) {
    exc.printStackTrace();
  }
  System.out.println("String_Node_Str");
  long startTime=System.currentTimeMillis();
  ReceiverTypes rt=new ReceiverTypes();
  program.setReceivers(program.runAnalysis(rt));
  rt.printResult(program);
  long rtTime=System.currentTimeMillis();
  System.out.println("String_Node_Str" + (rtTime - startTime));
  LoopBounds lb=new LoopBounds();
  program.runAnalysis(lb);
  lb.printResult(program);
  long lbTime=System.currentTimeMillis();
  System.out.println("String_Node_Str" + (lbTime - rtTime));
}
Program: 6307
Project: 6307
Buggy source:
public ValueMapping(ValueMapping val,boolean full){
  assigned=new Interval(val.assigned);
  constrained=new Interval(val.constrained);
  if (full) {
    if (val.increment != null) {
      increment=new Interval(val.increment);
    }
 else {
      increment=null;
    }
    source=val.source;
    cnt=val.cnt;
  }
 else {
    increment=null;
    source=null;
    cnt=0;
  }
}

Fixed version (ground truth):
public ValueMapping(ValueMapping val,boolean full){
  assigned=new Interval(val.assigned);
  constrained=new Interval(val.constrained);
  if (full) {
    if (val.increment != null) {
      increment=new Interval(val.increment);
    }
 else {
      increment=null;
    }
    source=val.source;
    cnt=val.cnt;
    defscope=val.defscope;
    softinc=val.softinc;
  }
 else {
    increment=null;
    source=null;
    cnt=0;
    defscope=scope;
    softinc=false;
  }
}
Program: 6308
Project: 6308
Buggy source:
public void printResult(DFAAppInfo program){
  for (Iterator<InstructionHandle> i=bounds.keySet().iterator(); i.hasNext(); ) {
    InstructionHandle instr=i.next();
    ContextMap<List<HashedString>,Pair<ValueMapping>> r=bounds.get(instr);
    Context c=r.getContext();
    LineNumberTable lines=program.getMethod(c.method).getMethod().getLineNumberTable();
    int sourceLine=lines.getSourceLine(instr.getPosition());
    for (Iterator<List<HashedString>> k=r.keySet().iterator(); k.hasNext(); ) {
      List<HashedString> callString=k.next();
      Pair<ValueMapping> bounds=r.get(callString);
      LoopBounds.ValueMapping first=bounds.getFirst();
      LoopBounds.ValueMapping second=bounds.getSecond();
      System.out.println(c.method + "String_Node_Str" + sourceLine+ "String_Node_Str"+ callString+ "String_Node_Str");
      System.out.print("String_Node_Str");
      System.out.println(first);
      System.out.print("String_Node_Str");
      System.out.println(second);
      System.out.print("String_Node_Str");
      int val=ValueMapping.computeBound(first,second);
      if (val >= 0) {
        System.out.println(val);
      }
 else {
        System.out.println("String_Node_Str");
      }
    }
  }
}

Fixed version (ground truth):
public void printResult(DFAAppInfo program){
  for (Iterator<InstructionHandle> i=bounds.keySet().iterator(); i.hasNext(); ) {
    InstructionHandle instr=i.next();
    ContextMap<List<HashedString>,Pair<ValueMapping>> r=bounds.get(instr);
    Context c=r.getContext();
    LineNumberTable lines=program.getMethod(c.method).getMethod().getLineNumberTable();
    int sourceLine=lines.getSourceLine(instr.getPosition());
    for (Iterator<List<HashedString>> k=r.keySet().iterator(); k.hasNext(); ) {
      List<HashedString> callString=k.next();
      Pair<ValueMapping> bounds=r.get(callString);
      LoopBounds.ValueMapping first=bounds.getFirst();
      LoopBounds.ValueMapping second=bounds.getSecond();
      System.out.println(c.method + "String_Node_Str" + sourceLine+ "String_Node_Str"+ callString+ "String_Node_Str"+ scopes.get(instr)+ "String_Node_Str");
      System.out.print("String_Node_Str");
      System.out.println(first);
      System.out.print("String_Node_Str");
      System.out.println(second);
      System.out.print("String_Node_Str");
      int val=getBound(program,instr);
      if (val >= 0) {
        System.out.println(val);
      }
 else {
        System.out.println("String_Node_Str");
      }
    }
  }
}
Program: 6310
Project: 6310
Buggy source:
public boolean equals(Object o){
  ValueMapping m=(ValueMapping)o;
  boolean inceq=false;
  if (increment == null && m.increment == null) {
    inceq=true;
  }
 else   if (increment == null || m.increment == null) {
    inceq=false;
  }
 else {
    inceq=increment.equals(m.increment);
  }
  return assigned.equals(m.assigned) && constrained.equals(m.constrained) && inceq;
}

Fixed version (ground truth):
public boolean equals(Object o){
  ValueMapping m=(ValueMapping)o;
  boolean inceq=false;
  if (increment == null && m.increment == null) {
    inceq=true;
  }
 else   if (increment == null || m.increment == null) {
    inceq=false;
  }
 else {
    inceq=increment.equals(m.increment);
  }
  return assigned.equals(m.assigned) && constrained.equals(m.constrained) && inceq&& softinc == m.softinc;
}
Program: 6311
Project: 6311
Buggy source:
public static int computeBound(ValueMapping first,ValueMapping second){
  if (first.increment == null || second.increment == null) {
    return -1;
  }
  if (!first.assigned.hasLb() || !first.assigned.hasUb() || !second.assigned.hasLb()|| !second.assigned.hasUb()) {
    return -1;
  }
  if (first.increment.getLb() * first.increment.getUb() <= 0 || second.increment.getLb() * second.increment.getUb() <= 0) {
    return -1;
  }
  int firstRange=first.assigned.getUb() - first.assigned.getLb() + 1;
  int secondRange=second.assigned.getUb() - second.assigned.getLb() + 1;
  if (firstRange < 0 || secondRange < 0) {
    return -1;
  }
  int firstBound;
  if (first.assigned.getUb() < first.assigned.getLb()) {
    firstBound=0;
  }
 else {
    firstBound=(int)Math.ceil((double)firstRange / Math.min(Math.abs(first.increment.getUb()),Math.abs(first.increment.getLb())));
  }
  int secondBound;
  if (second.assigned.getUb() < second.assigned.getLb()) {
    secondBound=0;
  }
 else {
    secondBound=(int)Math.ceil((double)secondRange / Math.min(Math.abs(second.increment.getUb()),Math.abs(second.increment.getLb())));
  }
  return Math.max(firstBound,secondBound);
}

Fixed version (ground truth):
public static int computeBound(ValueMapping first,ValueMapping second){
  if (first.increment == null || second.increment == null) {
    return -1;
  }
  if (!first.assigned.hasLb() || !first.assigned.hasUb() || !second.assigned.hasLb()|| !second.assigned.hasUb()) {
    return -1;
  }
  if (first.increment.getLb() * first.increment.getUb() <= 0 || second.increment.getLb() * second.increment.getUb() <= 0) {
    return -1;
  }
  int firstRange=first.assigned.getUb() - first.assigned.getLb() + 1;
  int secondRange=second.assigned.getUb() - second.assigned.getLb() + 1;
  int firstBound;
  if (first.assigned.getUb() < first.assigned.getLb()) {
    firstBound=0;
  }
 else {
    firstBound=(int)Math.ceil((double)firstRange / Math.min(Math.abs(first.increment.getUb()),Math.abs(first.increment.getLb())));
  }
  int secondBound;
  if (second.assigned.getUb() < second.assigned.getLb()) {
    secondBound=0;
  }
 else {
    secondBound=(int)Math.ceil((double)secondRange / Math.min(Math.abs(second.increment.getUb()),Math.abs(second.increment.getLb())));
  }
  return Math.max(firstBound,secondBound);
}
Program: 6312
Project: 6312
Buggy source:
public String toString(){
  return "String_Node_Str" + assigned + "String_Node_Str"+ constrained+ "String_Node_Str"+ source+ "String_Node_Str"+ cnt+ "String_Node_Str"+ increment+ "String_Node_Str";
}

Fixed version (ground truth):
public String toString(){
  return "String_Node_Str" + assigned + "String_Node_Str"+ constrained+ "String_Node_Str"+ source+ "String_Node_Str"+ cnt+ "String_Node_Str"+ increment+ "String_Node_Str"+ defscope+ "String_Node_Str"+ softinc+ "String_Node_Str";
}
Program: 6314
Project: 6314
Buggy source:
public int getBound(DFAAppInfo program,InstructionHandle instr){
  ContextMap<List<HashedString>,Pair<ValueMapping>> r=bounds.get(instr);
  if (r == null) {
    return -1;
  }
  int maxValue=-1;
  for (Iterator<List<HashedString>> k=r.keySet().iterator(); k.hasNext(); ) {
    List<HashedString> callString=k.next();
    Pair<ValueMapping> bounds=r.get(callString);
    LoopBounds.ValueMapping first=bounds.getFirst();
    LoopBounds.ValueMapping second=bounds.getSecond();
    int val=ValueMapping.computeBound(first,second);
    if (val < 0) {
      return -1;
    }
 else {
      maxValue=Math.max(maxValue,val);
    }
  }
  return maxValue;
}

Fixed version (ground truth):
public int getBound(DFAAppInfo program,InstructionHandle instr){
  ContextMap<List<HashedString>,Pair<ValueMapping>> r=bounds.get(instr);
  if (r == null) {
    return -1;
  }
  int maxValue=-1;
  for (Iterator<List<HashedString>> k=r.keySet().iterator(); k.hasNext(); ) {
    List<HashedString> callString=k.next();
    Pair<ValueMapping> bounds=r.get(callString);
    LoopBounds.ValueMapping first=bounds.getFirst();
    LoopBounds.ValueMapping second=bounds.getSecond();
    if (scopes.get(instr).intValue() <= first.defscope || scopes.get(instr).intValue() <= second.defscope) {
      return -1;
    }
    int val=ValueMapping.computeBound(first,second);
    if (val < 0) {
      return -1;
    }
 else {
      maxValue=Math.max(maxValue,val);
    }
  }
  return maxValue;
}
Program: 6316
Project: 6316
Buggy source:
public void exitUsage(boolean dumpConfig){
  System.err.println(MessageFormat.format("String_Node_Str" + "String_Node_Str",configFile,execClass.getCanonicalName()));
  System.err.println(MessageFormat.format("String_Node_Str",configFile,WCETAnalysis.class.getName(),ProjectConfig.APP_CLASS_NAME.getKey(),"String_Node_Str"));
  System.err.println("String_Node_Str" + "String_Node_Str");
  for (  Option<?> o : Config.instance().availableOptions()) {
    System.err.println("String_Node_Str" + o.toString(15));
  }
  System.err.println("String_Node_Str");
  if (dumpConfig)   System.err.println("String_Node_Str" + Config.instance().dumpConfiguration(4));
  System.exit(1);
}

Fixed version (ground truth):
public void exitUsage(boolean dumpConfig){
  printUsage(dumpConfig);
  System.exit(1);
}
Program: 6317
Project: 6317
Buggy source:
@Override public void appendDeclarations(NTASystem system,String NUM_METHODS){
  super.appendDeclarations(system,NUM_METHODS);
  system.appendDeclaration(String.format("String_Node_Str",NUM_METHODS,initNumBlocks()));
  system.appendDeclaration(String.format("String_Node_Str",NUM_METHODS,cache.getNumBlocks(),initCache(NUM_METHODS)));
  system.appendDeclaration(String.format("String_Node_Str"));
  system.appendDeclaration("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str" + cache.getNumBlocks() + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ (cache.getNumBlocks() - 1)+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
}

Fixed version (ground truth):
@Override public void appendDeclarations(NTASystem system,String NUM_METHODS){
  super.appendDeclarations(system,NUM_METHODS);
  system.appendDeclaration(String.format("String_Node_Str",NUM_METHODS,initNumBlocks()));
  system.appendDeclaration(String.format("String_Node_Str",NUM_METHODS,cache.getNumBlocks(),initCache(NUM_METHODS)));
  system.appendDeclaration(String.format("String_Node_Str"));
  system.appendDeclaration("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str" + cache.getNumBlocks() + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ (cache.getNumBlocks() - 1)+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ NUM_METHODS+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
}
Program: 6318
Project: 6318
Buggy source:
public static void main(String[] args){
  AppInfo program=new AppInfo(new ClassInfo());
  program.parseOptions(args);
  try {
    program.load();
  }
 catch (  IOException exc) {
    exc.printStackTrace();
  }
  ReceiverTypes rt=new ReceiverTypes();
  program.setReceivers(program.runAnalysis(rt));
  LoopBounds lb=new LoopBounds();
  program.runAnalysis(lb);
  lb.printResult(program);
}

Fixed version (ground truth):
public static void main(String[] args){
  DFAAppInfo program=new DFAAppInfo(new DFAClassInfo());
  program.parseOptions(args);
  try {
    program.load();
  }
 catch (  IOException exc) {
    exc.printStackTrace();
  }
  System.out.println("String_Node_Str");
  long startTime=System.currentTimeMillis();
  ReceiverTypes rt=new ReceiverTypes();
  program.setReceivers(program.runAnalysis(rt));
  long rtTime=System.currentTimeMillis();
  System.out.println("String_Node_Str" + (rtTime - startTime));
  LoopBounds lb=new LoopBounds();
  program.runAnalysis(lb);
  lb.printResult(program);
  long lbTime=System.currentTimeMillis();
  System.out.println("String_Node_Str" + (lbTime - rtTime));
}
Program: 6320
Project: 6320
Buggy source:
public void printResult(AppInfo program){
  for (Iterator<InstructionHandle> i=bounds.keySet().iterator(); i.hasNext(); ) {
    InstructionHandle instr=i.next();
    ContextMap<List<HashedString>,Pair<ValueMapping>> r=bounds.get(instr);
    Context c=r.getContext();
    LineNumberTable lines=program.getMethod(c.method).getMethod().getLineNumberTable();
    int sourceLine=lines.getSourceLine(instr.getPosition());
    for (Iterator<List<HashedString>> k=r.keySet().iterator(); k.hasNext(); ) {
      List<HashedString> callString=k.next();
      Pair<ValueMapping> bounds=r.get(callString);
      LoopBounds.ValueMapping first=bounds.getFirst();
      LoopBounds.ValueMapping second=bounds.getSecond();
      System.out.println(c.method + "String_Node_Str" + sourceLine+ "String_Node_Str"+ callString+ "String_Node_Str");
      System.out.print("String_Node_Str");
      System.out.println(first);
      System.out.print("String_Node_Str");
      System.out.println(second);
      System.out.print("String_Node_Str");
      int val=ValueMapping.computeBound(first,second);
      if (val >= 0) {
        System.out.println(val);
      }
 else {
        System.out.println("String_Node_Str");
      }
    }
  }
}

Fixed version (ground truth):
public void printResult(DFAAppInfo program){
  for (Iterator<InstructionHandle> i=bounds.keySet().iterator(); i.hasNext(); ) {
    InstructionHandle instr=i.next();
    ContextMap<List<HashedString>,Pair<ValueMapping>> r=bounds.get(instr);
    Context c=r.getContext();
    LineNumberTable lines=program.getMethod(c.method).getMethod().getLineNumberTable();
    int sourceLine=lines.getSourceLine(instr.getPosition());
    for (Iterator<List<HashedString>> k=r.keySet().iterator(); k.hasNext(); ) {
      List<HashedString> callString=k.next();
      Pair<ValueMapping> bounds=r.get(callString);
      LoopBounds.ValueMapping first=bounds.getFirst();
      LoopBounds.ValueMapping second=bounds.getSecond();
      System.out.println(c.method + "String_Node_Str" + sourceLine+ "String_Node_Str"+ callString+ "String_Node_Str");
      System.out.print("String_Node_Str");
      System.out.println(first);
      System.out.print("String_Node_Str");
      System.out.println(second);
      System.out.print("String_Node_Str");
      int val=ValueMapping.computeBound(first,second);
      if (val >= 0) {
        System.out.println(val);
      }
 else {
        System.out.println("String_Node_Str");
      }
    }
  }
}
Program: 6322
Project: 6322
Buggy source:
public int getBound(AppInfo program,InstructionHandle instr){
  ContextMap<List<HashedString>,Pair<ValueMapping>> r=bounds.get(instr);
  if (r == null) {
    return -1;
  }
  int maxValue=-1;
  for (Iterator<List<HashedString>> k=r.keySet().iterator(); k.hasNext(); ) {
    List<HashedString> callString=k.next();
    Pair<ValueMapping> bounds=r.get(callString);
    LoopBounds.ValueMapping first=bounds.getFirst();
    LoopBounds.ValueMapping second=bounds.getSecond();
    int val=ValueMapping.computeBound(first,second);
    if (val < 0) {
      return -1;
    }
 else {
      maxValue=Math.max(maxValue,val);
    }
  }
  return maxValue;
}

Fixed version (ground truth):
public int getBound(DFAAppInfo program,InstructionHandle instr){
  ContextMap<List<HashedString>,Pair<ValueMapping>> r=bounds.get(instr);
  if (r == null) {
    return -1;
  }
  int maxValue=-1;
  for (Iterator<List<HashedString>> k=r.keySet().iterator(); k.hasNext(); ) {
    List<HashedString> callString=k.next();
    Pair<ValueMapping> bounds=r.get(callString);
    LoopBounds.ValueMapping first=bounds.getFirst();
    LoopBounds.ValueMapping second=bounds.getSecond();
    int val=ValueMapping.computeBound(first,second);
    if (val < 0) {
      return -1;
    }
 else {
      maxValue=Math.max(maxValue,val);
    }
  }
  return maxValue;
}
Program: 6324
Project: 6324
Buggy source:
public void printResult(AppInfo program){
  System.out.println("String_Node_Str");
}

Fixed version (ground truth):
public void printResult(DFAAppInfo program){
  System.out.println("String_Node_Str");
}
Program: 6326
Project: 6326
Buggy source:
public void printHelp(PrintStream out){
  out.println("String_Node_Str");
  out.println("String_Node_Str");
  out.println("String_Node_Str");
  out.println("String_Node_Str");
  out.println("String_Node_Str");
  out.println("String_Node_Str");
  out.println("String_Node_Str");
  out.println("String_Node_Str");
  out.println("String_Node_Str");
  out.println("String_Node_Str");
  out.println("String_Node_Str");
  out.println("String_Node_Str");
  out.println("String_Node_Str");
  out.println("String_Node_Str");
  out.println("String_Node_Str");
  out.println("String_Node_Str");
  out.println("String_Node_Str");
  out.println("String_Node_Str");
  out.println("String_Node_Str");
  out.println("String_Node_Str");
  out.println("String_Node_Str");
  out.println("String_Node_Str");
  out.println("String_Node_Str");
  out.println("String_Node_Str");
  out.println("String_Node_Str");
}

Fixed version (ground truth):
public void printHelp(PrintStream out){
  out.println("String_Node_Str");
  out.println("String_Node_Str");
  out.println("String_Node_Str");
  out.println("String_Node_Str");
  out.println("String_Node_Str");
  out.println("String_Node_Str");
  out.println("String_Node_Str");
  out.println("String_Node_Str");
  out.println("String_Node_Str");
  out.println("String_Node_Str");
  out.println("String_Node_Str");
  out.println("String_Node_Str");
  out.println("String_Node_Str");
  out.println("String_Node_Str");
  out.println("String_Node_Str");
  out.println("String_Node_Str");
  out.println("String_Node_Str");
  out.println("String_Node_Str");
  out.println("String_Node_Str");
  out.println("String_Node_Str");
  out.println("String_Node_Str");
  out.println("String_Node_Str");
  out.println("String_Node_Str");
  out.println("String_Node_Str");
  out.println("String_Node_Str");
  out.println("String_Node_Str");
}
Program: 6330
Project: 6330
Buggy source:
/** 
 * Inline an invocation. This also sets the accessed fields to public if needed. The graph modified flag must be set, and the graph features must be updated correctly. This can be done by calling   {@link #setGraphModified(com.jopdesign.libgraph.cfg.ControlFlowGraph)}.
 * @see #findInlines
 * @see #checkSize(CheckResult,int)
 * @see #changeToPublic(java.util.Collection)
 * @param check the checkresult of the invocation to inline.
 * @return an inlineresult.
 */
public InlineResult doInline(CheckResult check) throws ActionException {
  changeToPublic(check.getChangePublic());
  InlineResult result;
  try {
    result=inliner.doInline(check);
  }
 catch (  GraphException e) {
    throw new ActionException("String_Node_Str",e);
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Inline an invocation. This also sets the accessed fields to public if needed. The graph modified flag must be set, and the graph features must be updated correctly. This can be done by calling   {@link #setGraphModified(com.jopdesign.libgraph.cfg.ControlFlowGraph)}.
 * @see #findInlines
 * @see #checkSize(CheckResult,int)
 * @see #changeToPublic(java.util.Collection)
 * @param check the checkresult of the invocation to inline.
 * @return an inlineresult.
 */
public InlineResult doInline(CheckResult check) throws ActionException {
  changeToPublic(check.getChangePublic());
  InlineResult result;
  try {
    result=inliner.doInline(check);
  }
 catch (  GraphException e) {
    throw new ActionException("String_Node_Str" + check.getInvokedMethod().getFQMethodName() + "String_Node_Str",e);
  }
  return result;
}
Program: 6332
Project: 6332
Buggy source:
/** 
 * Consume all command line options and turn them into properties.<br/> <p>The arguments are processed as follows: If an argument is of the form "-option" or "--option", it is considered to be an option. If an argument is an option, the next argument is considered to be the parameter, and we add the pair to our properties, consuming both arguments. The first non-option or the argument string   {@code --} terminates the option list.
 * @param argv The argument list
 * @param options The properties to update
 * @return An array of unconsumed arguments
 */
public String[] consumeOptions(String[] argv){
  int i=0;
  Vector<String> rest=new Vector<String>();
  while (i + 1 < argv.length && argv[i].startsWith("String_Node_Str") && !(argv[i].equals("String_Node_Str") || argv[i].equals("String_Node_Str"))) {
    String key, val;
    if (argv[i].charAt(1) == '-')     key=argv[i].substring(2);
 else     key=argv[i].substring(1);
    val=argv[i + 1];
    if (optionSet.containsKey(key)) {
      options.put(key,val);
    }
 else {
      rest.add(argv[i]);
      rest.add(argv[i + 1]);
    }
    i+=2;
  }
  for (; i < argv.length; i++)   rest.add(argv[i]);
  return rest.toArray(argv);
}

Fixed version (ground truth):
/** 
 * Consume all command line options and turn them into properties.<br/> <p>The arguments are processed as follows: If an argument is of the form "-option" or "--option", it is considered to be an option. If an argument is an option, the next argument is considered to be the parameter, and we add the pair to our properties, consuming both arguments. The first non-option or the argument string   {@code --} terminates the option list.
 * @param argv The argument list
 * @param options The properties to update
 * @return An array of unconsumed arguments
 */
public String[] consumeOptions(String[] argv){
  int i=0;
  Vector<String> rest=new Vector<String>();
  while (i + 1 < argv.length && argv[i].startsWith("String_Node_Str") && !(argv[i].equals("String_Node_Str") || argv[i].equals("String_Node_Str"))) {
    String key, val;
    if (argv[i].charAt(1) == '-')     key=argv[i].substring(2);
 else     key=argv[i].substring(1);
    val=argv[i + 1];
    if (optionSet.containsKey(key)) {
      options.put(key,val);
    }
 else {
      System.err.println("String_Node_Str" + key + "String_Node_Str"+ Arrays.toString(argv));
      rest.add(key);
      rest.add(val);
    }
    i+=2;
  }
  for (; i < argv.length; i++)   rest.add(argv[i]);
  String[] restArray=new String[rest.size()];
  return rest.toArray(restArray);
}
Program: 6333
Project: 6333
Buggy source:
private static void exitUsage(){
  System.err.println("String_Node_Str" + "String_Node_Str" + CONFIG_FILE_PROP + "String_Node_Str"+ WCETAnalysis.class.getCanonicalName()+ "String_Node_Str");
  System.err.println("String_Node_Str" + "String_Node_Str" + CONFIG_FILE_PROP + "String_Node_Str"+ WCETAnalysis.class.getName()+ "String_Node_Str"+ CacheConfig.BLOCK_SIZE+ "String_Node_Str"+ "String_Node_Str"+ Config.ROOT_CLASS_NAME+ "String_Node_Str");
  System.err.print("String_Node_Str");
  System.err.println("String_Node_Str");
  for (  Option o : Config.availableOptions()) {
    System.err.println("String_Node_Str" + o.toString(15));
  }
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str" + Config.instance().getOptions());
  System.err.println("String_Node_Str" + System.getProperties());
  System.exit(1);
}

Fixed version (ground truth):
private static void exitUsage(){
  System.err.println("String_Node_Str" + "String_Node_Str" + CONFIG_FILE_PROP + "String_Node_Str"+ WCETAnalysis.class.getCanonicalName()+ "String_Node_Str");
  System.err.println("String_Node_Str" + "String_Node_Str" + CONFIG_FILE_PROP + "String_Node_Str"+ WCETAnalysis.class.getName()+ "String_Node_Str"+ CacheConfig.BLOCK_SIZE+ "String_Node_Str"+ "String_Node_Str"+ Config.ROOT_CLASS_NAME+ "String_Node_Str");
  System.err.print("String_Node_Str");
  System.err.println("String_Node_Str");
  for (  Option o : Config.availableOptions()) {
    System.err.println("String_Node_Str" + o.toString(15));
  }
  System.err.println("String_Node_Str");
  System.err.println("String_Node_Str" + Config.instance().getOptions());
  System.exit(1);
}
Program: 6334
Project: 6334
Buggy source:
/** 
 * @param args
 */
private static void loadConfig(String[] args){
  try {
    String[] argsrest=Config.load(System.getProperty(CONFIG_FILE_PROP),args);
    Config c=Config.instance();
    if (argsrest.length != 0 || c.helpRequested())     exitUsage();
    tlLogger.info("String_Node_Str" + Config.instance().getOptions());
    c.checkOptions();
    if (Config.instance().hasReportDir()) {
      tlLogger.info("String_Node_Str");
      Config.instance().initializeReport();
    }
  }
 catch (  MissingConfigurationError e) {
    System.err.println("String_Node_Str" + e.getMessage());
    exitUsage();
  }
catch (  BadConfigurationError e) {
    System.err.println("String_Node_Str" + e.getMessage());
    exitUsage();
  }
catch (  Exception e) {
    e.printStackTrace();
    System.err.println("String_Node_Str");
    System.err.println("String_Node_Str");
    System.exit(1);
  }
}

Fixed version (ground truth):
/** 
 * @param args
 */
private static void loadConfig(String[] args){
  try {
    String[] argsrest=Config.load(System.getProperty(CONFIG_FILE_PROP),args);
    Config c=Config.instance();
    if (c.helpRequested())     exitUsage();
    if (argsrest.length != 0) {
      System.err.println("String_Node_Str" + Arrays.toString(argsrest));
      exitUsage();
    }
    tlLogger.info("String_Node_Str" + Config.instance().getOptions());
    c.checkOptions();
    if (Config.instance().hasReportDir()) {
      tlLogger.info("String_Node_Str");
      Config.instance().initializeReport();
    }
  }
 catch (  MissingConfigurationError e) {
    System.err.println("String_Node_Str" + e.getMessage());
    exitUsage();
  }
catch (  BadConfigurationError e) {
    System.err.println("String_Node_Str" + e.getMessage());
    exitUsage();
  }
catch (  Exception e) {
    e.printStackTrace();
    System.err.println("String_Node_Str");
    System.err.println("String_Node_Str");
    System.exit(1);
  }
}
Program: 6335
Project: 6335
Buggy source:
/** 
 * Find a local variable based on an entry in the LocalVariableTable attribute.
 * @see http://java.sun.com/docs/books/vmspec/2nd-edition/html/ClassFile.doc.html#5956
 * @param index
 * @param pc
 * @return local variable type and name or "NA"
 */
public String getLocalVarName(int index,int pc){
  LocalVariableTable lvt=mi.getMethod().getLocalVariableTable();
  String lvName="String_Node_Str";
  boolean match=false;
  if (lvt != null) {
    LocalVariable[] lva=lvt.getLocalVariableTable();
    for (int i=0; i < lva.length; i++) {
      LocalVariable lv=lva[i];
      if (lv.getIndex() == index) {
        if (pc >= lv.getStartPC()) {
          if (pc <= lv.getStartPC() + lv.getLength()) {
            lvName=lv.getSignature() + "String_Node_Str" + lv.getName();
            if (match) {
              System.out.println("String_Node_Str");
              System.exit(-1);
            }
            match=true;
          }
        }
      }
    }
  }
  return lvName;
}

Fixed version (ground truth):
/** 
 * Find a local variable based on an entry in the LocalVariableTable attribute.
 * @see http://java.sun.com/docs/books/vmspec/2nd-edition/html/ClassFile.doc.html#5956
 * @param index
 * @param pc
 * @return local variable type and name or "NA"
 */
public String getLocalVarName(int index,int pc){
  LocalVariableTable lvt=mi.getMethod().getLocalVariableTable();
  String lvName="String_Node_Str";
  boolean match=false;
  if (lvt != null) {
    LocalVariable[] lva=lvt.getLocalVariableTable();
    for (int i=0; i < lva.length; i++) {
      LocalVariable lv=lva[i];
      if (lv.getIndex() == index) {
        if (pc >= lv.getStartPC()) {
          if (pc <= lv.getStartPC() + lv.getLength()) {
            if (match && !lvName.equals(lv.getSignature() + "String_Node_Str" + lv.getName())) {
              System.out.println("String_Node_Str");
              System.exit(-1);
            }
            lvName=lv.getSignature() + "String_Node_Str" + lv.getName();
            match=true;
          }
        }
      }
    }
  }
  return lvName;
}
Program: 6337
Project: 6337
Buggy source:
/** 
 * Method getFunctionOutput, which will return the functional output for point represented by a input vector only.
 * @param xtest -the input vector
 * @return the functinal output
 */
static public int getFunctionOutputTestPointFP(int[] xtest){
  int functionalOutput_fp=0;
  int[][] data_fp_local=data_fp;
  int m=data_fp_local.length;
  int n=xtest.length;
  for (int i=0; i < m; i++) {
    if (alpha_fp[i] > 0) {
      while (n != 0) {
        n=n - 1;
        functionalOutput_fp+=(data_fp_local[m][n] >> 8) * (xtest[n] >> 8);
      }
    }
  }
  functionalOutput_fp-=bias_fp;
  return functionalOutput_fp;
}

Fixed version (ground truth):
/** 
 * Method getFunctionOutput, which will return the functional output for point represented by a input vector only.
 * @param xtest -the input vector
 * @return the functinal output
 */
static public int getFunctionOutputTestPointFP(int[] xtest){
  int functionalOutput_fp=0;
  int[][] data_fp_local=data_fp;
  int m=data_fp_local.length;
  int n=xtest.length;
  int n2=data_fp_local[0].length;
  for (int i=0; i < m; i++) {
    if (alpha_fp[i] > 0) {
      n=xtest.length;
      while (n != 0) {
        n=n - 1;
        functionalOutput_fp+=(data_fp_local[i][n] >> 8) * (xtest[n] >> 8);
      }
    }
  }
  functionalOutput_fp-=bias_fp;
  return functionalOutput_fp;
}
Program: 6341
Project: 6341
Buggy source:
public int size(){
  return variables.size();
}

Fixed version (ground truth):
public int size(){
  return variables.size() + 1;
}
Program: 6342
Project: 6342
Buggy source:
protected void compileGraph(ControlFlowGraph graph) throws GraphException {
  ConstantPoolGen cpg=methodInfo.getConstantPoolGen();
  BcelGraphCompiler compiler=new BcelGraphCompiler(methodInfo.getClassInfo(),cpg);
  method=compiler.compile(graph,methodInfo.getClassInfo().getClassName(),method);
  methodInfo.setMethod(method);
}

Fixed version (ground truth):
protected void compileGraph(ControlFlowGraph graph) throws GraphException {
  ConstantPoolGen cpg=methodInfo.getConstantPoolGen();
  ClassInfo classInfo=methodInfo.getClassInfo();
  BcelGraphCompiler compiler=new BcelGraphCompiler(classInfo,cpg);
  method=compiler.compile(graph,classInfo.getClassName(),method);
  methodInfo.setMethod(method);
}
Program: 6344
Project: 6344
Buggy source:
public StmtHandle processStatement(StmtHandle stmt){
  PutfieldStmt put=(PutfieldStmt)stmt.getStatement();
  StmtHandle nextStmt=stmt.getNext();
  if (nextStmt == null || !(nextStmt.getStatement() instanceof GetfieldStmt)) {
    return null;
  }
  GetfieldStmt get=(GetfieldStmt)nextStmt.getStatement();
  if (!get.getConstantField().equals(put.getConstantField())) {
    return null;
  }
  if (get.getConstantField().isAnonymous() || get.getConstantField().getFieldInfo().isVolatile()) {
    return null;
  }
  stmt.setStatement(new StackDup(put.getConstantField().getFieldInfo().getType()));
  nextStmt.setStatement(put);
  return nextStmt;
}

Fixed version (ground truth):
public StmtHandle processStatement(StmtHandle stmt){
  PutfieldStmt put=(PutfieldStmt)stmt.getStatement();
  StmtHandle nextStmt=stmt.getNext();
  if (nextStmt == null || !(nextStmt.getStatement() instanceof GetfieldStmt)) {
    return null;
  }
  GetfieldStmt get=(GetfieldStmt)nextStmt.getStatement();
  if (!get.getConstantField().equals(put.getConstantField())) {
    return null;
  }
  if (get.getConstantField().isAnonymous() || get.getConstantField().getFieldInfo().isVolatile()) {
    return null;
  }
  if (!get.isStatic() || !put.isStatic()) {
    return null;
  }
  stmt.setStatement(new StackDup(put.getConstantField().getFieldInfo().getType()));
  nextStmt.setStatement(put);
  return nextStmt;
}
Program: 6345
Project: 6345
Buggy source:
static void markAndCopy(){
  int i, ref;
  getStaticRoots();
  if (!concurrentGc) {
    getStackRoots();
  }
  for (; ; ) {
synchronized (mutex) {
      ref=greyList;
      if (ref == GREY_END) {
        break;
      }
      greyList=Native.rdMem(ref + OFF_GREY);
      Native.wrMem(0,ref + OFF_GREY);
    }
    if (Native.rdMem(ref + OFF_SPACE) == toSpace) {
      continue;
    }
    int addr=Native.rdMem(ref);
    int flags=Native.rdMem(ref + OFF_TYPE);
    if (flags == IS_REFARR) {
      int size=Native.rdMem(ref + OFF_MTAB_ALEN);
      for (i=0; i < size; ++i) {
        push(Native.rdMem(addr + i));
      }
    }
 else     if (flags == IS_OBJ) {
      flags=Native.rdMem(ref + OFF_MTAB_ALEN);
      flags=Native.rdMem(flags + Const.MTAB2GC_INFO);
      for (i=0; flags != 0; ++i) {
        if ((flags & 1) != 0) {
          push(Native.rdMem(addr + i));
        }
        flags>>>=1;
      }
    }
    int size;
    int dest;
synchronized (mutex) {
      size=Native.rdMem(ref + OFF_SIZE);
      dest=copyPtr;
      copyPtr+=size;
      Native.wrMem(toSpace,ref + OFF_SPACE);
    }
    if (size > 0) {
      for (i=0; i < size; i++) {
        Native.memCopy(dest,addr,i);
      }
    }
    Native.wrMem(dest,ref + OFF_PTR);
    for (i=0; i < 10; i++)     ;
    Native.memCopy(dest,dest,-1);
  }
}

Fixed version (ground truth):
static void markAndCopy(){
  int i, ref;
  if (!concurrentGc) {
    getStackRoots();
  }
  getStaticRoots();
  for (; ; ) {
synchronized (mutex) {
      ref=greyList;
      if (ref == GREY_END) {
        break;
      }
      greyList=Native.rdMem(ref + OFF_GREY);
      Native.wrMem(0,ref + OFF_GREY);
    }
    if (Native.rdMem(ref + OFF_SPACE) == toSpace) {
      continue;
    }
    int addr=Native.rdMem(ref);
    int flags=Native.rdMem(ref + OFF_TYPE);
    if (flags == IS_REFARR) {
      int size=Native.rdMem(ref + OFF_MTAB_ALEN);
      for (i=0; i < size; ++i) {
        push(Native.rdMem(addr + i));
      }
    }
 else     if (flags == IS_OBJ) {
      flags=Native.rdMem(ref + OFF_MTAB_ALEN);
      flags=Native.rdMem(flags + Const.MTAB2GC_INFO);
      for (i=0; flags != 0; ++i) {
        if ((flags & 1) != 0) {
          push(Native.rdMem(addr + i));
        }
        flags>>>=1;
      }
    }
    int size;
    int dest;
synchronized (mutex) {
      size=Native.rdMem(ref + OFF_SIZE);
      dest=copyPtr;
      copyPtr+=size;
      Native.wrMem(toSpace,ref + OFF_SPACE);
    }
    if (size > 0) {
      for (i=0; i < size; i++) {
        Native.memCopy(dest,addr,i);
      }
    }
    Native.wrMem(dest,ref + OFF_PTR);
    for (i=0; i < 10; i++)     ;
    Native.memCopy(dest,dest,-1);
  }
}
Program: 6346
Project: 6346
Buggy source:
public void initArchitecture(String arch) throws ConfigurationException {
  if ("String_Node_Str".equals(arch)) {
    URL config=getClass().getResource("String_Node_Str");
    setArchConfig(config);
  }
 else   if ("String_Node_Str".equals(arch)) {
    URL config=getClass().getResource("String_Node_Str");
    setArchConfig(config);
    if (!isSet(CONF_LIBRARY_PATH)) {
      setOption(CONF_LIBRARY_PATH,"String_Node_Str");
    }
  }
 else {
    throw new ConfigurationException("String_Node_Str" + arch + "String_Node_Str");
  }
}

Fixed version (ground truth):
public void initArchitecture(String arch) throws ConfigurationException {
  if ("String_Node_Str".equals(arch)) {
    URL config=getClass().getResource("String_Node_Str");
    if (config == null) {
      throw new ConfigurationException("String_Node_Str");
    }
    setArchConfig(config);
  }
 else   if ("String_Node_Str".equals(arch)) {
    URL config=getClass().getResource("String_Node_Str");
    if (config == null) {
      throw new ConfigurationException("String_Node_Str");
    }
    setArchConfig(config);
    if (!isSet(CONF_LIBRARY_PATH)) {
      setOption(CONF_LIBRARY_PATH,"String_Node_Str");
    }
  }
 else {
    throw new ConfigurationException("String_Node_Str" + arch + "String_Node_Str");
  }
}
Program: 6348
Project: 6348
Buggy source:
public void changeToPublic(Collection changePublic){
  for (Iterator it=changePublic.iterator(); it.hasNext(); ) {
    ModifierInfo mod=(ModifierInfo)it.next();
    if (mod instanceof MethodInfo && mod.isPrivate() && !((MethodInfo)mod).getName().equals("String_Node_Str")) {
      mod.setFinal(true);
    }
    mod.setAccessType(ModifierInfo.ACC_PUBLIC);
  }
}

Fixed version (ground truth):
public boolean changeToPublic(Collection changePublic){
  for (Iterator it=changePublic.iterator(); it.hasNext(); ) {
    ModifierInfo mod=(ModifierInfo)it.next();
    if (mod instanceof MethodInfo && mod.isPrivate() && !((MethodInfo)mod).getName().equals("String_Node_Str")) {
      try {
        setVirtual((MethodInfo)mod);
      }
 catch (      GraphException e) {
        return false;
      }
      mod.setFinal(true);
    }
    mod.setAccessType(ModifierInfo.ACC_PUBLIC);
  }
  return true;
}