luyadev/luya-module-admin

View on GitHub
src/resources/js/formdirectives.js

Summary

Maintainability
F
3 wks
Test Coverage

File formdirectives.js has 2127 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/** ZAA ANGULAR FORM INPUT DIRECTIVES */


/**
 * @ngdoc directive
Severity: Major
Found in src/resources/js/formdirectives.js - About 5 days to fix

    Function controller has 75 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            controller: ['$scope', '$filter', function ($scope, $filter) {
    
                $scope.isNumeric = function (num) {
                    return !isNaN(num)
                }
    Severity: Major
    Found in src/resources/js/formdirectives.js - About 3 hrs to fix

      Function controller has 71 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              controller: ['$scope', '$timeout', '$rootScope', function ($scope, $timeout, $rootScope) {
      
                  $scope.isOpen = 0;
                  $scope.isDefault = 1;
      
      
      Severity: Major
      Found in src/resources/js/formdirectives.js - About 2 hrs to fix

        Function controller has 67 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                controller: ['$scope', function ($scope) {
        
                    if ($scope.model === undefined) {
                        $scope.model = [{ 0: '' }];
                    }
        Severity: Major
        Found in src/resources/js/formdirectives.js - About 2 hrs to fix

          Function controller has 58 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  controller: ['$scope', '$filter', function ($scope, $filter) {
          
                      $scope.searchString;
          
                      $scope.sourceData = [];
          Severity: Major
          Found in src/resources/js/formdirectives.js - About 2 hrs to fix

            Function controller has 56 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    controller: ['$scope', '$filter', function ($scope, $filter) {
            
                        $scope.$watch(function () {
                            return $scope.model
                        }, function (n, o) {
            Severity: Major
            Found in src/resources/js/formdirectives.js - About 2 hrs to fix

              Function controller has 46 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      controller: ['$scope', '$element', '$timeout', function ($scope, $element, $timeout) {
              
                          $scope.init = function () {
                              if ($scope.model === undefined || $scope.model === null) {
                                  $scope.model = [];
              Severity: Minor
              Found in src/resources/js/formdirectives.js - About 1 hr to fix

                Function controller has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        controller: ['$scope', '$timeout', function ($scope, $timeout) {
                            $scope.init = function () {
                                if ($scope.model === undefined || $scope.model === null) {
                                    $scope.model = [];
                                } else {
                Severity: Minor
                Found in src/resources/js/formdirectives.js - About 1 hr to fix

                  Function controller has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          controller: ['$scope', '$filter', function ($scope, $filter) {
                  
                              if ($scope.model === undefined) {
                                  $scope.model = [];
                              }
                  Severity: Minor
                  Found in src/resources/js/formdirectives.js - About 1 hr to fix

                    Function template has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            template: function () {
                                return '' +
                                    '<div class="form-group form-side-by-side" ng-class="{\'input--hide-label\': i18n}">' +
                                    '<div class="form-side form-side-label">' +
                                    '<label ng-if="label">{{label}}</label>' +
                    Severity: Minor
                    Found in src/resources/js/formdirectives.js - About 1 hr to fix

                      Function controller has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              controller: ['$scope', function ($scope) {
                                  if ($scope.model === undefined) {
                                      $scope.model = [];
                                  }
                      
                      
                      Severity: Minor
                      Found in src/resources/js/formdirectives.js - About 1 hr to fix

                        Function controller has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                controller: ['$scope', function ($scope) {
                        
                                    if ($scope.model === undefined || !$scope.model) {
                                        if ($scope.initvalue) {
                                            $scope.model = $scope.initvalue
                        Severity: Minor
                        Found in src/resources/js/formdirectives.js - About 1 hr to fix

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

                                  template: function () {
                                      return '' +
                                          '<div class="form-group form-side-by-side" ng-class="{\'input--hide-label\': i18n}">' +
                                          '<div class="form-side form-side-label">' +
                                          '<label for="{{id}}">{{label}}</label>' +
                          Severity: Minor
                          Found in src/resources/js/formdirectives.js - About 1 hr to fix

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

                                    template: function () {
                                        return '' +
                                            '<div class="form-group form-side-by-side" ng-class="{\'input--hide-label\': i18n}">' +
                                            '<div class="form-side form-side-label">' +
                                            '<label>{{label}}</label>' +
                            Severity: Minor
                            Found in src/resources/js/formdirectives.js - About 1 hr to fix

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

                                      template: function () {
                                          return '' +
                                              '<div class="form-group form-side-by-side" ng-class="{\'input--hide-label\': i18n}">' +
                                              '<div class="form-side form-side-label">' +
                                              '<label>{{label}}</label>' +
                              Severity: Minor
                              Found in src/resources/js/formdirectives.js - About 1 hr to fix

                                Function template has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        template: function () {
                                            return '' +
                                                '<div class="form-group form-side-by-side" ng-class="{\'input--hide-label\': i18n}">' +
                                                '<div class="form-side form-side-label">' +
                                                '<label>{{label}}</label>' +
                                Severity: Minor
                                Found in src/resources/js/formdirectives.js - About 1 hr to fix

                                  Function template has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          template: function () {
                                              return '' +
                                                  '<div class="form-group form-side-by-side zaa-datetime" ng-class="{\'input--hide-label\': i18n, \'input--with-time\': model!=null && date!=null}">' +
                                                  '<div class="form-side form-side-label">' +
                                                  '<label>{{label}}</label>' +
                                  Severity: Minor
                                  Found in src/resources/js/formdirectives.js - About 1 hr to fix

                                    Function controller has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                            controller: ['$scope', '$timeout', function ($scope, $timeout) {
                                    
                                                $scope.init = function () {
                                                    if ($scope.truevalue === undefined || $scope.truevalue === "") {
                                                        $scope.truevalue = 1;
                                    Severity: Minor
                                    Found in src/resources/js/formdirectives.js - About 1 hr to fix

                                      Function controller has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                              controller: ['$scope', '$element', '$timeout', function ($scope, $element, $timeout) {
                                      
                                                  if ($scope.model === undefined) {
                                                      $scope.model = [];
                                                  }
                                      Severity: Minor
                                      Found in src/resources/js/formdirectives.js - About 1 hr to fix

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

                                                controller: ['$scope', '$http', function ($scope, $http) {
                                                    $scope.tags = [];
                                        
                                                    $http.get('admin/api-admin-common/tags').then(function (response) {
                                                        angular.forEach(response.data, function (value) {
                                        Severity: Minor
                                        Found in src/resources/js/formdirectives.js - About 1 hr to fix

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

                                                      $scope.moveRight = function (index) {
                                                          index = parseInt(index);
                                                          for (var i in $scope.model) {
                                                              var oldValue = $scope.model[i][index];
                                                              $scope.model[i][index] = $scope.model[i][index + 1];
                                          Severity: Major
                                          Found in src/resources/js/formdirectives.js and 1 other location - About 4 hrs to fix
                                          src/resources/js/formdirectives.js on lines 2483..2490

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

                                          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

                                                      $scope.moveLeft = function (index) {
                                                          index = parseInt(index);
                                                          for (var i in $scope.model) {
                                                              var oldValue = $scope.model[i][index];
                                                              $scope.model[i][index] = $scope.model[i][index - 1];
                                          Severity: Major
                                          Found in src/resources/js/formdirectives.js and 1 other location - About 4 hrs to fix
                                          src/resources/js/formdirectives.js on lines 2492..2499

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

                                          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

                                                      return '' +
                                                          '<div class="form-group form-side-by-side zaa-datetime" ng-class="{\'input--hide-label\': i18n, \'input--with-time\': model!=null && date!=null}">' +
                                                          '<div class="form-side form-side-label">' +
                                                          '<label>{{label}}</label>' +
                                                          '</div>' +
                                          Severity: Major
                                          Found in src/resources/js/formdirectives.js and 1 other location - About 4 hrs to fix
                                          src/resources/js/formdirectives.js on lines 2529..2559

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

                                          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

                                                      return '' +
                                                          '<div class="form-group form-side-by-side" ng-class="{\'input--hide-label\': i18n}">' +
                                                          '<div class="form-side form-side-label">' +
                                                          '<label ng-if="label">{{label}}</label>' +
                                                          '<label ng-if="!label">Table</label>' +
                                          Severity: Major
                                          Found in src/resources/js/formdirectives.js and 1 other location - About 4 hrs to fix
                                          src/resources/js/formdirectives.js on lines 2291..2321

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

                                          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

                                          zaa.directive("zaaText", function () {
                                              return {
                                                  restrict: "E",
                                                  scope: {
                                                      "model": "=",
                                          Severity: Major
                                          Found in src/resources/js/formdirectives.js and 1 other location - About 4 hrs to fix
                                          src/resources/js/formdirectives.js on lines 440..464

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

                                          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

                                          zaa.directive("zaaSlug", function () {
                                              return {
                                                  restrict: "E",
                                                  scope: {
                                                      "model": "=",
                                          Severity: Major
                                          Found in src/resources/js/formdirectives.js and 1 other location - About 4 hrs to fix
                                          src/resources/js/formdirectives.js on lines 940..964

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

                                          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

                                          zaa.directive("zaaTextarea", function () {
                                              return {
                                                  restrict: "E",
                                                  scope: {
                                                      "model": "=",
                                          Severity: Major
                                          Found in src/resources/js/formdirectives.js and 1 other location - About 3 hrs to fix
                                          src/resources/js/formdirectives.js on lines 642..665

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

                                          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

                                          zaa.directive("zaaWysiwyg", function () {
                                              return {
                                                  restrict: "E",
                                                  scope: {
                                                      "model": "=",
                                          Severity: Major
                                          Found in src/resources/js/formdirectives.js and 1 other location - About 3 hrs to fix
                                          src/resources/js/formdirectives.js on lines 1242..1266

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

                                          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

                                          zaa.directive("zaaImageUpload", function () {
                                              return {
                                                  restrict: "E",
                                                  scope: {
                                                      "model": "=",
                                          Severity: Major
                                          Found in src/resources/js/formdirectives.js and 1 other location - About 3 hrs to fix
                                          src/resources/js/formdirectives.js on lines 2581..2603

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

                                          zaa.directive("zaaFileUpload", function () {
                                              return {
                                                  restrict: "E",
                                                  scope: {
                                                      "model": "=",
                                          Severity: Major
                                          Found in src/resources/js/formdirectives.js and 1 other location - About 3 hrs to fix
                                          src/resources/js/formdirectives.js on lines 2613..2635

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

                                                      return '' +
                                                          '<div class="form-group form-side-by-side" ng-class="{\'input--hide-label\': i18n}">' +
                                                              '<div class="form-side form-side-label">' +
                                                                  '<label>{{label}}</label>' +
                                                              '</div>' +
                                          Severity: Major
                                          Found in src/resources/js/formdirectives.js and 1 other location - About 3 hrs to fix
                                          src/resources/js/formdirectives.js on lines 3084..3105

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

                                          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

                                                      return '' +
                                                          '<div class="form-group form-side-by-side" ng-class="{\'input--hide-label\': i18n}">' +
                                                          '<div class="form-side form-side-label">' +
                                                          '<label>{{label}}</label>' +
                                                          '</div>' +
                                          Severity: Major
                                          Found in src/resources/js/formdirectives.js and 1 other location - About 3 hrs to fix
                                          src/resources/js/formdirectives.js on lines 2913..2934

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

                                          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

                                                      $scope.add = function () {
                                                          if ($scope.model === null || $scope.model === '' || $scope.model === undefined) {
                                                              $scope.model = [];
                                                          }
                                                          $scope.model.push({ fileId: 0, caption: '' });
                                          Severity: Major
                                          Found in src/resources/js/formdirectives.js and 1 other location - About 2 hrs to fix
                                          src/resources/js/formdirectives.js on lines 2667..2672

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

                                          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

                                                      $scope.add = function () {
                                                          if ($scope.model === null || $scope.model === '' || $scope.model === undefined) {
                                                              $scope.model = [];
                                                          }
                                                          $scope.model.push({ imageId: 0, caption: '' });
                                          Severity: Major
                                          Found in src/resources/js/formdirectives.js and 1 other location - About 2 hrs to fix
                                          src/resources/js/formdirectives.js on lines 2769..2774

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

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

                                                      $scope.moveDown = function (index) {
                                                          index = parseInt(index);
                                                          var oldRow = $scope.model[index];
                                                          $scope.model[index] = $scope.model[index + 1];
                                                          $scope.model[index + 1] = oldRow;
                                          Severity: Major
                                          Found in src/resources/js/formdirectives.js and 11 other locations - About 2 hrs to fix
                                          src/resources/js/formdirectives.js on lines 182..187
                                          src/resources/js/formdirectives.js on lines 2501..2506
                                          src/resources/js/formdirectives.js on lines 2508..2513
                                          src/resources/js/formdirectives.js on lines 2678..2683
                                          src/resources/js/formdirectives.js on lines 2685..2690
                                          src/resources/js/formdirectives.js on lines 2780..2785
                                          src/resources/js/formdirectives.js on lines 2787..2792
                                          src/resources/js/formdirectives.js on lines 2882..2887
                                          src/resources/js/formdirectives.js on lines 2889..2894
                                          src/resources/js/formdirectives.js on lines 3061..3066
                                          src/resources/js/formdirectives.js on lines 3068..3073

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

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

                                                      $scope.moveDown = function (index) {
                                                          index = parseInt(index);
                                                          var oldRow = $scope.model[index];
                                                          $scope.model[index] = $scope.model[index + 1];
                                                          $scope.model[index + 1] = oldRow;
                                          Severity: Major
                                          Found in src/resources/js/formdirectives.js and 11 other locations - About 2 hrs to fix
                                          src/resources/js/formdirectives.js on lines 182..187
                                          src/resources/js/formdirectives.js on lines 189..194
                                          src/resources/js/formdirectives.js on lines 2501..2506
                                          src/resources/js/formdirectives.js on lines 2508..2513
                                          src/resources/js/formdirectives.js on lines 2678..2683
                                          src/resources/js/formdirectives.js on lines 2685..2690
                                          src/resources/js/formdirectives.js on lines 2780..2785
                                          src/resources/js/formdirectives.js on lines 2787..2792
                                          src/resources/js/formdirectives.js on lines 2882..2887
                                          src/resources/js/formdirectives.js on lines 3061..3066
                                          src/resources/js/formdirectives.js on lines 3068..3073

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

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

                                                      $scope.moveDown = function (index) {
                                                          index = parseInt(index);
                                                          var oldRow = $scope.model[index];
                                                          $scope.model[index] = $scope.model[index + 1];
                                                          $scope.model[index + 1] = oldRow;
                                          Severity: Major
                                          Found in src/resources/js/formdirectives.js and 11 other locations - About 2 hrs to fix
                                          src/resources/js/formdirectives.js on lines 182..187
                                          src/resources/js/formdirectives.js on lines 189..194
                                          src/resources/js/formdirectives.js on lines 2501..2506
                                          src/resources/js/formdirectives.js on lines 2508..2513
                                          src/resources/js/formdirectives.js on lines 2678..2683
                                          src/resources/js/formdirectives.js on lines 2685..2690
                                          src/resources/js/formdirectives.js on lines 2780..2785
                                          src/resources/js/formdirectives.js on lines 2882..2887
                                          src/resources/js/formdirectives.js on lines 2889..2894
                                          src/resources/js/formdirectives.js on lines 3061..3066
                                          src/resources/js/formdirectives.js on lines 3068..3073

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

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

                                                      $scope.moveDown = function (index) {
                                                          index = parseInt(index);
                                                          var oldRow = $scope.model[index];
                                                          $scope.model[index] = $scope.model[index + 1];
                                                          $scope.model[index + 1] = oldRow;
                                          Severity: Major
                                          Found in src/resources/js/formdirectives.js and 11 other locations - About 2 hrs to fix
                                          src/resources/js/formdirectives.js on lines 182..187
                                          src/resources/js/formdirectives.js on lines 189..194
                                          src/resources/js/formdirectives.js on lines 2501..2506
                                          src/resources/js/formdirectives.js on lines 2508..2513
                                          src/resources/js/formdirectives.js on lines 2678..2683
                                          src/resources/js/formdirectives.js on lines 2685..2690
                                          src/resources/js/formdirectives.js on lines 2780..2785
                                          src/resources/js/formdirectives.js on lines 2787..2792
                                          src/resources/js/formdirectives.js on lines 2882..2887
                                          src/resources/js/formdirectives.js on lines 2889..2894
                                          src/resources/js/formdirectives.js on lines 3061..3066

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

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

                                                      $scope.moveUp = function (index) {
                                                          index = parseInt(index);
                                                          var oldRow = $scope.model[index];
                                                          $scope.model[index] = $scope.model[index - 1];
                                                          $scope.model[index - 1] = oldRow;
                                          Severity: Major
                                          Found in src/resources/js/formdirectives.js and 11 other locations - About 2 hrs to fix
                                          src/resources/js/formdirectives.js on lines 182..187
                                          src/resources/js/formdirectives.js on lines 189..194
                                          src/resources/js/formdirectives.js on lines 2501..2506
                                          src/resources/js/formdirectives.js on lines 2508..2513
                                          src/resources/js/formdirectives.js on lines 2685..2690
                                          src/resources/js/formdirectives.js on lines 2780..2785
                                          src/resources/js/formdirectives.js on lines 2787..2792
                                          src/resources/js/formdirectives.js on lines 2882..2887
                                          src/resources/js/formdirectives.js on lines 2889..2894
                                          src/resources/js/formdirectives.js on lines 3061..3066
                                          src/resources/js/formdirectives.js on lines 3068..3073

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

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

                                                      $scope.moveUp = function (index) {
                                                          index = parseInt(index);
                                                          var oldRow = $scope.model[index];
                                                          $scope.model[index] = $scope.model[index - 1];
                                                          $scope.model[index - 1] = oldRow;
                                          Severity: Major
                                          Found in src/resources/js/formdirectives.js and 11 other locations - About 2 hrs to fix
                                          src/resources/js/formdirectives.js on lines 182..187
                                          src/resources/js/formdirectives.js on lines 189..194
                                          src/resources/js/formdirectives.js on lines 2501..2506
                                          src/resources/js/formdirectives.js on lines 2508..2513
                                          src/resources/js/formdirectives.js on lines 2678..2683
                                          src/resources/js/formdirectives.js on lines 2685..2690
                                          src/resources/js/formdirectives.js on lines 2780..2785
                                          src/resources/js/formdirectives.js on lines 2787..2792
                                          src/resources/js/formdirectives.js on lines 2889..2894
                                          src/resources/js/formdirectives.js on lines 3061..3066
                                          src/resources/js/formdirectives.js on lines 3068..3073

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

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

                                                      $scope.moveUp = function (index) {
                                                          index = parseInt(index);
                                                          var oldRow = $scope.model[index];
                                                          $scope.model[index] = $scope.model[index - 1];
                                                          $scope.model[index - 1] = oldRow;
                                          Severity: Major
                                          Found in src/resources/js/formdirectives.js and 11 other locations - About 2 hrs to fix
                                          src/resources/js/formdirectives.js on lines 182..187
                                          src/resources/js/formdirectives.js on lines 189..194
                                          src/resources/js/formdirectives.js on lines 2501..2506
                                          src/resources/js/formdirectives.js on lines 2508..2513
                                          src/resources/js/formdirectives.js on lines 2678..2683
                                          src/resources/js/formdirectives.js on lines 2685..2690
                                          src/resources/js/formdirectives.js on lines 2780..2785
                                          src/resources/js/formdirectives.js on lines 2787..2792
                                          src/resources/js/formdirectives.js on lines 2882..2887
                                          src/resources/js/formdirectives.js on lines 2889..2894
                                          src/resources/js/formdirectives.js on lines 3068..3073

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

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

                                                      $scope.moveUp = function (index) {
                                                          index = parseInt(index);
                                                          var oldRow = $scope.model[index];
                                                          $scope.model[index] = $scope.model[index - 1];
                                                          $scope.model[index - 1] = oldRow;
                                          Severity: Major
                                          Found in src/resources/js/formdirectives.js and 11 other locations - About 2 hrs to fix
                                          src/resources/js/formdirectives.js on lines 182..187
                                          src/resources/js/formdirectives.js on lines 189..194
                                          src/resources/js/formdirectives.js on lines 2508..2513
                                          src/resources/js/formdirectives.js on lines 2678..2683
                                          src/resources/js/formdirectives.js on lines 2685..2690
                                          src/resources/js/formdirectives.js on lines 2780..2785
                                          src/resources/js/formdirectives.js on lines 2787..2792
                                          src/resources/js/formdirectives.js on lines 2882..2887
                                          src/resources/js/formdirectives.js on lines 2889..2894
                                          src/resources/js/formdirectives.js on lines 3061..3066
                                          src/resources/js/formdirectives.js on lines 3068..3073

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

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

                                                      $scope.moveDown = function (index) {
                                                          index = parseInt(index);
                                                          var oldRow = $scope.model[index];
                                                          $scope.model[index] = $scope.model[index + 1];
                                                          $scope.model[index + 1] = oldRow;
                                          Severity: Major
                                          Found in src/resources/js/formdirectives.js and 11 other locations - About 2 hrs to fix
                                          src/resources/js/formdirectives.js on lines 182..187
                                          src/resources/js/formdirectives.js on lines 189..194
                                          src/resources/js/formdirectives.js on lines 2501..2506
                                          src/resources/js/formdirectives.js on lines 2508..2513
                                          src/resources/js/formdirectives.js on lines 2678..2683
                                          src/resources/js/formdirectives.js on lines 2780..2785
                                          src/resources/js/formdirectives.js on lines 2787..2792
                                          src/resources/js/formdirectives.js on lines 2882..2887
                                          src/resources/js/formdirectives.js on lines 2889..2894
                                          src/resources/js/formdirectives.js on lines 3061..3066
                                          src/resources/js/formdirectives.js on lines 3068..3073

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

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

                                                      $scope.moveUp = function (index) {
                                                          index = parseInt(index);
                                                          var oldRow = $scope.model[index];
                                                          $scope.model[index] = $scope.model[index - 1];
                                                          $scope.model[index - 1] = oldRow;
                                          Severity: Major
                                          Found in src/resources/js/formdirectives.js and 11 other locations - About 2 hrs to fix
                                          src/resources/js/formdirectives.js on lines 182..187
                                          src/resources/js/formdirectives.js on lines 189..194
                                          src/resources/js/formdirectives.js on lines 2501..2506
                                          src/resources/js/formdirectives.js on lines 2508..2513
                                          src/resources/js/formdirectives.js on lines 2678..2683
                                          src/resources/js/formdirectives.js on lines 2685..2690
                                          src/resources/js/formdirectives.js on lines 2787..2792
                                          src/resources/js/formdirectives.js on lines 2882..2887
                                          src/resources/js/formdirectives.js on lines 2889..2894
                                          src/resources/js/formdirectives.js on lines 3061..3066
                                          src/resources/js/formdirectives.js on lines 3068..3073

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

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

                                                      $scope.moveUp = function (index) {
                                                          index = parseInt(index);
                                                          var oldRow = $scope.model[index];
                                                          $scope.model[index] = $scope.model[index - 1];
                                                          $scope.model[index - 1] = oldRow;
                                          Severity: Major
                                          Found in src/resources/js/formdirectives.js and 11 other locations - About 2 hrs to fix
                                          src/resources/js/formdirectives.js on lines 189..194
                                          src/resources/js/formdirectives.js on lines 2501..2506
                                          src/resources/js/formdirectives.js on lines 2508..2513
                                          src/resources/js/formdirectives.js on lines 2678..2683
                                          src/resources/js/formdirectives.js on lines 2685..2690
                                          src/resources/js/formdirectives.js on lines 2780..2785
                                          src/resources/js/formdirectives.js on lines 2787..2792
                                          src/resources/js/formdirectives.js on lines 2882..2887
                                          src/resources/js/formdirectives.js on lines 2889..2894
                                          src/resources/js/formdirectives.js on lines 3061..3066
                                          src/resources/js/formdirectives.js on lines 3068..3073

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

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

                                                      $scope.moveDown = function (index) {
                                                          index = parseInt(index);
                                                          var oldRow = $scope.model[index];
                                                          $scope.model[index] = $scope.model[index + 1];
                                                          $scope.model[index + 1] = oldRow;
                                          Severity: Major
                                          Found in src/resources/js/formdirectives.js and 11 other locations - About 2 hrs to fix
                                          src/resources/js/formdirectives.js on lines 182..187
                                          src/resources/js/formdirectives.js on lines 189..194
                                          src/resources/js/formdirectives.js on lines 2501..2506
                                          src/resources/js/formdirectives.js on lines 2678..2683
                                          src/resources/js/formdirectives.js on lines 2685..2690
                                          src/resources/js/formdirectives.js on lines 2780..2785
                                          src/resources/js/formdirectives.js on lines 2787..2792
                                          src/resources/js/formdirectives.js on lines 2882..2887
                                          src/resources/js/formdirectives.js on lines 2889..2894
                                          src/resources/js/formdirectives.js on lines 3061..3066
                                          src/resources/js/formdirectives.js on lines 3068..3073

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

                                          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

                                                      $timeout(function () {
                                                          if ($scope.optionsvalue === undefined || $scope.optionsvalue === "") {
                                                              $scope.optionsvalue = 'value';
                                                          }
                                          
                                          
                                          Severity: Major
                                          Found in src/resources/js/formdirectives.js and 1 other location - About 2 hrs to fix
                                          src/resources/js/formdirectives.js on lines 1385..1393

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

                                          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

                                                  controller: ['$scope', '$timeout', function ($scope, $timeout) {
                                                      if ($scope.autocomplete === undefined || $scope.autocomplete === '') {
                                                          $scope.autocomplete = 'on';
                                                      }
                                          
                                          
                                          Severity: Major
                                          Found in src/resources/js/formdirectives.js and 1 other location - About 2 hrs to fix
                                          src/resources/js/formdirectives.js on lines 1441..1449

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

                                          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 ($scope.id === undefined || $scope.id === null || $scope.id === '') {
                                                              $scope.id = Math.random().toString(36).substring(7);
                                                          }
                                          Severity: Major
                                          Found in src/resources/js/formdirectives.js and 1 other location - About 1 hr to fix
                                          src/resources/js/formdirectives.js on lines 1977..1979

                                          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

                                                          if ($scope.id === undefined || $scope.id === null || $scope.id === '') {
                                                              $scope.id = Math.random().toString(36).substring(7);
                                                          }
                                          Severity: Major
                                          Found in src/resources/js/formdirectives.js and 1 other location - About 1 hr to fix
                                          src/resources/js/formdirectives.js on lines 1508..1510

                                          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

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

                                          zaa.directive('stringToInteger', function () {
                                              return {
                                                  require: 'ngModel',
                                                  link: function (scope, element, attrs, ngModel) {
                                                      ngModel.$formatters.push(function (value) {
                                          Severity: Major
                                          Found in src/resources/js/formdirectives.js and 1 other location - About 1 hr to fix
                                          src/resources/js/formdirectives.js on lines 697..706

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

                                          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

                                          zaa.directive('stringToFloat', function () {
                                              return {
                                                  require: 'ngModel',
                                                  link: function (scope, element, attrs, ngModel) {
                                                      ngModel.$formatters.push(function (value) {
                                          Severity: Major
                                          Found in src/resources/js/formdirectives.js and 1 other location - About 1 hr to fix
                                          src/resources/js/formdirectives.js on lines 677..686

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

                                          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

                                                      $scope.$watch(function () {
                                                          return $scope.date
                                                      }, function (n, o) {
                                                          if (n !== o && n !== undefined && n !== null) {
                                                              $scope.refactor(n);
                                          Severity: Major
                                          Found in src/resources/js/formdirectives.js and 1 other location - About 1 hr to fix
                                          src/resources/js/formdirectives.js on lines 2372..2378

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

                                          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

                                                      $scope.$watch(function () {
                                                          return $scope.date
                                                      }, function (n, o) {
                                                          if (n !== o && n !== undefined && n !== null) {
                                                              $scope.refactor(n);
                                          Severity: Major
                                          Found in src/resources/js/formdirectives.js and 1 other location - About 1 hr to fix
                                          src/resources/js/formdirectives.js on lines 2248..2254

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

                                          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

                                                                          angular.forEach(response.data, function (value) {
                                                                              if (value) {
                                                                                  $scope.value = $scope.value + value + " ";
                                                                              }
                                                                          });
                                          Severity: Minor
                                          Found in src/resources/js/formdirectives.js and 1 other location - About 50 mins to fix
                                          src/resources/js/formdirectives.js on lines 1207..1211

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

                                          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

                                                                      angular.forEach(response.data, function (value) {
                                                                          if (value) {
                                                                              $scope.value = $scope.value + value + " ";
                                                                          }
                                                                      });
                                          Severity: Minor
                                          Found in src/resources/js/formdirectives.js and 1 other location - About 50 mins to fix
                                          src/resources/js/formdirectives.js on lines 1161..1165

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

                                          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

                                                  scope: {
                                                      "model": "=",
                                                      "api": "@",
                                                      "optionsvalue": "@",
                                                      "optionslabel": "@",
                                          Severity: Major
                                          Found in src/resources/js/formdirectives.js and 2 other locations - About 50 mins to fix
                                          src/resources/js/directives.js on lines 182..192
                                          src/resources/js/formdirectives.js on lines 1429..1439

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

                                          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

                                                  scope: {
                                                      "model": "=",
                                                      "options": "=",
                                                      "optionsvalue": "@",
                                                      "optionslabel": "@",
                                          Severity: Major
                                          Found in src/resources/js/formdirectives.js and 2 other locations - About 50 mins to fix
                                          src/resources/js/directives.js on lines 182..192
                                          src/resources/js/formdirectives.js on lines 1782..1792

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

                                          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

                                                  template: function () {
                                                      return '' +
                                                          '<div class="form-group form-side-by-side" ng-class="{\'input--hide-label\': i18n}">' +
                                                          '<div class="form-side form-side-label">' +
                                                          '<label for="{{id}}">{{label}}</label>' +
                                          Severity: Major
                                          Found in src/resources/js/formdirectives.js and 2 other locations - About 40 mins to fix
                                          src/resources/js/formdirectives.js on lines 1851..1862
                                          src/resources/js/formdirectives.js on lines 2052..2063

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

                                          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

                                                  template: function () {
                                                      return '' +
                                                          '<div class="form-group form-side-by-side" ng-class="{\'input--hide-label\': i18n}">' +
                                                          '<div class="form-side form-side-label">' +
                                                          '<label for="{{id}}">{{label}}</label>' +
                                          Severity: Major
                                          Found in src/resources/js/formdirectives.js and 2 other locations - About 40 mins to fix
                                          src/resources/js/formdirectives.js on lines 1112..1123
                                          src/resources/js/formdirectives.js on lines 2052..2063

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

                                          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

                                                  template: function () {
                                                      return '' +
                                                          '<div class="form-group form-side-by-side" ng-class="{\'input--hide-label\': i18n}">' +
                                                          '<div class="form-side form-side-label">' +
                                                          '<label for="{{id}}">{{label}}</label>' +
                                          Severity: Major
                                          Found in src/resources/js/formdirectives.js and 2 other locations - About 40 mins to fix
                                          src/resources/js/formdirectives.js on lines 1112..1123
                                          src/resources/js/formdirectives.js on lines 1851..1862

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

                                          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

                                                      $scope.$watch('model', function (n, o) {
                                                          if (n !== o) {
                                                              $scope.model = $filter('slugify')(n);
                                                          }
                                                      });
                                          Severity: Minor
                                          Found in src/resources/js/formdirectives.js and 1 other location - About 40 mins to fix
                                          src/resources/js/formdirectives.js on lines 497..501

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

                                          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

                                                          angular.forEach($scope.model, function (value, key) {
                                                              if (value.value == item.value) {
                                                                  match = true;
                                                              }
                                                          });
                                          Severity: Minor
                                          Found in src/resources/js/formdirectives.js and 1 other location - About 40 mins to fix
                                          src/resources/js/formdirectives.js on lines 167..171

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

                                          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

                                                          angular.forEach($scope.model, function (value, key) {
                                                              if (value.value == option.value) {
                                                                  match = true;
                                                              }
                                                          });
                                          Severity: Minor
                                          Found in src/resources/js/formdirectives.js and 1 other location - About 40 mins to fix
                                          src/resources/js/formdirectives.js on lines 199..203

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

                                          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

                                                      $scope.$watch('provider', function (n, o) {
                                                          if (n !== undefined) {
                                                              $scope.model = $filter('slugify')(n);
                                                          }
                                                      });
                                          Severity: Minor
                                          Found in src/resources/js/formdirectives.js and 1 other location - About 40 mins to fix
                                          src/resources/js/formdirectives.js on lines 503..507

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

                                          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

                                                      $scope.showDownButton = function (index) {
                                                          return (parseInt(index) < Object.keys($scope.model).length - 1);
                                          
                                                      };
                                          Severity: Major
                                          Found in src/resources/js/formdirectives.js and 4 other locations - About 40 mins to fix
                                          src/resources/js/formdirectives.js on lines 2523..2526
                                          src/resources/js/formdirectives.js on lines 2692..2695
                                          src/resources/js/formdirectives.js on lines 2896..2898
                                          src/resources/js/formdirectives.js on lines 3075..3078

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

                                                      $scope.showDownButton = function (index) {
                                                          return parseInt(index) < Object.keys($scope.model).length - 1;
                                                      };
                                          Severity: Major
                                          Found in src/resources/js/formdirectives.js and 4 other locations - About 40 mins to fix
                                          src/resources/js/formdirectives.js on lines 2523..2526
                                          src/resources/js/formdirectives.js on lines 2692..2695
                                          src/resources/js/formdirectives.js on lines 2794..2797
                                          src/resources/js/formdirectives.js on lines 3075..3078

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

                                                      $scope.showDownButton = function (index) {
                                                          return (parseInt(index) < Object.keys($scope.model).length - 1);
                                          
                                                      }
                                          Severity: Major
                                          Found in src/resources/js/formdirectives.js and 4 other locations - About 40 mins to fix
                                          src/resources/js/formdirectives.js on lines 2692..2695
                                          src/resources/js/formdirectives.js on lines 2794..2797
                                          src/resources/js/formdirectives.js on lines 2896..2898
                                          src/resources/js/formdirectives.js on lines 3075..3078

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

                                                      $scope.showDownButton = function (index) {
                                                          return (parseInt(index) < Object.keys($scope.model).length - 1);
                                          
                                                      };
                                          Severity: Major
                                          Found in src/resources/js/formdirectives.js and 4 other locations - About 40 mins to fix
                                          src/resources/js/formdirectives.js on lines 2523..2526
                                          src/resources/js/formdirectives.js on lines 2794..2797
                                          src/resources/js/formdirectives.js on lines 2896..2898
                                          src/resources/js/formdirectives.js on lines 3075..3078

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

                                                      $scope.showDownButton = function (index) {
                                                          return (parseInt(index) < Object.keys($scope.model).length - 1);
                                          
                                                      }
                                          Severity: Major
                                          Found in src/resources/js/formdirectives.js and 4 other locations - About 40 mins to fix
                                          src/resources/js/formdirectives.js on lines 2523..2526
                                          src/resources/js/formdirectives.js on lines 2692..2695
                                          src/resources/js/formdirectives.js on lines 2794..2797
                                          src/resources/js/formdirectives.js on lines 2896..2898

                                          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

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

                                                                  $http.get($scope.api + "/" + n + "?fields=" + $scope.fields.join()).then(function (response) {
                                                                      $scope.value;
                                                                      angular.forEach(response.data, function (value) {
                                                                          if (value) {
                                                                              $scope.value = $scope.value + value + " ";
                                          Severity: Minor
                                          Found in src/resources/js/formdirectives.js and 1 other location - About 30 mins to fix
                                          src/resources/js/formdirectives.js on lines 1159..1166

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

                                          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

                                                                  $http.get($scope.api + "/" + n + "?fields=" + $scope.fields.join())
                                                                      .then(function (response) {
                                                                          angular.forEach(response.data, function (value) {
                                                                              if (value) {
                                                                                  $scope.value = $scope.value + value + " ";
                                          Severity: Minor
                                          Found in src/resources/js/formdirectives.js and 1 other location - About 30 mins to fix
                                          src/resources/js/formdirectives.js on lines 1205..1212

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

                                          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