diff --git a/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeServlet.java b/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeServlet.java
index 9ddbc25..5f85139 100644
--- a/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeServlet.java
+++ b/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeServlet.java
@@ -69,18 +69,15 @@
         .getLogger("org.onap.dmaap.datarouter.node.NodeServlet");
 
     static {
-        try {
-            final String ws = "\\s*";
-            // assume that \\ and \" have been replaced by X
-            final String string = "\"[^\"]*\"";
-            //String string = "\"(?:[^\"\\\\]|\\\\.)*\"";
-            final String number = "[+-]?(?:\\.\\d+|(?:0|[1-9]\\d*)(?:\\.\\d*)?)(?:[eE][+-]?\\d+)?";
-            final String value = "(?:" + string + "|" + number + "|null|true|false)";
-            final String item = string + ws + ":" + ws + value + ws;
-            final String object = ws + "\\{" + ws + "(?:" + item + "(?:" + "," + ws + item + ")*)?\\}" + ws;
-            MetaDataPattern = Pattern.compile(object, Pattern.DOTALL);
-        } catch (Exception e) {
-        }
+        final String ws = "\\s*";
+        // assume that \\ and \" have been replaced by X
+        final String string = "\"[^\"]*\"";
+        //String string = "\"(?:[^\"\\\\]|\\\\.)*\"";
+        final String number = "[+-]?(?:\\.\\d+|(?:0|[1-9]\\d*)(?:\\.\\d*)?)(?:[eE][+-]?\\d+)?";
+        final String value = "(?:" + string + "|" + number + "|null|true|false)";
+        final String item = string + ws + ":" + ws + value + ws;
+        final String object = ws + "\\{" + ws + "(?:" + item + "(?:" + "," + ws + item + ")*)?\\}" + ws;
+        MetaDataPattern = Pattern.compile(object, Pattern.DOTALL);
     }
 
     /**
diff --git a/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeUtils.java b/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeUtils.java
index 2c013ca..d5b15bc 100644
--- a/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeUtils.java
+++ b/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeUtils.java
@@ -53,12 +53,6 @@
     private static EELFLogger eelfLogger = EELFManager.getInstance()
         .getLogger("org.onap.dmaap.datarouter.node.NodeUtils");
     private static Logger nodeUtilsLogger = Logger.getLogger("org.onap.dmaap.datarouter.node.NodeUtils");
-    private static SimpleDateFormat logDate;
-
-    static {
-        logDate = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
-        logDate.setTimeZone(TimeZone.getTimeZone("GMT"));
-    }
 
     private NodeUtils() {
     }
@@ -241,6 +235,8 @@
      * Format a logging timestamp as yyyy-mm-ddThh:mm:ss.mmmZ
      */
     public static synchronized String logts(Date when) {
+        SimpleDateFormat logDate = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
+        logDate.setTimeZone(TimeZone.getTimeZone("GMT"));
         return (logDate.format(when));
     }
 
diff --git a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/InternalServlet.java b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/InternalServlet.java
index c35978b..685d552 100644
--- a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/InternalServlet.java
+++ b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/InternalServlet.java
@@ -156,6 +156,7 @@
 @SuppressWarnings("serial")
 public class InternalServlet extends ProxyServlet {
 
+    private static final Object lock = new Object();
     private static Integer logseq = 0; // another piece of info to make log spool file names unique
     //Adding EELF Logger Rally:US664892
     private static EELFLogger eelflogger = EELFManager.getInstance()
@@ -454,7 +455,7 @@
             }
             String spooldir = (new DB()).getProperties().getProperty("org.onap.dmaap.datarouter.provserver.spooldir");
             String spoolname = String.format("%d-%d-", System.currentTimeMillis(), Thread.currentThread().getId());
