Cloud-CV/EvalAI

View on GitHub

Showing 1,371 of 1,371 total issues

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

apps/challenges/migrations/0082_challengephasesplit_show_execution_time.py on lines 0..16
apps/challenges/migrations/0083_challengephase_annotations_uploaded_using_cli.py on lines 0..16
apps/challenges/migrations/0086_add_is_multi_metric_leaderboard_field.py on lines 0..16
apps/challenges/migrations/0089_add_challenge_use_host_sqs.py on lines 0..16
apps/challenges/migrations/0090_challenge_allow_resuming_submissions.py on lines 0..16
apps/challenges/migrations/0091_challenge_allow_host_cancel_submissions.py on lines 0..16
apps/challenges/migrations/0092_challenge_allow_cancel_running_submissions.py on lines 0..16
apps/challenges/migrations/0094_challenge_allow_participants_resubmissions.py on lines 0..16
apps/challenges/migrations/0097_challengephase_disable_logs.py on lines 0..16
apps/challenges/migrations/0107_leaderboarddata_is_disabled.py on lines 0..16
apps/jobs/migrations/0021_add_submission_verified_field.py on lines 0..16

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

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

apps/challenges/migrations/0083_challengephase_annotations_uploaded_using_cli.py on lines 0..16
apps/challenges/migrations/0086_add_is_multi_metric_leaderboard_field.py on lines 0..16
apps/challenges/migrations/0089_add_challenge_use_host_sqs.py on lines 0..16
apps/challenges/migrations/0090_challenge_allow_resuming_submissions.py on lines 0..16
apps/challenges/migrations/0091_challenge_allow_host_cancel_submissions.py on lines 0..16
apps/challenges/migrations/0092_challenge_allow_cancel_running_submissions.py on lines 0..16
apps/challenges/migrations/0094_challenge_allow_participants_resubmissions.py on lines 0..16
apps/challenges/migrations/0097_challengephase_disable_logs.py on lines 0..16
apps/challenges/migrations/0107_leaderboarddata_is_disabled.py on lines 0..16
apps/challenges/migrations/0109_alter_leaderboarddata_is_disabled.py on lines 0..16
apps/jobs/migrations/0021_add_submission_verified_field.py on lines 0..16

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

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

apps/challenges/migrations/0082_challengephasesplit_show_execution_time.py on lines 0..16
apps/challenges/migrations/0083_challengephase_annotations_uploaded_using_cli.py on lines 0..16
apps/challenges/migrations/0086_add_is_multi_metric_leaderboard_field.py on lines 0..16
apps/challenges/migrations/0089_add_challenge_use_host_sqs.py on lines 0..16
apps/challenges/migrations/0090_challenge_allow_resuming_submissions.py on lines 0..16
apps/challenges/migrations/0091_challenge_allow_host_cancel_submissions.py on lines 0..16
apps/challenges/migrations/0094_challenge_allow_participants_resubmissions.py on lines 0..16
apps/challenges/migrations/0097_challengephase_disable_logs.py on lines 0..16
apps/challenges/migrations/0107_leaderboarddata_is_disabled.py on lines 0..16
apps/challenges/migrations/0109_alter_leaderboarddata_is_disabled.py on lines 0..16
apps/jobs/migrations/0021_add_submission_verified_field.py on lines 0..16

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

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

    def get_submission_by_pk(self, submission_pk):
        url = URLS.get("get_submission_by_pk").format(submission_pk)
        url = self.return_url_per_environment(url)
        response = self.make_request(url, "GET")
        return response
Severity: Major
Found in scripts/workers/worker_utils.py and 3 other locations - About 2 hrs to fix
scripts/workers/worker_utils.py on lines 68..74
scripts/workers/worker_utils.py on lines 102..106
scripts/workers/worker_utils.py on lines 108..112

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

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

Severity: Major
Found in apps/jobs/migrations/0021_add_submission_verified_field.py and 11 other locations - About 2 hrs to fix
apps/challenges/migrations/0082_challengephasesplit_show_execution_time.py on lines 0..16
apps/challenges/migrations/0083_challengephase_annotations_uploaded_using_cli.py on lines 0..16
apps/challenges/migrations/0086_add_is_multi_metric_leaderboard_field.py on lines 0..16
apps/challenges/migrations/0089_add_challenge_use_host_sqs.py on lines 0..16
apps/challenges/migrations/0090_challenge_allow_resuming_submissions.py on lines 0..16
apps/challenges/migrations/0091_challenge_allow_host_cancel_submissions.py on lines 0..16
apps/challenges/migrations/0092_challenge_allow_cancel_running_submissions.py on lines 0..16
apps/challenges/migrations/0094_challenge_allow_participants_resubmissions.py on lines 0..16
apps/challenges/migrations/0097_challengephase_disable_logs.py on lines 0..16
apps/challenges/migrations/0107_leaderboarddata_is_disabled.py on lines 0..16
apps/challenges/migrations/0109_alter_leaderboarddata_is_disabled.py on lines 0..16

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

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

