diff --git a/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangAtomicPath.java b/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangAtomicPath.java
index 6df33bb..f0bb617 100644
--- a/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangAtomicPath.java
+++ b/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangAtomicPath.java
@@ -32,6 +32,11 @@
     private List<YangPathPredicate> pathPredicatesList;
 
     /**
+     * Resolved node for the absolute path.
+     */
+    private YangNode resolvedNode;
+
+    /**
      * Returns the node identifier.
      *
      * @return the node identifier
@@ -75,4 +80,23 @@
     public void addLeavesPredicate(YangPathPredicate predicatesExp) {
         getPathPredicatesList().add(predicatesExp);
     }
+
+
+    /**
+     * Returns resolved node.
+     *
+     * @return resolved node
+     */
+    public YangNode getResolvedNode() {
+        return resolvedNode;
+    }
+
+    /**
+     * Sets resolved node.
+     *
+     * @param resolvedNode resolved node
+     */
+    public void setResolvedNode(YangNode resolvedNode) {
+        this.resolvedNode = resolvedNode;
+    }
 }
diff --git a/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangAugment.java b/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangAugment.java
index 21c7bd3..64c13ed 100644
--- a/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangAugment.java
+++ b/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangAugment.java
@@ -15,10 +15,8 @@
  */
 package org.onosproject.yangutils.datamodel;
 
-import java.util.HashMap;
 import java.util.LinkedList;
 import java.util.List;
-import java.util.Map;
 
 import org.onosproject.yangutils.datamodel.exceptions.DataModelException;
 import org.onosproject.yangutils.datamodel.utils.Parsable;
@@ -130,11 +128,6 @@
     private YangNode augmentedNode;
 
     /**
-     * All resolved nodes in given xPath.
-     */
-    private Map<YangAtomicPath, YangNode> resolveNodeInPath;
-
-    /**
      * Status of resolution. If completely resolved enum value is "RESOLVED", if not enum value is "UNRESOLVED", in case
      * reference of grouping/typedef is added to uses/type but it's not resolved value of enum should be
      * "INTRA_FILE_RESOLVED".
@@ -156,7 +149,6 @@
      */
     public YangAugment() {
         super(YangNodeType.AUGMENT_NODE);
-        resolveNodeInPath = new HashMap<>();
         resolvableStatus = ResolvableStatus.UNRESOLVED;
     }
 
@@ -447,21 +439,4 @@
         return null;
     }
 
-    /**
-     * Returns all resolved node in path.
-     *
-     * @return all resolved node in path
-     */
-    public Map<YangAtomicPath, YangNode> getResolveNodeInPath() {
-        return resolveNodeInPath;
-    }
-
-    /**
-     * Sets all resolved node in path.
-     *
-     * @param resolveNodeInPath all resolved node in path
-     */
-    public void setResolveNodeInPath(Map<YangAtomicPath, YangNode> resolveNodeInPath) {
-        this.resolveNodeInPath = resolveNodeInPath;
-    }
 }
diff --git a/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangAugmentedOpParamInfo.java b/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangAugmentedOpParamInfo.java
new file mode 100644
index 0000000..b9c1a3a
--- /dev/null
+++ b/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangAugmentedOpParamInfo.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2016-present Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onosproject.yangutils.datamodel;
+
+/**
+ * Abstraction of an entity which represent operation parameter info for augmentable node.
+ */
+public interface YangAugmentedOpParamInfo extends YangAugmentedInfo {
+
+    /**
+     * Returns class object of base class.
+     *
+     * @return class object of base class
+     */
+    Class<?> getBaseClass();
+
+    /**
+     * Returns if augmented info's contents matches.
+     *
+     * @param augmentedInfo augmented info
+     * @return true or false
+     */
+    boolean isFilterContentMatch(Object augmentedInfo);
+}
diff --git a/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangGrouping.java b/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangGrouping.java
index 0f6ba7a..bf85835 100644
--- a/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangGrouping.java
+++ b/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangGrouping.java
@@ -79,7 +79,7 @@
  */
 public class YangGrouping
         extends YangNode
