Program: 186786
Project: 186786
Buggy source:
private void doInvokeVirtual(String receiver,MethodInfo method,InstructionHandle stmt,Context context,ContextMap<CallString,Set<TypeMapping>> input,Interpreter<CallString,Set<TypeMapping>> interpreter,Map<InstructionHandle,ContextMap<CallString,Set<TypeMapping>>> state,ContextMap<CallString,Set<TypeMapping>> result){
  String methodImplName=method.getClassName() + "String_Node_Str" + method.getMethodSignature();
  recordReceiver(stmt,context,methodImplName);
  int varPtr=context.stackPtr - MethodHelper.getArgSize(method);
  Context c=new Context(context);
  c.stackPtr=method.getCode().getMaxLocals();
  if (method.isSynchronized()) {
    c.syncLevel=context.syncLevel + 1;
  }
  c.setMethodInfo(method);
  c.callString=c.callString.push(context.getMethodInfo(),stmt,callStringLength);
  boolean threaded=false;
  DFATool p=interpreter.getDFATool();
  if (p.getAppInfo().getClassInfo(receiver).isSubclassOf(p.getAppInfo().getClassInfo("String_Node_Str")) && "String_Node_Str".equals(method.getMethodSignature())) {
    c.createThread();
    threaded=true;
  }
  Set<TypeMapping> in=input.get(context.callString);
  Set<TypeMapping> out=new HashSet<TypeMapping>();
  ContextMap<CallString,Set<TypeMapping>> tmpresult=new ContextMap<CallString,Set<TypeMapping>>(c,new HashMap<CallString,Set<TypeMapping>>());
  tmpresult.put(c.callString,out);
  for (  TypeMapping m : in) {
    if (m.stackLoc < 0) {
      out.add(m);
    }
    if (m.stackLoc > varPtr) {
      out.add(new TypeMapping(m.stackLoc - varPtr,m.type));
    }
    if (m.stackLoc == varPtr) {
      ClassInfo staticClass=p.getAppInfo().getClassInfo(receiver);
      ClassInfo dynamicClass=null;
      try {
        p.getAppInfo().getClassInfo(m.type.split("String_Node_Str")[0]);
      }
 catch (      MissingClassError ex) {
        Logger.getLogger(this.getClass()).error("String_Node_Str" + staticClass + "String_Node_Str"+ ex);
      }
      if (dynamicClass != null && dynamicClass.isSubclassOf(staticClass)) {
        out.add(new TypeMapping(0,m.type));
      }
    }
  }
  InstructionHandle entry=p.getEntryHandle(method);
  state.put(entry,join(state.get(entry),tmpresult));
  Map<InstructionHandle,ContextMap<CallString,Set<TypeMapping>>> r=interpreter.interpret(c,entry,state,false);
  InstructionHandle exit=p.getExitHandle(method);
  if (r.get(exit) != null) {
    Set<TypeMapping> returned=r.get(exit).get(c.callString);
    if (returned != null) {
      filterReturnSet(returned,result.get(context.callString),varPtr);
    }
  }
  if (threaded) {
    threads.put(methodImplName,new ContextMap<CallString,Set<TypeMapping>>(c,result));
    updateThreads(result,interpreter,state);
  }
}

Fixed version (ground truth):
private void doInvokeVirtual(String receiver,MethodInfo method,InstructionHandle stmt,Context context,ContextMap<CallString,Set<TypeMapping>> input,Interpreter<CallString,Set<TypeMapping>> interpreter,Map<InstructionHandle,ContextMap<CallString,Set<TypeMapping>>> state,ContextMap<CallString,Set<TypeMapping>> result){
  String methodImplName=method.getClassName() + "String_Node_Str" + method.getMethodSignature();
  recordReceiver(stmt,context,methodImplName);
  int varPtr=context.stackPtr - MethodHelper.getArgSize(method);
  Context c=new Context(context);
  c.stackPtr=method.getCode().getMaxLocals();
  if (method.isSynchronized()) {
    c.syncLevel=context.syncLevel + 1;
  }
  c.setMethodInfo(method);
  c.callString=c.callString.push(context.getMethodInfo(),stmt,callStringLength);
  boolean threaded=false;
  DFATool p=interpreter.getDFATool();
  if (p.getAppInfo().getClassInfo(receiver).isSubclassOf(p.getAppInfo().getClassInfo("String_Node_Str")) && "String_Node_Str".equals(method.getMethodSignature())) {
    c.createThread();
    threaded=true;
  }
  Set<TypeMapping> in=input.get(context.callString);
  Set<TypeMapping> out=new HashSet<TypeMapping>();
  ContextMap<CallString,Set<TypeMapping>> tmpresult=new ContextMap<CallString,Set<TypeMapping>>(c,new HashMap<CallString,Set<TypeMapping>>());
  tmpresult.put(c.callString,out);
  for (  TypeMapping m : in) {
    if (m.stackLoc < 0) {
      out.add(m);
    }
    if (m.stackLoc > varPtr) {
      out.add(new TypeMapping(m.stackLoc - varPtr,m.type));
    }
    if (m.stackLoc == varPtr) {
      ClassInfo staticClass=p.getAppInfo().getClassInfo(receiver);
      ClassInfo dynamicClass=null;
      try {
        dynamicClass=p.getAppInfo().getClassInfo(m.type.split("String_Node_Str")[0]);
      }
 catch (      MissingClassError ex) {
        logger.error("String_Node_Str" + staticClass + "String_Node_Str"+ ex);
      }
      if (dynamicClass != null && dynamicClass.isSubclassOf(staticClass)) {
        out.add(new TypeMapping(0,m.type));
      }
    }
  }
  InstructionHandle entry=p.getEntryHandle(method);
  state.put(entry,join(state.get(entry),tmpresult));
  Map<InstructionHandle,ContextMap<CallString,Set<TypeMapping>>> r=interpreter.interpret(c,entry,state,false);
  InstructionHandle exit=p.getExitHandle(method);
  if (r.get(exit) != null) {
    Set<TypeMapping> returned=r.get(exit).get(c.callString);
    if (returned != null) {
      filterReturnSet(returned,result.get(context.callString),varPtr);
    }
  }
  if (threaded) {
    threads.put(methodImplName,new ContextMap<CallString,Set<TypeMapping>>(c,result));
    updateThreads(result,interpreter,state);
  }
}