diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtils.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtils.java
index acc6d72..d7be686 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtils.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtils.java
@@ -886,7 +886,7 @@
     public Map <String, Object> validateStackParams (Map <String, Object> inputParams,
                                                      HeatTemplate heatTemplate) throws IllegalArgumentException {
         // Check that required parameters have been supplied for this template type
-        String missingParams = null;
+        StringBuilder missingParams = null;
         List <String> paramList = new ArrayList <> ();
 
         // TODO: Enhance DB to support defaults for Heat Template parameters
@@ -894,9 +894,9 @@
         for (HeatTemplateParam parm : heatTemplate.getParameters ()) {
             if (parm.isRequired () && !inputParams.containsKey (parm.getParamName ())) {
                 if (missingParams == null) {
-                    missingParams = parm.getParamName ();
+                    missingParams = new StringBuilder(parm.getParamName());
                 } else {
-                    missingParams += "," + parm.getParamName ();
+                    missingParams.append("," + parm.getParamName());
                 }
             }
             paramList.add (parm.getParamName ());
diff --git a/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/MsoNetworkAdapterImpl.java b/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/MsoNetworkAdapterImpl.java
index 2c04ae9..f050882 100644
--- a/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/MsoNetworkAdapterImpl.java
+++ b/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/MsoNetworkAdapterImpl.java
@@ -1985,16 +1985,16 @@
     		String outputTempl = "  subnet_id_%subnetId%:\n" + "    description: Openstack subnet identifier\n"
     				+ "    value: {get_resource: subnet_%subnetId%}\n";
 
-    		String curR;
+    		StringBuilder curR;
     		String curO;
     		StringBuilder resourcesBuf = new StringBuilder ();
     		StringBuilder outputsBuf = new StringBuilder ();
     		for (Subnet subnet : subnets) {
 
     			// build template for each subnet
-    			curR = resourceTempl;
+    			curR = new StringBuilder(resourceTempl);
     			if (subnet.getSubnetId () != null) {
-    				curR = curR.replace ("%subnetId%", subnet.getSubnetId ());
+    				curR = new StringBuilder(curR.toString().replace("%subnetId%", subnet.getSubnetId()));
     			} else {
     				String error = "Missing Required AAI SubnetId for subnet in HEAT Template";
     				LOGGER.error (MessageEnum.RA_MISSING_PARAM, error, "Openstack", "", MsoLogger.ErrorCode.DataError, "Missing Required AAI ID  for subnet in HEAT Template");
@@ -2002,13 +2002,13 @@
     			}
 
     			if (subnet.getSubnetName () != null) {
-    				curR = curR.replace ("%name%", subnet.getSubnetName ());
+    				curR = new StringBuilder(curR.toString().replace("%name%", subnet.getSubnetName()));
     			} else {
-    				curR = curR.replace ("%name%", subnet.getSubnetId ());
+    				curR = new StringBuilder(curR.toString().replace("%name%", subnet.getSubnetId()));
     			}
 
     			if (subnet.getCidr () != null) {
-    				curR = curR.replace ("%cidr%", subnet.getCidr ());
+    				curR = new StringBuilder(curR.toString().replace("%cidr%", subnet.getCidr()));
     			} else {
     				String error = "Missing Required cidr for subnet in HEAT Template";
     				LOGGER.error (MessageEnum.RA_MISSING_PARAM, error, "Openstack", "", MsoLogger.ErrorCode.DataError, "Missing Required cidr for subnet in HEAT Template");
@@ -2016,23 +2016,23 @@
     			}
 
     			if (subnet.getIpVersion () != null) {
-    				curR = curR + "      ip_version: " + subnet.getIpVersion () + "\n";
+    				curR.append("      ip_version: " + subnet.getIpVersion() + "\n");
     			}
     			if (subnet.getEnableDHCP () != null) {
-    				curR = curR + "      enable_dhcp: " +  Boolean.toString (subnet.getEnableDHCP ()) + "\n";
+    				curR.append("      enable_dhcp: ").append(Boolean.toString(subnet.getEnableDHCP())).append("\n");
     			}
     			if (subnet.getGatewayIp () != null && !subnet.getGatewayIp ().isEmpty() ) {
-    				curR = curR + "      gateway_ip: " + subnet.getGatewayIp () + "\n";
+    				curR.append("      gateway_ip: " + subnet.getGatewayIp() + "\n");
     			}
 
     			if (subnet.getAllocationPools() != null) {
-    				curR = curR + "      allocation_pools:\n";
+    				curR.append("      allocation_pools:\n");
     				for (Pool pool : subnet.getAllocationPools())
     				{
     					if (!isNullOrEmpty(pool.getStart()) && !isNullOrEmpty(pool.getEnd()))
     					{
-    						curR = curR + "       - start: " + pool.getStart () + "\n";
-    						curR = curR + "         end: " + pool.getEnd () + "\n";
+    						curR.append("       - start: " + pool.getStart() + "\n");
+    						curR.append("         end: " + pool.getEnd() + "\n");
     					}
     				}
     			}
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/impl/SDNCRestClient.java b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/impl/SDNCRestClient.java
index 97f30be..45d5944 100644
--- a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/impl/SDNCRestClient.java
+++ b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/impl/SDNCRestClient.java
@@ -197,7 +197,7 @@
 			//default
 			sdncResp.setRespCode(HttpURLConnection.HTTP_INTERNAL_ERROR);
 			String respMsg = "Error processing request to SDNC. ";
-			String sdncErrMsg = "";
+			StringBuilder sdncErrMsg = new StringBuilder();
 
 			if (e instanceof java.net.SocketTimeoutException )
 			{
@@ -229,7 +229,7 @@
 								String eType = null;
 								try {
 									eType = xpath.evaluate("error-type", error);
-									sdncErrMsg = ". SDNC Returned-[error-type:" + eType;
+									sdncErrMsg = new StringBuilder(". SDNC Returned-[error-type:" + eType);
 								} catch (Exception e3) {
 								    msoLogger.error (MessageEnum.RA_EVALUATE_XPATH_ERROR, "error-type", error.toString(), "SDNC", "", MsoLogger.ErrorCode.DataError, "Exception while evaluate xpath", e3);
 								}
@@ -237,7 +237,7 @@
 								String eTag = null;
 								try {
 									eTag = xpath.evaluate( "error-tag", error);
-									sdncErrMsg = sdncErrMsg + ", error-tag:" + eTag;
+									sdncErrMsg.append(", error-tag:").append(eTag);
 								} catch (Exception e3) {
 									msoLogger.error (MessageEnum.RA_EVALUATE_XPATH_ERROR, "error-tag", error.toString(), "SDNC", "", MsoLogger.ErrorCode.DataError, "Exception while evaluate xpath", e3);
 								}
@@ -245,7 +245,7 @@
 								String eMsg = null;
 								try {
 									eMsg = xpath.evaluate("error-message", error);
-									sdncErrMsg = sdncErrMsg + ", error-message:" + eMsg + "]";
+									sdncErrMsg.append(", error-message:").append(eMsg).append("]");
 								} catch (Exception e3) {
 									msoLogger.error (MessageEnum.RA_EVALUATE_XPATH_ERROR, "error-message", error.toString(), "SDNC", "", MsoLogger.ErrorCode.DataError, "Exception while evaluate xpath", e3);
 								}
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/sdncrest/SDNCConnector.java b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/sdncrest/SDNCConnector.java
index 262d23b..be0466a 100644
--- a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/sdncrest/SDNCConnector.java
+++ b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/sdncrest/SDNCConnector.java
@@ -257,7 +257,7 @@
 		//   </error>
 		// </errors>
 
-		String output = null;
+		StringBuilder output = null;
 
 		try {
 			XPathFactory xpathFactory = XPathFactory.newInstance();
@@ -306,9 +306,9 @@
 
 				if (!info.isEmpty()) {
 					if (output == null) {
-						output = "[" + info + "]";
+						output = new StringBuilder("[" + info + "]");
 					} else {
-						output += " [" + info + "]";
+						output.append(" [").append(info).append("]");
 					}
 				}
 			}
@@ -317,6 +317,6 @@
 				MsoLogger.ErrorCode.DataError, "Exception while analyzing errors", e);
 		}
 
-		return output;
+		return output.toString();
 	}
 }
