anchor.diff:  
           var authnContextClasses = $("#authnContextCls").val();
               var currentColumnId = $("#currentColumnId").val();
  -            if(selectedAuthnContextClass == '<%=IdentityApplicationConstants.Authenticator.SAML2SSO.CUSTOM_AUTHENTICATION_CONTEXT_CLASS_OPTION%>'){
  -                $('#authnContextClsTblRow').remove();
  -                
  +            if(selectedAuthnContextClass == '<%=IdentityApplicationConstants.Authenticator.SAML2SSO.CUSTOM_AUTHENTICATION_CONTEXT_CLASS_OPTION%>' ||
  +                selectedAuthnContextClass == '<%=IdentityApplicationConstants.SAML2.AuthnContextClass.UNSPECIFIED%>'){
  +
  +                currentColumnId = cleanAndGenerateNewAuthnTable(selectedAuthnContextClass);
  +            } else if (authnContextClasses == null || authnContextClasses.trim().length == 0) {
  +                $("#authnContextCls").val(selectedAuthnContextClass);
  +               var row =
  +                        '<tr id="authnCtxCls_' + parseInt(currentColumnId) + '">' +
  +                        '</td><td style="padding-left: 15px !important; color: rgb(119, 119, 119);font-style: italic;">' + selectedAuthnContextClass +
  +                        '</td><td><a onclick="removeAuthnContextClass(\'' + selectedAuthnContextClass + '\', \'authnCtxCls_' + parseInt(currentColumnId) + '\');return false;"'+
  +                        'href="#" class="icon-link" style="background-image: url(../admin/images/delete.gif)"> Delete </a></td></tr>';
  +
  +                $('#authnContextClsTable tbody').append(row);
  +
  +            } else {
  +                var isExist = false;
  +                var isUnspecified = false;
  +                $.each(authnContextClasses.split(","), function (index, value) {
  +                    if (value === selectedAuthnContextClass) {
  +                        isExist = true;
  +                        CARBON.showWarningDialog("Selected AuthnContextClassRef is already exists", null, null);
  +                        return false;
  +                    }
  +                    if(value == '<%=IdentityApplicationConstants.Authenticator.SAML2SSO.CUSTOM_AUTHENTICATION_CONTEXT_CLASS_OPTION%>'){
  +                        isExist = true;
  +                        CARBON.showWarningDialog("Custom AuthnContextClassRef is Selected", null, null);
  +                        return false;
  +                    }
  +                    if(value ==  '<%=IdentityApplicationConstants.SAML2.AuthnContextClass.UNSPECIFIED%>'){
  +                        isUnspecified = true;
  +                    }
  +                });
  +                if (isExist) {
  +                    return false;
  +                }
  +                if(isUnspecified){
  +                currentColumnId = cleanAndGenerateNewAuthnTable(selectedAuthnContextClass);
  +                }
  +                else{
  +                $("#authnContextCls").val(authnContextClasses + "," + selectedAuthnContextClass);
  +                var row =
  +                        '<tr id="authnCtxCls_' + parseInt(currentColumnId) + '">' +
  +                        '</td><td style="padding-left: 15px !important; color: rgb(119, 119, 119);font-style: italic;">' + selectedAuthnContextClass +
  +                        '</td><td><a onclick="removeAuthnContextClass(\'' + selectedAuthnContextClass + '\', \'authnCtxCls_' + parseInt(currentColumnId) + '\');return false;"' +
  +                         'href="#" class="icon-link" style="background-image: url(../admin/images/delete.gif)"> Delete </a></td></tr>';
  +
  +                $('#authnContextClsTable tr:last').after(row);
  +                }
  +
  +            }
  +
  +            $("#currentColumnId").val(parseInt(currentColumnId) + 1);
  +    }
  +
  +    function removeAuthnContextClass(selectedAuthnContextClass, columnId) {
  +
  +            var authnContextClasses = $("#authnContextCls").val();
  +            var newAuthnContextClasses = "";
  +            var isDeleting = true;
  +            if(selectedAuthnContextClass != '<%=IdentityApplicationConstants.SAML2.AuthnContextClass.UNSPECIFIED%>' && authnContextClasses === selectedAuthnContextClass &&
  +                selectedAuthnContextClass != '<%=IdentityApplicationConstants.Authenticator.SAML2SSO.CUSTOM_AUTHENTICATION_CONTEXT_CLASS_OPTION%>'){
  +                isDeleting = false;
  +                CARBON.showWarningDialog("AuthnContextClassRef Cannot be null", null, null);
  +            }
  +            if(isDeleting){
  +            if (authnContextClasses != null && authnContextClasses.trim().length > 0) {
  +                $.each(authnContextClasses.split(","), function (index, value) {
  +                    if (value != selectedAuthnContextClass) {
  +                        if (newAuthnContextClasses.length > 0) {
  +                            newAuthnContextClasses = newAuthnContextClasses + "," + value;
  +                        } else {
  +                            newAuthnContextClasses = value;
  +                    }
  +                    }
  +                });
  +            }
  +            $('#' + columnId).remove();
  +            $("#authnContextCls").val(newAuthnContextClasses);
  +
  +            if(selectedAuthnContextClass === '<%=IdentityApplicationConstants.Authenticator.SAML2SSO.CUSTOM_AUTHENTICATION_CONTEXT_CLASS_OPTION%>' ||
  +                selectedAuthnContextClass === '<%=IdentityApplicationConstants.SAML2.AuthnContextClass.UNSPECIFIED %>'){
  +                var password_protected_transport_asDefault = '<%=IdentityApplicationConstants.SAML2.AuthnContextClass.PASSWORD_PROTECTED_TRANSPORT%>';
  +                $("#authnContextCls").val(password_protected_transport_asDefault);
  +
  +                var row =
  +                        '<tr id="authnCtxCls_0">' +
  +                        '</td><td style="padding-left: 15px !important; color: rgb(119, 119, 119);font-style: italic;">' + password_protected_transport_asDefault +
  +                        '</td><td><a onclick="removeAuthnContextClass(\'' + password_protected_transport_asDefault + '\', \'authnCtxCls_0 \');return false;"'+
  +                        'href="#" class="icon-link" style="background-image: url(../admin/images/delete.gif)"> Delete </a></td></tr>';
  +
  +                $('#authnContextClsTable tbody').append(row);
  +                $("#currentColumnId").val(1);
  +            }
  +            }
  +        }
  +
  +        function cleanAndGenerateNewAuthnTable(selectedAuthnContextClass){
  +
  +            $('#authnContextClsTblRow').remove();
   
                   var row = '<tr id="authnContextClsTblRow">' +
                           '    <td></td>' +
  
positive.code:                         '    </td>' +
                          '</tr>';
                  $('#authnCtxClsInputRow').after(row);
                  var currentColId = $("#currentColumnId").val();
                  $("#authnContextCls").val(selectedAuthnContextClass);
                 var row =
                          '<tr id="authnCtxCls_' + parseInt(currentColId) + '">' +
                          '</td><td style="padding-left: 15px !important; color: rgb(119, 119, 119);font-style: italic;">' + selectedAuthnContextClass +
                          '</td><td><a onclick="removeAuthnContextClass(\'' + selectedAuthnContextClass + '\', \'authnCtxCls_' + parseInt(currentColId) + '\');return false;"'+
                          'href="#" class="icon-link" style="background-image: url(../admin/images/delete.gif)"> Delete </a></td></tr>';
  
                  $('#authnContextClsTable tbody').append(row);
                  
              } else if (authnContextClasses == null || authnContextClasses.trim().length == 0) {
                  $("#authnContextCls").val(selectedAuthnContextClass);
                 var row =
                          '<tr id="authnCtxCls_' + parseInt(currentColumnId) + '">' +
  
negative.code:                                         <input type="hidden" id="authnContextCls" name="AuthnContextClassRef"
                                                 value="<%=authnContextClassList.length > 0 ?
           Encode.forHtmlAttribute(authnContextClass) : ""%>">
  
                                          <input type="hidden" id="currentColumnId" value="<%=authnCtxClsColumnId%>">
                                      </td>
                                  </tr>
  
                                  <!-- Authenticatin Context Comparison Level -->
  
                                  <tr>
  