Cloud-CV/EvalAI

View on GitHub

Showing 1,371 of 1,371 total issues

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

        (err) => {
          this.globalService.stopLoader();
          this.globalService.showToast('error', err.error.team_name, 5);
          this.globalService.handleFormError(this.components, err);
        },
frontend_v2/src/app/components/publiclists/teamlist/teamlist.component.ts on lines 598..602

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

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

  termsAndConditionContent = [
    'Participants can train their models with the released training set' +
      ', also with other training images as long as they are disjoint with the test set' +
      '(see <a class="blue-text" href="https://arxiv.org/pdf/1804.09691.pdf" target="_blank">arXiv paper</a>)',

frontend_v2/src/app/components/challenge/challengeparticipate/challengeparticipate.component.ts on lines 116..137

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

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

        (err) => {
          this.globalService.stopLoader();
          this.globalService.showToast('error', err.error.team_name, 5);
          this.globalService.handleFormError(this.components, err);
        },
frontend_v2/src/app/components/challenge/challengeparticipate/challengeparticipate.component.ts on lines 313..317

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

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

  termsAndConditionContent = [
    'Participants can train their models with the released training set' +
      ', also with other training images as long as they are disjoint with the test set' +
      '(see <a class="blue-text" href="https://arxiv.org/pdf/1804.09691.pdf" target="_blank">arXiv paper</a>)',

frontend_v2/src/app/components/publiclists/teamlist/teamlist.component.ts on lines 185..206

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

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 publishChallenge has 38 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        vm.publishChallenge = function(ev) {
            ev.stopPropagation();
            vm.toggleChallengeState = null;
            vm.publishDesc = null;
            if (vm.isPublished)
Severity: Minor
Found in frontend/src/js/controllers/challengeCtrl.js - About 1 hr to fix

    Function loadPaginationData has 38 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      loadPaginationData(url) {
        if (url !== null) {
          const SELF = this;
          const API_PATH = url.split(environment.api_endpoint)[1];
          SELF.apiService.getUrl(API_PATH, true).subscribe(

      Function cancelSubmission has 38 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        cancelSubmission(submission) {
          const SELF = this;
          if (submission.status != "submitted") {
            SELF.globalService.showToast('error', 'Only unproccessed submissions can be cancelled', 5);
            return;

        Function phaseSplitSelected has 38 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          phaseSplitSelected() {
            const SELF = this;
            return (phaseSplit) => {
              SELF.selectedPhaseSplit = phaseSplit;
              SELF.isPhaseSplitLeaderboardPublic = SELF.selectedPhaseSplit['visibility'];

          Function cancelSubmission has 38 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

             cancelSubmission(submission) {
              const SELF = this;
              if (submission.status != "submitted") {
                SELF.globalService.showToast('error', 'Only unproccessed submissions can be cancelled', 5);
                return;

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

                    try:
                        ParticipantTeam.objects.get(pk=participant_team_id)
                    except ParticipantTeam.DoesNotExist:
                        response_data = {
                            "error": "You haven't participated in the challenge"
            Severity: Major
            Found in apps/jobs/views.py and 1 other location - About 1 hr to fix
            apps/hosts/views.py on lines 246..250

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

            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

                try:
                    ChallengeHostTeam.objects.get(pk=challenge_host_team_pk)
                except ChallengeHostTeam.DoesNotExist:
                    response_data = {"error": "ChallengeHostTeam does not exist"}
                    return Response(response_data, status=status.HTTP_406_NOT_ACCEPTABLE)
            Severity: Major
            Found in apps/hosts/views.py and 1 other location - About 1 hr to fix
            apps/jobs/views.py on lines 161..167

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

            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

            apps/challenges/migrations/0040_change_broker_url_name_to_queue.py on lines 0..15

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

            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

            apps/jobs/migrations/0014_rename_job_id_field_in_submission_model_to_job_name.py on lines 0..13

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

            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 editChallengeTag has 37 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    vm.editChallengeTag = function(editChallengeTagDomainForm) {
                        var new_tags;
                        if (!editChallengeTagDomainForm) {
                            $mdDialog.hide();
                            return;
            Severity: Minor
            Found in frontend/src/js/controllers/challengeCtrl.js - About 1 hr to fix

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

                              onSuccess: function() {
                                  $rootScope.notify("success", "Team " + vm.team.name + " has been created successfully!");
                                  vm.team.error = false;
                                  vm.stopLoader();
                                  // reset the team attributes
              Severity: Minor
              Found in frontend/src/js/controllers/teamsCtrl.js - About 1 hr to fix

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

                  userLogin(loginFormValid) {
                    if (!loginFormValid) {
                      this.globalService.stopLoader();
                      return;
                    }
                Severity: Minor
                Found in frontend_v2/src/app/components/auth/login/login.component.ts - About 1 hr to fix

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

                    ngOnInit() {
                      if (this.authService.isLoggedIn()) {
                        this.isLoggedIn = true;
                      }
                      this.routerPublic = this.router;

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

                                parameters.data = {
                                    "old_password": vm.user.old_password,
                                    "new_password1": vm.user.new_password1,
                                    "new_password2": vm.user.new_password2,
                                    "uid": $state.params.user_id,
                    Severity: Major
                    Found in frontend/src/js/controllers/profileCtrl.js and 3 other locations - About 1 hr to fix
                    frontend/src/js/controllers/authCtrl.js on lines 96..101
                    frontend/src/js/controllers/authCtrl.js on lines 342..347
                    frontend/src/js/controllers/changePwdCtrl.js on lines 64..69

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

                    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

                                var confirm = $mdDialog.confirm()
                                    .title('Would you like to remove yourself?')
                                    .textContent('Note: This action will remove you from the team.')
                                    .ariaLabel('Lucky day')
                                    .targetEvent(ev)
                    Severity: Major
                    Found in frontend/src/js/controllers/teamsCtrl.js and 1 other location - About 1 hr to fix
                    frontend/src/js/controllers/challengeHostTeamsCtrl.js on lines 298..304

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

                    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

                                var confirm = $mdDialog.confirm()
                                    .title('Would you like to remove yourself?')
                                    .textContent('Note: This action will remove you from the team.')
                                    .ariaLabel('Lucky day')
                                    .targetEvent(ev)
                    Severity: Major
                    Found in frontend/src/js/controllers/challengeHostTeamsCtrl.js and 1 other location - About 1 hr to fix
                    frontend/src/js/controllers/teamsCtrl.js on lines 250..256

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

                    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