nus-yam/ex-repair huggingface dataset:
Program: 132143
Project: 132143
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: 132145
Project: 132145
Buggy source:
SfcProviderRenderedPathAPI(Object[] params,Class[] paramsTypes,String m){
  super(params,paramsTypes,m);
  initServiceFuntionScheduler();
}

Fixed version (ground truth):
SfcProviderRenderedPathAPI(Object[] params,Class[] paramsTypes,String m){
  super(params,paramsTypes,m);
  initServiceFunctionScheduler();
}
Program: 132146
Project: 132146
Buggy source:
private String getServiceFunctionByType(ServiceFunctionType serviceFunctionType){
  List<SftServiceFunctionName> sftServiceFunctionNameList=serviceFunctionType.getSftServiceFunctionName();
  String sftServiceFunctionName=sftServiceFunctionNameList.get(0).getName();
  ServiceFunction serviceFunction=SfcProviderServiceFunctionAPI.readServiceFunctionExecutor(sftServiceFunctionName);
  if (!SfcProviderServiceFunctionAPI.putServiceFunctionMonitorExecutor(serviceFunction)) {
    LOG.error("String_Node_Str",serviceFunction.getName());
  }
  if (SfcProviderServiceFunctionAPI.readServiceFunctionDescriptionMonitorExecutor(sftServiceFunctionName) != null) {
    java.lang.Long preCPUUtilization=SfcProviderServiceFunctionAPI.readServiceFunctionDescriptionMonitorExecutor(sftServiceFunctionName).getMonitoringInfo().getResourceUtilization().getCPUUtilization();
    for (    SftServiceFunctionName curSftServiceFunctionName : sftServiceFunctionNameList) {
      java.lang.Long curCPUUtilization=SfcProviderServiceFunctionAPI.readServiceFunctionDescriptionMonitorExecutor(curSftServiceFunctionName.getName()).getMonitoringInfo().getResourceUtilization().getCPUUtilization();
      if (preCPUUtilization > curCPUUtilization) {
        preCPUUtilization=curCPUUtilization;
        sftServiceFunctionName=curSftServiceFunctionName.getName();
      }
    }
  }
  return sftServiceFunctionName;
}

Fixed version (ground truth):
private String getServiceFunctionByType(ServiceFunctionType serviceFunctionType){
  boolean ret=false;
  List<SftServiceFunctionName> sftServiceFunctionNameList=serviceFunctionType.getSftServiceFunctionName();
  String sfName=null;
  String sftServiceFunctionName=null;
  java.lang.Long preCPUUtilization=java.lang.Long.MAX_VALUE;
  for (  SftServiceFunctionName curSftServiceFunctionName : sftServiceFunctionNameList) {
    sfName=curSftServiceFunctionName.getName();
    ServiceFunction serviceFunction=SfcProviderServiceFunctionAPI.readServiceFunctionExecutor(sfName);
    if (serviceFunction == null) {
      LOG.error("String_Node_Str",sfName);
      continue;
    }
    ret=SfcProviderServiceFunctionAPI.putServiceFunctionMonitorExecutor(serviceFunction);
    if (ret == false) {
      LOG.error("String_Node_Str",sfName);
    }
    SfcSfDescMon sfcSfDescMon=SfcProviderServiceFunctionAPI.readServiceFunctionDescriptionMonitorExecutor(sfName);
    if (sfcSfDescMon == null) {
      sftServiceFunctionName=sfName;
      LOG.error("String_Node_Str",sfName);
      break;
    }
    java.lang.Long curCPUUtilization=sfcSfDescMon.getMonitoringInfo().getResourceUtilization().getCPUUtilization();
    if (preCPUUtilization > curCPUUtilization) {
      preCPUUtilization=curCPUUtilization;
      sftServiceFunctionName=sfName;
    }
  }
  if (sftServiceFunctionName == null) {
    LOG.error("String_Node_Str",serviceFunctionType.getType().getSimpleName());
  }
  return sftServiceFunctionName;
}
Program: 132147
Project: 132147
Buggy source:
private String getServiceFunctionByType(ServiceFunctionType serviceFunctionType){
  List<SftServiceFunctionName> sftServiceFunctionNameList=serviceFunctionType.getSftServiceFunctionName();
  Random rad=new Random();
  return sftServiceFunctionNameList.get(rad.nextInt(sftServiceFunctionNameList.size())).getName();
}

Fixed version (ground truth):
private String getServiceFunctionByType(ServiceFunctionType serviceFunctionType){
  List<SftServiceFunctionName> sftServiceFunctionNameList=serviceFunctionType.getSftServiceFunctionName();
  int maxTries=sftServiceFunctionNameList.size();
  Random rad=new Random();
  ServiceFunction serviceFunction=null;
  String serviceFunctionName=null;
  int start=rad.nextInt(sftServiceFunctionNameList.size());
  while (maxTries > 0) {
    serviceFunctionName=sftServiceFunctionNameList.get(start).getName();
    serviceFunction=SfcProviderServiceFunctionAPI.readServiceFunctionExecutor(serviceFunctionName);
    if (serviceFunction != null) {
      break;
    }
 else {
      LOG.debug("String_Node_Str",serviceFunctionName);
      maxTries--;
      serviceFunctionName=null;
      start=(start + 1) % sftServiceFunctionNameList.size();
    }
  }
  if (serviceFunctionName == null) {
    LOG.error("String_Node_Str",serviceFunctionType.getType().getSimpleName());
  }
  return serviceFunctionName;
}
Program: 132150
Project: 132150
Buggy source:
@Test public void testReadRspFirstHopBySftList() throws ExecutionException, InterruptedException {
  List<Class<? extends ServiceFunctionTypeIdentity>> sftList=new ArrayList<Class<? extends ServiceFunctionTypeIdentity>>();
  sftList.add(Firewall.class);
  sftList.add(Dpi.class);
  sftList.add(Napt44.class);
  sftList.add(HttpHeaderEnrichment.class);
  sftList.add(Qos.class);
  assertEquals("String_Node_Str",sftList.size(),5);
  RenderedServicePathFirstHop firstHop=SfcProviderRenderedPathAPI.readRspFirstHopBySftList(sftList);
  assertNotNull("String_Node_Str",firstHop);
  LOG.debug("String_Node_Str",firstHop.getIp().toString(),firstHop.getPort());
  assertEquals("String_Node_Str",firstHop.getIp(),new IpAddress(new Ipv4Address(SFF_LOCATOR_IP[0])));
  assertEquals("String_Node_Str",firstHop.getPort(),new PortNumber(PORT[0]));
}