apps/challenges/migrations/0082_challengephasesplit_show_execution_time.py on lines 0..16
apps/challenges/migrations/0083_challengephase_annotations_uploaded_using_cli.py on lines 0..16
apps/challenges/migrations/0086_add_is_multi_metric_leaderboard_field.py on lines 0..16
apps/challenges/migrations/0089_add_challenge_use_host_sqs.py on lines 0..16
apps/challenges/migrations/0090_challenge_allow_resuming_submissions.py on lines 0..16
apps/challenges/migrations/0091_challenge_allow_host_cancel_submissions.py on lines 0..16
apps/challenges/migrations/0092_challenge_allow_cancel_running_submissions.py on lines 0..16
apps/challenges/migrations/0094_challenge_allow_participants_resubmissions.py on lines 0..16
apps/challenges/migrations/0107_leaderboarddata_is_disabled.py on lines 0..16
apps/challenges/migrations/0109_alter_leaderboarddata_is_disabled.py on lines 0..16
apps/jobs/migrations/0021_add_submission_verified_field.py on lines 0..16

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

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

apps/challenges/migrations/0082_challengephasesplit_show_execution_time.py on lines 0..16
apps/challenges/migrations/0083_challengephase_annotations_uploaded_using_cli.py on lines 0..16
apps/challenges/migrations/0089_add_challenge_use_host_sqs.py on lines 0..16
apps/challenges/migrations/0090_challenge_allow_resuming_submissions.py on lines 0..16
apps/challenges/migrations/0091_challenge_allow_host_cancel_submissions.py on lines 0..16
apps/challenges/migrations/0092_challenge_allow_cancel_running_submissions.py on lines 0..16
apps/challenges/migrations/0094_challenge_allow_participants_resubmissions.py on lines 0..16
apps/challenges/migrations/0097_challengephase_disable_logs.py on lines 0..16
apps/challenges/migrations/0107_leaderboarddata_is_disabled.py on lines 0..16
apps/challenges/migrations/0109_alter_leaderboarddata_is_disabled.py on lines 0..16
apps/jobs/migrations/0021_add_submission_verified_field.py on lines 0..16

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

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

    def get_challenge_phases_by_challenge_pk(self, challenge_pk):
        url = URLS.get("get_challenge_phases_by_challenge_pk").format(
            challenge_pk
        )
        url = self.return_url_per_environment(url)
Severity: Major
Found in scripts/workers/worker_utils.py and 3 other locations - About 2 hrs to fix
scripts/workers/worker_utils.py on lines 62..66
scripts/workers/worker_utils.py on lines 102..106
scripts/workers/worker_utils.py on lines 108..112

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

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

apps/challenges/migrations/0082_challengephasesplit_show_execution_time.py on lines 0..16
apps/challenges/migrations/0083_challengephase_annotations_uploaded_using_cli.py on lines 0..16
apps/challenges/migrations/0086_add_is_multi_metric_leaderboard_field.py on lines 0..16
apps/challenges/migrations/0089_add_challenge_use_host_sqs.py on lines 0..16
apps/challenges/migrations/0090_challenge_allow_resuming_submissions.py on lines 0..16
apps/challenges/migrations/0091_challenge_allow_host_cancel_submissions.py on lines 0..16
apps/challenges/migrations/0092_challenge_allow_cancel_running_submissions.py on lines 0..16
apps/challenges/migrations/0097_challengephase_disable_logs.py on lines 0..16
apps/challenges/migrations/0107_leaderboarddata_is_disabled.py on lines 0..16
apps/challenges/migrations/0109_alter_leaderboarddata_is_disabled.py on lines 0..16
apps/jobs/migrations/0021_add_submission_verified_field.py on lines 0..16

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

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

apps/challenges/migrations/0082_challengephasesplit_show_execution_time.py on lines 0..16
apps/challenges/migrations/0083_challengephase_annotations_uploaded_using_cli.py on lines 0..16
apps/challenges/migrations/0086_add_is_multi_metric_leaderboard_field.py on lines 0..16
apps/challenges/migrations/0089_add_challenge_use_host_sqs.py on lines 0..16
apps/challenges/migrations/0090_challenge_allow_resuming_submissions.py on lines 0..16
apps/challenges/migrations/0092_challenge_allow_cancel_running_submissions.py on lines 0..16
apps/challenges/migrations/0094_challenge_allow_participants_resubmissions.py on lines 0..16
apps/challenges/migrations/0097_challengephase_disable_logs.py on lines 0..16
apps/challenges/migrations/0107_leaderboarddata_is_disabled.py on lines 0..16
apps/challenges/migrations/0109_alter_leaderboarddata_is_disabled.py on lines 0..16
apps/jobs/migrations/0021_add_submission_verified_field.py on lines 0..16

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

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

    def get_aws_eks_cluster_details(self, challenge_pk):
        url = URLS.get("get_aws_eks_cluster_details").format(challenge_pk)
        url = self.return_url_per_environment(url)
        response = self.make_request(url, "GET")
        return response
