nus-yam/ex-repair huggingface dataset:
Program: 132004
Project: 132004
Buggy source:
/** 
 * create classifier out flow for MAC Chaining. The function returns true if successful. The function returns false if unsuccessful.
 * @param nodeName flow table node name
 * @param flowKey  flow key
 * @param outPort  flow out port
 * @param gwMac      Gateway MAC to recovery original MAC addresses
 * @param pathId     chain path ID
 * @param startIndex   Firt hop in the chain
 * @return          create flow result
 */
public static FlowBuilder createMacChainClassifierInFlow(String nodeName,String flowKey,String outPort,String gwMac,Long pathId,short startIndex){
  int order=0;
  VirtualMacAddress vmac=VirtualMacAddress.getForwardAddress(pathId,0);
  if (nodeName == null || flowKey == null) {
    return null;
  }
  MatchBuilder mb=new MatchBuilder();
  SfcOpenflowUtils.addMatchDstMac(mb,vmac.getHop(startIndex).getValue());
  Action macDst=SfcOpenflowUtils.createActionSetDlDst(gwMac,order++);
  Action out=SfcOpenflowUtils.createActionOutPort(Integer.parseInt(outPort),order);
  FlowBuilder flowb=new FlowBuilder();
  flowb.setId(new FlowId(flowKey)).setTableId(TABLE_INDEX_CLASSIFIER).setKey(new FlowKey(new FlowId(flowKey))).setPriority(Integer.valueOf(FLOW_PRIORITY_CLASSIFIER + 1)).setMatch(mb.build()).setInstructions(SfcOpenflowUtils.createInstructionsBuilder(SfcOpenflowUtils.createActionsInstructionBuilder(macDst,out)).build());
  return flowb;
}

Fixed version (ground truth):
/** 
 * create classifier out flow for MAC Chaining. The function returns true if successful. The function returns false if unsuccessful.
 * @param nodeName flow table node name
 * @param flowKey  flow key
 * @param outPort  flow out port
 * @param gwMac      Gateway MAC to recovery original MAC addresses
 * @param pathId     chain path ID
 * @param startIndex   Firt hop in the chain
 * @return          create flow result
 */
public static FlowBuilder createMacChainClassifierInFlow(String nodeName,String flowKey,String outPort,String gwMac,Long pathId,short startIndex){
  Preconditions.checkNotNull(flowKey,"String_Node_Str");
  Preconditions.checkNotNull(nodeName,"String_Node_Str");
  MatchBuilder mb=new MatchBuilder();
  VirtualMacAddress vmac=VirtualMacAddress.getForwardAddress(pathId,0);
  SfcOpenflowUtils.addMatchDstMac(mb,vmac.getHop(startIndex).getValue());
  int order=0;
  Action macDst=SfcOpenflowUtils.createActionSetDlDst(gwMac,order++);
  Action out=SfcOpenflowUtils.createActionOutPort(Integer.parseInt(outPort),order);
  FlowBuilder flowb=new FlowBuilder();
  flowb.setId(new FlowId(flowKey)).setTableId(TABLE_INDEX_CLASSIFIER).setKey(new FlowKey(new FlowId(flowKey))).setPriority(Integer.valueOf(FLOW_PRIORITY_CLASSIFIER + 1)).setMatch(mb.build()).setInstructions(SfcOpenflowUtils.createInstructionsBuilder(SfcOpenflowUtils.createActionsInstructionBuilder(macDst,out)).build());
  return flowb;
}
Program: 132005
Project: 132005
Buggy source:
/** 
 * create classifier relay flow for MAC Chaining. The function returns true if successful. The function returns false if unsuccessful.
 * @param nodeName flow table node name
 * @param flowKey  flow key
 * @param outPort  flow out port
 * @param pathId   chain path ID
 * @param startIndex  Firt hop in the chain
 * @param lastIndex   Last hop in the chain
 * @return          create relay result
 */
public static FlowBuilder createClassifierMacChainingRelayFlow(String nodeName,String flowKey,String outPort,Long pathId,short startIndex,short lastIndex){
  int order=0;
  VirtualMacAddress vmac=VirtualMacAddress.getForwardAddress(pathId,0);
  if (nodeName == null || flowKey == null) {
    return null;
  }
  MatchBuilder mb=new MatchBuilder();
  SfcOpenflowUtils.addMatchDstMac(mb,vmac.getHop(lastIndex).getValue());
  Action macDst=SfcOpenflowUtils.createActionSetDlDst(vmac.getHop(startIndex).getValue(),order++);
  Action out=SfcOpenflowUtils.createActionOutPort(Integer.parseInt(outPort),order);
  FlowBuilder flowb=new FlowBuilder();
  flowb.setId(new FlowId(flowKey)).setTableId(TABLE_INDEX_CLASSIFIER).setKey(new FlowKey(new FlowId(flowKey))).setPriority(Integer.valueOf(FLOW_PRIORITY_CLASSIFIER)).setMatch(mb.build()).setInstructions(SfcOpenflowUtils.createInstructionsBuilder(SfcOpenflowUtils.createActionsInstructionBuilder(macDst,out)).build());
  return flowb;
}

Fixed version (ground truth):
/** 
 * create classifier relay flow for MAC Chaining. The function returns true if successful. The function returns false if unsuccessful.
 * @param nodeName flow table node name
 * @param flowKey  flow key
 * @param outPort  flow out port
 * @param pathId   chain path ID
 * @param startIndex  Firt hop in the chain
 * @param lastIndex   Last hop in the chain
 * @return          create relay result
 */
public static FlowBuilder createClassifierMacChainingRelayFlow(String nodeName,String flowKey,String outPort,Long pathId,short startIndex,short lastIndex){
  Preconditions.checkNotNull(flowKey,"String_Node_Str");
  Preconditions.checkNotNull(nodeName,"String_Node_Str");
  MatchBuilder mb=new MatchBuilder();
  VirtualMacAddress vmac=VirtualMacAddress.getForwardAddress(pathId,0);
  SfcOpenflowUtils.addMatchDstMac(mb,vmac.getHop(lastIndex).getValue());
  int order=0;
  Action macDst=SfcOpenflowUtils.createActionSetDlDst(vmac.getHop(startIndex).getValue(),order++);
  Action out=SfcOpenflowUtils.createActionOutPort(Integer.parseInt(outPort),order);
  FlowBuilder flowb=new FlowBuilder();
  flowb.setId(new FlowId(flowKey)).setTableId(TABLE_INDEX_CLASSIFIER).setKey(new FlowKey(new FlowId(flowKey))).setPriority(Integer.valueOf(FLOW_PRIORITY_CLASSIFIER)).setMatch(mb.build()).setInstructions(SfcOpenflowUtils.createInstructionsBuilder(SfcOpenflowUtils.createActionsInstructionBuilder(macDst,out)).build());
  return flowb;
}
Program: 132007
Project: 132007
Buggy source:
/** 
 * create classifier out flow for MAC Chaining. The function returns true if successful. The function returns false if unsuccessful.
 * @param nodeName flow table node name
 * @param flowKey  flow key
 * @param match    flow match
 * @param outPort  flow out port
 * @param pathId   chain path ID
 * @param startIndex  Firt hop in the chain
 * @return          create flow result
 */
