diff --git a/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/TempJavaServiceFragmentFiles.java b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/TempJavaServiceFragmentFiles.java
index 49d812d..7705449 100644
--- a/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/TempJavaServiceFragmentFiles.java
+++ b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/TempJavaServiceFragmentFiles.java
@@ -112,9 +112,6 @@
     public void generateJavaFile(int fileType, YangNode curNode)
             throws IOException {
 
-        // Commenting out call to add resolved augmented info as its not
-        // required for service interface creation.
-        //addResolvedAugmentedDataNodeImports(curNode);
         JavaQualifiedTypeInfoTranslator typeInfo =
                 new JavaQualifiedTypeInfoTranslator();
         typeInfo.setClassInfo(RPC_SERVICE);
diff --git a/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/javamodel/AttributesJavaDataType.java b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/javamodel/AttributesJavaDataType.java
index 3d1004c..3c5d8ab 100644
--- a/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/javamodel/AttributesJavaDataType.java
+++ b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/javamodel/AttributesJavaDataType.java
@@ -16,6 +16,7 @@
 
 package org.onosproject.yang.compiler.translator.tojava.javamodel;
 
+import org.onosproject.yang.compiler.datamodel.ConflictResolveNode;
 import org.onosproject.yang.compiler.datamodel.YangDerivedInfo;
 import org.onosproject.yang.compiler.datamodel.YangEnumeration;
 import org.onosproject.yang.compiler.datamodel.YangIdentity;
@@ -25,13 +26,11 @@
 import org.onosproject.yang.compiler.datamodel.YangType;
 import org.onosproject.yang.compiler.datamodel.YangTypeDef;
 import org.onosproject.yang.compiler.datamodel.YangUnion;
-import org.onosproject.yang.compiler.datamodel.ConflictResolveNode;
 import org.onosproject.yang.compiler.datamodel.utils.builtindatatype.YangDataTypes;
 import org.onosproject.yang.compiler.translator.exception.TranslatorException;
 import org.onosproject.yang.compiler.translator.tojava.JavaCodeGeneratorInfo;
 import org.onosproject.yang.compiler.translator.tojava.JavaFileInfoContainer;
 import org.onosproject.yang.compiler.translator.tojava.JavaFileInfoTranslator;
-import org.onosproject.yang.compiler.utils.UtilConstants;
 import org.onosproject.yang.compiler.utils.io.YangToJavaNamingConflictUtil;
 
 import java.util.Stack;
@@ -46,6 +45,7 @@
 import static org.onosproject.yang.compiler.utils.UtilConstants.BYTE;
 import static org.onosproject.yang.compiler.utils.UtilConstants.BYTE_WRAPPER;
 import static org.onosproject.yang.compiler.utils.UtilConstants.COLLECTION_IMPORTS;
+import static org.onosproject.yang.compiler.utils.UtilConstants.IDENTITY;
 import static org.onosproject.yang.compiler.utils.UtilConstants.INT;
 import static org.onosproject.yang.compiler.utils.UtilConstants.INTEGER_WRAPPER;
 import static org.onosproject.yang.compiler.utils.UtilConstants.JAVA_LANG;
@@ -58,6 +58,7 @@
 import static org.onosproject.yang.compiler.utils.UtilConstants.SHORT_WRAPPER;
 import static org.onosproject.yang.compiler.utils.UtilConstants.SQUARE_BRACKETS;
 import static org.onosproject.yang.compiler.utils.UtilConstants.STRING_DATA_TYPE;
+import static org.onosproject.yang.compiler.utils.UtilConstants.TYPEDEF;
 import static org.onosproject.yang.compiler.utils.io.impl.YangIoUtils.getCamelCase;
 import static org.onosproject.yang.compiler.utils.io.impl.YangIoUtils.getCapitalCase;
 import static org.onosproject.yang.compiler.utils.io.impl.YangIoUtils.getPackageDirPathFromJavaJPackage;
@@ -239,7 +240,7 @@
                 .getDataTypeExtendedInfo();
         YangTypeDef typeDef = derivedInfo.getReferredTypeDef();
         if (typeDef.isNameConflict()) {
-            name = name + UtilConstants.TYPEDEF;
+            name = name + TYPEDEF;
         }
         return getCapitalCase(getCamelCase(name, pluginConfig));
     }
