nus-yam/ex-repair huggingface dataset:
Program: 132099
Project: 132099
Buggy source:
@Test public void pktInBufferingTimeout() throws InterruptedException {
  this.pktInHandler.setMaxBufferTime(1);
  this.pktInHandler.setPacketCountPurge(1000);
  PacketReceived pkt=createPacket();
  this.pktInHandler.onPacketReceived(pkt);
  verify(this.flowProgrammerMock,times(2)).setFlowRspId(anyLong());
  verify(this.flowProgrammerMock,times(2)).configurePathMapperAclFlow(anyString(),anyString(),anyString(),anyShort());
  verify(this.flowProgrammerMock,times(1)).compareClassificationTableCookie((FlowCookie)anyObject());
  verifyNoMoreInteractions(this.flowProgrammerMock);
  Thread.sleep(1);
  resetFlowProgrammerMock();
  this.pktInHandler.onPacketReceived(pkt);
  verify(this.flowProgrammerMock,times(2)).setFlowRspId(anyLong());
  verify(this.flowProgrammerMock,times(2)).configurePathMapperAclFlow(anyString(),anyString(),anyString(),anyShort());
  verify(this.flowProgrammerMock,times(1)).compareClassificationTableCookie((FlowCookie)anyObject());
  verifyNoMoreInteractions(this.flowProgrammerMock);
}

Fixed version (ground truth):
@Test public void pktInBufferingTimeout() throws InterruptedException {
  this.pktInHandler.setMaxBufferTime(1);
  this.pktInHandler.setPacketCountPurge(1000);
  PacketReceived pkt=createPacket();
  this.pktInHandler.onPacketReceived(pkt);
  verify(this.flowProgrammerMock,times(2)).setFlowRspId(anyLong());
  verify(this.flowProgrammerMock,times(2)).configurePathMapperAclFlow(anyString(),anyString(),anyString(),anyShort());
  verify(this.flowProgrammerMock,times(1)).compareClassificationTableCookie((FlowCookie)anyObject());
  verifyNoMoreInteractions(this.flowProgrammerMock);
  Thread.sleep(10);
  resetFlowProgrammerMock();
  this.pktInHandler.onPacketReceived(pkt);
  verify(this.flowProgrammerMock,times(2)).setFlowRspId(anyLong());
  verify(this.flowProgrammerMock,times(2)).configurePathMapperAclFlow(anyString(),anyString(),anyString(),anyShort());
  verify(this.flowProgrammerMock,times(1)).compareClassificationTableCookie((FlowCookie)anyObject());
  verifyNoMoreInteractions(this.flowProgrammerMock);
}
Program: 132100
Project: 132100
Buggy source:
@Test public void pktInPurgeBuffering() throws InterruptedException {
  this.pktInHandler.setMaxBufferTime(1);
  this.pktInHandler.setPacketCountPurge(2);
  PacketReceived pkt=createPacket();
  assertEquals(this.pktInHandler.getBufferSize(),0);
  this.pktInHandler.onPacketReceived(pkt);
  verify(this.flowProgrammerMock,times(2)).setFlowRspId(anyLong());
  verify(this.flowProgrammerMock,times(2)).configurePathMapperAclFlow(anyString(),anyString(),anyString(),anyShort());
  verify(this.flowProgrammerMock,times(1)).compareClassificationTableCookie((FlowCookie)anyObject());
  verifyNoMoreInteractions(this.flowProgrammerMock);
  assertEquals(this.pktInHandler.getBufferSize(),1);
  Thread.sleep(1);
  resetFlowProgrammerMock();
  this.pktInHandler.onPacketReceived(pkt);
  verify(this.flowProgrammerMock,times(2)).setFlowRspId(anyLong());
  verify(this.flowProgrammerMock,times(2)).configurePathMapperAclFlow(anyString(),anyString(),anyString(),anyShort());
  verify(this.flowProgrammerMock,times(1)).compareClassificationTableCookie((FlowCookie)anyObject());
  verifyNoMoreInteractions(this.flowProgrammerMock);
  assertEquals(this.pktInHandler.getBufferSize(),1);
}

Fixed version (ground truth):
@Test public void pktInPurgeBuffering() throws InterruptedException {
  this.pktInHandler.setMaxBufferTime(1);
  this.pktInHandler.setPacketCountPurge(2);
  PacketReceived pkt=createPacket();
  assertEquals(this.pktInHandler.getBufferSize(),0);
  this.pktInHandler.onPacketReceived(pkt);
  verify(this.flowProgrammerMock,times(2)).setFlowRspId(anyLong());
  verify(this.flowProgrammerMock,times(2)).configurePathMapperAclFlow(anyString(),anyString(),anyString(),anyShort());
  verify(this.flowProgrammerMock,times(1)).compareClassificationTableCookie((FlowCookie)anyObject());
  verifyNoMoreInteractions(this.flowProgrammerMock);
  assertEquals(this.pktInHandler.getBufferSize(),1);
  Thread.sleep(10);
  resetFlowProgrammerMock();
  this.pktInHandler.onPacketReceived(pkt);
  verify(this.flowProgrammerMock,times(2)).setFlowRspId(anyLong());
  verify(this.flowProgrammerMock,times(2)).configurePathMapperAclFlow(anyString(),anyString(),anyString(),anyShort());
  verify(this.flowProgrammerMock,times(1)).compareClassificationTableCookie((FlowCookie)anyObject());
  verifyNoMoreInteractions(this.flowProgrammerMock);
  assertEquals(this.pktInHandler.getBufferSize(),1);
}
Program: 132101
Project: 132101
Buggy source:
@Test public void pktInBuffering(){
  this.pktInHandler.setMaxBufferTime(10000000);
  this.pktInHandler.setPacketCountPurge(1000);
  PacketReceived pkt=createPacket();
  this.pktInHandler.onPacketReceived(pkt);
  verify(this.flowProgrammerMock,times(2)).setFlowRspId(anyLong());
  verify(this.flowProgrammerMock,times(2)).configurePathMapperAclFlow(anyString(),anyString(),anyString(),anyShort());
  verify(this.flowProgrammerMock,times(1)).compareClassificationTableCookie((FlowCookie)anyObject());
  verifyNoMoreInteractions(this.flowProgrammerMock);
  resetFlowProgrammerMock();
  this.pktInHandler.onPacketReceived(pkt);
  verify(this.flowProgrammerMock,times(1)).compareClassificationTableCookie((FlowCookie)anyObject());
  verifyNoMoreInteractions(this.flowProgrammerMock);
}

