diff --git a/conf/checkstyle/onos_suppressions.xml b/conf/checkstyle/onos_suppressions.xml
index a32b222..9728687 100644
--- a/conf/checkstyle/onos_suppressions.xml
+++ b/conf/checkstyle/onos_suppressions.xml
@@ -12,6 +12,10 @@
     <suppress files="org.openflow.*" checks="[_a-zA-Z0-9]*"/>
     <suppress files="net.onrc.onos.core.datastore.serializers.*" checks="[_a-zA-Z0-9]*"/>
 
+    <!-- BigSwitch packet code is designed to use parameter names that override
+         local member names -->
+    <suppress files="net.onrc.onos.core.packet.*" checks="HiddenField"/>
+
     <suppress files=".*" checks="FinalParametersCheck"/>
     <suppress files=".*" checks="MagicNumbersCheck"/>
     <suppress files=".*" checks="DesignForExtensionCheck"/>
diff --git a/conf/checkstyle/sun_checks.xml b/conf/checkstyle/sun_checks.xml
index 412842c..9460b7c 100644
--- a/conf/checkstyle/sun_checks.xml
+++ b/conf/checkstyle/sun_checks.xml
@@ -88,8 +88,13 @@
     <!--   <property name="fileExtensions" value="java"/> -->
     <!-- </module> -->
 
+    <module name="SuppressionCommentFilter">
+       <property name="offCommentFormat" value="CHECKSTYLE:OFF"/>
+       <property name="onCommentFormat" value="CHECKSTYLE:ON"/>
+    </module>
     <module name="TreeWalker">
 
+        <module name="FileContentsHolder"/>
         <!-- Checks for Javadoc comments.                     -->
         <!-- See http://checkstyle.sf.net/config_javadoc.html -->
         <module name="JavadocMethod">
@@ -196,7 +201,8 @@
         <module name="EqualsHashCode"/>
 
         <module name="HiddenField">
-          <property name="severity" value="warning"/>
+          <property name="ignoreSetter" value="true"/>
+	  <property name="ignoreConstructorParameter" value="true"/>
         </module>
 
         <module name="IllegalInstantiation"/>
diff --git a/src/main/java/net/onrc/onos/apps/bgproute/BgpRoute.java b/src/main/java/net/onrc/onos/apps/bgproute/BgpRoute.java
index 303f198..78f7a61 100644
--- a/src/main/java/net/onrc/onos/apps/bgproute/BgpRoute.java
+++ b/src/main/java/net/onrc/onos/apps/bgproute/BgpRoute.java
@@ -90,7 +90,8 @@
 
     private String bgpdRestIp;
     private String routerId;
-    private String configFilename = "config.json";
+    private static final String DEFAULT_CONFIG_FILENAME = "config.json";
+    private String currentConfigFilename = DEFAULT_CONFIG_FILENAME;
 
     private static final short ARP_PRIORITY = 20;
 
@@ -309,11 +310,11 @@
 
         String configFilenameParameter = context.getConfigParams(this).get("configfile");
         if (configFilenameParameter != null) {
-            configFilename = configFilenameParameter;
+            currentConfigFilename = configFilenameParameter;
         }
-        log.debug("Config file set to {}", configFilename);
+        log.debug("Config file set to {}", currentConfigFilename);
 
-        readConfiguration(configFilename);
+        readConfiguration(currentConfigFilename);
     }
 
     @Override
@@ -356,7 +357,7 @@
         response = response.replaceAll("\"", "'");
         JSONObject jsonObj = (JSONObject) JSONSerializer.toJSON(response);
         JSONArray ribArray = jsonObj.getJSONArray("rib");
-        String routerId = jsonObj.getString("router-id");
+        String inboundRouterId = jsonObj.getString("router-id");
 
         int size = ribArray.size();
 
@@ -383,7 +384,7 @@
                 continue;
             }
 
