Cloud-CV/EvalAI

View on GitHub

Showing 1,371 of 1,371 total issues

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

            var confirm = $mdDialog.prompt()
                .title('Add other members to your team')
                .textContent('Enter the email address of the person')
                .placeholder('email')
                .ariaLabel('')
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 331..338

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

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 confirm = $mdDialog.prompt()
                .title('Add other members to this Team')
                .textContent('Enter the email address of the person')
                .placeholder('email')
                .ariaLabel('')
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 375..382

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

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 Test Annotations',
      confirm: 'Submit',
      deny: 'Cancel',
      form: [
frontend_v2/src/app/components/challenge/challengesettings/challengesettings.component.ts on lines 1403..1418

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

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 Evaluation Script',
      confirm: 'Submit',
      deny: 'Cancel',
      form: [
frontend_v2/src/app/components/challenge/challengesettings/challengesettings.component.ts on lines 1183..1198

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

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

        vm.updateChallengeHostTeamData = function(updateChallengeHostTeamDataForm) {
            if (updateChallengeHostTeamDataForm) {
            var parameters = {};
            parameters.url = 'hosts/challenge_host_team/' + vm.hostTeamId;
            parameters.method = 'PATCH';
Severity: Minor
Found in frontend/src/js/controllers/challengeHostTeamsCtrl.js - About 1 hr to fix

    Function updateParticipantTeamData has 46 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            vm.updateParticipantTeamData = function(updateParticipantTeamDataForm) {
                if (updateParticipantTeamDataForm) {
                var parameters = {};
                parameters.url = 'participants/participant_team/' + vm.participantTeamId;
                parameters.method = 'PATCH';
    Severity: Minor
    Found in frontend/src/js/controllers/teamsCtrl.js - About 1 hr to fix

      Function fetchChallenge has 46 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        fetchChallenge(id) {
          const API_PATH = this.endpointsService.challengeDetailsURL(id);
          const SELF = this;
          this.changeCurrentPhases([]);
          this.changeCurrentPhaseSplit([]);
      Severity: Minor
      Found in frontend_v2/src/app/services/challenge.service.ts - About 1 hr to fix

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

            def update_submission_data(self, data, challenge_pk, submission_pk):
                url = URLS.get("update_submission_data").format(challenge_pk)
                url = self.return_url_per_environment(url)
                response = self.make_request(url, "PUT", data=data)
                return response
        Severity: Major
        Found in scripts/workers/worker_utils.py and 1 other location - About 1 hr to fix
        scripts/workers/worker_utils.py on lines 96..100

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

        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 update_submission_status(self, data, challenge_pk):
                url = URLS.get("update_submission_data").format(challenge_pk)
                url = self.return_url_per_environment(url)
                response = self.make_request(url, "PATCH", data=data)
                return response
        Severity: Major
        Found in scripts/workers/worker_utils.py and 1 other location - About 1 hr to fix
        scripts/workers/worker_utils.py on lines 90..94

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

        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 current_challenge_phase_id in current_phase_config_ids:
                    if current_challenge_phase_id not in self.phase_ids:
                        message = self.error_messages_dict[
                            "challenge_phase_not_found"
                        ].format(current_challenge_phase_id)
        Severity: Major
        Found in apps/challenges/challenge_config_utils.py and 1 other location - About 1 hr to fix
        apps/challenges/challenge_config_utils.py on lines 983..988

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

        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 current_dataset_split_config_id in current_dataset_config_ids:
                    if current_dataset_split_config_id not in self.dataset_splits_ids:
                        message = self.error_messages_dict[
                            "missing_existing_dataset_split_id"
                        ].format(current_dataset_split_config_id)
        Severity: Major
        Found in apps/challenges/challenge_config_utils.py and 1 other location - About 1 hr to fix
        apps/challenges/challenge_config_utils.py on lines 809..814

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

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

                vm.contactUs = function(resetconfirmFormValid) {
                    if (resetconfirmFormValid) {
        
                        var parameters = {};
                        vm.isDisabled = false;
        Severity: Minor
        Found in frontend/src/js/controllers/contactUsCtrl.js - About 1 hr to fix

          Function togglePublishChallengeState has 45 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            togglePublishChallengeState() {
              const SELF = this;
              let toggleChallengePublishState, isPublished;
              if (this.publishChallenge.state === 'Published') {
                toggleChallengePublishState = 'private';

            Function editPhaseDetails has 45 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              editPhaseDetails() {
                const SELF = this;
                SELF.apiCall = (params) => {
                  const FORM_DATA: FormData = new FormData();
                  for (const key in params) {

              Function editTeam has 45 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  const editTeam = (team) => {
                    const teamId = team['id'];
                    const teamName = team['team_name'];
                    const teamUrl = team['team_url'];
                    TeamUrl = this.isHost

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

                                                            if (vm.existTeam.next !== null) {
                                                                vm.currentPage = vm.existTeam.next.split('page=')[1] - 1;
                                                            } else {
                                                                vm.currentPage = 1;
                                                            }
                Severity: Major
                Found in frontend/src/js/controllers/challengeCtrl.js and 2 other locations - About 1 hr to fix
                frontend/src/js/controllers/challengeHostTeamsCtrl.js on lines 79..83
                frontend/src/js/controllers/teamsCtrl.js on lines 76..80

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

                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

                                    if (vm.existTeam.next !== null) {
                                        vm.currentPage = vm.existTeam.next.split('page=')[1] - 1;
                                    } else {
                                        vm.currentPage = 1;
                                    }
                Severity: Major
                Found in frontend/src/js/controllers/teamsCtrl.js and 2 other locations - About 1 hr to fix
                frontend/src/js/controllers/challengeCtrl.js on lines 503..507
                frontend/src/js/controllers/challengeHostTeamsCtrl.js on lines 79..83

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

                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

                                    if (vm.existTeam.next !== null) {
                                        vm.currentPage = vm.existTeam.next.split('page=')[1] - 1;
                                    } else {
                                        vm.currentPage = 1;
                                    }
                Severity: Major
                Found in frontend/src/js/controllers/challengeHostTeamsCtrl.js and 2 other locations - About 1 hr to fix
                frontend/src/js/controllers/challengeCtrl.js on lines 503..507
                frontend/src/js/controllers/teamsCtrl.js on lines 76..80

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

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

                                    onSuccess: function(response) {
                                        if (response.status == 201) {
                                            vm.isFormError = false;
                                            // Redirecting to Dashboard on Signup with limited privilege
                                            $rootScope.notify("success", "Registered successfully. Please verify your email address!");
                Severity: Minor
                Found in frontend/src/js/controllers/authCtrl.js - About 1 hr to fix

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

                          vm.userLogin = function(loginFormValid) {
                              if (loginFormValid) {
                                  vm.startLoader("Taking you to EvalAI!");
                                  // call utility service
                                  var parameters = {};
                  Severity: Minor
                  Found in frontend/src/js/controllers/authCtrl.js - About 1 hr to fix
                    Severity
                    Category
                    Status
                    Source
                    Language