diff --git a/src/main/java/org/onap/clamp/authorization/AuthorizationController.java b/src/main/java/org/onap/clamp/authorization/AuthorizationController.java
index 2061027..568af48 100644
--- a/src/main/java/org/onap/clamp/authorization/AuthorizationController.java
+++ b/src/main/java/org/onap/clamp/authorization/AuthorizationController.java
@@ -58,30 +58,34 @@
     private ClampProperties refProp;
 
     private SecurityContext securityContext = SecurityContextHolder.getContext();
-    private final static String permPrefix = "security.permission.type.";
-    private final static String permInstance = "security.permission.instance";
+    private static final String permPrefix = "security.permission.type.";
+    private static final String permInstance = "security.permission.instance";
 
     public AuthorizationController() {
     }
+
     /**
-     * Insert event using process variables.
+     * Insert authorize the api based on the permission
      *
      * @param camelExchange
      *        The Camel Exchange object containing the properties
-     * @param actionState
-     *        The action state that is used instead of the one in exchange property
+     * @param typeVar
+     *        The type of the permissions
+     * @param instanceVar
+     *        The instance of the permissions. e.g. dev
+     * @param action
+     *        The action of the permissions. e.g. read
      */
-
     public void authorize (Exchange camelExchange, String typeVar, String instanceVar, String action) {
         String type = refProp.getStringValue(permPrefix + typeVar);
         String instance = refProp.getStringValue(permInstance);
-        
+
         if (null == type || type.isEmpty()) {
             //authorization is turned off, since the permission is not defined
             return;
         }
         if (null != instanceVar && !instanceVar.isEmpty()) {
-             instance = instanceVar;
+            instance = instanceVar;
         }
         String principalName = PrincipalUtils.getPrincipalName();
         SecureServicePermission perm = SecureServicePermission.create(type, instance, action);
@@ -105,18 +109,22 @@
         // check if the user has the permission key or the permission key with a
         // combination of  all instance and/or all action.
         if (hasRole(inPermission.getKey())) {
-            auditLogger.info("{} authorized because user has permission with * for instance: {}", principalName, inPermission.getKey());
+            auditLogger.info("{} authorized because user has permission with * for instance: {}", 
+                  principalName, inPermission.getKey());
             authorized = true;
             // the rest of these don't seem to be required - isUserInRole method
             // appears to take * as a wildcard
         } else if (hasRole(inPermission.getKeyAllInstance())) {
-            auditLogger.info("{} authorized because user has permission with * for instance: {}", principalName, inPermission.getKey());
+            auditLogger.info("{} authorized because user has permission with * for instance: {}", 
+                  principalName, inPermission.getKey());
             authorized = true;
         } else if (hasRole(inPermission.getKeyAllInstanceAction())) {
-            auditLogger.info("{} authorized because user has permission with * for instance and * for action: {}", principalName, inPermission.getKey());
+            auditLogger.info("{} authorized because user has permission with * for instance and * for action: {}", 
+                  principalName, inPermission.getKey());
             authorized = true;
         } else if (hasRole(inPermission.getKeyAllAction())) {
-            auditLogger.info("{} authorized because user has permission with * for action: {}", principalName, inPermission.getKey());
+            auditLogger.info("{} authorized because user has permission with * for action: {}", 
+                  principalName, inPermission.getKey());
             authorized = true;
         } else {
             throw new NotAuthorizedException("");
@@ -124,9 +132,15 @@
         return authorized;
     }
 
+    /**
+     * Verify whether the user has the permission
+     *
+     * @param inPermission
+     *        The permissions to verify
+     */
     public boolean isUserPermittedNoException(SecureServicePermission inPermission) {
         try {
-            return isUserPermitted (inPermission);
+            return isUserPermitted(inPermission);
         } catch (NotAuthorizedException e) {
             return false;
         }
@@ -138,8 +152,9 @@
             return false;
         }
         for (GrantedAuthority auth : authentication.getAuthorities()) {
-            if (role.equals(auth.getAuthority()))
+            if (role.equals(auth.getAuthority())) {
                 return true;
+            }
         }
         return false;
     }
diff --git a/src/main/java/org/onap/clamp/clds/Application.java b/src/main/java/org/onap/clamp/clds/Application.java
index 7e78504..025dbab 100644
--- a/src/main/java/org/onap/clamp/clds/Application.java
+++ b/src/main/java/org/onap/clamp/clds/Application.java
@@ -101,7 +101,7 @@
      * This method is used to declare the camel servlet.
      *
      * @return A servlet bean
