abelevtsov/XrmSoapSDK

View on GitHub
src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js

Summary

Maintainability
F
1 mo
Test Coverage

File xrm.soap.sdk.js has 2126 lines of code (exceeds 250 allowed). Consider refactoring.
Open

(function(global) {
    global.Type.registerNamespace("Xrm.Soap.Sdk");
})(this);

(function(global) {
Severity: Major
Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js - About 5 days to fix

    Function Entity has 302 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        this.Entity = (function() {
            /**
             * Universal class for creating, updating and deleting any entity
             * @param {String} logicalName
             * @param {Guid} id
    Severity: Major
    Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js - About 1 day to fix

      Function OrganizationService has 273 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          this.OrganizationService = (function() {
              var url = splittedUrl[0] + "//" + splittedUrl[1],
                  serviceUrl = url + (splittedUrl.length === 3 && splittedUrl[2] === orgName ? (`/${orgName}`) : "") + xrmServiceUrl,
                  soapTemplate = compile([
                      utf8Root,
      Severity: Major
      Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js - About 1 day to fix

        Function CrmProvider has 145 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            this.CrmProvider = (function() {
                const entityMetadataType = "EntityMetadata";
                const orgService = new self.OrganizationService();
                const crmProvider = function() {};
        
        
        Severity: Major
        Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js - About 5 hrs to fix

          Function deserialize has 121 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  entity.deserialize = function(resultNode) {
                      var obj = {},
                          resultNodes = resultNode.childNodes,
                          instance = new self.Entity(),
          
          
          Severity: Major
          Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js - About 4 hrs to fix

            Function objectifyNode has 113 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    objectifyNode = function(node) {
                        if (node.attributes && node.attributes.length === 1) {
                            var nil = node.attributes.getNamedItem("i:nil");
                            if (nil && nil.nodeValue === trueString) {
                                return null;
            Severity: Major
            Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js - About 4 hrs to fix

              Function serialize has 104 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                          serialize: function() {
                              var xml = [`<entity xmlns:a='${contractsXrmNs}'>`],
                                  counter = 1;
              
                              xml[counter++] = `<a:Attributes xmlns:b='${genericNs}'>`;
              Severity: Major
              Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js - About 4 hrs to fix

                Function QueryExpression has 85 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    this.QueryExpression = (function() {
                        const queryTemplate = compile(`<query i:type='a:QueryExpression' xmlns:a='${contractsXrmNs}'><%= query %></query>`);
                        const criteriaTemplate = compile("<a:Criteria><%= conditions %><a:FilterOperator><%= filterOperator %></a:FilterOperator><a:Filters></a:Filters></a:Criteria>");
                        const conditionsTemplate = compile("<a:Conditions><% _.each(conditions, function(condition) { %><%= condition.serialize() %><% }) %></a:Conditions>");
                        const linkEntitiesTemplate = compile("<a:LinkEntities><% _.each(linkEntities, function(entity) { %><%= entity.serialize() %><% }) %></a:LinkEntities>");
                Severity: Major
                Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js - About 3 hrs to fix

                  Function QueryByAttribute has 79 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      this.QueryByAttribute = (function() {
                          const queryTemplate = compile(`<query i:type='a:QueryByAttribute' xmlns:a='${contractsXrmNs}'><%= query %></query>`);
                          const ordersTemplate = compile("<a:Orders><% _.each(orders, function(order) { %><%= order %><% }) %></a:Orders>");
                          const attributesTemplate = compile(`<a:Attributes xmlns:b='${arraysNs}'><% _.each(attributes, function(attribute) { %><%= attribute %><% }) %></a:Attributes>`);
                          const valuesTemplate = compile(`<a:Values xmlns:b='${arraysNs}'><% _.each(values, function(value) { %><%= value %><% }) %></a:Values>`);
                  Severity: Major
                  Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js - About 3 hrs to fix

                    Function ConditionOperator has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        this.ConditionOperator = (function() {
                            return {
                                Equal: "Equal",
                                NotEqual: "NotEqual",
                                GreaterThan: "GreaterThan",
                    Severity: Major
                    Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js - About 3 hrs to fix

                      Function ColumnSet has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          this.ColumnSet = (function() {
                              const columnsTemplate = compile(`<a:AllColumns><%= allColumns %></a:AllColumns><a:Columns xmlns:b='${arraysNs}'><% _.each(columns, function(column) { %><%= column %><% }) %></a:Columns>`);
                              const columnSetTemplate = compile("<a:ColumnSet><%= columnSet %></a:ColumnSet>");
                              const asLinkColumnSetTemplate = compile("<a:Columns><%= columnSet %></a:Columns>");
                              const simpleColumnSetTemplate = compile(`<columnSet xmlns:a='${contractsXrmNs}'><%= columnSet %></columnSet>`);
                      Severity: Major
                      Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js - About 2 hrs to fix

                        Consider simplifying this complex logical expression.
                        Open

                                        if (c > 96 && c < 123 || c > 64 && c < 91 || c === 32 || c > 47 && c < 58 || c === 46 || c === 44 || c === 45 || c === 95) {
                                            buffer += String.fromCharCode(c);
                                        } else {
                                            buffer += `&#${c};`;
                                        }
                        Severity: Critical
                        Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js - About 2 hrs to fix

                          Function SetStateRequest has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              this.SetStateRequest = (function(base) {
                                  const template = compile([
                                          `<request i:type='b:SetStateRequest' xmlns:a='${contractsXrmNs}' xmlns:b='${contractsCrmNs}'>`,
                                            `<a:Parameters xmlns:c='${genericNs}'>`,
                                              "<a:KeyValuePairOfstringanyType>",
                          Severity: Major
                          Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js - About 2 hrs to fix

                            Function ExecuteActionRequest has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                this.ExecuteActionRequest = (function(base) {
                                    const template = compile([
                                        `<request  xmlns:a='${contractsXrmNs}' xmlns:i='${xmlSchemaInstanceNs}' xmlns:b='${genericNs}'>`,
                                          "<%= parameters %>",
                                          "<a:RequestId i:nil='true'/>",
                            Severity: Major
                            Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js - About 2 hrs to fix

                              Function Guid has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  this.Guid = (function() {
                                      const regex = /^(\{){0,1}[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}(\}){0,1}$/;
                                      const empty = "{00000000-0000-0000-0000-000000000000}";
                                      const ctor = function(value) {
                                          if (typeof(value) === "object" &&
                              Severity: Major
                              Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js - About 2 hrs to fix

                                Function RetrieveEntityRequest has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    this.RetrieveEntityRequest = (function(base) {
                                        const template = compile([
                                                `<request i:type='a:RetrieveEntityRequest' xmlns:a='${contractsXrmNs}'>`,
                                                  `<a:Parameters xmlns:b='${genericNs}'>`,
                                                    "<a:KeyValuePairOfstringanyType>",
                                Severity: Major
                                Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js - About 2 hrs to fix

                                  Function RetrieveAttributeRequest has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      this.RetrieveAttributeRequest = (function(base) {
                                          const template = compile([
                                                  `<request i:type='a:RetrieveAttributeRequest' xmlns:a='${contractsXrmNs}'>`,
                                                    `<a:Parameters xmlns:b='${genericNs}'>`,
                                                      "<a:KeyValuePairOfstringanyType>",
                                  Severity: Major
                                  Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js - About 2 hrs to fix

                                    Function LinkEntity has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        this.LinkEntity = (function() {
                                            const template = compile([
                                                "<a:LinkEntity>",
                                                  "<%= columns %>",
                                                  "<a:EntityAlias i:nil='true'/>",
                                    Severity: Minor
                                    Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js - About 1 hr to fix

                                      Function ExecuteGlobalActionRequest has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          this.ExecuteGlobalActionRequest = (function(base) {
                                              const template = compile([
                                                  `<request  xmlns:a='${contractsXrmNs}' xmlns:i='${xmlSchemaInstanceNs}' xmlns:b='${genericNs}'>`,
                                                    "<%= parameters %>",
                                                    "<a:RequestId i:nil='true'/>",
                                      Severity: Minor
                                      Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js - About 1 hr to fix

                                        Function FilterExpression has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            this.FilterExpression = (function() {
                                                const template = compile([
                                                    "<a:LinkCriteria>",
                                                         "<a:Conditions>",
                                                             "<% _.each(conditions, function(condition) { %><%= condition %><% }) %>",
                                        Severity: Minor
                                        Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js - About 1 hr to fix

                                          Function ExecuteWorkflowRequest has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                          Open

                                              this.ExecuteWorkflowRequest = (function(base) {
                                                  const template = compile([
                                                          `<request i:type='b:ExecuteWorkflowRequest' xmlns:a='${contractsXrmNs}' xmlns:b='${contractsCrmNs}'>`,
                                                            `<a:Parameters xmlns:c='${genericNs}'>`,
                                                              "<a:KeyValuePairOfstringanyType>",
                                          Severity: Minor
                                          Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js - About 1 hr to fix

                                            Function RetrieveAllEntitiesRequest has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                            Open

                                                this.RetrieveAllEntitiesRequest = (function(base) {
                                                    const template = compile([
                                                            `<request i:type='a:RetrieveAllEntitiesRequest' xmlns:a='${contractsXrmNs}'>`,
                                                              `<a:Parameters xmlns:b='${genericNs}'>`,
                                                                "<a:KeyValuePairOfstringanyType>",
                                            Severity: Minor
                                            Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js - About 1 hr to fix

                                              Function EntityReference has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                              Open

                                                  this.EntityReference = (function() {
                                                      /**
                                                       * Like EntityReference in Microsoft.Xrm.Sdk
                                                       * @param {String} logicalName Entity logical name
                                                       * @param {Guid} id Entity Id
                                              Severity: Minor
                                              Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js - About 1 hr to fix

                                                Function serialize has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                                Open

                                                        ctor.prototype.serialize = function() {
                                                            // ToDo: improve result creation
                                                            var result = [];
                                                            if (this.attributes.length) {
                                                                result.push(attributesTemplate({
                                                Severity: Minor
                                                Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js - About 1 hr to fix

                                                  Function RetrieveSharedPrincipalsAndAccessRequest has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                                  Open

                                                      this.RetrieveSharedPrincipalsAndAccessRequest = (function(base) {
                                                          const template = compile([
                                                                  `<request i:type='b:RetrieveSharedPrincipalsAndAccessRequest' xmlns:a='${contractsXrmNs}' xmlns:i='${xmlSchemaInstanceNs}' xmlns:b='${contractsCrmNs}'>`,
                                                                    `<a:Parameters xmlns:c='${genericNs}'>`,
                                                                      "<a:KeyValuePairOfstringanyType>",
                                                  Severity: Minor
                                                  Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js - About 1 hr to fix

                                                    Function innerSurrogateAmpersandWorkaround has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                                    Open

                                                            innerSurrogateAmpersandWorkaround = function(s) {
                                                                var buffer = "",
                                                                    c0,
                                                                    cnt,
                                                                    l;
                                                    Severity: Minor
                                                    Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js - About 1 hr to fix

                                                      Function ConditionExpression has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                                      Open

                                                          this.ConditionExpression = (function() {
                                                              const valueTemplate = compile("<b:anyType i:type='c:<%= type %>' xmlns:c='<%= xmlns %>'><%= value %></b:anyType>");
                                                              const valuesTemplate = compile(`<a:Values xmlns:b='${arraysNs}'><% _.each(values, function(value) { %><%= value %><% }) %></a:Values>`);
                                                              const conditionExpressionTemplate = compile("<a:ConditionExpression><a:AttributeName><%= attributeName %></a:AttributeName><a:Operator><%= operator %></a:Operator><%= values %></a:ConditionExpression>");
                                                      
                                                      
                                                      Severity: Minor
                                                      Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js - About 1 hr to fix

                                                        Function PageInfo has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                                        Open

                                                            this.PageInfo = (function() {
                                                                const template = compile([
                                                                    "<a:PageInfo>",
                                                                        "<a:Count><%= count %></a:Count>",
                                                                        "<a:PageNumber><%= pageNumber %></a:PageNumber>",
                                                        Severity: Minor
                                                        Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js - About 1 hr to fix

                                                          Function isMetadataArray has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                                          Open

                                                                  isMetadataArray = (function() {
                                                                      var arrayElements = [
                                                                              "Attributes",
                                                                              "ManyToManyRelationships",
                                                                              "ManyToOneRelationships",
                                                          Severity: Minor
                                                          Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js - About 1 hr to fix

                                                            Avoid deeply nested control flow statements.
                                                            Open

                                                                                                for (var y = 0; y < childNodes.length; y++) {
                                                                                                    var itemNodes = childNodes[y].childNodes[0].childNodes;
                                                                                                    for (var z = 0; z < itemNodes.length; z++) {
                                                                                                        if ($(itemNodes[z].childNodes[0]).text() !== "partyid") {
                                                                                                            continue;
                                                            Severity: Major
                                                            Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js - About 45 mins to fix

                                                              Avoid deeply nested control flow statements.
                                                              Open

                                                                                                  if (entCv.type === "int") {
                                                                                                      entCv.value = parseInt($(attr.childNodes[k].childNodes[1]).text());
                                                                                                  } else if (entCv.type === "decimal" || entCv.type === "double") {
                                                                                                      entCv.value = parseFloat($(attr.childNodes[k].childNodes[1]).text());
                                                                                                  } else if (entCv.type === "dateTime") {
                                                              Severity: Major
                                                              Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js - About 45 mins to fix

                                                                Avoid deeply nested control flow statements.
                                                                Open

                                                                                                if (attributes[l].nodeName === "i:type") {
                                                                                                    sType = ($(attributes[l]).val() || "")
                                                                                                        .replace("c:", "")
                                                                                                        .replace("a:", "");
                                                                                                    break;
                                                                Severity: Major
                                                                Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js - About 45 mins to fix

                                                                  Function ctor has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                  Open

                                                                          const ctor = function(linkFromEntityName, linkToEntityName, linkFromAttributeName, linkToAttributeName, joinOperator) {
                                                                  Severity: Minor
                                                                  Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js - About 35 mins to fix

                                                                    Function callAction has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                    Open

                                                                            crmProvider.prototype.callAction = function(actionName, entityName, entityId, parameters, async) {
                                                                    Severity: Minor
                                                                    Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js - About 35 mins to fix

                                                                      Function setState has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                      Open

                                                                              crmProvider.prototype.setState = function(entityName, entityId, state, status, async) {
                                                                      Severity: Minor
                                                                      Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js - About 35 mins to fix

                                                                        Function ctor has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                        Open

                                                                                const ctor = function(entityName, attributes, values, columnSet, topCount) {
                                                                        Severity: Minor
                                                                        Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js - About 35 mins to fix

                                                                          Avoid too many return statements within this function.
                                                                          Open

                                                                                          return null;
                                                                          Severity: Major
                                                                          Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js - About 30 mins to fix

                                                                            Avoid too many return statements within this function.
                                                                            Open

                                                                                                return parseXml(xmlToString(response));
                                                                            Severity: Major
                                                                            Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js - About 30 mins to fix

                                                                              Avoid too many return statements within this function.
                                                                              Open

                                                                                          return c;
                                                                              Severity: Major
                                                                              Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js - About 30 mins to fix

                                                                                Avoid too many return statements within this function.
                                                                                Open

                                                                                            return false;
                                                                                Severity: Major
                                                                                Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js - About 30 mins to fix

                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                  Open

                                                                                      this.RetrieveAttributeRequest = (function(base) {
                                                                                          const template = compile([
                                                                                                  `<request i:type='a:RetrieveAttributeRequest' xmlns:a='${contractsXrmNs}'>`,
                                                                                                    `<a:Parameters xmlns:b='${genericNs}'>`,
                                                                                                      "<a:KeyValuePairOfstringanyType>",
                                                                                  Severity: Major
                                                                                  Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 1 other location - About 1 day to fix
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1709..1765

                                                                                  Duplicated Code

                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                  Tuning

                                                                                  This issue has a mass of 310.

                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                  Refactorings

                                                                                  Further Reading

                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                  Open

                                                                                      this.RetrieveEntityRequest = (function(base) {
                                                                                          const template = compile([
                                                                                                  `<request i:type='a:RetrieveEntityRequest' xmlns:a='${contractsXrmNs}'>`,
                                                                                                    `<a:Parameters xmlns:b='${genericNs}'>`,
                                                                                                      "<a:KeyValuePairOfstringanyType>",
                                                                                  Severity: Major
                                                                                  Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 1 other location - About 1 day to fix
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1767..1823

                                                                                  Duplicated Code

                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                  Tuning

                                                                                  This issue has a mass of 310.

                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                  Refactorings

                                                                                  Further Reading

                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                  Open

                                                                                                  parameters: _.map(parameters, function(p) {
                                                                                                      // ToDo: extract this method to common usage
                                                                                                      const typed = p.value ? p.value.hasOwnProperty("type") : false;
                                                                                                      return parameterTemplate({
                                                                                                          name: p.name,
                                                                                  Severity: Major
                                                                                  Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 1 other location - About 4 hrs to fix
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 2066..2074

                                                                                  Duplicated Code

                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                  Tuning

                                                                                  This issue has a mass of 132.

                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                  Refactorings

                                                                                  Further Reading

                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                  Open

                                                                                                  parameters: _.map(parameters, function(p) {
                                                                                                      // ToDo: extract this method to common usage
                                                                                                      const typed = p.value ? p.value.hasOwnProperty("type") : false;
                                                                                                      return parameterTemplate({
                                                                                                          name: p.name,
                                                                                  Severity: Major
                                                                                  Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 1 other location - About 4 hrs to fix
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 2012..2020

                                                                                  Duplicated Code

                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                  Tuning

                                                                                  This issue has a mass of 132.

                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                  Refactorings

                                                                                  Further Reading

                                                                                  Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                  Open

                                                                                          ctor.prototype.addOrders = function(/* order list */) {
                                                                                              if (arguments && arguments.length) {
                                                                                                  let counter = this.orders.length;
                                                                                                  for (var i = 0, l = arguments.length; i < l; i++) {
                                                                                                      const order = arguments[i];
                                                                                  Severity: Major
                                                                                  Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 2 other locations - About 4 hrs to fix
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 839..847
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 981..989

                                                                                  Duplicated Code

                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                  Tuning

                                                                                  This issue has a mass of 127.

                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                  Refactorings

                                                                                  Further Reading

                                                                                  Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                  Open

                                                                                          ctor.prototype.addOrders = function(/* order list */) {
                                                                                              if (arguments && arguments.length) {
                                                                                                  let counter = this.orders.length;
                                                                                                  for (var i = 0, l = arguments.length; i < l; i++) {
                                                                                                      const order = arguments[i];
                                                                                  Severity: Major
                                                                                  Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 2 other locations - About 4 hrs to fix
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 954..962
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 981..989

                                                                                  Duplicated Code

                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                  Tuning

                                                                                  This issue has a mass of 127.

                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                  Refactorings

                                                                                  Further Reading

                                                                                  Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                  Open

                                                                                          ctor.prototype.addLinks = function(/* linkEntity list */) {
                                                                                              if (arguments && arguments.length) {
                                                                                                  let counter = this.linkEntities.length;
                                                                                                  for (var i = 0, l = arguments.length; i < l; i++) {
                                                                                                      const linkEntity = arguments[i];
                                                                                  Severity: Major
                                                                                  Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 2 other locations - About 4 hrs to fix
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 839..847
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 954..962

                                                                                  Duplicated Code

                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                  Tuning

                                                                                  This issue has a mass of 127.

                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                  Refactorings

                                                                                  Further Reading

                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                  Open

                                                                                              return orgService.execute(request, async).then(function(result) {
                                                                                                  const $response = $(result).find("ExecuteResult").eq(0);
                                                                                                  return crmXmlDecode($response.text());
                                                                                              }).catch(function(err) {
                                                                                                  notify(`Ошибка:\n${err && err.description ? err.description : err}`);
                                                                                  Severity: Major
                                                                                  Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 1 other location - About 4 hrs to fix
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 2837..2842

                                                                                  Duplicated Code

                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                  Tuning

                                                                                  This issue has a mass of 115.

                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                  Refactorings

                                                                                  Further Reading

                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                  Open

                                                                                              return orgService.execute(request, async).then(function(result) {
                                                                                                  const $response = $(result).find("ExecuteResult").eq(0);
                                                                                                  return crmXmlDecode($response.text());
                                                                                              }).catch(function(err) {
                                                                                                  notify(`Ошибка:\n${err && err.description ? err.description : err}`);
                                                                                  Severity: Major
                                                                                  Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 1 other location - About 4 hrs to fix
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 2807..2812

                                                                                  Duplicated Code

                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                  Tuning

                                                                                  This issue has a mass of 115.

                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                  Refactorings

                                                                                  Further Reading

                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                  Open

                                                                                                  if (columnSet && $.isArray(columnSet)) {
                                                                                                      columnSet = new self.ColumnSet(columnSet);
                                                                                                      columnSet = columnSet.serialize(false, true);
                                                                                                  } else if (columnSet && columnSet instanceof self.ColumnSet) {
                                                                                                      columnSet = columnSet.serialize(false, true);
                                                                                  Severity: Major
                                                                                  Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 1 other location - About 3 hrs to fix
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 2415..2422

                                                                                  Duplicated Code

                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                  Tuning

                                                                                  This issue has a mass of 110.

                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                  Refactorings

                                                                                  Further Reading

                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                  Open

                                                                                              if (columnSet && $.isArray(columnSet)) {
                                                                                                  columnSet = new self.ColumnSet(columnSet);
                                                                                                  columnSet = columnSet.serialize(false, true);
                                                                                              } else if (columnSet && columnSet instanceof self.ColumnSet) {
                                                                                                  columnSet = columnSet.serialize(false, true);
                                                                                  Severity: Major
                                                                                  Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 1 other location - About 3 hrs to fix
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 2194..2201

                                                                                  Duplicated Code

                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                  Tuning

                                                                                  This issue has a mass of 110.

                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                  Refactorings

                                                                                  Further Reading

                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                  Open

                                                                                          orgService.prototype.update = function(entity, async) {
                                                                                              return execute(entity.serialize(), "Update", async).then(function(resultXml) {
                                                                                                  return resultXml ? $(resultXml).find("UpdateResponse").text() : null;
                                                                                              });
                                                                                          };
                                                                                  Severity: Major
                                                                                  Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 1 other location - About 2 hrs to fix
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 2352..2356

                                                                                  Duplicated Code

                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                  Tuning

                                                                                  This issue has a mass of 84.

                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                  Refactorings

                                                                                  Further Reading

                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                  Open

                                                                                          orgService.prototype.create = function(entity, async) {
                                                                                              return execute(entity.serialize(), "Create", async).then(function(resultXml) {
                                                                                                  return resultXml ? $(resultXml).find("CreateResult").text() : null;
                                                                                              });
                                                                                          };
                                                                                  Severity: Major
                                                                                  Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 1 other location - About 2 hrs to fix
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 2371..2375

                                                                                  Duplicated Code

                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                  Tuning

                                                                                  This issue has a mass of 84.

                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                  Refactorings

                                                                                  Further Reading

                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                  Open

                                                                                          ctor.prototype.pageInfo = function(/* value */) {
                                                                                              if (arguments && arguments.length === 1 && arguments[0] instanceof self.PageInfo) {
                                                                                                  this.pageInfo = arguments[0];
                                                                                              }
                                                                                  
                                                                                  
                                                                                  Severity: Major
                                                                                  Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 1 other location - About 2 hrs to fix
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1007..1013

                                                                                  Duplicated Code

                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                  Tuning

                                                                                  This issue has a mass of 79.

                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                  Refactorings

                                                                                  Further Reading

                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                  Open

                                                                                          ctor.prototype.pageInfo = function(/* value */) {
                                                                                              if (arguments && arguments.length === 1 && arguments[0] instanceof self.PageInfo) {
                                                                                                  this.pageInfo = arguments[0];
                                                                                              }
                                                                                  
                                                                                  
                                                                                  Severity: Major
                                                                                  Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 1 other location - About 2 hrs to fix
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 865..871

                                                                                  Duplicated Code

                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                  Tuning

                                                                                  This issue has a mass of 79.

                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                  Refactorings

                                                                                  Further Reading

                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                  Open

                                                                                                  for (let i = 0, l = response.length; i < l; i++) {
                                                                                                      const a = objectifyNode(response[i]);
                                                                                                      a._type = entityMetadataType;
                                                                                                      results[results.length] = a;
                                                                                                  }
                                                                                  Severity: Major
                                                                                  Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 1 other location - About 1 hr to fix
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 2785..2789

                                                                                  Duplicated Code

                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                  Tuning

                                                                                  This issue has a mass of 73.

                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                  Refactorings

                                                                                  Further Reading

                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                  Open

                                                                                                  for (let i = 0, l = response.length; i < l; i++) {
                                                                                                      const a = objectifyNode(response[i]);
                                                                                                      a._type = entityMetadataType;
                                                                                                      results[results.length] = a;
                                                                                                  }
                                                                                  Severity: Major
                                                                                  Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 1 other location - About 1 hr to fix
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 2714..2718

                                                                                  Duplicated Code

                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                  Tuning

                                                                                  This issue has a mass of 73.

                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                  Refactorings

                                                                                  Further Reading

                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                  Open

                                                                                                  for (let i = 0, l = fetchResult.childNodes.length; i < l; i++) {
                                                                                                      fetchResults[fetchResults.length] = self.Entity.deserialize(fetchResult.childNodes[i]);
                                                                                                  }
                                                                                  Severity: Major
                                                                                  Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 1 other location - About 1 hr to fix
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 2298..2300

                                                                                  Duplicated Code

                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                  Tuning

                                                                                  This issue has a mass of 71.

                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                  Refactorings

                                                                                  Further Reading

                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                  Open

                                                                                                  for (let i = 0, l = fetchResult.childNodes.length; i < l; i++) {
                                                                                                      fetchResults[fetchResults.length] = self.Entity.deserialize(fetchResult.childNodes[i]);
                                                                                                  }
                                                                                  Severity: Major
                                                                                  Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 1 other location - About 1 hr to fix
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 2532..2534

                                                                                  Duplicated Code

                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                  Tuning

                                                                                  This issue has a mass of 71.

                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                  Refactorings

                                                                                  Further Reading

                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                  Open

                                                                                              update: function(entity) {
                                                                                                  const result = executeSync(entity.serialize(), "Update");
                                                                                                  return result && !(result instanceof Error) ? $(result).find("UpdateResponse").text() : result;
                                                                                              },
                                                                                  Severity: Major
                                                                                  Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 1 other location - About 1 hr to fix
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 2162..2165

                                                                                  Duplicated Code

                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                  Tuning

                                                                                  This issue has a mass of 70.

                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                  Refactorings

                                                                                  Further Reading

                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                  Open

                                                                                              create: function(entity) {
                                                                                                  const result = executeSync(entity.serialize(), "Create");
                                                                                                  return result && !(result instanceof Error) ? $(result).find("CreateResult").text() : result;
                                                                                              },
                                                                                  Severity: Major
                                                                                  Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 1 other location - About 1 hr to fix
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 2171..2174

                                                                                  Duplicated Code

                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                  Tuning

                                                                                  This issue has a mass of 70.

                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                  Refactorings

                                                                                  Further Reading

                                                                                  Similar blocks of code found in 4 locations. Consider refactoring.
                                                                                  Open

                                                                                          ctor.prototype.noLock = function(/* value */) {
                                                                                              if (arguments && arguments.length === 1) {
                                                                                                  this.noLock = !!arguments[0];
                                                                                              }
                                                                                  
                                                                                  
                                                                                  Severity: Major
                                                                                  Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 3 other locations - About 1 hr to fix
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 849..855
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 857..863
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 991..997

                                                                                  Duplicated Code

                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                  Tuning

                                                                                  This issue has a mass of 67.

                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                  Refactorings

                                                                                  Further Reading

                                                                                  Similar blocks of code found in 4 locations. Consider refactoring.
                                                                                  Open

                                                                                          ctor.prototype.distinct = function(/* value */) {
                                                                                              if (arguments && arguments.length === 1) {
                                                                                                  this.distinct = !!arguments[0];
                                                                                              }
                                                                                  
                                                                                  
                                                                                  Severity: Major
                                                                                  Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 3 other locations - About 1 hr to fix
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 849..855
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 857..863
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 999..1005

                                                                                  Duplicated Code

                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                  Tuning

                                                                                  This issue has a mass of 67.

                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                  Refactorings

                                                                                  Further Reading

                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                  Open

                                                                                                  for (let i = 0, l = resultNodes.childNodes.length; i < l; i++) {
                                                                                                      retrieveMultipleResults[i] = self.Entity.deserialize(resultNodes.childNodes[i]);
                                                                                                  }
                                                                                  Severity: Major
                                                                                  Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 1 other location - About 1 hr to fix
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 2249..2251

                                                                                  Duplicated Code

                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                  Tuning

                                                                                  This issue has a mass of 67.

                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                  Refactorings

                                                                                  Further Reading

                                                                                  Similar blocks of code found in 4 locations. Consider refactoring.
                                                                                  Open

                                                                                          ctor.prototype.distinct = function(/* value */) {
                                                                                              if (arguments && arguments.length === 1) {
                                                                                                  this.distinct = !!arguments[0];
                                                                                              }
                                                                                  
                                                                                  
                                                                                  Severity: Major
                                                                                  Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 3 other locations - About 1 hr to fix
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 857..863
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 991..997
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 999..1005

                                                                                  Duplicated Code

                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                  Tuning

                                                                                  This issue has a mass of 67.

                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                  Refactorings

                                                                                  Further Reading

                                                                                  Similar blocks of code found in 4 locations. Consider refactoring.
                                                                                  Open

                                                                                          ctor.prototype.noLock = function(/* value */) {
                                                                                              if (arguments && arguments.length === 1) {
                                                                                                  this.noLock = !!arguments[0];
                                                                                              }
                                                                                  
                                                                                  
                                                                                  Severity: Major
                                                                                  Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 3 other locations - About 1 hr to fix
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 849..855
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 991..997
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 999..1005

                                                                                  Duplicated Code

                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                  Tuning

                                                                                  This issue has a mass of 67.

                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                  Refactorings

                                                                                  Further Reading

                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                  Open

                                                                                                  for (let i = 0, l = resultNodes.childNodes.length; i < l; i++) {
                                                                                                      retrieveMultipleResults[i] = self.Entity.deserialize(resultNodes.childNodes[i]);
                                                                                                  }
                                                                                  Severity: Major
                                                                                  Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 1 other location - About 1 hr to fix
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 2470..2472

                                                                                  Duplicated Code

                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                  Tuning

                                                                                  This issue has a mass of 67.

                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                  Refactorings

                                                                                  Further Reading

                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                  Open

                                                                                                  if ($resultXml.find("a\\:Entities").length) {
                                                                                                      resultNodes = $resultXml.find("a\\:Entities")[0];
                                                                                                  } else {
                                                                                                      // chrome could not load node properly
                                                                                                      resultNodes = $resultXml.find("Entities")[0];
                                                                                  Severity: Major
                                                                                  Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 1 other location - About 1 hr to fix
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 2458..2463

                                                                                  Duplicated Code

                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                  Tuning

                                                                                  This issue has a mass of 63.

                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                  Refactorings

                                                                                  Further Reading

                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                  Open

                                                                                                  if ($resultXml.find("a\\:Entities").length) {
                                                                                                      resultNodes = $resultXml.find("a\\:Entities")[0];
                                                                                                  } else {
                                                                                                      // chrome could not load node properly
                                                                                                      resultNodes = $resultXml.find("Entities")[0];
                                                                                  Severity: Major
                                                                                  Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 1 other location - About 1 hr to fix
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 2237..2242

                                                                                  Duplicated Code

                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                  Tuning

                                                                                  This issue has a mass of 63.

                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                  Refactorings

                                                                                  Further Reading

                                                                                  Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                  Open

                                                                                          ctor.prototype.addOrder = function(order) {
                                                                                              order && order instanceof self.OrderExpression && (this.orders[this.orders.length] = order);
                                                                                          };
                                                                                  Severity: Major
                                                                                  Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 2 other locations - About 1 hr to fix
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 654..656
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 977..979

                                                                                  Duplicated Code

                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                  Tuning

                                                                                  This issue has a mass of 62.

                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                  Refactorings

                                                                                  Further Reading

                                                                                  Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                  Open

                                                                                          ctor.prototype.addCondition = function(condition) {
                                                                                              condition && condition instanceof self.ConditionExpression && (this.conditions[this.conditions.length] = condition);
                                                                                          };
                                                                                  Severity: Major
                                                                                  Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 2 other locations - About 1 hr to fix
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 950..952
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 977..979

                                                                                  Duplicated Code

                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                  Tuning

                                                                                  This issue has a mass of 62.

                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                  Refactorings

                                                                                  Further Reading

                                                                                  Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                  Open

                                                                                          ctor.prototype.addLink = function(linkEntity) {
                                                                                              linkEntity && linkEntity instanceof self.LinkEntity && (this.linkEntities[this.linkEntities.length] = linkEntity);
                                                                                          };
                                                                                  Severity: Major
                                                                                  Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 2 other locations - About 1 hr to fix
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 654..656
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 950..952

                                                                                  Duplicated Code

                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                  Tuning

                                                                                  This issue has a mass of 62.

                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                  Refactorings

                                                                                  Further Reading

                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                  Open

                                                                                      this.RequestParameter = (function() {
                                                                                          const ctor = function(name, value) {
                                                                                              this.name = name;
                                                                                              this.value = value;
                                                                                          };
                                                                                  Severity: Major
                                                                                  Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 1 other location - About 1 hr to fix
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1614..1621

                                                                                  Duplicated Code

                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                  Tuning

                                                                                  This issue has a mass of 58.

                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                  Refactorings

                                                                                  Further Reading

                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                  Open

                                                                                      this.XrmValue = (function() {
                                                                                          const ctor = function(value, type) {
                                                                                              this.value = value;
                                                                                              this.type = type;
                                                                                          };
                                                                                  Severity: Major
                                                                                  Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 1 other location - About 1 hr to fix
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1623..1630

                                                                                  Duplicated Code

                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                  Tuning

                                                                                  This issue has a mass of 58.

                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                  Refactorings

                                                                                  Further Reading

                                                                                  Similar blocks of code found in 5 locations. Consider refactoring.
                                                                                  Open

                                                                                      this.Decimal = (function() {
                                                                                          const ctor = function(value) {
                                                                                              this.value = value;
                                                                                              this.type = "decimal";
                                                                                          };
                                                                                  Severity: Major
                                                                                  Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 4 other locations - About 1 hr to fix
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1450..1457
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1534..1541
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1596..1603
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1605..1612

                                                                                  Duplicated Code

                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                  Tuning

                                                                                  This issue has a mass of 57.

                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                  Refactorings

                                                                                  Further Reading

                                                                                  Similar blocks of code found in 5 locations. Consider refactoring.
                                                                                  Open

                                                                                      this.StatusCode = (function() {
                                                                                          const ctor = function(value) {
                                                                                              this.value = value;
                                                                                              this.type = "int";
                                                                                          };
                                                                                  Severity: Major
                                                                                  Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 4 other locations - About 1 hr to fix
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1450..1457
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1459..1466
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1534..1541
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1596..1603

                                                                                  Duplicated Code

                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                  Tuning

                                                                                  This issue has a mass of 57.

                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                  Refactorings

                                                                                  Further Reading

                                                                                  Similar blocks of code found in 5 locations. Consider refactoring.
                                                                                  Open

                                                                                      this.StateCode = (function() {
                                                                                          const ctor = function(value) {
                                                                                              this.value = value;
                                                                                              this.type = "int";
                                                                                          };
                                                                                  Severity: Major
                                                                                  Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 4 other locations - About 1 hr to fix
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1450..1457
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1459..1466
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1534..1541
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1605..1612

                                                                                  Duplicated Code

                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                  Tuning

                                                                                  This issue has a mass of 57.

                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                  Refactorings

                                                                                  Further Reading

                                                                                  Similar blocks of code found in 5 locations. Consider refactoring.
                                                                                  Open

                                                                                      this.EntityCollection = (function() {
                                                                                          const entityCollection = function(value) {
                                                                                              this.value = value;
                                                                                              this.type = "EntityCollection";
                                                                                          };
                                                                                  Severity: Major
                                                                                  Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 4 other locations - About 1 hr to fix
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1450..1457
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1459..1466
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1596..1603
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1605..1612

                                                                                  Duplicated Code

                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                  Tuning

                                                                                  This issue has a mass of 57.

                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                  Refactorings

                                                                                  Further Reading

                                                                                  Similar blocks of code found in 5 locations. Consider refactoring.
                                                                                  Open

                                                                                      this.Money = (function() {
                                                                                          const ctor = function(value) {
                                                                                              this.value = value;
                                                                                              this.type = "Money";
                                                                                          };
                                                                                  Severity: Major
                                                                                  Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 4 other locations - About 1 hr to fix
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1459..1466
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1534..1541
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1596..1603
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1605..1612

                                                                                  Duplicated Code

                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                  Tuning

                                                                                  This issue has a mass of 57.

                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                  Refactorings

                                                                                  Further Reading

                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                  Open

                                                                                                                  case "Money":
                                                                                                                      obj[sKey] = new self.Money(parseFloat($(attr.childNodes[k].childNodes[1]).text()));
                                                                                                                      break;
                                                                                  Severity: Major
                                                                                  Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 1 other location - About 1 hr to fix
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1325..1327

                                                                                  Duplicated Code

                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                  Tuning

                                                                                  This issue has a mass of 55.

                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                  Refactorings

                                                                                  Further Reading

                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                  Open

                                                                                                                  case "OptionSetValue":
                                                                                                                      obj[sKey] = new self.OptionSetValue(parseInt($(attr.childNodes[k].childNodes[1]).text()));
                                                                                                                      break;
                                                                                  Severity: Major
                                                                                  Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 1 other location - About 1 hr to fix
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1352..1354

                                                                                  Duplicated Code

                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                  Tuning

                                                                                  This issue has a mass of 55.

                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                  Refactorings

                                                                                  Further Reading

                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                  Open

                                                                                              toLookupValue: function() {
                                                                                                  return [{
                                                                                                      id: this.getIdValue(),
                                                                                                      name: this.getName(),
                                                                                                      entityType: this.logicalName()
                                                                                  Severity: Minor
                                                                                  Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 1 other location - About 40 mins to fix
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1573..1579

                                                                                  Duplicated Code

                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                  Tuning

                                                                                  This issue has a mass of 48.

                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                  Refactorings

                                                                                  Further Reading

                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                  Open

                                                                                          ctor.prototype.toLookupValue = function() {
                                                                                              return [{
                                                                                                  id: this.getIdValue(),
                                                                                                  name: this.getName(),
                                                                                                  entityType: this.getLogicalName()
                                                                                  Severity: Minor
                                                                                  Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 1 other location - About 40 mins to fix
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1132..1138

                                                                                  Duplicated Code

                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                  Tuning

                                                                                  This issue has a mass of 48.

                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                  Refactorings

                                                                                  Further Reading

                                                                                  Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                  Open

                                                                                                                      } else if (entCv.type === "dateTime") {
                                                                                                                          entCv.value = stringToDate($(attr.childNodes[k].childNodes[1]).text());
                                                                                                                      } else if (entCv.type === "boolean") {
                                                                                                                          entCv.value = ($(attr.childNodes[k].childNodes[1]).text() === "false") ? false : true;
                                                                                                                      } else if (entCv.type === "AliasedValue") {
                                                                                  Severity: Minor
                                                                                  Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 2 other locations - About 35 mins to fix
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1361..1382
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1363..1382

                                                                                  Duplicated Code

                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                  Tuning

                                                                                  This issue has a mass of 46.

                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                  Refactorings

                                                                                  Further Reading

                                                                                  Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                  Open

                                                                                                                      } else if (entCv.type === "decimal" || entCv.type === "double") {
                                                                                                                          entCv.value = parseFloat($(attr.childNodes[k].childNodes[1]).text());
                                                                                                                      } else if (entCv.type === "dateTime") {
                                                                                                                          entCv.value = stringToDate($(attr.childNodes[k].childNodes[1]).text());
                                                                                                                      } else if (entCv.type === "boolean") {
                                                                                  Severity: Minor
                                                                                  Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 2 other locations - About 35 mins to fix
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1361..1382
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1365..1382

                                                                                  Duplicated Code

                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                  Tuning

                                                                                  This issue has a mass of 46.

                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                  Refactorings

                                                                                  Further Reading

                                                                                  Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                  Open

                                                                                                                      if (entCv.type === "int") {
                                                                                                                          entCv.value = parseInt($(attr.childNodes[k].childNodes[1]).text());
                                                                                                                      } else if (entCv.type === "decimal" || entCv.type === "double") {
                                                                                                                          entCv.value = parseFloat($(attr.childNodes[k].childNodes[1]).text());
                                                                                                                      } else if (entCv.type === "dateTime") {
                                                                                  Severity: Minor
                                                                                  Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 2 other locations - About 35 mins to fix
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1363..1382
                                                                                  src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1365..1382

                                                                                  Duplicated Code

                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                  Tuning

                                                                                  This issue has a mass of 46.

                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                  Refactorings

                                                                                  Further Reading

                                                                                  There are no issues that match your filters.

                                                                                  Category
                                                                                  Status