Fixed version (ground truth):
@Test public void pktInBuffering(){
  this.pktInHandler.setMaxBufferTime(10000);
  this.pktInHandler.setPacketCountPurge(1000);
  PacketReceived pkt=createPacket();
  this.pktInHandler.onPacketReceived(pkt);
  verify(this.flowProgrammerMock,times(2)).setFlowRspId(anyLong());
  verify(this.flowProgrammerMock,times(2)).configurePathMapperAclFlow(anyString(),anyString(),anyString(),anyShort());
  verify(this.flowProgrammerMock,times(1)).compareClassificationTableCookie((FlowCookie)anyObject());
  verifyNoMoreInteractions(this.flowProgrammerMock);
  resetFlowProgrammerMock();
  this.pktInHandler.onPacketReceived(pkt);
  verify(this.flowProgrammerMock,times(1)).compareClassificationTableCookie((FlowCookie)anyObject());
  verifyNoMoreInteractions(this.flowProgrammerMock);
}
Program: 132102
Project: 132102
Buggy source:
@Test public void pktInBufferingTimeout() throws InterruptedException {
  this.pktInHandler.setMaxBufferTime(1);
  this.pktInHandler.setPacketCountPurge(1000);
  PacketReceived pkt=createPacket();
  this.pktInHandler.onPacketReceived(pkt);
  verify(this.flowProgrammerMock,times(2)).setFlowRspId(anyLong());
  verify(this.flowProgrammerMock,times(2)).configurePathMapperAclFlow(anyString(),anyString(),anyString(),anyShort());
  verify(this.flowProgrammerMock,times(1)).compareClassificationTableCookie((FlowCookie)anyObject());
  verifyNoMoreInteractions(this.flowProgrammerMock);
  Thread.sleep(1);
  resetFlowProgrammerMock();
  this.pktInHandler.onPacketReceived(pkt);
  verify(this.flowProgrammerMock,times(2)).setFlowRspId(anyLong());
  verify(this.flowProgrammerMock,times(2)).configurePathMapperAclFlow(anyString(),anyString(),anyString(),anyShort());
  verify(this.flowProgrammerMock,times(1)).compareClassificationTableCookie((FlowCookie)anyObject());
  verifyNoMoreInteractions(this.flowProgrammerMock);
}

Fixed version (ground truth):
@Test public void pktInBufferingTimeout() throws InterruptedException {
  this.pktInHandler.setMaxBufferTime(1);
  this.pktInHandler.setPacketCountPurge(1000);
  PacketReceived pkt=createPacket();
  this.pktInHandler.onPacketReceived(pkt);
  verify(this.flowProgrammerMock,times(2)).setFlowRspId(anyLong());
  verify(this.flowProgrammerMock,times(2)).configurePathMapperAclFlow(anyString(),anyString(),anyString(),anyShort());
  verify(this.flowProgrammerMock,times(1)).compareClassificationTableCookie((FlowCookie)anyObject());
  verifyNoMoreInteractions(this.flowProgrammerMock);
  Thread.sleep(10);
  resetFlowProgrammerMock();
  this.pktInHandler.onPacketReceived(pkt);
  verify(this.flowProgrammerMock,times(2)).setFlowRspId(anyLong());
  verify(this.flowProgrammerMock,times(2)).configurePathMapperAclFlow(anyString(),anyString(),anyString(),anyShort());
  verify(this.flowProgrammerMock,times(1)).compareClassificationTableCookie((FlowCookie)anyObject());
  verifyNoMoreInteractions(this.flowProgrammerMock);
}
Program: 132105
Project: 132105
Buggy source:
@Override public void close(){
  sfEntryDataChangeListenerRegistration.close();
  scfEntryDataChangeListenerRegistration.close();
  sffDataChangeListenerRegistration.close();
  sfRpcRegistration.close();
  sfcRpcRegistration.close();
  rspRpcRegistration.close();
  try {
    opendaylightSfc.close();
  }
 catch (  ExecutionException|InterruptedException e) {
    LOG.error("String_Node_Str" + "String_Node_Str",this);
  }
  LOG.info("String_Node_Str",this);
}

Fixed version (ground truth):
@Override public void close(){
  sfEntryDataChangeListenerRegistration.close();
  scfEntryDataChangeListenerRegistration.close();
  sffDataChangeListenerRegistration.close();
  sfstEntryDataChangeListenerRegistration.close();
  sfRpcRegistration.close();
  sfcRpcRegistration.close();
  rspRpcRegistration.close();
  try {
    opendaylightSfc.close();
  }
 catch (  ExecutionException|InterruptedException e) {
    LOG.error("String_Node_Str" + "String_Node_Str",this);
  }
  LOG.info("String_Node_Str",this);
}
Program: 132108
Project: 132108
Buggy source:
@Override public void close(){
  sbRestSfEntryDataListener.getDataChangeListenerRegistration().close();
  sbRestSfgEntryDataListener.getDataChangeListenerRegistration().close();
  sbRestSffEntryDataListener.getDataChangeListenerRegistration().close();
  sbRestRspEntryDataListener.getDataChangeListenerRegistration().close();
  sbRestAclEntryDataListener.getDataChangeListenerRegistration().close();
  sbRestScfEntryDataListener.getDataChangeListenerRegistration().close();
  try {
    opendaylightSfc.close();
  }
 catch (  ExecutionException|InterruptedException e) {
    LOG.error("String_Node_Str",this);
  }
  LOG.info("String_Node_Str",this);
}

Fixed version (ground truth):
@Override public void close(){
  sbRestSfEntryDataListener.getDataChangeListenerRegistration().close();
  sbRestSfgEntryDataListener.getDataChangeListenerRegistration().close();
  sbRestSffEntryDataListener.getDataChangeListenerRegistration().close();
  sbRestRspEntryDataListener.getDataChangeListenerRegistration().close();
  sbRestAclEntryDataListener.getDataChangeListenerRegistration().close();
  sbRestScfEntryDataListener.getDataChangeListenerRegistration().close();
  sbRestSfstEntryDataListener.getDataChangeListenerRegistration().close();
  try {
    opendaylightSfc.close();
  }
 catch (  ExecutionException|InterruptedException e) {
    LOG.error("String_Node_Str",this);
  }
  LOG.info("String_Node_Str",this);
}
Program: 132111
Project: 132111
Buggy source:
@Override public void close(){
  sfEntryDataChangeListenerRegistration.close();
  scfEntryDataChangeListenerRegistration.close();
  sffDataChangeListenerRegistration.close();
  sfRpcRegistration.close();
  sfcRpcRegistration.close();
  rspRpcRegistration.close();
  try {
    opendaylightSfc.close();
  }
 catch (  ExecutionException|InterruptedException e) {
    LOG.error("String_Node_Str" + "String_Node_Str",this);
  }
  LOG.info("String_Node_Str",this);
}

Fixed version (ground truth):
@Override public void close(){
  sfEntryDataChangeListenerRegistration.close();
  scfEntryDataChangeListenerRegistration.close();
  sffDataChangeListenerRegistration.close();
  sfstEntryDataChangeListenerRegistration.close();
  sfRpcRegistration.close();
  sfcRpcRegistration.close();
  rspRpcRegistration.close();
  try {
    opendaylightSfc.close();
  }
 catch (  ExecutionException|InterruptedException e) {
    LOG.error("String_Node_Str" + "String_Node_Str",this);
  }
  LOG.info("String_Node_Str",this);
}
Program: 132114
Project: 132114
Buggy source:
@Override public void close(){
  sbRestSfEntryDataListener.getDataChangeListenerRegistration().close();
  sbRestSfgEntryDataListener.getDataChangeListenerRegistration().close();
  sbRestSffEntryDataListener.getDataChangeListenerRegistration().close();
  sbRestRspEntryDataListener.getDataChangeListenerRegistration().close();
  sbRestAclEntryDataListener.getDataChangeListenerRegistration().close();
  sbRestScfEntryDataListener.getDataChangeListenerRegistration().close();
  try {
    opendaylightSfc.close();
  }
 catch (  ExecutionException|InterruptedException e) {
    LOG.error("String_Node_Str",this);
  }
  LOG.info("String_Node_Str",this);
}