-        implements YangLeavesHolder, YangCommonInfo, Parsable, CollisionDetector {
+        implements YangLeavesHolder, YangCommonInfo, Parsable, CollisionDetector, YangTranslatorOperatorNode {
 
     private static final long serialVersionUID = 806201607L;
 
diff --git a/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangNode.java b/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangNode.java
index 381a39a..0c72c61 100644
--- a/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangNode.java
+++ b/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangNode.java
@@ -64,6 +64,11 @@
     private int priority;
 
     /**
+     * Flag if the node is for translation.
+     */
+    private boolean isToTranslate = true;
+
+    /**
      * Returns the priority of the node.
      *
      * @return priority of the node
@@ -268,6 +273,7 @@
     /**
      * Clones the current node contents and create a new node.
      *
+     * @param yangUses YANG uses
      * @return cloned node
      * @throws CloneNotSupportedException clone is not supported by the referred
      *                                    node
@@ -297,6 +303,7 @@
      *
      * @param srcRootNode source node for sub tree cloning
      * @param dstRootNode destination node where the sub tree needs to be cloned
+     * @param yangUses    YANG uses
      * @throws DataModelException data model error
      */
     public static void cloneSubTree(YangNode srcRootNode, YangNode dstRootNode, YangUses yangUses)
@@ -411,6 +418,24 @@
     }
 
     /**
+     * /** Returns true if translation required.
+     *
+     * @return true if translation required
+     */
+    public boolean isToTranslate() {
+        return isToTranslate;
+    }
+
+    /**
+     * Sest true if translation required.
+     *
+     * @param toTranslate true if translation required.
+     */
+    public void setToTranslate(boolean toTranslate) {
+        isToTranslate = toTranslate;
+    }
+
+    /**
      * Adds a new next sibling.
      *
      * @param newSibling new sibling to be added
diff --git a/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangTranslatorOperatorNode.java b/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangTranslatorOperatorNode.java
new file mode 100644
index 0000000..1c96c68
--- /dev/null
+++ b/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangTranslatorOperatorNode.java
@@ -0,0 +1,25 @@
+
+/*
+ * Copyright 2016-present Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onosproject.yangutils.datamodel;
+
+/**
+ * Abstraction of an entity which provides info about whether to translate module/submodule in manager and service
+ * classes.
+ */
+public interface YangTranslatorOperatorNode {
+}
diff --git a/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangTypeDef.java b/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangTypeDef.java
index d0f69af..6fd95e0 100644
--- a/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangTypeDef.java
+++ b/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangTypeDef.java
@@ -57,7 +57,8 @@
 /**
  * Represents data model node to maintain information defined in YANG typedef.
  */
-public class YangTypeDef extends YangNode implements YangCommonInfo, Parsable, YangTypeHolder, CollisionDetector {
+public class YangTypeDef extends YangNode implements YangCommonInfo, Parsable, YangTypeHolder, CollisionDetector,
+        YangTranslatorOperatorNode {
 
     private static final long serialVersionUID = 806201615L;
 
diff --git a/datamodel/src/main/java/org/onosproject/yangutils/datamodel/utils/DataModelUtils.java b/datamodel/src/main/java/org/onosproject/yangutils/datamodel/utils/DataModelUtils.java
index 503bebe..5b29216 100644
--- a/datamodel/src/main/java/org/onosproject/yangutils/datamodel/utils/DataModelUtils.java
+++ b/datamodel/src/main/java/org/onosproject/yangutils/datamodel/utils/DataModelUtils.java
@@ -370,6 +370,7 @@
      *
      * @param clonedLeaf       cloned leaf in uses from grouping
      * @param leafParentHolder holder of the leaf from uses
+     * @param yangUses         YANG uses
      * @return entity of leafref which has to be resolved
      * @throws DataModelException data model error
      */
diff --git a/plugin/src/main/java/org/onosproject/yangutils/linker/impl/PrefixResolverType.java b/plugin/src/main/java/org/onosproject/yangutils/linker/impl/PrefixResolverType.java
index 1ea75e6..469f8cb 100644
--- a/plugin/src/main/java/org/onosproject/yangutils/linker/impl/PrefixResolverType.java
+++ b/plugin/src/main/java/org/onosproject/yangutils/linker/impl/PrefixResolverType.java
@@ -19,7 +19,7 @@
 /**
  * Enum for prefix resolver type when augment has come in path.
  */
-public enum PrefixResolverType {
+enum PrefixResolverType {
 
     /**
      * When prefix changes from inter file to intra file.
@@ -37,12 +37,12 @@
     INTER_TO_INTER,
 
     /**
-     * When no prefix change occurres.
+     * When no prefix change occurs.
      */
     NO_PREFIX_CHANGE_FOR_INTRA,
 
     /**
-     * When no prefix change occurres.
+     * When no prefix change occurs.
      */
     NO_PREFIX_CHANGE_FOR_INTER
 }
diff --git a/plugin/src/main/java/org/onosproject/yangutils/linker/impl/YangLinkerManager.java b/plugin/src/main/java/org/onosproject/yangutils/linker/impl/YangLinkerManager.java
index 7b8c6ce..508ec54 100644
--- a/plugin/src/main/java/org/onosproject/yangutils/linker/impl/YangLinkerManager.java
+++ b/plugin/src/main/java/org/onosproject/yangutils/linker/impl/YangLinkerManager.java
@@ -18,13 +18,11 @@
 
 import java.util.Collections;
 import java.util.HashSet;
-import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Set;
+
 import org.onosproject.yangutils.datamodel.ResolvableType;
-import org.onosproject.yangutils.datamodel.YangImport;
-import org.onosproject.yangutils.datamodel.YangInclude;
 import org.onosproject.yangutils.datamodel.YangNode;
 import org.onosproject.yangutils.datamodel.YangReferenceResolver;
 import org.onosproject.yangutils.datamodel.YangSubModule;
@@ -32,6 +30,7 @@
 import org.onosproject.yangutils.linker.YangLinker;
 import org.onosproject.yangutils.linker.exceptions.LinkerException;
 
+import static org.onosproject.yangutils.linker.impl.YangLinkerUtils.updateFilePriority;
 import static org.onosproject.yangutils.utils.UtilConstants.NEW_LINE;
 
 /**
@@ -191,52 +190,4 @@
         }
     }
 
-    /**
-     * Updates the priority for all the input files.
-     *
-     * @param yangNodeSet set of YANG files info
-     */
-    public void updateFilePriority(Set<YangNode> yangNodeSet) {
-        for (YangNode yangNode : yangNodeSet) {
-            updateFilePriorityOfNode(yangNode);
-        }
-    }
-
-    /**
-     * Updates priority of the node.
-     *
-     * @param yangNode YANG node information
-     */
-    public void updateFilePriorityOfNode(YangNode yangNode) {
-        int curNodePriority = yangNode.getPriority();
-        if (yangNode instanceof YangReferenceResolver) {
-            List<YangImport> yangImportList = ((YangReferenceResolver) yangNode).getImportList();
-            if (yangImportList != null && !yangImportList.isEmpty()) {
-                Iterator<YangImport> importInfoIterator = yangImportList.iterator();
-                // Run through the imported list to update priority.
-                while (importInfoIterator.hasNext()) {
-                    YangImport yangImport = importInfoIterator.next();
-                    YangNode importedNode = yangImport.getImportedNode();
-                    if (curNodePriority >= importedNode.getPriority()) {
-                        importedNode.setPriority(curNodePriority + 1);
-                        updateFilePriorityOfNode(importedNode);
-                    }
-                }
-            }
-
-            List<YangInclude> yangIncludeList = ((YangReferenceResolver) yangNode).getIncludeList();
-            if (yangIncludeList != null && !yangIncludeList.isEmpty()) {
-                Iterator<YangInclude> includeInfoIterator = yangIncludeList.iterator();
-                // Run through the imported list to update priority.
-                while (includeInfoIterator.hasNext()) {
-                    YangInclude yangInclude = includeInfoIterator.next();
-                    YangNode includedNode = yangInclude.getIncludedNode();
-                    if (curNodePriority >= includedNode.getPriority()) {
-                        includedNode.setPriority(curNodePriority + 1);
-                        updateFilePriorityOfNode(includedNode);
-                    }
-                }
-            }
-        }
-    }
 }
diff --git a/plugin/src/main/java/org/onosproject/yangutils/linker/impl/YangLinkerUtils.java b/plugin/src/main/java/org/onosproject/yangutils/linker/impl/YangLinkerUtils.java
index 614c260..abfae71 100644
--- a/plugin/src/main/java/org/onosproject/yangutils/linker/impl/YangLinkerUtils.java
+++ b/plugin/src/main/java/org/onosproject/yangutils/linker/impl/YangLinkerUtils.java
@@ -16,24 +16,29 @@
 
 package org.onosproject.yangutils.linker.impl;
 
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+import java.util.regex.Pattern;
+
 import org.onosproject.yangutils.datamodel.YangAugment;
 import org.onosproject.yangutils.datamodel.YangAugmentableNode;
 import org.onosproject.yangutils.datamodel.YangAugmentedInfo;
 import org.onosproject.yangutils.datamodel.YangCase;
 import org.onosproject.yangutils.datamodel.YangChoice;
+import org.onosproject.yangutils.datamodel.YangImport;
+import org.onosproject.yangutils.datamodel.YangInclude;
 import org.onosproject.yangutils.datamodel.YangLeaf;
 import org.onosproject.yangutils.datamodel.YangLeafList;
 import org.onosproject.yangutils.datamodel.YangLeafRef;
 import org.onosproject.yangutils.datamodel.YangLeavesHolder;
 import org.onosproject.yangutils.datamodel.YangNode;
 import org.onosproject.yangutils.datamodel.YangNodeIdentifier;
+import org.onosproject.yangutils.datamodel.YangReferenceResolver;
 import org.onosproject.yangutils.datamodel.utils.YangConstructType;
 import org.onosproject.yangutils.linker.exceptions.LinkerException;
 
-import java.util.ArrayList;
-import java.util.List;
-import java.util.regex.Pattern;
-
 import static org.onosproject.yangutils.utils.UtilConstants.COLON;
 import static org.onosproject.yangutils.utils.UtilConstants.EMPTY_STRING;
 import static org.onosproject.yangutils.utils.UtilConstants.SLASH_FOR_STRING;
@@ -43,13 +48,13 @@
  */
 public final class YangLinkerUtils {
 
-    private YangLinkerUtils() {
-    }
-
     private static final int IDENTIFIER_LENGTH = 64;
     private static final Pattern IDENTIFIER_PATTERN = Pattern.compile("[a-zA-Z_][a-zA-Z0-9_.-]*");
     private static final String XML = "xml";
 
+    private YangLinkerUtils() {
+    }
+
     /**
      * Detects collision between target nodes leaf/leaf-list or child node with augmented leaf/leaf-list or child node.
      *
@@ -59,64 +64,78 @@
     private static void detectCollision(YangNode targetNode, YangAugment augment) {
         YangNode targetNodesChild = targetNode.getChild();
         YangNode augmentsChild = augment.getChild();
-        YangLeavesHolder augmentsLeavesHolder = augment;
-        if (targetNode instanceof YangChoice) {
-            if (augmentsLeavesHolder.getListOfLeaf() != null
-                    || augmentsLeavesHolder.getListOfLeafList() != null) {
-                throw new LinkerException("target node " + targetNode.getName()
-                        + "is a instance of choice. it can " +
-                        "only be augmented with leaf using a case node.");
-            }
+        YangNode parent = targetNode;
+        if (targetNode instanceof YangAugment) {
+            parent = targetNode.getParent();
         } else {
-            YangLeavesHolder targetNodesLeavesHolder = (YangLeavesHolder) targetNode;
+            while (parent.getParent() != null) {
+                parent = parent.getParent();
+            }
+        }
+        if (targetNode instanceof YangChoice) {
+            // no need to check here.
+        } else {
+            detectCollisionInLeaveHolders(targetNode, augment);
+            while (augmentsChild != null) {
+                detectCollisionInChildNodes(targetNodesChild, augmentsChild, targetNode.getName(), parent.getName());
+                augmentsChild = augmentsChild.getNextSibling();
+            }
+        }
+    }
 
-            YangNode parent = targetNode;
-            if (targetNode instanceof YangAugment) {
-                parent = targetNode.getParent();
-            } else {
-                while (parent.getParent() != null) {
-                    parent = parent.getParent();
+    /*Detects collision between leaves/leaflists*/
+    private static void detectCollisionInLeaveHolders(YangNode targetNode, YangAugment augment) {
+        YangLeavesHolder targetNodesLeavesHolder = (YangLeavesHolder) targetNode;
+        YangNode parent = targetNode;
+        if (targetNode instanceof YangAugment) {
+            parent = targetNode.getParent();
+        } else {
+            while (parent.getParent() != null) {
+                parent = parent.getParent();
+            }
+        }
+        if (augment.getListOfLeaf() != null && augment.getListOfLeaf().size() != 0
+                && targetNodesLeavesHolder.getListOfLeaf() != null) {
+            for (YangLeaf leaf : augment.getListOfLeaf()) {
+                for (YangLeaf targetLeaf : targetNodesLeavesHolder.getListOfLeaf()) {
+                    if (targetLeaf.getName().equals(leaf.getName())) {
+                        throw new LinkerException("target node " + targetNode.getName()
+                                + " contains augmented leaf " + leaf.getName() + " in module "
+                                + parent.getName());
+                    }
                 }
             }
-            if (augmentsLeavesHolder.getListOfLeaf() != null && augmentsLeavesHolder.getListOfLeaf().size() != 0
-                    && targetNodesLeavesHolder.getListOfLeaf() != null) {
-                for (YangLeaf leaf : augmentsLeavesHolder.getListOfLeaf()) {
-                    for (YangLeaf targetLeaf : targetNodesLeavesHolder.getListOfLeaf()) {
-                        if (targetLeaf.getName().equals(leaf.getName())) {
-                            throw new LinkerException("target node " + targetNode.getName()
-                                    + " contains augmented leaf " + leaf.getName() + " in module "
-                                    + parent.getName());
-                        }
+        } else if (augment.getListOfLeafList() != null
+                && augment.getListOfLeafList().size() != 0
+                && augment.getListOfLeafList() != null) {
+            for (YangLeafList leafList : augment.getListOfLeafList()) {
+                for (YangLeafList targetLeafList : targetNodesLeavesHolder.getListOfLeafList()) {
+                    if (targetLeafList.getName().equals(leafList.getName())) {
+                        throw new LinkerException("target node " + targetNode.getName()
+                                + " contains augmented leaf-list" + leafList.getName() + " in module "
+                                + parent.getName());
                     }
                 }
-            } else if (augmentsLeavesHolder.getListOfLeafList() != null
-                    && augmentsLeavesHolder.getListOfLeafList().size() != 0
-                    && targetNodesLeavesHolder.getListOfLeafList() != null) {
-                for (YangLeafList leafList : augmentsLeavesHolder.getListOfLeafList()) {
-                    for (YangLeafList targetLeafList : targetNodesLeavesHolder.getListOfLeafList()) {
-                        if (targetLeafList.getName().equals(leafList.getName())) {
-                            throw new LinkerException("target node " + targetNode.getName()
-                                    + " contains augmented leaf-list" + leafList.getName() + " in module "
-                                    + parent.getName());
-                        }
-                    }
-                }
-            } else {
-                while (augmentsChild != null) {
-                    while (targetNodesChild != null) {
-                        if (targetNodesChild.getName().equals(augmentsChild.getName())) {
-                            throw new LinkerException("target node " + targetNode.getName()
-                                    + " contains augmented child node" + augmentsChild.getName() + " in module "
-                                    + parent.getName());
-                        }
-                        targetNodesChild = targetNodesChild.getNextSibling();
-                    }
-                    augmentsChild = augmentsChild.getNextSibling();
-                }
             }
         }
     }
 
+    /*Detects collision for child nodes.*/
+    private static void detectCollisionInChildNodes(YangNode targetNodesChild, YangNode augmentsChild, String
+            targetName, String parentName) {
+        while (augmentsChild != null) {
+            while (targetNodesChild != null) {
+                if (targetNodesChild.getName().equals(augmentsChild.getName())) {
+                    throw new LinkerException("target node " + targetName
+                            + " contains augmented child node" + augmentsChild.getName() + " in module "
+                            + parentName);
+                }
+                targetNodesChild = targetNodesChild.getNextSibling();
+            }
+            augmentsChild = augmentsChild.getNextSibling();
+        }
+    }
+
     /**
      * Detects collision between target nodes and its all leaf/leaf-list or child node with augmented leaf/leaf-list or
      * child node.
@@ -124,7 +143,7 @@
      * @param targetNode target node
      * @param augment    augment node
      */
-    public static void detectCollisionForAugmentedNode(YangNode targetNode, YangAugment augment) {
+    static void detectCollisionForAugmentedNode(YangNode targetNode, YangAugment augment) {
         // Detect collision for target node and augment node.
         detectCollision(targetNode, augment);
         List<YangAugmentedInfo> yangAugmentedInfo = ((YangAugmentableNode) targetNode).getAugmentedInfoList();
@@ -228,4 +247,49 @@
             return identifier;
         }
     }
+
+    /**
+     * Updates the priority for all the input files.
+     *
+     * @param yangNodeSet set of YANG files info
+     */
+    public static void updateFilePriority(Set<YangNode> yangNodeSet) {
+        for (YangNode yangNode : yangNodeSet) {
+            updateFilePriorityOfNode(yangNode);
+        }
+    }
+
+    /**
+     * Updates priority of the node.
+     *
+     * @param yangNode YANG node information
+     */
+    public static void updateFilePriorityOfNode(YangNode yangNode) {
+        int curNodePriority = yangNode.getPriority();
+        if (yangNode instanceof YangReferenceResolver) {
+            List<YangImport> yangImportList = ((YangReferenceResolver) yangNode).getImportList();
+            Iterator<YangImport> importInfoIterator = yangImportList.iterator();
+            // Run through the imported list to update priority.
+            while (importInfoIterator.hasNext()) {
+                YangImport yangImport = importInfoIterator.next();
+                YangNode importedNode = yangImport.getImportedNode();
+                if (curNodePriority >= importedNode.getPriority()) {
+                    importedNode.setPriority(curNodePriority + 1);
+                    updateFilePriorityOfNode(importedNode);
+                }
+            }
+
+            List<YangInclude> yangIncludeList = ((YangReferenceResolver) yangNode).getIncludeList();
+            Iterator<YangInclude> includeInfoIterator = yangIncludeList.iterator();
+            // Run through the imported list to update priority.
+            while (includeInfoIterator.hasNext()) {
+                YangInclude yangInclude = includeInfoIterator.next();
+                YangNode includedNode = yangInclude.getIncludedNode();
+                if (curNodePriority >= includedNode.getPriority()) {
+                    includedNode.setPriority(curNodePriority + 1);
+                    updateFilePriorityOfNode(includedNode);
+                }
+            }
+        }
+    }
 }
diff --git a/plugin/src/main/java/org/onosproject/yangutils/linker/impl/YangResolutionInfoImpl.java b/plugin/src/main/java/org/onosproject/yangutils/linker/impl/YangResolutionInfoImpl.java
index 923bdfe..e7abe15 100644
--- a/plugin/src/main/java/org/onosproject/yangutils/linker/impl/YangResolutionInfoImpl.java
+++ b/plugin/src/main/java/org/onosproject/yangutils/linker/impl/YangResolutionInfoImpl.java
@@ -1209,7 +1209,6 @@
                     detectCollisionForAugmentedNode(targetNode, augment);
                     ((YangAugmentableNode) targetNode).addAugmentation(augment);
                     augment.setAugmentedNode(targetNode);
-                    augment.setResolveNodeInPath(xPathLinker.getResolvedNodes());
                     Resolvable resolvable = (Resolvable) entityToResolve;
                     resolvable.setResolvableStatus(RESOLVED);
                 } else {
diff --git a/plugin/src/main/java/org/onosproject/yangutils/linker/impl/YangXpathLinker.java b/plugin/src/main/java/org/onosproject/yangutils/linker/impl/YangXpathLinker.java
index a86f9ae..3f4c7bf 100644
--- a/plugin/src/main/java/org/onosproject/yangutils/linker/impl/YangXpathLinker.java
+++ b/plugin/src/main/java/org/onosproject/yangutils/linker/impl/YangXpathLinker.java
@@ -16,6 +16,12 @@
 
 package org.onosproject.yangutils.linker.impl;
 
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Stack;
 import org.onosproject.yangutils.datamodel.YangAtomicPath;
 import org.onosproject.yangutils.datamodel.YangAugment;
 import org.onosproject.yangutils.datamodel.YangCase;
@@ -37,13 +43,6 @@
 import org.onosproject.yangutils.datamodel.YangUses;
 import org.onosproject.yangutils.linker.exceptions.LinkerException;
 
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Stack;
-
 import static org.onosproject.yangutils.linker.impl.PrefixResolverType.INTER_TO_INTER;
 import static org.onosproject.yangutils.linker.impl.PrefixResolverType.INTER_TO_INTRA;
 import static org.onosproject.yangutils.linker.impl.PrefixResolverType.INTRA_TO_INTER;
@@ -63,14 +62,12 @@
     private YangNode rootNode;
     private Map<YangAtomicPath, PrefixResolverType> prefixResolverTypes;
     private String curPrefix;
-    private Map<YangAtomicPath, YangNode> resolvedNodes;
 
     /**
      * Creates an instance of x-path linker.
      */
     public YangXpathLinker() {
         absPaths = new ArrayList<>();
-        setResolvedNodes(new HashMap<>());
     }
 
     /**
@@ -156,31 +153,13 @@
     }
 
     /**
-     * Returns resolved nodes.
-     *
-     * @return resolved nodes
-     */
-    public Map<YangAtomicPath, YangNode> getResolvedNodes() {
-        return resolvedNodes;
-    }
-
-    /**
-     * Sets resolved nodes.
-     *
-     * @param resolvedNodes resolved nodes
-     */
-    private void setResolvedNodes(Map<YangAtomicPath, YangNode> resolvedNodes) {
-        this.resolvedNodes = resolvedNodes;
-    }
-
-    /**
      * Adds node to resolved nodes.
      *
      * @param path absolute path
      * @param node resolved node
      */
     private void addToResolvedNodes(YangAtomicPath path, YangNode node) {
-        getResolvedNodes().put(path, node);
+        path.setResolvedNode(node);
     }
 
     /**
@@ -205,13 +184,13 @@
      * Process absolute node path for target leaf.
      *
      * @param atomicPaths atomic path node list
-     * @param root root node
-     * @param leafref instance of YANG leafref
+     * @param root     root node
+     * @param leafref  instance of YANG leafref
      * @return linked target node
      */
     public T processLeafRefXpathLinking(List<YangAtomicPath> atomicPaths, YangNode root, YangLeafRef leafref) {
 
-        YangNode targetNode = null;
+        YangNode targetNode;
         setRootNode(root);
         setPrefixResolverTypes(new HashMap<>());
         parsePrefixResolverList(atomicPaths);
@@ -260,11 +239,8 @@
      * @param leafref instance of YANG leafref
      */
     private void validateInvalidNodesInThePath(YangLeafRef leafref) {
-        Map<YangAtomicPath, YangNode> nodes = getResolvedNodes();
-        Iterator<Map.Entry<YangAtomicPath, YangNode>> nodesIterator = nodes.entrySet().iterator();
-        while (nodesIterator.hasNext()) {
-            Map.Entry<YangAtomicPath, YangNode> nodeInList = nodesIterator.next();
-            YangNode nodeInPath = nodeInList.getValue();
+        for (YangAtomicPath absolutePath : (Iterable<YangAtomicPath>) leafref.getAtomicPath()) {
+            YangNode nodeInPath = absolutePath.getResolvedNode();
 
             if (nodeInPath instanceof YangGrouping || nodeInPath instanceof YangUses
                     || nodeInPath instanceof YangTypeDef || nodeInPath instanceof YangCase
@@ -331,9 +307,7 @@
         YangLeavesHolder holder = (YangLeavesHolder) targetNode;
         List<YangLeaf> leaves = holder.getListOfLeaf();
         if (leaves != null && !leaves.isEmpty()) {
-            Iterator<YangLeaf> leafIterator = leaves.listIterator();
-            while (leafIterator.hasNext()) {
-                YangLeaf leaf = leafIterator.next();
+            for (YangLeaf leaf : leaves) {
                 if (leaf.getName().equals(leafName)) {
                     return leaf;
                 }
@@ -357,9 +331,7 @@
         YangLeavesHolder holder = (YangLeavesHolder) targetNode;
         List<YangLeafList> leavesList = holder.getListOfLeafList();
         if (leavesList != null && !leavesList.isEmpty()) {
-            Iterator<YangLeafList> leafListIterator = leavesList.listIterator();
-            while (leafListIterator.hasNext()) {
-                YangLeafList leafList = leafListIterator.next();
+            for (YangLeafList leafList : leavesList) {
                 if (leafList.getName().equals(leafListName)) {
                     return leafList;
                 }
diff --git a/plugin/src/main/java/org/onosproject/yangutils/plugin/manager/YangUtilManager.java b/plugin/src/main/java/org/onosproject/yangutils/plugin/manager/YangUtilManager.java
index 32ce235..0b9c440 100644
--- a/plugin/src/main/java/org/onosproject/yangutils/plugin/manager/YangUtilManager.java
+++ b/plugin/src/main/java/org/onosproject/yangutils/plugin/manager/YangUtilManager.java
@@ -18,7 +18,6 @@
 
 import java.io.IOException;
 import java.util.HashSet;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Set;
 import org.apache.maven.artifact.repository.ArtifactRepository;
@@ -43,6 +42,7 @@
 
 import static org.apache.maven.plugins.annotations.LifecyclePhase.GENERATE_SOURCES;
 import static org.apache.maven.plugins.annotations.ResolutionScope.COMPILE;
+import static org.onosproject.yangutils.linker.impl.YangLinkerUtils.updateFilePriority;
 import static org.onosproject.yangutils.plugin.manager.YangPluginUtils.addToCompilationRoot;
 import static org.onosproject.yangutils.plugin.manager.YangPluginUtils.copyYangFilesToTarget;
 import static org.onosproject.yangutils.plugin.manager.YangPluginUtils.resolveInterJarDependencies;
@@ -67,17 +67,14 @@
 public class YangUtilManager
         extends AbstractMojo {
 
+    private static final String DEFAULT_PKG = SLASH + getPackageDirPathFromJavaJPackage(DEFAULT_BASE_PKG);
     private YangNode rootNode;
     // YANG file information set.
     private Set<YangFileInfo> yangFileInfoSet = new HashSet<>();
     private YangUtilsParser yangUtilsParser = new YangUtilsParserManager();
     private YangLinker yangLinker = new YangLinkerManager();
     private YangFileInfo curYangFileInfo = new YangFileInfo();
-
     private Set<YangNode> yangNodeSet = new HashSet<>();
-
-    private static final String DEFAULT_PKG = SLASH + getPackageDirPathFromJavaJPackage(DEFAULT_BASE_PKG);
-
     /**
      * Source directory for YANG files.
      */
@@ -144,9 +141,15 @@
     @Component
     private BuildContext context;
 
+    /**
+     * Local maven repository.
+     */
     @Parameter(readonly = true, defaultValue = "${localRepository}")
     private ArtifactRepository localRepository;
 
+    /**
+     * Remote maven repositories.
+     */
     @Parameter(readonly = true, defaultValue = "${project.remoteArtifactRepositories}")
     private List<ArtifactRepository> remoteRepository;
 
@@ -196,7 +199,7 @@
                 return;
             }
             // Resolve inter jar dependency.
-            resolveInterJardependency();
+            resolveInterJarDependency();
 
             // Carry out the parsing for all the YANG files.
             parseYangFileInfoSet();
@@ -205,7 +208,7 @@
             resolveDependenciesUsingLinker();
 
             // Perform translation to JAVA.
-            translateToJava(getYangFileInfoSet(), yangPlugin);
+            translateToJava(yangPlugin);
 
             // Serialize data model.
             serializeDataModel(getDirectory(baseDir, outputDirectory), getYangFileInfoSet(), project, true);
@@ -237,7 +240,7 @@
      *
      * @return YANG node set
      */
-    public Set<YangNode> getYangNodeSet() {
+    Set<YangNode> getYangNodeSet() {
         return yangNodeSet;
     }
 
@@ -246,12 +249,13 @@
      *
      * @throws IOException when fails to do IO operations
      */
-    public void resolveInterJardependency() throws IOException {
+    private void resolveInterJarDependency() throws IOException {
         try {
             List<YangNode> interJarResolvedNodes = resolveInterJarDependencies(project, localRepository,
                     remoteRepository, getDirectory(baseDir, outputDirectory));
             for (YangNode node : interJarResolvedNodes) {
                 YangFileInfo dependentFileInfo = new YangFileInfo();
+                node.setToTranslate(false);
                 dependentFileInfo.setRootNode(node);
                 dependentFileInfo.setForTranslator(false);
                 dependentFileInfo.setYangFileName(node.getName());
@@ -281,7 +285,7 @@
     /**
      * Creates YANG nodes set.
      */
-    public void createYangNodeSet() {
+    void createYangNodeSet() {
         for (YangFileInfo yangFileInfo : getYangFileInfoSet()) {
             getYangNodeSet().add(yangFileInfo.getRootNode());
         }
@@ -339,19 +343,15 @@
     /**
      * Translates to java code corresponding to the YANG schema.
      *
-     * @param yangFileInfoSet YANG file information
-     * @param yangPlugin      YANG plugin config
-     * @throws IOException when fails to generate java code file the current
-     *                     node
+     * @param yangPlugin YANG plugin config
+     * @throws IOException when fails to generate java code file the current node
      */
-    public void translateToJava(Set<YangFileInfo> yangFileInfoSet, YangPluginConfig yangPlugin)
+    public void translateToJava(YangPluginConfig yangPlugin)
             throws IOException {
-        Iterator<YangFileInfo> yangFileIterator = yangFileInfoSet.iterator();
-        while (yangFileIterator.hasNext()) {
-            YangFileInfo yangFileInfo = yangFileIterator.next();
-            setCurYangFileInfo(yangFileInfo);
-            if (yangFileInfo.isForTranslator()) {
-                generateJavaCode(yangFileInfo.getRootNode(), yangPlugin);
+        updateFilePriority(getYangNodeSet());
+        for (YangNode node : getYangNodeSet()) {
+            if (node.isToTranslate()) {
+                generateJavaCode(node, yangPlugin);
             }
         }
     }
@@ -383,7 +383,7 @@
      *
      * @param yangFileInfoSet the YANG file info set
      */
-    public void setYangFileInfoSet(Set<YangFileInfo> yangFileInfoSet) {
+    void setYangFileInfoSet(Set<YangFileInfo> yangFileInfoSet) {
         this.yangFileInfoSet = yangFileInfoSet;
     }
 
@@ -392,7 +392,7 @@
      *
      * @return the yangFileInfo
      */
-    public YangFileInfo getCurYangFileInfo() {
+    private YangFileInfo getCurYangFileInfo() {
         return curYangFileInfo;
     }
 
@@ -401,7 +401,7 @@
      *
      * @param yangFileInfo the yangFileInfo to set
      */
-    public void setCurYangFileInfo(YangFileInfo yangFileInfo) {
+    private void setCurYangFileInfo(YangFileInfo yangFileInfo) {
         curYangFileInfo = yangFileInfo;
     }
 }
diff --git a/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/GeneratedJavaFileType.java b/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/GeneratedJavaFileType.java
index cdb8b5a..957ea1b 100644
--- a/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/GeneratedJavaFileType.java
+++ b/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/GeneratedJavaFileType.java
@@ -88,6 +88,12 @@
     public static final int GENERATE_EVENT_SUBJECT_CLASS = 1024;
 
     /**
+     * Java classes for events.
+     */
+    public static final int GENERATE_ALL_EVENT_CLASS_MASK = GENERATE_EVENT_CLASS | GENERATE_EVENT_LISTENER_INTERFACE
+            | GENERATE_EVENT_SUBJECT_CLASS;
+
+    /**
      * Identity listener class.
      */
     public static final int GENERATE_IDENTITY_CLASS = 2048;
diff --git a/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/JavaImportData.java b/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/JavaImportData.java
index 0e19b23..e55e7ad 100644
--- a/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/JavaImportData.java
+++ b/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/JavaImportData.java
@@ -42,6 +42,7 @@
 import static org.onosproject.yangutils.utils.UtilConstants.ONOS_EVENT_PKG;
 import static org.onosproject.yangutils.utils.UtilConstants.PERIOD;
 import static org.onosproject.yangutils.utils.UtilConstants.SEMI_COLAN;
+import static org.onosproject.yangutils.utils.UtilConstants.YANG_AUGMENTED_OP_PARAM_INFO_CLASS;
 import static java.util.Collections.sort;
 
 /**
@@ -289,4 +290,14 @@
     public String getYangAugmentedInfoImport() {
         return IMPORT + YANG_AUGMENTED_INFO_CLASS_IMPORT_PKG + PERIOD + YANG_AUGMENTED_INFO_CLASS_IMPORT_CLASS;
     }
+
+    /**
+     * Returns import string for YangAugmentedOpParamInfo class.
+     *
+     * @return import string for YangAugmentedOpParamInfo class
+     */
+    public String getYangAugmentedOpParamInfoImport() {
+        return IMPORT + YANG_AUGMENTED_INFO_CLASS_IMPORT_PKG + PERIOD +
+                YANG_AUGMENTED_OP_PARAM_INFO_CLASS;
+    }
 }
diff --git a/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/TempJavaCodeFragmentFiles.java b/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/TempJavaCodeFragmentFiles.java
index 22d9539..48f8c07 100644
--- a/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/TempJavaCodeFragmentFiles.java
+++ b/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/TempJavaCodeFragmentFiles.java
@@ -23,6 +23,7 @@
 import org.onosproject.yangutils.translator.exception.TranslatorException;
 import org.onosproject.yangutils.utils.io.impl.YangPluginConfig;
 
+import static org.onosproject.yangutils.translator.tojava.GeneratedJavaFileType.GENERATE_ALL_EVENT_CLASS_MASK;
 import static org.onosproject.yangutils.translator.tojava.GeneratedJavaFileType.GENERATE_ENUM_CLASS;
 import static org.onosproject.yangutils.translator.tojava.GeneratedJavaFileType.GENERATE_INTERFACE_WITH_BUILDER;
 import static org.onosproject.yangutils.translator.tojava.GeneratedJavaFileType.GENERATE_SERVICE_AND_MANAGER;
@@ -56,6 +57,11 @@
     private TempJavaEnumerationFragmentFiles enumerationTempFiles;
 
     /**
+     * Has the temporary files required for enumeration generated classes.
+     */
+    private TempJavaEventFragmentFiles tempJavaEventFragmentFiles;
+
+    /**
      * Creates an instance of temporary java code fragment.
      *
      * @param javaFileInfo generated java file info
@@ -80,6 +86,10 @@
             setServiceTempFiles(new TempJavaServiceFragmentFiles(javaFileInfo));
         }
 
+        if ((javaFileInfo.getGeneratedFileTypes() & GENERATE_ALL_EVENT_CLASS_MASK) != 0) {
+            setEventFragmentFiles(new TempJavaEventFragmentFiles(javaFileInfo));
+        }
+
     }
 
     /**
@@ -156,10 +166,29 @@
     }
 
     /**
+     * Retrieves the temp file handle for event file generation.
+     *
+     * @return temp file handle for enumeration file generation
+     */
+    public TempJavaEventFragmentFiles getEventFragmentFiles() {
+        return tempJavaEventFragmentFiles;
+    }
+
+    /**
+     * Sets temp file handle for event file generation.
+     *
+     * @param tempJavaEventFragmentFiles temp file handle for event file generation
+     */
+    public void setEventFragmentFiles(TempJavaEventFragmentFiles tempJavaEventFragmentFiles) {
+        this.tempJavaEventFragmentFiles = tempJavaEventFragmentFiles;
+    }
+
+
+    /**
      * Constructs java code exit.
      *
      * @param fileType generated file type
-     * @param curNode current YANG node
+     * @param curNode  current YANG node
      * @throws IOException when fails to generate java files
      */
     public void generateJavaFile(int fileType, YangNode curNode)
@@ -183,6 +212,13 @@
             getServiceTempFiles().generateJavaFile(GENERATE_SERVICE_AND_MANAGER, curNode);
         }
 
+        /**
+         * Creates event, event listener and event subject files.
+         */
+        if (fileType == GENERATE_ALL_EVENT_CLASS_MASK) {
+            getEventFragmentFiles().generateJavaFile(GENERATE_ALL_EVENT_CLASS_MASK, curNode);
+        }
+
         /*
          * Creats enumeration class file.
          */
diff --git a/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/TempJavaEventFragmentFiles.java b/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/TempJavaEventFragmentFiles.java
new file mode 100644
index 0000000..14f62fa
--- /dev/null
+++ b/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/TempJavaEventFragmentFiles.java
@@ -0,0 +1,518 @@
+/*
+ * Copyright 2016-present Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onosproject.yangutils.translator.tojava;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.onosproject.yangutils.datamodel.YangNode;
+import org.onosproject.yangutils.translator.tojava.utils.JavaExtendsListHolder;
+import org.onosproject.yangutils.utils.io.impl.YangPluginConfig;
+
+import static org.onosproject.yangutils.translator.tojava.GeneratedJavaFileType.GENERATE_EVENT_SUBJECT_CLASS;
+import static org.onosproject.yangutils.translator.tojava.GeneratedTempFileType.EVENT_ENUM_MASK;
+import static org.onosproject.yangutils.translator.tojava.GeneratedTempFileType.EVENT_METHOD_MASK;
+import static org.onosproject.yangutils.translator.tojava.GeneratedTempFileType.EVENT_SUBJECT_ATTRIBUTE_MASK;
+import static org.onosproject.yangutils.translator.tojava.GeneratedTempFileType.EVENT_SUBJECT_GETTER_MASK;
+import static org.onosproject.yangutils.translator.tojava.GeneratedTempFileType.EVENT_SUBJECT_SETTER_MASK;
+import static org.onosproject.yangutils.translator.tojava.JavaAttributeInfo.getAttributeInfoForTheData;
+import static org.onosproject.yangutils.translator.tojava.JavaQualifiedTypeInfo.getQualifiedTypeInfoOfCurNode;
+import static org.onosproject.yangutils.translator.tojava.utils.JavaFileGenerator.generateEventFile;
+import static org.onosproject.yangutils.translator.tojava.utils.JavaFileGenerator.generateEventListenerFile;
+import static org.onosproject.yangutils.translator.tojava.utils.JavaFileGenerator.generateEventSubjectFile;
+import static org.onosproject.yangutils.translator.tojava.utils.JavaFileGeneratorUtils.getFileObject;
+import static org.onosproject.yangutils.translator.tojava.utils.JavaIdentifierSyntax.getEnumJavaAttribute;
+import static org.onosproject.yangutils.translator.tojava.utils.MethodsGenerator.getGetterForClass;
+import static org.onosproject.yangutils.translator.tojava.utils.MethodsGenerator.getSetterForClass;
+import static org.onosproject.yangutils.utils.UtilConstants.COMMA;
+import static org.onosproject.yangutils.utils.UtilConstants.EVENT_STRING;
+import static org.onosproject.yangutils.utils.UtilConstants.FOUR_SPACE_INDENTATION;
+import static org.onosproject.yangutils.utils.UtilConstants.NEW_LINE;
+import static org.onosproject.yangutils.utils.UtilConstants.SLASH;
+import static org.onosproject.yangutils.utils.io.impl.JavaDocGen.JavaDocType.ENUM_ATTRIBUTE;
+import static org.onosproject.yangutils.utils.io.impl.JavaDocGen.JavaDocType.GETTER_METHOD;
+import static org.onosproject.yangutils.utils.io.impl.JavaDocGen.JavaDocType.MANAGER_SETTER_METHOD;
+import static org.onosproject.yangutils.utils.io.impl.JavaDocGen.getJavaDoc;
+import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getAbsolutePackagePath;
+import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getCamelCase;
+import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getCapitalCase;
+import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getSmallCase;
+
+/**
+ * Represent temporary java fragments for event files.
+ */
+public class TempJavaEventFragmentFiles
+        extends TempJavaFragmentFiles {
+    /**
+     * File name for generated class file for special type like union, typedef suffix.
+     */
+    public static final String EVENT_SUBJECT_NAME_SUFFIX = "EventSubject";
+
+    /**
+     * File name for event enum temp file.
+     */
+
+    private static final String EVENT_ENUM_FILE_NAME = "EventEnum";
+
+    /**
+     * File name for event method temp file.
+     */
+    private static final String EVENT_METHOD_FILE_NAME = "EventMethod";
+
+    /**
+     * File name for event subject attribute temp file.
+     */
+    private static final String EVENT_SUBJECT_ATTRIBUTE_FILE_NAME = "EventSubjectAttribute";
+
+    /**
+     * File name for event subject getter temp file.
+     */
+    private static final String EVENT_SUBJECT_GETTER_FILE_NAME = "EventSubjectGetter";
+
+    /**
+     * File name for event subject setter temp file.
+     */
+    private static final String EVENT_SUBJECT_SETTER_FILE_NAME = "EventSubjectSetter";
+
+    /**
+     * File name for generated class file for special type like union, typedef suffix.
+     */
+    private static final String EVENT_FILE_NAME_SUFFIX = "Event";
+
+    /**
+     * File name for generated class file for special type like union, typedef suffix.
+     */
+    private static final String EVENT_LISTENER_FILE_NAME_SUFFIX = "Listener";
+
+    private static final String JAVA_FILE_EXTENSION = ".java";
+
+    /**
+     * Java file handle for event subject file.
+     */
+    private File eventSubjectJavaFileHandle;
+
+    /**
+     * Java file handle for event listener file.
+     */
+    private File eventListenerJavaFileHandle;
+
+    /**
+     * Java file handle for event file.
+     */
+    private File eventJavaFileHandle;
+
+    /**
+     * Java file handle for event enum impl file.
+     */
+    private File eventEnumTempFileHandle;
+
+    /**
+     * Java file handle for event method impl file.
+     */
+    private File eventMethodTempFileHandle;
+
+    /**
+     * Java file handle for event subject attribute file.
+     */
+    private File eventSubjectAttributeTempFileHandle;
+
+    /**
+     * Java file handle for event subject getter impl file.
+     */
+    private File eventSubjectGetterTempFileHandle;
+
+    /**
+     * Java file handle for event subject setter impl file.
+     */
+    private File eventSubjectSetterTempFileHandle;
+
+    /**
+     * Creates an instance of temporary java code fragment.
+     *
+     * @param javaFileInfo generated file information
+     * @throws IOException when fails to create new file handle
+     */
+    public TempJavaEventFragmentFiles(JavaFileInfo javaFileInfo)
+            throws IOException {
+        setJavaExtendsListHolder(new JavaExtendsListHolder());
+        setJavaImportData(new JavaImportData());
+        setJavaFileInfo(javaFileInfo);
+        setAbsoluteDirPath(getAbsolutePackagePath(getJavaFileInfo().getBaseCodeGenPath(),
+                getJavaFileInfo().getPackageFilePath()));
+
+        addGeneratedTempFile(EVENT_ENUM_MASK);
+        addGeneratedTempFile(EVENT_METHOD_MASK);
+        addGeneratedTempFile(EVENT_SUBJECT_ATTRIBUTE_MASK);
+        addGeneratedTempFile(EVENT_SUBJECT_GETTER_MASK);
+        addGeneratedTempFile(EVENT_SUBJECT_SETTER_MASK);
+
+        setEventEnumTempFileHandle(getTemporaryFileHandle(EVENT_ENUM_FILE_NAME));
+        setEventMethodTempFileHandle(getTemporaryFileHandle(EVENT_METHOD_FILE_NAME));
+        setEventSubjectAttributeTempFileHandle(getTemporaryFileHandle(EVENT_SUBJECT_ATTRIBUTE_FILE_NAME));
+        setEventSubjectGetterTempFileHandle(getTemporaryFileHandle(EVENT_SUBJECT_GETTER_FILE_NAME));
+        setEventSubjectSetterTempFileHandle(getTemporaryFileHandle(EVENT_SUBJECT_SETTER_FILE_NAME));
+    }
+
+    /*Adds event method contents to event file.*/
+    private static String getEventFileContents(String eventClassname, String classname) {
+        return "\n" +
+                "    /**\n" +
+                "     * Creates " + classname + " event with type and subject.\n" +
+                "     *\n" +
+                "     * @param type event type\n" +
+                "     * @param subject subject " + classname + "\n" +
+                "     */\n" +
+                "    public " + eventClassname + "(Type type, " + getCapitalCase(classname) + " subject) {\n" +
+                "        super(type, subject);\n" +
+                "    }\n" +
+                "\n" +
+                "    /**\n" +
+                "     * Creates " + classname + " event with type, subject and time.\n" +
+                "     *\n" +
+                "     * @param type event type\n" +
+                "     * @param subject subject " + classname + "\n" +
+                "     * @param time time of event\n" +
+                "     */\n" +
+                "    public " + eventClassname + "(Type type, " + getCapitalCase(classname)
+                + " subject, long time) {\n" +
+                "        super(type, subject, time);\n" +
+                "    }\n" +
+                "\n";
+    }
+
+    /**
+     * Returns event's java file handle.
+     *
+     * @return java file handle
+     */
+    private File getEventJavaFileHandle() {
+        return eventJavaFileHandle;
+    }
+
+    /**
+     * Sets event's java file handle.
+     *
+     * @param eventJavaFileHandle file handle for event
+     */
+    private void setEventJavaFileHandle(File eventJavaFileHandle) {
+        this.eventJavaFileHandle = eventJavaFileHandle;
+    }
+
+    /**
+     * Returns event listeners's java file handle.
+     *
+     * @return java file handle
+     */
+    private File getEventListenerJavaFileHandle() {
+        return eventListenerJavaFileHandle;
+    }
+
+    /**
+     * Sets event's java file handle.
+     *
+     * @param eventListenerJavaFileHandle file handle for event
+     */
+    private void setEventListenerJavaFileHandle(File eventListenerJavaFileHandle) {
+        this.eventListenerJavaFileHandle = eventListenerJavaFileHandle;
+    }
+
+    /**
+     * Returns event subject's java file handle.
+     *
+     * @return java file handle
+     */
+    private File getEventSubjectJavaFileHandle() {
+        return eventSubjectJavaFileHandle;
+    }
+
+    /**
+     * Sets event's subject java file handle.
+     *
+     * @param eventSubjectJavaFileHandle file handle for event's subject
+     */
+    private void setEventSubjectJavaFileHandle(File eventSubjectJavaFileHandle) {
+        this.eventSubjectJavaFileHandle = eventSubjectJavaFileHandle;
+    }
+
+    public void generateJavaFile(int fileType, YangNode curNode) throws IOException {
+        generateEventJavaFile(curNode);
+        generateEventListenerJavaFile(curNode);
+        generateEventSubjectJavaFile(curNode);
+    }
+
+    /**
+     * Constructs java code exit.
+     *
+     * @param curNode current YANG node
+     * @throws IOException when fails to generate java files
+     */
+    public void generateEventJavaFile(YangNode curNode)
+            throws IOException {
+
+        List<String> imports = new ArrayList<>();
+
+        imports.add(getJavaImportData().getAbstractEventsImport());
+        String curNodeInfo = getCapitalCase(((JavaFileInfoContainer) curNode).getJavaFileInfo().getJavaName());
+        String nodeName = curNodeInfo + EVENT_STRING;
+
+        addEnumMethod(nodeName, curNodeInfo + EVENT_SUBJECT_NAME_SUFFIX);
+
+        /**
+         * Creates event interface file.
+         */
+        setEventJavaFileHandle(getJavaFileHandle(curNode, curNodeInfo + EVENT_FILE_NAME_SUFFIX));
+        generateEventFile(getEventJavaFileHandle(), curNode, imports);
+
+        /**
+         * Close all the file handles.
+         */
+        freeTemporaryResources(false);
+    }
+
+    /**
+     * Constructs java code exit.
+     *
+     * @param curNode  current YANG node
+     * @throws IOException when fails to generate java files
+     */
+    public void generateEventListenerJavaFile(YangNode curNode)
+            throws IOException {
+
+        List<String> imports = new ArrayList<>();
+
+        imports.add(getJavaImportData().getEventListenerImport());
+        String curNodeInfo = getCapitalCase(((JavaFileInfoContainer) curNode)
+                .getJavaFileInfo().getJavaName());
+        /**
+         * Creates event listener interface file.
+         */
+        setEventListenerJavaFileHandle(
+                getJavaFileHandle(curNode, curNodeInfo + EVENT_LISTENER_FILE_NAME_SUFFIX));
+        generateEventListenerFile(getEventListenerJavaFileHandle(), curNode, imports);
+
+        /**
+         * Close all the file handles.
+         */
+        freeTemporaryResources(false);
+    }
+
+    /**
+     * Constructs java code exit.
+     *
+     * @param curNode current YANG node
+     * @throws IOException when fails to generate java files
+     */
+    public void generateEventSubjectJavaFile(YangNode curNode)
+            throws IOException {
+
+        String curNodeInfo = getCapitalCase(((JavaFileInfoContainer) curNode)
+                .getJavaFileInfo().getJavaName());
+        /**
+         * Creates event interface file.
+         */
+        setEventSubjectJavaFileHandle(getJavaFileHandle(curNode, curNodeInfo +
+                TempJavaEventFragmentFiles.EVENT_SUBJECT_NAME_SUFFIX));
+        generateEventSubjectFile(getEventSubjectJavaFileHandle(), curNode);
+
+        /**
+         * Close all the file handles.
+         */
+        freeTemporaryResources(false);
+    }
+
+    /**
+     * Returns event enum temp file.
+     *
+     * @return event enum temp file
+     */
+    public File getEventEnumTempFileHandle() {
+        return eventEnumTempFileHandle;
+    }
+
+    /**
+     * Sets event enum temp file.
+     *
+     * @param eventEnumTempFileHandle event enum temp file
+     */
+    public void setEventEnumTempFileHandle(File eventEnumTempFileHandle) {
+        this.eventEnumTempFileHandle = eventEnumTempFileHandle;
+    }
+
+    /**
+     * Returns event method temp file.
+     *
+     * @return event method temp file
+     */
+    public File getEventMethodTempFileHandle() {
+        return eventMethodTempFileHandle;
+    }
+
+    /**
+     * Sets event method temp file.
+     *
+     * @param eventMethodTempFileHandle event method temp file
+     */
+    public void setEventMethodTempFileHandle(File eventMethodTempFileHandle) {
+        this.eventMethodTempFileHandle = eventMethodTempFileHandle;
+    }
+
+    /**
+     * Returns event subject attribute temp file.
+     *
+     * @return event subject attribute temp file
+     */
+    public File getEventSubjectAttributeTempFileHandle() {
+        return eventSubjectAttributeTempFileHandle;
+    }
+
+    /**
+     * Sets event subject attribute temp file.
+     *
+     * @param eventSubjectAttributeTempFileHandle event subject attribute temp file
+     */
+    public void setEventSubjectAttributeTempFileHandle(File eventSubjectAttributeTempFileHandle) {
+        this.eventSubjectAttributeTempFileHandle = eventSubjectAttributeTempFileHandle;
+    }
+
+    /**
+     * Returns event subject getter temp file.
+     *
+     * @return event subject getter temp file
+     */
+    public File getEventSubjectGetterTempFileHandle() {
+        return eventSubjectGetterTempFileHandle;
+    }
+
+    /**
+     * Sets event subject getter temp file.
+     *
+     * @param eventSubjectGetterTempFileHandle event subject getter temp file
+     */
+    public void setEventSubjectGetterTempFileHandle(File eventSubjectGetterTempFileHandle) {
+        this.eventSubjectGetterTempFileHandle = eventSubjectGetterTempFileHandle;
+    }
+
+    /**
+     * Returns event subject setter temp file.
+     *
+     * @return event subject setter temp file
+     */
+    public File getEventSubjectSetterTempFileHandle() {
+        return eventSubjectSetterTempFileHandle;
+    }
+
+    /**
+     * Sets event subject setter temp file.
+     *
+     * @param eventSubjectSetterTempFileHandle event subject setter temp file
+     */
+    public void setEventSubjectSetterTempFileHandle(File eventSubjectSetterTempFileHandle) {
+        this.eventSubjectSetterTempFileHandle = eventSubjectSetterTempFileHandle;
+    }
+
+    /**
+     * Adds java snippet for events to event subject file.
+     *
+     * @param curNode      current node
+     * @param pluginConfig plugin configurations
+     * @throws IOException when fails to do IO operations
+     */
+    public void addJavaSnippetOfEvent(YangNode curNode, YangPluginConfig pluginConfig)
+            throws IOException {
+
+        String currentInfo = getCapitalCase(getCamelCase(curNode.getName(),
+                pluginConfig.getConflictResolver()));
+        String notificationName = curNode.getName();
+
+        JavaQualifiedTypeInfo qualifiedTypeInfo = getQualifiedTypeInfoOfCurNode(curNode,
+                getCapitalCase(currentInfo));
+
+        JavaAttributeInfo javaAttributeInfo = getAttributeInfoForTheData(qualifiedTypeInfo, getSmallCase(currentInfo),
+                null, false, false);
+
+        /*Adds java info for event in respective temp files.*/
+        addEventEnum(notificationName, pluginConfig);
+        addEventSubjectAttribute(javaAttributeInfo, pluginConfig);
+        addEventSubjectGetter(javaAttributeInfo, pluginConfig);
+        addEventSubjectSetter(javaAttributeInfo, pluginConfig, currentInfo);
+    }
+
+    /*Adds event to enum temp file.*/
+    private void addEventEnum(String notificationName, YangPluginConfig pluginConfig)
+            throws IOException {
+        appendToFile(getEventEnumTempFileHandle(),
+                getJavaDoc(ENUM_ATTRIBUTE, notificationName, false, pluginConfig) + FOUR_SPACE_INDENTATION
+                        + getEnumJavaAttribute(notificationName).toUpperCase() + COMMA + NEW_LINE);
+    }
+
+    /*Adds event method in event class*/
+    private void addEnumMethod(String eventClassname, String className)
+            throws IOException {
+        appendToFile(getEventMethodTempFileHandle(), getEventFileContents(eventClassname, className));
+    }
+
+    /*Adds events to event subject file.*/
+    private void addEventSubjectAttribute(JavaAttributeInfo attr, YangPluginConfig pluginConfig)
+            throws IOException {
+        appendToFile(getEventSubjectAttributeTempFileHandle(),
+                FOUR_SPACE_INDENTATION + parseAttribute(attr, pluginConfig));
+    }
+
+    /*Adds getter method for event in event subject class.*/
+    private void addEventSubjectGetter(JavaAttributeInfo attr, YangPluginConfig pluginConfig)
+            throws IOException {
+        appendToFile(getEventSubjectGetterTempFileHandle(),
+                getJavaDoc(GETTER_METHOD, getCapitalCase(attr.getAttributeName()), false, pluginConfig)
+                        + getGetterForClass(attr, GENERATE_EVENT_SUBJECT_CLASS) + NEW_LINE);
+    }
+
+    /*Adds setter method for event in event subject class.*/
+    private void addEventSubjectSetter(JavaAttributeInfo attr, YangPluginConfig pluginConfig, String className)
+            throws IOException {
+        appendToFile(getEventSubjectSetterTempFileHandle(),
+                getJavaDoc(MANAGER_SETTER_METHOD, getCapitalCase(attr.getAttributeName()), false, pluginConfig)
+                        + getSetterForClass(attr, className, GENERATE_EVENT_SUBJECT_CLASS) + NEW_LINE);
+    }
+
+    /**
+     * Returns a temporary file handle for the event's file type.
+     *
+     * @param name file name
+     * @return temporary file handle
+     * @throws IOException when fails to create new file handle
+     */
+    private File getJavaFileHandle(YangNode curNode, String name)
+            throws IOException {
+
+        JavaFileInfo parentInfo = ((JavaFileInfoContainer) curNode).getJavaFileInfo();
+        JavaFileInfo childInfo = ((JavaFileInfoContainer) curNode.getChild()).getJavaFileInfo();
+
+        return getFileObject(getDirPath(parentInfo), name, JAVA_FILE_EXTENSION,
+                childInfo.getBaseCodeGenPath());
+    }
+
+    /**
+     * Returns the directory path.
+     *
+     * @return directory path
+     */
+    private String getDirPath(JavaFileInfo parentInfo) {
+        return (parentInfo.getPackageFilePath() + SLASH + parentInfo.getJavaName()).toLowerCase();
+    }
+}
diff --git a/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/TempJavaFragmentFiles.java b/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/TempJavaFragmentFiles.java
index d4bb888..33ca972 100644
--- a/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/TempJavaFragmentFiles.java
+++ b/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/TempJavaFragmentFiles.java
@@ -19,19 +19,17 @@
 import java.io.IOException;
 import java.util.List;
 
+import org.onosproject.yangutils.datamodel.YangAugment;
 import org.onosproject.yangutils.datamodel.YangAugmentableNode;
 import org.onosproject.yangutils.datamodel.YangCase;
 import org.onosproject.yangutils.datamodel.YangLeaf;
 import org.onosproject.yangutils.datamodel.YangLeafList;
 import org.onosproject.yangutils.datamodel.YangLeavesHolder;
-import org.onosproject.yangutils.datamodel.YangList;
 import org.onosproject.yangutils.datamodel.YangModule;
 import org.onosproject.yangutils.datamodel.YangNode;
 import org.onosproject.yangutils.datamodel.YangSubModule;
-import org.onosproject.yangutils.datamodel.YangUses;
 import org.onosproject.yangutils.translator.exception.TranslatorException;
 import org.onosproject.yangutils.translator.tojava.javamodel.JavaLeafInfoContainer;
-import org.onosproject.yangutils.translator.tojava.javamodel.YangJavaAugment;
 import org.onosproject.yangutils.translator.tojava.javamodel.YangJavaGrouping;
 import org.onosproject.yangutils.translator.tojava.javamodel.YangJavaModule;
 import org.onosproject.yangutils.translator.tojava.javamodel.YangJavaSubModule;
@@ -69,9 +67,9 @@
 import static org.onosproject.yangutils.translator.tojava.utils.JavaFileGenerator.generateBuilderInterfaceFile;
 import static org.onosproject.yangutils.translator.tojava.utils.JavaFileGenerator.generateImplClassFile;
 import static org.onosproject.yangutils.translator.tojava.utils.JavaFileGenerator.generateInterfaceFile;
-import static org.onosproject.yangutils.translator.tojava.utils.JavaFileGeneratorUtils.addResolvedAugmentedDataNodeImports;
 import static org.onosproject.yangutils.translator.tojava.utils.JavaFileGenerator.generateOpParamBuilderClassFile;
 import static org.onosproject.yangutils.translator.tojava.utils.JavaFileGenerator.generateOpParamImplClassFile;
+import static org.onosproject.yangutils.translator.tojava.utils.JavaFileGeneratorUtils.addResolvedAugmentedDataNodeImports;
 import static org.onosproject.yangutils.translator.tojava.utils.JavaFileGeneratorUtils.getFileObject;
 import static org.onosproject.yangutils.translator.tojava.utils.JavaIdentifierSyntax.createPackage;
 import static org.onosproject.yangutils.translator.tojava.utils.MethodsGenerator.getAugmentedConstructor;
@@ -99,15 +97,16 @@
 import static org.onosproject.yangutils.utils.UtilConstants.INTERFACE;
 import static org.onosproject.yangutils.utils.UtilConstants.MANAGER;
 import static org.onosproject.yangutils.utils.UtilConstants.NEW_LINE;
+import static org.onosproject.yangutils.utils.UtilConstants.OPERATION;
 import static org.onosproject.yangutils.utils.UtilConstants.PERIOD;
+import static org.onosproject.yangutils.utils.UtilConstants.PRIVATE;
+import static org.onosproject.yangutils.utils.UtilConstants.PROTECTED;
 import static org.onosproject.yangutils.utils.UtilConstants.REFERENCE;
 import static org.onosproject.yangutils.utils.UtilConstants.REFERENCE_CARDINALITY;
 import static org.onosproject.yangutils.utils.UtilConstants.SEMI_COLAN;
 import static org.onosproject.yangutils.utils.UtilConstants.SERVICE;
 import static org.onosproject.yangutils.utils.UtilConstants.SLASH;
-import static org.onosproject.yangutils.utils.UtilConstants.OPERATION;
-import static org.onosproject.yangutils.utils.UtilConstants.PRIVATE;
-import static org.onosproject.yangutils.utils.UtilConstants.PROTECTED;
+import static org.onosproject.yangutils.utils.UtilConstants.YANG_AUGMENTED_INFO;
 import static org.onosproject.yangutils.utils.io.impl.FileSystemUtil.closeFile;
 import static org.onosproject.yangutils.utils.io.impl.FileSystemUtil.readAppendFile;
 import static org.onosproject.yangutils.utils.io.impl.JavaDocGen.JavaDocType.GETTER_METHOD;
@@ -340,6 +339,11 @@
     private boolean isAttributePresent;
 
     /**
+     * Base code gen path.
+     */
+    private String baseCodePath;
+
+    /**
      * Temporary file handle for augments copy constructor method of class.
      */
     private File augmentConstructorImplTempFileHandle;
@@ -358,9 +362,15 @@
         setJavaExtendsListHolder(new JavaExtendsListHolder());
         setJavaImportData(new JavaImportData());
         setJavaFileInfo(javaFileInfo);
-        setAbsoluteDirPath(getAbsolutePackagePath(getJavaFileInfo().getBaseCodeGenPath(),
-                getJavaFileInfo().getPackageFilePath()));
-
+        if ((javaFileInfo.getGeneratedFileTypes() & GENERATE_SERVICE_AND_MANAGER) != 0) {
+            setBaseCodePath(getJavaFileInfo().getPluginConfig().getCodeGenDir());
+            setAbsoluteDirPath(getAbsolutePackagePath(getJavaFileInfo().getPluginConfig().getCodeGenDir(),
+                    getJavaFileInfo().getPackageFilePath()));
+        } else {
+            setBaseCodePath(getJavaFileInfo().getBaseCodeGenPath());
+            setAbsoluteDirPath(getAbsolutePackagePath(getJavaFileInfo().getBaseCodeGenPath(),
+                    getJavaFileInfo().getPackageFilePath()));
+        }
         /*
          * Initialize getter when generation file type matches to interface
          * mask.
@@ -584,6 +594,24 @@
     }
 
     /**
+     * Returns base code path.
+     *
+     * @return base code path
+     */
+    public String getBaseCodePath() {
+        return baseCodePath;
+    }
+
+    /**
+     * Sets base code path.
+     *
+     * @param baseCodePath base code path
+     */
+    public void setBaseCodePath(String baseCodePath) {
+        this.baseCodePath = baseCodePath;
+    }
+
+    /*
      * Retrieves the absolute path where the file needs to be generated.
      *
      * @return absolute path where the file needs to be generated
@@ -1180,7 +1208,7 @@
      */
     File getJavaFileHandle(String fileName)
             throws IOException {
-        return getFileObject(getDirPath(), fileName, JAVA_FILE_EXTENSION, getJavaFileInfo());
+        return getFileObject(getDirPath(), fileName, JAVA_FILE_EXTENSION, getBaseCodePath());
     }
 
     /**
@@ -1500,6 +1528,8 @@
         if (curNode instanceof YangModule || curNode instanceof YangSubModule) {
             addResolvedAugmentedDataNodeImports(curNode);
         }
+        TempJavaBeanFragmentFiles tempJavaBeanFragmentFiles = ((JavaCodeGeneratorInfo) curNode)
+                .getTempJavaCodeFragmentFiles().getBeanTempFiles();
         List<String> imports = ((JavaCodeGeneratorInfo) curNode).getTempJavaCodeFragmentFiles().getBeanTempFiles()
                 .getJavaImportData().getImports();
 
@@ -1539,17 +1569,9 @@
             if (curNode instanceof YangCase) {
                 removeCaseImport(imports);
             }
-            if (curNode instanceof YangJavaAugment) {
-                updateAugmentConstructorTempFile(curNode, curInfo.getPluginConfig());
-                YangJavaAugment augment = (YangJavaAugment) curNode;
-                List<JavaQualifiedTypeInfo> infoList = augment.getExtendedClassInfo();
-                for (JavaQualifiedTypeInfo info : infoList) {
-                    if (info.getClassInfo()
-                            .equals(getCapitalCase(getCamelCase(augment.getAugmentedNode().getName(), null)))) {
-                        removeAugmentedImport(imports, info);
-                    }
 
-                }
+            if (curNode instanceof YangAugment) {
+                removeAugmentedInfoImport(imports);
             }
         }
         if ((fileType & BUILDER_CLASS_MASK) != 0 || (fileType & IMPL_CLASS_MASK) != 0) {
@@ -1557,7 +1579,7 @@
                 addImportsToStringAndHasCodeMethods(imports, true);
             }
             if (curNode instanceof YangAugmentableNode) {
-                addImportsForAugmentableClass(imports);
+                addImportsForAugmentableClass(imports, true);
             }
             sortImports(imports);
             /*
@@ -1582,19 +1604,33 @@
                 validateLineLength(getImplClassJavaFileHandle());
             }
             insertDataIntoJavaFile(getImplClassJavaFileHandle(), getJavaClassDefClose());
-
+            if (curNode instanceof YangAugmentableNode) {
+                addImportsForAugmentableClass(imports, false);
+            }
             if (!(curNode instanceof YangModule)) {
                 if (isAttributePresent()) {
                     addImportsToStringAndHasCodeMethods(imports, false);
                 }
+                if (curNode instanceof YangAugmentableNode) {
+                    addYangAugmentedOpParamInfoImport(imports);
+                }
+                JavaQualifiedTypeInfo qualifiedTypeInfo = new JavaQualifiedTypeInfo();
+                qualifiedTypeInfo.setClassInfo(getCapitalCase(DEFAULT) + getCapitalCase(getJavaFileInfo()
+                        .getJavaName()));
+                qualifiedTypeInfo.setPkgInfo(getJavaFileInfo().getPackage());
+                getJavaExtendsListHolder().addToExtendsList(qualifiedTypeInfo, curNode,
+                        tempJavaBeanFragmentFiles);
                 addBitsetImport(imports, true);
+                if (curNode instanceof YangAugment) {
+                    addYangAugmentedOpParamInfoImport(imports);
+                }
                 /*
                  * Create impl class file.
                  */
                 setOpParamClassJavaFileHandle(getJavaFileHandle(getOpParamImplClassName()));
                 setOpParamClassJavaFileHandle(
                         generateOpParamImplClassFile(getOpParamClassJavaFileHandle(), curNode,
-                                                     isAttributePresent(), imports));
+                                isAttributePresent(), imports));
 
                 /*
                  * Create builder class file.
@@ -1603,7 +1639,7 @@
                     setBuilderOpParmClassJavaFileHandle(getJavaFileHandle(getOpParamBuilderImplClassName()));
                     setBuilderOpParmClassJavaFileHandle(
                             generateOpParamBuilderClassFile(getBuilderOpParmClassJavaFileHandle(), curNode,
-                                                            isAttributePresent()));
+                                    isAttributePresent()));
                     /*
                      * Append impl class to builder class and close it.
                      */
@@ -1613,6 +1649,7 @@
                     addBitsetImport(imports, false);
                 }
                 insertDataIntoJavaFile(getOpParamClassJavaFileHandle(), getJavaClassDefClose());
+
             }
         }
         /*
@@ -1621,56 +1658,15 @@
         freeTemporaryResources(false);
     }
 
-    /**
-     * Updates augment constructor temp file.
-     *
-     * @param curNode      current augment node
-     * @param pluginConfig plugin configurations
-     * @throws IOException when fails to do IO operations
-     */
-    private void updateAugmentConstructorTempFile(YangNode curNode, YangPluginConfig pluginConfig)
-            throws IOException {
-        YangJavaAugment augment = (YangJavaAugment) curNode;
-
-        TempJavaBeanFragmentFiles tempJavaBeanFragmentFiles = ((JavaCodeGeneratorInfo) curNode)
-                .getTempJavaCodeFragmentFiles().getBeanTempFiles();
-        YangNode augmentedNode = augment.getAugmentedNode();
-        if (augmentedNode instanceof YangLeavesHolder) {
-            YangLeavesHolder holder = (YangLeavesHolder) augmentedNode;
-            if (holder.getListOfLeaf() != null) {
-                for (YangLeaf leaf : holder.getListOfLeaf()) {
-                    addAugmentConstructor(getJavaAttributeOfLeaf(this, leaf,
-                                                                 pluginConfig), pluginConfig);
-                }
-
-            }
-            if (holder.getListOfLeafList() != null) {
-                for (YangLeafList leafList : holder.getListOfLeafList()) {
-                    addAugmentConstructor(getJavaAttributeOfLeafList(this, leafList,
-                                                                     pluginConfig), pluginConfig);
-                }
-
-            }
-        }
-        augmentedNode = augmentedNode.getChild();
-        boolean isList = false;
-        while (augmentedNode != null) {
-            if (augmentedNode instanceof YangList) {
-                isList = true;
-            }
-            if (!(augmentedNode instanceof YangUses)) {
-                addAugmentConstructor(getCurNodeAsAttributeInTarget(augmentedNode, augment, isList,
-                        tempJavaBeanFragmentFiles), pluginConfig);
-            }
-            augmentedNode = augmentedNode.getNextSibling();
-        }
-
+    /*Adds import for YANG augmented op param info.*/
+    private void addYangAugmentedOpParamInfoImport(List<String> imports) {
+        imports.add(getJavaImportData().getYangAugmentedOpParamInfoImport());
     }
 
     /**
      * Adds imports for ToString and HashCodeMethod.
      *
-     * @param imports import list
+     * @param imports   import list
      * @param operation add or remove
      */
     public void addImportsToStringAndHasCodeMethods(List<String> imports, boolean operation) {
@@ -1686,7 +1682,7 @@
     /**
      * Adds imports for bitset method.
      *
-     * @param imports import list
+     * @param imports   import list
      * @param operation add or remove
      */
     public void addBitsetImport(List<String> imports, boolean operation) {
@@ -1701,34 +1697,18 @@
     /**
      * Adds import for map and hash map.
      *
-     * @param imports import list
+     * @param imports    import list
+     * @param operations true for adding and false for deletion
      */
-    public void addImportsForAugmentableClass(List<String> imports) {
-        imports.add(getJavaImportData().getHashMapImport());
-        imports.add(getJavaImportData().getMapImport());
-        imports.add(getJavaImportData().getYangAugmentedInfoImport());
-    }
-
-    /**
-     * Removes augmented node import info from import list.
-     *
-     * @param imports list of imports
-     * @return import for class
-     */
-    private List<String> removeAugmentedImport(List<String> imports, JavaQualifiedTypeInfo augmentedInfo) {
-        String augmentedNodeImport;
-        if (imports != null && augmentedInfo != null) {
-            augmentedNodeImport = IMPORT + augmentedInfo.getPkgInfo() + PERIOD + getCapitalCase(DEFAULT)
-                    + augmentedInfo.getClassInfo() + PERIOD + augmentedInfo.getClassInfo()
-                    + BUILDER + SEMI_COLAN + NEW_LINE;
-            imports.remove(augmentedNodeImport);
-            augmentedNodeImport = IMPORT + augmentedInfo.getPkgInfo() + PERIOD
-                    + augmentedInfo.getClassInfo() + PERIOD + augmentedInfo.getClassInfo()
-                    + BUILDER + SEMI_COLAN + NEW_LINE;
-            imports.remove(augmentedNodeImport);
-            imports.remove(getJavaImportData().getYangAugmentedInfoImport());
+    public void addImportsForAugmentableClass(List<String> imports, boolean operations) {
+        if (operations) {
+            imports.add(getJavaImportData().getHashMapImport());
+            imports.add(getJavaImportData().getMapImport());
+            imports.add(getJavaImportData().getYangAugmentedInfoImport());
+        } else {
+            imports.remove(getJavaImportData().getHashMapImport());
+            imports.remove(getJavaImportData().getMapImport());
         }
-        return imports;
     }
 
     /**
@@ -1747,6 +1727,23 @@
     }
 
     /**
+     * Removes case import info from import list.
+     *
+     * @param imports list of imports
+     * @return import for class
+     */
+    private void removeAugmentedInfoImport(List<String> imports) {
+        imports.remove(getJavaImportData().getYangAugmentedInfoImport());
+
+        for (JavaQualifiedTypeInfo type : getJavaImportData().getImportSet()) {
+            if (type.getClassInfo().equals(YANG_AUGMENTED_INFO)) {
+                getJavaImportData().getImportSet().remove(type);
+                getJavaExtendsListHolder().getExtendsList().remove(type);
+            }
+        }
+    }
+
+    /**
      * Removes all temporary file handles.
      *
      * @param isErrorOccurred when translator fails to generate java files we need to close all open file handles
@@ -1827,7 +1824,7 @@
     /**
      * Sets the java file handle for op param class file.
      *
-     * @param opParamClassJavaFileHandle  java file handle
+     * @param opParamClassJavaFileHandle java file handle
      */
     public void setOpParamClassJavaFileHandle(File opParamClassJavaFileHandle) {
         this.opParamClassJavaFileHandle = opParamClassJavaFileHandle;
diff --git a/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/TempJavaServiceFragmentFiles.java b/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/TempJavaServiceFragmentFiles.java
index af2ed42..0a7971b 100644
--- a/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/TempJavaServiceFragmentFiles.java
+++ b/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/TempJavaServiceFragmentFiles.java
@@ -18,7 +18,6 @@
 
 import java.io.File;
 import java.io.IOException;
-import java.util.ArrayList;
 import java.util.List;
 
 import org.onosproject.yangutils.datamodel.YangNode;
@@ -27,52 +26,26 @@
 import org.onosproject.yangutils.translator.tojava.utils.JavaExtendsListHolder;
 import org.onosproject.yangutils.utils.io.impl.YangPluginConfig;
 
-import static org.onosproject.yangutils.translator.tojava.GeneratedJavaFileType.GENERATE_EVENT_LISTENER_INTERFACE;
-import static org.onosproject.yangutils.translator.tojava.GeneratedJavaFileType.GENERATE_EVENT_SUBJECT_CLASS;
-import static org.onosproject.yangutils.translator.tojava.GeneratedTempFileType.EVENT_ENUM_MASK;
-import static org.onosproject.yangutils.translator.tojava.GeneratedTempFileType.EVENT_METHOD_MASK;
-import static org.onosproject.yangutils.translator.tojava.GeneratedTempFileType.EVENT_SUBJECT_ATTRIBUTE_MASK;
-import static org.onosproject.yangutils.translator.tojava.GeneratedTempFileType.EVENT_SUBJECT_GETTER_MASK;
-import static org.onosproject.yangutils.translator.tojava.GeneratedTempFileType.EVENT_SUBJECT_SETTER_MASK;
 import static org.onosproject.yangutils.translator.tojava.GeneratedTempFileType.RPC_IMPL_MASK;
 import static org.onosproject.yangutils.translator.tojava.GeneratedTempFileType.RPC_INTERFACE_MASK;
-import static org.onosproject.yangutils.translator.tojava.JavaAttributeInfo.getAttributeInfoForTheData;
-import static org.onosproject.yangutils.translator.tojava.JavaQualifiedTypeInfo.getQualifiedTypeInfoOfCurNode;
 import static org.onosproject.yangutils.translator.tojava.utils.JavaCodeSnippetGen.addAnnotationsImports;
 import static org.onosproject.yangutils.translator.tojava.utils.JavaCodeSnippetGen.addListenersImport;
 import static org.onosproject.yangutils.translator.tojava.utils.JavaCodeSnippetGen.getJavaClassDefClose;
-import static org.onosproject.yangutils.translator.tojava.utils.JavaFileGenerator.generateEventFile;
-import static org.onosproject.yangutils.translator.tojava.utils.JavaFileGenerator.generateEventListenerFile;
-import static org.onosproject.yangutils.translator.tojava.utils.JavaFileGenerator.generateEventSubjectFile;
 import static org.onosproject.yangutils.translator.tojava.utils.JavaFileGenerator.generateManagerClassFile;
 import static org.onosproject.yangutils.translator.tojava.utils.JavaFileGenerator.generateServiceInterfaceFile;
-import static org.onosproject.yangutils.translator.tojava.utils.JavaFileGeneratorUtils.getFileObject;
 import static org.onosproject.yangutils.translator.tojava.utils.JavaIdentifierSyntax.createPackage;
-import static org.onosproject.yangutils.translator.tojava.utils.JavaIdentifierSyntax.getEnumJavaAttribute;
-import static org.onosproject.yangutils.translator.tojava.utils.MethodsGenerator.getGetterForClass;
 import static org.onosproject.yangutils.translator.tojava.utils.MethodsGenerator.getRpcManagerMethod;
 import static org.onosproject.yangutils.translator.tojava.utils.MethodsGenerator.getRpcServiceMethod;
-import static org.onosproject.yangutils.translator.tojava.utils.MethodsGenerator.getSetterForClass;
-import static org.onosproject.yangutils.utils.UtilConstants.COMMA;
 import static org.onosproject.yangutils.utils.UtilConstants.EMPTY_STRING;
-import static org.onosproject.yangutils.utils.UtilConstants.EVENT_STRING;
-import static org.onosproject.yangutils.utils.UtilConstants.FOUR_SPACE_INDENTATION;
 import static org.onosproject.yangutils.utils.UtilConstants.LISTENER_REG;
 import static org.onosproject.yangutils.utils.UtilConstants.LISTENER_SERVICE;
 import static org.onosproject.yangutils.utils.UtilConstants.NEW_LINE;
 import static org.onosproject.yangutils.utils.UtilConstants.RPC_INPUT_VAR_NAME;
-import static org.onosproject.yangutils.utils.UtilConstants.SLASH;
 import static org.onosproject.yangutils.utils.UtilConstants.VOID;
 import static org.onosproject.yangutils.utils.io.impl.FileSystemUtil.closeFile;
-import static org.onosproject.yangutils.utils.io.impl.JavaDocGen.JavaDocType.ENUM_ATTRIBUTE;
-import static org.onosproject.yangutils.utils.io.impl.JavaDocGen.JavaDocType.GETTER_METHOD;
-import static org.onosproject.yangutils.utils.io.impl.JavaDocGen.JavaDocType.MANAGER_SETTER_METHOD;
 import static org.onosproject.yangutils.utils.io.impl.JavaDocGen.generateJavaDocForRpc;
-import static org.onosproject.yangutils.utils.io.impl.JavaDocGen.getJavaDoc;
 import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getAbsolutePackagePath;
-import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getCamelCase;
 import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getCapitalCase;
-import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getSmallCase;
 import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.insertDataIntoJavaFile;
 
 /**
@@ -83,10 +56,6 @@
         extends TempJavaFragmentFiles {
 
     /**
-     * File name for generated class file for special type like union, typedef suffix.
-     */
-    public static final String EVENT_SUBJECT_NAME_SUFFIX = "EventSubject";
-    /**
      * File name for rpc method.
      */
     private static final String RPC_INTERFACE_FILE_NAME = "Rpc";
@@ -97,69 +66,19 @@
     private static final String RPC_IMPL_FILE_NAME = "RpcImpl";
 
     /**
-     * File name for event enum temp file.
-     */
-    private static final String EVENT_ENUM_FILE_NAME = "EventEnum";
-
-    /**
-     * File name for event method temp file.
-     */
-    private static final String EVENT_METHOD_FILE_NAME = "EventMethod";
-
-    /**
-     * File name for event subject attribute temp file.
-     */
-    private static final String EVENT_SUBJECT_ATTRIBUTE_FILE_NAME = "EventSubjectAttribute";
-
-    /**
-     * File name for event subject getter temp file.
-     */
-    private static final String EVENT_SUBJECT_GETTER_FILE_NAME = "EventSubjectGetter";
-
-    /**
-     * File name for event subject setter temp file.
-     */
-    private static final String EVENT_SUBJECT_SETTER_FILE_NAME = "EventSubjectSetter";
-
-    /**
-     * File name for generated class file for service
-     * suffix.
+     * File name for generated class file for service suffix.
      */
     private static final String SERVICE_FILE_NAME_SUFFIX = "Service";
 
     /**
-     * File name for generated class file for manager
-     * suffix.
+     * File name for generated class file for manager suffix.
      */
     private static final String MANAGER_FILE_NAME_SUFFIX = "Manager";
 
     /**
-     * File name for generated class file for special type like union, typedef
-     * suffix.
+     * Flag to set the manager files generation.
      */
-    private static final String EVENT_FILE_NAME_SUFFIX = "Event";
-
-    /**
-     * File name for generated class file for special type like union, typedef
-     * suffix.
-     */
-    private static final String EVENT_LISTENER_FILE_NAME_SUFFIX = "Listener";
-    private static final String JAVA_FILE_EXTENSION = ".java";
-
-    /**
-     * Java file handle for event subject file.
-     */
-    private File eventSubjectJavaFileHandle;
-
-    /**
-     * Java file handle for event listener file.
-     */
-    private File eventListenerJavaFileHandle;
-
-    /**
-     * Java file handle for event file.
-     */
-    private File eventJavaFileHandle;
+    boolean isManagerNeedToBeGenerated = false;
 
     /**
      * Temporary file handle for rpc interface.
@@ -177,36 +96,16 @@
     private File serviceInterfaceJavaFileHandle;
 
     /**
+     * Path for serive file to be generated.
+     */
+    private String serviceGenPath;
+
+    /**
      * Java file handle for manager impl file.
      */
     private File managerJavaFileHandle;
 
     /**
-     * Java file handle for event enum impl file.
-     */
-    private File eventEnumTempFileHandle;
-
-    /**
-     * Java file handle for event method impl file.
-     */
-    private File eventMethodTempFileHandle;
-
-    /**
-     * Java file handle for event subject attribute file.
-     */
-    private File eventSubjectAttributeTempFileHandle;
-
-    /**
-     * Java file handle for event subject getter impl file.
-     */
-    private File eventSubjectGetterTempFileHandle;
-
-    /**
-     * Java file handle for event subject setter impl file.
-     */
-    private File eventSubjectSetterTempFileHandle;
-
-    /**
      * Creates an instance of temporary java code fragment.
      *
      * @param javaFileInfo generated file information
@@ -217,52 +116,15 @@
         setJavaExtendsListHolder(new JavaExtendsListHolder());
         setJavaImportData(new JavaImportData());
         setJavaFileInfo(javaFileInfo);
+        setBaseCodePath(getJavaFileInfo().getBaseCodeGenPath());
+        setServiceGenPath(getJavaFileInfo().getPluginConfig().getCodeGenDir());
         setAbsoluteDirPath(getAbsolutePackagePath(getJavaFileInfo().getBaseCodeGenPath(),
                 getJavaFileInfo().getPackageFilePath()));
         addGeneratedTempFile(RPC_INTERFACE_MASK);
         addGeneratedTempFile(RPC_IMPL_MASK);
 
-        addGeneratedTempFile(EVENT_ENUM_MASK);
-        addGeneratedTempFile(EVENT_METHOD_MASK);
-        addGeneratedTempFile(EVENT_SUBJECT_ATTRIBUTE_MASK);
-        addGeneratedTempFile(EVENT_SUBJECT_GETTER_MASK);
-        addGeneratedTempFile(EVENT_SUBJECT_SETTER_MASK);
-
         setRpcInterfaceTempFileHandle(getTemporaryFileHandle(RPC_INTERFACE_FILE_NAME));
         setRpcImplTempFileHandle(getTemporaryFileHandle(RPC_IMPL_FILE_NAME));
-
-        setEventEnumTempFileHandle(getTemporaryFileHandle(EVENT_ENUM_FILE_NAME));
-        setEventMethodTempFileHandle(getTemporaryFileHandle(EVENT_METHOD_FILE_NAME));
-        setEventSubjectAttributeTempFileHandle(getTemporaryFileHandle(EVENT_SUBJECT_ATTRIBUTE_FILE_NAME));
-        setEventSubjectGetterTempFileHandle(getTemporaryFileHandle(EVENT_SUBJECT_GETTER_FILE_NAME));
-        setEventSubjectSetterTempFileHandle(getTemporaryFileHandle(EVENT_SUBJECT_SETTER_FILE_NAME));
-    }
-
-    /*Adds event method contents to event file.*/
-    private static String getEventFileContents(String eventClassname, String classname) {
-        return "\n" +
-                "    /**\n" +
-                "     * Creates " + classname + " event with type and subject.\n" +
-                "     *\n" +
-                "     * @param type event type\n" +
-                "     * @param subject subject " + classname + "\n" +
-                "     */\n" +
-                "    public " + eventClassname + "(Type type, " + getCapitalCase(classname) + " subject) {\n" +
-                "        super(type, subject);\n" +
-                "    }\n" +
-                "\n" +
-                "    /**\n" +
-                "     * Creates " + classname + " event with type, subject and time.\n" +
-                "     *\n" +
-                "     * @param type event type\n" +
-                "     * @param subject subject " + classname + "\n" +
-                "     * @param time time of event\n" +
-                "     */\n" +
-                "    public " + eventClassname + "(Type type, " + getCapitalCase(classname)
-                + " subject, long time) {\n" +
-                "        super(type, subject, time);\n" +
-                "    }\n" +
-                "\n";
     }
 
     /**
@@ -338,60 +200,6 @@
     }
 
     /**
-     * Returns event's java file handle.
-     *
-     * @return java file handle
-     */
-    private File getEventJavaFileHandle() {
-        return eventJavaFileHandle;
-    }
-
-    /**
-     * Sets event's java file handle.
-     *
-     * @param eventJavaFileHandle file handle for event
-     */
-    private void setEventJavaFileHandle(File eventJavaFileHandle) {
-        this.eventJavaFileHandle = eventJavaFileHandle;
-    }
-
-    /**
-     * Returns event listeners's java file handle.
-     *
-     * @return java file handle
-     */
-    private File getEventListenerJavaFileHandle() {
-        return eventListenerJavaFileHandle;
-    }
-
-    /**
-     * Sets event's java file handle.
-     *
-     * @param eventListenerJavaFileHandle file handle for event
-     */
-    private void setEventListenerJavaFileHandle(File eventListenerJavaFileHandle) {
-        this.eventListenerJavaFileHandle = eventListenerJavaFileHandle;
-    }
-
-    /**
-     * Returns event subject's java file handle.
-     *
-     * @return java file handle
-     */
-    private File getEventSubjectJavaFileHandle() {
-        return eventSubjectJavaFileHandle;
-    }
-
-    /**
-     * Sets event's subject java file handle.
-     *
-     * @param eventSubjectJavaFileHandle file handle for event's subject
-     */
-    private void setEventSubjectJavaFileHandle(File eventSubjectJavaFileHandle) {
-        this.eventSubjectJavaFileHandle = eventSubjectJavaFileHandle;
-    }
-
-    /**
      * Constructs java code exit.
      *
      * @param fileType generated file type
@@ -403,9 +211,7 @@
             throws IOException {
         List<String> imports = ((JavaCodeGeneratorInfo) curNode).getTempJavaCodeFragmentFiles().getServiceTempFiles()
                 .getJavaImportData().getImports();
-
         createPackage(curNode);
-
         boolean isNotification = false;
         if (curNode instanceof YangJavaModule) {
             if (!((YangJavaModule) curNode).getNotificationNodes().isEmpty()) {
@@ -423,9 +229,10 @@
         /**
          * Creates rpc interface file.
          */
+        setBaseCodePath(getServiceGenPath());
         setServiceInterfaceJavaFileHandle(getJavaFileHandle(getJavaClassName(SERVICE_FILE_NAME_SUFFIX)));
         generateServiceInterfaceFile(getServiceInterfaceJavaFileHandle(), curNode, imports);
-
+        setBaseCodePath(getJavaFileInfo().getBaseCodeGenPath());
         if (isNotification) {
             addListenersImport(curNode, imports, false, LISTENER_SERVICE);
             addListenersImport(curNode, imports, true, LISTENER_REG);
@@ -434,21 +241,16 @@
         /**
          * Create builder class file.
          */
-        setManagerJavaFileHandle(getJavaFileHandle(getJavaClassName(MANAGER_FILE_NAME_SUFFIX)));
-        generateManagerClassFile(getManagerJavaFileHandle(), imports, curNode);
-
-        insertDataIntoJavaFile(getManagerJavaFileHandle(), getJavaClassDefClose());
+        if (isManagerNeedToBeGenerated()) {
+            setManagerJavaFileHandle(getJavaFileHandle(getJavaClassName(MANAGER_FILE_NAME_SUFFIX)));
+            generateManagerClassFile(getManagerJavaFileHandle(), imports, curNode);
+            insertDataIntoJavaFile(getManagerJavaFileHandle(), getJavaClassDefClose());
+        }
         if (isNotification) {
             addListenersImport(curNode, imports, false, LISTENER_REG);
         }
         addAnnotationsImports(imports, false);
 
-        if (isNotification) {
-            generateEventJavaFile(curNode);
-            generateEventListenerJavaFile(GENERATE_EVENT_LISTENER_INTERFACE, curNode);
-            generateEventSubjectJavaFile(curNode);
-        }
-
         /**
          * Close all the file handles.
          */
@@ -504,87 +306,6 @@
     }
 
     /**
-     * Constructs java code exit.
-     *
-     * @param curNode current YANG node
-     * @throws IOException when fails to generate java files
-     */
-    public void generateEventJavaFile(YangNode curNode)
-            throws IOException {
-
-        List<String> imports = new ArrayList<>();
-
-        imports.add(getJavaImportData().getAbstractEventsImport());
-        String curNodeInfo = getCapitalCase(((JavaFileInfoContainer) curNode).getJavaFileInfo().getJavaName());
-        String nodeName = curNodeInfo + EVENT_STRING;
-
-        addEnumMethod(nodeName, curNodeInfo + EVENT_SUBJECT_NAME_SUFFIX);
-
-        /**
-         * Creates event interface file.
-         */
-        setEventJavaFileHandle(getJavaFileHandle(curNode, curNodeInfo + EVENT_FILE_NAME_SUFFIX));
-        generateEventFile(getEventJavaFileHandle(), curNode, imports);
-
-        /**
-         * Close all the file handles.
-         */
-        freeTemporaryResources(false);
-    }
-
-    /**
-     * Constructs java code exit.
-     *
-     * @param fileType generated file type
-     * @param curNode  current YANG node
-     * @throws IOException when fails to generate java files
-     */
-    public void generateEventListenerJavaFile(int fileType, YangNode curNode)
-            throws IOException {
-
-        List<String> imports = new ArrayList<>();
-
-        imports.add(getJavaImportData().getEventListenerImport());
-        String curNodeInfo = getCapitalCase(((JavaFileInfoContainer) curNode)
-                .getJavaFileInfo().getJavaName());
-        /**
-         * Creates event listener interface file.
-         */
-        setEventListenerJavaFileHandle(
-                getJavaFileHandle(curNode, curNodeInfo + EVENT_LISTENER_FILE_NAME_SUFFIX));
-        generateEventListenerFile(getEventListenerJavaFileHandle(), curNode, imports);
-
-        /**
-         * Close all the file handles.
-         */
-        freeTemporaryResources(false);
-    }
-
-    /**
-     * Constructs java code exit.
-     *
-     * @param curNode current YANG node
-     * @throws IOException when fails to generate java files
-     */
-    public void generateEventSubjectJavaFile(YangNode curNode)
-            throws IOException {
-
-        String curNodeInfo = getCapitalCase(((JavaFileInfoContainer) curNode)
-                .getJavaFileInfo().getJavaName());
-        /**
-         * Creates event interface file.
-         */
-        setEventSubjectJavaFileHandle(getJavaFileHandle(curNode, curNodeInfo +
-                EVENT_SUBJECT_NAME_SUFFIX));
-        generateEventSubjectFile(getEventSubjectJavaFileHandle(), curNode);
-
-        /**
-         * Close all the file handles.
-         */
-        freeTemporaryResources(false);
-    }
-
-    /**
      * Removes all temporary file handles.
      *
      * @param isErrorOccurred when translator fails to generate java files we need to close all open file handles
@@ -599,16 +320,6 @@
         closeFile(getServiceInterfaceJavaFileHandle(), isError);
         closeFile(getManagerJavaFileHandle(), isError);
 
-        if (getEventJavaFileHandle() != null) {
-            closeFile(getEventJavaFileHandle(), isError);
-        }
-        if (getEventListenerJavaFileHandle() != null) {
-            closeFile(getEventListenerJavaFileHandle(), isError);
-        }
-        if (getEventSubjectJavaFileHandle() != null) {
-            closeFile(getEventSubjectJavaFileHandle(), isError);
-        }
-
         closeFile(getRpcInterfaceTempFileHandle(), true);
         closeFile(getRpcImplTempFileHandle(), true);
         closeFile(getGetterInterfaceTempFileHandle(), true);
@@ -620,182 +331,39 @@
     }
 
     /**
-     * Returns event enum temp file.
+     * Returns the path where service file should be generated.
      *
-     * @return event enum temp file
+     * @return path where service file should be generated
      */
-    public File getEventEnumTempFileHandle() {
-        return eventEnumTempFileHandle;
+    public String getServiceGenPath() {
+        return serviceGenPath;
     }
 
     /**
-     * Sets event enum temp file.
+     * Sets path where service file should be generated.
      *
-     * @param eventEnumTempFileHandle event enum temp file
+     * @param serviceGenPath path where service file should be generated
      */
-    public void setEventEnumTempFileHandle(File eventEnumTempFileHandle) {
-        this.eventEnumTempFileHandle = eventEnumTempFileHandle;
+    public void setServiceGenPath(String serviceGenPath) {
+        this.serviceGenPath = serviceGenPath;
     }
 
     /**
-     * Returns event method temp file.
+     * Returns true if manager needs to be generated.
      *
-     * @return event method temp file
+     * @return true if manager needs to be generated
      */
-    public File getEventMethodTempFileHandle() {
-        return eventMethodTempFileHandle;
+    public boolean isManagerNeedToBeGenerated() {
+        return isManagerNeedToBeGenerated;
     }
 
     /**
-     * Sets event method temp file.
+     * Sets true if manager needs to be generated.
      *
-     * @param eventMethodTempFileHandle event method temp file
+     * @param managerNeedToBeGenerated true if manager needs to be generated
      */
-    public void setEventMethodTempFileHandle(File eventMethodTempFileHandle) {
-        this.eventMethodTempFileHandle = eventMethodTempFileHandle;
+    public void setManagerNeedToBeGenerated(boolean managerNeedToBeGenerated) {
+        isManagerNeedToBeGenerated = managerNeedToBeGenerated;
     }
 
-    /**
-     * Returns event subject attribute temp file.
-     *
-     * @return event subject attribute temp file
-     */
-    public File getEventSubjectAttributeTempFileHandle() {
-        return eventSubjectAttributeTempFileHandle;
-    }
-
-    /**
-     * Sets event subject attribute temp file.
-     *
-     * @param eventSubjectAttributeTempFileHandle event subject attribute temp file
-     */
-    public void setEventSubjectAttributeTempFileHandle(File eventSubjectAttributeTempFileHandle) {
-        this.eventSubjectAttributeTempFileHandle = eventSubjectAttributeTempFileHandle;
-    }
-
-    /**
-     * Returns event subject getter temp file.
-     *
-     * @return event subject getter temp file
-     */
-    public File getEventSubjectGetterTempFileHandle() {
-        return eventSubjectGetterTempFileHandle;
-    }
-
-    /**
-     * Sets event subject getter temp file.
-     *
-     * @param eventSubjectGetterTempFileHandle event subject getter temp file
-     */
-    public void setEventSubjectGetterTempFileHandle(File eventSubjectGetterTempFileHandle) {
-        this.eventSubjectGetterTempFileHandle = eventSubjectGetterTempFileHandle;
-    }
-
-    /**
-     * Returns event subject setter temp file.
-     *
-     * @return event subject setter temp file
-     */
-    public File getEventSubjectSetterTempFileHandle() {
-        return eventSubjectSetterTempFileHandle;
-    }
-
-    /**
-     * Sets event subject setter temp file.
-     *
-     * @param eventSubjectSetterTempFileHandle event subject setter temp file
-     */
-    public void setEventSubjectSetterTempFileHandle(File eventSubjectSetterTempFileHandle) {
-        this.eventSubjectSetterTempFileHandle = eventSubjectSetterTempFileHandle;
-    }
-
-    /**
-     * Adds java snippet for events to event subject file.
-     *
-     * @param curNode      current node
-     * @param pluginConfig plugin configurations
-     * @throws IOException when fails to do IO operations
-     */
-    public void addJavaSnippetOfEvent(YangNode curNode, YangPluginConfig pluginConfig)
-            throws IOException {
-
-        String currentInfo = getCapitalCase(getCamelCase(curNode.getName(),
-                pluginConfig.getConflictResolver()));
-        String notificationName = curNode.getName();
-
-        JavaQualifiedTypeInfo qualifiedTypeInfo = getQualifiedTypeInfoOfCurNode(curNode,
-                getCapitalCase(currentInfo));
-
-        JavaAttributeInfo javaAttributeInfo = getAttributeInfoForTheData(qualifiedTypeInfo, getSmallCase(currentInfo),
-                null, false, false);
-
-        /*Adds java info for event in respective temp files.*/
-        addEventEnum(notificationName, pluginConfig);
-        addEventSubjectAttribute(javaAttributeInfo, pluginConfig);
-        addEventSubjectGetter(javaAttributeInfo, pluginConfig);
-        addEventSubjectSetter(javaAttributeInfo, pluginConfig, currentInfo);
-    }
-
-    /*Adds event to enum temp file.*/
-    private void addEventEnum(String notificationName, YangPluginConfig pluginConfig)
-            throws IOException {
-        appendToFile(getEventEnumTempFileHandle(),
-                getJavaDoc(ENUM_ATTRIBUTE, notificationName, false, pluginConfig) + FOUR_SPACE_INDENTATION
-                        + getEnumJavaAttribute(notificationName).toUpperCase() + COMMA + NEW_LINE);
-    }
-
-    /*Adds event method in event class*/
-    private void addEnumMethod(String eventClassname, String className)
-            throws IOException {
-        appendToFile(getEventMethodTempFileHandle(), getEventFileContents(eventClassname, className));
-    }
-
-    /*Adds events to event subject file.*/
-    private void addEventSubjectAttribute(JavaAttributeInfo attr, YangPluginConfig pluginConfig)
-            throws IOException {
-        appendToFile(getEventSubjectAttributeTempFileHandle(),
-                FOUR_SPACE_INDENTATION + parseAttribute(attr, pluginConfig));
-    }
-
-    /*Adds getter method for event in event subject class.*/
-    private void addEventSubjectGetter(JavaAttributeInfo attr, YangPluginConfig pluginConfig)
-            throws IOException {
-        appendToFile(getEventSubjectGetterTempFileHandle(),
-                getJavaDoc(GETTER_METHOD, getCapitalCase(attr.getAttributeName()), false, pluginConfig)
-                        + getGetterForClass(attr, GENERATE_EVENT_SUBJECT_CLASS) + NEW_LINE);
-    }
-
-    /*Adds setter method for event in event subject class.*/
-    private void addEventSubjectSetter(JavaAttributeInfo attr, YangPluginConfig pluginConfig, String className)
-            throws IOException {
-        appendToFile(getEventSubjectSetterTempFileHandle(),
-                getJavaDoc(MANAGER_SETTER_METHOD, getCapitalCase(attr.getAttributeName()), false, pluginConfig)
-                        + getSetterForClass(attr, className, GENERATE_EVENT_SUBJECT_CLASS) + NEW_LINE);
-    }
-
-    /**
-     * Returns a temporary file handle for the event's file type.
-     *
-     * @param name file name
-     * @return temporary file handle
-     * @throws IOException when fails to create new file handle
-     */
-    private File getJavaFileHandle(YangNode curNode, String name)
-            throws IOException {
-
-        JavaFileInfo parentInfo = ((JavaFileInfoContainer) curNode).getJavaFileInfo();
-        JavaFileInfo childInfo = ((JavaFileInfoContainer) curNode.getChild()).getJavaFileInfo();
-
-        return getFileObject(getDirPath(parentInfo), name, JAVA_FILE_EXTENSION,
-                childInfo);
-    }
-
-    /**
-     * Returns the directory path.
-     *
-     * @return directory path
-     */
-    private String getDirPath(JavaFileInfo parentInfo) {
-        return (parentInfo.getPackageFilePath() + SLASH + parentInfo.getJavaName()).toLowerCase();
-    }
 }
diff --git a/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/YangJavaModelUtils.java b/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/YangJavaModelUtils.java
index 19314e2..ff28b66 100644
--- a/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/YangJavaModelUtils.java
+++ b/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/YangJavaModelUtils.java
@@ -22,14 +22,15 @@
 import java.util.List;
 
 import org.onosproject.yangutils.datamodel.RpcNotificationContainer;
+import org.onosproject.yangutils.datamodel.YangAugment;
 import org.onosproject.yangutils.datamodel.YangCase;
 import org.onosproject.yangutils.datamodel.YangChoice;
-import org.onosproject.yangutils.datamodel.YangGrouping;
 import org.onosproject.yangutils.datamodel.YangLeavesHolder;
 import org.onosproject.yangutils.datamodel.YangModule;
 import org.onosproject.yangutils.datamodel.YangNode;
+import org.onosproject.yangutils.datamodel.YangNodeIdentifier;
 import org.onosproject.yangutils.datamodel.YangSubModule;
-import org.onosproject.yangutils.datamodel.YangTypeDef;
+import org.onosproject.yangutils.datamodel.YangTranslatorOperatorNode;
 import org.onosproject.yangutils.datamodel.YangTypeHolder;
 import org.onosproject.yangutils.datamodel.utils.DataModelUtils;
 import org.onosproject.yangutils.translator.exception.TranslatorException;
@@ -40,17 +41,12 @@
 import org.onosproject.yangutils.utils.io.impl.YangPluginConfig;
 
 import static org.onosproject.yangutils.datamodel.utils.DataModelUtils.isRpcChildNodePresent;
-import static org.onosproject.yangutils.translator.tojava.GeneratedJavaFileType.GENERATE_EVENT_CLASS;
-import static org.onosproject.yangutils.translator.tojava.GeneratedJavaFileType.GENERATE_EVENT_LISTENER_INTERFACE;
-import static org.onosproject.yangutils.translator.tojava.GeneratedJavaFileType.GENERATE_EVENT_SUBJECT_CLASS;
 import static org.onosproject.yangutils.translator.tojava.GeneratedJavaFileType.GENERATE_SERVICE_AND_MANAGER;
 import static org.onosproject.yangutils.translator.tojava.TempJavaFragmentFiles.addCurNodeInfoInParentTempFile;
 import static org.onosproject.yangutils.translator.tojava.utils.JavaIdentifierSyntax.getRootPackage;
-import static org.onosproject.yangutils.utils.UtilConstants.BUILDER;
-import static org.onosproject.yangutils.utils.UtilConstants.DEFAULT;
+import static org.onosproject.yangutils.utils.UtilConstants.AUGMENTED;
 import static org.onosproject.yangutils.utils.UtilConstants.MANAGER;
 import static org.onosproject.yangutils.utils.UtilConstants.PERIOD;
-import static org.onosproject.yangutils.utils.UtilConstants.SERVICE;
 import static org.onosproject.yangutils.utils.UtilConstants.YANG_AUGMENTED_INFO;
 import static org.onosproject.yangutils.utils.UtilConstants.YANG_AUGMENTED_INFO_CLASS_IMPORT_PKG;
 import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getCamelCase;
@@ -80,7 +76,8 @@
             throws IOException {
         if (javaCodeGeneratorInfo instanceof YangJavaAugment) {
             javaCodeGeneratorInfo.getJavaFileInfo()
-                    .setJavaName(((YangJavaAugment) javaCodeGeneratorInfo).getAugmentClassName());
+                    .setJavaName(getAugmentClassName((YangJavaAugment) javaCodeGeneratorInfo,
+                            yangPluginConfig));
         } else {
             javaCodeGeneratorInfo.getJavaFileInfo()
                     .setJavaName(getCamelCase(((YangNode) javaCodeGeneratorInfo).getName(),
@@ -192,7 +189,7 @@
      * @throws IOException IO operations fails
      */
     private static void generateTempFiles(JavaCodeGeneratorInfo javaCodeGeneratorInfo,
-                                          YangPluginConfig yangPluginConfig)
+                                         YangPluginConfig yangPluginConfig)
             throws IOException {
         if (!(javaCodeGeneratorInfo instanceof YangNode)) {
             throw new TranslatorException("translation is not supported for the node");
@@ -215,7 +212,7 @@
         if (javaCodeGeneratorInfo instanceof YangJavaModule) {
             for (YangNode notificaiton : ((YangJavaModule) javaCodeGeneratorInfo).getNotificationNodes()) {
                 javaCodeGeneratorInfo.getTempJavaCodeFragmentFiles()
-                        .getServiceTempFiles()
+                        .getEventFragmentFiles()
                         .addJavaSnippetOfEvent(notificaiton, yangPluginConfig);
             }
         }
@@ -223,7 +220,7 @@
             for (YangNode notificaiton : ((YangJavaSubModule) javaCodeGeneratorInfo)
                     .getNotificationNodes()) {
                 javaCodeGeneratorInfo.getTempJavaCodeFragmentFiles()
-                        .getServiceTempFiles()
+                        .getEventFragmentFiles()
                         .addJavaSnippetOfEvent(notificaiton, yangPluginConfig);
             }
         }
@@ -273,57 +270,13 @@
         TempJavaCodeFragmentFiles tempJavaCodeFragmentFiles = javaCodeGeneratorInfo.getTempJavaCodeFragmentFiles();
         if (javaCodeGeneratorInfo instanceof YangJavaAugment) {
 
-            JavaQualifiedTypeInfo augmentedBuilderInfo = new JavaQualifiedTypeInfo();
-            JavaQualifiedTypeInfo augmentedBuilderClassInfo = new JavaQualifiedTypeInfo();
-            JavaQualifiedTypeInfo augmentedClassInfo = new JavaQualifiedTypeInfo();
-            JavaQualifiedTypeInfo augmentedImplInfo = new JavaQualifiedTypeInfo();
-            YangNode augmentedNode = ((YangJavaAugment) javaCodeGeneratorInfo).getAugmentedNode();
-            String name = null;
-            JavaFileInfo augmentedfileInfo = ((JavaFileInfoContainer) augmentedNode).getJavaFileInfo();
-            if (augmentedfileInfo.getJavaName() != null) {
-                name = getCapitalCase(augmentedfileInfo.getJavaName());
-                augmentedClassInfo.setClassInfo(name);
-                augmentedClassInfo.setPkgInfo(augmentedfileInfo.getPackage());
-            } else {
-                name = getCapitalCase(getCamelCase(augmentedNode.getName(), yangPlugin.getConflictResolver()));
-                augmentedClassInfo.setClassInfo(name);
-                augmentedClassInfo.setPkgInfo(getAugmentedNodesPackage(augmentedNode,
-                        yangPlugin));
-            }
-
-            augmentedBuilderInfo.setClassInfo(name + PERIOD + name + BUILDER);
-            augmentedBuilderInfo.setPkgInfo(augmentedClassInfo.getPkgInfo());
-            augmentedBuilderClassInfo.setClassInfo(getCapitalCase(DEFAULT) + name + PERIOD + name + BUILDER);
-            augmentedBuilderClassInfo.setPkgInfo(augmentedClassInfo.getPkgInfo());
-            augmentedImplInfo.setClassInfo(getCapitalCase(DEFAULT) + name);
-            augmentedImplInfo.setPkgInfo(augmentedBuilderInfo.getPkgInfo());
-            ((YangJavaAugment) javaCodeGeneratorInfo).addToExtendedClassInfo(augmentedBuilderInfo);
-            ((YangJavaAugment) javaCodeGeneratorInfo).addToExtendedClassInfo(augmentedImplInfo);
-            ((YangJavaAugment) javaCodeGeneratorInfo).addToExtendedClassInfo(augmentedBuilderClassInfo);
-            ((YangJavaAugment) javaCodeGeneratorInfo).addToExtendedClassInfo(augmentedClassInfo);
-            javaCodeGeneratorInfo.getTempJavaCodeFragmentFiles().getBeanTempFiles().getJavaExtendsListHolder()
-                    .addToExtendsList(augmentedClassInfo, (YangNode) javaCodeGeneratorInfo,
-                            tempJavaCodeFragmentFiles.getBeanTempFiles());
-            javaCodeGeneratorInfo.getTempJavaCodeFragmentFiles().getBeanTempFiles().getJavaExtendsListHolder()
-                    .addToExtendsList(augmentedBuilderInfo, (YangNode) javaCodeGeneratorInfo,
-                            tempJavaCodeFragmentFiles.getBeanTempFiles());
-            javaCodeGeneratorInfo.getTempJavaCodeFragmentFiles().getBeanTempFiles().getJavaExtendsListHolder()
-                    .addToExtendsList(augmentedImplInfo, (YangNode) javaCodeGeneratorInfo,
-                            tempJavaCodeFragmentFiles.getBeanTempFiles());
-            javaCodeGeneratorInfo.getTempJavaCodeFragmentFiles().getBeanTempFiles().getJavaExtendsListHolder()
-                    .addToExtendsList(augmentedBuilderClassInfo, (YangNode) javaCodeGeneratorInfo,
-                            tempJavaCodeFragmentFiles.getBeanTempFiles());
-
             JavaQualifiedTypeInfo yangAugmentedInfo = new JavaQualifiedTypeInfo();
             yangAugmentedInfo.setClassInfo(YANG_AUGMENTED_INFO);
             yangAugmentedInfo.setPkgInfo(YANG_AUGMENTED_INFO_CLASS_IMPORT_PKG);
             javaCodeGeneratorInfo.getTempJavaCodeFragmentFiles().getBeanTempFiles().getJavaExtendsListHolder()
                     .addToExtendsList(yangAugmentedInfo, (YangNode) javaCodeGeneratorInfo,
                             tempJavaCodeFragmentFiles.getBeanTempFiles());
-
-
         }
-
         if (javaCodeGeneratorInfo instanceof YangCase) {
             YangNode parent = ((YangCase) javaCodeGeneratorInfo).getParent();
             JavaQualifiedTypeInfo parentsInfo = new JavaQualifiedTypeInfo();
@@ -378,27 +331,9 @@
             javaCodeGeneratorInfo.getJavaFileInfo().addGeneratedFileTypes(GENERATE_SERVICE_AND_MANAGER);
         }
 
-        if (javaCodeGeneratorInfo instanceof YangJavaModule) {
-            if (!((YangJavaModule) javaCodeGeneratorInfo)
-                    .isNotificationChildNodePresent((YangNode) javaCodeGeneratorInfo)) {
-                updateCodeGenInfoForEvent(javaCodeGeneratorInfo);
-            }
-        } else if (javaCodeGeneratorInfo instanceof YangJavaSubModule) {
-            if (!((YangJavaSubModule) javaCodeGeneratorInfo)
-                    .isNotificationChildNodePresent((YangNode) javaCodeGeneratorInfo)) {
-                updateCodeGenInfoForEvent(javaCodeGeneratorInfo);
-            }
-        }
         generateTempFiles(javaCodeGeneratorInfo, yangPluginConfig);
     }
 
-    /*Updates java code generator info with events info.*/
-    private static void updateCodeGenInfoForEvent(JavaCodeGeneratorInfo javaCodeGeneratorInfo) {
-        javaCodeGeneratorInfo.getJavaFileInfo().addGeneratedFileTypes(GENERATE_EVENT_SUBJECT_CLASS);
-        javaCodeGeneratorInfo.getJavaFileInfo().addGeneratedFileTypes(GENERATE_EVENT_CLASS);
-        javaCodeGeneratorInfo.getJavaFileInfo().addGeneratedFileTypes(GENERATE_EVENT_LISTENER_INTERFACE);
-    }
-
     /**
      * Returns the node package string.
      *
@@ -429,9 +364,6 @@
      * @return true if root node contains any data node
      */
     public static boolean isManagerCodeGenRequired(YangNode node) {
-        YangLeavesHolder holder = (YangLeavesHolder) node;
-
-        boolean isCodeReq = true;
 
         List<YangNode> childNodes = new ArrayList<>();
         node = node.getChild();
@@ -441,16 +373,19 @@
         }
 
         if (childNodes.size() == 0) {
-            if (holder.getListOfLeaf() != null && !holder.getListOfLeaf().isEmpty()) {
-                isCodeReq = true;
-            } else if (holder.getListOfLeafList() != null && !holder.getListOfLeafList().isEmpty()) {
-                isCodeReq = true;
-            }
-            return isCodeReq;
+            return false;
         } else if (childNodes.size() == 1) {
-            return childNodes.get(0) instanceof YangTypeDef && childNodes.get(0) instanceof YangGrouping;
+            return !(childNodes.get(0) instanceof YangTranslatorOperatorNode);
         }
-        return isCodeReq;
+        List<Boolean> booleanData = new ArrayList<>();
+        for (YangNode child : childNodes) {
+            if (child instanceof YangTranslatorOperatorNode) {
+                booleanData.add(false);
+            } else {
+                booleanData.add(true);
+            }
+        }
+        return booleanData.contains(true);
     }
 
     /**
@@ -465,8 +400,7 @@
         File[] files = codeGenDir.listFiles();
         if (files.length >= 1) {
             for (File file : files) {
-                if (file.getName().contentEquals(getCapitalCase(info.getJavaName() + MANAGER + ".java"))
-                        || file.getName().contentEquals(getCapitalCase(info.getJavaName() + SERVICE + ".java"))) {
+                if (file.getName().contentEquals(getCapitalCase(info.getJavaName() + MANAGER + ".java"))) {
                     return false;
                 }
             }
@@ -484,12 +418,11 @@
     public static String getAugmentedNodesPackage(YangNode node, YangPluginConfig yangPluginConfig) {
 
         List<String> clsInfo = new ArrayList<>();
-        node = node.getParent();
-        while (node != null) {
+        while (node.getParent() != null) {
             if (!(node instanceof YangModule)
                     || !(node instanceof YangSubModule)) {
                 if (node instanceof YangJavaAugment) {
-                    clsInfo.add(((YangJavaAugment) node).getAugmentClassName());
+                    clsInfo.add(getAugmentClassName((YangAugment) node, yangPluginConfig));
                 } else {
                     clsInfo.add(getCamelCase(node.getName(), yangPluginConfig.getConflictResolver()));
                 }
@@ -519,4 +452,21 @@
         return pkg.toString().toLowerCase();
 
     }
+
+    /**
+     * Returns augment class name.
+     *
+     * @param augment YANG augment
+     * @param yangPluginConfig plugin configurations
+     * @return augment class name
+     */
+    public static String getAugmentClassName(YangAugment augment, YangPluginConfig yangPluginConfig) {
+        YangNodeIdentifier nodeId = augment.getTargetNode().get(augment.getTargetNode().size() - 1).getNodeIdentifier();
+        String name = getCapitalCase(getCamelCase(nodeId.getName(), yangPluginConfig.getConflictResolver()));
+        if (nodeId.getPrefix() != null) {
+            return AUGMENTED + getCapitalCase(nodeId.getPrefix()) + name;
+        } else {
+            return AUGMENTED + name;
+        }
+    }
 }
diff --git a/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaAugment.java b/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaAugment.java
index a890ec2..9986351 100644
--- a/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaAugment.java
+++ b/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaAugment.java
@@ -16,23 +16,17 @@
 package org.onosproject.yangutils.translator.tojava.javamodel;
 
 import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
 
 import org.onosproject.yangutils.datamodel.YangAugment;
-import org.onosproject.yangutils.datamodel.YangNodeIdentifier;
 import org.onosproject.yangutils.translator.exception.TranslatorException;
 import org.onosproject.yangutils.translator.tojava.JavaCodeGenerator;
 import org.onosproject.yangutils.translator.tojava.JavaCodeGeneratorInfo;
 import org.onosproject.yangutils.translator.tojava.JavaFileInfo;
-import org.onosproject.yangutils.translator.tojava.JavaQualifiedTypeInfo;
 import org.onosproject.yangutils.translator.tojava.TempJavaCodeFragmentFiles;
 import org.onosproject.yangutils.utils.io.impl.YangPluginConfig;
 
 import static org.onosproject.yangutils.translator.tojava.GeneratedJavaFileType.GENERATE_INTERFACE_WITH_BUILDER;
 import static org.onosproject.yangutils.translator.tojava.YangJavaModelUtils.generateCodeOfAugmentableNode;
-import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getCamelCase;
-import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getCapitalCase;
 
 /**
  * Represents augment information extended to support java code generation.
@@ -44,23 +38,12 @@
     private static final long serialVersionUID = 806201632L;
 
     /**
-     * Prefix to be added to generated java file for augment node.
-     */
-    private static final String AUGMENTED = "Augmented";
-
-    /**
      * Contains the information of the java file being generated.
      */
     private JavaFileInfo javaFileInfo;
 
     /**
-     * TargetNodes java qualified info.
-     */
-    private List<JavaQualifiedTypeInfo> extendedClassInfo;
-
-    /**
-     * File handle to maintain temporary java code fragments as per the code
-     * snippet types.
+     * File handle to maintain temporary java code fragments as per the code snippet types.
      */
     private transient TempJavaCodeFragmentFiles tempFileHandle;
 
@@ -70,7 +53,6 @@
     public YangJavaAugment() {
         super();
         setJavaFileInfo(new JavaFileInfo());
-        setExtendedClassInfo(new ArrayList<>());
         getJavaFileInfo().setGeneratedFileTypes(GENERATE_INTERFACE_WITH_BUILDER);
     }
 
@@ -119,8 +101,7 @@
     }
 
     /**
-     * Prepare the information for java code generation corresponding to YANG
-     * augment info.
+     * Prepare the information for java code generation corresponding to YANG augment info.
      *
      * @param yangPlugin YANG plugin config
      * @throws TranslatorException translator operation fail
@@ -148,46 +129,4 @@
         }
     }
 
-    /**
-     * Returns augment class name.
-     *
-     * @return augment class name
-     */
-    public String getAugmentClassName() {
-        YangNodeIdentifier nodeId = getTargetNode().get(getTargetNode().size() - 1).getNodeIdentifier();
-        String name = getCapitalCase(getCamelCase(nodeId.getName(), null));
-        if (nodeId.getPrefix() != null) {
-            return AUGMENTED + getCapitalCase(nodeId.getPrefix()) + name;
-        } else {
-            return AUGMENTED + name;
-        }
-    }
-
-    /**
-     * Returns extended class info.
-     *
-     * @return extended class info
-     */
-    public List<JavaQualifiedTypeInfo> getExtendedClassInfo() {
-        return extendedClassInfo;
-    }
-
-    /**
-     * Sets extended class info.
-     *
-     * @param augmentedInfo extended class info
-     */
-    private void setExtendedClassInfo(List<JavaQualifiedTypeInfo> augmentedInfo) {
-        extendedClassInfo = augmentedInfo;
-    }
-
-    /**
-     * Adds to extended class info list.
-     *
-     * @param augmentedInfo extended class info
-     */
-    public void addToExtendedClassInfo(JavaQualifiedTypeInfo augmentedInfo) {
-        getExtendedClassInfo().add(augmentedInfo);
-    }
-
 }
diff --git a/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaIdentity.java b/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaIdentity.java
index 6ae672b..45c9af7 100644
--- a/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaIdentity.java
+++ b/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaIdentity.java
@@ -15,6 +15,10 @@
  */
 package org.onosproject.yangutils.translator.tojava.javamodel;
 
+import java.io.File;
+import java.io.IOException;
+import java.util.List;
+
 import org.onosproject.yangutils.datamodel.YangIdentity;
 import org.onosproject.yangutils.translator.exception.TranslatorException;
 import org.onosproject.yangutils.translator.tojava.JavaCodeGenerator;
@@ -25,12 +29,8 @@
 import org.onosproject.yangutils.translator.tojava.TempJavaCodeFragmentFiles;
 import org.onosproject.yangutils.utils.io.impl.YangPluginConfig;
 
-import java.io.File;
-import java.io.IOException;
-import java.util.List;
-
-import static org.onosproject.yangutils.translator.tojava.GeneratedJavaFileType.GENERATE_INTERFACE_WITH_BUILDER;
 import static org.onosproject.yangutils.translator.tojava.GeneratedJavaFileType.GENERATE_IDENTITY_CLASS;
+import static org.onosproject.yangutils.translator.tojava.GeneratedJavaFileType.GENERATE_INTERFACE_WITH_BUILDER;
 import static org.onosproject.yangutils.translator.tojava.YangJavaModelUtils.updatePackageInfo;
 import static org.onosproject.yangutils.translator.tojava.utils.JavaFileGeneratorUtils.getFileObject;
 import static org.onosproject.yangutils.translator.tojava.utils.JavaFileGeneratorUtils.initiateJavaFileGeneration;
@@ -145,7 +145,7 @@
                 }
             }
 
-            File file = getFileObject(path, className, JAVA_FILE_EXTENSION, getJavaFileInfo());
+            File file = getFileObject(path, className, JAVA_FILE_EXTENSION, getJavaFileInfo().getBaseCodeGenPath());
 
             initiateJavaFileGeneration(file, GENERATE_IDENTITY_CLASS, imports, this, className);
             closeFile(file, false);
diff --git a/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaModule.java b/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaModule.java
index dd08265..5dae614 100644
--- a/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaModule.java
+++ b/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaModule.java
@@ -29,14 +29,12 @@
 import org.onosproject.yangutils.translator.tojava.TempJavaCodeFragmentFiles;
 import org.onosproject.yangutils.utils.io.impl.YangPluginConfig;
 
-import static org.onosproject.yangutils.translator.tojava.GeneratedJavaFileType.GENERATE_EVENT_CLASS;
-import static org.onosproject.yangutils.translator.tojava.GeneratedJavaFileType.GENERATE_EVENT_LISTENER_INTERFACE;
-import static org.onosproject.yangutils.translator.tojava.GeneratedJavaFileType.GENERATE_EVENT_SUBJECT_CLASS;
+import static org.onosproject.yangutils.translator.tojava.GeneratedJavaFileType.GENERATE_ALL_EVENT_CLASS_MASK;
 import static org.onosproject.yangutils.translator.tojava.GeneratedJavaFileType.GENERATE_INTERFACE_WITH_BUILDER;
 import static org.onosproject.yangutils.translator.tojava.GeneratedJavaFileType.GENERATE_SERVICE_AND_MANAGER;
 import static org.onosproject.yangutils.translator.tojava.YangJavaModelUtils.generateCodeOfRootNode;
-import static org.onosproject.yangutils.translator.tojava.YangJavaModelUtils.isManagerCodeGenRequired;
 import static org.onosproject.yangutils.translator.tojava.YangJavaModelUtils.isGenerationOfCodeReq;
+import static org.onosproject.yangutils.translator.tojava.YangJavaModelUtils.isManagerCodeGenRequired;
 import static org.onosproject.yangutils.translator.tojava.utils.JavaIdentifierSyntax.getRootPackage;
 import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.searchAndDeleteTempDir;
 import static org.onosproject.yangutils.utils.UtilConstants.SBI;
@@ -56,8 +54,7 @@
     private JavaFileInfo javaFileInfo;
 
     /**
-     * File handle to maintain temporary java code fragments as per the code
-     * snippet types.
+     * File handle to maintain temporary java code fragments as per the code snippet types.
      */
     private transient TempJavaCodeFragmentFiles tempFileHandle;
 
@@ -73,12 +70,7 @@
         super();
         setJavaFileInfo(new JavaFileInfo());
         setNotificationNodes(new ArrayList<>());
-        int gentype = GENERATE_SERVICE_AND_MANAGER | GENERATE_INTERFACE_WITH_BUILDER;
-        if (isNotificationChildNodePresent(this)) {
-            gentype = GENERATE_SERVICE_AND_MANAGER | GENERATE_EVENT_SUBJECT_CLASS | GENERATE_EVENT_CLASS
-                    | GENERATE_EVENT_LISTENER_INTERFACE;
-        }
-        getJavaFileInfo().setGeneratedFileTypes(gentype);
+        getJavaFileInfo().setGeneratedFileTypes(GENERATE_SERVICE_AND_MANAGER | GENERATE_INTERFACE_WITH_BUILDER);
 
     }
 
@@ -135,6 +127,11 @@
     public void generateCodeEntry(YangPluginConfig yangPlugin) throws TranslatorException {
         String modulePkg = getRootPackage(getVersion(), getNameSpace().getUri(), getRevision().getRevDate(),
                 yangPlugin.getConflictResolver());
+
+        if (isNotificationChildNodePresent(this)) {
+            getJavaFileInfo().setGeneratedFileTypes(getJavaFileInfo().getGeneratedFileTypes()
+                    | GENERATE_ALL_EVENT_CLASS_MASK);
+        }
         try {
             generateCodeOfRootNode(this, yangPlugin, modulePkg);
         } catch (IOException e) {
@@ -157,17 +154,22 @@
          *
          * The manager class needs to extend the "ListenerRegistry".
          */
-
         try {
-            if (isManagerCodeGenRequired(this) && isGenerationOfCodeReq(getJavaFileInfo())) {
-                if ((getJavaFileInfo().getPluginConfig().getCodeGenerateForsbi() == null) ||
-                        (!getJavaFileInfo().getPluginConfig().getCodeGenerateForsbi().equals(SBI))) {
-                    getTempJavaCodeFragmentFiles()
-                            .generateJavaFile(GENERATE_INTERFACE_WITH_BUILDER, this);
-                    getTempJavaCodeFragmentFiles()
-                            .generateJavaFile(GENERATE_SERVICE_AND_MANAGER, this);
+            if ((getJavaFileInfo().getGeneratedFileTypes() & GENERATE_ALL_EVENT_CLASS_MASK) != 0) {
+                getTempJavaCodeFragmentFiles().generateJavaFile(GENERATE_ALL_EVENT_CLASS_MASK, this);
+            }
+            getTempJavaCodeFragmentFiles()
+                    .generateJavaFile(GENERATE_INTERFACE_WITH_BUILDER, this);
+            if (isManagerCodeGenRequired(this)) {
+                if (isGenerationOfCodeReq(getJavaFileInfo())) {
+                    if ((getJavaFileInfo().getPluginConfig().getCodeGenerateForsbi() == null)
+                        || (!getJavaFileInfo().getPluginConfig().getCodeGenerateForsbi().equals(SBI))) {
+                         getTempJavaCodeFragmentFiles().getServiceTempFiles().setManagerNeedToBeGenerated(true);
+                     }
                 }
             }
+            getTempJavaCodeFragmentFiles().generateJavaFile(GENERATE_SERVICE_AND_MANAGER, this);
+
             searchAndDeleteTempDir(getJavaFileInfo().getBaseCodeGenPath() +
                     getJavaFileInfo().getPackageFilePath());
             searchAndDeleteTempDir(getJavaFileInfo().getPluginConfig().getCodeGenDir() +
diff --git a/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaSubModule.java b/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaSubModule.java
index e029ecd..4de196c 100644
--- a/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaSubModule.java
+++ b/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaSubModule.java
@@ -31,14 +31,12 @@
 import org.onosproject.yangutils.translator.tojava.TempJavaCodeFragmentFiles;
 import org.onosproject.yangutils.utils.io.impl.YangPluginConfig;
 
-import static org.onosproject.yangutils.translator.tojava.GeneratedJavaFileType.GENERATE_EVENT_CLASS;
-import static org.onosproject.yangutils.translator.tojava.GeneratedJavaFileType.GENERATE_EVENT_LISTENER_INTERFACE;
-import static org.onosproject.yangutils.translator.tojava.GeneratedJavaFileType.GENERATE_EVENT_SUBJECT_CLASS;
+import static org.onosproject.yangutils.translator.tojava.GeneratedJavaFileType.GENERATE_ALL_EVENT_CLASS_MASK;
 import static org.onosproject.yangutils.translator.tojava.GeneratedJavaFileType.GENERATE_INTERFACE_WITH_BUILDER;
 import static org.onosproject.yangutils.translator.tojava.GeneratedJavaFileType.GENERATE_SERVICE_AND_MANAGER;
 import static org.onosproject.yangutils.translator.tojava.YangJavaModelUtils.generateCodeOfRootNode;
-import static org.onosproject.yangutils.translator.tojava.YangJavaModelUtils.isManagerCodeGenRequired;
 import static org.onosproject.yangutils.translator.tojava.YangJavaModelUtils.isGenerationOfCodeReq;
+import static org.onosproject.yangutils.translator.tojava.YangJavaModelUtils.isManagerCodeGenRequired;
 import static org.onosproject.yangutils.translator.tojava.utils.JavaIdentifierSyntax.getRootPackage;
 import static org.onosproject.yangutils.utils.UtilConstants.SBI;
 import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.searchAndDeleteTempDir;
@@ -58,8 +56,7 @@
     private JavaFileInfo javaFileInfo;
 
     /**
-     * File handle to maintain temporary java code fragments as per the code
-     * snippet types.
+     * File handle to maintain temporary java code fragments as per the code snippet types.
      */
     private transient TempJavaCodeFragmentFiles tempFileHandle;
 
@@ -76,8 +73,7 @@
         setJavaFileInfo(new JavaFileInfo());
         int gentype = GENERATE_SERVICE_AND_MANAGER | GENERATE_INTERFACE_WITH_BUILDER;
         if (isNotificationChildNodePresent(this)) {
-            gentype = GENERATE_SERVICE_AND_MANAGER | GENERATE_EVENT_SUBJECT_CLASS | GENERATE_EVENT_CLASS
-                    | GENERATE_EVENT_LISTENER_INTERFACE;
+            gentype = GENERATE_SERVICE_AND_MANAGER | GENERATE_ALL_EVENT_CLASS_MASK;
         }
         getJavaFileInfo().setGeneratedFileTypes(gentype);
     }
@@ -145,6 +141,11 @@
     public void generateCodeEntry(YangPluginConfig yangPlugin) throws TranslatorException {
         String subModulePkg = getRootPackage(getVersion(), getNameSpaceFromModule(getBelongsTo()),
                 getRevision().getRevDate(), yangPlugin.getConflictResolver());
+
+        if (isNotificationChildNodePresent(this)) {
+            getJavaFileInfo().setGeneratedFileTypes(getJavaFileInfo().getGeneratedFileTypes()
+                    | GENERATE_ALL_EVENT_CLASS_MASK);
+        }
         try {
             generateCodeOfRootNode(this, yangPlugin, subModulePkg);
         } catch (IOException e) {
@@ -169,13 +170,21 @@
          * The manager class needs to extend the "ListenerRegistry".
          */
         try {
-            if (isManagerCodeGenRequired(this) && isGenerationOfCodeReq(getJavaFileInfo())) {
-                if ((getJavaFileInfo().getPluginConfig().getCodeGenerateForsbi() == null) ||
-                        (!getJavaFileInfo().getPluginConfig().getCodeGenerateForsbi().equals(SBI))) {
-                    getTempJavaCodeFragmentFiles().generateJavaFile(GENERATE_INTERFACE_WITH_BUILDER, this);
-                    getTempJavaCodeFragmentFiles().generateJavaFile(GENERATE_SERVICE_AND_MANAGER, this);
+            if ((getJavaFileInfo().getGeneratedFileTypes() & GENERATE_ALL_EVENT_CLASS_MASK) != 0) {
+                getTempJavaCodeFragmentFiles().generateJavaFile(GENERATE_ALL_EVENT_CLASS_MASK, this);
+            }
+            getTempJavaCodeFragmentFiles()
+                    .generateJavaFile(GENERATE_INTERFACE_WITH_BUILDER, this);
+            if (isManagerCodeGenRequired(this)) {
+                if (isGenerationOfCodeReq(getJavaFileInfo())) {
+                    if ((getJavaFileInfo().getPluginConfig().getCodeGenerateForsbi() == null)
+                        || (!getJavaFileInfo().getPluginConfig().getCodeGenerateForsbi().equals(SBI))) {
+                         getTempJavaCodeFragmentFiles().getServiceTempFiles().setManagerNeedToBeGenerated(true);
+                     }
                 }
             }
+            getTempJavaCodeFragmentFiles().generateJavaFile(GENERATE_SERVICE_AND_MANAGER, this);
+
             searchAndDeleteTempDir(getJavaFileInfo().getBaseCodeGenPath() +
                     getJavaFileInfo().getPackageFilePath());
             searchAndDeleteTempDir(getJavaFileInfo().getPluginConfig().getCodeGenDir() +
@@ -185,6 +194,7 @@
         }
     }
 
+
     /**
      * Returns notifications node list.
      *
diff --git a/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/utils/ClassDefinitionGenerator.java b/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/utils/ClassDefinitionGenerator.java
index f671ecf..e778a84 100644
--- a/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/utils/ClassDefinitionGenerator.java
+++ b/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/utils/ClassDefinitionGenerator.java
@@ -17,6 +17,7 @@
 package org.onosproject.yangutils.translator.tojava.utils;
 
 import org.onosproject.yangutils.datamodel.YangAugment;
+import org.onosproject.yangutils.datamodel.YangCase;
 import org.onosproject.yangutils.datamodel.YangIdentity;
 import org.onosproject.yangutils.datamodel.YangNode;
 import org.onosproject.yangutils.datamodel.YangNotification;
@@ -45,7 +46,6 @@
 import static org.onosproject.yangutils.utils.UtilConstants.CLASS;
 import static org.onosproject.yangutils.utils.UtilConstants.COMMA;
 import static org.onosproject.yangutils.utils.UtilConstants.DEFAULT;
-import static org.onosproject.yangutils.utils.UtilConstants.OPERATION;
 import static org.onosproject.yangutils.utils.UtilConstants.DIAMOND_CLOSE_BRACKET;
 import static org.onosproject.yangutils.utils.UtilConstants.DIAMOND_OPEN_BRACKET;
 import static org.onosproject.yangutils.utils.UtilConstants.EIGHT_SPACE_INDENTATION;
@@ -61,12 +61,14 @@
 import static org.onosproject.yangutils.utils.UtilConstants.MANAGER;
 import static org.onosproject.yangutils.utils.UtilConstants.NEW_LINE;
 import static org.onosproject.yangutils.utils.UtilConstants.OPEN_CURLY_BRACKET;
+import static org.onosproject.yangutils.utils.UtilConstants.OPERATION;
 import static org.onosproject.yangutils.utils.UtilConstants.PERIOD;
 import static org.onosproject.yangutils.utils.UtilConstants.PUBLIC;
 import static org.onosproject.yangutils.utils.UtilConstants.REGEX_FOR_ANY_STRING_ENDING_WITH_SERVICE;
 import static org.onosproject.yangutils.utils.UtilConstants.SERVICE;
 import static org.onosproject.yangutils.utils.UtilConstants.SPACE;
 import static org.onosproject.yangutils.utils.UtilConstants.SUBJECT;
+import static org.onosproject.yangutils.utils.UtilConstants.YANG_AUGMENTED_OP_PARAM_INFO;
 import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getCapitalCase;
 import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.trimAtLast;
 
@@ -82,8 +84,7 @@
     }
 
     /**
-     * Based on the file type and the YANG name of the file, generate the class
-     * / interface definition start.
+     * Based on the file type and the YANG name of the file, generate the class / interface definition start.
      *
      * @param genFileTypes generated file type
      * @param yangName     class name
@@ -107,8 +108,7 @@
     }
 
     /**
-     * Based on the file type and the YANG name of the file, generate the class
-     * / interface definition start.
+     * Based on the file type and the YANG name of the file, generate the class / interface definition start.
      *
      * @param genFileTypes generated file type
      * @param yangName     class name
@@ -131,7 +131,7 @@
             case IMPL_CLASS_MASK:
                 return getImplClassDefinition(yangName, curNode);
             case OPERATION_CLASS_MASK:
-                return getOperClassDefinition(yangName, curNode);
+                return getOpPramImplClassDefinition(yangName, curNode);
             case BUILDER_INTERFACE_MASK:
                 return getBuilderInterfaceDefinition(yangName, curNode);
             case GENERATE_SERVICE_AND_MANAGER:
@@ -178,14 +178,12 @@
     /**
      * Returns builder interface file class definition.
      *
-     * @param yangName java class name, corresponding to which the builder class
-     *                 is being generated
+     * @param yangName java class name, corresponding to which the builder class is being generated
      * @return definition
      */
     private static String getBuilderInterfaceDefinition(String yangName, YangNode curNode) {
-        String clsDef = "";
-        if (curNode instanceof YangAugment) {
-            clsDef = getClassDefinitionForWhenExtended(curNode, yangName, BUILDER_INTERFACE_MASK);
+        if (!(curNode instanceof YangCase)) {
+            String clsDef = getClassDefinitionForWhenExtended(curNode, yangName, BUILDER_INTERFACE_MASK);
             if (clsDef != null) {
                 return clsDef;
             }
@@ -200,9 +198,8 @@
      * @return definition
      */
     private static String getBuilderClassDefinition(String yangName, YangNode curNode) {
-        String clsDef = "";
-        if (curNode instanceof YangAugment) {
-            clsDef = getClassDefinitionForWhenExtended(curNode, yangName, BUILDER_CLASS_MASK);
+        if (!(curNode instanceof YangCase)) {
+            String clsDef = getClassDefinitionForWhenExtended(curNode, yangName, BUILDER_CLASS_MASK);
             if (clsDef != null) {
                 return clsDef;
             }
@@ -215,15 +212,14 @@
      * Returns operation param builder file class definition.
      *
      * @param yangName class name
-     * @param curNode   YANG node
+     * @param curNode  YANG node
      * @return definition returns operation param builder file class definition
      */
     private static String getOpParamBuilderClassDefinition(String yangName, YangNode curNode) {
-        String clsDef = "";
-        if (curNode instanceof YangAugment) {
-            clsDef = getClassDefinitionForWhenExtended(curNode, yangName, OPERATION_BUILDER_CLASS_MASK);
+        if (!(curNode instanceof YangCase)) {
+            String clsDef = getClassDefinitionForWhenExtended(curNode, yangName, OPERATION_BUILDER_CLASS_MASK);
             if (clsDef != null) {
-                return clsDef;
+                return clsDef + OPEN_CURLY_BRACKET + NEW_LINE;
             }
         }
         return PUBLIC + SPACE + CLASS + SPACE + yangName + OPERATION + BUILDER + SPACE + EXTEND +
@@ -238,9 +234,8 @@
      * @return definition
      */
     private static String getImplClassDefinition(String yangName, YangNode curNode) {
-        String clsDef = "";
-        if (curNode instanceof YangAugment) {
-            clsDef = getClassDefinitionForWhenExtended(curNode, yangName, IMPL_CLASS_MASK);
+        if (!(curNode instanceof YangCase)) {
+            String clsDef = getClassDefinitionForWhenExtended(curNode, yangName, IMPL_CLASS_MASK);
             if (clsDef != null) {
                 return clsDef;
             }
@@ -253,20 +248,26 @@
      * Returns operation param file class definition.
      *
      * @param yangName class name
-     * @param curNode   YANG node
+     * @param curNode  YANG node
      * @return definition returns operation param file class definition
      */
-    private static String getOperClassDefinition(String yangName, YangNode curNode) {
+    private static String getOpPramImplClassDefinition(String yangName, YangNode curNode) {
         String clsDef = "";
-        if (curNode instanceof YangAugment) {
+        if (!(curNode instanceof YangCase)) {
             clsDef = getClassDefinitionForWhenExtended(curNode, yangName, OPERATION_CLASS_MASK);
-            if (clsDef != null) {
-                return clsDef;
-            }
         }
 
-        return PUBLIC + SPACE + CLASS + SPACE + yangName + OPERATION + SPACE + EXTEND + SPACE
-                + getCapitalCase(DEFAULT) + yangName + SPACE + OPEN_CURLY_BRACKET + NEW_LINE;
+        if (clsDef.equals("")) {
+            clsDef = PUBLIC + SPACE + CLASS + SPACE + yangName + OPERATION + SPACE + EXTEND + SPACE
+                    + getCapitalCase(DEFAULT) + yangName + SPACE;
+        }
+        if (curNode instanceof YangAugment) {
+            clsDef = clsDef + IMPLEMENTS + SPACE + YANG_AUGMENTED_OP_PARAM_INFO + SPACE + OPEN_CURLY_BRACKET + NEW_LINE;
+        } else {
+            clsDef = clsDef + OPEN_CURLY_BRACKET + NEW_LINE;
+        }
+
+        return clsDef;
     }
 
     /**
@@ -407,72 +408,28 @@
             switch (genFileTypes) {
                 case INTERFACE_MASK:
                     def = def + INTERFACE + SPACE + yangName + SPACE + EXTEND + SPACE;
-                    for (JavaQualifiedTypeInfo info : holder.getExtendsList()) {
-                        if (curNode instanceof YangAugment) {
-                            if (!info.getClassInfo().contains(BUILDER) && !info.getClassInfo().contains(
-                                    getCapitalCase(DEFAULT))) {
-                                def = getDefinitionString(def, info, holder);
-                            }
-                        } else {
-                            def = getDefinitionString(def, info, holder);
-                        }
-                    }
-                    def = trimAtLast(def, COMMA);
-
+                    def = getDefinitionString(def, holder);
                     return def + SPACE + OPEN_CURLY_BRACKET + NEW_LINE;
                 case BUILDER_INTERFACE_MASK:
                     String builderDef = INTERFACE + SPACE + yangName + BUILDER + SPACE + EXTEND + SPACE;
-                    for (JavaQualifiedTypeInfo info : holder.getExtendsList()) {
-                        if (info.getClassInfo().contains(BUILDER) && !info.getClassInfo().contains(
-                                getCapitalCase(DEFAULT))) {
-                            builderDef = getDefinitionString(builderDef, info, holder);
-                        }
-                    }
-
-                    builderDef = trimAtLast(builderDef, COMMA);
-
+                    builderDef = getDefinitionString(builderDef, holder);
                     return builderDef + SPACE + OPEN_CURLY_BRACKET + NEW_LINE;
                 case BUILDER_CLASS_MASK:
                     def = def + CLASS + SPACE + yangName + BUILDER + SPACE + EXTEND + SPACE;
-                    for (JavaQualifiedTypeInfo info : holder.getExtendsList()) {
-                        if (info.getClassInfo().contains(BUILDER)
-                                && info.getClassInfo().contains(getCapitalCase(DEFAULT))) {
-                            def = getDefinitionString(def, info, holder);
-                        }
-                    }
-
-                    def = trimAtLast(def, COMMA);
-
+                    def = getDefinitionString(def, holder);
                     return def + SPACE + IMPLEMENTS + SPACE + yangName + PERIOD
                             + yangName + BUILDER + SPACE + OPEN_CURLY_BRACKET + NEW_LINE;
 
                 case IMPL_CLASS_MASK:
                     def = def + SPACE + CLASS + SPACE + getCapitalCase(DEFAULT) + yangName + SPACE + EXTEND + SPACE;
-                    for (JavaQualifiedTypeInfo info : holder.getExtendsList()) {
-                        if (!info.getClassInfo().contains(BUILDER)
-                                && info.getClassInfo().contains(getCapitalCase(DEFAULT))) {
-                            def = getDefinitionString(def, info, holder);
-                        }
-                    }
-
-                    def = trimAtLast(def, COMMA);
-
+                    def = getDefinitionString(def, holder);
                     return def + SPACE + IMPLEMENTS + SPACE
                             + yangName + SPACE + OPEN_CURLY_BRACKET + NEW_LINE;
 
                 case OPERATION_CLASS_MASK:
-                    def = def + SPACE + CLASS + SPACE + yangName + OPERATION + SPACE;
-                    for (JavaQualifiedTypeInfo info : holder.getExtendsList()) {
-                        if (!info.getClassInfo().contains(BUILDER)
-                                && info.getClassInfo().contains(OPERATION)) {
-                            def = getDefinitionString(def, info, holder);
-                        }
-                    }
-
-                    def = trimAtLast(def, COMMA);
-
-                    return def + SPACE + EXTEND + SPACE
-                            + getCapitalCase(DEFAULT) + yangName + SPACE + OPEN_CURLY_BRACKET + NEW_LINE;
+                    def = def + CLASS + SPACE + yangName + OPERATION + SPACE + EXTEND + SPACE;
+                    def = getDefinitionString(def, holder);
+                    return def + SPACE;
                 default:
                     return null;
             }
@@ -484,17 +441,18 @@
      * Returns updated class definition.
      *
      * @param def    current definition
-     * @param info   java qualified info
      * @param holder extend list holder
      * @return updated class definition
      */
-    private static String getDefinitionString(String def, JavaQualifiedTypeInfo info, JavaExtendsListHolder holder) {
-        if (!holder.getExtendedClassStore().get(info)) {
-            def = def + info.getClassInfo() + COMMA + SPACE;
-        } else {
-            def = def + info.getPkgInfo() + PERIOD + info.getClassInfo() + COMMA + SPACE;
+    private static String getDefinitionString(String def, JavaExtendsListHolder holder) {
+        for (JavaQualifiedTypeInfo info : holder.getExtendsList()) {
+            if (!holder.getExtendedClassStore().get(info)) {
+                def = def + info.getClassInfo() + COMMA + SPACE;
+            } else {
+                def = def + info.getPkgInfo() + PERIOD + info.getClassInfo() + COMMA + SPACE;
+            }
         }
-        return def;
+        return trimAtLast(def, COMMA);
     }
 
 }
diff --git a/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/utils/JavaCodeSnippetGen.java b/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/utils/JavaCodeSnippetGen.java
index ade6375..cd361d0 100644
--- a/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/utils/JavaCodeSnippetGen.java
+++ b/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/utils/JavaCodeSnippetGen.java
@@ -95,8 +95,7 @@
      * Returns the textual java code information corresponding to the import list.
      *
      * @param importInfo import info
-     * @return the textual java code information corresponding to the import
-     * list
+     * @return the textual java code information corresponding to the import list
      */
     public static String getImportText(JavaQualifiedTypeInfo importInfo) {
         return IMPORT + importInfo.getPkgInfo() + PERIOD + importInfo.getClassInfo() + SEMI_COLAN + NEW_LINE;
@@ -147,8 +146,7 @@
     }
 
     /**
-     * Returns based on the file type and the YANG name of the file, generate the class
-     * / interface definition close.
+     * Returns based on the file type and the YANG name of the file, generate the class / interface definition close.
      *
      * @return corresponding textual java code information
      */
diff --git a/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/utils/JavaExtendsListHolder.java b/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/utils/JavaExtendsListHolder.java
index d686842..9bd3bbf 100644
--- a/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/utils/JavaExtendsListHolder.java
+++ b/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/utils/JavaExtendsListHolder.java
@@ -31,8 +31,8 @@
 import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getCapitalCase;
 
 /**
- * Represent the extends list for generated java classes. It holds the class details which needs
- * to be extended by the generated java code.
+ * Represent the extends list for generated java classes. It holds the class details which needs to be extended by the
+ * generated java code.
  */
 public class JavaExtendsListHolder {
 
diff --git a/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/utils/JavaFileGenerator.java b/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/utils/JavaFileGenerator.java
index 5aecdc4..c8d55d7 100644
--- a/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/utils/JavaFileGenerator.java
+++ b/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/utils/JavaFileGenerator.java
@@ -26,9 +26,10 @@
 import org.onosproject.yangutils.datamodel.YangLeaf;
 import org.onosproject.yangutils.datamodel.YangLeafList;
 import org.onosproject.yangutils.datamodel.YangLeavesHolder;
+import org.onosproject.yangutils.datamodel.YangModule;
 import org.onosproject.yangutils.datamodel.YangNode;
-import org.onosproject.yangutils.datamodel.YangTypeDef;
 import org.onosproject.yangutils.datamodel.YangType;
+import org.onosproject.yangutils.datamodel.YangTypeDef;
 import org.onosproject.yangutils.datamodel.utils.builtindatatype.YangDataTypes;
 import org.onosproject.yangutils.translator.tojava.JavaAttributeInfo;
 import org.onosproject.yangutils.translator.tojava.JavaCodeGeneratorInfo;
@@ -37,7 +38,9 @@
 import org.onosproject.yangutils.translator.tojava.JavaQualifiedTypeInfo;
 import org.onosproject.yangutils.translator.tojava.TempJavaCodeFragmentFilesContainer;
 import org.onosproject.yangutils.translator.tojava.TempJavaEnumerationFragmentFiles;
+import org.onosproject.yangutils.translator.tojava.TempJavaEventFragmentFiles;
 import org.onosproject.yangutils.translator.tojava.TempJavaServiceFragmentFiles;
+import org.onosproject.yangutils.translator.tojava.YangJavaModelUtils;
 import org.onosproject.yangutils.utils.io.impl.YangPluginConfig;
 
 import static org.onosproject.yangutils.translator.tojava.GeneratedJavaFileType.BUILDER_CLASS_MASK;
@@ -54,7 +57,6 @@
 import static org.onosproject.yangutils.translator.tojava.GeneratedJavaFileType.OPERATION_BUILDER_CLASS_MASK;
 import static org.onosproject.yangutils.translator.tojava.GeneratedJavaFileType.OPERATION_CLASS_MASK;
 import static org.onosproject.yangutils.translator.tojava.GeneratedTempFileType.ATTRIBUTES_MASK;
-import static org.onosproject.yangutils.translator.tojava.GeneratedTempFileType.AUGMENTE_CLASS_CONSTRUCTOR_MASK;
 import static org.onosproject.yangutils.translator.tojava.GeneratedTempFileType.CONSTRUCTOR_FOR_TYPE_MASK;
 import static org.onosproject.yangutils.translator.tojava.GeneratedTempFileType.CONSTRUCTOR_IMPL_MASK;
 import static org.onosproject.yangutils.translator.tojava.GeneratedTempFileType.ENUM_IMPL_MASK;
@@ -86,9 +88,10 @@
 import static org.onosproject.yangutils.translator.tojava.utils.MethodsGenerator.addDeActivateMethod;
 import static org.onosproject.yangutils.translator.tojava.utils.MethodsGenerator.getAddAugmentInfoMethodImpl;
 import static org.onosproject.yangutils.translator.tojava.utils.MethodsGenerator.getAugmentInfoImpl;
-import static org.onosproject.yangutils.translator.tojava.utils.MethodsGenerator.getAugmentedNodesConstructorStart;
+import static org.onosproject.yangutils.translator.tojava.utils.MethodsGenerator.getAugmentInfoMapImpl;
 import static org.onosproject.yangutils.translator.tojava.utils.MethodsGenerator.getAugmentsDataMethodForManager;
 import static org.onosproject.yangutils.translator.tojava.utils.MethodsGenerator.getAugmentsDataMethodForService;
+import static org.onosproject.yangutils.translator.tojava.utils.MethodsGenerator.getBaseClassMethodImpl;
 import static org.onosproject.yangutils.translator.tojava.utils.MethodsGenerator.getConstructorStart;
 import static org.onosproject.yangutils.translator.tojava.utils.MethodsGenerator.getEnumsConstructor;
 import static org.onosproject.yangutils.translator.tojava.utils.MethodsGenerator.getEnumsOfMethod;
@@ -101,6 +104,7 @@
 import static org.onosproject.yangutils.translator.tojava.utils.MethodsGenerator.getGetterString;
 import static org.onosproject.yangutils.translator.tojava.utils.MethodsGenerator.getHashCodeMethodClose;
 import static org.onosproject.yangutils.translator.tojava.utils.MethodsGenerator.getHashCodeMethodOpen;
+import static org.onosproject.yangutils.translator.tojava.utils.MethodsGenerator.getIsFilterContentMatch;
 import static org.onosproject.yangutils.translator.tojava.utils.MethodsGenerator.getOmitNullValueString;
 import static org.onosproject.yangutils.translator.tojava.utils.MethodsGenerator.getOpParamConstructorStart;
 import static org.onosproject.yangutils.translator.tojava.utils.MethodsGenerator.getOperationTypeSetter;
@@ -116,65 +120,61 @@
 import static org.onosproject.yangutils.translator.tojava.utils.MethodsGenerator.getToStringMethodOpen;
 import static org.onosproject.yangutils.translator.tojava.utils.MethodsGenerator.getToStringSelectLeafListgetter;
 import static org.onosproject.yangutils.translator.tojava.utils.MethodsGenerator.getToStringSelectLeafgetter;
-import static org.onosproject.yangutils.translator.tojava.utils.MethodsGenerator.getisFilterContentMatch;
 import static org.onosproject.yangutils.utils.UtilConstants.BASE64;
-import static org.onosproject.yangutils.utils.UtilConstants.BINARY_STRING;
-import static org.onosproject.yangutils.utils.UtilConstants.BITS_STRING;
+import static org.onosproject.yangutils.utils.UtilConstants.BITSET;
 import static org.onosproject.yangutils.utils.UtilConstants.BUILDER;
 import static org.onosproject.yangutils.utils.UtilConstants.CLOSE_CURLY_BRACKET;
 import static org.onosproject.yangutils.utils.UtilConstants.CLOSE_PARENTHESIS;
 import static org.onosproject.yangutils.utils.UtilConstants.COMMA;
+import static org.onosproject.yangutils.utils.UtilConstants.CREATE;
 import static org.onosproject.yangutils.utils.UtilConstants.DEFAULT;
+import static org.onosproject.yangutils.utils.UtilConstants.DELETE;
 import static org.onosproject.yangutils.utils.UtilConstants.EIGHT_SPACE_INDENTATION;
 import static org.onosproject.yangutils.utils.UtilConstants.EMPTY_STRING;
+import static org.onosproject.yangutils.utils.UtilConstants.ENCODE_TO_STRING;
+import static org.onosproject.yangutils.utils.UtilConstants.ENUM;
+import static org.onosproject.yangutils.utils.UtilConstants.EQUAL;
 import static org.onosproject.yangutils.utils.UtilConstants.EVENT_LISTENER_STRING;
 import static org.onosproject.yangutils.utils.UtilConstants.EVENT_STRING;
 import static org.onosproject.yangutils.utils.UtilConstants.EVENT_SUBJECT_NAME_SUFFIX;
+import static org.onosproject.yangutils.utils.UtilConstants.FILTER_LEAF;
+import static org.onosproject.yangutils.utils.UtilConstants.FILTER_LEAF_LIST;
 import static org.onosproject.yangutils.utils.UtilConstants.FOUR_SPACE_INDENTATION;
 import static org.onosproject.yangutils.utils.UtilConstants.GET_ENCODER;
-import static org.onosproject.yangutils.utils.UtilConstants.ENCODE_TO_STRING;
-import static org.onosproject.yangutils.utils.UtilConstants.JAVA_UTIL_OBJECTS_IMPORT_PKG;
-import static org.onosproject.yangutils.utils.UtilConstants.JAVA_UTIL_IMPORT_BASE64_CLASS;
+import static org.onosproject.yangutils.utils.UtilConstants.GET_FILTER_LEAF;
+import static org.onosproject.yangutils.utils.UtilConstants.GET_FILTER_LEAF_LIST;
 import static org.onosproject.yangutils.utils.UtilConstants.IMPORT;
 import static org.onosproject.yangutils.utils.UtilConstants.INT;
+import static org.onosproject.yangutils.utils.UtilConstants.JAVA_UTIL_IMPORT_BASE64_CLASS;
+import static org.onosproject.yangutils.utils.UtilConstants.JAVA_UTIL_OBJECTS_IMPORT_PKG;
 import static org.onosproject.yangutils.utils.UtilConstants.LOGGER_STATEMENT;
 import static org.onosproject.yangutils.utils.UtilConstants.MANAGER;
+import static org.onosproject.yangutils.utils.UtilConstants.MERGE;
+import static org.onosproject.yangutils.utils.UtilConstants.NEW;
 import static org.onosproject.yangutils.utils.UtilConstants.NEW_LINE;
 import static org.onosproject.yangutils.utils.UtilConstants.OBJECT;
+import static org.onosproject.yangutils.utils.UtilConstants.OPEN_CURLY_BRACKET;
 import static org.onosproject.yangutils.utils.UtilConstants.OPEN_PARENTHESIS;
-import static org.onosproject.yangutils.utils.UtilConstants.PRIVATE;
-import static org.onosproject.yangutils.utils.UtilConstants.PUBLIC;
-import static org.onosproject.yangutils.utils.UtilConstants.SEMI_COLAN;
-import static org.onosproject.yangutils.utils.UtilConstants.SERVICE_METHOD_STRING;
-import static org.onosproject.yangutils.utils.UtilConstants.SUPER;
-import static org.onosproject.yangutils.utils.UtilConstants.BITSET;
-import static org.onosproject.yangutils.utils.UtilConstants.GET_FILTER_LEAF;
-import static org.onosproject.yangutils.utils.UtilConstants.FILTER_LEAF;
-import static org.onosproject.yangutils.utils.UtilConstants.SELECT_LEAF;
-import static org.onosproject.yangutils.utils.UtilConstants.GET_FILTER_LEAF_LIST;
-import static org.onosproject.yangutils.utils.UtilConstants.FILTER_LEAF_LIST;
-import static org.onosproject.yangutils.utils.UtilConstants.SELECT_LEAF_LIST;
 import static org.onosproject.yangutils.utils.UtilConstants.OPERATION_ENUM;
 import static org.onosproject.yangutils.utils.UtilConstants.OP_PARAM_TYPE;
-import static org.onosproject.yangutils.utils.UtilConstants.SPACE;
-import static org.onosproject.yangutils.utils.UtilConstants.EQUAL;
-import static org.onosproject.yangutils.utils.UtilConstants.NEW;
-import static org.onosproject.yangutils.utils.UtilConstants.STATIC;
-import static org.onosproject.yangutils.utils.UtilConstants.ENUM;
-import static org.onosproject.yangutils.utils.UtilConstants.OPEN_CURLY_BRACKET;
-import static org.onosproject.yangutils.utils.UtilConstants.MERGE;
+import static org.onosproject.yangutils.utils.UtilConstants.PERIOD;
+import static org.onosproject.yangutils.utils.UtilConstants.PRIVATE;
+import static org.onosproject.yangutils.utils.UtilConstants.PUBLIC;
+import static org.onosproject.yangutils.utils.UtilConstants.REMOVE;
 import static org.onosproject.yangutils.utils.UtilConstants.REPLACE;
 import static org.onosproject.yangutils.utils.UtilConstants.RETURN;
-import static org.onosproject.yangutils.utils.UtilConstants.CREATE;
-import static org.onosproject.yangutils.utils.UtilConstants.REMOVE;
-import static org.onosproject.yangutils.utils.UtilConstants.DELETE;
-import static org.onosproject.yangutils.utils.UtilConstants.PERIOD;
+import static org.onosproject.yangutils.utils.UtilConstants.SELECT_LEAF;
+import static org.onosproject.yangutils.utils.UtilConstants.SELECT_LEAF_LIST;
+import static org.onosproject.yangutils.utils.UtilConstants.SEMI_COLAN;
+import static org.onosproject.yangutils.utils.UtilConstants.SERVICE_METHOD_STRING;
+import static org.onosproject.yangutils.utils.UtilConstants.SPACE;
+import static org.onosproject.yangutils.utils.UtilConstants.STATIC;
 import static org.onosproject.yangutils.utils.UtilConstants.STRING_DATA_TYPE;
+import static org.onosproject.yangutils.utils.UtilConstants.SUPER;
 import static org.onosproject.yangutils.utils.UtilConstants.TO;
 import static org.onosproject.yangutils.utils.io.impl.JavaDocGen.JavaDocType.GETTER_METHOD;
 import static org.onosproject.yangutils.utils.io.impl.JavaDocGen.JavaDocType.TYPE_CONSTRUCTOR;
 import static org.onosproject.yangutils.utils.io.impl.JavaDocGen.getJavaDoc;
-import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getCamelCase;
 import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getCapitalCase;
 import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.insertDataIntoJavaFile;
 import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.trimAtLast;
@@ -203,7 +203,13 @@
             throws IOException {
 
         JavaFileInfo javaFileInfo = ((JavaFileInfoContainer) curNode).getJavaFileInfo();
-        String path = javaFileInfo.getBaseCodeGenPath() + javaFileInfo.getPackageFilePath();
+
+        String path;
+        if (curNode instanceof YangModule) {
+            path = javaFileInfo.getPluginConfig().getCodeGenDir() + javaFileInfo.getPackageFilePath();
+        } else {
+            path = javaFileInfo.getBaseCodeGenPath() + javaFileInfo.getPackageFilePath();
+        }
 
         String className = getCapitalCase(javaFileInfo.getJavaName());
 
@@ -244,7 +250,12 @@
         YangPluginConfig pluginConfig = javaFileInfo.getPluginConfig();
 
         String className = getCapitalCase(javaFileInfo.getJavaName());
-        String path = javaFileInfo.getBaseCodeGenPath() + javaFileInfo.getPackageFilePath();
+        String path;
+        if (curNode instanceof YangModule) {
+            path = javaFileInfo.getPluginConfig().getCodeGenDir() + javaFileInfo.getPackageFilePath();
+        } else {
+            path = javaFileInfo.getBaseCodeGenPath() + javaFileInfo.getPackageFilePath();
+        }
 
         initiateJavaFileGeneration(file, BUILDER_INTERFACE_MASK, null, curNode, className);
         List<String> methods = new ArrayList<>();
@@ -302,14 +313,16 @@
         YangPluginConfig pluginConfig = javaFileInfo.getPluginConfig();
 
         String className = getCapitalCase(javaFileInfo.getJavaName());
-        String path = javaFileInfo.getBaseCodeGenPath() + javaFileInfo.getPackageFilePath();
+
+        String path;
+        if (curNode instanceof YangModule) {
+            path = javaFileInfo.getPluginConfig().getCodeGenDir() + javaFileInfo.getPackageFilePath();
+        } else {
+            path = javaFileInfo.getBaseCodeGenPath() + javaFileInfo.getPackageFilePath();
+        }
 
         initiateJavaFileGeneration(file, BUILDER_CLASS_MASK, null, curNode, className);
         List<String> methods = new ArrayList<>();
-        boolean isAugmentNode = false;
-        if (curNode instanceof YangAugment) {
-            isAugmentNode = true;
-        }
 
         if (isAttrPresent) {
             /**
@@ -339,21 +352,6 @@
                         ((TempJavaCodeFragmentFilesContainer) curNode).getTempJavaCodeFragmentFiles()
                                 .getBeanTempFiles(), path));
 
-                if (isAugmentNode) {
-                    YangAugment augment = (YangAugment) curNode;
-                    String augmentNode = getCapitalCase(
-                            getCamelCase(augment.getAugmentedNode().getName(), pluginConfig.getConflictResolver()));
-                    /**
-                     * Constructor.
-                     */
-                    String constructor = getAugmentedNodesConstructorStart(className, augmentNode)
-                            + getDataFromTempFileHandle(AUGMENTE_CLASS_CONSTRUCTOR_MASK,
-                            ((TempJavaCodeFragmentFilesContainer) curNode).getTempJavaCodeFragmentFiles()
-                                    .getBeanTempFiles(), path);
-
-                    methods.add(constructor + FOUR_SPACE_INDENTATION + CLOSE_CURLY_BRACKET +
-                            NEW_LINE + NEW_LINE);
-                }
                 insertDataIntoJavaFile(file, NEW_LINE);
             } catch (IOException e) {
                 throw new IOException("No data found in temporary java code fragment files for " + className
@@ -382,14 +380,15 @@
 
     /**
      * Returns generated op param builder class file for current node.
-     * @param file    file handle
-     * @param curNode  current YANG node
+     *
+     * @param file          file handle
+     * @param curNode       current YANG node
      * @param isAttrPresent if any attribute is present or not
      * @return builder class file
      * @throws IOException when fails to write in file
      */
     public static File generateOpParamBuilderClassFile(File file, YangNode curNode,
-                                                boolean isAttrPresent) throws IOException {
+                                                       boolean isAttrPresent) throws IOException {
 
         JavaFileInfo javaFileInfo = ((JavaFileInfoContainer) curNode).getJavaFileInfo();
         YangPluginConfig pluginConfig = javaFileInfo.getPluginConfig();
@@ -409,7 +408,7 @@
 
             } catch (IOException e) {
                 throw new IOException("No data found in temporary java code fragment files for " + className
-                                              + " while impl class file generation");
+                        + " while impl class file generation");
             }
 
             try {
@@ -445,7 +444,7 @@
 
             } catch (IOException e) {
                 throw new IOException("No data found in temporary java code fragment files for " + className
-                                              + " while impl class file generation");
+                        + " while impl class file generation");
             }
 
             try {
@@ -476,7 +475,7 @@
                 insertDataIntoJavaFile(file, NEW_LINE);
             } catch (IOException e) {
                 throw new IOException("No data found in temporary java code fragment files for " + className
-                                              + " while builder class file generation");
+                        + " while builder class file generation");
             }
         } else {
             insertDataIntoJavaFile(file, NEW_LINE);
@@ -579,15 +578,16 @@
         YangPluginConfig pluginConfig = javaFileInfo.getPluginConfig();
 
         String className = getCapitalCase(javaFileInfo.getJavaName());
-        String path = javaFileInfo.getBaseCodeGenPath() + javaFileInfo.getPackageFilePath();
+        String path;
+        if (curNode instanceof YangModule) {
+            path = javaFileInfo.getPluginConfig().getCodeGenDir() + javaFileInfo.getPackageFilePath();
+        } else {
+            path = javaFileInfo.getBaseCodeGenPath() + javaFileInfo.getPackageFilePath();
+        }
 
         initiateJavaFileGeneration(file, IMPL_CLASS_MASK, imports, curNode, className);
 
         List<String> methods = new ArrayList<>();
-        boolean isAugmentNode = false;
-        if (curNode instanceof YangAugment) {
-            isAugmentNode = true;
-        }
         if (curNode instanceof YangAugmentableNode) {
             insertDataIntoJavaFile(file, addAugmentationAttribute());
         }
@@ -648,11 +648,6 @@
              * Constructor.
              */
             String constructor = getConstructorStart(className, pluginConfig);
-            if (isAugmentNode) {
-                constructor = constructor + EIGHT_SPACE_INDENTATION + SUPER + OPEN_PARENTHESIS
-                        + BUILDER.toLowerCase() + OBJECT
-                        + CLOSE_PARENTHESIS + SEMI_COLAN + NEW_LINE;
-            }
             constructor = constructor + getDataFromTempFileHandle(CONSTRUCTOR_IMPL_MASK,
                     ((TempJavaCodeFragmentFilesContainer) curNode).getTempJavaCodeFragmentFiles()
                             .getBeanTempFiles(), path);
@@ -666,6 +661,7 @@
         if (curNode instanceof YangAugmentableNode) {
             methods.add(getAddAugmentInfoMethodImpl());
             methods.add(getAugmentInfoImpl());
+            methods.add(getAugmentInfoMapImpl(javaFileInfo.getPluginConfig()));
         }
 
         /**
@@ -681,11 +677,11 @@
     /**
      * Returns generated op param class file for current node.
      *
-     * @param file           file handle
-     * @param curNode        current YANG node
-     * @param isAttrPresent  if any attribute is present or not
-     * @param imports        import list
-     * @return    returns generated op param class file for current node
+     * @param file          file handle
+     * @param curNode       current YANG node
+     * @param isAttrPresent if any attribute is present or not
+     * @param imports       import list
+     * @return returns generated op param class file for current node
      * @throws IOException when fails to write in file
      */
     public static File generateOpParamImplClassFile(File file, YangNode curNode,
@@ -696,7 +692,6 @@
         YangPluginConfig pluginConfig = javaFileInfo.getPluginConfig();
 
         String className = getCapitalCase(javaFileInfo.getJavaName());
-        String path = javaFileInfo.getBaseCodeGenPath() + javaFileInfo.getPackageFilePath();
 
         initiateJavaFileGeneration(file, OPERATION_CLASS_MASK, imports, curNode, className);
 
@@ -718,7 +713,7 @@
 
             } catch (IOException e) {
                 throw new IOException("No data found in temporary java code fragment files for " + className
-                                              + " while impl class file generation");
+                        + " while impl class file generation");
             }
 
             /**
@@ -730,7 +725,7 @@
 
             } catch (IOException e) {
                 throw new IOException("No data found in temporary java code fragment files for " + className
-                                              + " while impl class file generation");
+                        + " while impl class file generation");
             }
 
             try {
@@ -766,7 +761,7 @@
 
             } catch (IOException e) {
                 throw new IOException("No data found in temporary java code fragment files for " + className
-                                              + " while impl class file generation");
+                        + " while impl class file generation");
             }
 
             if (curNode instanceof YangLeavesHolder) {
@@ -786,7 +781,7 @@
             }
 
             methods.add(getOperationTypegetter());
-            methods.add(getisFilterContentMatch(className, curNode, pluginConfig));
+            methods.add(getIsFilterContentMatch(className, curNode, pluginConfig));
 
         } else {
             insertDataIntoJavaFile(file, NEW_LINE);
@@ -821,6 +816,12 @@
 
         methods.add(constructor + FOUR_SPACE_INDENTATION + CLOSE_CURLY_BRACKET);
 
+        if (curNode instanceof YangAugment) {
+            String clsName = getCapitalCase(DEFAULT) +
+                    getCapitalCase(YangJavaModelUtils.getAugmentClassName((YangAugment) curNode, pluginConfig));
+            methods.add(getBaseClassMethodImpl(clsName));
+        }
+
         /**
          * Add methods in impl class.
          */
@@ -925,9 +926,9 @@
              */
              if (type.getDataType().equals(YangDataTypes.BINARY)) {
                     JavaQualifiedTypeInfo qualifiedTypeInfo = getQualifiedTypeInfoOfCurNode(curNode,
-                                                                     getCapitalCase(BINARY_STRING));
+                                                                                            getCapitalCase("binary"));
 
-                    JavaAttributeInfo attr =  getAttributeInfoForTheData(qualifiedTypeInfo, BINARY_STRING, null, false,
+                    JavaAttributeInfo attr =  getAttributeInfoForTheData(qualifiedTypeInfo, "binary", null, false,
                                                                          false);
                     String attributeName = attr.getAttributeName();
                     String bitsToStringMethod = MethodsGenerator.getOverRideString() + FOUR_SPACE_INDENTATION + PUBLIC
@@ -939,10 +940,9 @@
                     methods.add(bitsToStringMethod);
              } else if (type.getDataType().equals(YangDataTypes.BITS)) {
                     JavaQualifiedTypeInfo qualifiedTypeInfo = getQualifiedTypeInfoOfCurNode(curNode,
-                                                                     getCapitalCase(BITS_STRING));
+                                                                                            getCapitalCase("bits"));
 
-                    JavaAttributeInfo attr =  getAttributeInfoForTheData(qualifiedTypeInfo, BITS_STRING,
-                                                                         null, false, false);
+                    JavaAttributeInfo attr =  getAttributeInfoForTheData(qualifiedTypeInfo, "bits", null, false, false);
                     String attributeName = attr.getAttributeName();
                     String bitsToStringMethod = MethodsGenerator.getOverRideString() + FOUR_SPACE_INDENTATION + PUBLIC
                             + SPACE + STRING_DATA_TYPE + SPACE + TO + STRING_DATA_TYPE + OPEN_PARENTHESIS
@@ -1238,8 +1238,8 @@
         String className = getCapitalCase(((JavaFileInfoContainer) curNode).getJavaFileInfo().getJavaName())
                 + EVENT_STRING;
 
-        TempJavaServiceFragmentFiles tempFiles = ((TempJavaCodeFragmentFilesContainer) curNode)
-                .getTempJavaCodeFragmentFiles().getServiceTempFiles();
+        TempJavaEventFragmentFiles tempFiles = ((TempJavaCodeFragmentFilesContainer) curNode)
+                .getTempJavaCodeFragmentFiles().getEventFragmentFiles();
 
         String path = ((JavaFileInfoContainer) curNode).getJavaFileInfo().getBaseCodeGenPath()
                 + ((JavaFileInfoContainer) curNode).getJavaFileInfo().getPackageFilePath();
@@ -1296,8 +1296,9 @@
 
         String path = ((JavaFileInfoContainer) curNode).getJavaFileInfo().getBaseCodeGenPath()
                 + ((JavaFileInfoContainer) curNode).getJavaFileInfo().getPackageFilePath();
-        TempJavaServiceFragmentFiles tempFiles = ((TempJavaCodeFragmentFilesContainer) curNode)
-                .getTempJavaCodeFragmentFiles().getServiceTempFiles();
+
+        TempJavaEventFragmentFiles tempFiles = ((TempJavaCodeFragmentFilesContainer) curNode)
+                .getTempJavaCodeFragmentFiles().getEventFragmentFiles();
 
         insertDataIntoJavaFile(file, NEW_LINE);
         try {
diff --git a/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/utils/JavaFileGeneratorUtils.java b/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/utils/JavaFileGeneratorUtils.java
index 14e71ad..f76d9b2 100644
--- a/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/utils/JavaFileGeneratorUtils.java
+++ b/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/utils/JavaFileGeneratorUtils.java
@@ -19,9 +19,7 @@
 import java.io.File;
 import java.io.IOException;
 import java.util.ArrayList;
-import java.util.HashMap;
 import java.util.List;
-import java.util.Map;
 
 import org.onosproject.yangutils.datamodel.YangAtomicPath;
 import org.onosproject.yangutils.datamodel.YangAugment;
@@ -36,6 +34,7 @@
 import org.onosproject.yangutils.translator.tojava.TempJavaBeanFragmentFiles;
 import org.onosproject.yangutils.translator.tojava.TempJavaCodeFragmentFiles;
 import org.onosproject.yangutils.translator.tojava.TempJavaEnumerationFragmentFiles;
+import org.onosproject.yangutils.translator.tojava.TempJavaEventFragmentFiles;
 import org.onosproject.yangutils.translator.tojava.TempJavaFragmentFiles;
 import org.onosproject.yangutils.translator.tojava.TempJavaServiceFragmentFiles;
 import org.onosproject.yangutils.translator.tojava.TempJavaTypeFragmentFiles;
@@ -81,9 +80,7 @@
 import static org.onosproject.yangutils.translator.tojava.JavaQualifiedTypeInfo.getQualifiedTypeInfoOfCurNode;
 import static org.onosproject.yangutils.translator.tojava.YangJavaModelUtils.getAugmentedNodesPackage;
 import static org.onosproject.yangutils.translator.tojava.utils.ClassDefinitionGenerator.generateClassDefinition;
-import static org.onosproject.yangutils.utils.UtilConstants.BUILDER;
 import static org.onosproject.yangutils.utils.UtilConstants.CLOSE_CURLY_BRACKET;
-import static org.onosproject.yangutils.utils.UtilConstants.DEFAULT;
 import static org.onosproject.yangutils.utils.UtilConstants.NEW_LINE;
 import static org.onosproject.yangutils.utils.UtilConstants.PACKAGE;
 import static org.onosproject.yangutils.utils.UtilConstants.PERIOD;
@@ -97,9 +94,9 @@
 import static org.onosproject.yangutils.utils.io.impl.JavaDocGen.JavaDocType.EVENT;
 import static org.onosproject.yangutils.utils.io.impl.JavaDocGen.JavaDocType.EVENT_LISTENER;
 import static org.onosproject.yangutils.utils.io.impl.JavaDocGen.JavaDocType.EVENT_SUBJECT_CLASS;
-import static org.onosproject.yangutils.utils.io.impl.JavaDocGen.JavaDocType.OPERATION_CLASS;
 import static org.onosproject.yangutils.utils.io.impl.JavaDocGen.JavaDocType.IMPL_CLASS;
 import static org.onosproject.yangutils.utils.io.impl.JavaDocGen.JavaDocType.INTERFACE;
+import static org.onosproject.yangutils.utils.io.impl.JavaDocGen.JavaDocType.OPERATION_CLASS;
 import static org.onosproject.yangutils.utils.io.impl.JavaDocGen.JavaDocType.RPC_INTERFACE;
 import static org.onosproject.yangutils.utils.io.impl.JavaDocGen.JavaDocType.RPC_MANAGER;
 import static org.onosproject.yangutils.utils.io.impl.JavaDocGen.getJavaDoc;
@@ -123,15 +120,15 @@
     /**
      * Returns a file object for generated file.
      *
-     * @param fileName  file name
      * @param filePath  file package path
+     * @param fileName  file name
      * @param extension file extension
-     * @param handle    cached file handle
+     * @param baseCodePath    cached file handle
      * @return file object
      */
-    public static File getFileObject(String filePath, String fileName, String extension, JavaFileInfo handle) {
+    public static File getFileObject(String filePath, String fileName, String extension, String baseCodePath) {
 
-        return new File(handle.getBaseCodeGenPath() + filePath + SLASH + fileName + extension);
+        return new File(baseCodePath + filePath + SLASH + fileName + extension);
     }
 
     /**
@@ -143,8 +140,8 @@
      * @return data stored in temporary files
      * @throws IOException when failed to get the data from temporary file handle
      */
-    public static String getDataFromTempFileHandle(int generatedTempFiles,
-                                                   TempJavaFragmentFiles tempJavaFragmentFiles, String absolutePath)
+    static String getDataFromTempFileHandle(int generatedTempFiles,
+                                            TempJavaFragmentFiles tempJavaFragmentFiles, String absolutePath)
             throws IOException {
 
         TempJavaTypeFragmentFiles typeFragmentFiles = null;
@@ -164,6 +161,11 @@
             serviceFragmentFiles = (TempJavaServiceFragmentFiles) tempJavaFragmentFiles;
         }
 
+        TempJavaEventFragmentFiles eventFragmentFiles = null;
+        if (tempJavaFragmentFiles instanceof TempJavaEventFragmentFiles) {
+            eventFragmentFiles = (TempJavaEventFragmentFiles) tempJavaFragmentFiles;
+        }
+
         if ((generatedTempFiles & ATTRIBUTES_MASK) != 0) {
             return tempJavaFragmentFiles
                     .getTemporaryDataFromFileHandle(tempJavaFragmentFiles.getAttributesTempFileHandle(),
@@ -247,39 +249,39 @@
                     .getTemporaryDataFromFileHandle(serviceFragmentFiles.getRpcImplTempFileHandle(),
                             absolutePath);
         } else if ((generatedTempFiles & EVENT_ENUM_MASK) != 0) {
-            if (serviceFragmentFiles == null) {
-                throw new TranslatorException("Required rpc implementation info is missing.");
+            if (eventFragmentFiles == null) {
+                throw new TranslatorException("Required event enum implementation info is missing.");
             }
-            return serviceFragmentFiles
-                    .getTemporaryDataFromFileHandle(serviceFragmentFiles.getEventEnumTempFileHandle(),
+            return eventFragmentFiles
+                    .getTemporaryDataFromFileHandle(eventFragmentFiles.getEventEnumTempFileHandle(),
                             absolutePath);
         } else if ((generatedTempFiles & EVENT_METHOD_MASK) != 0) {
-            if (serviceFragmentFiles == null) {
-                throw new TranslatorException("Required rpc implementation info is missing.");
+            if (eventFragmentFiles == null) {
+                throw new TranslatorException("Required event method implementation info is missing.");
             }
-            return serviceFragmentFiles
-                    .getTemporaryDataFromFileHandle(serviceFragmentFiles.getEventMethodTempFileHandle(),
+            return eventFragmentFiles
+                    .getTemporaryDataFromFileHandle(eventFragmentFiles.getEventMethodTempFileHandle(),
                             absolutePath);
         } else if ((generatedTempFiles & EVENT_SUBJECT_GETTER_MASK) != 0) {
-            if (serviceFragmentFiles == null) {
-                throw new TranslatorException("Required rpc implementation info is missing.");
+            if (eventFragmentFiles == null) {
+                throw new TranslatorException("Required event subject getter implementation info is missing.");
             }
-            return serviceFragmentFiles
-                    .getTemporaryDataFromFileHandle(serviceFragmentFiles.getEventSubjectGetterTempFileHandle(),
+            return eventFragmentFiles
+                    .getTemporaryDataFromFileHandle(eventFragmentFiles.getEventSubjectGetterTempFileHandle(),
                             absolutePath);
         } else if ((generatedTempFiles & EVENT_SUBJECT_SETTER_MASK) != 0) {
-            if (serviceFragmentFiles == null) {
-                throw new TranslatorException("Required rpc implementation info is missing.");
+            if (eventFragmentFiles == null) {
+                throw new TranslatorException("Required event subject setter implementation info is missing.");
             }
-            return serviceFragmentFiles
-                    .getTemporaryDataFromFileHandle(serviceFragmentFiles.getEventSubjectSetterTempFileHandle(),
+            return eventFragmentFiles
+                    .getTemporaryDataFromFileHandle(eventFragmentFiles.getEventSubjectSetterTempFileHandle(),
                             absolutePath);
         } else if ((generatedTempFiles & EVENT_SUBJECT_ATTRIBUTE_MASK) != 0) {
-            if (serviceFragmentFiles == null) {
-                throw new TranslatorException("Required rpc implementation info is missing.");
+            if (eventFragmentFiles == null) {
+                throw new TranslatorException("Required event subject attribute implementation info is missing.");
             }
-            return serviceFragmentFiles
-                    .getTemporaryDataFromFileHandle(serviceFragmentFiles.getEventSubjectAttributeTempFileHandle(),
+            return eventFragmentFiles
+                    .getTemporaryDataFromFileHandle(eventFragmentFiles.getEventSubjectAttributeTempFileHandle(),
                             absolutePath);
         }
         return null;
@@ -300,11 +302,15 @@
                                                   String pkg, YangPluginConfig pluginConfig)
             throws IOException {
 
+        boolean isFileCreated;
         try {
-            file.createNewFile();
+            isFileCreated = file.createNewFile();
+            if (!isFileCreated) {
+                throw new IOException("Failed to create " + file.getName() + " class file.");
+            }
             appendContents(file, className, genType, imports, pkg, pluginConfig);
         } catch (IOException e) {
-            throw new IOException("Failed to create " + file.getName() + " class file.");
+            throw new IOException("Failed to append contents in " + file.getName() + " class file.");
         }
     }
 
@@ -322,11 +328,15 @@
                                                   YangNode curNode, String className)
             throws IOException {
 
+        boolean isFileCreated;
         try {
-            file.createNewFile();
+            isFileCreated = file.createNewFile();
+            if (!isFileCreated) {
+                throw new IOException("Failed to create " + file.getName() + " class file.");
+            }
             appendContents(file, genType, imports, curNode, className);
         } catch (IOException e) {
-            throw new IOException("Failed to create " + file.getName() + " class file.");
+            throw new IOException("Failed to append contents in " + file.getName() + " class file.");
         }
     }
 
@@ -349,11 +359,7 @@
         String name = javaFileInfo.getJavaName();
         String path = javaFileInfo.getBaseCodeGenPath() + javaFileInfo.getPackageFilePath();
 
-        YangNode augmentedNode = null;
-        if (curNode instanceof YangAugment) {
-            augmentedNode = ((YangAugment) curNode).getAugmentedNode();
-        }
-        String pkgString = null;
+        String pkgString;
         if (genType == GENERATE_EVENT_CLASS
                 || genType == GENERATE_EVENT_LISTENER_INTERFACE
                 || genType == GENERATE_EVENT_SUBJECT_CLASS) {
@@ -363,11 +369,7 @@
         }
         switch (genType) {
             case INTERFACE_MASK:
-                if (augmentedNode != null) {
-                    appendHeaderContents(file, pkgString, importsList, augmentedNode);
-                } else {
-                    appendHeaderContents(file, pkgString, importsList);
-                }
+                appendHeaderContents(file, pkgString, importsList);
                 write(file, genType, INTERFACE, curNode, className);
                 break;
             case IMPL_CLASS_MASK:
@@ -470,8 +472,8 @@
     }
 
     /**
-     * Appends other contents to interface, impl and typedef classes.
-     * for example : ONOS copyright, imports and package.
+     * Appends other contents to interface, impl and typedef classes. for example : ONOS copyright, imports and
+     * package.
      *
      * @param file        generated file
      * @param pkg         generated package
@@ -485,7 +487,7 @@
         insertDataIntoJavaFile(file, pkg);
 
         /*
-         * TODO: add the file header using
+         * TODO: add the file header using comments for snippet of yang file.
          * JavaCodeSnippetGen.getFileHeaderComment
          */
 
@@ -498,39 +500,6 @@
     }
 
     /**
-     * Appends other contents to interface and impl classes when augmented node is not null.
-     * for example : ONOS copyright, imports and package.
-     *
-     * @param file          generated file
-     * @param pkg           generated package
-     * @param augmentedNode augmented node
-     * @param importsList   list of imports
-     * @throws IOException when fails to append contents
-     */
-    private static void appendHeaderContents(File file, String pkg, List<String> importsList, YangNode augmentedNode)
-            throws IOException {
-
-        insertDataIntoJavaFile(file, CopyrightHeader.getCopyrightHeader());
-        insertDataIntoJavaFile(file, pkg);
-
-        /*
-         * TODO: add the file header using
-         * JavaCodeSnippetGen.getFileHeaderComment
-         */
-
-        if (importsList != null) {
-            insertDataIntoJavaFile(file, NEW_LINE);
-            for (String imports : importsList) {
-                if (!imports.contains(getCapitalCase(DEFAULT) + getCapitalCase(getCamelCase(augmentedNode.getName(),
-                        null)))
-                        && !imports.contains(getCapitalCase(getCamelCase(augmentedNode.getName(), null)) + BUILDER)) {
-                    insertDataIntoJavaFile(file, imports);
-                }
-            }
-        }
-    }
-
-    /**
      * Writes data to the specific generated file.
      *
      * @param file        generated file
@@ -575,32 +544,12 @@
     }
 
     /**
-     * Returns resolved augments for manager classes.
-     *
-     * @param parent parent node
-     * @return resolved augments for manager classes
-     */
-    public static Map<YangAtomicPath, YangAugment> getResolvedAugmentsForManager(YangNode parent) {
-        Map<YangAtomicPath, YangAugment> resolvedAugmentsForManager = new HashMap<>();
-        YangNodeIdentifier nodeId;
-        List<YangAtomicPath> targets = new ArrayList<>();
-        for (YangAugment augment : getListOfAugments(parent)) {
-            nodeId = augment.getTargetNode().get(0).getNodeIdentifier();
-            if (validateNodeIdentifierInSet(nodeId, targets)) {
-                targets.add(augment.getTargetNode().get(0));
-                resolvedAugmentsForManager.put(augment.getTargetNode().get(0), augment);
-            }
-        }
-        return resolvedAugmentsForManager;
-    }
-
-    /**
      * Returns set of node identifiers.
      *
      * @param parent parent node
      * @return set of node identifiers
      */
-    public static List<YangAtomicPath> getSetOfNodeIdentifiers(YangNode parent) {
+    static List<YangAtomicPath> getSetOfNodeIdentifiers(YangNode parent) {
 
         List<YangAtomicPath> targets = new ArrayList<>();
         YangNodeIdentifier nodeId;
@@ -649,7 +598,6 @@
      * @param parent parent node
      */
     public static void addResolvedAugmentedDataNodeImports(YangNode parent) {
-        Map<YangAtomicPath, YangAugment> resolvedAugmentsForManager = getResolvedAugmentsForManager(parent);
         List<YangAtomicPath> targets = getSetOfNodeIdentifiers(parent);
         TempJavaCodeFragmentFiles tempJavaCodeFragmentFiles = ((JavaCodeGeneratorInfo) parent)
                 .getTempJavaCodeFragmentFiles();
@@ -658,7 +606,7 @@
         String curNodeName;
         JavaFileInfo parentInfo = ((JavaFileInfoContainer) parent).getJavaFileInfo();
         for (YangAtomicPath nodeId : targets) {
-            augmentedNode = resolvedAugmentsForManager.get(nodeId).getResolveNodeInPath().get(nodeId);
+            augmentedNode = nodeId.getResolvedNode().getParent();
             if (((JavaFileInfoContainer) augmentedNode).getJavaFileInfo().getJavaName() != null) {
                 curNodeName = ((JavaFileInfoContainer) augmentedNode).getJavaFileInfo().getJavaName();
             } else {
@@ -682,8 +630,8 @@
      * @param pluginConfig  plugin configurations
      * @return qualified type info of augmented node
      */
-    public static JavaQualifiedTypeInfo getQualifiedTypeInfoOfAugmentedNode(YangNode augmentedNode, String curNodeName,
-                                                                            YangPluginConfig pluginConfig) {
+    private static JavaQualifiedTypeInfo getQualifiedTypeInfoOfAugmentedNode(YangNode augmentedNode, String curNodeName,
+                                                                             YangPluginConfig pluginConfig) {
         JavaQualifiedTypeInfo javaQualifiedTypeInfo = getQualifiedTypeInfoOfCurNode(augmentedNode,
                 getCapitalCase(curNodeName));
         if (javaQualifiedTypeInfo.getPkgInfo() == null) {
@@ -719,7 +667,7 @@
      * @param parent        parent node
      * @return augmented class name for data methods in manager and service
      */
-    public static String getAugmentedClassNameForDataMethods(YangNode augmentedNode, YangNode parent) {
+    static String getAugmentedClassNameForDataMethods(YangNode augmentedNode, YangNode parent) {
         String curNodeName;
         JavaQualifiedTypeInfo javaQualifiedTypeInfo;
         JavaFileInfo parentInfo = ((JavaFileInfoContainer) parent).getJavaFileInfo();
@@ -751,7 +699,7 @@
      * @param pluginConfig plugin configurations
      * @return parent node name for data methods in manager and service
      */
-    public static String getParentNodeNameForDataMethods(YangNode parent, YangPluginConfig pluginConfig) {
+    static String getParentNodeNameForDataMethods(YangNode parent, YangPluginConfig pluginConfig) {
         JavaFileInfo parentInfo = ((JavaFileInfoContainer) parent).getJavaFileInfo();
         if (parentInfo.getJavaName() != null) {
             return getCapitalCase(parentInfo.getJavaName());
diff --git a/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/utils/MethodsGenerator.java b/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/utils/MethodsGenerator.java
index ea7824f..a8159a6 100644
--- a/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/utils/MethodsGenerator.java
+++ b/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/utils/MethodsGenerator.java
@@ -19,49 +19,54 @@
 import java.util.List;
 import java.util.Map;
 
+import org.onosproject.yangutils.datamodel.YangAtomicPath;
+import org.onosproject.yangutils.datamodel.YangAugmentableNode;
 import org.onosproject.yangutils.datamodel.YangLeaf;
 import org.onosproject.yangutils.datamodel.YangLeafList;
 import org.onosproject.yangutils.datamodel.YangLeavesHolder;
-import org.onosproject.yangutils.datamodel.YangAtomicPath;
-import org.onosproject.yangutils.datamodel.YangAugment;
 import org.onosproject.yangutils.datamodel.YangNode;
 import org.onosproject.yangutils.datamodel.YangType;
 import org.onosproject.yangutils.datamodel.utils.builtindatatype.YangDataTypes;
 import org.onosproject.yangutils.translator.exception.TranslatorException;
 import org.onosproject.yangutils.translator.tojava.JavaAttributeInfo;
-import org.onosproject.yangutils.translator.tojava.JavaFileInfoContainer;
 import org.onosproject.yangutils.translator.tojava.JavaCodeGeneratorInfo;
+import org.onosproject.yangutils.translator.tojava.JavaFileInfoContainer;
 import org.onosproject.yangutils.translator.tojava.TempJavaBeanFragmentFiles;
 import org.onosproject.yangutils.utils.io.impl.JavaDocGen;
 import org.onosproject.yangutils.utils.io.impl.YangPluginConfig;
 
+import static org.onosproject.yangutils.datamodel.utils.builtindatatype.YangDataTypes.BINARY;
+import static org.onosproject.yangutils.datamodel.utils.builtindatatype.YangDataTypes.BITS;
+import static org.onosproject.yangutils.datamodel.utils.builtindatatype.YangDataTypes.BOOLEAN;
 import static org.onosproject.yangutils.datamodel.utils.builtindatatype.YangDataTypes.DECIMAL64;
-import static org.onosproject.yangutils.datamodel.utils.builtindatatype.YangDataTypes.INT8;
+import static org.onosproject.yangutils.datamodel.utils.builtindatatype.YangDataTypes.EMPTY;
 import static org.onosproject.yangutils.datamodel.utils.builtindatatype.YangDataTypes.INT16;
 import static org.onosproject.yangutils.datamodel.utils.builtindatatype.YangDataTypes.INT32;
 import static org.onosproject.yangutils.datamodel.utils.builtindatatype.YangDataTypes.INT64;
-import static org.onosproject.yangutils.datamodel.utils.builtindatatype.YangDataTypes.UINT8;
+import static org.onosproject.yangutils.datamodel.utils.builtindatatype.YangDataTypes.INT8;
 import static org.onosproject.yangutils.datamodel.utils.builtindatatype.YangDataTypes.UINT16;
-import static org.onosproject.yangutils.datamodel.utils.builtindatatype.YangDataTypes.BOOLEAN;
-import static org.onosproject.yangutils.datamodel.utils.builtindatatype.YangDataTypes.UINT64;
 import static org.onosproject.yangutils.datamodel.utils.builtindatatype.YangDataTypes.UINT32;
+import static org.onosproject.yangutils.datamodel.utils.builtindatatype.YangDataTypes.UINT64;
+import static org.onosproject.yangutils.datamodel.utils.builtindatatype.YangDataTypes.UINT8;
 import static org.onosproject.yangutils.translator.tojava.GeneratedJavaFileType.GENERATE_EVENT_SUBJECT_CLASS;
 import static org.onosproject.yangutils.translator.tojava.GeneratedJavaFileType.GENERATE_SERVICE_AND_MANAGER;
-import static org.onosproject.yangutils.translator.tojava.utils.JavaFileGeneratorUtils.getAugmentedClassNameForDataMethods;
-import static org.onosproject.yangutils.translator.tojava.utils.JavaFileGeneratorUtils.getParentNodeNameForDataMethods;
-import static org.onosproject.yangutils.translator.tojava.utils.JavaFileGeneratorUtils.getResolvedAugmentsForManager;
-import static org.onosproject.yangutils.translator.tojava.utils.JavaFileGeneratorUtils.getSetOfNodeIdentifiers;
 import static org.onosproject.yangutils.translator.tojava.TempJavaFragmentFiles.getJavaAttributeOfLeaf;
 import static org.onosproject.yangutils.translator.tojava.TempJavaFragmentFiles.getJavaAttributeOfLeafList;
+import static org.onosproject.yangutils.translator.tojava.utils.JavaFileGeneratorUtils.getAugmentedClassNameForDataMethods;
+import static org.onosproject.yangutils.translator.tojava.utils.JavaFileGeneratorUtils.getParentNodeNameForDataMethods;
+import static org.onosproject.yangutils.translator.tojava.utils.JavaFileGeneratorUtils.getSetOfNodeIdentifiers;
 import static org.onosproject.yangutils.utils.UtilConstants.ACTIVATE;
 import static org.onosproject.yangutils.utils.UtilConstants.ACTIVATE_ANNOTATION;
 import static org.onosproject.yangutils.utils.UtilConstants.ADD_STRING;
 import static org.onosproject.yangutils.utils.UtilConstants.AND;
-import static org.onosproject.yangutils.utils.UtilConstants.AUGMENTATION;
+import static org.onosproject.yangutils.utils.UtilConstants.APP_INSTANCE;
 import static org.onosproject.yangutils.utils.UtilConstants.AUGMENTED;
+import static org.onosproject.yangutils.utils.UtilConstants.AUGMENTED_INFO;
 import static org.onosproject.yangutils.utils.UtilConstants.BASE64;
+import static org.onosproject.yangutils.utils.UtilConstants.BASE_CLASS;
 import static org.onosproject.yangutils.utils.UtilConstants.BIG_DECIMAL;
 import static org.onosproject.yangutils.utils.UtilConstants.BIG_INTEGER;
+import static org.onosproject.yangutils.utils.UtilConstants.BITSET;
 import static org.onosproject.yangutils.utils.UtilConstants.BOOLEAN_DATA_TYPE;
 import static org.onosproject.yangutils.utils.UtilConstants.BOOLEAN_WRAPPER;
 import static org.onosproject.yangutils.utils.UtilConstants.BUILD;
@@ -75,6 +80,7 @@
 import static org.onosproject.yangutils.utils.UtilConstants.CLASS_STRING;
 import static org.onosproject.yangutils.utils.UtilConstants.CLOSE_CURLY_BRACKET;
 import static org.onosproject.yangutils.utils.UtilConstants.CLOSE_PARENTHESIS;
+import static org.onosproject.yangutils.utils.UtilConstants.COLAN;
 import static org.onosproject.yangutils.utils.UtilConstants.COLON;
 import static org.onosproject.yangutils.utils.UtilConstants.COMMA;
 import static org.onosproject.yangutils.utils.UtilConstants.DEACTIVATE;
@@ -91,17 +97,27 @@
 import static org.onosproject.yangutils.utils.UtilConstants.EXCEPTION;
 import static org.onosproject.yangutils.utils.UtilConstants.EXCEPTION_VAR;
 import static org.onosproject.yangutils.utils.UtilConstants.FALSE;
+import static org.onosproject.yangutils.utils.UtilConstants.FILTER_CONTENT_MATCH;
+import static org.onosproject.yangutils.utils.UtilConstants.FILTER_LEAF;
+import static org.onosproject.yangutils.utils.UtilConstants.FILTER_LEAF_LIST;
 import static org.onosproject.yangutils.utils.UtilConstants.FOR;
 import static org.onosproject.yangutils.utils.UtilConstants.FOUR_SPACE_INDENTATION;
 import static org.onosproject.yangutils.utils.UtilConstants.FROM_STRING_METHOD_NAME;
 import static org.onosproject.yangutils.utils.UtilConstants.FROM_STRING_PARAM_NAME;
 import static org.onosproject.yangutils.utils.UtilConstants.GET;
 import static org.onosproject.yangutils.utils.UtilConstants.GET_DECODER;
+import static org.onosproject.yangutils.utils.UtilConstants.GET_FILTER_LEAF;
+import static org.onosproject.yangutils.utils.UtilConstants.GET_FILTER_LEAF_LIST;
 import static org.onosproject.yangutils.utils.UtilConstants.GET_METHOD_PREFIX;
+import static org.onosproject.yangutils.utils.UtilConstants.GET_OPERATION_TYPE;
+import static org.onosproject.yangutils.utils.UtilConstants.GET_SELECT_LEAF;
+import static org.onosproject.yangutils.utils.UtilConstants.GET_SELECT_LEAF_LIST;
 import static org.onosproject.yangutils.utils.UtilConstants.GOOGLE_MORE_OBJECT_METHOD_STRING;
 import static org.onosproject.yangutils.utils.UtilConstants.HASH;
 import static org.onosproject.yangutils.utils.UtilConstants.HASH_CODE_STRING;
 import static org.onosproject.yangutils.utils.UtilConstants.IF;
+import static org.onosproject.yangutils.utils.UtilConstants.ILLEGAL_ARGUMENT_EXCEPTION;
+import static org.onosproject.yangutils.utils.UtilConstants.ILLEGAL_ARGUMENT_EXCEPTION_MSG;
 import static org.onosproject.yangutils.utils.UtilConstants.INSTANCE_OF;
 import static org.onosproject.yangutils.utils.UtilConstants.INT;
 import static org.onosproject.yangutils.utils.UtilConstants.INTEGER_WRAPPER;
@@ -111,6 +127,7 @@
 import static org.onosproject.yangutils.utils.UtilConstants.MAP;
 import static org.onosproject.yangutils.utils.UtilConstants.NEW;
 import static org.onosproject.yangutils.utils.UtilConstants.NEW_LINE;
+import static org.onosproject.yangutils.utils.UtilConstants.NOT;
 import static org.onosproject.yangutils.utils.UtilConstants.NULL;
 import static org.onosproject.yangutils.utils.UtilConstants.OBJ;
 import static org.onosproject.yangutils.utils.UtilConstants.OBJECT;
@@ -119,6 +136,10 @@
 import static org.onosproject.yangutils.utils.UtilConstants.OMIT_NULL_VALUE_STRING;
 import static org.onosproject.yangutils.utils.UtilConstants.OPEN_CURLY_BRACKET;
 import static org.onosproject.yangutils.utils.UtilConstants.OPEN_PARENTHESIS;
+import static org.onosproject.yangutils.utils.UtilConstants.OPERATION;
+import static org.onosproject.yangutils.utils.UtilConstants.OPERATION_ENUM;
+import static org.onosproject.yangutils.utils.UtilConstants.OP_PARAM_TYPE;
+import static org.onosproject.yangutils.utils.UtilConstants.OR_OPERATION;
 import static org.onosproject.yangutils.utils.UtilConstants.OTHER;
 import static org.onosproject.yangutils.utils.UtilConstants.OVERRIDE;
 import static org.onosproject.yangutils.utils.UtilConstants.PARSE_BOOLEAN;
@@ -129,15 +150,24 @@
 import static org.onosproject.yangutils.utils.UtilConstants.PERIOD;
 import static org.onosproject.yangutils.utils.UtilConstants.PUBLIC;
 import static org.onosproject.yangutils.utils.UtilConstants.PUT;
+import static org.onosproject.yangutils.utils.UtilConstants.QUESTION_MARK;
 import static org.onosproject.yangutils.utils.UtilConstants.QUOTES;
+import static org.onosproject.yangutils.utils.UtilConstants.RECEIVED_OBJECT;
+import static org.onosproject.yangutils.utils.UtilConstants.REPLACE_STRING;
 import static org.onosproject.yangutils.utils.UtilConstants.RETURN;
 import static org.onosproject.yangutils.utils.UtilConstants.RPC_INPUT_VAR_NAME;
+import static org.onosproject.yangutils.utils.UtilConstants.SELECT_LEAF;
+import static org.onosproject.yangutils.utils.UtilConstants.SELECT_LEAF_LIST;
 import static org.onosproject.yangutils.utils.UtilConstants.SEMI_COLAN;
 import static org.onosproject.yangutils.utils.UtilConstants.SET_METHOD_PREFIX;
+import static org.onosproject.yangutils.utils.UtilConstants.SET_OPERATION_TYPE;
 import static org.onosproject.yangutils.utils.UtilConstants.SHORT;
 import static org.onosproject.yangutils.utils.UtilConstants.SHORT_WRAPPER;
+import static org.onosproject.yangutils.utils.UtilConstants.SINGLE_QUOTE;
 import static org.onosproject.yangutils.utils.UtilConstants.SIXTEEN_SPACE_INDENTATION;
 import static org.onosproject.yangutils.utils.UtilConstants.SPACE;
+import static org.onosproject.yangutils.utils.UtilConstants.SPLIT_STRING;
+import static org.onosproject.yangutils.utils.UtilConstants.SQUARE_BRACKETS;
 import static org.onosproject.yangutils.utils.UtilConstants.STARTED_LOG_INFO;
 import static org.onosproject.yangutils.utils.UtilConstants.STATIC;
 import static org.onosproject.yangutils.utils.UtilConstants.STOPPED_LOG_INFO;
@@ -145,39 +175,18 @@
 import static org.onosproject.yangutils.utils.UtilConstants.SUFFIX_S;
 import static org.onosproject.yangutils.utils.UtilConstants.SWITCH;
 import static org.onosproject.yangutils.utils.UtilConstants.THIS;
+import static org.onosproject.yangutils.utils.UtilConstants.THROW;
 import static org.onosproject.yangutils.utils.UtilConstants.TMP_VAL;
 import static org.onosproject.yangutils.utils.UtilConstants.TO;
+import static org.onosproject.yangutils.utils.UtilConstants.TRIM_STRING;
 import static org.onosproject.yangutils.utils.UtilConstants.TRUE;
 import static org.onosproject.yangutils.utils.UtilConstants.TRY;
 import static org.onosproject.yangutils.utils.UtilConstants.TWELVE_SPACE_INDENTATION;
 import static org.onosproject.yangutils.utils.UtilConstants.VALUE;
 import static org.onosproject.yangutils.utils.UtilConstants.VOID;
 import static org.onosproject.yangutils.utils.UtilConstants.YANG_AUGMENTED_INFO;
+import static org.onosproject.yangutils.utils.UtilConstants.YANG_AUGMENTED_OP_PARAM_INFO;
 import static org.onosproject.yangutils.utils.UtilConstants.YANG_UTILS_TODO;
-import static org.onosproject.yangutils.utils.UtilConstants.OPERATION;
-import static org.onosproject.yangutils.utils.UtilConstants.BITSET;
-import static org.onosproject.yangutils.utils.UtilConstants.GET_FILTER_LEAF;
-import static org.onosproject.yangutils.utils.UtilConstants.FILTER_LEAF;
-import static org.onosproject.yangutils.utils.UtilConstants.GET_SELECT_LEAF;
-import static org.onosproject.yangutils.utils.UtilConstants.SELECT_LEAF;
-import static org.onosproject.yangutils.utils.UtilConstants.GET_FILTER_LEAF_LIST;
-import static org.onosproject.yangutils.utils.UtilConstants.FILTER_LEAF_LIST;
-import static org.onosproject.yangutils.utils.UtilConstants.GET_SELECT_LEAF_LIST;
-import static org.onosproject.yangutils.utils.UtilConstants.SELECT_LEAF_LIST;
-import static org.onosproject.yangutils.utils.UtilConstants.OPERATION_ENUM;
-import static org.onosproject.yangutils.utils.UtilConstants.GET_OPERATION_TYPE;
-import static org.onosproject.yangutils.utils.UtilConstants.OP_PARAM_TYPE;
-import static org.onosproject.yangutils.utils.UtilConstants.SET_OPERATION_TYPE;
-import static org.onosproject.yangutils.utils.UtilConstants.RECEIVED_OBJECT;
-import static org.onosproject.yangutils.utils.UtilConstants.FILTER_CONTENT_MATCH;
-import static org.onosproject.yangutils.utils.UtilConstants.APP_INSTANCE;
-import static org.onosproject.yangutils.utils.UtilConstants.NOT;
-import static org.onosproject.yangutils.utils.UtilConstants.OR_OPERATION;
-import static org.onosproject.yangutils.utils.UtilConstants.REPLACE_STRING;
-import static org.onosproject.yangutils.utils.UtilConstants.SINGLE_QUOTE;
-import static org.onosproject.yangutils.utils.UtilConstants.SPLIT_STRING;
-import static org.onosproject.yangutils.utils.UtilConstants.SQUARE_BRACKETS;
-import static org.onosproject.yangutils.utils.UtilConstants.TRIM_STRING;
 import static org.onosproject.yangutils.utils.UtilConstants.ZERO;
 import static org.onosproject.yangutils.utils.io.impl.JavaDocGen.JavaDocType.BUILD_METHOD;
 import static org.onosproject.yangutils.utils.io.impl.JavaDocGen.JavaDocType.CONSTRUCTOR;
@@ -190,14 +199,11 @@
 import static org.onosproject.yangutils.utils.io.impl.JavaDocGen.JavaDocType.TYPE_CONSTRUCTOR;
 import static org.onosproject.yangutils.utils.io.impl.JavaDocGen.generateForAddAugmentation;
 import static org.onosproject.yangutils.utils.io.impl.JavaDocGen.generateForGetAugmentation;
-import static org.onosproject.yangutils.utils.io.impl.JavaDocGen.generateForTypeConstructor;
 import static org.onosproject.yangutils.utils.io.impl.JavaDocGen.getJavaDoc;
 import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getCamelCase;
 import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getCapitalCase;
 import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getSmallCase;
 import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.trimAtLast;
-import static org.onosproject.yangutils.datamodel.utils.builtindatatype.YangDataTypes.BINARY;
-import static org.onosproject.yangutils.datamodel.utils.builtindatatype.YangDataTypes.BITS;
 
 /**
  * Represents generator for methods of generated files based on the file type.
@@ -205,7 +211,6 @@
 public final class MethodsGenerator {
     private static final String BITS_STRING_ARRAY_VAR = "bitsTemp";
     private static final String BIT_TEMP_VAR = "bitTemp";
-    private static final String FOR_TYPE = " for type ";
 
     /**
      * Creates an instance of method generator.
@@ -588,9 +593,9 @@
     /**
      * Returns constructor string for op param class.
      *
-     * @param yangName      class name
-     * @param pluginConfig    plugin configurations
-     * @return     constructor string
+     * @param yangName     class name
+     * @param pluginConfig plugin configurations
+     * @return constructor string
      */
     public static String getOpParamConstructorStart(String yangName, YangPluginConfig pluginConfig) {
 
@@ -600,6 +605,7 @@
                 + CLOSE_PARENTHESIS + SPACE + OPEN_CURLY_BRACKET + NEW_LINE;
         return javadoc + constructor;
     }
+
     /**
      * Returns the constructor strings for class file.
      *
@@ -718,11 +724,11 @@
     /**
      * Returns to string leaf for get method.
      *
-     * @return  string leaf for get method
+     * @return string leaf for get method
      */
     public static String getToStringLeafgetter() {
         return NEW_LINE + NEW_LINE + FOUR_SPACE_INDENTATION + PUBLIC + SPACE + BITSET + SPACE + GET_FILTER_LEAF
-                +  OPEN_PARENTHESIS + CLOSE_PARENTHESIS + SPACE + OPEN_CURLY_BRACKET + NEW_LINE
+                + OPEN_PARENTHESIS + CLOSE_PARENTHESIS + SPACE + OPEN_CURLY_BRACKET + NEW_LINE
                 + EIGHT_SPACE_INDENTATION + RETURN + SPACE + FILTER_LEAF + SEMI_COLAN + NEW_LINE
                 + FOUR_SPACE_INDENTATION + CLOSE_CURLY_BRACKET;
     }
@@ -734,7 +740,7 @@
      */
     public static String getToStringSelectLeafgetter() {
         return NEW_LINE + NEW_LINE + FOUR_SPACE_INDENTATION + PUBLIC + SPACE + BITSET + SPACE + GET_SELECT_LEAF
-                +  OPEN_PARENTHESIS + CLOSE_PARENTHESIS + SPACE + OPEN_CURLY_BRACKET + NEW_LINE
+                + OPEN_PARENTHESIS + CLOSE_PARENTHESIS + SPACE + OPEN_CURLY_BRACKET + NEW_LINE
                 + EIGHT_SPACE_INDENTATION + RETURN + SPACE + SELECT_LEAF + SEMI_COLAN + NEW_LINE
                 + FOUR_SPACE_INDENTATION + CLOSE_CURLY_BRACKET;
     }
@@ -742,11 +748,11 @@
     /**
      * Returns to string leaf list for get method.
      *
-     * @return  string leaf list for get method
+     * @return string leaf list for get method
      */
     public static String getToStringLeafListgetter() {
         return NEW_LINE + NEW_LINE + FOUR_SPACE_INDENTATION + PUBLIC + SPACE + BITSET + SPACE + GET_FILTER_LEAF_LIST
-                +  OPEN_PARENTHESIS + CLOSE_PARENTHESIS + SPACE + OPEN_CURLY_BRACKET + NEW_LINE
+                + OPEN_PARENTHESIS + CLOSE_PARENTHESIS + SPACE + OPEN_CURLY_BRACKET + NEW_LINE
                 + EIGHT_SPACE_INDENTATION + RETURN + SPACE + FILTER_LEAF_LIST + SEMI_COLAN + NEW_LINE
                 + FOUR_SPACE_INDENTATION + CLOSE_CURLY_BRACKET;
     }
@@ -758,7 +764,7 @@
      */
     public static String getToStringSelectLeafListgetter() {
         return NEW_LINE + NEW_LINE + FOUR_SPACE_INDENTATION + PUBLIC + SPACE + BITSET + SPACE + GET_SELECT_LEAF_LIST
-                +  OPEN_PARENTHESIS + CLOSE_PARENTHESIS + SPACE + OPEN_CURLY_BRACKET + NEW_LINE
+                + OPEN_PARENTHESIS + CLOSE_PARENTHESIS + SPACE + OPEN_CURLY_BRACKET + NEW_LINE
                 + EIGHT_SPACE_INDENTATION + RETURN + SPACE + SELECT_LEAF_LIST + SEMI_COLAN + NEW_LINE
                 + FOUR_SPACE_INDENTATION + CLOSE_CURLY_BRACKET;
     }
@@ -770,7 +776,7 @@
      */
     public static String getOperationTypegetter() {
         return NEW_LINE + NEW_LINE + FOUR_SPACE_INDENTATION + PUBLIC + SPACE + OPERATION_ENUM
-                + SPACE + GET_OPERATION_TYPE +  OPEN_PARENTHESIS + CLOSE_PARENTHESIS + SPACE
+                + SPACE + GET_OPERATION_TYPE + OPEN_PARENTHESIS + CLOSE_PARENTHESIS + SPACE
                 + OPEN_CURLY_BRACKET + NEW_LINE + EIGHT_SPACE_INDENTATION + RETURN + SPACE
                 + OP_PARAM_TYPE + SEMI_COLAN + NEW_LINE + FOUR_SPACE_INDENTATION + CLOSE_CURLY_BRACKET;
     }
@@ -782,7 +788,7 @@
      */
     public static String getOperationTypeSetter() {
         return NEW_LINE + NEW_LINE + FOUR_SPACE_INDENTATION + PUBLIC + SPACE + VOID + SPACE + SET_OPERATION_TYPE
-                +  OPEN_PARENTHESIS + OPERATION_ENUM + SPACE + getSmallCase(OPERATION_ENUM) + CLOSE_PARENTHESIS
+                + OPEN_PARENTHESIS + OPERATION_ENUM + SPACE + getSmallCase(OPERATION_ENUM) + CLOSE_PARENTHESIS
                 + SPACE + OPEN_CURLY_BRACKET + NEW_LINE + EIGHT_SPACE_INDENTATION + THIS + PERIOD
                 + OP_PARAM_TYPE + SPACE + EQUAL + SPACE + getSmallCase(OPERATION_ENUM) + SEMI_COLAN + NEW_LINE
                 + FOUR_SPACE_INDENTATION + CLOSE_CURLY_BRACKET + NEW_LINE;
@@ -791,10 +797,10 @@
     /**
      * Returns string for leaf set method.
      *
-     * @param className   class name
-     * @param curnode    current YANG node
+     * @param className    class name
+     * @param curnode      current YANG node
      * @param pluginConfig plugin configurations
-     * @return  string for leaf set method
+     * @return string for leaf set method
      */
     public static String getSetterForLeaf(String className, YangNode curnode, YangPluginConfig pluginConfig) {
 
@@ -831,9 +837,9 @@
     /**
      * Returns string for leaf list set method.
      *
-     * @param className  class name
-     * @param curnode    current YANG node
-     * @param pluginConfig  plugin configurations
+     * @param className    class name
+     * @param curnode      current YANG node
+     * @param pluginConfig plugin configurations
      * @return string for leaf list set method
      */
     public static String getSetterForLeafList(String className, YangNode curnode, YangPluginConfig pluginConfig) {
@@ -849,7 +855,7 @@
             if (listOfLeafList !=  null && !listOfLeafList.isEmpty()) {
                 for (YangLeafList leafList : listOfLeafList) {
                     JavaAttributeInfo javaAttributeInfo = getJavaAttributeOfLeafList(tempFragmentFiles, leafList,
-                                                                                     pluginConfig);
+                            pluginConfig);
                     String attributeName = javaAttributeInfo.getAttributeName();
                     String attrQuaifiedType = getReturnType(javaAttributeInfo);
                     if (javaAttributeInfo.isListAttr()) {
@@ -888,38 +894,44 @@
                 || dataType == UINT32
                 || dataType == UINT64
                 || dataType == DECIMAL64
-                || dataType == BOOLEAN;
+                || dataType == BOOLEAN
+                || dataType == EMPTY;
     }
 
     /**
      * Returns string for is filter content match method.
      *
-     * @param className   class name
-     * @param curnode   current YANG node
-     * @param pluginConfig   plugin configurations
-     * @return  string for is filter content match method
+     * @param className    class name
+     * @param curNode      current YANG node
+     * @param pluginConfig plugin configurations
+     * @return string for is filter content match method
      */
-    public static String getisFilterContentMatch(String className, YangNode curnode, YangPluginConfig pluginConfig) {
+    public static String getIsFilterContentMatch(String className, YangNode curNode, YangPluginConfig pluginConfig) {
 
         int numleaf = 1;
-        String filterMethod = "";
-        TempJavaBeanFragmentFiles tempFragmentFiles = ((JavaCodeGeneratorInfo) curnode)
+        String filterMethod = NEW_LINE + NEW_LINE + FOUR_SPACE_INDENTATION + PUBLIC + SPACE + BOOLEAN_DATA_TYPE
+                + SPACE + FILTER_CONTENT_MATCH + OPEN_PARENTHESIS + getCapitalCase(OBJECT)
+                + SPACE + OBJ +
+                CLOSE_PARENTHESIS + SPACE
+                + OPEN_CURLY_BRACKET + NEW_LINE;
+        TempJavaBeanFragmentFiles tempFragmentFiles = ((JavaCodeGeneratorInfo) curNode)
                 .getTempJavaCodeFragmentFiles().getBeanTempFiles();
+        filterMethod = filterMethod + EIGHT_SPACE_INDENTATION + getCapitalCase(DEFAULT)
+                + getCapitalCase(className) + SPACE + APP_INSTANCE + SPACE + EQUAL + SPACE + OPEN_PARENTHESIS +
+                getCapitalCase(DEFAULT) + getCapitalCase(className) + CLOSE_PARENTHESIS + OBJ +
+                SEMI_COLAN + NEW_LINE;
+        if (curNode instanceof YangAugmentableNode) {
+            filterMethod = filterMethod + getAugmentableOpParamSyntax();
+        }
 
-        if (curnode instanceof YangLeavesHolder) {
-            YangLeavesHolder leavesHolder = (YangLeavesHolder) curnode;
+        if (curNode instanceof YangLeavesHolder) {
+            YangLeavesHolder leavesHolder = (YangLeavesHolder) curNode;
             List<YangLeaf> leaves = leavesHolder.getListOfLeaf();
             List<YangLeafList> listOfLeafList = leavesHolder.getListOfLeafList();
-            if (leaves !=  null || listOfLeafList != null) {
-                filterMethod = NEW_LINE + NEW_LINE + FOUR_SPACE_INDENTATION + PUBLIC + SPACE + BOOLEAN_DATA_TYPE
-                        + SPACE + FILTER_CONTENT_MATCH + OPEN_PARENTHESIS + getCapitalCase(DEFAULT)
-                        + getCapitalCase(className) + SPACE + APP_INSTANCE + CLOSE_PARENTHESIS + SPACE
-                        + OPEN_CURLY_BRACKET + NEW_LINE;
-            }
-            if (leaves !=  null) {
+            if (leaves != null) {
                 for (YangLeaf leaf : leaves) {
                     JavaAttributeInfo javaAttributeInfo = getJavaAttributeOfLeaf(tempFragmentFiles, leaf,
-                                                                                 pluginConfig);
+                            pluginConfig);
                     String attributeName = javaAttributeInfo.getAttributeName();
 
                     String attrQuaifiedType = "";
@@ -929,10 +941,10 @@
                                 + CLOSE_PARENTHESIS;
                     } else {
                         attrQuaifiedType = APP_INSTANCE + PERIOD + attributeName + OPEN_PARENTHESIS + CLOSE_PARENTHESIS
-                                + SPACE + EQUAL + EQUAL + SPACE + NULL + SPACE + OR_OPERATION + SPACE + OPEN_PARENTHESIS
+                                + SPACE + EQUAL + EQUAL + SPACE + NULL + SPACE + OR_OPERATION + SPACE
                                 + NOT + OPEN_PARENTHESIS + attributeName + OPEN_PARENTHESIS + CLOSE_PARENTHESIS
                                 + PERIOD + EQUALS_STRING + OPEN_PARENTHESIS + APP_INSTANCE + PERIOD
-                                + attributeName + OPEN_PARENTHESIS + CLOSE_PARENTHESIS + CLOSE_PARENTHESIS
+                                + attributeName + OPEN_PARENTHESIS + CLOSE_PARENTHESIS
                                 + CLOSE_PARENTHESIS + CLOSE_PARENTHESIS;
                     }
 
@@ -948,11 +960,11 @@
                 }
             }
 
-            if (listOfLeafList !=  null) {
+            if (listOfLeafList != null) {
                 numleaf = 1;
                 for (YangLeafList leafList : listOfLeafList) {
                     JavaAttributeInfo javaAttributeInfo = getJavaAttributeOfLeafList(tempFragmentFiles, leafList,
-                                                                                 pluginConfig);
+                            pluginConfig);
                     String attributeName = javaAttributeInfo.getAttributeName();
                     String attrQuaifiedType = "";
                     if (isPrimitiveDataType(leafList.getDataType().getDataType())) {
@@ -964,7 +976,8 @@
                                 + SPACE + EQUAL + EQUAL + SPACE + NULL + OR_OPERATION + OPEN_PARENTHESIS + NOT
                                 + OPEN_PARENTHESIS + attributeName + OPEN_PARENTHESIS + CLOSE_PARENTHESIS
                                 + PERIOD + EQUALS_STRING + OPEN_PARENTHESIS + APP_INSTANCE + PERIOD
-                                + attributeName + OPEN_PARENTHESIS + CLOSE_PARENTHESIS;
+                                + attributeName + OPEN_PARENTHESIS + CLOSE_PARENTHESIS + CLOSE_PARENTHESIS
+                                + CLOSE_PARENTHESIS + CLOSE_PARENTHESIS;
                     }
 
                     filterMethod = filterMethod + EIGHT_SPACE_INDENTATION + IF + SPACE + OPEN_PARENTHESIS
@@ -987,8 +1000,53 @@
         return filterMethod;
     }
 
+    /*Returns method string for op parms augmented syntax*/
+    private static String getAugmentableOpParamSyntax() {
+        return EIGHT_SPACE_INDENTATION + FOR + SPACE + OPEN_PARENTHESIS + YANG_AUGMENTED_INFO + SPACE +
+                getSmallCase(YANG_AUGMENTED_INFO) + SPACE + COLAN + SPACE + APP_INSTANCE +
+                PERIOD + GET_METHOD_PREFIX + YANG_AUGMENTED_INFO + MAP + OPEN_PARENTHESIS + CLOSE_PARENTHESIS + PERIOD
+                + VALUE + "s" + OPEN_PARENTHESIS + CLOSE_PARENTHESIS + CLOSE_PARENTHESIS + SPACE + OPEN_CURLY_BRACKET +
+                NEW_LINE + TWELVE_SPACE_INDENTATION + IF + SPACE + OPEN_PARENTHESIS + NOT + OPEN_PARENTHESIS +
+                getSmallCase(YANG_AUGMENTED_INFO) + SPACE + INSTANCE_OF + SPACE + YANG_AUGMENTED_OP_PARAM_INFO +
+                CLOSE_PARENTHESIS + CLOSE_PARENTHESIS + SPACE + OPEN_CURLY_BRACKET + NEW_LINE +
+                SIXTEEN_SPACE_INDENTATION + THROW + SPACE + NEW + SPACE + ILLEGAL_ARGUMENT_EXCEPTION +
+                OPEN_PARENTHESIS +
+                ILLEGAL_ARGUMENT_EXCEPTION_MSG + CLOSE_PARENTHESIS + SEMI_COLAN + NEW_LINE + TWELVE_SPACE_INDENTATION +
+                CLOSE_CURLY_BRACKET + NEW_LINE + NEW_LINE + TWELVE_SPACE_INDENTATION + YANG_AUGMENTED_INFO + SPACE +
+                getSmallCase(YANG_AUGMENTED_OP_PARAM_INFO) + SPACE + EQUAL + SPACE + APP_INSTANCE + PERIOD +
+                GET_METHOD_PREFIX + AUGMENTED_INFO + OPEN_PARENTHESIS + OPEN_PARENTHESIS + OPEN_PARENTHESIS +
+                YANG_AUGMENTED_OP_PARAM_INFO + CLOSE_PARENTHESIS + SPACE + getSmallCase(YANG_AUGMENTED_INFO) +
+                CLOSE_PARENTHESIS + PERIOD + GET_METHOD_PREFIX + BASE_CLASS + CLOSE_PARENTHESIS + SEMI_COLAN +
+                NEW_LINE + TWELVE_SPACE_INDENTATION + IF + OPEN_PARENTHESIS + NOT +
+                OPEN_PARENTHESIS + OPEN_PARENTHESIS + YANG_AUGMENTED_OP_PARAM_INFO + CLOSE_PARENTHESIS + SPACE +
+                getSmallCase(YANG_AUGMENTED_INFO) + CLOSE_PARENTHESIS
+                + PERIOD + "isFilterContentMatch" + OPEN_PARENTHESIS +
+                getSmallCase(YANG_AUGMENTED_OP_PARAM_INFO) + CLOSE_PARENTHESIS +
+                CLOSE_PARENTHESIS +
+                SPACE + OPEN_CURLY_BRACKET + NEW_LINE + SIXTEEN_SPACE_INDENTATION + RETURN + SPACE + FALSE +
+                SEMI_COLAN + NEW_LINE + TWELVE_SPACE_INDENTATION
+                + CLOSE_CURLY_BRACKET + NEW_LINE + EIGHT_SPACE_INDENTATION + CLOSE_CURLY_BRACKET + NEW_LINE;
+    }
+
     /**
-     * Returns omit null value string.
+     * Returns implementation of get base class method for op param files.
+     *
+     * @param baseClassName base class name
+     * @return implementation of get base class method for op param files
+     */
+    public static String getBaseClassMethodImpl(String baseClassName) {
+        return NEW_LINE + getOverRideString() + FOUR_SPACE_INDENTATION + PUBLIC + SPACE + CLASS_STRING +
+                DIAMOND_OPEN_BRACKET +
+                QUESTION_MARK +
+                DIAMOND_CLOSE_BRACKET + SPACE + GET_METHOD_PREFIX + BASE_CLASS + SPACE + OPEN_CURLY_BRACKET + NEW_LINE +
+                EIGHT_SPACE_INDENTATION + RETURN + SPACE + baseClassName + PERIOD + CLASS + SEMI_COLAN + NEW_LINE +
+                FOUR_SPACE_INDENTATION +
+                CLOSE_CURLY_BRACKET;
+
+    }
+
+    /*
+     * Retruns omit null value string.
      *
      * @return omit null value string
      */
@@ -1047,8 +1105,7 @@
      * Return from string method's body string.
      *
      * @param attr                    attribute info
-     * @param fromStringAttributeInfo attribute info for the from string
-     *                                wrapper type
+     * @param fromStringAttributeInfo attribute info for the from string wrapper type
      * @return from string method's body string
      */
     public static String getFromStringMethod(JavaAttributeInfo attr,
@@ -1128,7 +1185,7 @@
                     + FROM_STRING_PARAM_NAME + CLOSE_PARENTHESIS + SEMI_COLAN;
         } else {
             String parseFromStringMethod = getParseFromStringMethod(targetDataType,
-                                                                    fromStringAttributeInfo.getAttributeType());
+                    fromStringAttributeInfo.getAttributeType());
             return targetDataType + SPACE + TMP_VAL + SPACE + EQUAL + SPACE + parseFromStringMethod
                     + OPEN_PARENTHESIS + FROM_STRING_PARAM_NAME + CLOSE_PARENTHESIS + SEMI_COLAN;
         }
@@ -1324,13 +1381,12 @@
      *
      * @return implementation of add augmentation
      */
-    public static String getAddAugmentInfoMethodImpl() {
-        return NEW_LINE + generateForAddAugmentation() + FOUR_SPACE_INDENTATION +
-                PUBLIC + SPACE + VOID + SPACE + ADD_STRING
-                + AUGMENTATION + OPEN_PARENTHESIS + YANG_AUGMENTED_INFO + SPACE + VALUE + COMMA + SPACE + CLASS_STRING +
-                SPACE + CLASS + OBJECT_STRING + CLOSE_PARENTHESIS + SPACE + OPEN_CURLY_BRACKET + NEW_LINE +
-                EIGHT_SPACE_INDENTATION + getSmallCase(YANG_AUGMENTED_INFO) + MAP + PERIOD + PUT + OPEN_PARENTHESIS +
-                CLASS + OBJECT_STRING + COMMA + SPACE + VALUE +
+    static String getAddAugmentInfoMethodImpl() {
+        return NEW_LINE + generateForAddAugmentation() + FOUR_SPACE_INDENTATION + PUBLIC + SPACE + VOID + SPACE +
+                ADD_STRING + AUGMENTED_INFO + OPEN_PARENTHESIS + YANG_AUGMENTED_INFO + SPACE + VALUE + COMMA +
+                SPACE + CLASS_STRING + SPACE + CLASS + OBJECT_STRING + CLOSE_PARENTHESIS + SPACE + OPEN_CURLY_BRACKET +
+                NEW_LINE + EIGHT_SPACE_INDENTATION + getSmallCase(YANG_AUGMENTED_INFO) + MAP + PERIOD + PUT +
+                OPEN_PARENTHESIS + CLASS + OBJECT_STRING + COMMA + SPACE + VALUE +
                 CLOSE_PARENTHESIS + SEMI_COLAN + NEW_LINE + FOUR_SPACE_INDENTATION +
                 CLOSE_CURLY_BRACKET + NEW_LINE;
     }
@@ -1340,11 +1396,11 @@
      *
      * @return implementation of get augment info
      */
-    public static String getAugmentInfoImpl() {
+    static String getAugmentInfoImpl() {
 
         return generateForGetAugmentation() + FOUR_SPACE_INDENTATION + PUBLIC + SPACE +
                 YANG_AUGMENTED_INFO + SPACE + GET_METHOD_PREFIX +
-                YANG_AUGMENTED_INFO + OPEN_PARENTHESIS + CLASS_STRING + SPACE + CLASS + OBJECT_STRING +
+                AUGMENTED_INFO + OPEN_PARENTHESIS + CLASS_STRING + SPACE + CLASS + OBJECT_STRING +
                 CLOSE_PARENTHESIS + SPACE + OPEN_CURLY_BRACKET + NEW_LINE + EIGHT_SPACE_INDENTATION +
                 RETURN + SPACE + getSmallCase(YANG_AUGMENTED_INFO) + MAP + PERIOD + GET + OPEN_PARENTHESIS + CLASS +
                 OBJECT_STRING + CLOSE_PARENTHESIS + SEMI_COLAN + NEW_LINE + FOUR_SPACE_INDENTATION +
@@ -1352,6 +1408,23 @@
     }
 
     /**
+     * Returns implementation of get augment info.
+     *
+     * @return implementation of get augment info
+     */
+    static String getAugmentInfoMapImpl(YangPluginConfig pluginConfig) {
+
+        return getJavaDoc(GETTER_METHOD, getSmallCase(YANG_AUGMENTED_INFO) + MAP, false, pluginConfig)
+                + FOUR_SPACE_INDENTATION + PUBLIC + SPACE +
+                MAP + DIAMOND_OPEN_BRACKET + CLASS_STRING + DIAMOND_OPEN_BRACKET + QUESTION_MARK +
+                DIAMOND_CLOSE_BRACKET + COMMA + SPACE + YANG_AUGMENTED_INFO + DIAMOND_CLOSE_BRACKET + SPACE +
+                GET_METHOD_PREFIX + YANG_AUGMENTED_INFO + MAP + OPEN_PARENTHESIS +
+                CLOSE_PARENTHESIS + SPACE + OPEN_CURLY_BRACKET + NEW_LINE + EIGHT_SPACE_INDENTATION +
+                RETURN + SPACE + getSmallCase(YANG_AUGMENTED_INFO) + MAP + SEMI_COLAN + NEW_LINE
+                + FOUR_SPACE_INDENTATION + CLOSE_CURLY_BRACKET + NEW_LINE;
+    }
+
+    /**
      * Returns enum's constructor.
      *
      * @param className enum's class name
@@ -1396,7 +1469,7 @@
                 + RETURN + SPACE + NULL + SEMI_COLAN + NEW_LINE + EIGHT_SPACE_INDENTATION + CLOSE_CURLY_BRACKET
                 + NEW_LINE + FOUR_SPACE_INDENTATION + CLOSE_CURLY_BRACKET;
 
-        return getJavaDoc(OF_METHOD, getCapitalCase(className) + FOR_TYPE + attrName, false, pluginConfig)
+        return getJavaDoc(OF_METHOD, getCapitalCase(className) + " for type" + attrName, false, pluginConfig)
                 + method;
     }
 
@@ -1475,24 +1548,6 @@
     }
 
     /**
-     * Returns copy constructor for augmented class.
-     *
-     * @param yangName    augmente class name
-     * @param augmentName augmented class name
-     * @return copy constructor for augmented class
-     */
-    public static String getAugmentedNodesConstructorStart(String yangName,
-                                                           String augmentName) {
-
-        String javadoc = generateForTypeConstructor(yangName);
-        String constructor = FOUR_SPACE_INDENTATION + PUBLIC + SPACE + yangName + BUILDER + OPEN_PARENTHESIS
-                + augmentName + PERIOD + augmentName + BUILDER + SPACE + VALUE + CLOSE_PARENTHESIS + SPACE
-                + OPEN_CURLY_BRACKET + NEW_LINE;
-        return javadoc + constructor;
-
-    }
-
-    /**
      * Returns the constructor strings for class file.
      *
      * @param attr         attribute info
@@ -1514,8 +1569,7 @@
      * @param parent parent node
      * @return augmented data getter and setter methods for service class
      */
-    public static String getAugmentsDataMethodForService(YangNode parent) {
-        Map<YangAtomicPath, YangAugment> resolvedAugmentsForManager = getResolvedAugmentsForManager(parent);
+    static String getAugmentsDataMethodForService(YangNode parent) {
         List<YangAtomicPath> targets = getSetOfNodeIdentifiers(parent);
         YangNode augmentedNode;
         String curNodeName;
@@ -1525,7 +1579,7 @@
         String returnType;
         YangPluginConfig pluginConfig = ((JavaFileInfoContainer) parent).getJavaFileInfo().getPluginConfig();
         for (YangAtomicPath nodeId : targets) {
-            augmentedNode = resolvedAugmentsForManager.get(nodeId).getResolveNodeInPath().get(nodeId);
+            augmentedNode = nodeId.getResolvedNode().getParent();
             if (((JavaFileInfoContainer) augmentedNode).getJavaFileInfo().getJavaName() != null) {
                 curNodeName = ((JavaFileInfoContainer) augmentedNode).getJavaFileInfo().getJavaName();
             } else {
@@ -1533,7 +1587,7 @@
                         .getConflictResolver()));
             }
             returnType = getAugmentedClassNameForDataMethods(augmentedNode, parent);
-            parentName = getParentNodeNameForDataMethods(augmentedNode.getParent(), pluginConfig);
+            parentName = getParentNodeNameForDataMethods(augmentedNode, pluginConfig);
             method = getJavaDoc(GETTER_METHOD, getSmallCase(AUGMENTED + parentName + curNodeName), false,
                     pluginConfig) + getGetterForInterface(AUGMENTED + parentName
                             + getCapitalCase(curNodeName),
@@ -1558,8 +1612,7 @@
      * @param parent parent node
      * @return augmented data getter and setter methods for manager class
      */
-    public static String getAugmentsDataMethodForManager(YangNode parent) {
-        Map<YangAtomicPath, YangAugment> resolvedAugmentsForManager = getResolvedAugmentsForManager(parent);
+    static String getAugmentsDataMethodForManager(YangNode parent) {
         List<YangAtomicPath> targets = getSetOfNodeIdentifiers(parent);
         YangNode augmentedNode;
         String curNodeName;
@@ -1569,7 +1622,7 @@
         String parentName;
         YangPluginConfig pluginConfig = ((JavaFileInfoContainer) parent).getJavaFileInfo().getPluginConfig();
         for (YangAtomicPath nodeId : targets) {
-            augmentedNode = resolvedAugmentsForManager.get(nodeId).getResolveNodeInPath().get(nodeId);
+            augmentedNode = nodeId.getResolvedNode().getParent();
             if (((JavaFileInfoContainer) augmentedNode).getJavaFileInfo().getJavaName() != null) {
                 curNodeName = ((JavaFileInfoContainer) augmentedNode).getJavaFileInfo().getJavaName();
             } else {
@@ -1577,7 +1630,7 @@
                         .getConflictResolver()));
             }
             returnType = getAugmentedClassNameForDataMethods(augmentedNode, parent);
-            parentName = getParentNodeNameForDataMethods(augmentedNode.getParent(), pluginConfig);
+            parentName = getParentNodeNameForDataMethods(augmentedNode, pluginConfig);
             method = getOverRideString() + getGetter(returnType, AUGMENTED
                             + parentName + getCapitalCase(curNodeName),
                     GENERATE_SERVICE_AND_MANAGER) + NEW_LINE;
diff --git a/plugin/src/main/java/org/onosproject/yangutils/utils/UtilConstants.java b/plugin/src/main/java/org/onosproject/yangutils/utils/UtilConstants.java
index 85e1e7e..e83c075 100644
--- a/plugin/src/main/java/org/onosproject/yangutils/utils/UtilConstants.java
+++ b/plugin/src/main/java/org/onosproject/yangutils/utils/UtilConstants.java
@@ -517,11 +517,6 @@
     public static final String IF = "if";
 
     /**
-     * Static attribute for "for" syntax.
-     */
-    public static final String FOR = "for";
-
-    /**
      * Static attribute for of.
      */
     public static final String OF = "of";
@@ -1185,7 +1180,7 @@
     /**
      * Static attribute for augmentation class.
      */
-    public static final String AUGMENTATION = "Augmentation";
+    public static final String AUGMENTED_INFO = "AugmentedInfo";
 
     /**
      * Static attribute for AugmentedInfo class.
@@ -1383,6 +1378,43 @@
     public static final String JAR = "jar";
 
     /**
+     * Static attribute for for.
+     */
+    public static final String FOR = "for";
+
+    /**
+     * Static attribute for YangAugmentedOpParamInfo.
+     */
+    public static final String YANG_AUGMENTED_OP_PARAM_INFO = "YangAugmentedOpParamInfo";
+
+    /**
+     * Static attribute for YangAugmentedOpParamInfo.
+     */
+    public static final String YANG_AUGMENTED_OP_PARAM_INFO_CLASS = "YangAugmentedOpParamInfo;\n";
+
+    /**
+     * Static attribute for IllegalArgumentException.
+     */
+    public static final String ILLEGAL_ARGUMENT_EXCEPTION = "IllegalArgumentException";
+
+    /**
+     * Static attribute for IllegalArgumentException.
+     */
+    public static final String ILLEGAL_ARGUMENT_EXCEPTION_MSG = "\"provided augmented info is invalid for content " +
+            "match.\"";
+
+    /**
+     * Static attribute for throw.
+     */
+    public static final String THROW = "throw";
+
+    /**
+     * Static attribute for baseClass().
+     */
+    public static final String BASE_CLASS = "BaseClass()";
+
+
+    /**
      * Creates an instance of util constants.
      */
     private UtilConstants() {
diff --git a/plugin/src/test/java/org/onosproject/yangutils/ietfyang/IetfYangFileTest.java b/plugin/src/test/java/org/onosproject/yangutils/ietfyang/IetfYangFileTest.java
index 7176760..7a1ab65 100644
--- a/plugin/src/test/java/org/onosproject/yangutils/ietfyang/IetfYangFileTest.java
+++ b/plugin/src/test/java/org/onosproject/yangutils/ietfyang/IetfYangFileTest.java
@@ -56,7 +56,7 @@
         yangPluginConfig.setCodeGenDir("target/ietfyang/l3vpnservice/");
         yangPluginConfig.setManagerCodeGenDir("target/ietfyang/l3vpnservice/");
 
-        utilManager.translateToJava(utilManager.getYangFileInfoSet(), yangPluginConfig);
+        utilManager.translateToJava(yangPluginConfig);
 
         deleteDirectory(userDir + "/target/ietfyang/");
     }
diff --git a/plugin/src/test/java/org/onosproject/yangutils/plugin/manager/AugmentTranslatorTest.java b/plugin/src/test/java/org/onosproject/yangutils/plugin/manager/AugmentTranslatorTest.java
index 821a435..f502835 100644
--- a/plugin/src/test/java/org/onosproject/yangutils/plugin/manager/AugmentTranslatorTest.java
+++ b/plugin/src/test/java/org/onosproject/yangutils/plugin/manager/AugmentTranslatorTest.java
@@ -50,7 +50,7 @@
         YangPluginConfig yangPluginConfig = new YangPluginConfig();
         yangPluginConfig.setCodeGenDir("target/augmentTranslator/");
         yangPluginConfig.setManagerCodeGenDir("target/augmentTranslator/");
-        utilManager.translateToJava(utilManager.getYangFileInfoSet(), yangPluginConfig);
+        utilManager.translateToJava(yangPluginConfig);
 
         deleteDirectory("target/augmentTranslator/");
     }
diff --git a/plugin/src/test/java/org/onosproject/yangutils/plugin/manager/InterFileLinkingTest.java b/plugin/src/test/java/org/onosproject/yangutils/plugin/manager/InterFileLinkingTest.java
index 675fea6..8052f30 100644
--- a/plugin/src/test/java/org/onosproject/yangutils/plugin/manager/InterFileLinkingTest.java
+++ b/plugin/src/test/java/org/onosproject/yangutils/plugin/manager/InterFileLinkingTest.java
@@ -638,7 +638,7 @@
         yangPluginConfig.setCodeGenDir("target/interfilewithusesreferringtype/");
         yangPluginConfig.setManagerCodeGenDir("target/interfilewithusesreferringtype/");
 
-        utilManager.translateToJava(utilManager.getYangFileInfoSet(), yangPluginConfig);
+        utilManager.translateToJava(yangPluginConfig);
 
         deleteDirectory("target/interfilewithusesreferringtype/");
 
@@ -660,7 +660,7 @@
         yangPluginConfig.setCodeGenDir("target/file1UsesFile2TypeDefFile3Type/");
         yangPluginConfig.setManagerCodeGenDir("target/file1UsesFile2TypeDefFile3Type/");
 
-        utilManager.translateToJava(utilManager.getYangFileInfoSet(), yangPluginConfig);
+        utilManager.translateToJava(yangPluginConfig);
 
         deleteDirectory("target/file1UsesFile2TypeDefFile3Type/");
 
@@ -682,7 +682,7 @@
         yangPluginConfig.setCodeGenDir("target/interfileietf/");
         yangPluginConfig.setManagerCodeGenDir("target/interfileietf/");
 
-        utilManager.translateToJava(utilManager.getYangFileInfoSet(), yangPluginConfig);
+        utilManager.translateToJava(yangPluginConfig);
 
         deleteDirectory("target/interfileietf/");
 
@@ -704,7 +704,7 @@
         yangPluginConfig.setCodeGenDir("target/usesInContainer/");
         yangPluginConfig.setManagerCodeGenDir("target/usesInContainer/");
 
-        utilManager.translateToJava(utilManager.getYangFileInfoSet(), yangPluginConfig);
+        utilManager.translateToJava(yangPluginConfig);
 
         deleteDirectory("target/usesInContainer/");
 
@@ -726,7 +726,7 @@
         yangPluginConfig.setCodeGenDir("target/groupingNodeSameAsModule/");
         yangPluginConfig.setManagerCodeGenDir("target/groupingNodeSameAsModule/");
 
-        utilManager.translateToJava(utilManager.getYangFileInfoSet(), yangPluginConfig);
+        utilManager.translateToJava(yangPluginConfig);
 
         deleteDirectory("target/groupingNodeSameAsModule/");
 
diff --git a/plugin/src/test/java/org/onosproject/yangutils/plugin/manager/InterJarLinkerTest.java b/plugin/src/test/java/org/onosproject/yangutils/plugin/manager/InterJarLinkerTest.java
index 16962f2..94585a2 100644
--- a/plugin/src/test/java/org/onosproject/yangutils/plugin/manager/InterJarLinkerTest.java
+++ b/plugin/src/test/java/org/onosproject/yangutils/plugin/manager/InterJarLinkerTest.java
@@ -191,7 +191,7 @@
         yangPluginConfig.setCodeGenDir(TARGET);
         yangPluginConfig.setManagerCodeGenDir(TARGET);
 
-        utilManager.translateToJava(utilManager.getYangFileInfoSet(), yangPluginConfig);
+        utilManager.translateToJava(yangPluginConfig);
 
         testIfFlowClassifierFilesExists();
         testIfPortPairFileDoesNotExist();
@@ -308,6 +308,7 @@
 
             for (YangNode node : interJarResolvedNodes) {
                 YangFileInfo dependentFileInfo = new YangFileInfo();
+                node.setToTranslate(false);
                 dependentFileInfo.setRootNode(node);
                 dependentFileInfo.setForTranslator(false);
                 dependentFileInfo.setYangFileName(node.getName());
diff --git a/plugin/src/test/java/org/onosproject/yangutils/plugin/manager/ManagerCodeGeneratorTest.java b/plugin/src/test/java/org/onosproject/yangutils/plugin/manager/ManagerCodeGeneratorTest.java
index 817fb4e..c3b2fe7 100644
--- a/plugin/src/test/java/org/onosproject/yangutils/plugin/manager/ManagerCodeGeneratorTest.java
+++ b/plugin/src/test/java/org/onosproject/yangutils/plugin/manager/ManagerCodeGeneratorTest.java
@@ -44,7 +44,7 @@
     @Test
     public void processManagerTranslator() throws IOException, ParserException, MojoExecutionException {
 
-        String searchDir = "src/test/resources/manager";
+        String searchDir = "src/test/resources/manager/singleChild";
         utilManager.createYangFileInfoSet(YangFileScanner.getYangFiles(searchDir));
         utilManager.parseYangFileInfoSet();
         utilManager.createYangNodeSet();
@@ -54,7 +54,7 @@
         yangPluginConfig.setCodeGenDir("target/manager/");
         yangPluginConfig.setManagerCodeGenDir("target/manager/");
 
-        utilManager.translateToJava(utilManager.getYangFileInfoSet(), yangPluginConfig);
+        utilManager.translateToJava(yangPluginConfig);
         String file1 = "target/manager/org/onosproject/yang/gen/v1/test5/test/rev20160704/Test5Manager.java";
         String file2 = "target/manager/org/onosproject/yang/gen/v1/test5/test/rev20160704/Test6Manager.java";
         String file3 = "target/manager/org/onosproject/yang/gen/v1/test5/test/rev20160704/Test7Manager.java";
@@ -79,7 +79,7 @@
     public void processManagerInDifferentPackageTranslator() throws IOException, ParserException,
             MojoExecutionException {
 
-        String searchDir = "src/test/resources/manager";
+        String searchDir = "src/test/resources/manager/singleChild";
         utilManager.createYangFileInfoSet(YangFileScanner.getYangFiles(searchDir));
         utilManager.parseYangFileInfoSet();
         utilManager.createYangNodeSet();
@@ -87,10 +87,10 @@
 
         YangPluginConfig yangPluginConfig = new YangPluginConfig();
         yangPluginConfig.setCodeGenDir("target/manager/");
-        yangPluginConfig.setManagerCodeGenDir("target/manager1/");
+        yangPluginConfig.setManagerCodeGenDir("target/manager/");
 
-        utilManager.translateToJava(utilManager.getYangFileInfoSet(), yangPluginConfig);
-        String file3 = "target/manager1/org/onosproject/yang/gen/v1/test5/test/rev20160704/Test7Manager.java";
+        utilManager.translateToJava(yangPluginConfig);
+        String file3 = "target/manager/org/onosproject/yang/gen/v1/test5/test/rev20160704/Test7Manager.java";
 
         File manager3 = new File(file3);
         assertThat(true, is(manager3.exists()));
@@ -98,4 +98,48 @@
         deleteDirectory("target/manager/");
         deleteDirectory("target/manager1/");
     }
+
+    /**
+     * Checks manager translation in different package should not result in any exception.
+     *
+     * @throws MojoExecutionException
+     */
+    @Test
+    public void processManagerforMultiChildTranslator() throws IOException, ParserException,
+            MojoExecutionException {
+
+        String searchDir = "src/test/resources/manager/MultiChild";
+        utilManager.createYangFileInfoSet(YangFileScanner.getYangFiles(searchDir));
+        utilManager.parseYangFileInfoSet();
+        utilManager.createYangNodeSet();
+        utilManager.resolveDependenciesUsingLinker();
+
+        YangPluginConfig yangPluginConfig = new YangPluginConfig();
+        yangPluginConfig.setCodeGenDir("target/manager/");
+        yangPluginConfig.setManagerCodeGenDir("target/manager/");
+
+        utilManager.translateToJava(yangPluginConfig);
+        String file1 = "target/manager/org/onosproject/yang/gen/v1/test5/test/rev20160704/Test5Manager.java";
+
+        File manager1 = new File(file1);
+        assertThat(false, is(manager1.exists()));
+
+        String file2 = "target/manager/org/onosproject/yang/gen/v1/test5/test/rev20160704/Test6Manager.java";
+
+        File manager2 = new File(file2);
+        assertThat(false, is(manager2.exists()));
+
+        String file3 = "target/manager/org/onosproject/yang/gen/v1/test5/test/rev20160704/Test7Manager.java";
+
+        File manager3 = new File(file3);
+        assertThat(false, is(manager3.exists()));
+
+        String file4 = "target/manager/org/onosproject/yang/gen/v1/test8/test/rev20160704/Test8Manager.java";
+
+        File manager4 = new File(file4);
+        assertThat(true, is(manager4.exists()));
+
+        deleteDirectory("target/manager/");
+        deleteDirectory("target/manager1/");
+    }
 }
diff --git a/plugin/src/test/resources/manager/MultiChild/module.yang b/plugin/src/test/resources/manager/MultiChild/module.yang
new file mode 100644
index 0000000..1c4637c
--- /dev/null
+++ b/plugin/src/test/resources/manager/MultiChild/module.yang
@@ -0,0 +1,18 @@
+module test5 {
+    namespace "test5:test";
+    prefix test ;
+
+    revision "2016-07-04" {
+             description "Initial revision.";
+    }
+    typedef typedef1 {
+       type int32;
+    }
+    typedef typedef2 {
+       type int32;
+    }
+    typedef typedef3 {
+       type int32;
+    }
+
+}
diff --git a/plugin/src/test/resources/manager/MultiChild/submodule.yang b/plugin/src/test/resources/manager/MultiChild/submodule.yang
new file mode 100644
index 0000000..92d7c21
--- /dev/null
+++ b/plugin/src/test/resources/manager/MultiChild/submodule.yang
@@ -0,0 +1,26 @@
+submodule test6 {
+      
+     belongs-to "test5" {
+         prefix "test";
+    }    
+
+    revision "2016-07-04" {
+             description "Initial revision.";
+    }
+    grouping grouping1 {
+        leaf leaf1 {
+           type int32;
+        }
+    }
+    grouping grouping2 {
+        leaf leaf1 {
+           type int32;
+        }
+    }
+
+   grouping grouping3 {
+        leaf leaf1 {
+           type int32;
+        }
+    }
+}
diff --git a/plugin/src/test/resources/manager/test.yang b/plugin/src/test/resources/manager/MultiChild/test.yang
similarity index 61%
copy from plugin/src/test/resources/manager/test.yang
copy to plugin/src/test/resources/manager/MultiChild/test.yang
index 7b2861c..036d78a 100644
--- a/plugin/src/test/resources/manager/test.yang
+++ b/plugin/src/test/resources/manager/MultiChild/test.yang
@@ -6,7 +6,13 @@
              description "Initial revision.";
     }
 
-    leaf abc {
+    grouping grouping1 {
+        leaf leaf1 {
+           type int32;
+        }
+    }
+
+    typedef typedef3 {
        type int32;
     }
 
diff --git a/plugin/src/test/resources/manager/MultiChild/test2.yang b/plugin/src/test/resources/manager/MultiChild/test2.yang
new file mode 100644
index 0000000..b252c23
--- /dev/null
+++ b/plugin/src/test/resources/manager/MultiChild/test2.yang
@@ -0,0 +1,22 @@
+module test8 {
+    namespace "test8:test";  
+    prefix test ;  
+
+    revision "2016-07-04" {
+             description "Initial revision.";
+    }
+
+    grouping grouping1 {
+        leaf leaf1 {
+           type int32;
+        }
+    }
+
+    typedef typedef3 {
+       type int32;
+    }
+
+    container container2 {
+    }
+
+}
diff --git a/plugin/src/test/resources/manager/module.yang b/plugin/src/test/resources/manager/singleChild/module.yang
similarity index 87%
rename from plugin/src/test/resources/manager/module.yang
rename to plugin/src/test/resources/manager/singleChild/module.yang
index 212b171..5fb8a9b 100644
--- a/plugin/src/test/resources/manager/module.yang
+++ b/plugin/src/test/resources/manager/singleChild/module.yang
@@ -5,7 +5,7 @@
     revision "2016-07-04" {
              description "Initial revision.";
     }
-    typedef abc {
+    typedef typedef1 {
        type int32;
     }
 
diff --git a/plugin/src/test/resources/manager/submodule.yang b/plugin/src/test/resources/manager/singleChild/submodule.yang
similarity index 89%
rename from plugin/src/test/resources/manager/submodule.yang
rename to plugin/src/test/resources/manager/singleChild/submodule.yang
index 961147c..541b7dd 100644
--- a/plugin/src/test/resources/manager/submodule.yang
+++ b/plugin/src/test/resources/manager/singleChild/submodule.yang
@@ -7,7 +7,7 @@
     revision "2016-07-04" {
              description "Initial revision.";
     }
-    grouping abc {
+    grouping grouping1 {
         leaf leaf1 {
            type int32;
         }
diff --git a/plugin/src/test/resources/manager/test.yang b/plugin/src/test/resources/manager/singleChild/test.yang
similarity index 81%
rename from plugin/src/test/resources/manager/test.yang
rename to plugin/src/test/resources/manager/singleChild/test.yang
index 7b2861c..483e00e 100644
--- a/plugin/src/test/resources/manager/test.yang
+++ b/plugin/src/test/resources/manager/singleChild/test.yang
@@ -6,8 +6,7 @@
              description "Initial revision.";
     }
 
-    leaf abc {
-       type int32;
+    container cont1 {
     }
 
 }
