bq/corbel-js

View on GitHub

Showing 172 of 172 total issues

File request.js has 316 lines of code (exceeds 250 allowed). Consider refactoring.
Open

//@exclude
'use strict';
//@endexclude

(function () {
Severity: Minor
Found in src/request.js - About 3 hrs to fix

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

            remove: function() {
                console.log('iamInterface.scope.remove', this.id);
                corbel.validate.value('id', this.id);
                return this.request({
                    url: this._buildUriWithDomain(this.uri + '/' + this.id),
    Severity: Major
    Found in src/iam/scopeBuilder.js and 2 other locations - About 3 hrs to fix
    src/iam/clientBuilder.js on lines 142..150
    src/iam/scopeBuilder.js on lines 67..74

    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 106.

    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

        remove: function() {
          console.log('iamInterface.client.remove', this.clientId);
          corbel.validate.value('clientId', this.clientId);
    
          return this.request({
    Severity: Major
    Found in src/iam/clientBuilder.js and 2 other locations - About 3 hrs to fix
    src/iam/scopeBuilder.js on lines 67..74
    src/iam/scopeBuilder.js on lines 83..90

    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 106.

    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

            get: function() {
                console.log('iamInterface.scope.get', this.id);
                corbel.validate.value('id', this.id);
                return this.request({
                    url: this._buildUriWithDomain(this.uri + '/' + this.id),
    Severity: Major
    Found in src/iam/scopeBuilder.js and 2 other locations - About 3 hrs to fix
    src/iam/clientBuilder.js on lines 142..150
    src/iam/scopeBuilder.js on lines 83..90

    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 106.

    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 8 locations. Consider refactoring.
    Open

        create: function (product) {
          console.log('ecInterface.product.create', product);
    
          return this.request({
            url: this._buildUri(this.uri),
    Severity: Major
    Found in src/ec/productBuilder.js and 7 other locations - About 3 hrs to fix
    src/borrow/borrowBuilder.js on lines 42..51
    src/borrow/lenderBuilder.js on lines 39..48
    src/iam/clientBuilder.js on lines 55..64
    src/iam/domainBuilder.js on lines 48..57
    src/iam/usersBuilder.js on lines 467..476
    src/notifications/notificationsDomainBuilder.js on lines 27..37
    src/notifications/notificationsTemplateBuilder.js on lines 30..40

    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 105.

    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 8 locations. Consider refactoring.
    Open

            add: function(loanableResource) {
                console.log('borrowInterface.resource.add', loanableResource);
                return this.request({
                    url: this._buildUri(this.uri),
                    method: corbel.request.method.POST,
    Severity: Major
    Found in src/borrow/borrowBuilder.js and 7 other locations - About 3 hrs to fix
    src/borrow/lenderBuilder.js on lines 39..48
    src/ec/productBuilder.js on lines 61..71
    src/iam/clientBuilder.js on lines 55..64
    src/iam/domainBuilder.js on lines 48..57
    src/iam/usersBuilder.js on lines 467..476
    src/notifications/notificationsDomainBuilder.js on lines 27..37
    src/notifications/notificationsTemplateBuilder.js on lines 30..40

    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 105.

    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 8 locations. Consider refactoring.
    Open

            create: function(data) {
                console.log('iamInterface.users.create', data);
                return this.request({
                    url: this._buildUriWithDomain(this.uri),
                    method: corbel.request.method.POST,
    Severity: Major
    Found in src/iam/usersBuilder.js and 7 other locations - About 3 hrs to fix
    src/borrow/borrowBuilder.js on lines 42..51
    src/borrow/lenderBuilder.js on lines 39..48
    src/ec/productBuilder.js on lines 61..71
    src/iam/clientBuilder.js on lines 55..64
    src/iam/domainBuilder.js on lines 48..57
    src/notifications/notificationsDomainBuilder.js on lines 27..37
    src/notifications/notificationsTemplateBuilder.js on lines 30..40

    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 105.

    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 8 locations. Consider refactoring.
    Open

            create: function(domain) {
                console.log('notificationsInterface.domain.create', domain);
                return this.request({
                    url: this.buildUri(this.uri),
                    method: corbel.request.method.POST,
    Severity: Major
    Found in src/notifications/notificationsDomainBuilder.js and 7 other locations - About 3 hrs to fix
    src/borrow/borrowBuilder.js on lines 42..51
    src/borrow/lenderBuilder.js on lines 39..48
    src/ec/productBuilder.js on lines 61..71
    src/iam/clientBuilder.js on lines 55..64
    src/iam/domainBuilder.js on lines 48..57
    src/iam/usersBuilder.js on lines 467..476
    src/notifications/notificationsTemplateBuilder.js on lines 30..40

    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 105.

    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 8 locations. Consider refactoring.
    Open

        create: function(client) {
          console.log('iamInterface.client.create', client);
          return this.request({
            url: this._buildUriWithDomain(this.uri),
            method: corbel.request.method.POST,
    Severity: Major
    Found in src/iam/clientBuilder.js and 7 other locations - About 3 hrs to fix
    src/borrow/borrowBuilder.js on lines 42..51
    src/borrow/lenderBuilder.js on lines 39..48
    src/ec/productBuilder.js on lines 61..71
    src/iam/domainBuilder.js on lines 48..57
    src/iam/usersBuilder.js on lines 467..476
    src/notifications/notificationsDomainBuilder.js on lines 27..37
    src/notifications/notificationsTemplateBuilder.js on lines 30..40

    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 105.

    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 8 locations. Consider refactoring.
    Open

            create: function(notification) {
                console.log('notificationsInterface.template.create', notification);
                return this.request({
                    url: this.buildUri(this.uri),
                    method: corbel.request.method.POST,
    Severity: Major
    Found in src/notifications/notificationsTemplateBuilder.js and 7 other locations - About 3 hrs to fix
    src/borrow/borrowBuilder.js on lines 42..51
    src/borrow/lenderBuilder.js on lines 39..48
    src/ec/productBuilder.js on lines 61..71
    src/iam/clientBuilder.js on lines 55..64
    src/iam/domainBuilder.js on lines 48..57
    src/iam/usersBuilder.js on lines 467..476
    src/notifications/notificationsDomainBuilder.js on lines 27..37

    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 105.

    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 8 locations. Consider refactoring.
    Open

            create: function(lender) {
                console.log('borrowInterface.lender.create', lender);
                return this.request({
                    url: this._buildUri(this.uri),
                    method: corbel.request.method.POST,
    Severity: Major
    Found in src/borrow/lenderBuilder.js and 7 other locations - About 3 hrs to fix
    src/borrow/borrowBuilder.js on lines 42..51
    src/ec/productBuilder.js on lines 61..71
    src/iam/clientBuilder.js on lines 55..64
    src/iam/domainBuilder.js on lines 48..57
    src/iam/usersBuilder.js on lines 467..476
    src/notifications/notificationsDomainBuilder.js on lines 27..37
    src/notifications/notificationsTemplateBuilder.js on lines 30..40

    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 105.

    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 8 locations. Consider refactoring.
    Open

        create: function(domain) {
          console.log('iamInterface.domain.create', domain);
          return this.request({
            url: this._buildUriWithDomain(this.uri),
            method: corbel.request.method.POST,
    Severity: Major
    Found in src/iam/domainBuilder.js and 7 other locations - About 3 hrs to fix
    src/borrow/borrowBuilder.js on lines 42..51
    src/borrow/lenderBuilder.js on lines 39..48
    src/ec/productBuilder.js on lines 61..71
    src/iam/clientBuilder.js on lines 55..64
    src/iam/usersBuilder.js on lines 467..476
    src/notifications/notificationsDomainBuilder.js on lines 27..37
    src/notifications/notificationsTemplateBuilder.js on lines 30..40

    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 105.

    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

    File usersBuilder.js has 306 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    //@exclude
    // jshint unused: false
    'use strict';
    //@endexclude
    
    
    Severity: Minor
    Found in src/iam/usersBuilder.js - About 3 hrs to fix

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

          updatePrice: function(params){
            console.log('ecInterface.paymentplan.updatePrice');
      
            corbel.validate.value('id', this.id);
            return this.request({
      Severity: Major
      Found in src/ec/paymentPlanBuilder.js and 1 other location - About 3 hrs to fix
      src/ec/orderBuilder.js on lines 107..116

      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 101.

      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

          prepare: function (couponIds) {
            console.log('ecInterface.order.prepare');
      
            corbel.validate.value('id', this.id);
            return this.request({
      Severity: Major
      Found in src/ec/orderBuilder.js and 1 other location - About 3 hrs to fix
      src/ec/paymentPlanBuilder.js on lines 96..105

      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 101.

      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 (product) {
            console.log('ecInterface.product.update');
      
            corbel.validate.value('id', this.id);
            return this.request({
      Severity: Major
      Found in src/ec/productBuilder.js and 1 other location - About 3 hrs to fix
      src/ec/orderBuilder.js on lines 72..81

      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 100.

      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 (order) {
            console.log('ecInterface.order.update');
      
            corbel.validate.value('id', this.id);
            return this.request({
      Severity: Major
      Found in src/ec/orderBuilder.js and 1 other location - About 3 hrs to fix
      src/ec/productBuilder.js on lines 156..165

      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 100.

      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

          _buildUri: function(path, id) {
            var uri = '';
            var urlBase =  this.driver.config.getCurrentEndpoint(corbel.Assets.moduleName, this._buildPort(this.driver.config));
      
            uri = urlBase + path;
      Severity: Major
      Found in src/assets/assets-builder.js and 2 other locations - About 3 hrs to fix
      src/evci/eventBuilder.js on lines 45..54
      src/scheduler/schedulerBuilder.js on lines 56..65

      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 99.

      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

              _buildUri: function(path, id) {
                  var uri = '';
                  var urlBase =  this.driver.config.getCurrentEndpoint(corbel.Scheduler.moduleName, this._buildPort(this.driver.config));
      
                  uri = urlBase + path;
      Severity: Major
      Found in src/scheduler/schedulerBuilder.js and 2 other locations - About 3 hrs to fix
      src/assets/assets-builder.js on lines 125..134
      src/evci/eventBuilder.js on lines 45..54

      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 99.

      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

              delete: function() {
                  console.log('iamInterface.group.delete');
                  corbel.validate.value('id', this.id);
                  return this.request({
                      url: this._buildUriWithDomain(this.uri, this.id),
      Severity: Major
      Found in src/iam/groupsBuilder.js and 1 other location - About 3 hrs to fix
      src/iam/groupsBuilder.js on lines 107..115

      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 99.

      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

      Severity
      Category
      Status
      Source
      Language