-            RibEntry rib = new RibEntry(routerId, nexthop);
+            RibEntry rib = new RibEntry(inboundRouterId, nexthop);
 
             try {
                 ribUpdates.put(new RibUpdate(Operation.UPDATE, p, rib));
diff --git a/src/main/java/net/onrc/onos/apps/bgproute/Prefix.java b/src/main/java/net/onrc/onos/apps/bgproute/Prefix.java
index 0d297bf..49bbcac 100644
--- a/src/main/java/net/onrc/onos/apps/bgproute/Prefix.java
+++ b/src/main/java/net/onrc/onos/apps/bgproute/Prefix.java
@@ -50,10 +50,11 @@
         }
     }
 
-    private byte[] canonicalizeAddress(byte[] address, int prefixLength) {
-        byte[] result = new byte[address.length];
+    private byte[] canonicalizeAddress(byte[] addressValue,
+                                       int prefixLengthValue) {
+        byte[] result = new byte[addressValue.length];
 
-        if (prefixLength == 0) {
+        if (prefixLengthValue == 0) {
             for (int i = 0; i < MAX_BYTES; i++) {
                 result[i] = 0;
             }
@@ -61,18 +62,18 @@
             return result;
         }
 
-        result = Arrays.copyOf(address, address.length);
+        result = Arrays.copyOf(addressValue, addressValue.length);
 
         //Set all bytes after the end of the prefix to 0
-        int lastByteIndex = (prefixLength - 1) / Byte.SIZE;
+        int lastByteIndex = (prefixLengthValue - 1) / Byte.SIZE;
         for (int i = lastByteIndex; i < MAX_BYTES; i++) {
             result[i] = 0;
         }
 
-        byte lastByte = address[lastByteIndex];
+        byte lastByte = addressValue[lastByteIndex];
         byte mask = 0;
         byte msb = (byte) 0x80;
-        int lastBit = (prefixLength - 1) % Byte.SIZE;
+        int lastBit = (prefixLengthValue - 1) % Byte.SIZE;
         for (int i = 0; i < Byte.SIZE; i++) {
             if (i <= lastBit) {
                 mask |= (msb >> i);
diff --git a/src/main/java/net/onrc/onos/core/datastore/topology/KVDevice.java b/src/main/java/net/onrc/onos/core/datastore/topology/KVDevice.java
index 5552f59..cfdb02b 100644
--- a/src/main/java/net/onrc/onos/core/datastore/topology/KVDevice.java
+++ b/src/main/java/net/onrc/onos/core/datastore/topology/KVDevice.java
@@ -143,9 +143,9 @@
         this.isPortIdsModified = true;
     }
 
-    public void addAllToPortIds(final Collection<byte[]> portIds) {
+    public void addAllToPortIds(final Collection<byte[]> newPortIds) {
         // TODO: Should we copy portId, or reference is OK.
-        isPortIdsModified |= this.portIds.addAll(portIds);
+        isPortIdsModified |= portIds.addAll(newPortIds);
     }
 
     /**
diff --git a/src/main/java/net/onrc/onos/core/datastore/utils/KVObject.java b/src/main/java/net/onrc/onos/core/datastore/utils/KVObject.java
index 94f509f..2efa0b0 100644
--- a/src/main/java/net/onrc/onos/core/datastore/utils/KVObject.java
+++ b/src/main/java/net/onrc/onos/core/datastore/utils/KVObject.java
@@ -144,11 +144,12 @@
      * Deserialize using value and version stored in data store.
      *
      * @param bytes   serialized bytes
-     * @param version version of this {@code bytes}
+     * @param dataStoreVersion version of this {@code bytes}
      * @return true if success
      */
-    public boolean deserialize(final byte[] bytes, final long version) {
-        this.version = version;
+    public boolean deserialize(final byte[] bytes,
+                               final long dataStoreVersion) {
+        version = dataStoreVersion;
         return deserialize(bytes);
     }
 
diff --git a/src/main/java/net/onrc/onos/core/flowprogrammer/FlowPusher.java b/src/main/java/net/onrc/onos/core/flowprogrammer/FlowPusher.java
index fe29efd..0be7362 100644
--- a/src/main/java/net/onrc/onos/core/flowprogrammer/FlowPusher.java
+++ b/src/main/java/net/onrc/onos/core/flowprogrammer/FlowPusher.java
@@ -445,20 +445,20 @@
     /**
      * Set parameters needed for sending messages.
      *
-     * @param context    FloodlightContext used for sending messages.
+     * @param floodlightContext    FloodlightContext used for sending messages.
      *                   If null, FlowPusher uses default context.
      * @param modContext FloodlightModuleContext used for acquiring
      *                   ThreadPoolService and registering MessageListener.
-     * @param factory    Factory object to create OFMessage objects.
+     * @param basicFactory    Factory object to create OFMessage objects.
      * @param damper     Message damper used for sending messages.
      *                   If null, FlowPusher creates its own damper object.
      */
-    public void init(FloodlightContext context,
+    public void init(FloodlightContext floodlightContext,
                      FloodlightModuleContext modContext,
-                     BasicFactory factory,
+                     BasicFactory basicFactory,
                      OFMessageDamper damper) {
-        this.context = context;
-        this.factory = factory;
+        context = floodlightContext;
+        factory = basicFactory;
         this.threadPool = modContext.getServiceImpl(IThreadPoolService.class);
         IFloodlightProviderService flservice
                 = modContext.getServiceImpl(IFloodlightProviderService.class);
diff --git a/src/main/java/net/onrc/onos/core/intent/runtime/PathCalcRuntimeModule.java b/src/main/java/net/onrc/onos/core/intent/runtime/PathCalcRuntimeModule.java
index 9ef1a1f..da8c9d2 100755
--- a/src/main/java/net/onrc/onos/core/intent/runtime/PathCalcRuntimeModule.java
+++ b/src/main/java/net/onrc/onos/core/intent/runtime/PathCalcRuntimeModule.java
@@ -68,8 +68,8 @@
 
         public void flushLog() {
             log("finish");
-            for (PerfLog log : logData) {
-                log.logThis();
+            for (PerfLog perfLog : logData) {
+                perfLog.logThis();
             }
             logData.clear();
         }
diff --git a/src/main/java/net/onrc/onos/core/linkdiscovery/internal/LinkDiscoveryManager.java b/src/main/java/net/onrc/onos/core/linkdiscovery/internal/LinkDiscoveryManager.java
index a764f1c..aeabb3a 100644
--- a/src/main/java/net/onrc/onos/core/linkdiscovery/internal/LinkDiscoveryManager.java
+++ b/src/main/java/net/onrc/onos/core/linkdiscovery/internal/LinkDiscoveryManager.java
@@ -1202,14 +1202,14 @@
     /**
      * Removes links from memory and storage.
      *
-     * @param links The List of @LinkTuple to delete.
+     * @param linksToDelete The List of @LinkTuple to delete.
      */
-    protected void deleteLinks(List<Link> links, String reason) {
+    protected void deleteLinks(List<Link> linksToDelete, String reason) {
         NodePortTuple srcNpt, dstNpt;
 
         lock.writeLock().lock();
         try {
-            for (Link lt : links) {
+            for (Link lt : linksToDelete) {
                 srcNpt = new NodePortTuple(lt.getSrc(), lt.getSrcPort());
                 dstNpt = new NodePortTuple(lt.getDst(), lt.getDstPort());
 
diff --git a/src/main/java/net/onrc/onos/core/registry/StandaloneRegistry.java b/src/main/java/net/onrc/onos/core/registry/StandaloneRegistry.java
index 4b0a0f3..989d2c1 100755
--- a/src/main/java/net/onrc/onos/core/registry/StandaloneRegistry.java
+++ b/src/main/java/net/onrc/onos/core/registry/StandaloneRegistry.java
@@ -32,7 +32,7 @@
 
     protected IRestApiService restApi;
 
-    protected String controllerId = null;
+    protected String registeredControllerId = null;
     protected Map<String, ControlChangeCallback> switchCallbacks;
 
     //
@@ -43,7 +43,7 @@
     @Override
     public void requestControl(long dpid, ControlChangeCallback cb)
             throws RegistryException {
-        if (controllerId == null) {
+        if (registeredControllerId == null) {
             throw new RuntimeException(
                     "Must register a controller before calling requestControl");
         }
@@ -81,29 +81,29 @@
 
     @Override
     public String getControllerId() {
-        return controllerId;
+        return registeredControllerId;
     }
 
     @Override
     public void registerController(String controllerId)
             throws RegistryException {
-        if (this.controllerId != null) {
+        if (registeredControllerId != null) {
             throw new RegistryException(
-                    "Controller already registered with id " + this.controllerId);
+                    "Controller already registered with id " + registeredControllerId);
         }
-        this.controllerId = controllerId;
+        registeredControllerId = controllerId;
     }
 
     @Override
     public Collection<String> getAllControllers() throws RegistryException {
         List<String> l = new ArrayList<String>();
-        l.add(controllerId);
+        l.add(registeredControllerId);
         return l;
     }
 
     @Override
     public String getControllerForSwitch(long dpid) throws RegistryException {
-        return (switchCallbacks.get(HexString.toHexString(dpid)) != null) ? controllerId : null;
+        return (switchCallbacks.get(HexString.toHexString(dpid)) != null) ? registeredControllerId : null;
     }
 
     @Override
@@ -114,7 +114,7 @@
         for (String strSwitch : switchCallbacks.keySet()) {
             log.debug("Switch _{}", strSwitch);
             List<ControllerRegistryEntry> list = new ArrayList<ControllerRegistryEntry>();
-            list.add(new ControllerRegistryEntry(controllerId, 0));
+            list.add(new ControllerRegistryEntry(registeredControllerId, 0));
 
             switches.put(strSwitch, list);
         }
diff --git a/src/main/java/net/onrc/onos/core/registry/ZookeeperRegistry.java b/src/main/java/net/onrc/onos/core/registry/ZookeeperRegistry.java
index 070850d..230b39b 100755
--- a/src/main/java/net/onrc/onos/core/registry/ZookeeperRegistry.java
+++ b/src/main/java/net/onrc/onos/core/registry/ZookeeperRegistry.java
@@ -71,9 +71,9 @@
     private static final String SERVICES_PATH = "/"; //i.e. the root of our namespace
     private static final String CONTROLLER_SERVICE_NAME = "controllers";
 
-    protected CuratorFramework client;
+    protected CuratorFramework curatorFrameworkClient;
 
-    protected PathChildrenCache switchCache;
+    protected PathChildrenCache rootSwitchCache;
 
     protected ConcurrentHashMap<String, SwitchLeadershipData> switches;
     protected Map<String, PathChildrenCache> switchPathCaches;
@@ -250,7 +250,7 @@
             throw new RegistryException("Already contesting control for " + dpidStr);
         }
 
-        LeaderLatch latch = new LeaderLatch(client, latchPath, controllerId);
+        LeaderLatch latch = new LeaderLatch(curatorFrameworkClient, latchPath, controllerId);
         SwitchLeaderListener listener = new SwitchLeaderListener(dpidStr);
         latch.addListener(listener);
 
@@ -418,7 +418,7 @@
     }
 
     @Override
-    public Collection<Long> getSwitchesControlledByController(String controllerId) {
+    public Collection<Long> getSwitchesControlledByController(String controller) {
         //TODO remove this if not needed
         throw new RuntimeException("Not yet implemented");
     }
@@ -444,12 +444,12 @@
 
             for (ChildData d : entry.getValue().getCurrentData()) {
 
-                String controllerId = new String(d.getData(), Charsets.UTF_8);
+                String childsControllerId = new String(d.getData(), Charsets.UTF_8);
 
                 String[] splitted = d.getPath().split("-");
                 int sequenceNumber = Integer.parseInt(splitted[splitted.length - 1]);
 
-                contendingControllers.add(new ControllerRegistryEntry(controllerId, sequenceNumber));
+                contendingControllers.add(new ControllerRegistryEntry(childsControllerId, sequenceNumber));
             }
 
             Collections.sort(contendingControllers);
@@ -546,9 +546,9 @@
 
         //Read the Zookeeper connection string from the config
         Map<String, String> configParams = context.getConfigParams(this);
-        String connectionString = configParams.get("connectionString");
-        if (connectionString != null) {
-            this.connectionString = connectionString;
+        String connectionStringParam = configParams.get("connectionString");
+        if (connectionStringParam != null) {
+            connectionString = connectionStringParam;
         }
         log.info("Setting Zookeeper connection string to {}", this.connectionString);
 
@@ -559,23 +559,23 @@
         switchPathCaches = new ConcurrentHashMap<String, PathChildrenCache>();
 
         RetryPolicy retryPolicy = new ExponentialBackoffRetry(1000, 3);
-        client = CuratorFrameworkFactory.newClient(this.connectionString,
+        curatorFrameworkClient = CuratorFrameworkFactory.newClient(this.connectionString,
                 SESSION_TIMEOUT, CONNECTION_TIMEOUT, retryPolicy);
 
-        client.start();
-        client = client.usingNamespace(namespace);
+        curatorFrameworkClient.start();
+        curatorFrameworkClient = curatorFrameworkClient.usingNamespace(namespace);
 
         distributedIdCounter = new DistributedAtomicLong(
-                client,
+                curatorFrameworkClient,
                 ID_COUNTER_PATH,
                 new RetryOneTime(100));
 
-        switchCache = new PathChildrenCache(client, switchLatchesPath, true);
-        switchCache.getListenable().addListener(switchPathCacheListener);
+        rootSwitchCache = new PathChildrenCache(curatorFrameworkClient, switchLatchesPath, true);
+        rootSwitchCache.getListenable().addListener(switchPathCacheListener);
 
         //Build the service discovery object
         serviceDiscovery = ServiceDiscoveryBuilder.builder(ControllerService.class)
-                .client(client).basePath(SERVICES_PATH).build();
+                .client(curatorFrameworkClient).basePath(SERVICES_PATH).build();
 
         //We read the list of services very frequently (GUI periodically queries them)
         //so we'll cache them to cut down on Zookeeper queries.
@@ -588,7 +588,7 @@
             serviceCache.start();
 
             //Don't prime the cache, we want a notification for each child node in the path
-            switchCache.start(StartMode.NORMAL);
+            rootSwitchCache.start(StartMode.NORMAL);
         } catch (Exception e) {
             throw new FloodlightModuleException("Error initialising ZookeeperRegistry: "
                     + e.getMessage());
@@ -614,7 +614,7 @@
         if (controllerId == null) {
             log.error("Error on startup: unknown ControllerId");
         }
-        clusterLeaderLatch = new LeaderLatch(client,
+        clusterLeaderLatch = new LeaderLatch(curatorFrameworkClient,
                 CLUSTER_LEADER_PATH,
                 controllerId);
         clusterLeaderListener = new ClusterLeaderListener();
diff --git a/src/main/java/net/onrc/onos/core/topology/TopologyManager.java b/src/main/java/net/onrc/onos/core/topology/TopologyManager.java
index 869b282..bc1fc9a 100644
--- a/src/main/java/net/onrc/onos/core/topology/TopologyManager.java
+++ b/src/main/java/net/onrc/onos/core/topology/TopologyManager.java
@@ -137,12 +137,12 @@
             //
             // For now, as a shortcut we read it from the datagrid
             //
-            Collection<TopologyEvent> topologyEvents =
+            Collection<TopologyEvent> allTopologyEvents =
                     eventChannel.getAllEntries();
             Collection<EventEntry<TopologyEvent>> collection =
                     new LinkedList<EventEntry<TopologyEvent>>();
 
-            for (TopologyEvent topologyEvent : topologyEvents) {
+            for (TopologyEvent topologyEvent : allTopologyEvents) {
                 EventEntry<TopologyEvent> eventEntry =
                         new EventEntry<TopologyEvent>(EventEntry.Type.ENTRY_ADD,
                                 topologyEvent);
diff --git a/src/main/java/net/onrc/onos/core/util/FlowEntryErrorState.java b/src/main/java/net/onrc/onos/core/util/FlowEntryErrorState.java
index fa12055..4744baa 100644
--- a/src/main/java/net/onrc/onos/core/util/FlowEntryErrorState.java
+++ b/src/main/java/net/onrc/onos/core/util/FlowEntryErrorState.java
@@ -71,12 +71,12 @@
     /**
      * Set the values of the error type and code.
      *
-     * @param type the error type to use.
-     * @param code the error code to use.
+     * @param newType the error type to use.
+     * @param newCode the error code to use.
      */
-    public void setValue(short type, short code) {
-        this.type = type;
-        this.code = code;
+    public void setValue(short newType, short newCode) {
+        type = newType;
+        code = newCode;
     }
 
     /**
diff --git a/src/main/java/net/onrc/onos/core/util/FlowEntryMatch.java b/src/main/java/net/onrc/onos/core/util/FlowEntryMatch.java
index 3b603e9..eabf401 100644
--- a/src/main/java/net/onrc/onos/core/util/FlowEntryMatch.java
+++ b/src/main/java/net/onrc/onos/core/util/FlowEntryMatch.java
@@ -46,10 +46,10 @@
         /**
          * Enable the matching for a given value.
          *
-         * @param value the value to set.
+         * @param newValue the value to set.
          */
-        public void enableMatch(T value) {
-            this.value = value;
+        public void enableMatch(T newValue) {
+            this.value = newValue;
             this.enabled = true;
         }
 
@@ -152,11 +152,11 @@
     /**
      * Enable the matching on input switch port.
      *
-     * @param inPort the input switch port value to enable for matching.
+     * @param newInPort the input switch port value to enable for matching.
      */
     @JsonProperty("inPort")
-    public void enableInPort(Port inPort) {
-        this.inPort = new Field<Port>(inPort);
+    public void enableInPort(Port newInPort) {
+        this.inPort = new Field<Port>(newInPort);
     }
 
     /**
@@ -195,11 +195,11 @@
     /**
      * Enable the matching on source MAC address.
      *
-     * @param srcMac the source MAC address value to enable for matching.
+     * @param newSrcMac the source MAC address value to enable for matching.
      */
     @JsonProperty("srcMac")
-    public void enableSrcMac(MACAddress srcMac) {
-        this.srcMac = new Field<MACAddress>(srcMac);
+    public void enableSrcMac(MACAddress newSrcMac) {
+        this.srcMac = new Field<MACAddress>(newSrcMac);
     }
 
     /**
@@ -238,11 +238,11 @@
     /**
      * Enable the matching on destination MAC address.
      *
-     * @param dstMac the destination MAC address value to enable for matching.
+     * @param newDstMac the destination MAC address value to enable for matching.
      */
     @JsonProperty("dstMac")
-    public void enableDstMac(MACAddress dstMac) {
-        this.dstMac = new Field<MACAddress>(dstMac);
+    public void enableDstMac(MACAddress newDstMac) {
+        this.dstMac = new Field<MACAddress>(newDstMac);
     }
 
     /**
@@ -281,12 +281,12 @@
     /**
      * Enable the matching on Ethernet frame type.
      *
-     * @param ethernetFrameType the Ethernet frame type value to enable for
+     * @param newEthernetFrameType the Ethernet frame type value to enable for
      *                          matching.
      */
     @JsonProperty("ethernetFrameType")
-    public void enableEthernetFrameType(Short ethernetFrameType) {
-        this.ethernetFrameType = new Field<Short>(ethernetFrameType);
+    public void enableEthernetFrameType(Short newEthernetFrameType) {
+        this.ethernetFrameType = new Field<Short>(newEthernetFrameType);
     }
 
     /**
@@ -325,11 +325,11 @@
     /**
      * Enable the matching on VLAN ID.
      *
-     * @param vlanId the VLAN ID value to enable for matching.
+     * @param newVlanId the VLAN ID value to enable for matching.
      */
     @JsonProperty("vlanId")
-    public void enableVlanId(Short vlanId) {
-        this.vlanId = new Field<Short>(vlanId);
+    public void enableVlanId(Short newVlanId) {
+        this.vlanId = new Field<Short>(newVlanId);
     }
 
     /**
@@ -368,11 +368,11 @@
     /**
      * Enable the matching on VLAN priority.
      *
-     * @param vlanPriority the VLAN priority value to enable for matching.
+     * @param newVlanPriority the VLAN priority value to enable for matching.
      */
     @JsonProperty("vlanPriority")
-    public void enableVlanPriority(Byte vlanPriority) {
-        this.vlanPriority = new Field<Byte>(vlanPriority);
+    public void enableVlanPriority(Byte newVlanPriority) {
+        this.vlanPriority = new Field<Byte>(newVlanPriority);
     }
 
     /**
@@ -411,11 +411,11 @@
     /**
      * Enable the matching on source IPv4 prefix.
      *
-     * @param srcIPv4Net the source IPv4 prefix value to enable for matching.
+     * @param newSrcIPv4Net the source IPv4 prefix value to enable for matching.
      */
     @JsonProperty("srcIPv4Net")
-    public void enableSrcIPv4Net(IPv4Net srcIPv4Net) {
-        this.srcIPv4Net = new Field<IPv4Net>(srcIPv4Net);
+    public void enableSrcIPv4Net(IPv4Net newSrcIPv4Net) {
+        this.srcIPv4Net = new Field<IPv4Net>(newSrcIPv4Net);
     }
 
     /**
@@ -454,12 +454,12 @@
     /**
      * Enable the matching on destination IPv4 prefix.
      *
-     * @param dstIPv4Net the destination IPv4 prefix value to enable for
+     * @param newDstIPv4Net the destination IPv4 prefix value to enable for
      *                   matching.
      */
     @JsonProperty("dstIPv4Net")
-    public void enableDstIPv4Net(IPv4Net dstIPv4Net) {
-        this.dstIPv4Net = new Field<IPv4Net>(dstIPv4Net);
+    public void enableDstIPv4Net(IPv4Net newDstIPv4Net) {
+        this.dstIPv4Net = new Field<IPv4Net>(newDstIPv4Net);
     }
 
     /**
@@ -498,11 +498,11 @@
     /**
      * Enable the matching on IP protocol.
      *
-     * @param ipProto the IP protocol value to enable for matching.
+     * @param newIpProto the IP protocol value to enable for matching.
      */
     @JsonProperty("ipProto")
-    public void enableIpProto(Byte ipProto) {
-        this.ipProto = new Field<Byte>(ipProto);
+    public void enableIpProto(Byte newIpProto) {
+        this.ipProto = new Field<Byte>(newIpProto);
     }
 
     /**
@@ -541,11 +541,11 @@
     /**
      * Enable the matching on IP ToS (DSCP field, 6 bits).
      *
-     * @param ipToS the IP ToS value to enable for matching.
+     * @param newIpToS the IP ToS value to enable for matching.
      */
     @JsonProperty("ipToS")
-    public void enableIpToS(Byte ipToS) {
-        this.ipToS = new Field<Byte>(ipToS);
+    public void enableIpToS(Byte newIpToS) {
+        this.ipToS = new Field<Byte>(newIpToS);
     }
 
     /**
@@ -584,11 +584,11 @@
     /**
      * Enable the matching on source TCP/UDP port.
      *
-     * @param srcTcpUdpPort the source TCP/UDP port to enable for matching.
+     * @param newSrcTcpUdpPort the source TCP/UDP port to enable for matching.
      */
     @JsonProperty("srcTcpUdpPort")
-    public void enableSrcTcpUdpPort(Short srcTcpUdpPort) {
-        this.srcTcpUdpPort = new Field<Short>(srcTcpUdpPort);
+    public void enableSrcTcpUdpPort(Short newSrcTcpUdpPort) {
+        this.srcTcpUdpPort = new Field<Short>(newSrcTcpUdpPort);
     }
 
     /**
@@ -627,12 +627,12 @@
     /**
      * Enable the matching on destination TCP/UDP port.
      *
-     * @param dstTcpUdpPort the destination TCP/UDP port to enable for
-     *                      matching.
+     * @param newDstTcpUdpPort the destination TCP/UDP port to enable for
+     *                         matching.
      */
     @JsonProperty("dstTcpUdpPort")
-    public void enableDstTcpUdpPort(Short dstTcpUdpPort) {
-        this.dstTcpUdpPort = new Field<Short>(dstTcpUdpPort);
+    public void enableDstTcpUdpPort(Short newDstTcpUdpPort) {
+        this.dstTcpUdpPort = new Field<Short>(newDstTcpUdpPort);
     }
 
     /**