public static FlowBuilder createMacChainClassifierOutFlow(String nodeName,String flowKey,Match match,String outPort,Long pathId,short startIndex){
  int order=0;
  VirtualMacAddress vmac=VirtualMacAddress.getForwardAddress(pathId,0);
  if (nodeName == null || flowKey == null) {
    return null;
  }
  Action macDst=SfcOpenflowUtils.createActionSetDlDst(vmac.getHop(startIndex).getValue(),order++);
  Action out=SfcOpenflowUtils.createActionOutPort(Integer.parseInt(outPort),order);
  FlowBuilder flowb=new FlowBuilder();
  flowb.setId(new FlowId(flowKey)).setTableId(TABLE_INDEX_CLASSIFIER).setKey(new FlowKey(new FlowId(flowKey))).setPriority(Integer.valueOf(FLOW_PRIORITY_CLASSIFIER)).setMatch(match).setInstructions(SfcOpenflowUtils.createInstructionsBuilder(SfcOpenflowUtils.createActionsInstructionBuilder(macDst,out)).build());
  return flowb;
}

Fixed version (ground truth):
/** 
 * create classifier out flow for MAC Chaining. The function returns true if successful. The function returns false if unsuccessful.
 * @param nodeName flow table node name
 * @param flowKey  flow key
 * @param match    flow match
 * @param outPort  flow out port
 * @param pathId   chain path ID
 * @param startIndex  Firt hop in the chain
 * @return          create flow result
 */
public static FlowBuilder createMacChainClassifierOutFlow(String nodeName,String flowKey,Match match,String outPort,Long pathId,short startIndex){
  Preconditions.checkNotNull(flowKey,"String_Node_Str");
  Preconditions.checkNotNull(nodeName,"String_Node_Str");
  int order=0;
  VirtualMacAddress vmac=VirtualMacAddress.getForwardAddress(pathId,0);
  Action macDst=SfcOpenflowUtils.createActionSetDlDst(vmac.getHop(startIndex).getValue(),order++);
  Action out=SfcOpenflowUtils.createActionOutPort(Integer.parseInt(outPort),order);
  FlowBuilder flowb=new FlowBuilder();
  flowb.setId(new FlowId(flowKey)).setTableId(TABLE_INDEX_CLASSIFIER).setKey(new FlowKey(new FlowId(flowKey))).setPriority(Integer.valueOf(FLOW_PRIORITY_CLASSIFIER)).setMatch(match).setInstructions(SfcOpenflowUtils.createInstructionsBuilder(SfcOpenflowUtils.createActionsInstructionBuilder(macDst,out)).build());
  return flowb;
}
Program: 132008
Project: 132008
Buggy source:
/** 
 * Get a FlowBuilder object w/ the classifier 'in' flow.
 * @param flowKey flow key
 * @param sfcRspInfo nsh header
 * @param outPort flow out port
 * @return create in result
 */