Fixed version (ground truth):
@Test public void testReadRspFirstHopBySftList() throws ExecutionException, InterruptedException {
  List<Class<? extends ServiceFunctionTypeIdentity>> sftList=new ArrayList<Class<? extends ServiceFunctionTypeIdentity>>();
  sftList.add(Firewall.class);
  sftList.add(Dpi.class);
  sftList.add(Napt44.class);
  sftList.add(HttpHeaderEnrichment.class);
  sftList.add(Qos.class);
  assertEquals("String_Node_Str",sftList.size(),5);
  RenderedServicePathFirstHop firstHop=null;
  try {
    firstHop=SfcProviderRenderedPathAPI.readRspFirstHopBySftList(sftList);
  }
 catch (  NullPointerException e) {
    e.printStackTrace();
  }
  assertNotNull("String_Node_Str",firstHop);
  LOG.debug("String_Node_Str",firstHop.getIp().toString(),firstHop.getPort());
  assertEquals("String_Node_Str",firstHop.getIp(),new IpAddress(new Ipv4Address(SFF_LOCATOR_IP[0])));
  assertEquals("String_Node_Str",firstHop.getPort(),new PortNumber(PORT[0]));
}
Program: 132153
Project: 132153
Buggy source:
SfcProviderRenderedPathAPI(Object[] params,Class[] paramsTypes,String m){
  super(params,paramsTypes,m);
  initServiceFuntionScheduler();
}

Fixed version (ground truth):
SfcProviderRenderedPathAPI(Object[] params,Class[] paramsTypes,String m){
  super(params,paramsTypes,m);
  initServiceFunctionScheduler();
}
Program: 132154
Project: 132154
Buggy source:
private String getServiceFunctionByType(ServiceFunctionType serviceFunctionType){
  List<SftServiceFunctionName> sftServiceFunctionNameList=serviceFunctionType.getSftServiceFunctionName();
  String sftServiceFunctionName=sftServiceFunctionNameList.get(0).getName();
  ServiceFunction serviceFunction=SfcProviderServiceFunctionAPI.readServiceFunctionExecutor(sftServiceFunctionName);
  if (!SfcProviderServiceFunctionAPI.putServiceFunctionMonitorExecutor(serviceFunction)) {
    LOG.error("String_Node_Str",serviceFunction.getName());
  }
  if (SfcProviderServiceFunctionAPI.readServiceFunctionDescriptionMonitorExecutor(sftServiceFunctionName) != null) {
    java.lang.Long preCPUUtilization=SfcProviderServiceFunctionAPI.readServiceFunctionDescriptionMonitorExecutor(sftServiceFunctionName).getMonitoringInfo().getResourceUtilization().getCPUUtilization();
    for (    SftServiceFunctionName curSftServiceFunctionName : sftServiceFunctionNameList) {
      java.lang.Long curCPUUtilization=SfcProviderServiceFunctionAPI.readServiceFunctionDescriptionMonitorExecutor(curSftServiceFunctionName.getName()).getMonitoringInfo().getResourceUtilization().getCPUUtilization();
      if (preCPUUtilization > curCPUUtilization) {
        preCPUUtilization=curCPUUtilization;
        sftServiceFunctionName=curSftServiceFunctionName.getName();
      }
    }
  }
  return sftServiceFunctionName;
}

Fixed version (ground truth):
private String getServiceFunctionByType(ServiceFunctionType serviceFunctionType){
  boolean ret=false;
  List<SftServiceFunctionName> sftServiceFunctionNameList=serviceFunctionType.getSftServiceFunctionName();
  String sfName=null;
  String sftServiceFunctionName=null;
  java.lang.Long preCPUUtilization=java.lang.Long.MAX_VALUE;
  for (  SftServiceFunctionName curSftServiceFunctionName : sftServiceFunctionNameList) {
    sfName=curSftServiceFunctionName.getName();
    ServiceFunction serviceFunction=SfcProviderServiceFunctionAPI.readServiceFunctionExecutor(sfName);
    if (serviceFunction == null) {
      LOG.error("String_Node_Str",sfName);
      continue;
    }
    ret=SfcProviderServiceFunctionAPI.putServiceFunctionMonitorExecutor(serviceFunction);
    if (ret == false) {
      LOG.error("String_Node_Str",sfName);
    }
    SfcSfDescMon sfcSfDescMon=SfcProviderServiceFunctionAPI.readServiceFunctionDescriptionMonitorExecutor(sfName);
    if (sfcSfDescMon == null) {
      sftServiceFunctionName=sfName;
      LOG.error("String_Node_Str",sfName);
      break;
    }
    java.lang.Long curCPUUtilization=sfcSfDescMon.getMonitoringInfo().getResourceUtilization().getCPUUtilization();
    if (preCPUUtilization > curCPUUtilization) {
      preCPUUtilization=curCPUUtilization;
      sftServiceFunctionName=sfName;
    }
  }
  if (sftServiceFunctionName == null) {
    LOG.error("String_Node_Str",serviceFunctionType.getType().getSimpleName());
  }
  return sftServiceFunctionName;
}
Program: 132155
Project: 132155
Buggy source:
private String getServiceFunctionByType(ServiceFunctionType serviceFunctionType){
  List<SftServiceFunctionName> sftServiceFunctionNameList=serviceFunctionType.getSftServiceFunctionName();
  Random rad=new Random();
  return sftServiceFunctionNameList.get(rad.nextInt(sftServiceFunctionNameList.size())).getName();
}

