Program: 187053
Project: 187053
Buggy source:
public ContextMap<List<HashedString>,CacheMapping> transfer(InstructionHandle stmt,FlowEdge edge,ContextMap<List<HashedString>,CacheMapping> input,Interpreter<List<HashedString>,CacheMapping> interpreter,Map<InstructionHandle,ContextMap<List<HashedString>,CacheMapping>> state){
  Context context=new Context(input.getContext());
  ContextMap<List<HashedString>,CacheMapping> result;
  Instruction instruction=stmt.getInstruction();
switch (instruction.getOpcode()) {
case Constants.INVOKEVIRTUAL:
case Constants.INVOKEINTERFACE:
case Constants.INVOKESPECIAL:
case Constants.INVOKESTATIC:
{
      result=new ContextMap<List<HashedString>,CacheMapping>(context,new HashMap<List<HashedString>,CacheMapping>());
      AppInfo p=interpreter.getProgram();
      ContextMap<String,String> receivers=p.getReceivers().get(stmt);
      if (receivers == null) {
        System.out.println(context.method + "String_Node_Str" + instruction.toString(context.constPool.getConstantPool())+ "String_Node_Str");
        break;
      }
      for (Iterator<String> i=receivers.keySet().iterator(); i.hasNext(); ) {
        String methodName=i.next();
        doInvoke(methodName,stmt,input,interpreter,state,result);
      }
    }
  return result;
case Constants.PUTFIELD:
{
  FieldInstruction instr=(FieldInstruction)instruction;
  if (instr.getFieldType(context.constPool) instanceof ReferenceType) {
    result=new ContextMap<List<HashedString>,CacheMapping>(context,new HashMap<List<HashedString>,CacheMapping>());
    String methodName="String_Node_Str";
    doInvoke(methodName,stmt,input,interpreter,state,result);
    return result;
  }
}
break;
case Constants.PUTSTATIC:
{
FieldInstruction instr=(FieldInstruction)instruction;
if (instr.getFieldType(context.constPool) instanceof ReferenceType) {
result=new ContextMap<List<HashedString>,CacheMapping>(context,new HashMap<List<HashedString>,CacheMapping>());
String methodName="String_Node_Str";
doInvoke(methodName,stmt,input,interpreter,state,result);
return result;
}
}
break;
case Constants.AASTORE:
{
result=new ContextMap<List<HashedString>,CacheMapping>(context,new HashMap<List<HashedString>,CacheMapping>());
String methodName="String_Node_Str";
doInvoke(methodName,stmt,input,interpreter,state,result);
}
return result;
case Constants.NEW:
{
result=new ContextMap<List<HashedString>,CacheMapping>(context,new HashMap<List<HashedString>,CacheMapping>());
String methodName="String_Node_Str" + stmt.getInstruction().getName() + "String_Node_Str";
doInvoke(methodName,stmt,input,interpreter,state,result);
}
return result;
case Constants.NEWARRAY:
case Constants.ANEWARRAY:
{
result=new ContextMap<List<HashedString>,CacheMapping>(context,new HashMap<List<HashedString>,CacheMapping>());
String methodName="String_Node_Str" + stmt.getInstruction().getName() + "String_Node_Str";
doInvoke(methodName,stmt,input,interpreter,state,result);
}
return result;
case Constants.LADD:
case Constants.LAND:
case Constants.LOR:
case Constants.LXOR:
{
result=new ContextMap<List<HashedString>,CacheMapping>(context,new HashMap<List<HashedString>,CacheMapping>());
String methodName="String_Node_Str" + stmt.getInstruction().getName() + "String_Node_Str";
doInvoke(methodName,stmt,input,interpreter,state,result);
}
return result;
case Constants.LSUB:
case Constants.LMUL:
case Constants.LDIV:
case Constants.LREM:
{
result=new ContextMap<List<HashedString>,CacheMapping>(context,new HashMap<List<HashedString>,CacheMapping>());
String methodName="String_Node_Str" + stmt.getInstruction().getName() + "String_Node_Str";
doInvoke(methodName,stmt,input,interpreter,state,result);
}
return result;
case Constants.LSHL:
case Constants.LSHR:
case Constants.LUSHR:
{
result=new ContextMap<List<HashedString>,CacheMapping>(context,new HashMap<List<HashedString>,CacheMapping>());
String methodName="String_Node_Str" + stmt.getInstruction().getName() + "String_Node_Str";
doInvoke(methodName,stmt,input,interpreter,state,result);
}
return result;
}
return input;
}