diff --git a/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterImpl.java b/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterImpl.java
index 7fe09be..a292c76 100644
--- a/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterImpl.java
+++ b/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterImpl.java
@@ -1170,7 +1170,7 @@
             }
 
             // Check that required parameters have been supplied
-            String missingParams = null;
+            StringBuilder missingParams = null;
             List <String> paramList = new ArrayList <> ();
 
             // New for 1510 - consult the PARAM_ALIAS field to see if we've been
@@ -1264,9 +1264,9 @@
                     } else {
                         LOGGER.debug ("adding to missing parameters list: " + parm.getParamName ());
                         if (missingParams == null) {
-                            missingParams = parm.getParamName ();
+                            missingParams = new StringBuilder(parm.getParamName());
                         } else {
-                            missingParams += "," + parm.getParamName ();
+                            missingParams.append("," + parm.getParamName());
                         }
                     }
                 }
@@ -1276,7 +1276,7 @@
                 if (checkRequiredParameters) {
                     // Problem - missing one or more required parameters
                     String error = "Create VFModule: Missing Required inputs: " + missingParams;
-                    LOGGER.error (MessageEnum.RA_MISSING_PARAM, missingParams, "OpenStack", "", MsoLogger.ErrorCode.DataError, "Create VFModule: Missing Required inputs");
+                    LOGGER.error (MessageEnum.RA_MISSING_PARAM, missingParams.toString(), "OpenStack", "", MsoLogger.ErrorCode.DataError, "Create VFModule: Missing Required inputs");
                     LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.BadRequest, error);
                     throw new VnfException (error, MsoExceptionCategory.USERDATA);
                 } else {
@@ -1871,7 +1871,7 @@
             }
 
             // Check that required parameters have been supplied
-            String missingParams = null;
+            StringBuilder missingParams = null;
             List <String> paramList = new ArrayList <> ();
 
             // New for 1510 - consult the PARAM_ALIAS field to see if we've been
@@ -2009,9 +2009,9 @@
                     else {
                         LOGGER.debug ("adding to missing parameters list: " + parm.getParamName ());
                         if (missingParams == null) {
-                            missingParams = parm.getParamName ();
+                            missingParams = new StringBuilder(parm.getParamName());
                         } else {
-                            missingParams += "," + parm.getParamName ();
+                            missingParams.append("," + parm.getParamName());
                         }
                     }
                 }
@@ -2021,7 +2021,7 @@
                 // Problem - missing one or more required parameters
                 if (checkRequiredParameters) {
                 String error = "Update VNF: Missing Required inputs: " + missingParams;
-                LOGGER.error (MessageEnum.RA_MISSING_PARAM, missingParams, "OpenStack", "", MsoLogger.ErrorCode.DataError, error);
+                LOGGER.error (MessageEnum.RA_MISSING_PARAM, missingParams.toString(), "OpenStack", "", MsoLogger.ErrorCode.DataError, error);
                     LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.BadRequest, error);
                 throw new VnfException (error, MsoExceptionCategory.USERDATA);
                 } else {