-            synchronized (logseq) {
+            synchronized (lock) {
                 // perhaps unnecessary, but it helps make the name unique
                 spoolname += logseq.toString();
                 logseq++;
diff --git a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/Poker.java b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/Poker.java
index f2c511c..563e6f7 100644
--- a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/Poker.java
+++ b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/Poker.java
@@ -64,6 +64,8 @@
      */
     private static final String POKE_URL_TEMPLATE = "http://%s/internal/fetchProv";
 
+    private static final Object lock = new Object();
+
     /**
      * This is a singleton -- there is only one Poker object in the server
      */
@@ -109,7 +111,7 @@
      * @param t2 the second timer set the outer bound on how long to wait.  It cannot be reset.
      */
     public void setTimers(long t1, long t2) {
-        synchronized (thisPod) {
+        synchronized (lock) {
             if (timer1 == 0 || t1 > timer1) {
                 timer1 = t1;
             }
@@ -144,7 +146,7 @@
             if (timer1 > 0) {
                 long now = System.currentTimeMillis();
                 boolean fire = false;
-                synchronized (thisPod) {
+                synchronized (lock) {
                     if (now > timer1 || now > timer2) {
                         timer1 = timer2 = 0;
                         fire = true;
diff --git a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/PublishServlet.java b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/PublishServlet.java
index d500bb3..0550276 100644
--- a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/PublishServlet.java
+++ b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/PublishServlet.java
@@ -64,6 +64,7 @@
     private List<IngressRoute> irt;
     //Adding EELF Logger Rally:US664892
     private static EELFLogger eelflogger = EELFManager.getInstance().getLogger("org.onap.dmaap.datarouter.provisioning.PublishServlet");
+    private static final Object lock = new Object();
 
 
     @Override
@@ -138,7 +139,7 @@
         // Check to see if the IRT needs to be updated
         Poker p = Poker.getPoker();
         String s = p.getProvisioningString();
-        synchronized (provstring) {
+        synchronized (lock) {
             if (irt == null || (s.length() != provstring.length()) || !s.equals(provstring)) {
                 // Provisioning string has changed -- update the IRT
                 provstring = s;
diff --git a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/StatisticsServlet.java b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/StatisticsServlet.java
index 3902dc6..b77062f 100755
--- a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/StatisticsServlet.java
+++ b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/StatisticsServlet.java
@@ -546,10 +546,8 @@
       intlogger.debug(filterQuery);
       long start = System.currentTimeMillis();
       DB db = new DB();
-      ResultSet rs = null;
       try (Connection conn = db.getConnection()) {
-        try (PreparedStatement pst = conn.prepareStatement(filterQuery)) {
-          rs = pst.executeQuery();
+        try (ResultSet rs = conn.prepareStatement(filterQuery).executeQuery()) {
           if (outputType.equals("csv")) {
             resp.setContentType("application/octet-stream");
             Date date = new Date();
diff --git a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/utils/LOGJSONObject.java b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/utils/LOGJSONObject.java
index dec3cc1..1518859 100644
--- a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/utils/LOGJSONObject.java
+++ b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/utils/LOGJSONObject.java
@@ -1446,7 +1446,7 @@
         try {
             return this.toString(0);
         } catch (Exception e) {
-            return null;
+            return "";
         }
     }
 
@@ -1495,7 +1495,7 @@
      */
     @SuppressWarnings("unchecked")
     public static String valueToString(Object value) throws JSONException {
-        if (value == null || value.equals(null)) {
+        if (value == null) {
             return "null";
         }
         if (value instanceof JSONString) {
@@ -1601,7 +1601,7 @@
     @SuppressWarnings("unchecked")
     static final Writer writeValue(Writer writer, Object value,
                                    int indentFactor, int indent) throws JSONException, IOException {
-        if (value == null || value.equals(null)) {
+        if (value == null) {
             writer.write("null");
         } else if (value instanceof LOGJSONObject) {
             ((LOGJSONObject) value).write(writer, indentFactor, indent);
diff --git a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/utils/URLUtilities.java b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/utils/URLUtilities.java
index 4576bd2..d0178fd 100644
--- a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/utils/URLUtilities.java
+++ b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/utils/URLUtilities.java
@@ -115,7 +115,7 @@
     public static String generatePeerLogsURL() {
         //Fixes for Itrack ticket - DATARTR-4#Fixing if only one Prov is configured, not to give exception to fill logs.
         String peerPodUrl = getPeerPodName();
-        if (peerPodUrl.equals("") || peerPodUrl==null) {
+        if (peerPodUrl == null || peerPodUrl.equals("")) {
             return "";
         }
 
diff --git a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/reports/FeedReport.java b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/reports/FeedReport.java
index 4346a0e..fe9c460 100644
--- a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/reports/FeedReport.java
+++ b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/reports/FeedReport.java
@@ -72,36 +72,12 @@
            try( PreparedStatement ps = conn.prepareStatement(SELECT_SQL)) {
                try (ResultSet rs = ps.executeQuery()) {
                    while (rs.next()) {
-                       if (alg1) {
-                           String date = rs.getString("date");
-                           String type = rs.getString("type");
-                           int feedid = rs.getInt("feedid");
-                           int subid = type.equals("del") ? rs.getInt("delivery_subid") : 0;
-                           int count = rs.getInt("count");
-                           sb.append(date + "," + type + "," + feedid + "," + subid + "," + count + "\n");
-                       } else {
-                           String date = rs.getString("date");
-                           JSONObject datemap = jo.optJSONObject(date);
-                           if (datemap == null) {
-                               datemap = new JSONObject();
-                               jo.put(date, datemap);
-                           }
-                           int feed = rs.getInt("FEEDID");
-                           JSONObject feedmap = datemap.optJSONObject("" + feed);
-                           if (feedmap == null) {
-                               feedmap = new JSONObject();
-                               feedmap.put("pubcount", 0);
-                               datemap.put("" + feed, feedmap);
-                           }
-                           String type = rs.getString("TYPE");
-                           int count = rs.getInt("count");
-                           if (type.equals("pub")) {
-                               feedmap.put("pubcount", count);
-                           } else if (type.equals("del")) {
-                               String subid = "" + rs.getInt("DELIVERY_SUBID");
-                               feedmap.put(subid, count);
-                           }
-                       }
+                       String date = rs.getString("date");
+                       String type = rs.getString("type");
+                       int feedid = rs.getInt("feedid");
+                       int subid = type.equals("del") ? rs.getInt("delivery_subid") : 0;
+                       int count = rs.getInt("count");
+                       sb.append(date + "," + type + "," + feedid + "," + subid + "," + count + "\n");
                    }
                }
            }
@@ -110,15 +86,9 @@
             e.printStackTrace();
         }
         logger.debug("Query time: " + (System.currentTimeMillis() - start) + " ms");
-        try {
-            PrintWriter os = new PrintWriter(outfile);
-            if (alg1) {
-                os.print("date,type,feedid,subid,count\n");
-                os.print(sb.toString());
-            } else {
-                os.println(toHTML(jo));
-            }
-            os.close();
+        try (PrintWriter os = new PrintWriter(outfile)) {
+            os.print("date,type,feedid,subid,count\n");
+            os.print(sb.toString());
         } catch (FileNotFoundException e) {
             System.err.println("File cannot be written: " + outfile);
         }
diff --git a/datarouter-subscriber/src/main/java/org/onap/dmaap/datarouter/subscriber/SampleSubscriberServlet.java b/datarouter-subscriber/src/main/java/org/onap/dmaap/datarouter/subscriber/SampleSubscriberServlet.java
index 58bc4c4..3842574 100644
--- a/datarouter-subscriber/src/main/java/org/onap/dmaap/datarouter/subscriber/SampleSubscriberServlet.java
+++ b/datarouter-subscriber/src/main/java/org/onap/dmaap/datarouter/subscriber/SampleSubscriberServlet.java
@@ -38,8 +38,8 @@
 
   private static Logger logger =
       Logger.getLogger("org.onap.dmaap.datarouter.subscriber.SampleSubscriberServlet");
-  private String outputDirectory;
-  private String basicAuth;
+  private static String outputDirectory;
+  private static String basicAuth;
 
   /**
    * Configure the SampleSubscriberServlet.