Fixed version (ground truth):
@Override public void close(){
  sbRestSfEntryDataListener.getDataChangeListenerRegistration().close();
  sbRestSfgEntryDataListener.getDataChangeListenerRegistration().close();
  sbRestSffEntryDataListener.getDataChangeListenerRegistration().close();
  sbRestRspEntryDataListener.getDataChangeListenerRegistration().close();
  sbRestAclEntryDataListener.getDataChangeListenerRegistration().close();
  sbRestScfEntryDataListener.getDataChangeListenerRegistration().close();
  sbRestSfstEntryDataListener.getDataChangeListenerRegistration().close();
  try {
    opendaylightSfc.close();
  }
 catch (  ExecutionException|InterruptedException e) {
    LOG.error("String_Node_Str",this);
  }
  LOG.info("String_Node_Str",this);
}
Program: 132116
Project: 132116
Buggy source:
public SfcOvsNodeDataListener(OpendaylightSfc opendaylightSfc){
  setOpendaylightSfc(opendaylightSfc);
  setDataBroker(opendaylightSfc.getDataProvider());
  setInstanceIdentifier(OVSDB_NODE_AUGMENTATION_INSTANCE_IDENTIFIER);
  setDataStoreType(LogicalDatastoreType.OPERATIONAL);
}

Fixed version (ground truth):
public SfcOvsNodeDataListener(OpendaylightSfc opendaylightSfc){
  setOpendaylightSfc(opendaylightSfc);
  setDataBroker(opendaylightSfc.getDataProvider());
  setInstanceIdentifier(OVSDB_NODE_AUGMENTATION_INSTANCE_IDENTIFIER);
  setDataStoreType(LogicalDatastoreType.OPERATIONAL);
  registerAsDataChangeListener(DataBroker.DataChangeScope.BASE);
}
Program: 132118
Project: 132118
Buggy source:
@Before public void before() throws ExecutionException, InterruptedException {
  DataBroker dataBroker=getDataBroker();
  opendaylightSfc.setDataProvider(dataBroker);
  executor=opendaylightSfc.getExecutor();
  scheduler=new SfcServiceFunctionRoundRobinSchedulerAPI();
  executor.submit(SfcProviderServicePathAPI.getDeleteAll(new Object[]{},new Class[]{}));
  executor.submit(SfcProviderServiceChainAPI.getDeleteAll(new Object[]{},new Class[]{}));
  executor.submit(SfcProviderServiceTypeAPI.getDeleteAll(new Object[]{},new Class[]{}));
  executor.submit(SfcProviderServiceFunctionAPI.getDeleteAll(new Object[]{},new Class[]{}));
  executor.submit(SfcProviderServiceForwarderAPI.getDeleteAll(new Object[]{},new Class[]{}));
  Thread.sleep(1000);
}

Fixed version (ground truth):
@Before public void before() throws InterruptedException, IllegalAccessException {
  DataBroker dataBroker=getDataBroker();
  opendaylightSfc.setDataProvider(dataBroker);
  executor=opendaylightSfc.getExecutor();
  executor.submit(SfcProviderServicePathAPI.getDeleteAll(new Object[]{},new Class[]{}));
  executor.submit(SfcProviderServiceChainAPI.getDeleteAll(new Object[]{},new Class[]{}));
  executor.submit(SfcProviderServiceTypeAPI.getDeleteAll(new Object[]{},new Class[]{}));
  executor.submit(SfcProviderServiceFunctionAPI.getDeleteAll(new Object[]{},new Class[]{}));
  executor.submit(SfcProviderServiceForwarderAPI.getDeleteAll(new Object[]{},new Class[]{}));
  Thread.sleep(1000);
  Whitebox.getField(SfcServiceFunctionRoundRobinSchedulerAPI.class,"String_Node_Str").set(HashMap.class,new HashMap<>());
}
Program: 132119
Project: 132119
Buggy source:
@Test public void testServiceFunctionRoundRobinScheduler(){
  List<String> result=scheduler.scheduleServiceFunctions(createServiceFunctionChain(),255,createServiceFunctionPath());
  List<String> serviceFunctions=new ArrayList<>();
  serviceFunctions.add(SF_NAME + 1);
  serviceFunctions.add(SF_NAME + 2);
  serviceFunctions.add(SF_NAME + 3);
  assertNotNull("String_Node_Str",result);
  assertTrue("String_Node_Str",result.containsAll(serviceFunctions));
}

Fixed version (ground truth):
@Test public void testServiceFunctionRoundRobinScheduler(){
  SfcServiceFunctionRoundRobinSchedulerAPI scheduler=new SfcServiceFunctionRoundRobinSchedulerAPI();
  List<String> result=scheduler.scheduleServiceFunctions(createServiceFunctionChain(),255,createServiceFunctionPath());
  List<String> serviceFunctions=new ArrayList<>();
  serviceFunctions.add(SF_NAME + 1);
  serviceFunctions.add(SF_NAME + 2);
  serviceFunctions.add(SF_NAME + 3);
  assertNotNull("String_Node_Str",result);
  assertTrue("String_Node_Str",result.containsAll(serviceFunctions));
}
Program: 132120
Project: 132120
Buggy source:
@Test public void testServiceFunctionRoundRobinScheduler1(){
  ServiceFunctionPathBuilder serviceFunctionPathBuilder=new ServiceFunctionPathBuilder();
  List<String> result=scheduler.scheduleServiceFunctions(createServiceFunctionChain(),255,serviceFunctionPathBuilder.build());
  assertNull("String_Node_Str",result);
  boolean transactionSuccessful=writeTypes();
  assertTrue("String_Node_Str",transactionSuccessful);
  result=scheduler.scheduleServiceFunctions(createServiceFunctionChain(),255,serviceFunctionPathBuilder.build());
  List<String> serviceFunctionTypes=new ArrayList<>();
  serviceFunctionTypes.add(SF_NAME + "String_Node_Str");
  serviceFunctionTypes.add(SF_NAME + "String_Node_Str");
  serviceFunctionTypes.add(SF_NAME + "String_Node_Str");
  assertNotNull("String_Node_Str",result);
  assertTrue("String_Node_Str",result.containsAll(serviceFunctionTypes));
}

