Cloud-CV/EvalAI

View on GitHub

Showing 1,371 of 1,371 total issues

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

                    onError: function(response) {
                        if (response.status == 400) {
                            vm.errorResponse = response;
                            vm.stopLoader();
                            vm.isFormError = true;
Severity: Minor
Found in frontend/src/js/controllers/updateProfileCtrl.js - About 1 hr to fix

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

    def run_submission(
        challenge_id, challenge_phase, submission, user_annotation_file_path
    ):
        """
        * receives a challenge id, phase id and user annotation file path
    Severity: Minor
    Found in scripts/workers/submission_worker.py - About 1 hr to fix

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

      def run_submission(
          challenge_pk,
          challenge_phase,
          submission,
          user_annotation_file_path,
      Severity: Minor
      Found in scripts/workers/remote_submission_worker.py - About 1 hr to fix

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

        def calculate_distinct_sorted_leaderboard_data(
            user, challenge_obj, challenge_phase_split, only_public_entries, order_by
        ):
            """
            Function to calculate and return the sorted leaderboard data
        Severity: Minor
        Found in apps/jobs/utils.py - About 1 hr to fix

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

              SELF.apiCall = () => {
                const BODY = JSON.stringify({
                  published: isPublished,
                });
                SELF.apiService

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

              selectPhaseSplitId(id, self) {
                let i = 0;
                for (i = 0; i < self.filteredPhaseSplits.length; i++) {
                  if (parseInt(id, 10) === self.filteredPhaseSplits[i]['id']) {
                    self.selectedPhaseSplit = self.filteredPhaseSplits[i];

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

                updateView() {
                  this.teamView['team_name'] = this.team['team_name'];
                  this.teamView['created_by'] = this.team['created_by'];
                  this.teamView['team_url'] = this.team['team_url'];
                  this.teamView['id'] = this.team['id'];

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

                  deleteTeamWrapper() {
                    const SELF = this;
                    const deleteTeam = (e) => {
                      SELF.apiCall = () => {
                        SELF.apiService.deleteUrl(SELF.deleteTeamsPath + '/' + e).subscribe(

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

                    ngOnInit() {
                      this.updateElements();
                      this.checkInnerWidth();
                  
                      this.router.events.pipe(filter((event) => event instanceof NavigationEnd)).subscribe((event) => {

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

                        elif duration.lower() == "weekly":
                            since_date = (timezone.now() - timedelta(days=7)).replace(
                    Severity: Major
                    Found in apps/analytics/views.py and 1 other location - About 1 hr to fix
                    apps/analytics/views.py on lines 124..125

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

                    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

                        def get_all_challenge_host_email(self):
                            email_ids = ChallengeHost.objects.filter(team_name=self).values_list(
                                "user__email", flat=True
                            )
                            return list(email_ids)
                    Severity: Major
                    Found in apps/hosts/models.py and 1 other location - About 1 hr to fix
                    apps/participants/models.py on lines 55..59

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

                    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

                        elif duration.lower() == "monthly":
                            since_date = (timezone.now() - timedelta(days=30)).replace(
                    Severity: Major
                    Found in apps/analytics/views.py and 1 other location - About 1 hr to fix
                    apps/analytics/views.py on lines 119..120

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

                    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

                          this.filteredChallenges = this.filteredChallenges.filter(
                            (v, i, a) => this.allTeams.indexOf(v['creator']['id']) > -1
                          );
                    frontend_v2/src/app/components/publiclists/challengelist/challengelist.component.ts on lines 313..315
                    frontend_v2/src/app/components/publiclists/challengelist/challengelist.component.ts on lines 316..318
                    frontend_v2/src/app/components/publiclists/challengelist/challengelist.component.ts on lines 319..321

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

                    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

                          this.filteredOngoingChallenges = this.filteredOngoingChallenges.filter(
                            (v, i, a) => this.allTeams.indexOf(v['creator']['id']) > -1
                          );
                    frontend_v2/src/app/components/publiclists/challengelist/challengelist.component.ts on lines 310..312
                    frontend_v2/src/app/components/publiclists/challengelist/challengelist.component.ts on lines 316..318
                    frontend_v2/src/app/components/publiclists/challengelist/challengelist.component.ts on lines 319..321

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

                    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

                        def get_all_participants_email(self):
                            email_ids = Participant.objects.filter(team=self).values_list(
                                "user__email", flat=True
                            )
                            return list(email_ids)
                    Severity: Major
                    Found in apps/participants/models.py and 1 other location - About 1 hr to fix
                    apps/hosts/models.py on lines 27..31

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

                    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

                          this.filteredUpcomingChallenges = this.filteredUpcomingChallenges.filter(
                            (v, i, a) => this.allTeams.indexOf(v['creator']['id']) > -1
                          );
                    frontend_v2/src/app/components/publiclists/challengelist/challengelist.component.ts on lines 310..312
                    frontend_v2/src/app/components/publiclists/challengelist/challengelist.component.ts on lines 313..315
                    frontend_v2/src/app/components/publiclists/challengelist/challengelist.component.ts on lines 319..321

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

                    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

                        const PARAMS = {
                          title: 'Edit Submission Guidelines',
                          label: 'submission_guidelines',
                          isEditorRequired: true,
                          editorContent: this.challenge.submission_guidelines,
                    frontend_v2/src/app/components/challenge/challengesettings/challengesettings.component.ts on lines 635..643

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

                    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

                          this.filteredPastChallenges = this.filteredPastChallenges.filter(
                            (v, i, a) => this.allTeams.indexOf(v['creator']['id']) > -1
                          );
                    frontend_v2/src/app/components/publiclists/challengelist/challengelist.component.ts on lines 310..312
                    frontend_v2/src/app/components/publiclists/challengelist/challengelist.component.ts on lines 313..315
                    frontend_v2/src/app/components/publiclists/challengelist/challengelist.component.ts on lines 316..318

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

                    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

                        const PARAMS = {
                          title: 'Edit Challenge Description',
                          label: 'description',
                          isEditorRequired: true,
                          editorContent: this.challenge.description,
                    frontend_v2/src/app/components/challenge/challengesubmit/challengesubmit.component.ts on lines 674..682

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

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

                                            onError: function(response) {
                                                utilities.hideLoader();
                                                $mdDialog.hide();
                                                var error = response.data;
                                                $rootScope.notify("error", error);
                    Severity: Major
                    Found in frontend/src/js/controllers/challengeCtrl.js and 2 other locations - About 55 mins to fix
                    frontend/src/js/controllers/challengeCtrl.js on lines 2809..2814
                    frontend/src/js/controllers/challengeCtrl.js on lines 2984..2989

                    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

                    Severity
                    Category
                    Status
                    Source
                    Language