Fixed version (ground truth):
private String getServiceFunctionByType(ServiceFunctionType serviceFunctionType){
  List<SftServiceFunctionName> sftServiceFunctionNameList=serviceFunctionType.getSftServiceFunctionName();
  int maxTries=sftServiceFunctionNameList.size();
  Random rad=new Random();
  ServiceFunction serviceFunction=null;
  String serviceFunctionName=null;
  int start=rad.nextInt(sftServiceFunctionNameList.size());
  while (maxTries > 0) {
    serviceFunctionName=sftServiceFunctionNameList.get(start).getName();
    serviceFunction=SfcProviderServiceFunctionAPI.readServiceFunctionExecutor(serviceFunctionName);
    if (serviceFunction != null) {
      break;
    }
 else {
      LOG.debug("String_Node_Str",serviceFunctionName);
      maxTries--;
      serviceFunctionName=null;
      start=(start + 1) % sftServiceFunctionNameList.size();
    }
  }
  if (serviceFunctionName == null) {
    LOG.error("String_Node_Str",serviceFunctionType.getType().getSimpleName());
  }
  return serviceFunctionName;
}
Program: 132158
Project: 132158
Buggy source:
@Test public void testReadRspFirstHopBySftList() throws ExecutionException, InterruptedException {
  List<Class<? extends ServiceFunctionTypeIdentity>> sftList=new ArrayList<Class<? extends ServiceFunctionTypeIdentity>>();
  sftList.add(Firewall.class);
  sftList.add(Dpi.class);
  sftList.add(Napt44.class);
  sftList.add(HttpHeaderEnrichment.class);
  sftList.add(Qos.class);
  assertEquals("String_Node_Str",sftList.size(),5);
  RenderedServicePathFirstHop firstHop=SfcProviderRenderedPathAPI.readRspFirstHopBySftList(sftList);
  assertNotNull("String_Node_Str",firstHop);
  LOG.debug("String_Node_Str",firstHop.getIp().toString(),firstHop.getPort());
  assertEquals("String_Node_Str",firstHop.getIp(),new IpAddress(new Ipv4Address(SFF_LOCATOR_IP[0])));
  assertEquals("String_Node_Str",firstHop.getPort(),new PortNumber(PORT[0]));
}

Fixed version (ground truth):
@Test public void testReadRspFirstHopBySftList() throws ExecutionException, InterruptedException {
  List<Class<? extends ServiceFunctionTypeIdentity>> sftList=new ArrayList<Class<? extends ServiceFunctionTypeIdentity>>();
  sftList.add(Firewall.class);
  sftList.add(Dpi.class);
  sftList.add(Napt44.class);
  sftList.add(HttpHeaderEnrichment.class);
  sftList.add(Qos.class);
  assertEquals("String_Node_Str",sftList.size(),5);
  RenderedServicePathFirstHop firstHop=null;
  try {
    firstHop=SfcProviderRenderedPathAPI.readRspFirstHopBySftList(sftList);
  }
 catch (  NullPointerException e) {
    e.printStackTrace();
  }
  assertNotNull("String_Node_Str",firstHop);
  LOG.debug("String_Node_Str",firstHop.getIp().toString(),firstHop.getPort());
  assertEquals("String_Node_Str",firstHop.getIp(),new IpAddress(new Ipv4Address(SFF_LOCATOR_IP[0])));
  assertEquals("String_Node_Str",firstHop.getPort(),new PortNumber(PORT[0]));
}
Program: 132164
Project: 132164
Buggy source:
public SfcL2AclDataListener(DataBroker dataBroker,SfcL2FlowProgrammer sfcL2FlowProgrammer){
  setDataBroker(dataBroker);
  setIID(OpendaylightSfc.SFP_ENTRY_IID);
  registerAsDataChangeListener();
  this.sfcL2FlowProgrammer=sfcL2FlowProgrammer;
}

Fixed version (ground truth):
public SfcL2AclDataListener(DataBroker dataBroker,SfcL2FlowProgrammer sfcL2FlowProgrammer){
  setDataBroker(dataBroker);
  setIID(OpendaylightSfc.ACL_ENTRY_IID);
  registerAsDataChangeListener();
  this.sfcL2FlowProgrammer=sfcL2FlowProgrammer;
}
Program: 132165
Project: 132165
Buggy source:
private void writeFlowToConfig(FlowBuilder flow){
  NodeBuilder nodeBuilder=new NodeBuilder();
  nodeBuilder.setId(new NodeId(sffNodeName));
  nodeBuilder.setKey(new NodeKey(nodeBuilder.getId()));
  InstanceIdentifier<Flow> flowIID=InstanceIdentifier.builder(Nodes.class).child(Node.class,nodeBuilder.getKey()).augmentation(FlowCapableNode.class).child(Table.class,new TableKey(flow.getTableId())).child(Flow.class,flow.getKey()).build();
  if (!SfcDataStoreAPI.writeMergeTransactionAPI(flowIID,flow.build(),LogicalDatastoreType.OPERATIONAL)) {
    LOG.error("String_Node_Str",Thread.currentThread().getStackTrace()[1],sffNodeName);
  }
}

Fixed version (ground truth):
private void writeFlowToConfig(FlowBuilder flow){
  NodeBuilder nodeBuilder=new NodeBuilder();
  nodeBuilder.setId(new NodeId(sffNodeName));
  nodeBuilder.setKey(new NodeKey(nodeBuilder.getId()));
  InstanceIdentifier<Flow> flowInstanceId=InstanceIdentifier.builder(Nodes.class).child(Node.class,nodeBuilder.getKey()).augmentation(FlowCapableNode.class).child(Table.class,new TableKey(flow.getTableId())).child(Flow.class,flow.getKey()).build();
  LOG.info("String_Node_Str",sffNodeName,flow.getTableId());
  LOG.debug("String_Node_Str",flowInstanceId);
  if (!SfcDataStoreAPI.writeMergeTransactionAPI(flowInstanceId,flow.build(),LogicalDatastoreType.CONFIGURATION)) {
    LOG.error("String_Node_Str",Thread.currentThread().getStackTrace()[1],sffNodeName);
  }
}
Program: 132166
Project: 132166
Buggy source:
private void removeFlowFromConfig(FlowBuilder flow){
  NodeBuilder nodeBuilder=new NodeBuilder();
  nodeBuilder.setId(new NodeId(sffNodeName));
  nodeBuilder.setKey(new NodeKey(nodeBuilder.getId()));
  InstanceIdentifier<Flow> flowIID=InstanceIdentifier.builder(Nodes.class).child(Node.class,nodeBuilder.getKey()).augmentation(FlowCapableNode.class).child(Table.class,new TableKey(flow.getTableId())).child(Flow.class,flow.getKey()).build();
  if (!SfcDataStoreAPI.deleteTransactionAPI(flowIID,LogicalDatastoreType.OPERATIONAL)) {
    LOG.error("String_Node_Str",Thread.currentThread().getStackTrace()[1],sffNodeName);
  }
}