Fixed version (ground truth):
@Test public void testServiceFunctionRoundRobinScheduler1(){
  SfcServiceFunctionRoundRobinSchedulerAPI scheduler=new SfcServiceFunctionRoundRobinSchedulerAPI();
  ServiceFunctionPathBuilder serviceFunctionPathBuilder=new ServiceFunctionPathBuilder();
  List<String> result;
  boolean transactionSuccessful=writeTypes();
  assertTrue("String_Node_Str",transactionSuccessful);
  result=scheduler.scheduleServiceFunctions(createServiceFunctionChain(),255,serviceFunctionPathBuilder.build());
  List<String> serviceFunctionTypes=new ArrayList<>();
  serviceFunctionTypes.add(SF_NAME + "String_Node_Str");
  serviceFunctionTypes.add(SF_NAME + "String_Node_Str");
  serviceFunctionTypes.add(SF_NAME + "String_Node_Str");
  assertNotNull("String_Node_Str",result);
  assertTrue("String_Node_Str",result.containsAll(serviceFunctionTypes));
}
Program: 132122
Project: 132122
Buggy source:
public static RemoveMappingInput buildRemoveMappingInput(LispAddressContainer eid){
  RemoveMappingInputBuilder rmib=new RemoveMappingInputBuilder();
  rmib.setLispAddressContainer(eid);
  return rmib.build();
}

Fixed version (ground truth):
public static RemoveMappingInput buildRemoveMappingInput(LispAddressContainer eid,int mask){
  RemoveMappingInputBuilder rmib=new RemoveMappingInputBuilder();
  rmib.setLispAddressContainer(eid);
  rmib.setMaskLength((short)mask);
  return rmib.build();
}
Program: 132123
Project: 132123
Buggy source:
private boolean removeLispMapping(LispAddressContainer eid){
  Preconditions.checkNotNull(eid,"String_Node_Str");
  try {
    LOG.trace("String_Node_Str",eid);
    Future<RpcResult<Void>> result=lfmService.removeMapping(LispUtil.buildRemoveMappingInput(eid));
    result.get().getResult();
    return true;
  }
 catch (  Exception e) {
    LOG.warn("String_Node_Str",eid);
  }
  return false;
}

Fixed version (ground truth):
private boolean removeLispMapping(LispAddressContainer eid){
  Preconditions.checkNotNull(eid,"String_Node_Str");
  try {
    LOG.trace("String_Node_Str",eid);
    Future<RpcResult<Void>> result=lfmService.removeMapping(LispUtil.buildRemoveMappingInput(eid,0));
    result.get().getResult();
    return true;
  }
 catch (  Exception e) {
    LOG.warn("String_Node_Str",eid,e);
  }
  return false;
}
Program: 132124
Project: 132124
Buggy source:
public static RemoveMappingInput buildRemoveMappingInput(LispAddressContainer eid){
  RemoveMappingInputBuilder rmib=new RemoveMappingInputBuilder();
  rmib.setLispAddressContainer(eid);
  return rmib.build();
}

Fixed version (ground truth):
public static RemoveMappingInput buildRemoveMappingInput(LispAddressContainer eid,int mask){
  RemoveMappingInputBuilder rmib=new RemoveMappingInputBuilder();
  rmib.setLispAddressContainer(eid);
  rmib.setMaskLength((short)mask);
  return rmib.build();
}
Program: 132125
Project: 132125
Buggy source:
private boolean removeLispMapping(LispAddressContainer eid){
  Preconditions.checkNotNull(eid,"String_Node_Str");
  try {
    LOG.trace("String_Node_Str",eid);
    Future<RpcResult<Void>> result=lfmService.removeMapping(LispUtil.buildRemoveMappingInput(eid));
    result.get().getResult();
    return true;
  }
 catch (  Exception e) {
    LOG.warn("String_Node_Str",eid);
  }
  return false;
}

Fixed version (ground truth):
private boolean removeLispMapping(LispAddressContainer eid){
  Preconditions.checkNotNull(eid,"String_Node_Str");
  try {
    LOG.trace("String_Node_Str",eid);
    Future<RpcResult<Void>> result=lfmService.removeMapping(LispUtil.buildRemoveMappingInput(eid,0));
    result.get().getResult();
    return true;
  }
 catch (  Exception e) {
    LOG.warn("String_Node_Str",eid,e);
  }
  return false;
}
Program: 132126
Project: 132126
Buggy source:
@Before public void before() throws ExecutionException, InterruptedException {
  DataBroker dataBroker=getDataBroker();
  opendaylightSfc.setDataProvider(dataBroker);
  executor=opendaylightSfc.getExecutor();
  scheduler=new SfcServiceFunctionRoundRobinSchedulerAPI();
  executor.submit(SfcProviderServicePathAPI.getDeleteAll(new Object[]{},new Class[]{}));
  executor.submit(SfcProviderServiceChainAPI.getDeleteAll(new Object[]{},new Class[]{}));
  executor.submit(SfcProviderServiceTypeAPI.getDeleteAll(new Object[]{},new Class[]{}));
  executor.submit(SfcProviderServiceFunctionAPI.getDeleteAll(new Object[]{},new Class[]{}));
  executor.submit(SfcProviderServiceForwarderAPI.getDeleteAll(new Object[]{},new Class[]{}));
  Thread.sleep(1000);
}

Fixed version (ground truth):
@Before public void before() throws InterruptedException, IllegalAccessException {
  DataBroker dataBroker=getDataBroker();
  opendaylightSfc.setDataProvider(dataBroker);
  executor=opendaylightSfc.getExecutor();
  executor.submit(SfcProviderServicePathAPI.getDeleteAll(new Object[]{},new Class[]{}));
  executor.submit(SfcProviderServiceChainAPI.getDeleteAll(new Object[]{},new Class[]{}));
  executor.submit(SfcProviderServiceTypeAPI.getDeleteAll(new Object[]{},new Class[]{}));
  executor.submit(SfcProviderServiceFunctionAPI.getDeleteAll(new Object[]{},new Class[]{}));
  executor.submit(SfcProviderServiceForwarderAPI.getDeleteAll(new Object[]{},new Class[]{}));
  Thread.sleep(1000);
  Whitebox.getField(SfcServiceFunctionRoundRobinSchedulerAPI.class,"String_Node_Str").set(HashMap.class,new HashMap<>());
}
Program: 132127
Project: 132127
Buggy source:
@Test public void testServiceFunctionRoundRobinScheduler(){
  List<String> result=scheduler.scheduleServiceFunctions(createServiceFunctionChain(),255,createServiceFunctionPath());
  List<String> serviceFunctions=new ArrayList<>();
  serviceFunctions.add(SF_NAME + 1);
  serviceFunctions.add(SF_NAME + 2);
  serviceFunctions.add(SF_NAME + 3);
  assertNotNull("String_Node_Str",result);
  assertTrue("String_Node_Str",result.containsAll(serviceFunctions));
}

