CaffGeek/MBACNationals

View on GitHub
Web.Admin/AdminApp/Controllers/controller.scoreentry.js

Summary

Maintainability
F
6 days
Test Coverage

Function scoreEntryController has 172 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    var scoreEntryController = function ($scope, $http, $q, $location, modalFactory, dataService) {
        var url = $location.absUrl();
        var lastSlash = url.lastIndexOf('/');
        var year = url.slice(lastSlash + 1) || new Date().getFullYear();

Severity: Major
Found in Web.Admin/AdminApp/Controllers/controller.scoreentry.js - About 6 hrs to fix

    Function Page has 82 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            $scope.Page = function (page, data) {
                switch (page) {
                    case 'Game': {
                        dataService.LoadSchedule(year, data.Division).
                            success(function (divisionSchedule) {
    Severity: Major
    Found in Web.Admin/AdminApp/Controllers/controller.scoreentry.js - About 3 hrs to fix

      Function updateScoreInfo has 44 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              function updateScoreInfo(position) {
                  var homeBowler = ($.grep($scope.model.Home.Bowlers, function (o) { return o.Position == position; }) || [])[0];
                  var awayBowler = ($.grep($scope.model.Away.Bowlers, function (o) { return o.Position == position; }) || [])[0];
      
                  if ($scope.model.IsTeam) {
      Severity: Minor
      Found in Web.Admin/AdminApp/Controllers/controller.scoreentry.js - About 1 hr to fix

        Function scoreEntryController has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            var scoreEntryController = function ($scope, $http, $q, $location, modalFactory, dataService) {
        Severity: Minor
        Found in Web.Admin/AdminApp/Controllers/controller.scoreentry.js - About 45 mins to fix

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

                                  for (var i = 0; i < $scope.model.Away.Bowlers.length; i++) {
                                      var awayBowlerResult = $.grep(match.Away.Bowlers, function (x) { return x.Id == $scope.model.Away.Bowlers[i].Id });
                                      if (awayBowlerResult.length) {
                                          $scope.model.Away.Bowlers[i].Score = awayBowlerResult[0].Score;
                                          $scope.model.Away.Bowlers[i].Position = awayBowlerResult[0].Position;
          Severity: Major
          Found in Web.Admin/AdminApp/Controllers/controller.scoreentry.js and 1 other location - About 7 hrs to fix
          Web.Admin/AdminApp/Controllers/controller.scoreentry.js on lines 76..82

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

          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

                                  for (var i = 0; i < $scope.model.Home.Bowlers.length; i++) {
                                      var homeBowlerResult = $.grep(match.Home.Bowlers, function (x) { return x.Id == $scope.model.Home.Bowlers[i].Id });
                                      if (homeBowlerResult.length) {
                                          $scope.model.Home.Bowlers[i].Score = homeBowlerResult[0].Score;
                                          $scope.model.Home.Bowlers[i].Position = homeBowlerResult[0].Position;
          Severity: Major
          Found in Web.Admin/AdminApp/Controllers/controller.scoreentry.js and 1 other location - About 7 hrs to fix
          Web.Admin/AdminApp/Controllers/controller.scoreentry.js on lines 68..74

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 181.

          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

                          if (($scope.model.IsPOA && $scope.model.Home.POA > $scope.model.Away.POA)
                              || ($scope.model.IsScratch && $scope.model.Home.Score > $scope.model.Away.Score)) {
                              $scope.model.Home.Point = 3;
                              $scope.model.Away.Point = 0;
                          }
          Severity: Major
          Found in Web.Admin/AdminApp/Controllers/controller.scoreentry.js and 1 other location - About 2 hrs to fix
          Web.Admin/AdminApp/Controllers/controller.scoreentry.js on lines 191..199

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

          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

                          else if (($scope.model.IsPOA && $scope.model.Home.POA < $scope.model.Away.POA)
                              || ($scope.model.IsScratch && $scope.model.Home.Score < $scope.model.Away.Score)) {
                              $scope.model.Home.Point = 0;
                              $scope.model.Away.Point = 3;
                          }
          Severity: Major
          Found in Web.Admin/AdminApp/Controllers/controller.scoreentry.js and 1 other location - About 2 hrs to fix
          Web.Admin/AdminApp/Controllers/controller.scoreentry.js on lines 186..199

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

          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

                      isValid = isValid && !$.grep($scope.model.Home.Bowlers, function (o) { return o.Score < 0 || o.Score > 450; }).length;
          Severity: Major
          Found in Web.Admin/AdminApp/Controllers/controller.scoreentry.js and 1 other location - About 1 hr to fix
          Web.Admin/AdminApp/Controllers/controller.scoreentry.js on lines 133..133

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 67.

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

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

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

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

          Refactorings

          Further Reading

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

                      isValid = isValid && !$.grep($scope.model.Away.Bowlers, function (o) { return o.Score < 0 || o.Score > 450; }).length;
          Severity: Major
          Found in Web.Admin/AdminApp/Controllers/controller.scoreentry.js and 1 other location - About 1 hr to fix
          Web.Admin/AdminApp/Controllers/controller.scoreentry.js on lines 134..134

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 67.

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

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

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

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

          Refactorings

          Further Reading

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

                      if ($scope.model.IsTeam) {
                          $scope.model.Home.POA += homeBowler.POA;
                          $scope.model.Away.POA += awayBowler.POA;
                      }
          Severity: Major
          Found in Web.Admin/AdminApp/Controllers/controller.scoreentry.js and 1 other location - About 1 hr to fix
          Web.Admin/AdminApp/Controllers/controller.scoreentry.js on lines 154..157

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

          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

                      if ($scope.model.IsTeam) {
                          $scope.model.Home.Score += homeBowler.Score;
                          $scope.model.Away.Score += awayBowler.Score;
                      }
          Severity: Major
          Found in Web.Admin/AdminApp/Controllers/controller.scoreentry.js and 1 other location - About 1 hr to fix
          Web.Admin/AdminApp/Controllers/controller.scoreentry.js on lines 162..165

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 61.

          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

                          isValid = isValid && !!$.grep($scope.model.Away.Bowlers, function (o) { return o.Position == i; }).length;
          Severity: Major
          Found in Web.Admin/AdminApp/Controllers/controller.scoreentry.js and 1 other location - About 1 hr to fix
          Web.Admin/AdminApp/Controllers/controller.scoreentry.js on lines 140..140

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 57.

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

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

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

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

          Refactorings

          Further Reading

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

                          isValid = isValid && !!$.grep($scope.model.Home.Bowlers, function (o) { return o.Position == i; }).length;
          Severity: Major
          Found in Web.Admin/AdminApp/Controllers/controller.scoreentry.js and 1 other location - About 1 hr to fix
          Web.Admin/AdminApp/Controllers/controller.scoreentry.js on lines 139..139

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 57.

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

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

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

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

          Refactorings

          Further Reading

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

                      else if (($scope.model.IsPOA && homeBowler.POA < awayBowler.POA)
                          || ($scope.model.IsScratch && homeBowler.Score < awayBowler.Score)) {
                          homeBowler.Point = 0;
                          awayBowler.Point = 1;
                      }
          Severity: Minor
          Found in Web.Admin/AdminApp/Controllers/controller.scoreentry.js and 1 other location - About 55 mins to fix
          Web.Admin/AdminApp/Controllers/controller.scoreentry.js on lines 167..180

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

          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

                      var awayBowler = ($.grep($scope.model.Away.Bowlers, function (o) { return o.Position == position; }) || [])[0];
          Severity: Minor
          Found in Web.Admin/AdminApp/Controllers/controller.scoreentry.js and 1 other location - About 55 mins to fix
          Web.Admin/AdminApp/Controllers/controller.scoreentry.js on lines 151..151

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

          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

                      if (($scope.model.IsPOA && homeBowler.POA > awayBowler.POA)
                          || ($scope.model.IsScratch && homeBowler.Score > awayBowler.Score)) {
                          homeBowler.Point = 1;
                          awayBowler.Point = 0;
                      }
          Severity: Minor
          Found in Web.Admin/AdminApp/Controllers/controller.scoreentry.js and 1 other location - About 55 mins to fix
          Web.Admin/AdminApp/Controllers/controller.scoreentry.js on lines 172..180

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

          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

                      var homeBowler = ($.grep($scope.model.Home.Bowlers, function (o) { return o.Position == position; }) || [])[0];
          Severity: Minor
          Found in Web.Admin/AdminApp/Controllers/controller.scoreentry.js and 1 other location - About 55 mins to fix
          Web.Admin/AdminApp/Controllers/controller.scoreentry.js on lines 152..152

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

          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.model.Home.Score = $scope.model.Home.POA = $scope.model.Home.TotalPoints = 0;
          Severity: Minor
          Found in Web.Admin/AdminApp/Controllers/controller.scoreentry.js and 1 other location - About 50 mins to fix
          Web.Admin/AdminApp/Controllers/controller.scoreentry.js on lines 89..89

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

                              $scope.model.Away.Score = $scope.model.Away.POA = $scope.model.Away.TotalPoints = 0;
          Severity: Minor
          Found in Web.Admin/AdminApp/Controllers/controller.scoreentry.js and 1 other location - About 50 mins to fix
          Web.Admin/AdminApp/Controllers/controller.scoreentry.js on lines 90..90

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 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 2 locations. Consider refactoring.
          Open

                                  if ($scope.model.Away.Bowlers.length == 1) $scope.model.Away.Bowlers[0].Position = 1;
          Severity: Minor
          Found in Web.Admin/AdminApp/Controllers/controller.scoreentry.js and 1 other location - About 50 mins to fix
          Web.Admin/AdminApp/Controllers/controller.scoreentry.js on lines 63..63

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

                                  if ($scope.model.Home.Bowlers.length == 1) $scope.model.Home.Bowlers[0].Position = 1;
          Severity: Minor
          Found in Web.Admin/AdminApp/Controllers/controller.scoreentry.js and 1 other location - About 50 mins to fix
          Web.Admin/AdminApp/Controllers/controller.scoreentry.js on lines 62..62

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

                      isValid = isValid && $scope.model.Home.Bowlers && !!$scope.model.Home.Bowlers.length;
          Severity: Minor
          Found in Web.Admin/AdminApp/Controllers/controller.scoreentry.js and 1 other location - About 35 mins to fix
          Web.Admin/AdminApp/Controllers/controller.scoreentry.js on lines 128..128

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

          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

                      isValid = isValid && $scope.model.Away.Bowlers && !!$scope.model.Away.Bowlers.length;
          Severity: Minor
          Found in Web.Admin/AdminApp/Controllers/controller.scoreentry.js and 1 other location - About 35 mins to fix
          Web.Admin/AdminApp/Controllers/controller.scoreentry.js on lines 129..129

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

          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