@@ -426,12 +427,12 @@
     /**
      * Returns type package.
      *
-     * @param info             YANG code generator info
-     * @param conflictResolver object of YANG to java naming conflict util
+     * @param info YANG code generator info
+     * @param conf object of YANG to java naming conflict util
      * @return type java package
      */
-    private static String getTypePackage(JavaCodeGeneratorInfo info,
-                                         YangToJavaNamingConflictUtil conflictResolver) {
+    public static String getTypePackage(JavaCodeGeneratorInfo info,
+                                        YangToJavaNamingConflictUtil conf) {
         YangNode node = (YangNode) info;
         // Check for referred schema type node for grouping scenario.
         while (node.getReferredSchema() != null) {
@@ -439,7 +440,7 @@
         }
         info = (JavaCodeGeneratorInfo) node;
         if (info.getJavaFileInfo().getPackage() == null) {
-            return getPackageFromParent(node.getParent(), conflictResolver);
+            return getPackageFromParent(node.getParent(), conf);
         }
         return info.getJavaFileInfo().getPackage();
     }
@@ -572,7 +573,7 @@
     }
 
     /**
-     * Returns identity ref import class.
+     * Returns identity-ref import class name.
      *
      * @param type YANG type
      * @param cnfg YANG to java naming conflict util
@@ -585,11 +586,23 @@
             return OBJECT_STRING;
         }
         YangIdentity identity = ir.getReferredIdentity();
-        String name = identity.getName();
-        if (identity.isNameConflict()) {
-            name = name + UtilConstants.IDENTITY;
+        return getCapitalCase(getIdJavaName(identity, cnfg));
+    }
+
+    /**
+     * Returns java name of the YANG identity.
+     *
+     * @param id   YANG identity
+     * @param cnfg YANG to java naming conflict util
+     * @return identity java name
+     */
+    public static String getIdJavaName(YangIdentity id,
+                                       YangToJavaNamingConflictUtil cnfg) {
+        String name = id.getName();
+        if (id.isNameConflict()) {
+            name = name + IDENTITY;
         }
-        return getCapitalCase(getCamelCase(name, cnfg));
+        return getCamelCase(name, cnfg);
     }
 
     /**
diff --git a/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/javamodel/YangJavaIdentityTranslator.java b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/javamodel/YangJavaIdentityTranslator.java
index b96a239..f2088aa 100644
--- a/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/javamodel/YangJavaIdentityTranslator.java
+++ b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/javamodel/YangJavaIdentityTranslator.java
@@ -25,6 +25,7 @@
 import org.onosproject.yang.compiler.translator.tojava.JavaQualifiedTypeInfoTranslator;
 import org.onosproject.yang.compiler.translator.tojava.TempJavaCodeFragmentFiles;
 import org.onosproject.yang.compiler.utils.io.YangPluginConfig;
+import org.onosproject.yang.compiler.utils.io.YangToJavaNamingConflictUtil;
 
 import java.io.File;
 import java.io.IOException;
@@ -33,6 +34,8 @@
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_IDENTITY_CLASS;
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_INTERFACE_WITH_BUILDER;
 import static org.onosproject.yang.compiler.translator.tojava.YangJavaModelUtils.updatePackageInfo;
+import static org.onosproject.yang.compiler.translator.tojava.javamodel.AttributesJavaDataType.getIdJavaName;
+import static org.onosproject.yang.compiler.translator.tojava.javamodel.AttributesJavaDataType.getTypePackage;
 import static org.onosproject.yang.compiler.translator.tojava.utils.JavaFileGeneratorUtils.getDerivedPkfInfo;
 import static org.onosproject.yang.compiler.translator.tojava.utils.JavaFileGeneratorUtils.getFileObject;
 import static org.onosproject.yang.compiler.translator.tojava.utils.JavaFileGeneratorUtils.initiateJavaFileGeneration;
@@ -122,14 +125,14 @@
      * Prepare the information for java code generation corresponding to YANG
      * container info.
      *
-     * @param yangPlugin YANG plugin config
+     * @param plg YANG plugin config
      * @throws TranslatorException translator operation fail
      */
     @Override