Fixed version (ground truth):
@Test public void testServiceFunctionRoundRobinScheduler(){
  SfcServiceFunctionRoundRobinSchedulerAPI scheduler=new SfcServiceFunctionRoundRobinSchedulerAPI();
  List<String> result=scheduler.scheduleServiceFunctions(createServiceFunctionChain(),255,createServiceFunctionPath());
  List<String> serviceFunctions=new ArrayList<>();
  serviceFunctions.add(SF_NAME + 1);
  serviceFunctions.add(SF_NAME + 2);
  serviceFunctions.add(SF_NAME + 3);
  assertNotNull("String_Node_Str",result);
  assertTrue("String_Node_Str",result.containsAll(serviceFunctions));
}
Program: 132128
Project: 132128
Buggy source:
@Test public void testServiceFunctionRoundRobinScheduler1(){
  ServiceFunctionPathBuilder serviceFunctionPathBuilder=new ServiceFunctionPathBuilder();
  List<String> result=scheduler.scheduleServiceFunctions(createServiceFunctionChain(),255,serviceFunctionPathBuilder.build());
  assertNull("String_Node_Str",result);
  boolean transactionSuccessful=writeTypes();
  assertTrue("String_Node_Str",transactionSuccessful);
  result=scheduler.scheduleServiceFunctions(createServiceFunctionChain(),255,serviceFunctionPathBuilder.build());
  List<String> serviceFunctionTypes=new ArrayList<>();
  serviceFunctionTypes.add(SF_NAME + "String_Node_Str");
  serviceFunctionTypes.add(SF_NAME + "String_Node_Str");
  serviceFunctionTypes.add(SF_NAME + "String_Node_Str");
  assertNotNull("String_Node_Str",result);
  assertTrue("String_Node_Str",result.containsAll(serviceFunctionTypes));
}

