Program: 6331
Project: 6331
Buggy source:
private void updateThreads(Map<TypeMapping,TypeMapping> input,Interpreter<TypeMapping,TypeMapping> interpreter,Map<InstructionHandle,ContextMap<TypeMapping,TypeMapping>> state){
  DFAAppInfo p=interpreter.getProgram();
  boolean modified=true;
  while (modified) {
    modified=false;
    for (Iterator<String> k=threads.keySet().iterator(); k.hasNext(); ) {
      String methodName=k.next();
      MethodGen method=p.getMethod(methodName).getMethodGen();
      InstructionHandle entry=method.getInstructionList().getStart();
      Context c=state.get(entry).getContext();
      int varPtr=c.stackPtr - MethodHelper.getArgSize(method);
      ContextMap<TypeMapping,TypeMapping> threadInput=new ContextMap<TypeMapping,TypeMapping>(c,new HashMap<TypeMapping,TypeMapping>());
      filterSet(input,threadInput,0);
      state.put(entry,join(state.get(entry),threadInput));
      ContextMap<TypeMapping,TypeMapping> savedResult=threads.get(methodName);
      Map<InstructionHandle,ContextMap<TypeMapping,TypeMapping>> r=interpreter.interpret(c,entry,state,false);
      InstructionHandle exit=method.getInstructionList().getEnd();
      ContextMap<TypeMapping,TypeMapping> threadResult;
      if (r.get(exit) != null) {
        threadResult=new ContextMap<TypeMapping,TypeMapping>(c,new HashMap<TypeMapping,TypeMapping>());
        filterReturnSet(r.get(exit),threadResult,varPtr);
      }
 else {
        threadResult=new ContextMap<TypeMapping,TypeMapping>(c,new HashMap<TypeMapping,TypeMapping>());
      }
      if (!threadResult.equals(savedResult)) {
        modified=true;
      }
      threads.put(methodName,threadResult);
    }
  }
}

Fixed version (ground truth):
private void updateThreads(Map<TypeMapping,TypeMapping> input,Interpreter<TypeMapping,TypeMapping> interpreter,Map<InstructionHandle,ContextMap<TypeMapping,TypeMapping>> state){
  DFAAppInfo p=interpreter.getProgram();
  boolean modified=true;
  while (modified) {
    modified=false;
    Map<String,ContextMap<TypeMapping,TypeMapping>> tmpThreads=new LinkedHashMap<String,ContextMap<TypeMapping,TypeMapping>>();
    for (Iterator<String> k=threads.keySet().iterator(); k.hasNext(); ) {
      String methodName=k.next();
      MethodGen method=p.getMethod(methodName).getMethodGen();
      InstructionHandle entry=method.getInstructionList().getStart();
      Context c=state.get(entry).getContext();
      int varPtr=c.stackPtr - MethodHelper.getArgSize(method);
      ContextMap<TypeMapping,TypeMapping> threadInput=new ContextMap<TypeMapping,TypeMapping>(c,new HashMap<TypeMapping,TypeMapping>());
      filterSet(input,threadInput,0);
      state.put(entry,join(state.get(entry),threadInput));
      ContextMap<TypeMapping,TypeMapping> savedResult=threads.get(methodName);
      Map<InstructionHandle,ContextMap<TypeMapping,TypeMapping>> r=interpreter.interpret(c,entry,state,false);
      InstructionHandle exit=method.getInstructionList().getEnd();
      ContextMap<TypeMapping,TypeMapping> threadResult;
      if (r.get(exit) != null) {
        threadResult=new ContextMap<TypeMapping,TypeMapping>(c,new HashMap<TypeMapping,TypeMapping>());
        filterReturnSet(r.get(exit),threadResult,varPtr);
      }
 else {
        threadResult=new ContextMap<TypeMapping,TypeMapping>(c,new HashMap<TypeMapping,TypeMapping>());
      }
      if (!threadResult.equals(savedResult)) {
        modified=true;
      }
      tmpThreads.put(methodName,threadResult);
    }
    threads=tmpThreads;
  }
}