-     * @throws IOException
+     * @throws IOException IO Exception
      */
     @Bean
     public ServletRegistrationBean camelServletRegistrationBean() throws IOException {
diff --git a/src/main/java/org/onap/clamp/clds/ClampServlet.java b/src/main/java/org/onap/clamp/clds/ClampServlet.java
index 008a9c7..e8fd83e 100644
--- a/src/main/java/org/onap/clamp/clds/ClampServlet.java
+++ b/src/main/java/org/onap/clamp/clds/ClampServlet.java
@@ -50,7 +50,7 @@
 public class ClampServlet extends CamelHttpTransportServlet {
 
     /**
-     *
+     * The serial version ID.
      */
     private static final long serialVersionUID = -4198841134910211542L;
 
@@ -109,8 +109,8 @@
     @Override
     protected void doService(HttpServletRequest request, HttpServletResponse response)
         throws ServletException, IOException {
-        Principal p = request.getUserPrincipal();
-        if (loadDynamicAuthenticationClass().isInstance(p)) {
+        Principal principal = request.getUserPrincipal();
+        if (loadDynamicAuthenticationClass().isInstance(principal)) {
             // When AAF is enabled, there is a need to provision the permissions to Spring
             // system
             List<GrantedAuthority> grantedAuths = new ArrayList<>();
@@ -120,7 +120,7 @@
                     grantedAuths.add(new SimpleGrantedAuthority(permString));
                 }
             }
-            Authentication auth = new UsernamePasswordAuthenticationToken(new User(p.getName(), "", grantedAuths), "",
+            Authentication auth = new UsernamePasswordAuthenticationToken(new User(principal.getName(), "", grantedAuths), "",
                 grantedAuths);
             SecurityContextHolder.getContext().setAuthentication(auth);
         }
diff --git a/src/main/java/org/onap/clamp/clds/TomcatEmbeddedServletContainerFactoryRedirection.java b/src/main/java/org/onap/clamp/clds/TomcatEmbeddedServletContainerFactoryRedirection.java
index 1d9150e..a0109a6 100644
--- a/src/main/java/org/onap/clamp/clds/TomcatEmbeddedServletContainerFactoryRedirection.java
+++ b/src/main/java/org/onap/clamp/clds/TomcatEmbeddedServletContainerFactoryRedirection.java
@@ -32,10 +32,8 @@
  * This class is a factory that redirects by default all HTTP to HTTPS
  * connector. It is used by the Application.java class and defined in a Spring
  * Bean.
- *
  * In order to do this, the method postProcessContext has been overridden to
  * provide another behavior.
- *
  */
 public class TomcatEmbeddedServletContainerFactoryRedirection extends TomcatServletWebServerFactory {
 
diff --git a/src/main/java/org/onap/clamp/clds/client/DcaeDispatcherServices.java b/src/main/java/org/onap/clamp/clds/client/DcaeDispatcherServices.java
index 6845452..63caf5a 100644
--- a/src/main/java/org/onap/clamp/clds/client/DcaeDispatcherServices.java
+++ b/src/main/java/org/onap/clamp/clds/client/DcaeDispatcherServices.java
@@ -63,6 +63,13 @@
         this.dcaeHttpConnectionManager = dcaeHttpConnectionManager;
     }
 
+    /**
+     * Get the Operation Status from a specified URL with retry.
+     * @param operationStatusUrl
+     *        The URL of the DCAE
+     * @return The status
+     * @throws InterruptedException Exception during the retry
+     */
     public String getOperationStatusWithRetry(String operationStatusUrl) throws InterruptedException {
         String operationStatus = "";
         for (int i = 0; i < Integer.valueOf(refProp.getStringValue("dcae.dispatcher.retry.limit")); i++) {
@@ -81,7 +88,6 @@
 
     /**
      * Get the Operation Status from a specified URL.
-     *
      * @param statusUrl
      *        The URL provided by a previous DCAE Query
      * @return The status
@@ -112,7 +118,6 @@
 
     /**
      * Returns status URL for createNewDeployment operation.
-     *
      * @param deploymentId
      *        The deployment ID
      * @param serviceTypeId
@@ -150,7 +155,6 @@
 
     /***
      * Returns status URL for deleteExistingDeployment operation.
-     *
      * @param deploymentId
      *        The deployment ID
      * @param serviceTypeId
diff --git a/src/main/java/org/onap/clamp/clds/client/DcaeHttpConnectionManager.java b/src/main/java/org/onap/clamp/clds/client/DcaeHttpConnectionManager.java
index 8781fc3..30afddc 100644
--- a/src/main/java/org/onap/clamp/clds/client/DcaeHttpConnectionManager.java
+++ b/src/main/java/org/onap/clamp/clds/client/DcaeHttpConnectionManager.java
@@ -42,9 +42,7 @@
 import org.springframework.stereotype.Component;
 
 /**
- *
  * This class manages the HTTP and HTTPS connections to DCAE.
- *
  */
 @Component
 public class DcaeHttpConnectionManager {
diff --git a/src/main/java/org/onap/clamp/clds/client/DcaeInventoryServices.java b/src/main/java/org/onap/clamp/clds/client/DcaeInventoryServices.java
index e5ef3c6..ffd19d8 100644
--- a/src/main/java/org/onap/clamp/clds/client/DcaeInventoryServices.java
+++ b/src/main/java/org/onap/clamp/clds/client/DcaeInventoryServices.java
@@ -64,6 +64,9 @@
     private final CldsDao cldsDao;
     private final DcaeHttpConnectionManager dcaeHttpConnectionManager;
 
+    /**
+     * Constructor.
+     */
     @Autowired
     public DcaeInventoryServices(ClampProperties refProp, CldsDao cldsDao,
         DcaeHttpConnectionManager dcaeHttpConnectionManager) {
@@ -179,7 +182,6 @@
      */
     public DcaeInventoryResponse getDcaeInformation(String artifactName, String serviceUuid, String resourceUuid)
         throws IOException, ParseException, InterruptedException {
-        Date startTime = new Date();
         LoggingUtils.setTargetContext("DCAE", "getDcaeInformation");
         String queryString = "?asdcResourceId=" + resourceUuid + "&asdcServiceId=" + serviceUuid + "&typeName="
             + artifactName;
@@ -187,6 +189,7 @@
         logger.info("Dcae Inventory Service full url - " + fullUrl);
         DcaeInventoryResponse response = queryDcaeInventory(fullUrl);
         LoggingUtils.setResponseContext("0", "Get Dcae Information success", this.getClass().getName());
+        Date startTime = new Date();
         LoggingUtils.setTimeContext(startTime, new Date());
         return response;
     }
diff --git a/src/main/java/org/onap/clamp/clds/client/GuardPolicyDelegate.java b/src/main/java/org/onap/clamp/clds/client/GuardPolicyDelegate.java
index fb91d9c..a758716 100644
--- a/src/main/java/org/onap/clamp/clds/client/GuardPolicyDelegate.java
+++ b/src/main/java/org/onap/clamp/clds/client/GuardPolicyDelegate.java
@@ -76,7 +76,8 @@
         Policy policy = prop.getType(Policy.class);
         if (policy.isFound()) {
             for (PolicyChain policyChain : prop.getType(Policy.class).getPolicyChains()) {
-                for(PolicyItem policyItem:GuardPolicyAttributesConstructor.getAllPolicyGuardsFromPolicyChain(policyChain)) {
+                for (PolicyItem policyItem:GuardPolicyAttributesConstructor
+                        .getAllPolicyGuardsFromPolicyChain(policyChain)) {
                     prop.setCurrentModelElementId(policy.getId());
                     prop.setPolicyUniqueId(policyChain.getPolicyId());
                     prop.setGuardUniqueId(policyItem.getId());
diff --git a/src/main/java/org/onap/clamp/clds/client/GuardPolicyDeleteDelegate.java b/src/main/java/org/onap/clamp/clds/client/GuardPolicyDeleteDelegate.java
index 36eb147..941f519 100644
--- a/src/main/java/org/onap/clamp/clds/client/GuardPolicyDeleteDelegate.java
+++ b/src/main/java/org/onap/clamp/clds/client/GuardPolicyDeleteDelegate.java
@@ -70,7 +70,8 @@
         String eventAction = (String) camelExchange.getProperty("eventAction");
         if (!eventAction.equalsIgnoreCase(CldsEvent.ACTION_CREATE) && policy.isFound()) {
             for (PolicyChain policyChain : prop.getType(Policy.class).getPolicyChains()) {
-                for(PolicyItem policyItem:GuardPolicyAttributesConstructor.getAllPolicyGuardsFromPolicyChain(policyChain)) {
+                for (PolicyItem policyItem:GuardPolicyAttributesConstructor
+                        .getAllPolicyGuardsFromPolicyChain(policyChain)) {
                     prop.setCurrentModelElementId(policy.getId());
                     prop.setPolicyUniqueId(policyChain.getPolicyId());
                     prop.setGuardUniqueId(policyItem.getId());
diff --git a/src/main/java/org/onap/clamp/clds/client/OperationalPolicyDelegate.java b/src/main/java/org/onap/clamp/clds/client/OperationalPolicyDelegate.java
index 39377d4..307c8e5 100644
--- a/src/main/java/org/onap/clamp/clds/client/OperationalPolicyDelegate.java
+++ b/src/main/java/org/onap/clamp/clds/client/OperationalPolicyDelegate.java
@@ -79,8 +79,8 @@
         Policy policy = prop.getType(Policy.class);
         if (policy.isFound()) {
             for (PolicyChain policyChain : prop.getType(Policy.class).getPolicyChains()) {
-                Map<AttributeType, Map<String, String>> attributes = OperationalPolicyAttributesConstructor.formatAttributes(refProp,
-                    prop, prop.getType(Policy.class).getId(), policyChain);
+                Map<AttributeType, Map<String, String>> attributes = OperationalPolicyAttributesConstructor
+                    .formatAttributes(refProp,prop, prop.getType(Policy.class).getId(), policyChain);
                 responseMessage = policyClient.sendBrmsPolicy(attributes, prop, LoggingUtils.getRequestId());
             }
             if (responseMessage != null) {
diff --git a/src/main/java/org/onap/clamp/clds/client/req/policy/GuardPolicyAttributesConstructor.java b/src/main/java/org/onap/clamp/clds/client/req/policy/GuardPolicyAttributesConstructor.java
index f15d33d..bc82cb3 100644
--- a/src/main/java/org/onap/clamp/clds/client/req/policy/GuardPolicyAttributesConstructor.java
+++ b/src/main/java/org/onap/clamp/clds/client/req/policy/GuardPolicyAttributesConstructor.java
@@ -61,6 +61,11 @@
         return createAttributesMap(matchingAttributes);
     }
 
+    /**
+     * Get all the Guard policies from the policy chain.
+     * @param policyChain The policy chain
+     * @return The list of guard policies
+     */
     public static List<PolicyItem> getAllPolicyGuardsFromPolicyChain(PolicyChain policyChain) {
         List<PolicyItem> listItem = new ArrayList<>();
         for (PolicyItem policyItem : policyChain.getPolicyItems()) {
diff --git a/src/main/java/org/onap/clamp/clds/client/req/policy/OperationalPolicyAttributesConstructor.java b/src/main/java/org/onap/clamp/clds/client/req/policy/OperationalPolicyAttributesConstructor.java
index c28f700..af23626 100644
--- a/src/main/java/org/onap/clamp/clds/client/req/policy/OperationalPolicyAttributesConstructor.java
+++ b/src/main/java/org/onap/clamp/clds/client/req/policy/OperationalPolicyAttributesConstructor.java
@@ -59,6 +59,16 @@
     private OperationalPolicyAttributesConstructor() {
     }
 
+    /**
+     * Format the attributes.
+     * @param refProp The Clamp properties
+     * @param modelProperties The model properties
+     * @param modelElementId The model element ID
+     * @param policyChain The policy chain
+     * @return The attributes map
+     * @throws BuilderException Exception while building up the attributes map
+     * @throws UnsupportedEncodingException Unsupported encoding exception
+     */
     public static Map<AttributeType, Map<String, String>> formatAttributes(ClampProperties refProp,
         ModelProperties modelProperties,
         String modelElementId, PolicyChain policyChain)
@@ -75,7 +85,8 @@
         return createAttributesMap(matchingAttributes, ruleAttributes);
     }
 
-    private static Map<String, String> prepareRuleAttributes(ClampProperties clampProperties, ModelProperties modelProperties,
+    private static Map<String, String> prepareRuleAttributes(ClampProperties clampProperties, 
+        ModelProperties modelProperties,
         String modelElementId, PolicyChain policyChain, String globalService)
             throws BuilderException, UnsupportedEncodingException {
         logger.info("Preparing rule attributes...");
@@ -112,7 +123,8 @@
         return attributes;
     }
 
-    private static ImmutableMap<String, String> createRuleAttributesFromPolicy(ClampProperties refProp, ModelProperties modelProperties,
+    private static ImmutableMap<String, String> createRuleAttributesFromPolicy(ClampProperties refProp, 
+        ModelProperties modelProperties,
         String modelElementId, PolicyChain policyChain,
         String globalService, String operationTopic)
             throws BuilderException, UnsupportedEncodingException {
@@ -127,7 +139,8 @@
         }
     }
 
-    private static ImmutableMap<String, String> createRuleAttributesFromPolicyItem(PolicyItem policyItem, String recipeTopic) {
+    private static ImmutableMap<String, String> createRuleAttributesFromPolicyItem(PolicyItem policyItem, 
+        String recipeTopic) {
         logger.info("recipeTopic=" + recipeTopic);
         return ImmutableMap.<String, String>builder()
             .put(RECIPE_TOPIC, recipeTopic)
diff --git a/src/main/java/org/onap/clamp/clds/client/req/policy/OperationalPolicyYamlFormatter.java b/src/main/java/org/onap/clamp/clds/client/req/policy/OperationalPolicyYamlFormatter.java
index b9ed0c0..f2536b1 100644
--- a/src/main/java/org/onap/clamp/clds/client/req/policy/OperationalPolicyYamlFormatter.java
+++ b/src/main/java/org/onap/clamp/clds/client/req/policy/OperationalPolicyYamlFormatter.java
@@ -21,6 +21,7 @@
  * ===================================================================
  *
  */
+
 package org.onap.clamp.clds.client.req.policy;
 
 import com.att.eelf.configuration.EELFLogger;
@@ -61,12 +62,12 @@
     /**
      * Format Operational OpenLoop Policy yaml.
      *
-     * @param prop
-     * @param modelElementId
-     * @param policyChain
-     * @return
-     * @throws BuilderException
-     * @throws UnsupportedEncodingException
+     * @param prop The model properties
+     * @param modelElementId The model element ID
+     * @param policyChain The policy chain
+     * @return The operational openloop policy in yaml format
+     * @throws BuilderException The builder exception
+     * @throws UnsupportedEncodingException The unsupported encoding exception
      */
     public static String formatOpenLoopYaml(ModelProperties prop, String modelElementId, PolicyChain policyChain)
         throws BuilderException, UnsupportedEncodingException {
@@ -87,6 +88,15 @@
         return URLEncoder.encode(results.getSpecification(), "UTF-8");
     }
 
+    /**
+     * Format Operational Policy yaml.
+     * @param prop The model properties
+     * @param modelElementId The model element ID
+     * @param policyChain The policy chain
+     * @return The operational policy properties in yaml format
+     * @throws BuilderException The builder exception
+     * @throws UnsupportedEncodingException The unsupported encoding exception
+     */
     public static String formatYaml(ModelProperties prop, String modelElementId, PolicyChain policyChain)
         throws BuilderException, UnsupportedEncodingException {
         // get property objects
diff --git a/src/main/java/org/onap/clamp/clds/client/req/policy/PolicyClient.java b/src/main/java/org/onap/clamp/clds/client/req/policy/PolicyClient.java
index c705115..965c90f 100644
--- a/src/main/java/org/onap/clamp/clds/client/req/policy/PolicyClient.java
+++ b/src/main/java/org/onap/clamp/clds/client/req/policy/PolicyClient.java
@@ -519,7 +519,7 @@
     }
 
     /**
-     * Method to return correct policy name with prefix
+     * Method to return correct policy name with prefix.
      *
      * @param prop
      *        The ModelProperties
@@ -527,7 +527,7 @@
      *        Policy Prefix
      * @param policyNameWithPrefix
      *        Policy Name With Prefix
-     * @return
+     * @return The policy name with the prefix
      */
     protected String selectRightPolicyNameWithPrefix(ModelProperties prop, String policyPrefix,
         String policyNameWithPrefix) {
@@ -561,8 +561,8 @@
         deletePolicyParameters.setPdpGroup(refProp.getStringValue("policy.pdp.group"));
         deletePolicyParameters.setPolicyType(policyType);
         // send delete request
-        StringBuilder responseMessage = new StringBuilder(sendDeletePolicy(deletePolicyParameters, prop));
         logger.info("Deleting policy from PAP...");
+        StringBuilder responseMessage = new StringBuilder(sendDeletePolicy(deletePolicyParameters, prop));
         deletePolicyParameters.setPolicyComponent("PAP");
         deletePolicyParameters.setDeleteCondition(DeletePolicyCondition.ALL);
         // send delete request
@@ -605,7 +605,7 @@
     }
 
     /**
-     * Create a temp Tosca model file and perform import model to Policy Engine
+     * Create a temp Tosca model file and perform import model to Policy Engine.
      *
      * @param cldsToscaModel
      *        Policy model details
@@ -636,6 +636,7 @@
     }
 
     /**
+     * Import the model.
      * @param importParameters
      *        The ImportParameters
      * @return The response message from policy
@@ -671,6 +672,7 @@
     }
 
     /**
+     * Build file path for tosca file.
      * @param clampToscaPath
      *        Temp directory path for writing tosca files
      * @param toscaModelName
diff --git a/src/main/java/org/onap/clamp/loop/CsarInstallerImpl.java b/src/main/java/org/onap/clamp/loop/CsarInstallerImpl.java
index 6505288..fed2c65 100644
--- a/src/main/java/org/onap/clamp/loop/CsarInstallerImpl.java
+++ b/src/main/java/org/onap/clamp/loop/CsarInstallerImpl.java
@@ -216,7 +216,7 @@
 
     /**
      * ll get the latest version of the artifact (version can be specified to DCAE
-     * call)
+     * call).
      *
      * @return The DcaeInventoryResponse object containing the dcae values
      */
diff --git a/src/main/java/org/onap/clamp/loop/Loop.java b/src/main/java/org/onap/clamp/loop/Loop.java
index 473364a..64e0108 100644
--- a/src/main/java/org/onap/clamp/loop/Loop.java
+++ b/src/main/java/org/onap/clamp/loop/Loop.java
@@ -57,7 +57,7 @@
 public class Loop implements Serializable {
 
     /**
-     *
+     * The serial version id.
      */
     private static final long serialVersionUID = -286522707701388642L;
 
@@ -105,7 +105,8 @@
 
     @Expose
     @ManyToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
-    @JoinTable(name = "loops_microservicepolicies", joinColumns = @JoinColumn(name = "loop_id"), inverseJoinColumns = @JoinColumn(name = "microservicepolicy_id"))
+    @JoinTable(name = "loops_microservicepolicies", joinColumns = @JoinColumn(name = "loop_id"), 
+       inverseJoinColumns = @JoinColumn(name = "microservicepolicy_id"))
     private Set<MicroServicePolicy> microServicePolicies = new HashSet<>();
 
     @Expose
@@ -115,6 +116,9 @@
     public Loop() {
     }
 
+    /**
+     * Constructor.
+     */
     public Loop(String name, String blueprint, String svgRepresentation) {
         this.name = name;
         this.svgRepresentation = svgRepresentation;
@@ -234,6 +238,14 @@
         this.modelPropertiesJson = modelPropertiesJson;
     }
 
+    /**
+     * Generate the loop name.
+     * @param serviceName The service name
+     * @param serviceVersion The service version
+     * @param resourceName The resource name
+     * @param blueprintFileName The blueprint file name
+     * @return The generated loop name
+     */
     public static String generateLoopName(String serviceName, String serviceVersion, String resourceName,
         String blueprintFilename) {
         StringBuilder buffer = new StringBuilder("LOOP_").append(serviceName).append("_v").append(serviceVersion)
@@ -251,18 +263,23 @@
 
     @Override
     public boolean equals(Object obj) {
-        if (this == obj)
+        if (this == obj) {
             return true;
-        if (obj == null)
+        }
+        if (obj == null) {
             return false;
-        if (getClass() != obj.getClass())
+        }
+        if (getClass() != obj.getClass()) {
             return false;
+        }
         Loop other = (Loop) obj;
         if (name == null) {
-            if (other.name != null)
+            if (other.name != null) {
                 return false;
-        } else if (!name.equals(other.name))
+            }
+        } else if (!name.equals(other.name)) {
             return false;
+        }
         return true;
     }
 
diff --git a/src/main/java/org/onap/clamp/loop/LoopController.java b/src/main/java/org/onap/clamp/loop/LoopController.java
index 8b64e9d..a02fa93 100644
--- a/src/main/java/org/onap/clamp/loop/LoopController.java
+++ b/src/main/java/org/onap/clamp/loop/LoopController.java
@@ -42,9 +42,9 @@
 
     private final LoopService loopService;
     private static final Type OPERATIONAL_POLICY_TYPE = new TypeToken<List<OperationalPolicy>>() {
-    }.getType();
+       }.getType();
     private static final Type MICROSERVICE_POLICY_TYPE = new TypeToken<List<MicroServicePolicy>>() {
-    }.getType();
+       }.getType();
 
     @Autowired
     public LoopController(LoopService loopService) {
@@ -59,26 +59,55 @@
         return loopService.getLoop(loopName);
     }
 
+    /**
+     * Update the Operational Policy properties.
+     * @param loopName The loop name
+     * @param operationalPoliciesJson The new Operational Policy properties
+     * @return The updated loop
+     */
     public Loop updateOperationalPolicies(String loopName, JsonArray operationalPoliciesJson) {
         List<OperationalPolicy> operationalPolicies = JsonUtils.GSON
             .fromJson(operationalPoliciesJson, OPERATIONAL_POLICY_TYPE);
         return loopService.updateAndSaveOperationalPolicies(loopName, operationalPolicies);
     }
 
+    /**
+     * Update the whole array of MicroService policies properties
+     * @param loopName The loop name
+     * @param microServicePoliciesJson The array of all MicroService policies properties
+     * @return The updated loop
+     */
     public Loop updateMicroservicePolicies(String loopName, JsonArray microServicePoliciesJson) {
         List<MicroServicePolicy> microservicePolicies = JsonUtils.GSON
             .fromJson(microServicePoliciesJson, MICROSERVICE_POLICY_TYPE);
         return loopService.updateAndSaveMicroservicePolicies(loopName, microservicePolicies);
     }
 
-    public Loop updateGlobalPropertiesJson(String loopName, JsonObject globalProperties){
+    /**
+     * Update the global properties
+     * @param loopName The loop name
+     * @param globalProperties The updated global properties
+     * @return The updated loop
+     */
+    public Loop updateGlobalPropertiesJson(String loopName, JsonObject globalProperties) {
         return loopService.updateAndSaveGlobalPropertiesJson(loopName, globalProperties);
     }
 
+    /**
+     * Update one MicroService policy properties
+     * @param loopName The loop name
+     * @param newMicroservicePolicy The new MicroService policy properties
+     * @return The updated MicroService policy
+     */
     public MicroServicePolicy updateMicroservicePolicy(String loopName, MicroServicePolicy newMicroservicePolicy) {
         return loopService.updateMicroservicePolicy(loopName, newMicroservicePolicy);
     }
 
+    /**
+     * Get the SVG representation of the loop
+     * @param loopName The loop name
+     * @return The SVG representation
+     */
     public String getSVGRepresentation(String loopName) {
         return loopService.getClosedLoopModelSVG(loopName);
 
diff --git a/src/main/java/org/onap/clamp/loop/LoopService.java b/src/main/java/org/onap/clamp/loop/LoopService.java
index 051ab6e..b499573 100644
--- a/src/main/java/org/onap/clamp/loop/LoopService.java
+++ b/src/main/java/org/onap/clamp/loop/LoopService.java
@@ -25,13 +25,15 @@
 
 import java.util.List;
 import java.util.Set;
-import javax.persistence.EntityNotFoundException;
 
 import com.google.gson.JsonObject;
-import org.onap.clamp.policy.microservice.MicroservicePolicyService;
-import org.onap.clamp.policy.operational.OperationalPolicyService;
+
+import javax.persistence.EntityNotFoundException;
+
 import org.onap.clamp.policy.microservice.MicroServicePolicy;
+import org.onap.clamp.policy.microservice.MicroservicePolicyService;
 import org.onap.clamp.policy.operational.OperationalPolicy;
+import org.onap.clamp.policy.operational.OperationalPolicyService;
 import org.springframework.stereotype.Service;
 
 @Service
@@ -41,6 +43,9 @@
     private final MicroservicePolicyService microservicePolicyService;
     private final OperationalPolicyService operationalPolicyService;
 
+    /**
+     * Constructor.
+     */
     public LoopService(LoopsRepository loopsRepository,
         MicroservicePolicyService microservicePolicyService,
         OperationalPolicyService operationalPolicyService) {
@@ -57,7 +62,7 @@
         return loopsRepository.getAllLoopNames();
     }
 
-    Loop getLoop(String loopName){
+    Loop getLoop(String loopName) {
         return loopsRepository
             .findById(loopName)
             .orElse(null);
@@ -87,7 +92,7 @@
     }
 
     MicroServicePolicy updateMicroservicePolicy(String loopName, MicroServicePolicy newMicroservicePolicy) {
-    	Loop loop = findClosedLoopByName(loopName);
+        Loop loop = findClosedLoopByName(loopName);
         MicroServicePolicy newPolicies = microservicePolicyService
                 .getAndUpdateMicroServicePolicy(loop, newMicroservicePolicy);
         return newPolicies;
diff --git a/src/main/java/org/onap/clamp/loop/log/LoopLog.java b/src/main/java/org/onap/clamp/loop/log/LoopLog.java
index 7b7fe1b..0c51c0c 100644
--- a/src/main/java/org/onap/clamp/loop/log/LoopLog.java
+++ b/src/main/java/org/onap/clamp/loop/log/LoopLog.java
@@ -43,7 +43,6 @@
 import org.onap.clamp.loop.Loop;
 
 /**
- *
  * This class holds the logs created by the Clamp Backend. The Instant is always
  * rounded to the nearest second as the nano seconds can't be stored in the
  * database. The logs can be therefore exposed to the UI or the client doing
@@ -54,7 +53,7 @@
 @Table(name = "loop_logs")
 public class LoopLog implements Serializable {
     /**
-     *
+     * The serial version ID.
      */
     private static final long serialVersionUID = 1988276670074437631L;
 
@@ -130,18 +129,23 @@
 
     @Override
     public boolean equals(Object obj) {
-        if (this == obj)
+        if (this == obj) {
             return true;
-        if (obj == null)
+        }
+        if (obj == null) {
             return false;
-        if (getClass() != obj.getClass())
+        }
+        if (getClass() != obj.getClass()) {
             return false;
+        }
         LoopLog other = (LoopLog) obj;
         if (id == null) {
-            if (other.id != null)
+            if (other.id != null) {
                 return false;
-        } else if (!id.equals(other.id))
+            }
+        } else if (!id.equals(other.id)) {
             return false;
+        }
         return true;
     }
 
diff --git a/src/main/java/org/onap/clamp/policy/Policy.java b/src/main/java/org/onap/clamp/policy/Policy.java
index c104b13..683881b 100644
--- a/src/main/java/org/onap/clamp/policy/Policy.java
+++ b/src/main/java/org/onap/clamp/policy/Policy.java
@@ -31,6 +31,15 @@
 
     JsonObject getJsonRepresentation();
 
+    /**
+     * Generate the policy name.
+     * @param policyType The policy type
+     * @param serviceName The service name
+     * @param serviceVersion The service version
+     * @param resourceName The resource name
+     * @param blueprintFilename The blueprint file name
+     * @return The generated policy name
+     */
     static String generatePolicyName(String policyType, String serviceName, String serviceVersion, String resourceName,
         String blueprintFilename) {
         StringBuilder buffer = new StringBuilder(policyType).append("_").append(serviceName).append("_v")
diff --git a/src/main/java/org/onap/clamp/policy/microservice/MicroServicePolicy.java b/src/main/java/org/onap/clamp/policy/microservice/MicroServicePolicy.java
index 857a3d7..3962a3d 100644
--- a/src/main/java/org/onap/clamp/policy/microservice/MicroServicePolicy.java
+++ b/src/main/java/org/onap/clamp/policy/microservice/MicroServicePolicy.java
@@ -50,7 +50,7 @@
 @TypeDefs({ @TypeDef(name = "json", typeClass = StringJsonUserType.class) })
 public class MicroServicePolicy implements Serializable, Policy {
     /**
-     *
+     * The serial version ID.
      */
     private static final long serialVersionUID = 6271238288583332616L;
 
@@ -83,6 +83,13 @@
         // serialization
     }
 
+    /**
+     * The constructor.
+     * @param name The name of the MicroService
+     * @param policyTosca The policy Tosca of the MicroService
+     * @param shared The flag indicate whether the MicroService is shared
+     * @param usedByLoops The list of loops that uses this MicroService
+     */
     public MicroServicePolicy(String name, String policyTosca, Boolean shared, Set<Loop> usedByLoops) {
         this.name = name;
         this.policyTosca = policyTosca;
@@ -92,6 +99,14 @@
         this.usedByLoops = usedByLoops;
     }
 
+    /**
+     * The constructor.
+     * @param name The name of the MicroService
+     * @param policyTosca The policy Tosca of the MicroService
+     * @param shared The flag indicate whether the MicroService is shared
+     * @param jsonRepresentation The UI representation in json format
+     * @param usedByLoops The list of loops that uses this MicroService
+     */
     public MicroServicePolicy(String name, String policyTosca, Boolean shared, JsonObject jsonRepresentation,
         Set<Loop> usedByLoops) {
         this.name = name;
@@ -157,18 +172,23 @@
 
     @Override
     public boolean equals(Object obj) {
-        if (this == obj)
+        if (this == obj) {
             return true;
-        if (obj == null)
+        }
+        if (obj == null) {
             return false;
-        if (getClass() != obj.getClass())
+        }
+        if (getClass() != obj.getClass()) {
             return false;
+        }
         MicroServicePolicy other = (MicroServicePolicy) obj;
         if (name == null) {
-            if (other.name != null)
+            if (other.name != null) {
                 return false;
-        } else if (!name.equals(other.name))
+            }
+        } else if (!name.equals(other.name)) {
             return false;
+        }
         return true;
     }
 
diff --git a/src/main/java/org/onap/clamp/policy/microservice/MicroservicePolicyService.java b/src/main/java/org/onap/clamp/policy/microservice/MicroservicePolicyService.java
index ee9ba53..f473d16 100644
--- a/src/main/java/org/onap/clamp/policy/microservice/MicroservicePolicyService.java
+++ b/src/main/java/org/onap/clamp/policy/microservice/MicroservicePolicyService.java
@@ -57,6 +57,12 @@
         return repository.existsById(policyName);
     }
 
+    /**
+     * Get and update the MicroService policy properties.
+     * @param loop The loop
+     * @param policy The new MicroService policy
+     * @return The updated MicroService policy
+     */
     @Transactional
     public MicroServicePolicy getAndUpdateMicroServicePolicy(Loop loop, MicroServicePolicy policy) {
         return repository.findById(policy.getName()).map(p -> updateMicroservicePolicyProperties(p, policy, loop))
diff --git a/src/main/java/org/onap/clamp/policy/operational/OperationalPolicy.java b/src/main/java/org/onap/clamp/policy/operational/OperationalPolicy.java
index 033b539..c1e075d 100644
--- a/src/main/java/org/onap/clamp/policy/operational/OperationalPolicy.java
+++ b/src/main/java/org/onap/clamp/policy/operational/OperationalPolicy.java
@@ -38,16 +38,16 @@
 import org.hibernate.annotations.Type;
 import org.hibernate.annotations.TypeDef;
 import org.hibernate.annotations.TypeDefs;
+import org.onap.clamp.dao.model.jsontype.StringJsonUserType;
 import org.onap.clamp.loop.Loop;
 import org.onap.clamp.policy.Policy;
-import org.onap.clamp.dao.model.jsontype.StringJsonUserType;
 
 @Entity
 @Table(name = "operational_policies")
 @TypeDefs({ @TypeDef(name = "json", typeClass = StringJsonUserType.class) })
 public class OperationalPolicy implements Serializable, Policy {
     /**
-     *
+     * The serial version ID.
      */
     private static final long serialVersionUID = 6117076450841538255L;
 
@@ -69,6 +69,12 @@
         //Serialization
     }
 
+    /**
+     * The constructor.
+     * @param name The name of the operational policy
+     * @param loop The loop that uses this operational policy
+     * @param configurationsJson The operational policy property in the format of json
+     */
     public OperationalPolicy(String name, Loop loop, JsonObject configurationsJson) {
         this.name = name;
         this.loop = loop;
@@ -83,7 +89,7 @@
         this.loop = loopName;
     }
 
-    public Loop getLoop(){
+    public Loop getLoop() {
         return loop;
     }
 
@@ -110,18 +116,23 @@
 
     @Override
     public boolean equals(Object obj) {
-        if (this == obj)
+        if (this == obj) {
             return true;
-        if (obj == null)
+        }
+        if (obj == null) {
             return false;
-        if (getClass() != obj.getClass())
+        }
+        if (getClass() != obj.getClass()) {
             return false;
+        }
         OperationalPolicy other = (OperationalPolicy) obj;
         if (name == null) {
-            if (other.name != null)
+            if (other.name != null) {
                 return false;
-        } else if (!name.equals(other.name))
+            }
+        } else if (!name.equals(other.name)) {
             return false;
+        }
         return true;
     }
 
diff --git a/src/main/java/org/onap/clamp/policy/operational/OperationalPolicyService.java b/src/main/java/org/onap/clamp/policy/operational/OperationalPolicyService.java
index b24a2db..95f4f7b 100644
--- a/src/main/java/org/onap/clamp/policy/operational/OperationalPolicyService.java
+++ b/src/main/java/org/onap/clamp/policy/operational/OperationalPolicyService.java
@@ -27,8 +27,8 @@
 import java.util.List;
 import java.util.Set;
 import java.util.stream.Collectors;
-import org.onap.clamp.policy.PolicyService;
 import org.onap.clamp.loop.Loop;
+import org.onap.clamp.policy.PolicyService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
diff --git a/src/main/java/org/onap/clamp/util/PrincipalUtils.java b/src/main/java/org/onap/clamp/util/PrincipalUtils.java
index ec08983..d6b20f3 100644
--- a/src/main/java/org/onap/clamp/util/PrincipalUtils.java
+++ b/src/main/java/org/onap/clamp/util/PrincipalUtils.java
@@ -40,7 +40,7 @@
     /**
      * Get the Full name.
      *
-     * @return
+     * @return The user name
      */
     public static String getUserName() {
         String name = userNameHandler.retrieveUserName(securityContext);
@@ -53,7 +53,7 @@
     /**
      * Get the userId from AAF/CSP.
      *
-     * @return
+     * @return The user ID
      */
     public static String getUserId() {
         return getUserName();
@@ -62,7 +62,7 @@
     /**
      * Get the principal name.
      *
-     * @return
+     * @return The principal name
      */
     public static String getPrincipalName() {
         String principal = ((UserDetails)securityContext.getAuthentication().getPrincipal()).getUsername();
@@ -72,6 +72,7 @@
         }
         return name;
     }
+
     public static void setSecurityContext(SecurityContext securityContext) {
         PrincipalUtils.securityContext = securityContext;
     }