Fixed version (ground truth):
public ContextMap<List<HashedString>,CacheMapping> transfer(InstructionHandle stmt,FlowEdge edge,ContextMap<List<HashedString>,CacheMapping> input,Interpreter<List<HashedString>,CacheMapping> interpreter,Map<InstructionHandle,ContextMap<List<HashedString>,CacheMapping>> state){
  Context context=new Context(input.getContext());
  ContextMap<List<HashedString>,CacheMapping> result;
  Instruction instruction=stmt.getInstruction();
switch (instruction.getOpcode()) {
case Constants.INVOKEVIRTUAL:
case Constants.INVOKEINTERFACE:
case Constants.INVOKESPECIAL:
case Constants.INVOKESTATIC:
{
      result=new ContextMap<List<HashedString>,CacheMapping>(context,new HashMap<List<HashedString>,CacheMapping>());
      DFAAppInfo p=interpreter.getProgram();
      ContextMap<String,String> receivers=p.getReceivers().get(stmt);
      if (receivers == null) {
        System.out.println(context.method + "String_Node_Str" + instruction.toString(context.constPool.getConstantPool())+ "String_Node_Str");
        break;
      }
      for (Iterator<String> i=receivers.keySet().iterator(); i.hasNext(); ) {
        String methodName=i.next();
        doInvoke(methodName,stmt,input,interpreter,state,result);
      }
    }
  return result;
case Constants.PUTFIELD:
{
  FieldInstruction instr=(FieldInstruction)instruction;
  if (instr.getFieldType(context.constPool) instanceof ReferenceType) {
    result=new ContextMap<List<HashedString>,CacheMapping>(context,new HashMap<List<HashedString>,CacheMapping>());
    String methodName="String_Node_Str";
    doInvoke(methodName,stmt,input,interpreter,state,result);
    return result;
  }
}
break;
case Constants.PUTSTATIC:
{
FieldInstruction instr=(FieldInstruction)instruction;
if (instr.getFieldType(context.constPool) instanceof ReferenceType) {
result=new ContextMap<List<HashedString>,CacheMapping>(context,new HashMap<List<HashedString>,CacheMapping>());
String methodName="String_Node_Str";
doInvoke(methodName,stmt,input,interpreter,state,result);
return result;
}
}
break;
case Constants.AASTORE:
{
result=new ContextMap<List<HashedString>,CacheMapping>(context,new HashMap<List<HashedString>,CacheMapping>());
String methodName="String_Node_Str";
doInvoke(methodName,stmt,input,interpreter,state,result);
}
return result;
case Constants.NEW:
{
result=new ContextMap<List<HashedString>,CacheMapping>(context,new HashMap<List<HashedString>,CacheMapping>());
String methodName="String_Node_Str" + stmt.getInstruction().getName() + "String_Node_Str";
doInvoke(methodName,stmt,input,interpreter,state,result);
}
return result;
case Constants.NEWARRAY:
case Constants.ANEWARRAY:
{
result=new ContextMap<List<HashedString>,CacheMapping>(context,new HashMap<List<HashedString>,CacheMapping>());
String methodName="String_Node_Str" + stmt.getInstruction().getName() + "String_Node_Str";
doInvoke(methodName,stmt,input,interpreter,state,result);
}
return result;
case Constants.LADD:
case Constants.LAND:
case Constants.LOR:
case Constants.LXOR:
{
result=new ContextMap<List<HashedString>,CacheMapping>(context,new HashMap<List<HashedString>,CacheMapping>());
String methodName="String_Node_Str" + stmt.getInstruction().getName() + "String_Node_Str";
doInvoke(methodName,stmt,input,interpreter,state,result);
}
return result;
case Constants.LSUB:
case Constants.LMUL:
case Constants.LDIV:
case Constants.LREM:
{
result=new ContextMap<List<HashedString>,CacheMapping>(context,new HashMap<List<HashedString>,CacheMapping>());
String methodName="String_Node_Str" + stmt.getInstruction().getName() + "String_Node_Str";
doInvoke(methodName,stmt,input,interpreter,state,result);
}
return result;
case Constants.LSHL:
case Constants.LSHR:
case Constants.LUSHR:
{
result=new ContextMap<List<HashedString>,CacheMapping>(context,new HashMap<List<HashedString>,CacheMapping>());
String methodName="String_Node_Str" + stmt.getInstruction().getName() + "String_Node_Str";
doInvoke(methodName,stmt,input,interpreter,state,result);
}
return result;
}
return input;
}