Cloud-CV/EvalAI

View on GitHub

Showing 1,371 of 1,371 total issues

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

apps/challenges/migrations/0021_remove_challengephase_dataset_split.py on lines 0..13
apps/participants/migrations/0005_remove_participantteam_challenge.py on lines 0..13
apps/participants/migrations/0012_remove_docker_repository_uri_from_team.py on lines 0..18

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

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

apps/challenges/migrations/0021_remove_challengephase_dataset_split.py on lines 0..13
apps/participants/migrations/0003_remove_participant_challenge.py on lines 0..15
apps/participants/migrations/0012_remove_docker_repository_uri_from_team.py on lines 0..18

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

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

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

        vm.updateSubmissionMetaData = function(updateSubmissionMetaDataForm) {
            if (updateSubmissionMetaDataForm) {
                parameters.url = "jobs/challenge/" + vm.challengeId + "/challenge_phase/" + vm.phaseId + "/submission/" + vm.submissionId;
                parameters.method = 'PATCH';
                parameters.data = {
Severity: Minor
Found in frontend/src/js/controllers/challengeCtrl.js - About 1 hr to fix

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

                    onSuccess: function(response) {
                        var data = response.data;
                        var results = data.results;
                        
                        var timezone = moment.tz.guess();
    Severity: Minor
    Found in frontend/src/js/controllers/challengeListCtrl.js - About 1 hr to fix

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

          function ourTeamCtrl(utilities) {
              /* jshint validthis: true */
              var vm = this;
      
              var parameters = {};
      Severity: Minor
      Found in frontend/src/js/controllers/ourteamCtrl.js - About 1 hr to fix

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

                vm.fetchRefreshJWTToken = function () {
                    if (userKey) {
                        var parameters = {};
                        parameters.url = 'accounts/user/get_auth_token';
                        parameters.method = 'GET';
        Severity: Minor
        Found in frontend/src/js/controllers/challengeCtrl.js - About 1 hr to fix

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

            private fetchParticipantTeams(id) {
              const API_PATH = this.endpointsService.challengeParticipantTeamsURL(id);
              const SELF = this;
              this.apiService.getUrl(API_PATH).subscribe(
                (data) => {
          Severity: Minor
          Found in frontend_v2/src/app/services/challenge.service.ts - About 1 hr to fix

            Function poller has 30 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                            vm.poller = $interval(function() {
                                parameters.url = "jobs/challenge/" + vm.challengeId + "/challenge_phase/" + vm.phaseId + "/submission/?page=" + Math.ceil(vm.currentPage);
                                parameters.method = 'GET';
                                parameters.data = {};
                                parameters.callback = {
            Severity: Minor
            Found in frontend/src/js/controllers/challengeCtrl.js - About 1 hr to fix

              Function inviteOthers has 30 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      vm.inviteOthers = function(ev, participantTeamId) {
                          ev.stopPropagation();
                          // Appending dialog to document.body to cover sidenav in docs app
                          var confirm = $mdDialog.prompt()
                              .title('Add other members to this Team')
              Severity: Minor
              Found in frontend/src/js/controllers/teamsCtrl.js - About 1 hr to fix

                Function passwordStrength has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        this.passwordStrength = function(password){
                
                           //Regular Expressions.  
                            var regex = new Array();
                            regex.push("[A-Z]","[a-z]","[0-9]","[$$!%*#?&]");
                Severity: Minor
                Found in frontend/src/js/services/services.js - About 1 hr to fix

                  Function load has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                                      vm.load = function(url) {
                                          // loader for existing teams
                                          vm.isExistLoader = true;
                                          vm.loaderTitle = '';
                                          vm.loaderContainer = angular.element('.exist-team-card');
                  Severity: Minor
                  Found in frontend/src/js/controllers/challengeCtrl.js - About 1 hr to fix

                    Function passwordStrength has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      passwordStrength(password) {
                        // Regular Expressions.
                        const REGEX = new Array();
                        REGEX.push('[A-Z]', '[a-z]', '[0-9]', '[$$!%*#?&]');
                    
                    
                    Severity: Minor
                    Found in frontend_v2/src/app/services/auth.service.ts - About 1 hr to fix

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

                        {
                          path: 'teams',
                          component: PubliclistsComponent,
                          children: [
                            { path: '', redirectTo: 'participants', pathMatch: 'full' },
                      frontend_v2/src/app/components/publiclists/publiclist-routing.module.ts on lines 25..33
                      frontend_v2/src/app/components/publiclists/publiclists.component.spec.ts on lines 27..35

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

                      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

                        {
                          path: '',
                          component: PubliclistsComponent,
                          children: [
                            { path: '', redirectTo: 'participants', pathMatch: 'full' },
                      frontend_v2/src/app/components/publiclists/publiclists.component.spec.ts on lines 18..26
                      frontend_v2/src/app/components/publiclists/publiclists.component.spec.ts on lines 27..35

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

                      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

                        {
                          path: 'challenges',
                          component: PubliclistsComponent,
                          children: [
                            { path: '', redirectTo: 'all', pathMatch: 'full' },
                      frontend_v2/src/app/components/publiclists/publiclist-routing.module.ts on lines 25..33
                      frontend_v2/src/app/components/publiclists/publiclists.component.spec.ts on lines 18..26

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

                      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

                          if not challenge.remote_evaluation:
                              response_data = {
                                  "error": "Challenge {} is not remote. Resuming is only supported for remote challenges.".format(challenge.title)
                              }
                              return Response(response_data, status=status.HTTP_406_NOT_ACCEPTABLE)
                      Severity: Major
                      Found in apps/jobs/views.py and 3 other locations - About 1 hr to fix
                      apps/jobs/views.py on lines 1907..1911
                      apps/jobs/views.py on lines 1966..1970
                      apps/jobs/views.py on lines 1978..1982

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

                      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

                          if not challenge.is_active:
                              response_data = {
                                  "error": "Challenge {} is not active".format(challenge.title)
                              }
                              return Response(response_data, status=status.HTTP_406_NOT_ACCEPTABLE)
                      Severity: Major
                      Found in apps/jobs/views.py and 3 other locations - About 1 hr to fix
                      apps/jobs/views.py on lines 1966..1970
                      apps/jobs/views.py on lines 1972..1976
                      apps/jobs/views.py on lines 1978..1982

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

                      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

                          if not challenge.is_active:
                              response_data = {
                                  "error": "Challenge {} is not active".format(challenge.title)
                              }
                              return Response(response_data, status=status.HTTP_406_NOT_ACCEPTABLE)
                      Severity: Major
                      Found in apps/jobs/views.py and 3 other locations - About 1 hr to fix
                      apps/jobs/views.py on lines 1907..1911
                      apps/jobs/views.py on lines 1972..1976
                      apps/jobs/views.py on lines 1978..1982

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

                      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

                          if not challenge.allow_resuming_submissions:
                              response_data = {
                                  "error": "Challenge {} does not allow resuming submissions.".format(challenge.title)
                              }
                              return Response(response_data, status=status.HTTP_406_NOT_ACCEPTABLE)
                      Severity: Major
                      Found in apps/jobs/views.py and 3 other locations - About 1 hr to fix
                      apps/jobs/views.py on lines 1907..1911
                      apps/jobs/views.py on lines 1966..1970
                      apps/jobs/views.py on lines 1972..1976

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

                      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 (
                                      self.challenge_phase.max_submissions_per_month
                                      - submissions_done_in_month_count
                                      == 0
                                  ):
                      Severity: Major
                      Found in apps/jobs/models.py and 1 other location - About 1 hr to fix
                      apps/jobs/models.py on lines 253..262

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

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

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

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

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

                      Refactorings

                      Further Reading

                      Severity
                      Category
                      Status
                      Source
                      Language