Program: 132207
Project: 132207
Buggy source:
/** 
 * Communicates SFP to REST URI found in SFF configuration Server. It sends SFP information to each SFF present in the service-hop list. <p>
 * @param serviceFunctionPath Service Function Path object
 * @return Nothing
 */
public void putServiceFunctionPath(ServiceFunctionPath serviceFunctionPath){
  printTraceStart(LOG);
  ClientConfig clientConfig=new DefaultClientConfig();
  Client client=Client.create(clientConfig);
  String sfpURI;
  String restURI;
  String sfpJSON=getRESTObj(getServiceFunctionPathURI(serviceFunctionPath));
  List<ServicePathHop> servicePathHopList=serviceFunctionPath.getServicePathHop();
  Set<String> sffNameSet=new HashSet<>();
  for (  ServicePathHop servicePathHop : servicePathHopList) {
    String sffName=servicePathHop.getServiceFunctionForwarder();
    if (sffNameSet.add(sffName)) {
      Object[] serviceForwarderObj={sffName};
      Class[] serviceForwarderClass={String.class};
      SfcProviderServiceForwarderAPI sfcProviderServiceForwarderAPI=SfcProviderServiceForwarderAPI.getRead(serviceForwarderObj,serviceForwarderClass);
      Future<Object> future=odlSfc.executor.submit(sfcProviderServiceForwarderAPI);
      ClientResponse putClientRemoteResponse;
      try {
        ServiceFunctionForwarder serviceFunctionForwarder=(ServiceFunctionForwarder)future.get();
        restURI=serviceFunctionForwarder.getRestUri().toString();
        sfpURI=restURI + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ serviceFunctionPath.getName();
        putClientRemoteResponse=client.resource(sfpURI).type(MediaType.APPLICATION_JSON_TYPE).put(ClientResponse.class,sfpJSON);
        if (putClientRemoteResponse.getStatus() >= 300) {
          throw new UniformInterfaceException(HTTP_ERROR_MSG + putClientRemoteResponse.getStatus(),putClientRemoteResponse);
        }
        putClientRemoteResponse.close();
      }
 catch (      InterruptedException e) {
        e.printStackTrace();
      }
catch (      ExecutionException e) {
        e.printStackTrace();
      }
    }
  }
  printTraceStop(LOG);
}

Fixed version (ground truth):
/** 
 * Communicates SFP to REST URI found in SFF configuration Server. It sends SFP information to each SFF present in the service-hop list. <p>
 * @param serviceFunctionPath Service Function Path object
 * @return Nothing
 */
public void putServiceFunctionPath(ServiceFunctionPath serviceFunctionPath){
  printTraceStart(LOG);
  ClientConfig clientConfig=new DefaultClientConfig();
  Client client=Client.create(clientConfig);
  String sfpURI;
  String restURI;
  String sfpJSON=getRESTObj(getServiceFunctionPathURI(serviceFunctionPath));
  List<ServicePathHop> servicePathHopList=serviceFunctionPath.getServicePathHop();
  Set<String> sffNameSet=new HashSet<>();
  for (  ServicePathHop servicePathHop : servicePathHopList) {
    String sffName=servicePathHop.getServiceFunctionForwarder();
    if (sffNameSet.add(sffName)) {
      Object[] serviceForwarderObj={sffName};
      Class[] serviceForwarderClass={String.class};
      SfcProviderServiceForwarderAPI sfcProviderServiceForwarderAPI=SfcProviderServiceForwarderAPI.getRead(serviceForwarderObj,serviceForwarderClass);
      Future<Object> future=odlSfc.executor.submit(sfcProviderServiceForwarderAPI);
      ClientResponse putClientRemoteResponse;
      try {
        ServiceFunctionForwarder serviceFunctionForwarder=(ServiceFunctionForwarder)future.get();
        restURI=serviceFunctionForwarder.getRestUri().getValue();
        sfpURI=restURI + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ serviceFunctionPath.getName();
        putClientRemoteResponse=client.resource(sfpURI).type(MediaType.APPLICATION_JSON_TYPE).put(ClientResponse.class,sfpJSON);
        if (putClientRemoteResponse.getStatus() >= 300) {
          throw new UniformInterfaceException(HTTP_ERROR_MSG + putClientRemoteResponse.getStatus(),putClientRemoteResponse);
        }
        putClientRemoteResponse.close();
      }
 catch (      InterruptedException e) {
        e.printStackTrace();
      }
catch (      ExecutionException e) {
        e.printStackTrace();
      }
    }
  }
  printTraceStop(LOG);
}