Fixed version (ground truth):
private void removeFlowFromConfig(FlowBuilder flow){
  NodeBuilder nodeBuilder=new NodeBuilder();
  nodeBuilder.setId(new NodeId(sffNodeName));
  nodeBuilder.setKey(new NodeKey(nodeBuilder.getId()));
  InstanceIdentifier<Flow> flowInstanceId=InstanceIdentifier.builder(Nodes.class).child(Node.class,nodeBuilder.getKey()).augmentation(FlowCapableNode.class).child(Table.class,new TableKey(flow.getTableId())).child(Flow.class,flow.getKey()).build();
  if (!SfcDataStoreAPI.deleteTransactionAPI(flowInstanceId,LogicalDatastoreType.OPERATIONAL)) {
    LOG.error("String_Node_Str",Thread.currentThread().getStackTrace()[1],sffNodeName);
  }
}
Program: 132168
Project: 132168
Buggy source:
@Override public void onDataChanged(final AsyncDataChangeEvent<InstanceIdentifier<?>,DataObject> change){
  Map<InstanceIdentifier<?>,DataObject> dataCreatedConfigurationObject=change.getCreatedData();
  for (  Map.Entry<InstanceIdentifier<?>,DataObject> entry : dataCreatedConfigurationObject.entrySet()) {
    if (entry.getValue() instanceof RenderedServicePath) {
      RenderedServicePath createdRenderedServicePath=(RenderedServicePath)entry.getValue();
      configureSffFlows(createdRenderedServicePath,true);
    }
  }
  Map<InstanceIdentifier<?>,DataObject> dataUpdatedConfigurationObject=change.getUpdatedData();
  for (  Map.Entry<InstanceIdentifier<?>,DataObject> entry : dataUpdatedConfigurationObject.entrySet()) {
    if ((entry.getValue() instanceof RenderedServicePath && (!(dataCreatedConfigurationObject.containsKey(entry.getKey()))))) {
      RenderedServicePath updatedRenderedServicePath=(RenderedServicePath)entry.getValue();
      configureSffFlows(updatedRenderedServicePath,true);
    }
  }
  Set<InstanceIdentifier<?>> dataRemovedConfigurationIID=change.getRemovedPaths();
  for (  InstanceIdentifier instanceIdentifier : dataRemovedConfigurationIID) {
    DataObject dataObject=change.getOriginalData().get(instanceIdentifier);
    if (dataObject instanceof RenderedServicePath) {
      configureSffFlows((RenderedServicePath)dataObject,false);
    }
  }
}

Fixed version (ground truth):
@Override public void onDataChanged(final AsyncDataChangeEvent<InstanceIdentifier<?>,DataObject> change){
  Map<InstanceIdentifier<?>,DataObject> dataCreatedConfigurationObject=change.getCreatedData();
  for (  Map.Entry<InstanceIdentifier<?>,DataObject> entry : dataCreatedConfigurationObject.entrySet()) {
    if (entry.getValue() instanceof RenderedServicePath) {
      LOG.info("String_Node_Str",((RenderedServicePath)entry.getValue()).getName());
      RenderedServicePath createdRenderedServicePath=(RenderedServicePath)entry.getValue();
      configureSffFlows(createdRenderedServicePath,true);
    }
  }
  Map<InstanceIdentifier<?>,DataObject> dataUpdatedConfigurationObject=change.getUpdatedData();
  for (  Map.Entry<InstanceIdentifier<?>,DataObject> entry : dataUpdatedConfigurationObject.entrySet()) {
    if ((entry.getValue() instanceof RenderedServicePath && (!(dataCreatedConfigurationObject.containsKey(entry.getKey()))))) {
      RenderedServicePath updatedRenderedServicePath=(RenderedServicePath)entry.getValue();
      configureSffFlows(updatedRenderedServicePath,true);
    }
  }
  Set<InstanceIdentifier<?>> dataRemovedConfigurationIID=change.getRemovedPaths();
  for (  InstanceIdentifier instanceIdentifier : dataRemovedConfigurationIID) {
    DataObject dataObject=change.getOriginalData().get(instanceIdentifier);
    if (dataObject instanceof RenderedServicePath) {
      configureSffFlows((RenderedServicePath)dataObject,false);
    }
  }
}
Program: 132169
Project: 132169
Buggy source:
@Override public java.lang.AutoCloseable createInstance(){
  DataBroker dataBroker=getDataBrokerDependency();
  RpcProviderRegistry rpcProvider=getRpcRegistryDependency();
  final OpenflowSfcRenderer openflowSfcRenderer=new OpenflowSfcRenderer(dataBroker,rpcProvider);
  OpenflowSfcFlowProgrammer.createFlowProgrammer(dataBroker);
  return new AutoCloseable(){
    @Override public void close() throws Exception {
      openflowSfcRenderer.close();
    }
  }
;
}

Fixed version (ground truth):
@Override public java.lang.AutoCloseable createInstance(){
  DataBroker dataBroker=getDataBrokerDependency();
  RpcProviderRegistry rpcProvider=getRpcRegistryDependency();
  final OpenflowSfcRenderer openflowSfcRenderer=new OpenflowSfcRenderer(dataBroker,rpcProvider);
  OpenflowSfcFlowProgrammer.createFlowProgrammer();
  return new AutoCloseable(){
    @Override public void close() throws Exception {
      openflowSfcRenderer.close();
    }
  }
;
}
Program: 132170
Project: 132170
Buggy source:
public void setIID(InstanceIdentifier<?> IID){
  iID=IID;
}

Fixed version (ground truth):
public void setIID(InstanceIdentifier<?> iID){
  this.iID=iID;
}
Program: 132172
Project: 132172
Buggy source:
public OpendaylightSfc(){
  executor=Executors.newFixedThreadPool(40);
  opendaylightSfcObj=this;
}

Fixed version (ground truth):
public OpendaylightSfc(){
  executor=Executors.newFixedThreadPool(EXECUTOR_THREAD_POOL_SIZE);
  opendaylightSfcObj=this;
}
Program: 132173
Project: 132173
Buggy source:
/** 
 * Implemented from the AutoCloseable interface.
 */
@Override public void close() throws ExecutionException, InterruptedException {
  executor.shutdown();
  if (dataProvider != null) {
    final AsyncReadWriteTransaction t=dataProvider.newReadWriteTransaction();
    t.delete(LogicalDatastoreType.CONFIGURATION,sfEntryIID);
    t.delete(LogicalDatastoreType.CONFIGURATION,sfEntryIID);
    t.delete(LogicalDatastoreType.CONFIGURATION,sfEntryIID);
    t.delete(LogicalDatastoreType.CONFIGURATION,sfcEntryIID);
    t.delete(LogicalDatastoreType.CONFIGURATION,sfsIID);
    t.delete(LogicalDatastoreType.CONFIGURATION,snIID);
    t.delete(LogicalDatastoreType.CONFIGURATION,sffIID);
    t.delete(LogicalDatastoreType.CONFIGURATION,sfpIID);
    t.delete(LogicalDatastoreType.CONFIGURATION,sftIID);
    t.commit().get();
  }
}