Fixed version (ground truth):
@Test public void testServiceFunctionRoundRobinScheduler1(){
  SfcServiceFunctionRoundRobinSchedulerAPI scheduler=new SfcServiceFunctionRoundRobinSchedulerAPI();
  ServiceFunctionPathBuilder serviceFunctionPathBuilder=new ServiceFunctionPathBuilder();
  List<String> result;
  boolean transactionSuccessful=writeTypes();
  assertTrue("String_Node_Str",transactionSuccessful);
  result=scheduler.scheduleServiceFunctions(createServiceFunctionChain(),255,serviceFunctionPathBuilder.build());
  List<String> serviceFunctionTypes=new ArrayList<>();
  serviceFunctionTypes.add(SF_NAME + "String_Node_Str");
  serviceFunctionTypes.add(SF_NAME + "String_Node_Str");
  serviceFunctionTypes.add(SF_NAME + "String_Node_Str");
  assertNotNull("String_Node_Str",result);
  assertTrue("String_Node_Str",result.containsAll(serviceFunctionTypes));
}
Program: 132130
Project: 132130
Buggy source:
@Override public Future<RpcResult<Void>> putServiceFunctionChains(PutServiceFunctionChainsInput input){
  printTraceStart(LOG);
  ServiceFunctionChainsBuilder builder=new ServiceFunctionChainsBuilder();
  builder=builder.setServiceFunctionChain(input.getServiceFunctionChain());
  ServiceFunctionChains sfcs=builder.build();
  if (dataBroker != null) {
    WriteTransaction writeTx=dataBroker.newWriteOnlyTransaction();
    writeTx.merge(LogicalDatastoreType.CONFIGURATION,OpendaylightSfc.SFC_IID,sfcs,true);
    writeTx.commit();
  }
 else {
    LOG.warn("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
  }
  return Futures.immediateFuture(Rpcs.<Void>getRpcResult(true,Collections.<RpcError>emptySet()));
}

Fixed version (ground truth):
@Override public Future<RpcResult<Void>> putServiceFunctionChains(PutServiceFunctionChainsInput input){
  printTraceStart(LOG);
  ServiceFunctionChainsBuilder serviceFunctionChainsBuilder=new ServiceFunctionChainsBuilder();
  serviceFunctionChainsBuilder=serviceFunctionChainsBuilder.setServiceFunctionChain(input.getServiceFunctionChain());
  ServiceFunctionChains sfcs=serviceFunctionChainsBuilder.build();
  if (!SfcDataStoreAPI.writeMergeTransactionAPI(OpendaylightSfc.SFC_IID,sfcs,LogicalDatastoreType.CONFIGURATION)) {
    LOG.error("String_Node_Str",input.getServiceFunctionChain().toString());
  }
  return Futures.immediateFuture(Rpcs.<Void>getRpcResult(true,Collections.<RpcError>emptySet()));
}
Program: 132131
Project: 132131
Buggy source:
private ServiceFunctionChain findServiceFunctionChain(String name){
  ServiceFunctionChainKey key=new ServiceFunctionChainKey(name);
  InstanceIdentifier<ServiceFunctionChain> iid=InstanceIdentifier.builder(ServiceFunctionChains.class).child(ServiceFunctionChain.class,key).toInstance();
  ReadOnlyTransaction readTx=dataBroker.newReadOnlyTransaction();
  Optional<ServiceFunctionChain> dataObject=null;
  try {
    dataObject=readTx.read(LogicalDatastoreType.CONFIGURATION,iid).get();
    if (dataObject != null) {
      return dataObject.get();
    }
 else {
      LOG.error("String_Node_Str");
      return null;
    }
  }
 catch (  InterruptedException|ExecutionException e) {
    LOG.error("String_Node_Str",e.getMessage());
    return null;
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private ServiceFunctionChain findServiceFunctionChain(String name){
  ServiceFunctionChainKey key=new ServiceFunctionChainKey(name);
  InstanceIdentifier<ServiceFunctionChain> serviceFunctionChainInstanceIdentifier=InstanceIdentifier.builder(ServiceFunctionChains.class).child(ServiceFunctionChain.class,key).build();
  ServiceFunctionChain serviceFunctionChain=SfcDataStoreAPI.readTransactionAPI(serviceFunctionChainInstanceIdentifier,LogicalDatastoreType.CONFIGURATION);
  if (serviceFunctionChain == null) {
    LOG.error("String_Node_Str",name);
  }
  return serviceFunctionChain;
}
Program: 132132
Project: 132132
Buggy source:
/** 
 * This methong reads all the necessary information for the first hop of a Rendered Service Path by ServiceFunctionTypeIdentity list. <p>
 * @param input RPC input including a ServiceFunctionTypeIdentity list
 * @return RPC output including a renderedServicePathFirstHop.
 */
@Override public Future<RpcResult<ReadRspFirstHopBySftListOutput>> readRspFirstHopBySftList(ReadRspFirstHopBySftListInput input){
  RenderedServicePathFirstHop renderedServicePathFirstHop=null;
  renderedServicePathFirstHop=SfcProviderRenderedPathAPI.readRspFirstHopBySftList(input.getSfst(),input.getSftList());
  ReadRspFirstHopBySftListOutput readRspFirstHopBySftListOutput=null;
  if (renderedServicePathFirstHop != null) {
    ReadRspFirstHopBySftListOutputBuilder readRspFirstHopBySftListOutputBuilder=new ReadRspFirstHopBySftListOutputBuilder();
    readRspFirstHopBySftListOutputBuilder.setRenderedServicePathFirstHop(renderedServicePathFirstHop);
    readRspFirstHopBySftListOutput=readRspFirstHopBySftListOutputBuilder.build();
  }
  RpcResultBuilder<ReadRspFirstHopBySftListOutput> rpcResultBuilder=RpcResultBuilder.success(readRspFirstHopBySftListOutput);
  return Futures.immediateFuture(rpcResultBuilder.build());
}

Fixed version (ground truth):
/** 
 * This method reads all the necessary information for the first hop of a Rendered Service Path by ServiceFunctionTypeIdentity list. <p>
 * @param input RPC input including a ServiceFunctionTypeIdentity list
 * @return RPC output including a renderedServicePathFirstHop.
 */
@Override public Future<RpcResult<ReadRspFirstHopBySftListOutput>> readRspFirstHopBySftList(ReadRspFirstHopBySftListInput input){
  RenderedServicePathFirstHop renderedServicePathFirstHop=null;
  renderedServicePathFirstHop=SfcProviderRenderedPathAPI.readRspFirstHopBySftList(input.getSfst(),input.getSftList());
  ReadRspFirstHopBySftListOutput readRspFirstHopBySftListOutput=null;
  if (renderedServicePathFirstHop != null) {
    ReadRspFirstHopBySftListOutputBuilder readRspFirstHopBySftListOutputBuilder=new ReadRspFirstHopBySftListOutputBuilder();
    readRspFirstHopBySftListOutputBuilder.setRenderedServicePathFirstHop(renderedServicePathFirstHop);
    readRspFirstHopBySftListOutput=readRspFirstHopBySftListOutputBuilder.build();
  }
  RpcResultBuilder<ReadRspFirstHopBySftListOutput> rpcResultBuilder=RpcResultBuilder.success(readRspFirstHopBySftListOutput);
  return Futures.immediateFuture(rpcResultBuilder.build());
}
Program: 132133
Project: 132133
Buggy source:
/** 
 * This method is used to retrieve a Service Function Type from the DataStore <p>
 * @param serviceFunctionType Service Function Type abstract class
 * @return Service Function Type Object which contains a list of SF of this type
 */
protected ServiceFunctionType readServiceFunctionType(Class<? extends ServiceFunctionTypeIdentity> serviceFunctionType){
  printTraceStart(LOG);
  ServiceFunctionType sft=null;
  InstanceIdentifier<ServiceFunctionType> sftIID;
  ServiceFunctionTypeKey serviceFunctionTypeKey=new ServiceFunctionTypeKey(serviceFunctionType);
  sftIID=InstanceIdentifier.builder(ServiceFunctionTypes.class).child(ServiceFunctionType.class,serviceFunctionTypeKey).build();
  ReadOnlyTransaction readTx=dataBroker.newReadOnlyTransaction();
  Optional<ServiceFunctionType> serviceFunctionTypeOptional=null;
  try {
    serviceFunctionTypeOptional=readTx.read(LogicalDatastoreType.CONFIGURATION,sftIID).get();
  }
 catch (  InterruptedException|ExecutionException e) {
    LOG.error("String_Node_Str" + "String_Node_Str",serviceFunctionType);
  }
  if (serviceFunctionTypeOptional != null && serviceFunctionTypeOptional.isPresent()) {
    sft=serviceFunctionTypeOptional.get();
  }
  printTraceStop(LOG);
  return sft;
}

Fixed version (ground truth):
/** 
 * This method is used to retrieve a Service Function Type from the DataStore <p>
 * @param serviceFunctionType Service Function Type abstract class
 * @return Service Function Type Object which contains a list of SF of this type
 */
protected ServiceFunctionType readServiceFunctionType(Class<? extends ServiceFunctionTypeIdentity> serviceFunctionType){
  printTraceStart(LOG);
  ServiceFunctionType sft=null;
  InstanceIdentifier<ServiceFunctionType> sftIID;
  ServiceFunctionTypeKey serviceFunctionTypeKey=new ServiceFunctionTypeKey(serviceFunctionType);
  sftIID=InstanceIdentifier.builder(ServiceFunctionTypes.class).child(ServiceFunctionType.class,serviceFunctionTypeKey).build();
  sft=SfcDataStoreAPI.readTransactionAPI(sftIID,LogicalDatastoreType.CONFIGURATION);
  if (sft == null) {
    LOG.error("String_Node_Str" + "String_Node_Str",serviceFunctionType);
  }
  printTraceStop(LOG);
  return sft;
}
Program: 132134
Project: 132134
Buggy source:
@Override public Future<RpcResult<Void>> putServiceFunctionChains(PutServiceFunctionChainsInput input){
  printTraceStart(LOG);
  ServiceFunctionChainsBuilder builder=new ServiceFunctionChainsBuilder();
  builder=builder.setServiceFunctionChain(input.getServiceFunctionChain());
  ServiceFunctionChains sfcs=builder.build();
  if (dataBroker != null) {
    WriteTransaction writeTx=dataBroker.newWriteOnlyTransaction();
    writeTx.merge(LogicalDatastoreType.CONFIGURATION,OpendaylightSfc.SFC_IID,sfcs,true);
    writeTx.commit();
  }
 else {
    LOG.warn("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
  }
  return Futures.immediateFuture(Rpcs.<Void>getRpcResult(true,Collections.<RpcError>emptySet()));
}

Fixed version (ground truth):
@Override public Future<RpcResult<Void>> putServiceFunctionChains(PutServiceFunctionChainsInput input){
  printTraceStart(LOG);
  ServiceFunctionChainsBuilder serviceFunctionChainsBuilder=new ServiceFunctionChainsBuilder();
  serviceFunctionChainsBuilder=serviceFunctionChainsBuilder.setServiceFunctionChain(input.getServiceFunctionChain());
  ServiceFunctionChains sfcs=serviceFunctionChainsBuilder.build();
  if (!SfcDataStoreAPI.writeMergeTransactionAPI(OpendaylightSfc.SFC_IID,sfcs,LogicalDatastoreType.CONFIGURATION)) {
    LOG.error("String_Node_Str",input.getServiceFunctionChain().toString());
  }
  return Futures.immediateFuture(Rpcs.<Void>getRpcResult(true,Collections.<RpcError>emptySet()));
}
Program: 132135
Project: 132135
Buggy source:
private ServiceFunctionChain findServiceFunctionChain(String name){
  ServiceFunctionChainKey key=new ServiceFunctionChainKey(name);
  InstanceIdentifier<ServiceFunctionChain> iid=InstanceIdentifier.builder(ServiceFunctionChains.class).child(ServiceFunctionChain.class,key).toInstance();
  ReadOnlyTransaction readTx=dataBroker.newReadOnlyTransaction();
  Optional<ServiceFunctionChain> dataObject=null;
  try {
    dataObject=readTx.read(LogicalDatastoreType.CONFIGURATION,iid).get();
    if (dataObject != null) {
      return dataObject.get();
    }
 else {
      LOG.error("String_Node_Str");
      return null;
    }
  }
 catch (  InterruptedException|ExecutionException e) {
    LOG.error("String_Node_Str",e.getMessage());
    return null;
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private ServiceFunctionChain findServiceFunctionChain(String name){
  ServiceFunctionChainKey key=new ServiceFunctionChainKey(name);
  InstanceIdentifier<ServiceFunctionChain> serviceFunctionChainInstanceIdentifier=InstanceIdentifier.builder(ServiceFunctionChains.class).child(ServiceFunctionChain.class,key).build();
  ServiceFunctionChain serviceFunctionChain=SfcDataStoreAPI.readTransactionAPI(serviceFunctionChainInstanceIdentifier,LogicalDatastoreType.CONFIGURATION);
  if (serviceFunctionChain == null) {
    LOG.error("String_Node_Str",name);
  }
  return serviceFunctionChain;
}
Program: 132136
Project: 132136
Buggy source:
/** 
 * This methong reads all the necessary information for the first hop of a Rendered Service Path by ServiceFunctionTypeIdentity list. <p>
 * @param input RPC input including a ServiceFunctionTypeIdentity list
 * @return RPC output including a renderedServicePathFirstHop.
 */
@Override public Future<RpcResult<ReadRspFirstHopBySftListOutput>> readRspFirstHopBySftList(ReadRspFirstHopBySftListInput input){
  RenderedServicePathFirstHop renderedServicePathFirstHop=null;
  renderedServicePathFirstHop=SfcProviderRenderedPathAPI.readRspFirstHopBySftList(input.getSfst(),input.getSftList());
  ReadRspFirstHopBySftListOutput readRspFirstHopBySftListOutput=null;
  if (renderedServicePathFirstHop != null) {
    ReadRspFirstHopBySftListOutputBuilder readRspFirstHopBySftListOutputBuilder=new ReadRspFirstHopBySftListOutputBuilder();
    readRspFirstHopBySftListOutputBuilder.setRenderedServicePathFirstHop(renderedServicePathFirstHop);
    readRspFirstHopBySftListOutput=readRspFirstHopBySftListOutputBuilder.build();
  }
  RpcResultBuilder<ReadRspFirstHopBySftListOutput> rpcResultBuilder=RpcResultBuilder.success(readRspFirstHopBySftListOutput);
  return Futures.immediateFuture(rpcResultBuilder.build());
}

Fixed version (ground truth):
/** 
 * This method reads all the necessary information for the first hop of a Rendered Service Path by ServiceFunctionTypeIdentity list. <p>
 * @param input RPC input including a ServiceFunctionTypeIdentity list
 * @return RPC output including a renderedServicePathFirstHop.
 */
@Override public Future<RpcResult<ReadRspFirstHopBySftListOutput>> readRspFirstHopBySftList(ReadRspFirstHopBySftListInput input){
  RenderedServicePathFirstHop renderedServicePathFirstHop=null;
  renderedServicePathFirstHop=SfcProviderRenderedPathAPI.readRspFirstHopBySftList(input.getSfst(),input.getSftList());
  ReadRspFirstHopBySftListOutput readRspFirstHopBySftListOutput=null;
  if (renderedServicePathFirstHop != null) {
    ReadRspFirstHopBySftListOutputBuilder readRspFirstHopBySftListOutputBuilder=new ReadRspFirstHopBySftListOutputBuilder();
    readRspFirstHopBySftListOutputBuilder.setRenderedServicePathFirstHop(renderedServicePathFirstHop);
    readRspFirstHopBySftListOutput=readRspFirstHopBySftListOutputBuilder.build();
  }
  RpcResultBuilder<ReadRspFirstHopBySftListOutput> rpcResultBuilder=RpcResultBuilder.success(readRspFirstHopBySftListOutput);
  return Futures.immediateFuture(rpcResultBuilder.build());
}
Program: 132137
Project: 132137
Buggy source:
/** 
 * This method is used to retrieve a Service Function Type from the DataStore <p>
 * @param serviceFunctionType Service Function Type abstract class
 * @return Service Function Type Object which contains a list of SF of this type
 */
protected ServiceFunctionType readServiceFunctionType(Class<? extends ServiceFunctionTypeIdentity> serviceFunctionType){
  printTraceStart(LOG);
  ServiceFunctionType sft=null;
  InstanceIdentifier<ServiceFunctionType> sftIID;
  ServiceFunctionTypeKey serviceFunctionTypeKey=new ServiceFunctionTypeKey(serviceFunctionType);
  sftIID=InstanceIdentifier.builder(ServiceFunctionTypes.class).child(ServiceFunctionType.class,serviceFunctionTypeKey).build();
  ReadOnlyTransaction readTx=dataBroker.newReadOnlyTransaction();
  Optional<ServiceFunctionType> serviceFunctionTypeOptional=null;
  try {
    serviceFunctionTypeOptional=readTx.read(LogicalDatastoreType.CONFIGURATION,sftIID).get();
  }
 catch (  InterruptedException|ExecutionException e) {
    LOG.error("String_Node_Str" + "String_Node_Str",serviceFunctionType);
  }
  if (serviceFunctionTypeOptional != null && serviceFunctionTypeOptional.isPresent()) {
    sft=serviceFunctionTypeOptional.get();
  }
  printTraceStop(LOG);
  return sft;
}

Fixed version (ground truth):
/** 
 * This method is used to retrieve a Service Function Type from the DataStore <p>
 * @param serviceFunctionType Service Function Type abstract class
 * @return Service Function Type Object which contains a list of SF of this type
 */
protected ServiceFunctionType readServiceFunctionType(Class<? extends ServiceFunctionTypeIdentity> serviceFunctionType){
  printTraceStart(LOG);
  ServiceFunctionType sft=null;
  InstanceIdentifier<ServiceFunctionType> sftIID;
  ServiceFunctionTypeKey serviceFunctionTypeKey=new ServiceFunctionTypeKey(serviceFunctionType);
  sftIID=InstanceIdentifier.builder(ServiceFunctionTypes.class).child(ServiceFunctionType.class,serviceFunctionTypeKey).build();
  sft=SfcDataStoreAPI.readTransactionAPI(sftIID,LogicalDatastoreType.CONFIGURATION);
  if (sft == null) {
    LOG.error("String_Node_Str" + "String_Node_Str",serviceFunctionType);
  }
  printTraceStop(LOG);
  return sft;
}
Program: 132139
Project: 132139
Buggy source:
private boolean setSffRemainingHopDataPlaneLocator(final ServiceFunctionForwarder sff,final String rspTransport,SffDataPlaneLocator alreadySetSffDpl,boolean ingressDplSet,final long pathId,SffGraph sffGraph){
  List<SffDataPlaneLocator> sffDplList=sff.getSffDataPlaneLocator();
  if (sffDplList.size() == 1) {
    return true;
  }
  for (  SffDataPlaneLocator sffDpl : sffDplList) {
    LOG.debug("String_Node_Str",sffDpl.getName(),sffDpl.getDataPlaneLocator().getTransport().getName());
    if (sffDpl.getName().equals(alreadySetSffDpl.getName())) {
      continue;
    }
    if (sffDpl.getDataPlaneLocator().getTransport().getName().equals(rspTransport)) {
      if (ingressDplSet) {
        sffGraph.setSffEgressDpl(sff.getName(),pathId,sffDpl.getName());
      }
 else {
        sffGraph.setSffIngressDpl(sff.getName(),pathId,sffDpl.getName());
      }
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
private boolean setSffRemainingHopDataPlaneLocator(final ServiceFunctionForwarder sff,final String rspTransport,SffDataPlaneLocator alreadySetSffDpl,boolean ingressDplSet,final long pathId,SffGraph sffGraph){
  List<SffDataPlaneLocator> sffDplList=sff.getSffDataPlaneLocator();
  if (sffDplList.size() == 1) {
    sffGraph.setSffIngressDpl(sff.getName(),pathId,sffDplList.get(0).getName());
    sffGraph.setSffEgressDpl(sff.getName(),pathId,sffDplList.get(0).getName());
    return true;
  }
  for (  SffDataPlaneLocator sffDpl : sffDplList) {
    LOG.debug("String_Node_Str",sffDpl.getName(),sffDpl.getDataPlaneLocator().getTransport().getName());
    if (sffDpl.getName().equals(alreadySetSffDpl.getName())) {
      continue;
    }
    if (sffDpl.getDataPlaneLocator().getTransport().getName().equals(rspTransport)) {
      if (ingressDplSet) {
        sffGraph.setSffEgressDpl(sff.getName(),pathId,sffDpl.getName());
      }
 else {
        sffGraph.setSffIngressDpl(sff.getName(),pathId,sffDpl.getName());
      }
      return true;
    }
  }
  return false;
}
Program: 132140
Project: 132140
Buggy source:
public RenderedServicePath createRenderedServicePath(ServiceFunctionPath sfp,List<ServiceFunction> sfList,List<ServiceFunctionForwarder> sffList){
  String rspName=RSP_NAME_PREFIX + String.valueOf(RSP_NAME_INDEX++);
  RenderedServicePathBuilder rspBuilder=new RenderedServicePathBuilder();
  rspBuilder.setKey(new RenderedServicePathKey(rspName));
  rspBuilder.setName(rspName);
  rspBuilder.setParentServiceFunctionPath(sfp.getName());
  rspBuilder.setPathId(RSP_PATHID_INDEX++);
  rspBuilder.setTransportType(sfp.getTransportType());
  short index=0;
  short serviceIndex=255;
  List<RenderedServicePathHop> rspHopList=new ArrayList<RenderedServicePathHop>();
  for (  ServiceFunction sf : sfList) {
    ServiceFunctionForwarder sff=sffList.get(index);
    RenderedServicePathHopBuilder rspHopBuilder=new RenderedServicePathHopBuilder();
    rspHopBuilder.setKey(new RenderedServicePathHopKey(index));
    rspHopBuilder.setServiceFunctionForwarder(sff.getName());
    rspHopBuilder.setServiceFunctionName(sf.getName());
    rspHopBuilder.setServiceFunctionForwarderLocator(sff.getSffDataPlaneLocator().get(0).getName());
    rspHopBuilder.setServiceIndex(serviceIndex);
    rspHopBuilder.setHopNumber(index);
    rspHopList.add(rspHopBuilder.build());
    --serviceIndex;
    ++index;
  }
  rspBuilder.setRenderedServicePathHop(rspHopList);
  return rspBuilder.build();
}

Fixed version (ground truth):
public RenderedServicePath createRenderedServicePath(ServiceFunctionPath sfp,List<ServiceFunction> sfList,List<ServiceFunctionForwarder> sffList){
  String rspName=RSP_NAME_PREFIX + String.valueOf(RSP_NAME_INDEX++);
  RenderedServicePathBuilder rspBuilder=new RenderedServicePathBuilder();
  rspBuilder.setKey(new RenderedServicePathKey(rspName));
  rspBuilder.setStartingIndex(new Short((short)255));
  rspBuilder.setName(rspName);
  rspBuilder.setParentServiceFunctionPath(sfp.getName());
  rspBuilder.setPathId(RSP_PATHID_INDEX++);
  rspBuilder.setTransportType(sfp.getTransportType());
  short index=0;
  short serviceIndex=255;
  List<RenderedServicePathHop> rspHopList=new ArrayList<RenderedServicePathHop>();
  for (  ServiceFunction sf : sfList) {
    ServiceFunctionForwarder sff=sffList.get(index);
    RenderedServicePathHopBuilder rspHopBuilder=new RenderedServicePathHopBuilder();
    rspHopBuilder.setKey(new RenderedServicePathHopKey(index));
    rspHopBuilder.setServiceFunctionForwarder(sff.getName());
    rspHopBuilder.setServiceFunctionName(sf.getName());
    rspHopBuilder.setServiceFunctionForwarderLocator(sff.getSffDataPlaneLocator().get(0).getName());
    rspHopBuilder.setServiceIndex(serviceIndex);
    rspHopBuilder.setHopNumber(index);
    rspHopList.add(rspHopBuilder.build());
    --serviceIndex;
    ++index;
  }
  rspBuilder.setRenderedServicePathHop(rspHopList);
  return rspBuilder.build();
}
Program: 132142
Project: 132142
Buggy source:
private boolean setSffRemainingHopDataPlaneLocator(final ServiceFunctionForwarder sff,final String rspTransport,SffDataPlaneLocator alreadySetSffDpl,boolean ingressDplSet,final long pathId,SffGraph sffGraph){
  List<SffDataPlaneLocator> sffDplList=sff.getSffDataPlaneLocator();
  if (sffDplList.size() == 1) {
    return true;
  }
  for (  SffDataPlaneLocator sffDpl : sffDplList) {
    LOG.debug("String_Node_Str",sffDpl.getName(),sffDpl.getDataPlaneLocator().getTransport().getName());
    if (sffDpl.getName().equals(alreadySetSffDpl.getName())) {
      continue;
    }
    if (sffDpl.getDataPlaneLocator().getTransport().getName().equals(rspTransport)) {
      if (ingressDplSet) {
        sffGraph.setSffEgressDpl(sff.getName(),pathId,sffDpl.getName());
      }
 else {
        sffGraph.setSffIngressDpl(sff.getName(),pathId,sffDpl.getName());
      }
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
private boolean setSffRemainingHopDataPlaneLocator(final ServiceFunctionForwarder sff,final String rspTransport,SffDataPlaneLocator alreadySetSffDpl,boolean ingressDplSet,final long pathId,SffGraph sffGraph){
  List<SffDataPlaneLocator> sffDplList=sff.getSffDataPlaneLocator();
  if (sffDplList.size() == 1) {
    sffGraph.setSffIngressDpl(sff.getName(),pathId,sffDplList.get(0).getName());
    sffGraph.setSffEgressDpl(sff.getName(),pathId,sffDplList.get(0).getName());
    return true;
  }
  for (  SffDataPlaneLocator sffDpl : sffDplList) {
    LOG.debug("String_Node_Str",sffDpl.getName(),sffDpl.getDataPlaneLocator().getTransport().getName());
    if (sffDpl.getName().equals(alreadySetSffDpl.getName())) {
      continue;
    }
    if (sffDpl.getDataPlaneLocator().getTransport().getName().equals(rspTransport)) {
      if (ingressDplSet) {
        sffGraph.setSffEgressDpl(sff.getName(),pathId,sffDpl.getName());
      }
 else {
        sffGraph.setSffIngressDpl(sff.getName(),pathId,sffDpl.getName());
      }
      return true;
    }
  }
  return false;
}