nus-yam/ex-repair huggingface dataset:
Program: 132197
Project: 132197
Buggy source:
/** 
 * This method adds a SFP name to the corresponding SF operational state. <p>
 * @param pathName SFP name
 * @return true if SFP was added, false otherwise
 */
public static boolean addPathToServiceFunctionStateExecutor(String pathName){
  boolean ret=false;
  printTraceStart(LOG);
  Object[] servicePathObj={pathName};
  Class[] servicePathClass={String.class};
  SfcProviderServiceFunctionAPI sfcProviderServiceFunctionAPI=SfcProviderServiceFunctionAPI.getAddPathToServiceFunctionState(servicePathObj,servicePathClass);
  Future future=odlSfc.executor.submit(sfcProviderServiceFunctionAPI);
  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 adds a SFP name to the corresponding SF operational state. <p>
 * @param pathName SFP name
 * @return true if SFP was added, false otherwise
 */
public static boolean addPathToServiceFunctionStateExecutor(String pathName){
  boolean ret=false;
  printTraceStart(LOG);
  Object[] servicePathObj={pathName};
  Class[] servicePathClass={String.class};
  SfcProviderServiceFunctionAPI sfcProviderServiceFunctionAPI=SfcProviderServiceFunctionAPI.getAddPathToServiceFunctionState(servicePathObj,servicePathClass);
  Future future=odlSfc.executor.submit(sfcProviderServiceFunctionAPI);
  try {
    ret=(boolean)future.get();
    LOG.info("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: 132198
Project: 132198
Buggy source:
/** 
 * When a Service Path is deleted directly (not as a consequence of deleting a SF), we need to remove its reference from all the ServiceFunction states. <p>
 * @param sfpName RSP List
 * @return true if SF was deleted, false otherwise
 */
@SuppressWarnings("String_Node_Str") public static boolean deleteServicePathFromServiceFunctionStateExecutor(String sfpName){
  boolean ret=false;
  printTraceStart(LOG);
  Object[] servicePathObj={sfpName};
  Class[] servicePathClass={String.class};
  SfcProviderServiceFunctionAPI sfcProviderServiceFunctionAPI=SfcProviderServiceFunctionAPI.getDeleteServicePathFromServiceFunctionState(servicePathObj,servicePathClass);
  Future future=odlSfc.executor.submit(sfcProviderServiceFunctionAPI);
  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):
/** 
 * When a Service Path is deleted directly (not as a consequence of deleting a SF), we need to remove its reference from all the ServiceFunction states. <p>
 * @param sfpName RSP List
 * @return true if SF was deleted, false otherwise
 */
@SuppressWarnings("String_Node_Str") public static boolean deleteServicePathFromServiceFunctionStateExecutor(String sfpName){
  boolean ret=false;
  printTraceStart(LOG);
  Object[] servicePathObj={sfpName};
  Class[] servicePathClass={String.class};
  SfcProviderServiceFunctionAPI sfcProviderServiceFunctionAPI=SfcProviderServiceFunctionAPI.getDeleteServicePathFromServiceFunctionState(servicePathObj,servicePathClass);
  Future future=odlSfc.executor.submit(sfcProviderServiceFunctionAPI);
  try {
    ret=(boolean)future.get();
    LOG.info("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: 132199
Project: 132199
Buggy source:
/** 
 * This method deletes 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 boolean deleteServiceFunctionStateExecutor(String serviceFunctionName){
  printTraceStart(LOG);
  boolean ret=false;
  Object[] servicePathObj={serviceFunctionName};
  Class[] servicePathClass={String.class};
  SfcProviderServiceFunctionAPI sfcProviderServiceFunctionAPI=SfcProviderServiceFunctionAPI.getDeleteServiceFunctionState(servicePathObj,servicePathClass);
  Future future=odlSfc.executor.submit(sfcProviderServiceFunctionAPI);
  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):
/** 
 * This method deletes 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 boolean deleteServiceFunctionStateExecutor(String serviceFunctionName){
  printTraceStart(LOG);
  boolean ret=false;
  Object[] servicePathObj={serviceFunctionName};
  Class[] servicePathClass={String.class};
  SfcProviderServiceFunctionAPI sfcProviderServiceFunctionAPI=SfcProviderServiceFunctionAPI.getDeleteServiceFunctionState(servicePathObj,servicePathClass);
  Future future=odlSfc.executor.submit(sfcProviderServiceFunctionAPI);
  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: 132200
Project: 132200
Buggy source:
public OpendaylightSfc(){
  executor=Executors.newFixedThreadPool(6);
  opendaylightSfcObj=this;
}

Fixed version (ground truth):
public OpendaylightSfc(){
  executor=Executors.newFixedThreadPool(10);
  opendaylightSfcObj=this;
}
Program: 132201
Project: 132201
Buggy source:
@Override public void run(){
  if (methodName != null) {
    Class<?> c=this.getClass();
    Method method;
    try {
      method=c.getDeclaredMethod(methodName,parameterTypes);
      method.invoke(this,parameters);
    }
 catch (    IllegalAccessException|NoSuchMethodException|InvocationTargetException e) {
      LOG.error("String_Node_Str",methodName);
      return;
    }
catch (    UniformInterfaceException e) {
      LOG.error("String_Node_Str",e.getMessage());
      return;
    }
catch (    ClientHandlerException e) {
      LOG.error("String_Node_Str",e.getMessage());
      return;
    }
  }
}

Fixed version (ground truth):
@Override public void run(){
  if (methodName != null) {
    Class<?> c=this.getClass();
    Method method;
    try {
      method=c.getDeclaredMethod(methodName,parameterTypes);
      method.invoke(this,parameters);
    }
 catch (    IllegalAccessException|NoSuchMethodException e) {
      LOG.error("String_Node_Str",methodName);
      return;
    }
catch (    InvocationTargetException e) {
      LOG.error("String_Node_Str",e.getMessage());
      return;
    }
catch (    UniformInterfaceException e) {
      LOG.error("String_Node_Str",e.getMessage());
      return;
    }
catch (    ClientHandlerException e) {
      LOG.error("String_Node_Str",e.getMessage());
      return;
    }
  }
}
Program: 132203
Project: 132203
Buggy source:
public void putServiceFunctionForwarder(ServiceFunctionForwarder serviceFunctionForwarder){
  printTraceStart(LOG);
  JSONObject jsonObject=null;
  String sffURI;
  ClientConfig clientConfig=new DefaultClientConfig();
  Client client=Client.create(clientConfig);
  String sffJSON=getRESTObj(getServiceFunctionForwarderURI(serviceFunctionForwarder));
  String restURI=serviceFunctionForwarder.getRestUri().toString();
  sffURI=restURI + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ serviceFunctionForwarder.getName();
  ClientResponse putClientRemoteResponse;
  putClientRemoteResponse=client.resource(sffURI).type(MediaType.APPLICATION_JSON_TYPE).put(ClientResponse.class,sffJSON);
  if (putClientRemoteResponse.getStatus() >= 300) {
    throw new UniformInterfaceException(HTTP_ERROR_MSG + putClientRemoteResponse.getStatus(),putClientRemoteResponse);
  }
  putClientRemoteResponse.close();
  printTraceStop(LOG);
}

Fixed version (ground truth):
public void putServiceFunctionForwarder(ServiceFunctionForwarder serviceFunctionForwarder){
  printTraceStart(LOG);
  JSONObject jsonObject=null;
  String sffURI;
  ClientConfig clientConfig=new DefaultClientConfig();
  Client client=Client.create(clientConfig);
  String sffJSON=getRESTObj(getServiceFunctionForwarderURI(serviceFunctionForwarder));
  String restURI=serviceFunctionForwarder.getRestUri().getValue();
  sffURI=restURI + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ serviceFunctionForwarder.getName();
  ClientResponse putClientRemoteResponse;
  putClientRemoteResponse=client.resource(sffURI).type(MediaType.APPLICATION_JSON_TYPE).put(ClientResponse.class,sffJSON);
  if (putClientRemoteResponse.getStatus() >= 300) {
    throw new UniformInterfaceException(HTTP_ERROR_MSG + putClientRemoteResponse.getStatus(),putClientRemoteResponse);
  }
  putClientRemoteResponse.close();
  printTraceStop(LOG);
}
Program: 132205
Project: 132205
Buggy source:
public OpendaylightSfc(){
  executor=Executors.newFixedThreadPool(6);
  opendaylightSfcObj=this;
}

Fixed version (ground truth):
public OpendaylightSfc(){
  executor=Executors.newFixedThreadPool(10);
  opendaylightSfcObj=this;
}
Program: 132206
Project: 132206
Buggy source:
@Override public void run(){
  if (methodName != null) {
    Class<?> c=this.getClass();
    Method method;
    try {
      method=c.getDeclaredMethod(methodName,parameterTypes);
      method.invoke(this,parameters);
    }
 catch (    IllegalAccessException|NoSuchMethodException|InvocationTargetException e) {
      LOG.error("String_Node_Str",methodName);
      return;
    }
catch (    UniformInterfaceException e) {
      LOG.error("String_Node_Str",e.getMessage());
      return;
    }
catch (    ClientHandlerException e) {
      LOG.error("String_Node_Str",e.getMessage());
      return;
    }
  }
}

Fixed version (ground truth):
@Override public void run(){
  if (methodName != null) {
    Class<?> c=this.getClass();
    Method method;
    try {
      method=c.getDeclaredMethod(methodName,parameterTypes);
      method.invoke(this,parameters);
    }
 catch (    IllegalAccessException|NoSuchMethodException e) {
      LOG.error("String_Node_Str",methodName);
      return;
    }
catch (    InvocationTargetException e) {
      LOG.error("String_Node_Str",e.getMessage());
      return;
    }
catch (    UniformInterfaceException e) {
      LOG.error("String_Node_Str",e.getMessage());
      return;
    }
catch (    ClientHandlerException e) {
      LOG.error("String_Node_Str",e.getMessage());
      return;
    }
  }
}
Program: 132208
Project: 132208
Buggy source:
public void putServiceFunctionForwarder(ServiceFunctionForwarder serviceFunctionForwarder){
  printTraceStart(LOG);
  JSONObject jsonObject=null;
  String sffURI;
  ClientConfig clientConfig=new DefaultClientConfig();
  Client client=Client.create(clientConfig);
  String sffJSON=getRESTObj(getServiceFunctionForwarderURI(serviceFunctionForwarder));
  String restURI=serviceFunctionForwarder.getRestUri().toString();
  sffURI=restURI + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ serviceFunctionForwarder.getName();
  ClientResponse putClientRemoteResponse;
  putClientRemoteResponse=client.resource(sffURI).type(MediaType.APPLICATION_JSON_TYPE).put(ClientResponse.class,sffJSON);
  if (putClientRemoteResponse.getStatus() >= 300) {
    throw new UniformInterfaceException(HTTP_ERROR_MSG + putClientRemoteResponse.getStatus(),putClientRemoteResponse);
  }
  putClientRemoteResponse.close();
  printTraceStop(LOG);
}

Fixed version (ground truth):
public void putServiceFunctionForwarder(ServiceFunctionForwarder serviceFunctionForwarder){
  printTraceStart(LOG);
  JSONObject jsonObject=null;
  String sffURI;
  ClientConfig clientConfig=new DefaultClientConfig();
  Client client=Client.create(clientConfig);
  String sffJSON=getRESTObj(getServiceFunctionForwarderURI(serviceFunctionForwarder));
  String restURI=serviceFunctionForwarder.getRestUri().getValue();
  sffURI=restURI + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ serviceFunctionForwarder.getName();
  ClientResponse putClientRemoteResponse;
  putClientRemoteResponse=client.resource(sffURI).type(MediaType.APPLICATION_JSON_TYPE).put(ClientResponse.class,sffJSON);
  if (putClientRemoteResponse.getStatus() >= 300) {
    throw new UniformInterfaceException(HTTP_ERROR_MSG + putClientRemoteResponse.getStatus(),putClientRemoteResponse);
  }
  putClientRemoteResponse.close();
  printTraceStop(LOG);
}
Program: 132211
Project: 132211
Buggy source:
@Override public java.lang.AutoCloseable createInstance(){
  DataBroker dataBroker=getDataBrokerDependency();
  final OpenflowSfcRenderer openflowSfcRenderer=new OpenflowSfcRenderer(dataBroker);
  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(dataBroker);
  return new AutoCloseable(){
    @Override public void close() throws Exception {
      openflowSfcRenderer.close();
    }
  }
;
}
Program: 132212
Project: 132212
Buggy source:
@Override public void onDataChanged(AsyncDataChangeEvent<InstanceIdentifier<?>,DataObject> change){
  Map<InstanceIdentifier<?>,DataObject> dataOriginalConfigurationObject=change.getOriginalData();
  for (  Map.Entry<InstanceIdentifier<?>,DataObject> entry : dataOriginalConfigurationObject.entrySet()) {
    if (entry.getValue() instanceof AccessListEntries) {
      AccessListEntries originalAccessListEntries=(AccessListEntries)entry.getValue();
      AclServiceFunctionPath action=(AclServiceFunctionPath)(SfcAction)originalAccessListEntries.getActions();
      Long pathId=1L;
      Matches matches;
      AceIp aceIp;
      AceIpv4 aceIpv4;
      matches=originalAccessListEntries.getMatches();
      aceIp=(AceIp)matches.getAceType();
      aceIpv4=(AceIpv4)aceIp.getAceIpVersion();
      String srcIpAddress=aceIpv4.getSourceIpv4Address().getValue();
      String dstIpAddress=aceIpv4.getDestinationIpv4Address().getValue();
      Short srcPort=aceIp.getSourcePortRange().getLowerPort().getValue().shortValue();
      Short dstPort=aceIp.getDestinationPortRange().getLowerPort().getValue().shortValue();
      byte protocol=aceIp.getIpProtocol().byteValue();
      OpenflowSfcFlowProgrammer.getInstance().writeClassificationFlow(srcIpAddress,(short)32,dstIpAddress,(short)32,srcPort,dstPort,protocol,pathId);
    }
  }
}

Fixed version (ground truth):
@Override public void onDataChanged(AsyncDataChangeEvent<InstanceIdentifier<?>,DataObject> change){
  Map<InstanceIdentifier<?>,DataObject> dataOriginalConfigurationObject;
  dataOriginalConfigurationObject=change.getOriginalData();
  Map<InstanceIdentifier<?>,DataObject> dataCreatedConfigurationObject;
  dataCreatedConfigurationObject=change.getCreatedData();
  for (  Map.Entry<InstanceIdentifier<?>,DataObject> entry : dataCreatedConfigurationObject.entrySet()) {
    if (entry.getValue() instanceof AccessListEntries) {
      AccessListEntries createdAccessListEntries=(AccessListEntries)entry.getValue();
      configureAclFlows(createdAccessListEntries,true);
    }
  }
  Set<InstanceIdentifier<?>> dataRemovedConfigurationIID=change.getRemovedPaths();
  for (  InstanceIdentifier instanceIdentifier : dataRemovedConfigurationIID) {
    DataObject dataObject=dataOriginalConfigurationObject.get(instanceIdentifier);
    if (dataObject instanceof AccessListEntries) {
      AccessListEntries removedAccessListEntries=(AccessListEntries)dataObject;
      configureAclFlows(removedAccessListEntries,false);
    }
  }
  Map<InstanceIdentifier<?>,DataObject> dataUpdatedConfigurationObject;
  dataUpdatedConfigurationObject=change.getUpdatedData();
  for (  Map.Entry<InstanceIdentifier<?>,DataObject> entry : dataUpdatedConfigurationObject.entrySet()) {
    if ((entry.getValue() instanceof AccessListEntries && (!(dataCreatedConfigurationObject.containsKey(entry.getKey()))))) {
      AccessListEntries updatedAccessListEntries=(AccessListEntries)entry.getValue();
      configureAclFlows(updatedAccessListEntries,true);
    }
  }
}
Program: 132213
Project: 132213
Buggy source:
@Override public java.lang.AutoCloseable createInstance(){
  DataBroker dataBroker=getDataBrokerDependency();
  final OpenflowSfcRenderer openflowSfcRenderer=new OpenflowSfcRenderer(dataBroker);
  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(dataBroker);
  return new AutoCloseable(){
    @Override public void close() throws Exception {
      openflowSfcRenderer.close();
    }
  }
;
}
Program: 132214
Project: 132214
Buggy source:
@Override public void onDataChanged(AsyncDataChangeEvent<InstanceIdentifier<?>,DataObject> change){
  Map<InstanceIdentifier<?>,DataObject> dataOriginalConfigurationObject=change.getOriginalData();
  for (  Map.Entry<InstanceIdentifier<?>,DataObject> entry : dataOriginalConfigurationObject.entrySet()) {
    if (entry.getValue() instanceof AccessListEntries) {
      AccessListEntries originalAccessListEntries=(AccessListEntries)entry.getValue();
      AclServiceFunctionPath action=(AclServiceFunctionPath)(SfcAction)originalAccessListEntries.getActions();
      Long pathId=1L;
      Matches matches;
      AceIp aceIp;
      AceIpv4 aceIpv4;
      matches=originalAccessListEntries.getMatches();
      aceIp=(AceIp)matches.getAceType();
      aceIpv4=(AceIpv4)aceIp.getAceIpVersion();
      String srcIpAddress=aceIpv4.getSourceIpv4Address().getValue();
      String dstIpAddress=aceIpv4.getDestinationIpv4Address().getValue();
      Short srcPort=aceIp.getSourcePortRange().getLowerPort().getValue().shortValue();
      Short dstPort=aceIp.getDestinationPortRange().getLowerPort().getValue().shortValue();
      byte protocol=aceIp.getIpProtocol().byteValue();
      OpenflowSfcFlowProgrammer.getInstance().writeClassificationFlow(srcIpAddress,(short)32,dstIpAddress,(short)32,srcPort,dstPort,protocol,pathId);
    }
  }
}

Fixed version (ground truth):
@Override public void onDataChanged(AsyncDataChangeEvent<InstanceIdentifier<?>,DataObject> change){
  Map<InstanceIdentifier<?>,DataObject> dataOriginalConfigurationObject;
  dataOriginalConfigurationObject=change.getOriginalData();
  Map<InstanceIdentifier<?>,DataObject> dataCreatedConfigurationObject;
  dataCreatedConfigurationObject=change.getCreatedData();
  for (  Map.Entry<InstanceIdentifier<?>,DataObject> entry : dataCreatedConfigurationObject.entrySet()) {
    if (entry.getValue() instanceof AccessListEntries) {
      AccessListEntries createdAccessListEntries=(AccessListEntries)entry.getValue();
      configureAclFlows(createdAccessListEntries,true);
    }
  }
  Set<InstanceIdentifier<?>> dataRemovedConfigurationIID=change.getRemovedPaths();
  for (  InstanceIdentifier instanceIdentifier : dataRemovedConfigurationIID) {
    DataObject dataObject=dataOriginalConfigurationObject.get(instanceIdentifier);
    if (dataObject instanceof AccessListEntries) {
      AccessListEntries removedAccessListEntries=(AccessListEntries)dataObject;
      configureAclFlows(removedAccessListEntries,false);
    }
  }
  Map<InstanceIdentifier<?>,DataObject> dataUpdatedConfigurationObject;
  dataUpdatedConfigurationObject=change.getUpdatedData();
  for (  Map.Entry<InstanceIdentifier<?>,DataObject> entry : dataUpdatedConfigurationObject.entrySet()) {
    if ((entry.getValue() instanceof AccessListEntries && (!(dataCreatedConfigurationObject.containsKey(entry.getKey()))))) {
      AccessListEntries updatedAccessListEntries=(AccessListEntries)entry.getValue();
      configureAclFlows(updatedAccessListEntries,true);
    }
  }
}
Program: 132215
Project: 132215
Buggy source:
public void putServiceFunctionForwarders(ServiceFunctionForwarders serviceFunctionForwarders){
  ClientConfig clientConfig=new DefaultClientConfig();
  Client client=Client.create(clientConfig);
  ClientResponse getClientResponse=client.resource("String_Node_Str").accept("String_Node_Str").get(ClientResponse.class);
  String jsonOutput=getClientResponse.getEntity(String.class);
  getClientResponse.close();
  ClientResponse putClientResponse=client.resource("String_Node_Str").type("String_Node_Str").put(ClientResponse.class,jsonOutput);
  putClientResponse.close();
}

Fixed version (ground truth):
public void putServiceFunctionForwarders(ServiceFunctionForwarders serviceFunctionForwarders){
  ClientConfig clientConfig=new DefaultClientConfig();
  Client client=Client.create(clientConfig);
  ClientResponse getClientResponse=client.resource("String_Node_Str").accept("String_Node_Str").get(ClientResponse.class);
  String jsonOutput=getClientResponse.getEntity(String.class);
  getClientResponse.close();
  ClientResponse putClientRemoteResponse=client.resource("String_Node_Str").type("String_Node_Str").put(ClientResponse.class,jsonOutput);
  putClientRemoteResponse.close();
  ClientResponse putClientLocalResponse=client.resource("String_Node_Str").type("String_Node_Str").put(ClientResponse.class,jsonOutput);
  putClientLocalResponse.close();
}
Program: 132216
Project: 132216
Buggy source:
public void putServiceFunctionPaths(ServiceFunctionPaths serviceFunctionPaths){
  ClientConfig clientConfig=new DefaultClientConfig();
  Client client=Client.create(clientConfig);
  ClientResponse getClientResponse=client.resource("String_Node_Str").accept("String_Node_Str").get(ClientResponse.class);
  String jsonOutput=getClientResponse.getEntity(String.class);
  getClientResponse.close();
  ClientResponse putClientResponse=client.resource("String_Node_Str").type("String_Node_Str").put(ClientResponse.class,jsonOutput);
  putClientResponse.close();
}

Fixed version (ground truth):
public void putServiceFunctionPaths(ServiceFunctionPaths serviceFunctionPaths){
  ClientConfig clientConfig=new DefaultClientConfig();
  Client client=Client.create(clientConfig);
  ClientResponse getClientResponse=client.resource("String_Node_Str").accept("String_Node_Str").get(ClientResponse.class);
  String jsonOutput=getClientResponse.getEntity(String.class);
  getClientResponse.close();
}
Program: 132217
Project: 132217
Buggy source:
public void updateServiceFunctionForwarder(ServiceFunction serviceFunction){
  LOG.debug("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
  deleteServiceFunctionForwarder(serviceFunction);
  createServiceFunctionForwarder(serviceFunction);
}

Fixed version (ground truth):
public void updateServiceFunctionForwarder(ServiceFunction serviceFunction){
  LOG.debug("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
  deleteServiceFunctionFromForwarder(serviceFunction);
  createServiceFunctionForwarder(serviceFunction);
}
Program: 132218
Project: 132218
Buggy source:
public void deleteServiceFunctionFromForwarder(ServiceFunction serviceFunction){
  LOG.debug("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
  InstanceIdentifier<ServiceFunctionForwarder> sffIID;
  ServiceFunctionForwarderKey serviceFunctionForwarderKey=new ServiceFunctionForwarderKey(serviceFunction.getServiceFunctionForwarder());
  sffIID=InstanceIdentifier.builder(ServiceFunctionForwarders.class).child(ServiceFunctionForwarder.class,serviceFunctionForwarderKey).build();
  final DataModificationTransaction t=odlSfc.dataProvider.beginTransaction();
  t.removeConfigurationData(sffIID);
  try {
    t.commit().get();
  }
 catch (  ExecutionException|InterruptedException e) {
    LOG.warn("String_Node_Str",e);
  }
  LOG.debug("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
}

Fixed version (ground truth):
public void deleteServiceFunctionFromForwarder(ServiceFunction serviceFunction){
  LOG.debug("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
  InstanceIdentifier<ServiceFunctionDictionary> sffIID;
  ServiceFunctionDictionaryKey serviceFunctionDictionaryKey=new ServiceFunctionDictionaryKey(serviceFunction.getName());
  ServiceFunctionForwarderKey serviceFunctionForwarderKey=new ServiceFunctionForwarderKey(serviceFunction.getServiceFunctionForwarder());
  sffIID=InstanceIdentifier.builder(ServiceFunctionForwarders.class).child(ServiceFunctionForwarder.class,serviceFunctionForwarderKey).child(ServiceFunctionDictionary.class,serviceFunctionDictionaryKey).build();
  final DataModificationTransaction t=odlSfc.dataProvider.beginTransaction();
  t.removeConfigurationData(sffIID);
  try {
    t.commit().get();
  }
 catch (  ExecutionException|InterruptedException e) {
    LOG.warn("String_Node_Str",e);
  }
  LOG.debug("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
}
Program: 132220
Project: 132220
Buggy source:
public static ServiceFunctionChain readServiceFunctionChain(String serviceFunctionChainName){
  LOG.info("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
  InstanceIdentifier<ServiceFunctionChain> sfcIID;
  ServiceFunctionChainKey serviceFunctionChainKey=new ServiceFunctionChainKey(serviceFunctionChainName);
  sfcIID=InstanceIdentifier.builder(ServiceFunctionChains.class).child(ServiceFunctionChain.class,serviceFunctionChainKey).build();
  DataObject dataObject=odlSfc.dataProvider.readConfigurationData(sfcIID);
  if (dataObject instanceof ServiceFunctionChain) {
    LOG.info("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
    return (ServiceFunctionChain)dataObject;
  }
 else {
    LOG.info("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
    return null;
  }
}

Fixed version (ground truth):
public static ServiceFunctionChain readServiceFunctionChain(String serviceFunctionChainName){
  LOG.debug("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
  InstanceIdentifier<ServiceFunctionChain> sfcIID;
  ServiceFunctionChainKey serviceFunctionChainKey=new ServiceFunctionChainKey(serviceFunctionChainName);
  sfcIID=InstanceIdentifier.builder(ServiceFunctionChains.class).child(ServiceFunctionChain.class,serviceFunctionChainKey).build();
  DataObject dataObject=odlSfc.dataProvider.readConfigurationData(sfcIID);
  if (dataObject instanceof ServiceFunctionChain) {
    LOG.debug("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
    return (ServiceFunctionChain)dataObject;
  }
 else {
    LOG.debug("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
    return null;
  }
}
Program: 132221
Project: 132221
Buggy source:
public static void addPathToServiceFunctionChain(ServiceFunctionChain serviceFunctionChain,ServiceFunctionPath serviceFunctionPath){
  ServiceFunctionChainStateKey serviceFunctionChainStateKey=new ServiceFunctionChainStateKey(serviceFunctionChain.getName());
  InstanceIdentifier<ServiceFunctionChainState> sfcoIID=InstanceIdentifier.builder(ServiceFunctionChainsState.class).child(ServiceFunctionChainState.class,serviceFunctionChainStateKey).build();
  ServiceFunctionChainStateBuilder serviceFunctionChainStateBuilder=new ServiceFunctionChainStateBuilder();
  ArrayList<String> sfcServiceFunctionPathArrayList=new ArrayList<>();
  sfcServiceFunctionPathArrayList.add(serviceFunctionPath.getName());
  serviceFunctionChainStateBuilder.setSfcServiceFunctionPath(sfcServiceFunctionPathArrayList);
  serviceFunctionChainStateBuilder.setName(serviceFunctionChain.getName());
  final DataModificationTransaction t=odlSfc.dataProvider.beginTransaction();
  t.putOperationalData(sfcoIID,serviceFunctionChainStateBuilder.build());
  try {
    t.commit().get();
  }
 catch (  ExecutionException|InterruptedException e) {
    LOG.error("String_Node_Str",e);
  }
}

Fixed version (ground truth):
public static void addPathToServiceFunctionChain(ServiceFunctionChain serviceFunctionChain,ServiceFunctionPath serviceFunctionPath){
  LOG.debug("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
  ServiceFunctionChainStateKey serviceFunctionChainStateKey=new ServiceFunctionChainStateKey(serviceFunctionChain.getName());
  InstanceIdentifier<ServiceFunctionChainState> sfcoIID=InstanceIdentifier.builder(ServiceFunctionChainsState.class).child(ServiceFunctionChainState.class,serviceFunctionChainStateKey).build();
  ServiceFunctionChainStateBuilder serviceFunctionChainStateBuilder=new ServiceFunctionChainStateBuilder();
  ArrayList<String> sfcServiceFunctionPathArrayList=new ArrayList<>();
  sfcServiceFunctionPathArrayList.add(serviceFunctionPath.getName());
  serviceFunctionChainStateBuilder.setSfcServiceFunctionPath(sfcServiceFunctionPathArrayList);
  serviceFunctionChainStateBuilder.setName(serviceFunctionChain.getName());
  final DataModificationTransaction t=odlSfc.dataProvider.beginTransaction();
  t.putOperationalData(sfcoIID,serviceFunctionChainStateBuilder.build());
  try {
    t.commit().get();
  }
 catch (  ExecutionException|InterruptedException e) {
    LOG.error("String_Node_Str",e);
  }
  LOG.debug("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
}
Program: 132222
Project: 132222
Buggy source:
public static void removeServiceFunctionFromChain(ServiceFunction serviceFunction){
  LOG.info("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
  ServiceFunctionChains serviceFunctionChains=getServiceFunctionChainsRef();
  if (serviceFunctionChains != null) {
    List<ServiceFunctionChain> serviceFunctionChainList=serviceFunctionChains.getServiceFunctionChain();
    InstanceIdentifier<SfcServiceFunction> sfIID;
    SfcServiceFunctionKey serviceFunctionKey;
    for (    ServiceFunctionChain serviceFunctionChain : serviceFunctionChainList) {
      serviceFunctionKey=new SfcServiceFunctionKey(serviceFunction.getName());
      sfIID=InstanceIdentifier.builder(ServiceFunctionChains.class).child(ServiceFunctionChain.class,serviceFunctionChain.getKey()).child(SfcServiceFunction.class,serviceFunctionKey).build();
      final DataModificationTransaction t=odlSfc.dataProvider.beginTransaction();
      t.removeConfigurationData(sfIID);
      try {
        t.commit().get();
      }
 catch (      InterruptedException|ExecutionException e) {
        LOG.error("String_Node_Str",e);
      }
    }
  }
 else {
    LOG.warn("String_Node_Str");
  }
  LOG.info("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
}

Fixed version (ground truth):
public static void removeServiceFunctionFromChain(ServiceFunction serviceFunction){
  LOG.debug("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
  ServiceFunctionChains serviceFunctionChains=getServiceFunctionChainsRef();
  if (serviceFunctionChains != null) {
    List<ServiceFunctionChain> serviceFunctionChainList=serviceFunctionChains.getServiceFunctionChain();
    InstanceIdentifier<SfcServiceFunction> sfIID;
    SfcServiceFunctionKey serviceFunctionKey;
    for (    ServiceFunctionChain serviceFunctionChain : serviceFunctionChainList) {
      serviceFunctionKey=new SfcServiceFunctionKey(serviceFunction.getName());
      sfIID=InstanceIdentifier.builder(ServiceFunctionChains.class).child(ServiceFunctionChain.class,serviceFunctionChain.getKey()).child(SfcServiceFunction.class,serviceFunctionKey).build();
      final DataModificationTransaction t=odlSfc.dataProvider.beginTransaction();
      t.removeConfigurationData(sfIID);
      try {
        t.commit().get();
      }
 catch (      InterruptedException|ExecutionException e) {
        LOG.error("String_Node_Str",e);
      }
    }
  }
 else {
    LOG.warn("String_Node_Str");
  }
  LOG.debug("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
}
Program: 132223
Project: 132223
Buggy source:
public void addChainToChainState(ServiceFunctionChain serviceFunctionChain){
  ServiceFunctionChainStateKey serviceFunctionChainStateKey=new ServiceFunctionChainStateKey(serviceFunctionChain.getName());
  InstanceIdentifier<ServiceFunctionChainState> sfcoIID=InstanceIdentifier.builder(ServiceFunctionChainsState.class).child(ServiceFunctionChainState.class,serviceFunctionChainStateKey).build();
  ServiceFunctionChainStateBuilder serviceFunctionChainStateBuilder=new ServiceFunctionChainStateBuilder();
  serviceFunctionChainStateBuilder.setName(serviceFunctionChain.getName());
  final DataModificationTransaction t=odlSfc.dataProvider.beginTransaction();
  t.putOperationalData(sfcoIID,serviceFunctionChainStateBuilder.build());
  try {
    t.commit().get();
  }
 catch (  ExecutionException|InterruptedException e) {
    LOG.error("String_Node_Str",e);
  }
}

Fixed version (ground truth):
public void addChainToChainState(ServiceFunctionChain serviceFunctionChain){
  LOG.debug("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
  ServiceFunctionChainStateKey serviceFunctionChainStateKey=new ServiceFunctionChainStateKey(serviceFunctionChain.getName());
  InstanceIdentifier<ServiceFunctionChainState> sfcoIID=InstanceIdentifier.builder(ServiceFunctionChainsState.class).child(ServiceFunctionChainState.class,serviceFunctionChainStateKey).build();
  ServiceFunctionChainStateBuilder serviceFunctionChainStateBuilder=new ServiceFunctionChainStateBuilder();
  serviceFunctionChainStateBuilder.setName(serviceFunctionChain.getName());
  final DataModificationTransaction t=odlSfc.dataProvider.beginTransaction();
  t.putOperationalData(sfcoIID,serviceFunctionChainStateBuilder.build());
  try {
    t.commit().get();
  }
 catch (  ExecutionException|InterruptedException e) {
    LOG.error("String_Node_Str",e);
  }
  LOG.debug("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
}
Program: 132224
Project: 132224
Buggy source:
public static ServiceFunctionChains getServiceFunctionChainsRef(){
  LOG.info("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
  InstanceIdentifier<ServiceFunctionChains> sfcsIID;
  sfcsIID=InstanceIdentifier.builder(ServiceFunctionChains.class).build();
  DataObject dataObject=odlSfc.dataProvider.readConfigurationData(sfcsIID);
  if (dataObject instanceof ServiceFunctionChains) {
    ServiceFunctionChains serviceFunctionChains=(ServiceFunctionChains)dataObject;
    LOG.info("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
    return serviceFunctionChains;
  }
 else {
    LOG.info("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
    return null;
  }
}

Fixed version (ground truth):
public static ServiceFunctionChains getServiceFunctionChainsRef(){
  LOG.debug("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
  InstanceIdentifier<ServiceFunctionChains> sfcsIID;
  sfcsIID=InstanceIdentifier.builder(ServiceFunctionChains.class).build();
  DataObject dataObject=odlSfc.dataProvider.readConfigurationData(sfcsIID);
  if (dataObject instanceof ServiceFunctionChains) {
    ServiceFunctionChains serviceFunctionChains=(ServiceFunctionChains)dataObject;
    LOG.debug("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
    return serviceFunctionChains;
  }
 else {
    LOG.debug("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
    return null;
  }
}
Program: 132226
Project: 132226
Buggy source:
public void deleteServiceFunctionForwarder(ServiceFunction serviceFunction){
  LOG.info("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
  InstanceIdentifier<ServiceFunctionForwarder> sffIID;
  ServiceFunctionForwarderKey serviceFunctionForwarderKey=new ServiceFunctionForwarderKey(serviceFunction.getServiceFunctionForwarder());
  sffIID=InstanceIdentifier.builder(ServiceFunctionForwarders.class).child(ServiceFunctionForwarder.class,serviceFunctionForwarderKey).build();
  final DataModificationTransaction t=odlSfc.dataProvider.beginTransaction();
  t.removeConfigurationData(sffIID);
  try {
    t.commit().get();
  }
 catch (  ExecutionException|InterruptedException e) {
    LOG.warn("String_Node_Str",e);
  }
  LOG.info("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
}

Fixed version (ground truth):
public void deleteServiceFunctionForwarder(ServiceFunction serviceFunction){
  LOG.debug("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
  InstanceIdentifier<ServiceFunctionForwarder> sffIID;
  ServiceFunctionForwarderKey serviceFunctionForwarderKey=new ServiceFunctionForwarderKey(serviceFunction.getServiceFunctionForwarder());
  sffIID=InstanceIdentifier.builder(ServiceFunctionForwarders.class).child(ServiceFunctionForwarder.class,serviceFunctionForwarderKey).build();
  final DataModificationTransaction t=odlSfc.dataProvider.beginTransaction();
  t.removeConfigurationData(sffIID);
  try {
    t.commit().get();
  }
 catch (  ExecutionException|InterruptedException e) {
    LOG.warn("String_Node_Str",e);
  }
  LOG.debug("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
}
Program: 132227
Project: 132227
Buggy source:
public static ServiceFunctionForwarder readServiceFunctionForwarder(String name){
  LOG.info("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
  ServiceFunctionForwarderKey serviceFunctionForwarderKey=new ServiceFunctionForwarderKey(name);
  InstanceIdentifier<ServiceFunctionForwarder> sffIID;
  sffIID=InstanceIdentifier.builder(ServiceFunctionForwarders.class).child(ServiceFunctionForwarder.class,serviceFunctionForwarderKey).build();
  DataObject dataObject=odlSfc.dataProvider.readConfigurationData(sffIID);
  if (dataObject instanceof ServiceFunctionForwarder) {
    ServiceFunctionForwarder serviceFunctionForwarder=(ServiceFunctionForwarder)dataObject;
    return serviceFunctionForwarder;
  }
 else {
    return null;
  }
}

Fixed version (ground truth):
public static ServiceFunctionForwarder readServiceFunctionForwarder(String name){
  LOG.debug("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
  ServiceFunctionForwarderKey serviceFunctionForwarderKey=new ServiceFunctionForwarderKey(name);
  InstanceIdentifier<ServiceFunctionForwarder> sffIID;
  sffIID=InstanceIdentifier.builder(ServiceFunctionForwarders.class).child(ServiceFunctionForwarder.class,serviceFunctionForwarderKey).build();
  DataObject dataObject=odlSfc.dataProvider.readConfigurationData(sffIID);
  if (dataObject instanceof ServiceFunctionForwarder) {
    ServiceFunctionForwarder serviceFunctionForwarder=(ServiceFunctionForwarder)dataObject;
    return serviceFunctionForwarder;
  }
 else {
    return null;
  }
}
Program: 132229
Project: 132229
Buggy source:
public void updateServiceFunctionForwarder(ServiceFunction serviceFunction){
  LOG.info("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
  deleteServiceFunctionForwarder(serviceFunction);
  createServiceFunctionForwarder(serviceFunction);
}

Fixed version (ground truth):
public void updateServiceFunctionForwarder(ServiceFunction serviceFunction){
  LOG.debug("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
  deleteServiceFunctionForwarder(serviceFunction);
  createServiceFunctionForwarder(serviceFunction);
}
Program: 132230
Project: 132230
Buggy source:
public void deleteServiceFunctionFromForwarder(ServiceFunction serviceFunction){
  LOG.info("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
  InstanceIdentifier<ServiceFunctionDictionary> sffIID;
  ServiceFunctionForwarderKey serviceFunctionForwarderKey=new ServiceFunctionForwarderKey(serviceFunction.getServiceFunctionForwarder());
  ServiceFunctionDictionaryKey serviceFunctionDictionaryKey=new ServiceFunctionDictionaryKey(serviceFunction.getName());
  sffIID=InstanceIdentifier.builder(ServiceFunctionForwarders.class).child(ServiceFunctionForwarder.class,serviceFunctionForwarderKey).child(ServiceFunctionDictionary.class,serviceFunctionDictionaryKey).build();
  LOG.info("String_Node_Str",serviceFunction.getServiceFunctionForwarder(),serviceFunction.getName());
  final DataModificationTransaction t=odlSfc.dataProvider.beginTransaction();
  t.removeConfigurationData(sffIID);
  try {
    t.commit().get();
  }
 catch (  ExecutionException|InterruptedException e) {
    LOG.warn("String_Node_Str",e);
  }
  LOG.info("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
}

Fixed version (ground truth):
public void deleteServiceFunctionFromForwarder(ServiceFunction serviceFunction){
  LOG.debug("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
  InstanceIdentifier<ServiceFunctionDictionary> sffIID;
  ServiceFunctionForwarderKey serviceFunctionForwarderKey=new ServiceFunctionForwarderKey(serviceFunction.getServiceFunctionForwarder());
  ServiceFunctionDictionaryKey serviceFunctionDictionaryKey=new ServiceFunctionDictionaryKey(serviceFunction.getName());
  sffIID=InstanceIdentifier.builder(ServiceFunctionForwarders.class).child(ServiceFunctionForwarder.class,serviceFunctionForwarderKey).child(ServiceFunctionDictionary.class,serviceFunctionDictionaryKey).build();
  LOG.debug("String_Node_Str",serviceFunction.getServiceFunctionForwarder(),serviceFunction.getName());
  final DataModificationTransaction t=odlSfc.dataProvider.beginTransaction();
  t.removeConfigurationData(sffIID);
  try {
    t.commit().get();
  }
 catch (  ExecutionException|InterruptedException e) {
    LOG.warn("String_Node_Str",e);
  }
  LOG.debug("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
}
Program: 132232
Project: 132232
Buggy source:
public static ServiceFunction readServiceFunction(String serviceFunctionName){
  LOG.info("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
  InstanceIdentifier<ServiceFunction> sfIID;
  ServiceFunctionKey serviceFunctionKey=new ServiceFunctionKey(serviceFunctionName);
  sfIID=InstanceIdentifier.builder(ServiceFunctions.class).child(ServiceFunction.class,serviceFunctionKey).build();
  DataObject serviceFunctiondataObject=odlSfc.dataProvider.readConfigurationData(sfIID);
  if (serviceFunctiondataObject instanceof ServiceFunction) {
    LOG.info("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
    return (ServiceFunction)serviceFunctiondataObject;
  }
 else {
    LOG.info("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
    return null;
  }
}

Fixed version (ground truth):
public static ServiceFunction readServiceFunction(String serviceFunctionName){
  LOG.debug("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
  InstanceIdentifier<ServiceFunction> sfIID;
  ServiceFunctionKey serviceFunctionKey=new ServiceFunctionKey(serviceFunctionName);
  sfIID=InstanceIdentifier.builder(ServiceFunctions.class).child(ServiceFunction.class,serviceFunctionKey).build();
  DataObject serviceFunctiondataObject=odlSfc.dataProvider.readConfigurationData(sfIID);
  if (serviceFunctiondataObject instanceof ServiceFunction) {
    LOG.debug("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
    return (ServiceFunction)serviceFunctiondataObject;
  }
 else {
    LOG.debug("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
    return null;
  }
}
Program: 132233
Project: 132233
Buggy source:
public static ServiceFunctionChain readServiceFunctionChain(String serviceFunctionChainName){
  LOG.info("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
  InstanceIdentifier<ServiceFunctionChain> sfcIID;
  ServiceFunctionChainKey serviceFunctionChainKey=new ServiceFunctionChainKey(serviceFunctionChainName);
  sfcIID=InstanceIdentifier.builder(ServiceFunctionChains.class).child(ServiceFunctionChain.class,serviceFunctionChainKey).build();
  DataObject dataObject=odlSfc.dataProvider.readConfigurationData(sfcIID);
  if (dataObject instanceof ServiceFunctionChain) {
    LOG.info("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
    return (ServiceFunctionChain)dataObject;
  }
 else {
    LOG.info("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
    return null;
  }
}

Fixed version (ground truth):
public static ServiceFunctionChain readServiceFunctionChain(String serviceFunctionChainName){
  LOG.debug("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
  InstanceIdentifier<ServiceFunctionChain> sfcIID;
  ServiceFunctionChainKey serviceFunctionChainKey=new ServiceFunctionChainKey(serviceFunctionChainName);
  sfcIID=InstanceIdentifier.builder(ServiceFunctionChains.class).child(ServiceFunctionChain.class,serviceFunctionChainKey).build();
  DataObject dataObject=odlSfc.dataProvider.readConfigurationData(sfcIID);
  if (dataObject instanceof ServiceFunctionChain) {
    LOG.debug("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
    return (ServiceFunctionChain)dataObject;
  }
 else {
    LOG.debug("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
    return null;
  }
}
Program: 132234
Project: 132234
Buggy source:
public static void addPathToServiceFunctionChain(ServiceFunctionChain serviceFunctionChain,ServiceFunctionPath serviceFunctionPath){
  ServiceFunctionChainStateKey serviceFunctionChainStateKey=new ServiceFunctionChainStateKey(serviceFunctionChain.getName());
  InstanceIdentifier<ServiceFunctionChainState> sfcoIID=InstanceIdentifier.builder(ServiceFunctionChainsState.class).child(ServiceFunctionChainState.class,serviceFunctionChainStateKey).build();
  ServiceFunctionChainStateBuilder serviceFunctionChainStateBuilder=new ServiceFunctionChainStateBuilder();
  ArrayList<String> sfcServiceFunctionPathArrayList=new ArrayList<>();
  sfcServiceFunctionPathArrayList.add(serviceFunctionPath.getName());
  serviceFunctionChainStateBuilder.setSfcServiceFunctionPath(sfcServiceFunctionPathArrayList);
  serviceFunctionChainStateBuilder.setName(serviceFunctionChain.getName());
  final DataModificationTransaction t=odlSfc.dataProvider.beginTransaction();
  t.putOperationalData(sfcoIID,serviceFunctionChainStateBuilder.build());
  try {
    t.commit().get();
  }
 catch (  ExecutionException|InterruptedException e) {
    LOG.error("String_Node_Str",e);
  }
}

Fixed version (ground truth):
public static void addPathToServiceFunctionChain(ServiceFunctionChain serviceFunctionChain,ServiceFunctionPath serviceFunctionPath){
  LOG.debug("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
  ServiceFunctionChainStateKey serviceFunctionChainStateKey=new ServiceFunctionChainStateKey(serviceFunctionChain.getName());
  InstanceIdentifier<ServiceFunctionChainState> sfcoIID=InstanceIdentifier.builder(ServiceFunctionChainsState.class).child(ServiceFunctionChainState.class,serviceFunctionChainStateKey).build();
  ServiceFunctionChainStateBuilder serviceFunctionChainStateBuilder=new ServiceFunctionChainStateBuilder();
  ArrayList<String> sfcServiceFunctionPathArrayList=new ArrayList<>();
  sfcServiceFunctionPathArrayList.add(serviceFunctionPath.getName());
  serviceFunctionChainStateBuilder.setSfcServiceFunctionPath(sfcServiceFunctionPathArrayList);
  serviceFunctionChainStateBuilder.setName(serviceFunctionChain.getName());
  final DataModificationTransaction t=odlSfc.dataProvider.beginTransaction();
  t.putOperationalData(sfcoIID,serviceFunctionChainStateBuilder.build());
  try {
    t.commit().get();
  }
 catch (  ExecutionException|InterruptedException e) {
    LOG.error("String_Node_Str",e);
  }
  LOG.debug("String_Node_Str",Thread.currentThread().getStackTrace()[1]);
}