public static FlowBuilder createClassifierInFlow(String flowKey,SfcRspInfo sfcRspInfo,Long outPort){
  if (flowKey == null || sfcRspInfo == null || sfcRspInfo.getVxlanIpDst() == null) {
    return null;
  }
  MatchBuilder mb=SfcOpenflowUtils.getNshMatches(sfcRspInfo.getNshNsp(),sfcRspInfo.getNshEndNsi());
  List<Action> theActions=new ArrayList<>();
  theActions.add(SfcOpenflowUtils.createActionNxPopNsh(theActions.size()));
  theActions.add(outPort == null ? SfcOpenflowUtils.createActionOutPort(OutputPortValues.INPORT.toString(),theActions.size()) : SfcOpenflowUtils.createActionOutPort(outPort.intValue(),theActions.size()));
  InstructionsBuilder isb=SfcOpenflowUtils.wrapActionsIntoApplyActionsInstruction(theActions);
  FlowBuilder flowb=new FlowBuilder();
  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 'in' flow.
 * @param flowKey flow key
 * @param sfcRspInfo nsh header
 * @param outPort flow out port
 * @return create in result
 */
public static FlowBuilder createClassifierInFlow(String flowKey,SfcRspInfo sfcRspInfo,Long outPort){
  Preconditions.checkNotNull(flowKey,"String_Node_Str");
  Preconditions.checkNotNull(sfcRspInfo,"String_Node_Str");
  Preconditions.checkNotNull(sfcRspInfo.getVxlanIpDst(),"String_Node_Str");
  MatchBuilder mb=SfcOpenflowUtils.getNshMatches(sfcRspInfo.getNshNsp(),sfcRspInfo.getNshEndNsi());
  List<Action> theActions=new ArrayList<>();
  theActions.add(SfcOpenflowUtils.createActionNxPopNsh(theActions.size()));
  theActions.add(outPort == null ? SfcOpenflowUtils.createActionOutPort(OutputPortValues.INPORT.toString(),theActions.size()) : SfcOpenflowUtils.createActionOutPort(outPort.intValue(),theActions.size()));
  InstructionsBuilder isb=SfcOpenflowUtils.wrapActionsIntoApplyActionsInstruction(theActions);
  FlowBuilder flowb=new FlowBuilder();
  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;
}
Program: 132009
Project: 132009
Buggy source:
/** 
 * create classifier out flow. The function returns true if successful. The function returns false if unsuccessful. Get a FlowBuilder object w/ the classifier 'out' flow.
 * @param flowKey flow key
 * @param match flow match
 * @param sfcRspInfo nsh header
 * @param outPort flow out port
 * @return create flow result
 */
public static FlowBuilder createClassifierOutFlow(String flowKey,Match match,SfcRspInfo sfcRspInfo,Long outPort){
  if (flowKey == null || sfcRspInfo == null || sfcRspInfo.getVxlanIpDst() == null) {
    return null;
  }
  String dstIp=sfcRspInfo.getVxlanIpDst().getValue();
  List<Action> theActions=buildNshActions(sfcRspInfo);
  theActions.add(SfcOpenflowUtils.createActionNxSetTunIpv4Dst(dstIp,theActions.size()));
  theActions.add(outPort == null ? SfcOpenflowUtils.createActionOutPort(OutputPortValues.INPORT.toString(),theActions.size()) : SfcOpenflowUtils.createActionOutPort(outPort.intValue(),theActions.size()));
  InstructionsBuilder isb=SfcOpenflowUtils.wrapActionsIntoApplyActionsInstruction(theActions);
  FlowBuilder flowb=new FlowBuilder();
  flowb.setId(new FlowId(flowKey)).setTableId(TABLE_INDEX_CLASSIFIER).setKey(new FlowKey(new FlowId(flowKey))).setPriority(FLOW_PRIORITY_CLASSIFIER).setMatch(match).setInstructions(isb.build());
  return flowb;
}

Fixed version (ground truth):
/** 
 * create classifier out flow. The function returns true if successful. The function returns false if unsuccessful. Get a FlowBuilder object w/ the classifier 'out' flow.
 * @param flowKey flow key
 * @param match flow match
 * @param sfcRspInfo nsh header
 * @param outPort flow out port
 * @return create flow result
 */
public static FlowBuilder createClassifierOutFlow(String flowKey,Match match,SfcRspInfo sfcRspInfo,Long outPort){
  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=buildNshActions(sfcRspInfo);
  theActions.add(SfcOpenflowUtils.createActionNxSetTunIpv4Dst(dstIp,theActions.size()));
  theActions.add(outPort == null ? SfcOpenflowUtils.createActionOutPort(OutputPortValues.INPORT.toString(),theActions.size()) : SfcOpenflowUtils.createActionOutPort(outPort.intValue(),theActions.size()));
  InstructionsBuilder isb=SfcOpenflowUtils.wrapActionsIntoApplyActionsInstruction(theActions);
  FlowBuilder flowb=new FlowBuilder();
  flowb.setId(new FlowId(flowKey)).setTableId(TABLE_INDEX_CLASSIFIER).setKey(new FlowKey(new FlowId(flowKey))).setPriority(FLOW_PRIORITY_CLASSIFIER).setMatch(match).setInstructions(isb.build());
  return flowb;
}
Program: 132010
Project: 132010
Buggy source:
/** 
 * Process a list of classifier switches objects, adding or removing flows for the entire impacted RSP.
 * @param theAcl the ACL object to install
 * @param addClassifier true when adding the classifier flows, false when deleting them
 * @param classifierList the list of  {@link SclServiceFunctionForwarder} in which theclassifier flows will be installed
 * @return the list of all the relevant flows to be installed
 */
public List<FlowDetails> processClassifierList(Acl theAcl,boolean addClassifier,List<SclServiceFunctionForwarder> classifierList){
  return classifierList.stream().map(classifier -> processClassifier(classifier,theAcl,addClassifier)).peek(theFlows -> LOG.info("String_Node_Str",theFlows.size())).reduce(new ArrayList<>(),(dstList,theList) -> Stream.concat(dstList.stream(),theList.stream()).collect(Collectors.toList()));
}

Fixed version (ground truth):
/** 
 * Process a list of classifier switches objects, adding or removing flows for the entire impacted RSP.
 * @param theAcl the ACL object to install
 * @param onAddClassifier true when adding the classifier flows, false when deleting them
 * @param classifierList the list of  {@link SclServiceFunctionForwarder} in which theclassifier flows will be installed
 * @return the list of all the relevant flows to be installed
 */
public List<FlowDetails> processClassifierList(Acl theAcl,boolean onAddClassifier,List<SclServiceFunctionForwarder> classifierList){
  return classifierList.stream().map(classifier -> processClassifier(classifier,theAcl,onAddClassifier)).peek(theFlows -> LOG.info("String_Node_Str",theFlows.size())).reduce(new ArrayList<>(),(dstList,theList) -> Stream.concat(dstList.stream(),theList.stream()).collect(Collectors.toList()));
}
Program: 132011
Project: 132011
Buggy source:
public SfcRspInfo getNshMetaC2(Long nshMetaC2){
  this.nshMetaC2=nshMetaC2;
  return this;
}

Fixed version (ground truth):
public Long getNshMetaC2(){
  return this.nshMetaC2;
}
Program: 132012
Project: 132012
Buggy source:
@Test public void removeClassifierLegacyScenario(){
  when(sff.getSffDataPlaneLocator()).thenReturn(new ArrayList<>());
  PowerMockito.when(SfcOvsUtil.getDpdkOfPort(anyString(),anyString())).thenReturn(null);
  BareClassifier classifierInterface=Mockito.spy(new BareClassifier(sff));
  doReturn(Optional.of(FIRST_SF_NODE_NAME)).when(classifierInterface).getNodeName(anyString());
  OpenflowClassifierProcessor classifierManager=new OpenflowClassifierProcessor(readWriteTransaction,new LogicallyAttachedClassifier(dataGetter),classifierInterface);
  List<FlowDetails> theFlows=classifierManager.processClassifier(sffClassifier,acl,false);
  Assert.assertFalse(theFlows.isEmpty());
  Assert.assertEquals(1 + 1,theFlows.size());
}

Fixed version (ground truth):
@Test public void removeClassifierLegacyScenario(){
  when(sff.getSffDataPlaneLocator()).thenReturn(new ArrayList<>());
  PowerMockito.when(SfcOvsUtil.getDpdkOfPort(anyString(),anyString())).thenReturn(null);
  BareClassifier bareClassifier=Mockito.spy(new BareClassifier(sff));
  doReturn(Optional.of(FIRST_SF_NODE_NAME)).when(bareClassifier).getNodeName(anyString());
  OpenflowClassifierProcessor classifierManager=new OpenflowClassifierProcessor(readWriteTransaction,new LogicallyAttachedClassifier(dataGetter),bareClassifier);
  List<FlowDetails> theFlows=classifierManager.processClassifier(sffClassifier,acl,false);
  Assert.assertFalse(theFlows.isEmpty());
  Assert.assertEquals(1 + 1,theFlows.size());
}
Program: 132013
Project: 132013
Buggy source:
@Test public void removeClassifierDpdkScenario(){
  when(sff.getSffDataPlaneLocator()).thenReturn(new ArrayList<>());
  PowerMockito.when(SfcOvsUtil.getDpdkOfPort(anyString(),anyString())).thenReturn(null);
  BareClassifier classifierInterface=Mockito.spy(new BareClassifier(sff));
  doReturn(Optional.of(FIRST_SF_NODE_NAME)).when(classifierInterface).getNodeName(anyString());
  OpenflowClassifierProcessor classifierManager=new OpenflowClassifierProcessor(readWriteTransaction,new LogicallyAttachedClassifier(dataGetter),classifierInterface);
  List<FlowDetails> theFlows=classifierManager.processClassifier(sffClassifier,acl,false);
  Assert.assertFalse(theFlows.isEmpty());
  Assert.assertEquals(1 + 1,theFlows.size());
}

Fixed version (ground truth):
@Test public void removeClassifierDpdkScenario(){
  when(sff.getSffDataPlaneLocator()).thenReturn(new ArrayList<>());
  PowerMockito.when(SfcOvsUtil.getDpdkOfPort(anyString(),anyString())).thenReturn(null);
  BareClassifier bareClassifier=Mockito.spy(new BareClassifier(sff));
  doReturn(Optional.of(FIRST_SF_NODE_NAME)).when(bareClassifier).getNodeName(anyString());
  OpenflowClassifierProcessor classifierManager=new OpenflowClassifierProcessor(readWriteTransaction,new LogicallyAttachedClassifier(dataGetter),bareClassifier);
  List<FlowDetails> theFlows=classifierManager.processClassifier(sffClassifier,acl,false);
  Assert.assertFalse(theFlows.isEmpty());
  Assert.assertEquals(1 + 1,theFlows.size());
}
Program: 132014
Project: 132014
Buggy source:
@Test public void addClassifierOK(){
  when(dataGetter.getFirstHopDataplaneId(any(RenderedServicePath.class))).thenReturn(Optional.of(FIRST_SF_DATAPLANE_ID));
  LogicallyAttachedClassifier classifierInterface=Mockito.spy(new LogicallyAttachedClassifier(dataGetter));
  doReturn(Optional.of(FIRST_SF_NODE_NAME)).when(classifierInterface).getNodeName(anyString());
  OpenflowClassifierProcessor classifierManager=new OpenflowClassifierProcessor(readWriteTransaction,classifierInterface,new BareClassifier());
  PowerMockito.when(SfcOvsUtil.getDpdkOfPort(anyString(),anyString())).thenReturn(null);
  List<FlowDetails> theFlows=classifierManager.processClassifier(sffClassifier,acl,true);
  Assert.assertFalse(theFlows.isEmpty());
  Assert.assertEquals(2,theFlows.size());
}

Fixed version (ground truth):
@Test public void addClassifierOK(){
  when(dataGetter.getFirstHopDataplaneId(any(RenderedServicePath.class))).thenReturn(Optional.of(FIRST_SF_DATAPLANE_ID));
  doReturn(Optional.of(FIRST_SF_NODE_NAME)).when(classifierInterface).getNodeName(anyString());
  OpenflowClassifierProcessor classifierManager=new OpenflowClassifierProcessor(readWriteTransaction,classifierInterface,new BareClassifier());
  PowerMockito.when(SfcOvsUtil.getDpdkOfPort(anyString(),anyString())).thenReturn(null);
  List<FlowDetails> theFlows=classifierManager.processClassifier(sffClassifier,acl,true);
  Assert.assertFalse(theFlows.isEmpty());
  Assert.assertEquals(2,theFlows.size());
}
Program: 132015
Project: 132015
Buggy source:
@Test public void removeClassifierOK(){
  when(dataGetter.getFirstHopDataplaneId(any(RenderedServicePath.class))).thenReturn(Optional.of(FIRST_SF_DATAPLANE_ID));
  LogicallyAttachedClassifier classifierInterface=Mockito.spy(new LogicallyAttachedClassifier(dataGetter));
  doReturn(Optional.of(FIRST_SF_NODE_NAME)).when(classifierInterface).getNodeName(anyString());
  OpenflowClassifierProcessor classifierManager=new OpenflowClassifierProcessor(readWriteTransaction,classifierInterface,new BareClassifier());
  List<FlowDetails> theFlows=classifierManager.processClassifier(sffClassifier,acl,false);
  Assert.assertFalse(theFlows.isEmpty());
  theFlows.forEach(flow -> LOG.info("String_Node_Str",flow.getFlow()));
  Assert.assertEquals(1,theFlows.size());
}

Fixed version (ground truth):
@Test public void removeClassifierOK(){
  when(dataGetter.getFirstHopDataplaneId(any(RenderedServicePath.class))).thenReturn(Optional.of(FIRST_SF_DATAPLANE_ID));
  doReturn(Optional.of(FIRST_SF_NODE_NAME)).when(classifierInterface).getNodeName(anyString());
  OpenflowClassifierProcessor classifierManager=new OpenflowClassifierProcessor(readWriteTransaction,classifierInterface,new BareClassifier());
  List<FlowDetails> theFlows=classifierManager.processClassifier(sffClassifier,acl,false);
  Assert.assertFalse(theFlows.isEmpty());
  theFlows.forEach(flow -> LOG.info("String_Node_Str",flow.getFlow()));
  Assert.assertEquals(1,theFlows.size());
}
Program: 132016
Project: 132016
Buggy source:
public SfcTableIndexMapperBuilder setPathMapperTable(short externalPathMapperTable){
  this.externalPathMapperTable=externalPathMapperTable;
  return this;
}

Fixed version (ground truth):
public SfcTableIndexMapperBuilder setPathMapperTable(short mapperTable){
  this.externalPathMapperTable=mapperTable;
  return this;
}
Program: 132017
Project: 132017
Buggy source:
public SfcTableIndexMapperBuilder setTransportIngressTable(short externalTransportIngressTable){
  this.externalTransportIngressTable=externalTransportIngressTable;
  return this;
}

Fixed version (ground truth):
public SfcTableIndexMapperBuilder setTransportIngressTable(short ingressTable){
  this.externalTransportIngressTable=ingressTable;
  return this;
}
Program: 132018
Project: 132018
Buggy source:
public SfcTableIndexMapperBuilder setNextHopTable(short externalNextHopTable){
  this.externalNextHopTable=externalNextHopTable;
  return this;
}

Fixed version (ground truth):
public SfcTableIndexMapperBuilder setNextHopTable(short nextHopTable){
  this.externalNextHopTable=nextHopTable;
  return this;
}
Program: 132019
Project: 132019
Buggy source:
public SfcTableIndexMapperBuilder setTransportEgressTable(short externalTransportEgressTable){
  this.externalTransportEgressTable=externalTransportEgressTable;
  return this;
}

Fixed version (ground truth):
public SfcTableIndexMapperBuilder setTransportEgressTable(short transportEgressTable){
  this.externalTransportEgressTable=transportEgressTable;
  return this;
}
Program: 132020
Project: 132020
Buggy source:
public SfcTableIndexMapperBuilder setClassifierTable(short externalTransportClassifierTable){
  this.externalTransportClassifierTable=externalTransportClassifierTable;
  return this;
}

Fixed version (ground truth):
public SfcTableIndexMapperBuilder setClassifierTable(short classifierTable){
  this.externalTransportClassifierTable=classifierTable;
  return this;
}
Program: 132021
Project: 132021
Buggy source:
public SfcTableIndexMapperBuilder setPathMapperAclTable(short externalPathMapperAclTable){
  this.externalPathMapperAclTable=externalPathMapperAclTable;
  return this;
}

Fixed version (ground truth):
public SfcTableIndexMapperBuilder setPathMapperAclTable(short mapperAclTable){
  this.externalPathMapperAclTable=mapperAclTable;
  return this;
}
Program: 132022
Project: 132022
Buggy source:
/** 
 * Submits callable for execution by given ExecutorService. Thanks to this wrapper method, boolean result will be returned instead of Future. <p>
 * @param callable Callable
 * @param executor ExecutorService
 * @return true if callable completed successfully, otherwise false.
 */
public static Object submitCallable(Callable<?> callable,ExecutorService executor){
  Object result=null;
  Future<?> future=executor.submit(callable);
  try {
    result=future.get();
  }
 catch (  InterruptedException|ExecutionException e) {
    LOG.warn("String_Node_Str",callable.toString(),e);
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Submits callable for execution by given ExecutorService. Thanks to this wrapper method, boolean result will be returned instead of Future. <p>
 * @param callable Callable
 * @param executorService ExecutorService
 * @return true if callable completed successfully, otherwise false.
 */
public static Object submitCallable(Callable<?> callable,ExecutorService executorService){
  Object result=null;
  Future<?> future=executorService.submit(callable);
  try {
    result=future.get();
  }
 catch (  InterruptedException|ExecutionException e) {
    LOG.warn("String_Node_Str",callable.toString(),e);
  }
  return result;
}
Program: 132023
Project: 132023
Buggy source:
@Test public void testGetManagerNodeByIpV6(){
  OvsdbNodeAugmentationBuilder ovsdbNodeAugmentationBuilder=new OvsdbNodeAugmentationBuilder();
  org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress ipAddress=new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress(new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Address(IPV6_ADDRESS));
  ovsdbNodeAugmentationBuilder.setConnectionInfo(new ConnectionInfoBuilder().setRemoteIp(ipAddress).build());
  NodeBuilder nodeBuilder=new NodeBuilder();
  nodeBuilder.setNodeId(new NodeId(IPV6_ADDRESS)).addAugmentation(OvsdbNodeAugmentation.class,ovsdbNodeAugmentationBuilder.build());
  InstanceIdentifier<Node> nodeIID=SfcOvsUtil.buildOvsdbNodeIID(IPV6_ADDRESS);
  boolean transactionSuccessful=SfcDataStoreAPI.writePutTransactionAPI(nodeIID,nodeBuilder.build(),LogicalDatastoreType.OPERATIONAL);
  assertTrue("String_Node_Str",transactionSuccessful);
  Node node=SfcOvsUtil.getManagerNodeByIp(new IpAddress(new Ipv6Address(IPV6_ADDRESS)));
  assertNotNull("String_Node_Str",node);
  assertEquals("String_Node_Str",node.getKey().getNodeId().getValue(),IPV6_ADDRESS);
}

Fixed version (ground truth):
@Test public void testGetManagerNodeByIpV6(){
  OvsdbNodeAugmentationBuilder ovsdbNodeAugmentationBuilder=new OvsdbNodeAugmentationBuilder();
  org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress ipAddress=new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress(new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Address(IPV6_ADDRESS));
  ovsdbNodeAugmentationBuilder.setConnectionInfo(new ConnectionInfoBuilder().setRemoteIp(ipAddress).build());
  NodeBuilder nodeBuilder=new NodeBuilder();
  nodeBuilder.setNodeId(new NodeId(IPV6_ADDRESS)).addAugmentation(OvsdbNodeAugmentation.class,ovsdbNodeAugmentationBuilder.build());
  InstanceIdentifier<Node> ovsdbNodeIID=SfcOvsUtil.buildOvsdbNodeIID(IPV6_ADDRESS);
  boolean transactionSuccessful=SfcDataStoreAPI.writePutTransactionAPI(ovsdbNodeIID,nodeBuilder.build(),LogicalDatastoreType.OPERATIONAL);
  assertTrue("String_Node_Str",transactionSuccessful);
  Node node=SfcOvsUtil.getManagerNodeByIp(new IpAddress(new Ipv6Address(IPV6_ADDRESS)));
  assertNotNull("String_Node_Str",node);
  assertEquals("String_Node_Str",node.getKey().getNodeId().getValue(),IPV6_ADDRESS);
}
Program: 132025
Project: 132025
Buggy source:
@Test public void testGetManagerNodeByIpV6(){
  OvsdbNodeAugmentationBuilder ovsdbNodeAugmentationBuilder=new OvsdbNodeAugmentationBuilder();
  org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress ipAddress=new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress(new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Address(IPV6_ADDRESS));
  ovsdbNodeAugmentationBuilder.setConnectionInfo(new ConnectionInfoBuilder().setRemoteIp(ipAddress).build());
  NodeBuilder nodeBuilder=new NodeBuilder();
  nodeBuilder.setNodeId(new NodeId(IPV6_ADDRESS)).addAugmentation(OvsdbNodeAugmentation.class,ovsdbNodeAugmentationBuilder.build());
  InstanceIdentifier<Node> nodeIID=SfcOvsUtil.buildOvsdbNodeIID(IPV6_ADDRESS);
  boolean transactionSuccessful=SfcDataStoreAPI.writePutTransactionAPI(nodeIID,nodeBuilder.build(),LogicalDatastoreType.OPERATIONAL);
  assertTrue("String_Node_Str",transactionSuccessful);
  Node node=SfcOvsUtil.getManagerNodeByIp(new IpAddress(new Ipv6Address(IPV6_ADDRESS)));
  assertNotNull("String_Node_Str",node);
  assertEquals("String_Node_Str",node.getKey().getNodeId().getValue(),IPV6_ADDRESS);
}

Fixed version (ground truth):
@Test public void testGetManagerNodeByIpV6(){
  OvsdbNodeAugmentationBuilder ovsdbNodeAugmentationBuilder=new OvsdbNodeAugmentationBuilder();
  org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress ipAddress=new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress(new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Address(IPV6_ADDRESS));
  ovsdbNodeAugmentationBuilder.setConnectionInfo(new ConnectionInfoBuilder().setRemoteIp(ipAddress).build());
  NodeBuilder nodeBuilder=new NodeBuilder();
  nodeBuilder.setNodeId(new NodeId(IPV6_ADDRESS)).addAugmentation(OvsdbNodeAugmentation.class,ovsdbNodeAugmentationBuilder.build());
  InstanceIdentifier<Node> ovsdbNodeIID=SfcOvsUtil.buildOvsdbNodeIID(IPV6_ADDRESS);
  boolean transactionSuccessful=SfcDataStoreAPI.writePutTransactionAPI(ovsdbNodeIID,nodeBuilder.build(),LogicalDatastoreType.OPERATIONAL);
  assertTrue("String_Node_Str",transactionSuccessful);
  Node node=SfcOvsUtil.getManagerNodeByIp(new IpAddress(new Ipv6Address(IPV6_ADDRESS)));
  assertNotNull("String_Node_Str",node);
  assertEquals("String_Node_Str",node.getKey().getNodeId().getValue(),IPV6_ADDRESS);
}
Program: 132027
Project: 132027
Buggy source:
public static void setON(boolean on){
  SfcProviderDebug.on=on;
}

Fixed version (ground truth):
public static void setON(boolean value){
  SfcProviderDebug.on=value;
}
Program: 132029
Project: 132029
Buggy source:
@Test public void testCreateReadServiceNode(){
  SfcProviderServiceNodeAPI.putServiceNode(serviceNode);
  ServiceNode serviceNode=SfcProviderServiceNodeAPI.readServiceNodeByName(new SnName(SERVICE_NODE_NAME));
  assertNotNull("String_Node_Str",serviceNode);
  assertEquals("String_Node_Str",serviceNode.getName().getValue(),SERVICE_NODE_NAME);
  assertEquals("String_Node_Str",serviceNode.getIpMgmtAddress().getIpv4Address().getValue(),SERVICE_NODE_IP_MANAGEMENT_ADDRESS);
}

Fixed version (ground truth):
@Test public void testCreateReadServiceNode(){
  SfcProviderServiceNodeAPI.putServiceNode(serviceNode);
  serviceNode=SfcProviderServiceNodeAPI.readServiceNodeByName(new SnName(SERVICE_NODE_NAME));
  assertNotNull("String_Node_Str",serviceNode);
  assertEquals("String_Node_Str",serviceNode.getName().getValue(),SERVICE_NODE_NAME);
  assertEquals("String_Node_Str",serviceNode.getIpMgmtAddress().getIpv4Address().getValue(),SERVICE_NODE_IP_MANAGEMENT_ADDRESS);
}
Program: 132030
Project: 132030
Buggy source:
@SuppressWarnings("String_Node_Str") private <U extends DataObject>boolean writeMergeTransaction(InstanceIdentifier<U> addIID,U data){
  long timeout=5000L;
  int attempt=0;
  WriteTransaction transaction=null;
  do {
    attempt++;
    try {
      transaction=mountpoint.newWriteOnlyTransaction();
    }
 catch (    RuntimeException e) {
      if (e.getCause().getClass().equals(NetconfDocumentedException.class)) {
        LOG.warn("String_Node_Str",attempt,e.getCause());
        try {
          Thread.sleep(timeout);
          timeout+=1000L;
        }
 catch (        InterruptedException i) {
          LOG.error("String_Node_Str",i);
        }
      }
 else {
        LOG.error("String_Node_Str",e);
      }
    }
  }
 while (attempt <= 5 && transaction == null);
  if (transaction == null) {
    LOG.error("String_Node_Str");
    return false;
  }
  try {
    transaction.merge(Preconditions.checkNotNull(datastoreType),addIID,data);
    CheckedFuture<Void,TransactionCommitFailedException> submitFuture=transaction.submit();
    submitFuture.checkedGet();
    return true;
  }
 catch (  TransactionCommitFailedException e) {
    LOG.error("String_Node_Str",e);
    return false;
  }
catch (  Exception e) {
    LOG.error("String_Node_Str",e);
    return false;
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private <U extends DataObject>boolean writeMergeTransaction(InstanceIdentifier<U> addIID,U dataObject){
  long timeout=5000L;
  int attempt=0;
  WriteTransaction transaction=null;
  do {
    attempt++;
    try {
      transaction=mountpoint.newWriteOnlyTransaction();
    }
 catch (    RuntimeException e) {
      if (e.getCause().getClass().equals(NetconfDocumentedException.class)) {
        LOG.warn("String_Node_Str",attempt,e.getCause());
        try {
          Thread.sleep(timeout);
          timeout+=1000L;
        }
 catch (        InterruptedException i) {
          LOG.error("String_Node_Str",i);
        }
      }
 else {
        LOG.error("String_Node_Str",e);
      }
    }
  }
 while (attempt <= 5 && transaction == null);
  if (transaction == null) {
    LOG.error("String_Node_Str");
    return false;
  }
  try {
    transaction.merge(Preconditions.checkNotNull(datastoreType),addIID,dataObject);
    CheckedFuture<Void,TransactionCommitFailedException> submitFuture=transaction.submit();
    submitFuture.checkedGet();
    return true;
  }
 catch (  TransactionCommitFailedException e) {
    LOG.error("String_Node_Str",e);
    return false;
  }
catch (  Exception e) {
    LOG.error("String_Node_Str",e);
    return false;
  }
}
Program: 132031
Project: 132031
Buggy source:
@Override public void setFlowWriter(SfcOfFlowWriterInterface sfcOfFlowWriter){
  this.sfcOfFlowWriter=sfcOfFlowWriter;
}

Fixed version (ground truth):
@Override public void setFlowWriter(SfcOfFlowWriterInterface writer){
  this.sfcOfFlowWriter=writer;
}
Program: 132032
Project: 132032
Buggy source:
public void setFlowProgrammer(SfcOfFlowProgrammerInterface sfcFlowProgrammer){
  this.sfcFlowProgrammer=sfcFlowProgrammer;
}

Fixed version (ground truth):
public void setFlowProgrammer(SfcOfFlowProgrammerInterface flowProgrammer){
  this.sfcFlowProgrammer=flowProgrammer;
}
Program: 132033
Project: 132033
Buggy source:
/** 
 * Update the operational datastore with information related to the rendered path.
 * @param theGraph the graph on which the just-rendered path was based
 * @param rsp the rendered service path
 */
public void updateOperationalDSInfo(SffGraph theGraph,RenderedServicePath rsp){
}

Fixed version (ground truth):
/** 
 * Update the operational datastore with information related to the rendered path.
 * @param theGraph the graph on which the just-rendered path was based
 * @param updatedRsp the rendered service path
 */
public void updateOperationalDSInfo(SffGraph theGraph,RenderedServicePath updatedRsp){
}
Program: 132034
Project: 132034
Buggy source:
public void setSfcPotRspProcessor(SfcPotNetconfIoam sfcPotNetconfIoam){
  this.sfcPotNetconfIoam=sfcPotNetconfIoam;
}

Fixed version (ground truth):
public void setSfcPotRspProcessor(SfcPotNetconfIoam netconfIoam){
  this.sfcPotNetconfIoam=netconfIoam;
}
Program: 132036
Project: 132036
Buggy source:
@Test public void createSfTestAuthFail(){
  TackerManager tackerManager=TackerManager.builder().setBaseUri(BASE_URI).setTackerPort(BASE_PORT).setKeystonePort(KEYSTONE_PORT).setAuth(Auth.builder().setTenantName("String_Node_Str").setPasswordCredentials(new PasswordCredentials("String_Node_Str","String_Node_Str")).build()).build();
  ServiceFunctionType sfType=new ServiceFunctionTypeBuilder().setType(new SftTypeName("String_Node_Str")).build();
  boolean result=tackerManager.createSf(sfType);
  LOG.debug("String_Node_Str" + !result);
  Assert.assertFalse(result);
}

Fixed version (ground truth):
@Test public void createSfTestAuthFail(){
  TackerManager badCredentialsTackerManager=TackerManager.builder().setBaseUri(BASE_URI).setTackerPort(BASE_PORT).setKeystonePort(KEYSTONE_PORT).setAuth(Auth.builder().setTenantName("String_Node_Str").setPasswordCredentials(new PasswordCredentials("String_Node_Str","String_Node_Str")).build()).build();
  ServiceFunctionType sfType=new ServiceFunctionTypeBuilder().setType(new SftTypeName("String_Node_Str")).build();
  boolean result=badCredentialsTackerManager.createSf(sfType);
  LOG.debug("String_Node_Str" + !result);
  Assert.assertFalse(result);
}
Program: 132037
Project: 132037
Buggy source:
/** 
 * Creates a table path from a node ID and table ID.
 * @param nodeId the ID of the node
 * @param tableId the ID of the table
 * @return the {@link InstanceIdentifier}
 */
public static final InstanceIdentifier<Table> createTablePath(final NodeId nodeId,final short tableId){
  return createNodePath(nodeId).builder().augmentation(FlowCapableNode.class).child(Table.class,new TableKey(tableId)).build();
}

Fixed version (ground truth):
/** 
 * Creates a table path from a node ID and table ID.
 * @param nodeId the ID of the node
 * @param tableId the ID of the table
 * @return the {@link InstanceIdentifier}
 */
public static InstanceIdentifier<Table> createTablePath(final NodeId nodeId,final short tableId){
  return createNodePath(nodeId).builder().augmentation(FlowCapableNode.class).child(Table.class,new TableKey(tableId)).build();
}
Program: 132038
Project: 132038
Buggy source:
/** 
 * Creates an Instance Identifier (path) for node with specified id.
 * @param nodeId the ID of the node
 * @return the {@link InstanceIdentifier}
 */
public static final InstanceIdentifier<Node> createNodePath(final NodeId nodeId){
  return InstanceIdentifier.builder(Nodes.class).child(Node.class,new NodeKey(nodeId)).build();
}

Fixed version (ground truth):
/** 
 * Creates an Instance Identifier (path) for node with specified id.
 * @param nodeId the ID of the node
 * @return the {@link InstanceIdentifier}
 */
public static InstanceIdentifier<Node> createNodePath(final NodeId nodeId){
  return InstanceIdentifier.builder(Nodes.class).child(Node.class,new NodeKey(nodeId)).build();
}
Program: 132039
Project: 132039
Buggy source:
protected void setupSfc(){
  dataBroker=getDataBroker();
  SfcDataStoreAPI.setDataProviderAux(dataBroker);
  SfcProviderRpc.setDataProviderAux(dataBroker);
  sfcIids=new SfcInstanceIdentifiers();
}

Fixed version (ground truth):
protected void setupSfc(){
  dataBroker=getDataBroker();
  SfcDataStoreAPI.setDataProviderAux(dataBroker);
  sfcIids=new SfcInstanceIdentifiers();
}
Program: 132040
Project: 132040
Buggy source:
protected void setupSfc(){
  dataBroker=getDataBroker();
  SfcDataStoreAPI.setDataProviderAux(dataBroker);
  SfcProviderRpc.setDataProviderAux(dataBroker);
  sfcIids=new SfcInstanceIdentifiers();
}

Fixed version (ground truth):
protected void setupSfc(){
  dataBroker=getDataBroker();
  SfcDataStoreAPI.setDataProviderAux(dataBroker);
  sfcIids=new SfcInstanceIdentifiers();
}
Program: 132041
Project: 132041
Buggy source:
@Before public void init(){
  dataBroker=getDataBroker();
  sfcProviderRpc=new SfcProviderRpc();
  SfcProviderRpc.setDataProviderAux(dataBroker);
  SfcDataStoreAPI.setDataProviderAux(dataBroker);
}

Fixed version (ground truth):
@Before public void init(){
  dataBroker=getDataBroker();
  sfcProviderRpc=new SfcProviderRpc(dataBroker);
  SfcDataStoreAPI.setDataProviderAux(dataBroker);
}
Program: 132043
Project: 132043
Buggy source:
void configureMacChainingNextHopFlow(final String sffNodeName,final String vmac,final String dstSfMac,final String nextVMac,final boolean l2Tranparent);

Fixed version (ground truth):
void configureMacChainingNextHopFlow(String sffNodeName,String vmac,String dstSfMac,String nextVMac,boolean l2Tranparent);
Program: 132044
Project: 132044
Buggy source:
void configureMacChainingSfTransportEgressFlow(final String sffNodeName,final String dstMac,String port,final String vmac);

Fixed version (ground truth):
void configureMacChainingSfTransportEgressFlow(String sffNodeName,String dstMac,String port,String vmac);
Program: 132045
Project: 132045
Buggy source:
public abstract ServiceFunctionType getServiceFunctionType(final SfName sfName,long rspId);

Fixed version (ground truth):
public abstract ServiceFunctionType getServiceFunctionType(SfName sfName,long rspId);
Program: 132046
Project: 132046
Buggy source:
private long toLong(){
  long mac=0;
  for (int i=0; i < 6; i++) {
    long tmp=(macAddr[i] & 0xffL) << ((5 - i) * 8);
    mac|=tmp;
  }
  return mac;
}

Fixed version (ground truth):
private long toLong(){
  long mac=0;
  for (int i=0; i < 6; i++) {
    long tmp=(macAddr[i] & 0xffL) << (5 - i) * 8;
    mac|=tmp;
  }
  return mac;
}
Program: 132047
Project: 132047
Buggy source:
private byte[] toByte(long address){
  byte[] addressInBytes=new byte[]{(byte)((address >> 40) & 0xff),(byte)((address >> 32) & 0xff),(byte)((address >> 24) & 0xff),(byte)((address >> 16) & 0xff),(byte)((address >> 8) & 0xff),(byte)((address >> 0) & 0xff)};
  return addressInBytes;
}

Fixed version (ground truth):
private byte[] toByte(long address){
  byte[] addressInBytes=new byte[]{(byte)(address >> 40 & 0xff),(byte)(address >> 32 & 0xff),(byte)(address >> 24 & 0xff),(byte)(address >> 16 & 0xff),(byte)(address >> 8 & 0xff),(byte)(address >> 0 & 0xff)};
  return addressInBytes;
}
Program: 132048
Project: 132048
Buggy source:
public VirtualMacAddress(int flags,long port,int chainId){
  if (port >= MAX_PORT || port < 0) {
    throw new IllegalArgumentException(String.format("String_Node_Str",MAX_PORT));
  }
  final int flagsMask=(MAX_FLAGS - 1) << (24 - FLAGS_LEN);
  if ((flags & (~flagsMask)) != 0) {
    throw new IllegalArgumentException(String.format("String_Node_Str",flags));
  }
  this.chainId=chainId;
  this.port=(int)port;
  this.flags=flags;
  this.macAddr=toByte(BASE_OUI | flags | port << (CID_LEN + SFID_LEN) | chainId << (SFID_LEN) | (int)(Math.pow(2,SFID_LEN) - 1));
}

Fixed version (ground truth):
public VirtualMacAddress(int flags,long port,int chainId){
  if (port >= MAX_PORT || port < 0) {
    throw new IllegalArgumentException(String.format("String_Node_Str",MAX_PORT));
  }
  final int flagsMask=MAX_FLAGS - 1 << 24 - FLAGS_LEN;
  if ((flags & ~flagsMask) != 0) {
    throw new IllegalArgumentException(String.format("String_Node_Str",flags));
  }
  this.chainId=chainId;
  this.port=(int)port;
  this.flags=flags;
  this.macAddr=toByte(BASE_OUI | flags | port << CID_LEN + SFID_LEN | chainId << SFID_LEN | (int)(Math.pow(2,SFID_LEN) - 1));
}
Program: 132051
Project: 132051
Buggy source:
public GetSFDescriptionOutput getSFDescriptionInfoFromNetconf(String nodeName){
  GetSFDescriptionOutput ret=null;
  printTraceStart(LOG);
  ServiceFunctionDescriptionMonitorReportService service=getSfDescriptionMonitorService(nodeName);
  if (service != null) {
    Future<RpcResult<GetSFDescriptionOutput>> result=service.getSFDescription();
    RpcResult<GetSFDescriptionOutput> output;
    try {
      output=result.get();
      if (output.isSuccessful()) {
        ret=output.getResult();
        LOG.info("String_Node_Str");
      }
 else {
        LOG.error("String_Node_Str");
      }
    }
 catch (    InterruptedException|ExecutionException e) {
      LOG.error("String_Node_Str");
    }
  }
  printTraceStop(LOG);
  return ret;
}

Fixed version (ground truth):
public GetSFDescriptionOutput getSFDescriptionInfoFromNetconf(String nodeName){
  GetSFDescriptionOutput ret=null;
  printTraceStart(LOG);
  ServiceFunctionDescriptionMonitorReportService service=getSfDescriptionMonitorService(nodeName);
  if (service != null) {
    Future<RpcResult<GetSFDescriptionOutput>> result=service.getSFDescription();
    RpcResult<GetSFDescriptionOutput> output;
    try {
      output=result.get();
      if (output.isSuccessful()) {
        ret=output.getResult();
        LOG.info("String_Node_Str");
      }
 else {
        LOG.error("String_Node_Str");
      }
    }
 catch (    InterruptedException|ExecutionException e) {
      LOG.error("String_Node_Str",e);
    }
  }
  printTraceStop(LOG);
  return ret;
}
Program: 132052
Project: 132052
Buggy source:
public GetSFMonitoringInfoOutput getSFMonitorInfoFromNetconf(String nodeName){
  GetSFMonitoringInfoOutput ret=null;
  printTraceStart(LOG);
  ServiceFunctionDescriptionMonitorReportService service=getSfDescriptionMonitorService(nodeName);
  if (service != null) {
    Future<RpcResult<GetSFMonitoringInfoOutput>> result=service.getSFMonitoringInfo();
    RpcResult<GetSFMonitoringInfoOutput> output;
    try {
      output=result.get();
      if (output.isSuccessful()) {
        ret=output.getResult();
        LOG.info("String_Node_Str");
      }
 else {
        LOG.error("String_Node_Str");
      }
    }
 catch (    InterruptedException|ExecutionException e) {
      LOG.error("String_Node_Str");
    }
  }
  printTraceStop(LOG);
  return ret;
}

Fixed version (ground truth):
public GetSFMonitoringInfoOutput getSFMonitorInfoFromNetconf(String nodeName){
  GetSFMonitoringInfoOutput ret=null;
  printTraceStart(LOG);
  ServiceFunctionDescriptionMonitorReportService service=getSfDescriptionMonitorService(nodeName);
  if (service != null) {
    Future<RpcResult<GetSFMonitoringInfoOutput>> result=service.getSFMonitoringInfo();
    RpcResult<GetSFMonitoringInfoOutput> output;
    try {
      output=result.get();
      if (output.isSuccessful()) {
        ret=output.getResult();
        LOG.info("String_Node_Str");
      }
 else {
        LOG.error("String_Node_Str");
      }
    }
 catch (    InterruptedException|ExecutionException e) {
      LOG.error("String_Node_Str",e);
    }
  }
  printTraceStop(LOG);
  return ret;
}
Program: 132053
Project: 132053
Buggy source:
public void setSfcProviderSfDescriptionMonitorAPI(SfcProviderSfDescriptionMonitorAPI broker){
  getSfDescMon=broker;
}

Fixed version (ground truth):
public void setSfcProviderSfDescriptionMonitorAPI(SfcProviderSfDescriptionMonitorAPI descriptionMonitorAPI){
  getSfDescMon=descriptionMonitorAPI;
}
Program: 132055
Project: 132055
Buggy source:
public static Action createActionPktIn(final int pktLength,final int order){
  OutputActionBuilder output=new OutputActionBuilder();
  output.setMaxLength(new Integer(0xffff));
  Uri controllerPort=new Uri(OutputPortValues.CONTROLLER.toString());
  output.setOutputNodeConnector(controllerPort);
  ActionBuilder ab=createActionBuilder(order);
  ab.setAction(new OutputActionCaseBuilder().setOutputAction(output.build()).build());
  return ab.build();
}

Fixed version (ground truth):
public static Action createActionPktIn(final int pktLength,final int order){
  OutputActionBuilder output=new OutputActionBuilder();
  output.setMaxLength(0xffff);
  Uri controllerPort=new Uri(OutputPortValues.CONTROLLER.toString());
  output.setOutputNodeConnector(controllerPort);
  ActionBuilder ab=createActionBuilder(order);
  ab.setAction(new OutputActionCaseBuilder().setOutputAction(output.build()).build());
  return ab.build();
}
Program: 132056
Project: 132056
Buggy source:
public static Action createActionPushMpls(int order){
  PushMplsActionBuilder push=new PushMplsActionBuilder();
  push.setEthernetType(new Integer(ETHERTYPE_MPLS_UCAST));
  PushMplsActionCaseBuilder pushMplsCase=new PushMplsActionCaseBuilder();
  pushMplsCase.setPushMplsAction(push.build());
  ActionBuilder ab=createActionBuilder(order);
  ab.setAction(pushMplsCase.build());
  return ab.build();
}

Fixed version (ground truth):
public static Action createActionPushMpls(int order){
  PushMplsActionBuilder push=new PushMplsActionBuilder();
  push.setEthernetType(ETHERTYPE_MPLS_UCAST);
  PushMplsActionCaseBuilder pushMplsCase=new PushMplsActionCaseBuilder();
  pushMplsCase.setPushMplsAction(push.build());
  ActionBuilder ab=createActionBuilder(order);
  ab.setAction(pushMplsCase.build());
  return ab.build();
}