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

  constructor(
    private globalService: GlobalService,
    private apiService: ApiService,
    private endpointsService: EndpointsService,
    private router: Router
Severity: Minor
Found in frontend_v2/src/app/services/auth.service.ts and 1 other location - About 40 mins to fix
frontend_v2/src/app/components/our-team/our-team.component.ts on lines 24..29

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

export class PermissionDeniedModule {}
frontend_v2/src/app/components/privacy-policy/privacy-policy.module.ts on lines 17..17

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

  constructor(
    private apiService: ApiService,
    private globalService: GlobalService,
    private endpointsService: EndpointsService,
    private logger: NGXLogger
Severity: Minor
Found in frontend_v2/src/app/components/our-team/our-team.component.ts and 1 other location - About 40 mins to fix
frontend_v2/src/app/services/auth.service.ts on lines 42..47

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

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

      SELF.apiService
        .patchFileUrl(
          SELF.endpointsService.updateChallengePhaseDetailsURL(SELF.challenge.id, SELF.selectedPhase['id']),
          FORM_DATA
        )
frontend_v2/src/app/components/challenge/challengesettings/challengesettings.component.ts on lines 569..586

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

export class PrivacyPolicyModule {}
frontend_v2/src/app/components/permission-denied/permission-denied.module.ts on lines 17..17

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

      SELF.apiService
        .patchFileUrl(
          SELF.endpointsService.updateChallengePhaseDetailsURL(
            SELF.selectedPhase['challenge'],
            SELF.selectedPhase['id']
frontend_v2/src/app/components/challenge/challengesettings/challengesettings.component.ts on lines 1027..1082
frontend_v2/src/app/components/challenge/challengesettings/challengesettings.component.ts on lines 1105..1134

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

            if (visibility === 3) {
              SELF.selectedPhaseSplit['showPrivate'] = false;
              SELF.leaderboardVisibility.state = 'Public';
              SELF.leaderboardVisibility.icon = 'fa fa-toggle-on green-text';
            } else {
frontend_v2/src/app/components/challenge/challengesettings/challengesettings.component.ts on lines 1283..1287

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

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

      SELF.apiService
        .patchFileUrl(
          SELF.endpointsService.updateChallengePhaseDetailsURL(SELF.challenge.id, SELF.selectedPhase['id']),
          FORM_DATA
        )
frontend_v2/src/app/components/challenge/challengesettings/challengesettings.component.ts on lines 968..986

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

            } else {
              SELF.selectedPhaseSplit['showPrivate'] = true;
              SELF.leaderboardVisibility.state = 'Private';
              SELF.leaderboardVisibility.icon = 'fa fa-toggle-off grey-text text-darken-1';
            }
frontend_v2/src/app/components/challenge/challengesettings/challengesettings.component.ts on lines 1279..1283

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

    SELF.apiService
      .patchFileUrl(
        SELF.endpointsService.updateChallengePhaseDetailsURL(SELF.selectedPhase['challenge'], SELF.selectedPhase['id']),
        BODY
      )
frontend_v2/src/app/components/challenge/challengesettings/challengesettings.component.ts on lines 1105..1134
frontend_v2/src/app/components/challenge/challengesettings/challengesettings.component.ts on lines 1161..1177

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 start_eks_worker has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

def start_eks_worker(challenge, pending_submissions, evalai_interface, aws_keys, new_desired_size):
Severity: Minor
Found in scripts/monitoring/auto_scale_eks_nodes.py - About 35 mins to fix

    Function FeaturedChallengeCtrl has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        function FeaturedChallengeCtrl(utilities, loaderService, $state, $stateParams, moment) {
    Severity: Minor
    Found in frontend/src/js/controllers/featuredChallengeCtrl.js - About 35 mins to fix

      Function scale_up_or_down_workers has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      def scale_up_or_down_workers(challenge, evalai_interface, staff_evalai_interface, aws_keys, scale_up_desired_size):
      Severity: Minor
      Found in scripts/monitoring/auto_scale_eks_nodes.py - About 35 mins to fix

        Function process_submission_callback has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        def process_submission_callback(api_instance, body, challenge_phase, challenge, evalai):
        Severity: Minor
        Found in scripts/workers/code_upload_submission_worker.py - About 35 mins to fix

          Function __init__ has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              def __init__(
          Severity: Minor
          Found in apps/analytics/serializers.py - About 35 mins to fix

            Function run_submission has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            def run_submission(
            Severity: Minor
            Found in scripts/workers/remote_submission_worker.py - About 35 mins to fix

              Function create_submission has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              def create_submission(
              Severity: Minor
              Found in scripts/seed.py - About 35 mins to fix

                Function calculate_distinct_sorted_leaderboard_data has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                def calculate_distinct_sorted_leaderboard_data(
                Severity: Minor
                Found in apps/jobs/utils.py - About 35 mins to fix

                  Function is_challenge_phase_split_mapping_valid has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  def is_challenge_phase_split_mapping_valid(
                  Severity: Minor
                  Found in apps/challenges/challenge_config_utils.py - About 35 mins to fix

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

                                                                if (vm.existTeam.next === null) {
                                                                    vm.isNext = 'disabled';
                                                                } else {
                                                                    vm.isNext = '';
                                                                }
                    Severity: Minor
                    Found in frontend/src/js/controllers/challengeCtrl.js and 2 other locations - About 35 mins to fix
                    frontend/src/js/controllers/challengeHostTeamsCtrl.js on lines 68..72
                    frontend/src/js/controllers/teamsCtrl.js on lines 65..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 47.

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

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

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

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

                    Refactorings

                    Further Reading

                    Severity
                    Category
                    Status
                    Source
                    Language