Fixed version (ground truth):
/** 
 * Implemented from the AutoCloseable interface.
 */
@Override public void close() throws ExecutionException, InterruptedException {
  executor.shutdown();
  if (dataProvider != null) {
    final AsyncReadWriteTransaction t=dataProvider.newReadWriteTransaction();
    t.delete(LogicalDatastoreType.CONFIGURATION,SF_ENTRY_IID);
    t.delete(LogicalDatastoreType.CONFIGURATION,SF_ENTRY_IID);
    t.delete(LogicalDatastoreType.CONFIGURATION,SF_ENTRY_IID);
    t.delete(LogicalDatastoreType.CONFIGURATION,SFC_ENTRY_IID);
    t.delete(LogicalDatastoreType.CONFIGURATION,SFS_IID);
    t.delete(LogicalDatastoreType.CONFIGURATION,SN_IID);
    t.delete(LogicalDatastoreType.CONFIGURATION,SFF_IID);
    t.delete(LogicalDatastoreType.CONFIGURATION,SFP_IID);
    t.delete(LogicalDatastoreType.CONFIGURATION,SFT_IID);
    t.commit().get();
  }
}
Program: 132177
Project: 132177
Buggy source:
@Override public Future<RpcResult<Void>> deleteServiceFunction(DeleteServiceFunctionInput input){
  printTraceStart(LOG);
  LOG.info("String_Node_Str" + input);
  if (dataBroker != null) {
    ReadOnlyTransaction readTx=dataBroker.newReadOnlyTransaction();
    Optional<ServiceFunctions> dataObject=null;
    try {
      dataObject=readTx.read(LogicalDatastoreType.CONFIGURATION,OpendaylightSfc.sfsIID).get();
    }
 catch (    InterruptedException|ExecutionException e) {
      LOG.error("String_Node_Str");
      return Futures.immediateFuture(Rpcs.<Void>getRpcResult(true,Collections.<RpcError>emptySet()));
    }
    if (dataObject instanceof ServiceFunctions) {
      ServiceFunctionKey sfkey=new ServiceFunctionKey(input.getName());
      InstanceIdentifier<ServiceFunction> sfIID;
      sfIID=InstanceIdentifier.builder(ServiceFunctions.class).child(ServiceFunction.class,sfkey).toInstance();
      WriteTransaction writeTx=dataBroker.newWriteOnlyTransaction();
      writeTx.delete(LogicalDatastoreType.CONFIGURATION,sfIID);
      writeTx.commit();
    }
  }
 else {
    LOG.warn("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
  }
  printTraceStop(LOG);
  return Futures.immediateFuture(Rpcs.<Void>getRpcResult(true,Collections.<RpcError>emptySet()));
}

Fixed version (ground truth):
@Override public Future<RpcResult<Void>> deleteServiceFunction(DeleteServiceFunctionInput input){
  printTraceStart(LOG);
  LOG.info("String_Node_Str" + input);
  if (dataBroker != null) {
    ReadOnlyTransaction readTx=dataBroker.newReadOnlyTransaction();
    Optional<ServiceFunctions> dataObject=null;
    try {
      dataObject=readTx.read(LogicalDatastoreType.CONFIGURATION,OpendaylightSfc.SFS_IID).get();
    }
 catch (    InterruptedException|ExecutionException e) {
      LOG.error("String_Node_Str");
      return Futures.immediateFuture(Rpcs.<Void>getRpcResult(true,Collections.<RpcError>emptySet()));
    }
    if (dataObject instanceof ServiceFunctions) {
      ServiceFunctionKey sfkey=new ServiceFunctionKey(input.getName());
      InstanceIdentifier<ServiceFunction> sfIID;
      sfIID=InstanceIdentifier.builder(ServiceFunctions.class).child(ServiceFunction.class,sfkey).toInstance();
      WriteTransaction writeTx=dataBroker.newWriteOnlyTransaction();
      writeTx.delete(LogicalDatastoreType.CONFIGURATION,sfIID);
      writeTx.commit();
    }
  }
 else {
    LOG.warn("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
  }
  printTraceStop(LOG);
  return Futures.immediateFuture(Rpcs.<Void>getRpcResult(true,Collections.<RpcError>emptySet()));
}
Program: 132178
Project: 132178
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.sfcIID,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 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()));
}
Program: 132179
Project: 132179
Buggy source:
@Override public Future<RpcResult<Void>> deleteAllServiceFunction(){
  printTraceStart(LOG);
  if (dataBroker != null) {
    WriteTransaction writeTx=dataBroker.newWriteOnlyTransaction();
    writeTx.delete(LogicalDatastoreType.CONFIGURATION,OpendaylightSfc.sfsIID);
    writeTx.commit();
  }
 else {
    LOG.warn("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
  }
  printTraceStop(LOG);
  return Futures.immediateFuture(Rpcs.<Void>getRpcResult(true,Collections.<RpcError>emptySet()));
}

Fixed version (ground truth):
@Override public Future<RpcResult<Void>> deleteAllServiceFunction(){
  printTraceStart(LOG);
  if (dataBroker != null) {
    WriteTransaction writeTx=dataBroker.newWriteOnlyTransaction();
    writeTx.delete(LogicalDatastoreType.CONFIGURATION,OpendaylightSfc.SFS_IID);
    writeTx.commit();
  }
 else {
    LOG.warn("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
  }
  printTraceStop(LOG);
  return Futures.immediateFuture(Rpcs.<Void>getRpcResult(true,Collections.<RpcError>emptySet()));
}
Program: 132186
Project: 132186
Buggy source:
public static <U extends org.opendaylight.yangtools.yang.binding.DataObject>U readTransactionAPI(InstanceIdentifier<U> readIID,LogicalDatastoreType logicalDatastoreType){
  U ret=null;
  ReadOnlyTransaction readTx=odlSfc.getDataProvider().newReadOnlyTransaction();
  Optional<U> optionalDataObject;
  CheckedFuture<Optional<U>,ReadFailedException> submitFuture=readTx.read(logicalDatastoreType,readIID);
  try {
    optionalDataObject=submitFuture.checkedGet();
    if (optionalDataObject != null && optionalDataObject.isPresent()) {
      ret=optionalDataObject.get();
    }
 else {
      LOG.error("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
    }
  }
 catch (  ReadFailedException e) {
    e.printStackTrace();
  }
  return ret;
}

Fixed version (ground truth):
public static <U extends org.opendaylight.yangtools.yang.binding.DataObject>U readTransactionAPI(InstanceIdentifier<U> readIID,LogicalDatastoreType logicalDatastoreType){
  U ret=null;
  ReadOnlyTransaction readTx=odlSfc.getDataProvider().newReadOnlyTransaction();
  Optional<U> optionalDataObject;
  CheckedFuture<Optional<U>,ReadFailedException> submitFuture=readTx.read(logicalDatastoreType,readIID);
  try {
    optionalDataObject=submitFuture.checkedGet();
    if (optionalDataObject != null && optionalDataObject.isPresent()) {
      ret=optionalDataObject.get();
    }
 else {
      LOG.error("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
    }
  }
 catch (  ReadFailedException e) {
    LOG.warn("String_Node_Str",e);
  }
  return ret;
}
Program: 132187
Project: 132187
Buggy source:
public SfcDataStoreCallback(){
  this.transaction_progress=true;
  try {
    semaphore.acquire();
  }
 catch (  InterruptedException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public SfcDataStoreCallback(){
  this.transaction_progress=true;
  try {
    semaphore.acquire();
  }
 catch (  InterruptedException e) {
    LOG.warn("String_Node_Str",e);
  }
}
Program: 132188
Project: 132188
Buggy source:
public void getSemaphore(){
  try {
    semaphore.acquire();
  }
 catch (  InterruptedException e) {
    e.printStackTrace();
  }
  return;
}

Fixed version (ground truth):
public void getSemaphore(){
  try {
    semaphore.acquire();
  }
 catch (  InterruptedException e) {
    LOG.warn("String_Node_Str",e);
  }
  return;
}
Program: 132189
Project: 132189
Buggy source:
/** 
 * This method reads the operational state for a service function. <p>
 * @param serviceFunctionName SF name
 * @return A ServiceFunctionState object that is a list of all paths usingthis service function, null otherwise
 */
public static ServiceFunctionChain readServiceFunctionChainExecutor(String serviceFunctionName){
  printTraceStart(LOG);
  ServiceFunctionChain ret=null;
  Object[] servicePathObj={serviceFunctionName};
  Class[] servicePathClass={String.class};
  SfcProviderServiceChainAPI sfcProviderServiceChainAPI=SfcProviderServiceChainAPI.getRead(servicePathObj,servicePathClass);
  Future future=odlSfc.executor.submit(sfcProviderServiceChainAPI);
  try {
    ret=(ServiceFunctionChain)future.get();
    LOG.debug("String_Node_Str",future.get());
  }
 catch (  InterruptedException e) {
    e.printStackTrace();
  }
catch (  ExecutionException e) {
    e.printStackTrace();
  }
  printTraceStop(LOG);
  return ret;
}

Fixed version (ground truth):
/** 
 * This method reads the operational state for a service function. <p>
 * @param serviceFunctionName SF name
 * @return A ServiceFunctionState object that is a list of all paths usingthis service function, null otherwise
 */
public static ServiceFunctionChain readServiceFunctionChainExecutor(String serviceFunctionName){
  printTraceStart(LOG);
  ServiceFunctionChain ret=null;
  Object[] servicePathObj={serviceFunctionName};
  Class[] servicePathClass={String.class};
  SfcProviderServiceChainAPI sfcProviderServiceChainAPI=SfcProviderServiceChainAPI.getRead(servicePathObj,servicePathClass);
  Future future=odlSfc.executor.submit(sfcProviderServiceChainAPI);
  try {
    ret=(ServiceFunctionChain)future.get();
    LOG.debug("String_Node_Str",future.get());
  }
 catch (  InterruptedException e) {
    LOG.warn("String_Node_Str",e);
  }
catch (  ExecutionException e) {
    LOG.warn("String_Node_Str",e);
  }
  printTraceStop(LOG);
  return ret;
}
Program: 132190
Project: 132190
Buggy source:
/** 
 * This method deletes all RSPs used by the given SFF <p>
 * @param serviceFunctionForwarder SFF object
 * @return Nothing.
 */
@SuppressWarnings("String_Node_Str") public static boolean deletePathsUsedByServiceForwarderExecutor(ServiceFunctionForwarder serviceFunctionForwarder){
  printTraceStart(LOG);
  boolean ret=true;
  Object[] serviceForwarderObj={serviceFunctionForwarder};
  Class[] serviceForwarderClass={ServiceFunctionForwarder.class};
  SfcProviderServiceForwarderAPI sfcProviderServiceForwarderAPI=SfcProviderServiceForwarderAPI.getDeletePathsUsedByServiceForwarder(serviceForwarderObj,serviceForwarderClass);
  Future future=odlSfc.executor.submit(sfcProviderServiceForwarderAPI);
  try {
    ret=(boolean)future.get();
    LOG.info("String_Node_Str",ret);
  }
 catch (  InterruptedException e) {
    e.printStackTrace();
  }
catch (  ExecutionException e) {
    e.printStackTrace();
  }
  printTraceStop(LOG);
  return ret;
}

Fixed version (ground truth):
/** 
 * This method deletes all RSPs used by the given SFF <p>
 * @param serviceFunctionForwarder SFF object
 * @return Nothing.
 */
@SuppressWarnings("String_Node_Str") public static boolean deletePathsUsedByServiceForwarderExecutor(ServiceFunctionForwarder serviceFunctionForwarder){
  printTraceStart(LOG);
  boolean ret=true;
  Object[] serviceForwarderObj={serviceFunctionForwarder};
  Class[] serviceForwarderClass={ServiceFunctionForwarder.class};
  SfcProviderServiceForwarderAPI sfcProviderServiceForwarderAPI=SfcProviderServiceForwarderAPI.getDeletePathsUsedByServiceForwarder(serviceForwarderObj,serviceForwarderClass);
  Future future=odlSfc.executor.submit(sfcProviderServiceForwarderAPI);
  try {
    ret=(boolean)future.get();
    LOG.info("String_Node_Str",ret);
  }
 catch (  InterruptedException e) {
    LOG.warn("String_Node_Str",e);
  }
catch (  ExecutionException e) {
    LOG.warn("String_Node_Str",e);
  }
  printTraceStop(LOG);
  return ret;
}
Program: 132191
Project: 132191
Buggy source:
/** 
 * Attaches the path name to the operational store of each SFF. <p>
 * @param sfpName SF name
 * @param sffName SFF name
 * @return Nothing.
 */
@SuppressWarnings("String_Node_Str") @SfcReflection public static boolean deletePathFromServiceForwarderStateExecutor(String sfpName,String sffName){
  printTraceStart(LOG);
  boolean ret=false;
  Object[] servicePathObj={sfpName,sffName};
  Class[] servicePathClass={String.class,String.class};
  SfcProviderServiceForwarderAPI sfcProviderServiceForwarderAPI=SfcProviderServiceForwarderAPI.getDeletePathFromServiceForwarderState(servicePathObj,servicePathClass);
  Future future=odlSfc.executor.submit(sfcProviderServiceForwarderAPI);
  try {
    ret=(boolean)future.get();
    LOG.info("String_Node_Str",future.get());
  }
 catch (  InterruptedException e) {
    e.printStackTrace();
  }
catch (  ExecutionException e) {
    e.printStackTrace();
  }
  printTraceStop(LOG);
  return ret;
}

Fixed version (ground truth):
/** 
 * Attaches the path name to the operational store of each SFF. <p>
 * @param sfpName SF name
 * @param sffName SFF name
 * @return Nothing.
 */
@SuppressWarnings("String_Node_Str") @SfcReflection public static boolean deletePathFromServiceForwarderStateExecutor(String sfpName,String sffName){
  printTraceStart(LOG);
  boolean ret=false;
  Object[] servicePathObj={sfpName,sffName};
  Class[] servicePathClass={String.class,String.class};
  SfcProviderServiceForwarderAPI sfcProviderServiceForwarderAPI=SfcProviderServiceForwarderAPI.getDeletePathFromServiceForwarderState(servicePathObj,servicePathClass);
  Future future=odlSfc.executor.submit(sfcProviderServiceForwarderAPI);
  try {
    ret=(boolean)future.get();
    LOG.debug("String_Node_Str",future.get());
  }
 catch (  InterruptedException e) {
    LOG.warn("String_Node_Str",e);
  }
catch (  ExecutionException e) {
    LOG.warn("String_Node_Str",e);
  }
  printTraceStop(LOG);
  return ret;
}
Program: 132192
Project: 132192
Buggy source:
/** 
 * Wrapper API to read the list of SFPs anchored by the given SFF name. It includes Executor creation and response management <p>
 * @param sffName SFF name
 * @return ServiceFunctionState.
 */
public static List<SffServicePath> readSffStateExecutor(String sffName){
  printTraceStart(LOG);
  List<SffServicePath> ret=null;
  Object[] serviceForwarderObj={sffName};
  Class[] serviceForwarderClass={String.class};
  SfcProviderServiceForwarderAPI sfcProviderServiceForwarderAPI=SfcProviderServiceForwarderAPI.getReadSffState(serviceForwarderObj,serviceForwarderClass);
  Future future=odlSfc.executor.submit(sfcProviderServiceForwarderAPI);
  try {
    ret=(List<SffServicePath>)future.get();
    LOG.info("String_Node_Str",ret);
  }
 catch (  InterruptedException e) {
    e.printStackTrace();
  }
catch (  ExecutionException e) {
    e.printStackTrace();
  }
  return ret;
}

Fixed version (ground truth):
/** 
 * Wrapper API to read the list of SFPs anchored by the given SFF name. It includes Executor creation and response management <p>
 * @param sffName SFF name
 * @return ServiceFunctionState.
 */
public static List<SffServicePath> readSffStateExecutor(String sffName){
  printTraceStart(LOG);
  List<SffServicePath> ret=null;
  Object[] serviceForwarderObj={sffName};
  Class[] serviceForwarderClass={String.class};
  SfcProviderServiceForwarderAPI sfcProviderServiceForwarderAPI=SfcProviderServiceForwarderAPI.getReadSffState(serviceForwarderObj,serviceForwarderClass);
  Future future=odlSfc.executor.submit(sfcProviderServiceForwarderAPI);
  try {
    ret=(List<SffServicePath>)future.get();
    LOG.debug("String_Node_Str",ret);
  }
 catch (  InterruptedException e) {
    LOG.warn("String_Node_Str",e);
  }
catch (  ExecutionException e) {
    LOG.warn("String_Node_Str",e);
  }
  return ret;
}
Program: 132193
Project: 132193
Buggy source:
/** 
 * This method deletes the operational state for the given SFF name. <p>
 * @param sffName SFF name
 * @return true if state was deletes, false otherwise
 */
public static boolean deleteServiceFunctionForwarderStateExecutor(String sffName){
  printTraceStart(LOG);
  boolean ret=false;
  Object[] servicePathObj={sffName};
  Class[] servicePathClass={String.class};
  SfcProviderServiceForwarderAPI sfcProviderServiceForwarderAPI=SfcProviderServiceForwarderAPI.getDeleteServiceFunctionForwarderState(servicePathObj,servicePathClass);
  Future future=odlSfc.executor.submit(sfcProviderServiceForwarderAPI);
  try {
    ret=(boolean)future.get();
    LOG.info("String_Node_Str",future.get());
  }
 catch (  InterruptedException e) {
    e.printStackTrace();
  }
catch (  ExecutionException e) {
    e.printStackTrace();
  }
  printTraceStop(LOG);
  return ret;
}

Fixed version (ground truth):
/** 
 * This method deletes the operational state for the given SFF name. <p>
 * @param sffName SFF name
 * @return true if state was deletes, false otherwise
 */
public static boolean deleteServiceFunctionForwarderStateExecutor(String sffName){
  printTraceStart(LOG);
  boolean ret=false;
  Object[] servicePathObj={sffName};
  Class[] servicePathClass={String.class};
  SfcProviderServiceForwarderAPI sfcProviderServiceForwarderAPI=SfcProviderServiceForwarderAPI.getDeleteServiceFunctionForwarderState(servicePathObj,servicePathClass);
  Future future=odlSfc.executor.submit(sfcProviderServiceForwarderAPI);
  try {
    ret=(boolean)future.get();
    LOG.debug("String_Node_Str",future.get());
  }
 catch (  InterruptedException e) {
    LOG.warn("String_Node_Str",e);
  }
catch (  ExecutionException e) {
    LOG.warn("String_Node_Str",e);
  }
  printTraceStop(LOG);
  return ret;
}
Program: 132194
Project: 132194
Buggy source:
/** 
 * We add the path name to the operational store of each SFF. <p>
 * @param pathName Service Function Path Object
 * @return Nothing.
 */
public static boolean addPathToServiceForwarderStateExecutor(String pathName){
  printTraceStart(LOG);
  boolean ret=false;
  Object[] servicePathObj={pathName};
  Class[] servicePathClass={String.class};
  SfcProviderServiceForwarderAPI sfcProviderServiceForwarderAPI=SfcProviderServiceForwarderAPI.getAddPathToServiceForwarderState(servicePathObj,servicePathClass);
  Future future=odlSfc.executor.submit(sfcProviderServiceForwarderAPI);
  try {
    ret=(boolean)future.get();
    LOG.debug("String_Node_Str",future.get());
  }
 catch (  InterruptedException e) {
    e.printStackTrace();
  }
catch (  ExecutionException e) {
    e.printStackTrace();
  }
  printTraceStop(LOG);
  return ret;
}

Fixed version (ground truth):
/** 
 * We add the path name to the operational store of each SFF. <p>
 * @param pathName Service Function Path Object
 * @return Nothing.
 */
public static boolean addPathToServiceForwarderStateExecutor(String pathName){
  printTraceStart(LOG);
  boolean ret=false;
  Object[] servicePathObj={pathName};
  Class[] servicePathClass={String.class};
  SfcProviderServiceForwarderAPI sfcProviderServiceForwarderAPI=SfcProviderServiceForwarderAPI.getAddPathToServiceForwarderState(servicePathObj,servicePathClass);
  Future future=odlSfc.executor.submit(sfcProviderServiceForwarderAPI);
  try {
    ret=(boolean)future.get();
    LOG.debug("String_Node_Str",future.get());
  }
 catch (  InterruptedException e) {
    LOG.warn("String_Node_Str",e);
  }
catch (  ExecutionException e) {
    LOG.warn("String_Node_Str",e);
  }
  printTraceStop(LOG);
  return ret;
}
Program: 132195
Project: 132195
Buggy source:
/** 
 * This method reads the operational state for a service function. <p>
 * @param serviceFunctionName SF name
 * @return A ServiceFunctionState object that is a list of all paths usingthis service function, null otherwise
 */
public static ServiceFunction readServiceFunctionExecutor(String serviceFunctionName){
  printTraceStart(LOG);
  ServiceFunction ret=null;
  Object[] servicePathObj={serviceFunctionName};
  Class[] servicePathClass={String.class};
  SfcProviderServiceFunctionAPI sfcProviderServiceFunctionAPI=SfcProviderServiceFunctionAPI.getRead(servicePathObj,servicePathClass);
  Future future=odlSfc.executor.submit(sfcProviderServiceFunctionAPI);
  try {
    ret=(ServiceFunction)future.get();
    LOG.debug("String_Node_Str",future.get());
  }
 catch (  InterruptedException e) {
    e.printStackTrace();
  }
catch (  ExecutionException e) {
    e.printStackTrace();
  }
  printTraceStop(LOG);
  return ret;
}

Fixed version (ground truth):
/** 
 * This method reads the operational state for a service function. <p>
 * @param serviceFunctionName SF name
 * @return A ServiceFunctionState object that is a list of all paths usingthis service function, null otherwise
 */
public static ServiceFunction readServiceFunctionExecutor(String serviceFunctionName){
  printTraceStart(LOG);
  ServiceFunction ret=null;
  Object[] servicePathObj={serviceFunctionName};
  Class[] servicePathClass={String.class};
  SfcProviderServiceFunctionAPI sfcProviderServiceFunctionAPI=SfcProviderServiceFunctionAPI.getRead(servicePathObj,servicePathClass);
  Future future=odlSfc.executor.submit(sfcProviderServiceFunctionAPI);
  try {
    ret=(ServiceFunction)future.get();
    LOG.debug("String_Node_Str",future.get());
  }
 catch (  InterruptedException e) {
    LOG.warn("String_Node_Str",e);
  }
catch (  ExecutionException e) {
    LOG.warn("String_Node_Str",e);
  }
  printTraceStop(LOG);
  return ret;
}
Program: 132196
Project: 132196
Buggy source:
/** 
 * This method reads the operational state for a service function. <p>
 * @param serviceFunctionName SF name
 * @return A ServiceFunctionState object that is a list of all paths usingthis service function, null otherwise
 */
public static List<SfServicePath> readServiceFunctionStateExecutor(String serviceFunctionName){
  printTraceStart(LOG);
  List<SfServicePath> ret=null;
  Object[] servicePathObj={serviceFunctionName};
  Class[] servicePathClass={String.class};
  SfcProviderServiceFunctionAPI sfcProviderServiceFunctionAPI=SfcProviderServiceFunctionAPI.getReadServiceFunctionState(servicePathObj,servicePathClass);
  Future future=odlSfc.executor.submit(sfcProviderServiceFunctionAPI);
  try {
    ret=(List<SfServicePath>)future.get();
    LOG.debug("String_Node_Str",future.get());
  }
 catch (  InterruptedException e) {
    e.printStackTrace();
  }
catch (  ExecutionException e) {
    e.printStackTrace();
  }
  printTraceStop(LOG);
  return ret;
}

Fixed version (ground truth):
/** 
 * This method reads the operational state for a service function. <p>
 * @param serviceFunctionName SF name
 * @return A ServiceFunctionState object that is a list of all paths usingthis service function, null otherwise
 */
public static List<SfServicePath> readServiceFunctionStateExecutor(String serviceFunctionName){
  printTraceStart(LOG);
  List<SfServicePath> ret=null;
  Object[] servicePathObj={serviceFunctionName};
  Class[] servicePathClass={String.class};
  SfcProviderServiceFunctionAPI sfcProviderServiceFunctionAPI=SfcProviderServiceFunctionAPI.getReadServiceFunctionState(servicePathObj,servicePathClass);
  Future future=odlSfc.executor.submit(sfcProviderServiceFunctionAPI);
  try {
    ret=(List<SfServicePath>)future.get();
    LOG.debug("String_Node_Str",future.get());
  }
 catch (  InterruptedException e) {
    LOG.warn("String_Node_Str",e);
  }
catch (  ExecutionException e) {
    LOG.warn("String_Node_Str",e);
  }
  printTraceStop(LOG);
  return ret;
}