-    public void generateCodeEntry(YangPluginConfig yangPlugin) throws TranslatorException {
+    public void generateCodeEntry(YangPluginConfig plg) throws TranslatorException {
         try {
 
-            updatePackageInfo(this, yangPlugin);
+            updatePackageInfo(this, plg);
             JavaQualifiedTypeInfoTranslator basePkgInfo =
                     new JavaQualifiedTypeInfoTranslator();
             JavaFileInfoTranslator itsInfo = getJavaFileInfo();
@@ -137,32 +140,44 @@
             String className = getCapitalCase(name);
             String path = itsInfo.getPackageFilePath();
             createPackage(this);
+
             List<String> imports = null;
             boolean isQualified;
             List<YangIdentity> idList = getExtendList();
-            if (getBaseNode() != null && getBaseNode().getReferredIdentity() != null) {
-                if (!(getBaseNode().getReferredIdentity() instanceof YangJavaIdentityTranslator)) {
-                    throw new TranslatorException(getErrorMsg(FAIL_AT_ENTRY, this,
-                                                              EMPTY_STRING));
+
+            if (getBaseNode() != null &&
+                    getBaseNode().getReferredIdentity() != null) {
+                if (!(getBaseNode().getReferredIdentity()
+                        instanceof YangJavaIdentityTranslator)) {
+                    throw new TranslatorException(
+                            getErrorMsg(FAIL_AT_ENTRY, this, EMPTY_STRING));
                 }
                 YangJavaIdentityTranslator base =
-                        (YangJavaIdentityTranslator) getBaseNode().getReferredIdentity();
+                        (YangJavaIdentityTranslator) getBaseNode()
+                                .getReferredIdentity();
                 JavaFileInfoTranslator info = base.getJavaFileInfo();
-                String baseClassName = getCapitalCase(info.getJavaName());
-                String basePkg = info.getPackage();
-                basePkgInfo.setClassInfo(baseClassName);
-                basePkgInfo.setPkgInfo(basePkg);
-                isQualified = importData.addImportInfo(basePkgInfo, className,
-                                                       javaFileInfo.getPackage());
+                YangToJavaNamingConflictUtil conf = plg.getConflictResolver();
+
+                if (info.getPackage() == null || info.getJavaName() == null) {
+                    info.setJavaName(getIdJavaName(base, conf));
+                    info.setPackage(getTypePackage(base, conf));
+                }
+
+                basePkgInfo.setClassInfo(getCapitalCase(info.getJavaName()));
+                basePkgInfo.setPkgInfo(info.getPackage());
+                isQualified = importData.addImportInfo(
+                        basePkgInfo, className, javaFileInfo.getPackage());
                 if (!isQualified) {
                     imports = importData.getImports(true);
                 }
             }
+
             imports = getImportOfDerId(idList, imports, className);
+            File file = getFileObject(path, className,
+                                      JAVA_FILE_EXTENSION, itsInfo);
+            initiateJavaFileGeneration(file, GENERATE_IDENTITY_CLASS,
+                                       imports, this, className);
 
-            File file = getFileObject(path, className, JAVA_FILE_EXTENSION, itsInfo);
-
-            initiateJavaFileGeneration(file, GENERATE_IDENTITY_CLASS, imports, this, className);
             //Add to string and from string method to class
             addStringMethodsToClass(file, name, idList);
             insertDataIntoJavaFile(file, CLOSE_CURLY_BRACKET);
diff --git a/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/utils/JavaFileGeneratorUtils.java b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/utils/JavaFileGeneratorUtils.java
index 37a2eee..fbbfa34 100644
--- a/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/utils/JavaFileGeneratorUtils.java
+++ b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/utils/JavaFileGeneratorUtils.java
@@ -16,7 +16,6 @@
 
 package org.onosproject.yang.compiler.translator.tojava.utils;
 
-import org.onosproject.yang.compiler.datamodel.InvalidOpTypeHolder;
 import org.onosproject.yang.compiler.datamodel.YangAppDataStructure;
 import org.onosproject.yang.compiler.datamodel.YangAtomicPath;
 import org.onosproject.yang.compiler.datamodel.YangAugment;
@@ -39,7 +38,6 @@
 import org.onosproject.yang.compiler.translator.tojava.JavaImportData;
 import org.onosproject.yang.compiler.translator.tojava.JavaQualifiedTypeInfoTranslator;
 import org.onosproject.yang.compiler.translator.tojava.TempJavaBeanFragmentFiles;
-import org.onosproject.yang.compiler.translator.tojava.TempJavaCodeFragmentFiles;
 import org.onosproject.yang.compiler.translator.tojava.TempJavaEnumerationFragmentFiles;
 import org.onosproject.yang.compiler.translator.tojava.TempJavaEventFragmentFiles;
 import org.onosproject.yang.compiler.translator.tojava.TempJavaFragmentFiles;
@@ -126,7 +124,6 @@
 import static org.onosproject.yang.compiler.utils.UtilConstants.LEAFREF;
 import static org.onosproject.yang.compiler.utils.UtilConstants.NEG_ONE;
 import static org.onosproject.yang.compiler.utils.UtilConstants.NEW_LINE;
-import static org.onosproject.yang.compiler.utils.UtilConstants.OP_PARAM;
 import static org.onosproject.yang.compiler.utils.UtilConstants.PACKAGE;
 import static org.onosproject.yang.compiler.utils.UtilConstants.PERIOD;
 import static org.onosproject.yang.compiler.utils.UtilConstants.PUBLIC;
@@ -719,56 +716,6 @@
     }
 
     /**
-     * Adds resolved augmented node imports to manager class.
-     *
-     * @param parent parent node
-     */
-    public static void addResolvedAugmentedDataNodeImports(YangNode parent) {
-        List<YangAtomicPath> targets = getSetOfNodeIdentifiers(parent);
-        if (targets.isEmpty()) {
-            return;
-        }
-
-        YangNode node = targets.get(0).getResolvedNode();
-        if (node instanceof InvalidOpTypeHolder) {
-            return;
-        }
-
-        TempJavaCodeFragmentFiles tempJavaCodeFragmentFiles = (
-                (JavaCodeGeneratorInfo) parent)
-                .getTempJavaCodeFragmentFiles();
-        YangNode augmentedNode;
-        JavaQualifiedTypeInfoTranslator typeInfo;
-        String curNodeName;
-        JavaFileInfoTranslator parentInfo = ((JavaFileInfoContainer) parent)
-                .getJavaFileInfo();
-        for (YangAtomicPath nodeId : targets) {
-            augmentedNode = nodeId.getResolvedNode().getParent();
-            curNodeName = getCurNodeName(augmentedNode, parentInfo
-                    .getPluginConfig());
-
-            typeInfo =
-                    getQTypeInfoOfNode(
-                            augmentedNode, curNodeName + OP_PARAM,
-                            parentInfo.getPluginConfig());
-
-            tempJavaCodeFragmentFiles.getServiceTempFiles()
-                    .getJavaImportData().addImportInfo(
-                    typeInfo, parentInfo.getJavaName(),
-                    parentInfo.getPackage());
-            typeInfo =
-                    getQTypeInfoOfNode(
-                            augmentedNode, curNodeName, parentInfo
-                                    .getPluginConfig());
-
-            tempJavaCodeFragmentFiles.getServiceTempFiles()
-                    .getJavaImportData().addImportInfo(
-                    typeInfo, parentInfo.getJavaName(),
-                    parentInfo.getPackage());
-        }
-    }
-
-    /**
      * Returns qualified type info of augmented node.
      *
      * @param augmentedNode augmented node
