Program: 132006
Project: 132006
Buggy source:
/** 
 * Get a FlowBuilder object w/ the classifier relay flow.
 * @param flowKey flow key
 * @param sfcRspInfo nsh header
 * @return the FlowBuilder containing the classifier relay flow
 */
public static FlowBuilder createClassifierRelayFlow(String flowKey,SfcRspInfo sfcRspInfo){
  if (flowKey == null || sfcRspInfo == null || sfcRspInfo.getVxlanIpDst() == null) {
    return null;
  }
  String dstIp=sfcRspInfo.getVxlanIpDst().getValue();
  List<Action> theActions=new ArrayList<>();
  theActions.add(SfcOpenflowUtils.createActionNxLoadTunGpeNp(OpenflowConstants.TUN_GPE_NP_NSH,theActions.size()));
  theActions.add(SfcOpenflowUtils.createActionNxSetTunIpv4Dst(dstIp,theActions.size()));
  theActions.add(SfcOpenflowUtils.createActionNxMoveNsp(theActions.size()));
  theActions.add(SfcOpenflowUtils.createActionNxMoveNsi(theActions.size()));
  theActions.add(SfcOpenflowUtils.createActionNxMoveNsc1(theActions.size()));
  theActions.add(SfcOpenflowUtils.createActionNxMoveNsc2(theActions.size()));
  theActions.add(SfcOpenflowUtils.createActionOutPort(OutputPortValues.INPORT.toString(),theActions.size()));
  InstructionsBuilder isb=SfcOpenflowUtils.wrapActionsIntoApplyActionsInstruction(theActions);
  FlowBuilder flowb=new FlowBuilder();
  MatchBuilder mb=SfcOpenflowUtils.getNshMatches(sfcRspInfo.getNshNsp(),sfcRspInfo.getNshEndNsi());
  flowb.setId(new FlowId(flowKey)).setTableId(TABLE_INDEX_CLASSIFIER).setKey(new FlowKey(new FlowId(flowKey))).setPriority(FLOW_PRIORITY_CLASSIFIER).setMatch(mb.build()).setInstructions(isb.build());
  return flowb;
}

Fixed version (ground truth):
/** 
 * Get a FlowBuilder object w/ the classifier relay flow.
 * @param flowKey flow key
 * @param sfcRspInfo nsh header
 * @return the FlowBuilder containing the classifier relay flow
 */
public static FlowBuilder createClassifierRelayFlow(String flowKey,SfcRspInfo sfcRspInfo){
  Preconditions.checkNotNull(flowKey,"String_Node_Str");
  Preconditions.checkNotNull(sfcRspInfo,"String_Node_Str");
  Preconditions.checkNotNull(sfcRspInfo.getVxlanIpDst(),"String_Node_Str");
  String dstIp=sfcRspInfo.getVxlanIpDst().getValue();
  List<Action> theActions=new ArrayList<>();
  theActions.add(SfcOpenflowUtils.createActionNxLoadTunGpeNp(OpenflowConstants.TUN_GPE_NP_NSH,theActions.size()));
  theActions.add(SfcOpenflowUtils.createActionNxSetTunIpv4Dst(dstIp,theActions.size()));
  theActions.add(SfcOpenflowUtils.createActionNxMoveNsp(theActions.size()));
  theActions.add(SfcOpenflowUtils.createActionNxMoveNsi(theActions.size()));
  theActions.add(SfcOpenflowUtils.createActionNxMoveNsc1(theActions.size()));
  theActions.add(SfcOpenflowUtils.createActionNxMoveNsc2(theActions.size()));
  theActions.add(SfcOpenflowUtils.createActionOutPort(OutputPortValues.INPORT.toString(),theActions.size()));
  InstructionsBuilder isb=SfcOpenflowUtils.wrapActionsIntoApplyActionsInstruction(theActions);
  FlowBuilder flowb=new FlowBuilder();
  MatchBuilder mb=SfcOpenflowUtils.getNshMatches(sfcRspInfo.getNshNsp(),sfcRspInfo.getNshEndNsi());
  flowb.setId(new FlowId(flowKey)).setTableId(TABLE_INDEX_CLASSIFIER).setKey(new FlowKey(new FlowId(flowKey))).setPriority(FLOW_PRIORITY_CLASSIFIER).setMatch(mb.build()).setInstructions(isb.build());
  return flowb;
}