ciudadanointeligente/partidopublico

View on GitHub
app/assets/javascripts/angular/angular_app.js

Summary

Maintainability
F
3 wks
Test Coverage

File angular_app.js has 737 lines of code (exceeds 250 allowed). Consider refactoring.
Open

function scroll_to_top() {
    $('html, body').animate({
        scrollTop: $('#container').offset().top
    }, 500);
}
Severity: Major
Found in app/assets/javascripts/angular/angular_app.js - About 1 day to fix

    Function cargosController has 157 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function cargosController($scope,$http,$location,$aside,$attrs){
      $scope.cargos = [];
      $scope.personas = [];
      $scope.partido_id = $location.path().split("/")[2];
      $scope.pageSize = 5;
    Severity: Major
    Found in app/assets/javascripts/angular/angular_app.js - About 6 hrs to fix

      Function sedesController has 99 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function sedesController($scope,$http,$location,$aside,$attrs){
        $scope.sedes = [];
        $scope.partido_id = $location.path().split("/")[2];
        $scope.pageSize = 5;
      
      
      Severity: Major
      Found in app/assets/javascripts/angular/angular_app.js - About 3 hrs to fix

        Function personasController has 80 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function personasController($scope,$http,$location,$aside,$attrs){
          $scope.persona = {};
          $scope.personas = [];
          $scope.partido_id = $location.path().split("/")[2];
          $scope.pageSize = 5;
        Severity: Major
        Found in app/assets/javascripts/angular/angular_app.js - About 3 hrs to fix

          Function tipoCargosController has 77 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function tipoCargosController($scope,$http,$location,$aside,$attrs){
            $scope.tipo_cargos = [];
            $scope.partido_id = $location.path().split("/")[2];
          
            function getTipoCargosByPartido(partido_id) {
          Severity: Major
          Found in app/assets/javascripts/angular/angular_app.js - About 3 hrs to fix

            Function actividad_publicasController has 70 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function actividad_publicasController($scope,$http,$location,$aside,$attrs){
              $scope.actividad_publicas = [];
              $scope.partido_id = $location.path().split("/")[2];
            
              var save_or_update_actividad_publica = function() {
            Severity: Major
            Found in app/assets/javascripts/angular/angular_app.js - About 2 hrs to fix

              Function tipoCargosController has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
              Open

              function tipoCargosController($scope,$http,$location,$aside,$attrs){
                $scope.tipo_cargos = [];
                $scope.partido_id = $location.path().split("/")[2];
              
                function getTipoCargosByPartido(partido_id) {
              Severity: Minor
              Found in app/assets/javascripts/angular/angular_app.js - About 45 mins to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Function sedesController has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
              Open

              function sedesController($scope,$http,$location,$aside,$attrs){
                $scope.sedes = [];
                $scope.partido_id = $location.path().split("/")[2];
                $scope.pageSize = 5;
              
              
              Severity: Minor
              Found in app/assets/javascripts/angular/angular_app.js - About 45 mins to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Function cargosController has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
              Open

              function cargosController($scope,$http,$location,$aside,$attrs){
                $scope.cargos = [];
                $scope.personas = [];
                $scope.partido_id = $location.path().split("/")[2];
                $scope.pageSize = 5;
              Severity: Minor
              Found in app/assets/javascripts/angular/angular_app.js - About 45 mins to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

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

              function personasController($scope,$http,$location,$aside,$attrs){
              Severity: Minor
              Found in app/assets/javascripts/angular/angular_app.js - About 35 mins to fix

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

                function finanzas2Controller($scope,$http,$location,$aside,$attrs){
                Severity: Minor
                Found in app/assets/javascripts/angular/angular_app.js - About 35 mins to fix

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

                  function finanzas3Controller($scope,$http,$location,$aside,$attrs){
                  Severity: Minor
                  Found in app/assets/javascripts/angular/angular_app.js - About 35 mins to fix

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

                    function actividad_publicasController($scope,$http,$location,$aside,$attrs){
                    Severity: Minor
                    Found in app/assets/javascripts/angular/angular_app.js - About 35 mins to fix

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

                      function finanzas1Controller($scope,$http,$location,$aside,$attrs){
                      Severity: Minor
                      Found in app/assets/javascripts/angular/angular_app.js - About 35 mins to fix

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

                        function afiliacionsController($scope,$http,$location,$aside,$attrs){
                        Severity: Minor
                        Found in app/assets/javascripts/angular/angular_app.js - About 35 mins to fix

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

                          function cargosController($scope,$http,$location,$aside,$attrs){
                          Severity: Minor
                          Found in app/assets/javascripts/angular/angular_app.js - About 35 mins to fix

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

                            function finanzas7Controller($scope,$http,$location,$aside,$attrs){
                            Severity: Minor
                            Found in app/assets/javascripts/angular/angular_app.js - About 35 mins to fix

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

                              function finanzas6Controller($scope,$http,$location,$aside,$attrs){
                              Severity: Minor
                              Found in app/assets/javascripts/angular/angular_app.js - About 35 mins to fix

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

                                function finanzas4Controller($scope,$http,$location,$aside,$attrs){
                                Severity: Minor
                                Found in app/assets/javascripts/angular/angular_app.js - About 35 mins to fix

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

                                  function tipoCargosController($scope,$http,$location,$aside,$attrs){
                                  Severity: Minor
                                  Found in app/assets/javascripts/angular/angular_app.js - About 35 mins to fix

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

                                    function sedesController($scope,$http,$location,$aside,$attrs){
                                    Severity: Minor
                                    Found in app/assets/javascripts/angular/angular_app.js - About 35 mins to fix

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

                                      function finanzas5Controller($scope,$http,$location,$aside,$attrs){
                                      Severity: Minor
                                      Found in app/assets/javascripts/angular/angular_app.js - About 35 mins to fix

                                        Function personasController has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                        Open

                                        function personasController($scope,$http,$location,$aside,$attrs){
                                          $scope.persona = {};
                                          $scope.personas = [];
                                          $scope.partido_id = $location.path().split("/")[2];
                                          $scope.pageSize = 5;
                                        Severity: Minor
                                        Found in app/assets/javascripts/angular/angular_app.js - About 35 mins to fix

                                        Cognitive Complexity

                                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                        A method's cognitive complexity is based on a few simple rules:

                                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                        • Code is considered more complex for each "break in the linear flow of the code"
                                        • Code is considered more complex when "flow breaking structures are nested"

                                        Further reading

                                        Function actividad_publicasController has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                        Open

                                        function actividad_publicasController($scope,$http,$location,$aside,$attrs){
                                          $scope.actividad_publicas = [];
                                          $scope.partido_id = $location.path().split("/")[2];
                                        
                                          var save_or_update_actividad_publica = function() {
                                        Severity: Minor
                                        Found in app/assets/javascripts/angular/angular_app.js - About 25 mins to fix

                                        Cognitive Complexity

                                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                        A method's cognitive complexity is based on a few simple rules:

                                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                        • Code is considered more complex for each "break in the linear flow of the code"
                                        • Code is considered more complex when "flow breaking structures are nested"

                                        Further reading

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

                                        function finanzas7Controller($scope,$http,$location,$aside,$attrs){
                                        
                                          $scope.partido_id = $location.path().split("/")[2];
                                        
                                          function getDatosGastosCampanaAgregadosByPartido(partido_id) {
                                        Severity: Major
                                        Found in app/assets/javascripts/angular/angular_app.js and 6 other locations - About 1 day to fix
                                        app/assets/javascripts/angular/angular_app.js on lines 607..637
                                        app/assets/javascripts/angular/angular_app.js on lines 642..672
                                        app/assets/javascripts/angular/angular_app.js on lines 677..707
                                        app/assets/javascripts/angular/angular_app.js on lines 712..742
                                        app/assets/javascripts/angular/angular_app.js on lines 747..777
                                        app/assets/javascripts/angular/angular_app.js on lines 782..812

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

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

                                        function finanzas6Controller($scope,$http,$location,$aside,$attrs){
                                        
                                          $scope.partido_id = $location.path().split("/")[2];
                                        
                                          function getDatosIngresosCampanaAgregadosByPartido(partido_id) {
                                        Severity: Major
                                        Found in app/assets/javascripts/angular/angular_app.js and 6 other locations - About 1 day to fix
                                        app/assets/javascripts/angular/angular_app.js on lines 607..637
                                        app/assets/javascripts/angular/angular_app.js on lines 642..672
                                        app/assets/javascripts/angular/angular_app.js on lines 677..707
                                        app/assets/javascripts/angular/angular_app.js on lines 712..742
                                        app/assets/javascripts/angular/angular_app.js on lines 747..777
                                        app/assets/javascripts/angular/angular_app.js on lines 817..847

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

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

                                        function finanzas3Controller($scope,$http,$location,$aside,$attrs){
                                        
                                          $scope.partido_id = $location.path().split("/")[2];
                                        
                                          function getDatosBalanceAnualAgregadosByPartido(partido_id) {
                                        Severity: Major
                                        Found in app/assets/javascripts/angular/angular_app.js and 6 other locations - About 1 day to fix
                                        app/assets/javascripts/angular/angular_app.js on lines 607..637
                                        app/assets/javascripts/angular/angular_app.js on lines 642..672
                                        app/assets/javascripts/angular/angular_app.js on lines 712..742
                                        app/assets/javascripts/angular/angular_app.js on lines 747..777
                                        app/assets/javascripts/angular/angular_app.js on lines 782..812
                                        app/assets/javascripts/angular/angular_app.js on lines 817..847

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

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

                                        function finanzas2Controller($scope,$http,$location,$aside,$attrs){
                                        
                                          $scope.partido_id = $location.path().split("/")[2];
                                        
                                          function getDatosEgresosOrdinariosAgregadosByPartido(partido_id) {
                                        Severity: Major
                                        Found in app/assets/javascripts/angular/angular_app.js and 6 other locations - About 1 day to fix
                                        app/assets/javascripts/angular/angular_app.js on lines 607..637
                                        app/assets/javascripts/angular/angular_app.js on lines 677..707
                                        app/assets/javascripts/angular/angular_app.js on lines 712..742
                                        app/assets/javascripts/angular/angular_app.js on lines 747..777
                                        app/assets/javascripts/angular/angular_app.js on lines 782..812
                                        app/assets/javascripts/angular/angular_app.js on lines 817..847

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

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

                                        function finanzas4Controller($scope,$http,$location,$aside,$attrs){
                                        
                                          $scope.partido_id = $location.path().split("/")[2];
                                        
                                          function getDatosContratacioneAgregadosByPartido(partido_id) {
                                        Severity: Major
                                        Found in app/assets/javascripts/angular/angular_app.js and 6 other locations - About 1 day to fix
                                        app/assets/javascripts/angular/angular_app.js on lines 607..637
                                        app/assets/javascripts/angular/angular_app.js on lines 642..672
                                        app/assets/javascripts/angular/angular_app.js on lines 677..707
                                        app/assets/javascripts/angular/angular_app.js on lines 747..777
                                        app/assets/javascripts/angular/angular_app.js on lines 782..812
                                        app/assets/javascripts/angular/angular_app.js on lines 817..847

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

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

                                        function finanzas5Controller($scope,$http,$location,$aside,$attrs){
                                        
                                          $scope.partido_id = $location.path().split("/")[2];
                                        
                                          function getDatosTransferenciasAgregadosByPartido(partido_id) {
                                        Severity: Major
                                        Found in app/assets/javascripts/angular/angular_app.js and 6 other locations - About 1 day to fix
                                        app/assets/javascripts/angular/angular_app.js on lines 607..637
                                        app/assets/javascripts/angular/angular_app.js on lines 642..672
                                        app/assets/javascripts/angular/angular_app.js on lines 677..707
                                        app/assets/javascripts/angular/angular_app.js on lines 712..742
                                        app/assets/javascripts/angular/angular_app.js on lines 782..812
                                        app/assets/javascripts/angular/angular_app.js on lines 817..847

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

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

                                        function finanzas1Controller($scope,$http,$location,$aside,$attrs){
                                        
                                          $scope.partido_id = $location.path().split("/")[2];
                                        
                                          function getDatosIngresosOrdinariosAgregadosByPartido(partido_id) {
                                        Severity: Major
                                        Found in app/assets/javascripts/angular/angular_app.js and 6 other locations - About 1 day to fix
                                        app/assets/javascripts/angular/angular_app.js on lines 642..672
                                        app/assets/javascripts/angular/angular_app.js on lines 677..707
                                        app/assets/javascripts/angular/angular_app.js on lines 712..742
                                        app/assets/javascripts/angular/angular_app.js on lines 747..777
                                        app/assets/javascripts/angular/angular_app.js on lines 782..812
                                        app/assets/javascripts/angular/angular_app.js on lines 817..847

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

                                        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

                                          var save_or_update_cargo = function() {
                                            if($scope.cargo.id) {
                                              $http.put('/cargos/'+$scope.cargo.id, $scope.cargo)
                                                .success(function(data){
                                                  getCargosByPartido($scope.partido_id);
                                        Severity: Major
                                        Found in app/assets/javascripts/angular/angular_app.js and 2 other locations - About 1 day to fix
                                        app/assets/javascripts/angular/angular_app.js on lines 291..312
                                        app/assets/javascripts/angular/angular_app.js on lines 404..425

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

                                        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

                                          var save_or_update_actividad_publica = function() {
                                            if($scope.actividad_publica.id) {
                                              $http.put('/actividad_publicas/'+$scope.actividad_publica.id, $scope.actividad_publica)
                                                .success(function(data){
                                                  getActividadesPublicassByPartido($scope.partido_id);
                                        Severity: Major
                                        Found in app/assets/javascripts/angular/angular_app.js and 2 other locations - About 1 day to fix
                                        app/assets/javascripts/angular/angular_app.js on lines 119..140
                                        app/assets/javascripts/angular/angular_app.js on lines 291..312

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

                                        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

                                          var save_or_update_sede = function() {
                                            if($scope.sede.id) {
                                              $http.put('/sedes/'+$scope.sede.id, $scope.sede)
                                                .success(function(data){
                                                  getSedesByPartido($scope.partido_id);
                                        Severity: Major
                                        Found in app/assets/javascripts/angular/angular_app.js and 2 other locations - About 1 day to fix
                                        app/assets/javascripts/angular/angular_app.js on lines 119..140
                                        app/assets/javascripts/angular/angular_app.js on lines 404..425

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

                                        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.getCargoModal = function(cargo_id){
                                            if(cargo_id) {
                                              getCargoInfo(cargo_id);
                                        
                                            } else {
                                        Severity: Major
                                        Found in app/assets/javascripts/angular/angular_app.js and 2 other locations - About 7 hrs to fix
                                        app/assets/javascripts/angular/angular_app.js on lines 447..473
                                        app/assets/javascripts/angular/angular_app.js on lines 564..590

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

                                        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.getActividadPublicaModal = function(actividad_publica_id){
                                            if(actividad_publica_id) {
                                              getActividadPublicaInfo(actividad_publica_id);
                                            } else {
                                              $scope.actividad_publica = {
                                        Severity: Major
                                        Found in app/assets/javascripts/angular/angular_app.js and 2 other locations - About 7 hrs to fix
                                        app/assets/javascripts/angular/angular_app.js on lines 239..266
                                        app/assets/javascripts/angular/angular_app.js on lines 564..590

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

                                        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.getTipoCargoModal = function(tipo_cargo_id){
                                            if(tipo_cargo_id) {
                                              getTipoCargoInfo(tipo_cargo_id);
                                            } else {
                                              $scope.tipo_cargo = {
                                        Severity: Major
                                        Found in app/assets/javascripts/angular/angular_app.js and 2 other locations - About 7 hrs to fix
                                        app/assets/javascripts/angular/angular_app.js on lines 239..266
                                        app/assets/javascripts/angular/angular_app.js on lines 447..473

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

                                        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.getComunas = function(partido_id, region_id) {
                                            $http.get('partidos/'+partido_id+'/regions/'+region_id+'/comunas')
                                              .success( function(data){
                                                $scope.comunas = data;
                                              })
                                        Severity: Major
                                        Found in app/assets/javascripts/angular/angular_app.js and 1 other location - About 3 hrs to fix
                                        app/assets/javascripts/angular/angular_app.js on lines 324..332

                                        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

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

                                          $scope.getComunas = function(partido_id, region_id) {
                                            $http.get('partidos/'+partido_id+'/regions/'+region_id+'/comunas')
                                              .success( function(data){
                                                $scope.comunas = data;
                                              })
                                        Severity: Major
                                        Found in app/assets/javascripts/angular/angular_app.js and 1 other location - About 3 hrs to fix
                                        app/assets/javascripts/angular/angular_app.js on lines 152..160

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

                                          $scope.removeSede = function (sede) {
                                            if (confirm('Seguro desea eliminar esta Sede?')) {
                                              $http.delete('/partidos/' + $scope.partido_id + '/sedes/' + sede.id);
                                              $scope.sedes.splice($scope.sedes.indexOf(sede), 1);
                                            }
                                        Severity: Major
                                        Found in app/assets/javascripts/angular/angular_app.js and 3 other locations - About 2 hrs to fix
                                        app/assets/javascripts/angular/angular_app.js on lines 95..100
                                        app/assets/javascripts/angular/angular_app.js on lines 268..273
                                        app/assets/javascripts/angular/angular_app.js on lines 592..597

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

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

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

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

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

                                        Refactorings

                                        Further Reading

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

                                          $scope.removeTipoCargo = function (tipo_cargo) {
                                            if (confirm('Seguro desea eliminar este tipo de cargo?')) {
                                              $http.delete('/partidos/' + $scope.partido_id + '/tipo_cargos/' + tipo_cargo.id);
                                              $scope.tipo_cargos.splice($scope.tipo_cargos.indexOf(tipo_cargo), 1);
                                            }
                                        Severity: Major
                                        Found in app/assets/javascripts/angular/angular_app.js and 3 other locations - About 2 hrs to fix
                                        app/assets/javascripts/angular/angular_app.js on lines 95..100
                                        app/assets/javascripts/angular/angular_app.js on lines 268..273
                                        app/assets/javascripts/angular/angular_app.js on lines 385..390

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

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

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

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

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

                                        Refactorings

                                        Further Reading

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

                                          $scope.removeCargo = function(cargo) {
                                            if (confirm('Seguro desea eliminar este Cargo?')) {
                                              $http.delete('/partidos/' + $scope.partido_id + '/cargos/' + cargo.id);
                                              $scope.cargos.splice($scope.cargos.indexOf(cargo), 1);
                                            }
                                        Severity: Major
                                        Found in app/assets/javascripts/angular/angular_app.js and 3 other locations - About 2 hrs to fix
                                        app/assets/javascripts/angular/angular_app.js on lines 95..100
                                        app/assets/javascripts/angular/angular_app.js on lines 385..390
                                        app/assets/javascripts/angular/angular_app.js on lines 592..597

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

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

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

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

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

                                        Refactorings

                                        Further Reading

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

                                          $scope.removePersona = function (persona) {
                                            if (confirm('Seguro desea eliminar esta Persona?')) {
                                              $http.delete('/partidos/' + $scope.partido_id + '/personas/' + persona.id);
                                              $scope.personas.splice($scope.personas.indexOf(persona), 1);
                                            }
                                        Severity: Major
                                        Found in app/assets/javascripts/angular/angular_app.js and 3 other locations - About 2 hrs to fix
                                        app/assets/javascripts/angular/angular_app.js on lines 268..273
                                        app/assets/javascripts/angular/angular_app.js on lines 385..390
                                        app/assets/javascripts/angular/angular_app.js on lines 592..597

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

                                        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

                                          function getCircunscripciones() {
                                            $http.get('circunscripcions')
                                              .success( function(data){
                                                $scope.circunscripcions = data;
                                              })
                                        Severity: Major
                                        Found in app/assets/javascripts/angular/angular_app.js and 2 other locations - About 2 hrs to fix
                                        app/assets/javascripts/angular/angular_app.js on lines 142..150
                                        app/assets/javascripts/angular/angular_app.js on lines 314..322

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

                                          function getRegions() {
                                            $http.get('all_regions')
                                              .success( function(data){
                                                $scope.regions = data;
                                              })
                                        Severity: Major
                                        Found in app/assets/javascripts/angular/angular_app.js and 2 other locations - About 2 hrs to fix
                                        app/assets/javascripts/angular/angular_app.js on lines 142..150
                                        app/assets/javascripts/angular/angular_app.js on lines 162..170

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

                                          function getRegions() {
                                            $http.get('all_regions')
                                              .success( function(data){
                                                $scope.regions = data;
                                              })
                                        Severity: Major
                                        Found in app/assets/javascripts/angular/angular_app.js and 2 other locations - About 2 hrs to fix
                                        app/assets/javascripts/angular/angular_app.js on lines 162..170
                                        app/assets/javascripts/angular/angular_app.js on lines 314..322

                                        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

                                        function scroll_to_top() {
                                            $('html, body').animate({
                                                scrollTop: $('#container').offset().top
                                            }, 500);
                                        }
                                        Severity: Minor
                                        Found in app/assets/javascripts/angular/angular_app.js and 1 other location - About 30 mins to fix
                                        app/assets/javascripts/angular/angular_frontend.js on lines 1..5

                                        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