Program: 132042
Project: 132042
Buggy source:
/** 
 * Install an ACE entry, belonging to the given ACL, on the SFF identified through the specified nodeName. This method is called on result of classifier addition / removal.
 * @param nodeName      the compute node data-plane ID where the ACL is about to be written
 * @param theSff        the SFF to which the classifier is connected
 * @param theScfName    the name of the classifier
 * @param aclName       the name of the ACL
 * @param theIfName     the interface we want to classify
 * @param theAce        the ACE
 * @return              a List of {@link FlowDetails} having all the generated flows, which will be later installed
 */
public List<FlowDetails> processAceByProcessor(String nodeName,ServiceFunctionForwarder theSff,String theScfName,String aclName,String theIfName,Ace theAce,Optional<RspName> rspName){
  List<FlowDetails> theFlows=new ArrayList<>();
  String ruleName=theAce.getRuleName();
  if (Strings.isNullOrEmpty(ruleName)) {
    LOG.error("String_Node_Str");
    return Collections.emptyList();
  }
  LOG.info("String_Node_Str",nodeName,theIfName);
  Optional<Long> inPort=macChainingClassifier.getInPort(theIfName,nodeName);
  Match match=inPort.map(port -> String.format("String_Node_Str",nodeName,port)).map(NodeConnectorId::new).map(connectorId -> new SfcScfMatch().setPortMatch(connectorId)).map(scfMatch -> scfMatch.setAclMatch(theAce.getMatches())).orElseThrow(IllegalArgumentException::new).build();
  String flowKey=classifierHandler.buildFlowKeyName(theScfName,aclName,ruleName,"String_Node_Str");
  if (addClassifier) {
    LOG.info("String_Node_Str");
    theFlows.add(macChainingClassifier.initClassifierTable(nodeName));
    Optional.ofNullable(macChainingClassifier.createClassifierOutFlow(flowKey,match,rspName.get(),nodeName)).ifPresent(theFlows::add);
  }
 else {
    LOG.info("String_Node_Str");
    theFlows.add(classifierHandler.deleteFlowFromTable(nodeName,flowKey,ClassifierGeniusIntegration.getClassifierTable()));
  }
  if (classifierHandler.usesLogicalInterfaces(theSff)) {
    return theFlows;
  }
  List<FlowDetails> theReverseRspFlows=processReverseRsp(rspName.get(),theScfName,aclName,nodeName,theAce.getRuleName(),inPort.get(),theSff);
  theFlows.addAll(theReverseRspFlows);
  LOG.debug("String_Node_Str",theFlows.size());
  return theFlows;
}

Fixed version (ground truth):
/** 
 * Install an ACE entry, belonging to the given ACL, on the SFF identified through the specified nodeName. This method is called on result of classifier addition / removal.
 * @param nodeName      the compute node data-plane ID where the ACL is about to be written
 * @param theSff        the SFF to which the classifier is connected
 * @param theScfName    the name of the classifier
 * @param aclName       the name of the ACL
 * @param theIfName     the interface we want to classify
 * @param theAce        the ACE
 * @return              a List of {@link FlowDetails} having all the generated flows, which will be later installed
 */
@Override public List<FlowDetails> processAceByProcessor(String nodeName,ServiceFunctionForwarder theSff,String theScfName,String aclName,String theIfName,Ace theAce,Optional<RspName> rspName){
  List<FlowDetails> theFlows=new ArrayList<>();
  String ruleName=theAce.getRuleName();
  if (Strings.isNullOrEmpty(ruleName)) {
    LOG.error("String_Node_Str");
    return Collections.emptyList();
  }
  LOG.info("String_Node_Str",nodeName,theIfName);
  Optional<Long> inPort=macChainingClassifier.getInPort(theIfName,nodeName);
  Match match=inPort.map(port -> String.format("String_Node_Str",nodeName,port)).map(NodeConnectorId::new).map(connectorId -> new SfcScfMatch().setPortMatch(connectorId)).map(scfMatch -> scfMatch.setAclMatch(theAce.getMatches())).orElseThrow(IllegalArgumentException::new).build();
  String flowKey=classifierHandler.buildFlowKeyName(theScfName,aclName,ruleName,"String_Node_Str");
  if (addClassifier) {
    LOG.info("String_Node_Str");
    theFlows.add(macChainingClassifier.initClassifierTable(nodeName));
    Optional.ofNullable(macChainingClassifier.createClassifierOutFlow(flowKey,match,rspName.get(),nodeName)).ifPresent(theFlows::add);
  }
 else {
    LOG.info("String_Node_Str");
    theFlows.add(classifierHandler.deleteFlowFromTable(nodeName,flowKey,ClassifierGeniusIntegration.getClassifierTable()));
  }
  if (classifierHandler.usesLogicalInterfaces(theSff)) {
    return theFlows;
  }
  List<FlowDetails> theReverseRspFlows=processReverseRsp(rspName.get(),theScfName,aclName,nodeName,theAce.getRuleName(),inPort.get(),theSff);
  theFlows.addAll(theReverseRspFlows);
  LOG.debug("String_Node_Str",theFlows.size());
  return theFlows;
}