Program: 186552
Project: 186552
Buggy source:
private void updateWCEP(){
  if (!provideWCAExecCount)   return;
  execCounts.clear();
  for (  MethodInfo root : getWcaTargets()) {
    execCounts.put(root,1L);
  }
  NodeVisitor<ExecutionContext> visitor=new NodeVisitor<ExecutionContext>(){
    @Override public boolean visitNode(    ExecutionContext context){
      MethodInfo method=context.getMethodInfo();
      MethodCode code=method.getCode();
      long ec=getExecCount(method);
      if (ec == 0)       return false;
      ControlFlowGraph cfg=method.getCode().getControlFlowGraph(false);
      for (      CFGNode node : cfg.getGraph().vertexSet()) {
        if (node instanceof InvokeNode) {
          InvokeNode inv=(InvokeNode)node;
          long ef=getExecFrequency(method,node);
          if (!inv.isVirtual()) {
            addExecCount(inv.getImplementingMethod(),ec * ef);
          }
 else {
            for (            MethodInfo invokee : ((InvokeNode)node).getImplementingMethods()) {
              addExecCount(invokee,ec * ef);
            }
          }
        }
 else         if (node instanceof BasicBlockNode) {
          for (          InstructionHandle ih : node.getBasicBlock().getInstructions()) {
            if (!code.isInvokeSite(ih))             continue;
            long ef=getExecFrequency(method,node);
            for (            MethodInfo invokee : method.getAppInfo().findImplementations(code.getInvokeSite(ih))) {
              addExecCount(invokee,ec * ef);
            }
          }
        }
      }
      return true;
    }
  }
;
  TopologicalTraverser<ExecutionContext,ContextEdge> topOrder=new TopologicalTraverser<ExecutionContext,ContextEdge>(wcetTool.getCallGraph().getGraph(),visitor);
  topOrder.traverse();
}

Fixed version (ground truth):
private void updateWCEP(){
  if (!provideWCAExecCount)   return;
  execCounts.clear();
  for (  MethodInfo root : getWcaTargets()) {
    execCounts.put(root,1L);
  }
  NodeVisitor<ExecutionContext> visitor=new NodeVisitor<ExecutionContext>(){
    @Override public boolean visitNode(    ExecutionContext context){
      MethodInfo method=context.getMethodInfo();
      MethodCode code=method.getCode();
      long ec=getExecCount(method);
      if (ec == 0)       return false;
      ControlFlowGraph cfg=method.getCode().getControlFlowGraph(false);
      for (      CFGNode node : cfg.getGraph().vertexSet()) {
        if (node instanceof InvokeNode) {
          InvokeNode inv=(InvokeNode)node;
          long ef=getExecFrequency(method,node);
          for (          MethodInfo invokee : inv.getImplementingMethods()) {
            addExecCount(invokee,ec * ef);
          }
        }
 else         if (node instanceof BasicBlockNode) {
          for (          InstructionHandle ih : node.getBasicBlock().getInstructions()) {
            if (!code.isInvokeSite(ih))             continue;
            long ef=getExecFrequency(method,node);
            for (            MethodInfo invokee : method.getAppInfo().findImplementations(code.getInvokeSite(ih))) {
              addExecCount(invokee,ec * ef);
            }
          }
        }
      }
      return true;
    }
  }
;
  TopologicalTraverser<ExecutionContext,ContextEdge> topOrder=new TopologicalTraverser<ExecutionContext,ContextEdge>(wcetTool.getCallGraph().getGraph(),visitor);
  topOrder.traverse();
}