Program: 25477
Project: 25477
Buggy source:
private void processFlowMod(OFMessage msg,FloodlightContext cntx){
  List<OFFlowMod> flows=this.mySlicer.allowedFlows((OFFlowMod)msg);
  if (flows.size() == 0) {
    log.info("String_Node_Str");
    this.sendError((OFMessage)msg);
    return;
  }
 else {
    log.info("String_Node_Str");
  }
  List<OFMessage> messages=new ArrayList<OFMessage>();
  Iterator<OFFlowMod> it=flows.iterator();
  while (it.hasNext()) {
    OFFlowMod flow=it.next();
    messages.add((OFMessage)msg);
switch (flow.getCommand()) {
case OFFlowMod.OFPFC_ADD:
      if (this.mySlicer.isGreaterThanMaxFlows(this.flowCount + 1)) {
        log.warn("String_Node_Str" + this.mySwitch.getStringId() + "String_Node_Str"+ this.mySlicer.getSliceName()+ "String_Node_Str");
        this.sendError((OFMessage)msg);
        return;
      }
    this.updateFlowCount(1);
  break;
case OFFlowMod.OFPFF_CHECK_OVERLAP:
if (this.mySlicer.isGreaterThanMaxFlows(this.flowCount + 1)) {
  log.warn("String_Node_Str" + this.mySwitch.getStringId() + "String_Node_Str"+ this.mySlicer.getSliceName()+ "String_Node_Str");
  this.sendError((OFMessage)msg);
  return;
}
this.updateFlowCount(1);
break;
case OFFlowMod.OFPFC_DELETE:
this.updateFlowCount(-1);
break;
case OFFlowMod.OFPFC_DELETE_STRICT:
this.updateFlowCount(-1);
break;
case OFFlowMod.OFPFC_MODIFY:
break;
}
}
mapXids(messages);
try {
mySwitch.write(messages,cntx);
}
 catch (IOException e) {
e.printStackTrace();
}
mySwitch.flush();
}

Fixed version (ground truth):
private void processFlowMod(OFMessage msg,FloodlightContext cntx){
  List<OFFlowMod> flows=this.mySlicer.allowedFlows((OFFlowMod)msg);
  if (flows.size() == 0) {
    log.error("String_Node_Str" + this.mySlicer.getSliceName() + "String_Node_Str"+ this.mySwitch.getStringId()+ "String_Node_Str"+ ((OFFlowMod)msg).toString());
    this.sendError((OFMessage)msg);
    return;
  }
 else {
    log.info("String_Node_Str" + this.mySlicer.getSliceName() + "String_Node_Str"+ this.mySwitch.getStringId()+ "String_Node_Str"+ ((OFFlowMod)msg).toString());
  }
  List<OFMessage> messages=new ArrayList<OFMessage>();
  Iterator<OFFlowMod> it=flows.iterator();
  while (it.hasNext()) {
    OFFlowMod flow=it.next();
    messages.add((OFMessage)msg);
switch (flow.getCommand()) {
case OFFlowMod.OFPFC_ADD:
      if (this.mySlicer.isGreaterThanMaxFlows(this.flowCount + 1)) {
        log.warn("String_Node_Str" + this.mySwitch.getStringId() + "String_Node_Str"+ this.mySlicer.getSliceName()+ "String_Node_Str");
        this.sendError((OFMessage)msg);
        return;
      }
    this.updateFlowCount(1);
  break;
case OFFlowMod.OFPFF_CHECK_OVERLAP:
if (this.mySlicer.isGreaterThanMaxFlows(this.flowCount + 1)) {
  log.warn("String_Node_Str" + this.mySwitch.getStringId() + "String_Node_Str"+ this.mySlicer.getSliceName()+ "String_Node_Str");
  this.sendError((OFMessage)msg);
  return;
}
this.updateFlowCount(1);
break;
case OFFlowMod.OFPFC_DELETE:
this.updateFlowCount(-1);
break;
case OFFlowMod.OFPFC_DELETE_STRICT:
this.updateFlowCount(-1);
break;
case OFFlowMod.OFPFC_MODIFY:
break;
}
}
mapXids(messages);
try {
mySwitch.write(messages,cntx);
}
 catch (IOException e) {
e.printStackTrace();
}
mySwitch.flush();
}