diff --git a/asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiProvider.java b/asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiProvider.java
index cebcb99..ea57409 100644
--- a/asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiProvider.java
+++ b/asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiProvider.java
@@ -301,19 +301,20 @@
     }
 
     VfLicenseModelUpdateInputBuilder inputBuilder = new VfLicenseModelUpdateInputBuilder(input);
-    input = inputBuilder.build();
+
+    VfLicenseModelUpdateInput inputVfLic = inputBuilder.build();
 
     String errorMessage = "Success";
     String errorCode = "200";
 
     // If this artifact already exists, reject this update
-    if (artifactVersionExists(input.getArtifactName(), input.getArtifactVersion())) {
+    if (artifactVersionExists(inputVfLic.getArtifactName(), inputVfLic.getArtifactVersion())) {
         errorCode = "409";
         errorMessage = "Artifact version already exists";
     } else {
         // Translate input object into SLI-consumable properties
-        LOG.info("Adding INPUT data for "+SVC_OPERATION+" input: " + input);
-        AsdcApiUtil.toProperties(parms, input);
+        LOG.info("Adding INPUT data for "+SVC_OPERATION+" input: " + inputVfLic);
+        AsdcApiUtil.toProperties(parms, inputVfLic);
 
 
         // Call directed graph
@@ -356,8 +357,8 @@
         LOG.info("ASDC update succeeded");
 
         // Update config tree
-        applyVfLicenseModelUpdate(input);
-        addArtifactVersion(input.getArtifactName(), input.getArtifactVersion());
+        applyVfLicenseModelUpdate(inputVfLic);
+        addArtifactVersion(inputVfLic.getArtifactName(), inputVfLic.getArtifactVersion());
 
     } else {
         LOG.info("ASDC update failed ("+errorCode+" : "+errorMessage);
diff --git a/dataChange/provider/src/main/java/org/onap/ccsdk/sli/northbound/DataChangeClient.java b/dataChange/provider/src/main/java/org/onap/ccsdk/sli/northbound/DataChangeClient.java
index 4bf8577..959b2b6 100644
--- a/dataChange/provider/src/main/java/org/onap/ccsdk/sli/northbound/DataChangeClient.java
+++ b/dataChange/provider/src/main/java/org/onap/ccsdk/sli/northbound/DataChangeClient.java
@@ -42,7 +42,7 @@
 
 	public boolean hasGraph(String module, String rpc, String version, String mode) throws SvcLogicException
 	{
-		return(svcLogicService.hasGraph(module, rpc, version, mode));
+		return svcLogicService.hasGraph(module, rpc, version, mode);
 	}
 
 	public Properties execute(String module, String rpc, String version, String mode, DataChangeNotificationOutputBuilder serviceData)
@@ -56,22 +56,23 @@
 	public Properties execute(String module, String rpc, String version, String mode, DataChangeNotificationOutputBuilder serviceData, Properties parms)
 				throws SvcLogicException {
 
-		parms = MdsalHelper.toProperties(parms, serviceData);
+        Properties localProp;
+        localProp = MdsalHelper.toProperties(parms, serviceData);
 
 		if (LOG.isDebugEnabled())
 		{
 			LOG.debug("Parameters passed to SLI");
 
-			for (Object key : parms.keySet()) {
+			for (Object key : localProp.keySet()) {
 				String parmName = (String) key;
-				String parmValue = parms.getProperty(parmName);
+				String parmValue = localProp.getProperty(parmName);
 
 				LOG.debug(parmName+" = "+parmValue);
 
 			}
 		}
 
-		Properties respProps = svcLogicService.execute(module, rpc, version, mode, parms);
+		Properties respProps = svcLogicService.execute(module, rpc, version, mode, localProp);
 
 		if (LOG.isDebugEnabled())
 		{
@@ -86,12 +87,12 @@
 			}
 		}
 		if ("failure".equalsIgnoreCase(respProps.getProperty("SvcLogic.status"))) {
-			return (respProps);
+			return respProps;
 		}
 
 		MdsalHelper.toBuilder(respProps, serviceData);
 
-		return (respProps);
+		return respProps;
 	}
 
 }
diff --git a/dataChange/provider/src/main/java/org/onap/ccsdk/sli/northbound/DataChangeProvider.java b/dataChange/provider/src/main/java/org/onap/ccsdk/sli/northbound/DataChangeProvider.java
index 2b45cc7..91482d8 100644
--- a/dataChange/provider/src/main/java/org/onap/ccsdk/sli/northbound/DataChangeProvider.java
+++ b/dataChange/provider/src/main/java/org/onap/ccsdk/sli/northbound/DataChangeProvider.java
@@ -121,15 +121,13 @@
 		MdsalHelper.toProperties(parms, inputBuilder.build());
 
 		// Call SLI sync method
-		Properties respProps = null;
-
 		try
 		{
 			if (dataChangeClient.hasGraph("DataChange", SVC_OPERATION , null, "sync"))
 			{
 				try
 				{
-					respProps = dataChangeClient.execute("DataChange", SVC_OPERATION, null, "sync", serviceDataBuilder, parms);
+					dataChangeClient.execute("DataChange", SVC_OPERATION, null, "sync", serviceDataBuilder, parms);
 				}
 				catch (Exception e)
 				{
