Program: 186881
Project: 186881
Buggy source:
private void setBasicBlockAttributes(BasicBlockNode n,Map<String,String> ht){
  BasicBlock codeBlock=n.getBasicBlock();
  Instruction lastInstr=codeBlock.getLastInstruction().getInstruction();
  boolean isReturn=lastInstr instanceof ReturnInstruction;
  LoopColoring<CFGNode,ControlFlowGraph.CFGEdge> loops=flowGraph.getLoopColoring();
  StringBuilder nodeInfo=new StringBuilder();
  nodeInfo.append('#');
  nodeInfo.append(n.getId());
  nodeInfo.append(' ');
  String infoHeader;
  if (n instanceof ControlFlowGraph.InvokeNode) {
    ControlFlowGraph.InvokeNode in=(ControlFlowGraph.InvokeNode)n;
    infoHeader="String_Node_Str" + (in.isVirtual() ? ("String_Node_Str" + in.getReferenced()) : in.getImplementedMethod().getFQMethodName()) + "String_Node_Str";
  }
 else   if (isReturn) {
    infoHeader="String_Node_Str";
  }
 else   if (codeBlock.getBranchInstruction() != null) {
    BranchInstruction instr=codeBlock.getBranchInstruction();
    infoHeader="String_Node_Str" + instr.getName() + "String_Node_Str";
  }
 else {
    infoHeader="String_Node_Str";
  }
  nodeInfo.append(infoHeader);
  nodeInfo.append("String_Node_Str" + codeBlock.getNumberOfBytes() + "String_Node_Str");
  nodeInfo.append(n.getBasicBlock().getAppInfo().getWCETProcessorModel().basicBlockWCET(new ExecutionContext(codeBlock.getMethodInfo()),codeBlock) + "String_Node_Str");
  if (loops.getHeadOfLoops().contains(n)) {
    nodeInfo.append("String_Node_Str" + n.getId() + "String_Node_Str"+ flowGraph.getLoopBounds().get(n));
  }
  nodeInfo.append("String_Node_Str");
  nodeInfo.append(codeBlock.dump());
  ht.put("String_Node_Str",nodeInfo.toString());
  if (!loops.getHeadOfLoops().isEmpty()) {
    if (flowGraph.getLoopColoring().getLoopColors().get(n) == null) {
      logger.error("String_Node_Str" + n + "String_Node_Str");
    }
 else {
      ht.put("String_Node_Str","String_Node_Str" + (1 + flowGraph.getLoopColoring().getLoopColors().get(n).size()));
    }
  }
}

Fixed version (ground truth):
private void setBasicBlockAttributes(BasicBlockNode n,Map<String,String> ht){
  BasicBlock codeBlock=n.getBasicBlock();
  ControlFlowGraph flowGraph=n.getControlFlowGraph();
  Instruction lastInstr=codeBlock.getLastInstruction().getInstruction();
  boolean isReturn=lastInstr instanceof ReturnInstruction;
  LoopColoring<CFGNode,ControlFlowGraph.CFGEdge> loops=flowGraph.getLoopColoring();
  StringBuilder nodeInfo=new StringBuilder();
  nodeInfo.append('#');
  nodeInfo.append(n.getId());
  nodeInfo.append(' ');
  String infoHeader;
  if (n instanceof ControlFlowGraph.InvokeNode) {
    ControlFlowGraph.InvokeNode in=(ControlFlowGraph.InvokeNode)n;
    infoHeader="String_Node_Str" + (in.isVirtual() ? ("String_Node_Str" + in.getReferenced()) : in.getImplementedMethod().getFQMethodName()) + "String_Node_Str";
  }
 else   if (isReturn) {
    infoHeader="String_Node_Str";
  }
 else   if (codeBlock.getBranchInstruction() != null) {
    BranchInstruction instr=codeBlock.getBranchInstruction();
    infoHeader="String_Node_Str" + instr.getName() + "String_Node_Str";
  }
 else {
    infoHeader="String_Node_Str";
  }
  nodeInfo.append(infoHeader);
  nodeInfo.append("String_Node_Str" + codeBlock.getNumberOfBytes() + "String_Node_Str");
  addNodeLabel(n,nodeInfo);
  if (loops.getHeadOfLoops().contains(n)) {
    nodeInfo.append("String_Node_Str" + n.getId() + "String_Node_Str"+ flowGraph.getLoopBounds().get(n));
  }
  nodeInfo.append("String_Node_Str");
  nodeInfo.append(codeBlock.dump());
  ht.put("String_Node_Str",nodeInfo.toString());
  if (!loops.getHeadOfLoops().isEmpty()) {
    if (flowGraph.getLoopColoring().getLoopColors().get(n) == null) {
      logger.error("String_Node_Str" + n + "String_Node_Str");
    }
 else {
      ht.put("String_Node_Str","String_Node_Str" + (1 + flowGraph.getLoopColoring().getLoopColors().get(n).size()));
    }
  }
}