Program: 37819
Project: 37819
Buggy source:
private void handleCacheSyncRequest(CommandMessage message,Tuple tuple) throws IOException {
  logger.info("String_Node_Str",message);
  List<String> droppedFlows=new ArrayList<>();
  List<String> addedFlows=new ArrayList<>();
  List<String> modifiedFlows=new ArrayList<>();
  List<String> unchangedFlows=new ArrayList<>();
  List<FlowInfo> flowInfos=pathComputer.getFlowInfo();
  HashMap<String,FlowInfo> flowToInfo=new HashMap<>();
  for (  FlowInfo fi : flowInfos) {
    flowToInfo.put(fi.getFlowId(),fi);
  }
  for (  FlowInfo fi : flowInfos) {
    String flowid=fi.getFlowId();
    if (flowCache.cacheContainsFlow(flowid)) {
      ImmutablePair<Flow,Flow> fc=flowCache.getFlow(flowid);
      if (fi.getCookie() != fc.left.getCookie() || fi.getMeterId() != fc.left.getMeterId() || fi.getTransitVlanId() != fc.left.getTransitVlan() || fi.getSrcSwitchId() != fc.left.getSourceSwitch()) {
        modifiedFlows.add(MAPPER.writeValueAsString(fc));
      }
 else {
        unchangedFlows.add(flowid);
      }
    }
 else {
      addedFlows.add(flowid);
    }
  }
  for (  ImmutablePair<Flow,Flow> flow : flowCache.dumpFlows()) {
    String flowid=flow.left.getFlowId();
    if (!flowToInfo.containsKey(flowid)) {
      String removedFlow=flowCache.removeFlow(flowid).toString();
      String asJson=MAPPER.writeValueAsString(removedFlow);
      droppedFlows.add(asJson);
    }
  }
  FlowCacheSyncResults results=new FlowCacheSyncResults(droppedFlows.toArray(new String[0]),addedFlows.toArray(new String[0]),modifiedFlows.toArray(new String[0]),unchangedFlows.toArray(new String[0]));
  Values northbound=new Values(new InfoMessage(new FlowCacheSyncResponse(results),message.getTimestamp(),message.getCorrelationId(),Destination.NORTHBOUND));
  outputCollector.emit(StreamType.RESPONSE.toString(),tuple,northbound);
}

Fixed version (ground truth):
private void handleCacheSyncRequest(CommandMessage message,Tuple tuple) throws IOException {
  logger.info("String_Node_Str",message);
  List<String> droppedFlows=new ArrayList<>();
  List<String> addedFlows=new ArrayList<>();
  List<String> modifiedFlows=new ArrayList<>();
  List<String> unchangedFlows=new ArrayList<>();
  List<FlowInfo> flowInfos=pathComputer.getFlowInfo();
  HashMap<String,FlowInfo> flowToInfo=new HashMap<>();
  for (  FlowInfo fi : flowInfos) {
    flowToInfo.put(fi.getFlowId() + fi.getCookie(),fi);
  }
  for (  FlowInfo fi : flowInfos) {
    String flowid=fi.getFlowId();
    if (flowCache.cacheContainsFlow(flowid)) {
      ImmutablePair<Flow,Flow> fc=flowCache.getFlow(flowid);
      int count=modifiedFlows.size();
      if (fi.getCookie() != fc.left.getCookie() && fi.getCookie() != fc.right.getCookie())       modifiedFlows.add("String_Node_Str" + flowid + "String_Node_Str"+ fi.getCookie()+ "String_Node_Str"+ fc.left.getCookie()+ "String_Node_Str"+ fc.right.getCookie());
      if (fi.getMeterId() != fc.left.getMeterId() && fi.getMeterId() != fc.right.getMeterId())       modifiedFlows.add("String_Node_Str" + flowid + "String_Node_Str"+ fi.getMeterId()+ "String_Node_Str"+ fc.left.getMeterId()+ "String_Node_Str"+ fc.right.getMeterId());
      if (fi.getTransitVlanId() != fc.left.getTransitVlan() && fi.getTransitVlanId() != fc.right.getTransitVlan())       modifiedFlows.add("String_Node_Str" + flowid + "String_Node_Str"+ fi.getTransitVlanId()+ "String_Node_Str"+ fc.left.getTransitVlan()+ "String_Node_Str"+ fc.right.getTransitVlan());
      if (!fi.getSrcSwitchId().equals(fc.left.getSourceSwitch()) && !fi.getSrcSwitchId().equals(fc.right.getSourceSwitch()))       modifiedFlows.add("String_Node_Str" + flowid + "String_Node_Str"+ fi.getSrcSwitchId()+ "String_Node_Str"+ fc.left.getSourceSwitch()+ "String_Node_Str"+ fc.right.getSourceSwitch());
      if (count == modifiedFlows.size())       unchangedFlows.add(flowid);
    }
 else {
      addedFlows.add(flowid);
    }
  }
  for (  ImmutablePair<Flow,Flow> flow : flowCache.dumpFlows()) {
    String key=flow.left.getFlowId() + flow.left.getCookie();
    if (!flowToInfo.containsKey(key)) {
      droppedFlows.add(flow.left.getFlowId());
    }
 else {
      key=flow.right.getFlowId() + flow.right.getCookie();
      if (!flowToInfo.containsKey(key)) {
        droppedFlows.add(flow.right.getFlowId());
      }
    }
  }
  FlowCacheSyncResults results=new FlowCacheSyncResults(droppedFlows.toArray(new String[0]),addedFlows.toArray(new String[0]),modifiedFlows.toArray(new String[0]),unchangedFlows.toArray(new String[0]));
  Values northbound=new Values(new InfoMessage(new FlowCacheSyncResponse(results),message.getTimestamp(),message.getCorrelationId(),Destination.NORTHBOUND));
  outputCollector.emit(StreamType.RESPONSE.toString(),tuple,northbound);
}