Severity: Major
Found in scripts/workers/worker_utils.py and 3 other locations - About 2 hrs to fix
scripts/workers/worker_utils.py on lines 62..66
scripts/workers/worker_utils.py on lines 68..74
scripts/workers/worker_utils.py on lines 102..106

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

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

                    angular.element(".links-section-outer").bind('scroll', function() {
                        if (this.scrollTop >= 5) {
                            angular.element(".side-intro").addClass('z-depth-3');
                        } else {
                            angular.element(".side-intro").removeClass('z-depth-3');
Severity: Major
Found in frontend/src/js/directives/directives.js and 1 other location - About 2 hrs to fix
frontend/src/js/directives/directives.js on lines 70..78

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

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

    def get_aws_eks_bearer_token(self, challenge_pk):
        url = URLS.get("get_aws_eks_bearer_token").format(challenge_pk)
        url = self.return_url_per_environment(url)
        response = self.make_request(url, "GET")
        return response
Severity: Major
Found in scripts/workers/worker_utils.py and 3 other locations - About 2 hrs to fix
scripts/workers/worker_utils.py on lines 62..66
scripts/workers/worker_utils.py on lines 68..74
scripts/workers/worker_utils.py on lines 108..112

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

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

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

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

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

Refactorings

Further Reading

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

      if (SELF.isPhasePublic) {
        SELF.phaseVisibility.state = 'Public';
        SELF.phaseVisibility.icon = 'fa fa-toggle-on green-text';
      } else {
        SELF.phaseVisibility.state = 'Private';
frontend_v2/src/app/components/challenge/challengesettings/challengesettings.component.ts on lines 946..952

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

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 not challenge.allow_participants_resubmissions and not is_user_a_host_of_challenge(request.user, challenge.pk):
        response_data = {
            "error": "Only challenge hosts are allowed to resume a submission"
        }
        return Response(response_data, status=status.HTTP_403_FORBIDDEN)
Severity: Major
Found in apps/jobs/views.py and 1 other location - About 2 hrs to fix
apps/jobs/views.py on lines 1901..1905

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

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 not challenge.allow_participants_resubmissions and not is_user_a_staff_or_host(request.user, challenge.pk):
        response_data = {
            "error": "Only challenge hosts or admins are allowed to re-run a submission"
        }
        return Response(response_data, status=status.HTTP_403_FORBIDDEN)
Severity: Major
Found in apps/jobs/views.py and 1 other location - About 2 hrs to fix
apps/jobs/views.py on lines 1960..1964

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

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

  constructor(
    private authService: AuthService,
    private apiService: ApiService,
    private router: Router,
    private route: ActivatedRoute,
frontend_v2/src/app/components/profile/profile.component.ts on lines 74..82
frontend_v2/src/app/components/publiclists/teamlist/teamlist.component.ts on lines 238..246

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

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

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

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

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

Refactorings

Further Reading

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

      if (SELF.isSubmissionPublic) {
        SELF.submissionVisibility.state = 'Public';
        SELF.submissionVisibility.icon = 'fa fa-toggle-on green-text';
      } else {
        SELF.submissionVisibility.state = 'Private';
frontend_v2/src/app/components/challenge/challengesettings/challengesettings.component.ts on lines 939..945

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

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

  constructor(
    private apiService: ApiService,
    private authService: AuthService,
    private globalService: GlobalService,
    private router: Router,
Severity: Major
Found in frontend_v2/src/app/components/profile/profile.component.ts and 2 other locations - About 2 hrs to fix
frontend_v2/src/app/components/challenge/challengeparticipate/challengeparticipate.component.ts on lines 148..156
frontend_v2/src/app/components/publiclists/teamlist/teamlist.component.ts on lines 238..246

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

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

  constructor(
    private apiService: ApiService,
    private authService: AuthService,
    private globalService: GlobalService,
    private router: Router,
frontend_v2/src/app/components/challenge/challengeparticipate/challengeparticipate.component.ts on lines 148..156
frontend_v2/src/app/components/profile/profile.component.ts on lines 74..82

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

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