Cloud-CV/EvalAI

View on GitHub

Showing 1,371 of 1,371 total issues

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

      (err) => {
        if (err.status === 403) {
          this.router.navigate(['permission-denied']);
        }
        this.globalService.stopLoader();
frontend_v2/src/app/components/publiclists/teamlist/teamlist.component.ts on lines 410..416

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

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

  putUrl(path: string, body: any) {
    this.prepareHttpOptions();
    return this.loadingWrapper(this.http.put(this.API + path, body, this.HTTP_OPTIONS));
  }
Severity: Major
Found in frontend_v2/src/app/services/api.service.ts and 2 other locations - About 1 hr to fix
frontend_v2/src/app/services/api.service.ts on lines 61..64
frontend_v2/src/app/services/api.service.ts on lines 71..74

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

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

  postUrl(path: string, body: any) {
    this.prepareHttpOptions();
    return this.loadingWrapper(this.http.post(this.API + path, body, this.HTTP_OPTIONS));
  }
Severity: Major
Found in frontend_v2/src/app/services/api.service.ts and 2 other locations - About 1 hr to fix
frontend_v2/src/app/services/api.service.ts on lines 71..74
frontend_v2/src/app/services/api.service.ts on lines 81..84

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

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

        vm.resetPasswordConfirm = function(resetconfirmFormValid) {
            if (resetconfirmFormValid) {
                vm.startLoader("Resetting Your Password");
                var parameters = {};
                parameters.url = 'auth/password/reset/confirm/';
Severity: Minor
Found in frontend/src/js/controllers/authCtrl.js - About 1 hr to fix

    Function changePassword has 42 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            vm.changePassword = function(resetconfirmFormValid) {
                if(resetconfirmFormValid){
                var parameters = {};
                parameters.url = 'auth/password/change/';
                parameters.method = 'POST';
    Severity: Minor
    Found in frontend/src/js/controllers/profileCtrl.js - About 1 hr to fix

      Function fetchRemainingSubmissions has 42 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        fetchRemainingSubmissions(challenge, phase) {
          const API_PATH = this.endpointsService.challengeSubmissionsRemainingURL(challenge);
          const SELF = this;
          clearInterval(SELF.timer);
          SELF.isClockStarted = false;

        Function fetchSubmissions has 42 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          fetchSubmissions(challenge, phase) {
            const SELF = this;
            let API_PATH;
            API_PATH = SELF.endpointsService.challengeSubmissionURL(challenge, phase);
            SELF.apiService.getUrl(API_PATH).subscribe(

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

              try:
                  participant_team = ParticipantTeam.objects.get(pk=participant_team_pk)
              except ParticipantTeam.DoesNotExist:
                  response_data = {"error": "You haven't participated in the challenge"}
                  return Response(response_data, status=status.HTTP_403_FORBIDDEN)
          Severity: Major
          Found in apps/jobs/views.py and 11 other locations - About 1 hr to fix
          apps/hosts/views.py on lines 75..79
          apps/hosts/views.py on lines 117..123
          apps/hosts/views.py on lines 165..171
          apps/hosts/views.py on lines 268..272
          apps/hosts/views.py on lines 275..281
          apps/jobs/views.py on lines 139..143
          apps/jobs/views.py on lines 235..243
          apps/jobs/views.py on lines 2595..2599
          apps/jobs/views.py on lines 2768..2772
          apps/jobs/views.py on lines 2884..2888
          apps/jobs/views.py on lines 2925..2931

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

          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

              try:
                  participant_team = ParticipantTeam.objects.get(pk=participant_team_id)
              except ParticipantTeam.DoesNotExist:
                  response_data = {"error": "You haven't participated in the challenge"}
                  return Response(response_data, status=status.HTTP_403_FORBIDDEN)
          Severity: Major
          Found in apps/jobs/views.py and 11 other locations - About 1 hr to fix
          apps/hosts/views.py on lines 75..79
          apps/hosts/views.py on lines 117..123
          apps/hosts/views.py on lines 165..171
          apps/hosts/views.py on lines 268..272
          apps/hosts/views.py on lines 275..281
          apps/jobs/views.py on lines 139..143
          apps/jobs/views.py on lines 235..243
          apps/jobs/views.py on lines 438..442
          apps/jobs/views.py on lines 2768..2772
          apps/jobs/views.py on lines 2884..2888
          apps/jobs/views.py on lines 2925..2931

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

          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

                          if len(missing_metrics) and not is_partial_evaluation_phase:
                              response_data = {
                                  "error": "Following metrics are missing in the"
                                  "leaderboard data: {} of challenge phase: {}".format(
                                      missing_metrics, challenge_phase_pk
          Severity: Major
          Found in apps/jobs/views.py and 1 other location - About 1 hr to fix
          apps/jobs/views.py on lines 1792..1800

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

          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

                  try:
                      participant_team = ParticipantTeam.objects.get(
                          pk=participant_team_id
                      )
                  except ParticipantTeam.DoesNotExist:
          Severity: Major
          Found in apps/jobs/views.py and 11 other locations - About 1 hr to fix
          apps/hosts/views.py on lines 75..79
          apps/hosts/views.py on lines 117..123
          apps/hosts/views.py on lines 165..171
          apps/hosts/views.py on lines 268..272
          apps/hosts/views.py on lines 275..281
          apps/jobs/views.py on lines 139..143
          apps/jobs/views.py on lines 438..442
          apps/jobs/views.py on lines 2595..2599
          apps/jobs/views.py on lines 2768..2772
          apps/jobs/views.py on lines 2884..2888
          apps/jobs/views.py on lines 2925..2931

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

          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

              try:
                  submission = Submission.objects.get(
                      id=submission_pk,
                  )
              except Submission.DoesNotExist:
          Severity: Major
          Found in apps/jobs/views.py and 11 other locations - About 1 hr to fix
          apps/hosts/views.py on lines 75..79
          apps/hosts/views.py on lines 117..123
          apps/hosts/views.py on lines 165..171
          apps/hosts/views.py on lines 268..272
          apps/hosts/views.py on lines 275..281
          apps/jobs/views.py on lines 139..143
          apps/jobs/views.py on lines 235..243
          apps/jobs/views.py on lines 438..442
          apps/jobs/views.py on lines 2595..2599
          apps/jobs/views.py on lines 2768..2772
          apps/jobs/views.py on lines 2884..2888

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

          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

                          if len(missing_metrics) and not is_partial_evaluation_phase:
                              response_data = {
                                  "error": "Following metrics are missing in the"
                                  "leaderboard data: {} of challenge phase: {}".format(
                                      missing_metrics, challenge_phase_pk
          Severity: Major
          Found in apps/jobs/views.py and 1 other location - About 1 hr to fix
          apps/jobs/views.py on lines 1587..1595

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

          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

              try:
                  participant_team = ParticipantTeam.objects.get(pk=participant_team_id)
              except ParticipantTeam.DoesNotExist:
                  response_data = {"error": "You haven't participated in the challenge"}
                  return Response(response_data, status=status.HTTP_403_FORBIDDEN)
          Severity: Major
          Found in apps/jobs/views.py and 11 other locations - About 1 hr to fix
          apps/hosts/views.py on lines 75..79
          apps/hosts/views.py on lines 117..123
          apps/hosts/views.py on lines 165..171
          apps/hosts/views.py on lines 268..272
          apps/hosts/views.py on lines 275..281
          apps/jobs/views.py on lines 139..143
          apps/jobs/views.py on lines 235..243
          apps/jobs/views.py on lines 438..442
          apps/jobs/views.py on lines 2595..2599
          apps/jobs/views.py on lines 2768..2772
          apps/jobs/views.py on lines 2925..2931

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

          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

              try:
                  challenge_host_team = ChallengeHostTeam.objects.get(pk=pk)
              except ChallengeHostTeam.DoesNotExist:
                  response_data = {"error": "Host Team does not exist"}
                  return Response(response_data, status=status.HTTP_406_NOT_ACCEPTABLE)
          Severity: Major
          Found in apps/hosts/views.py and 11 other locations - About 1 hr to fix
          apps/hosts/views.py on lines 75..79
          apps/hosts/views.py on lines 117..123
          apps/hosts/views.py on lines 165..171
          apps/hosts/views.py on lines 275..281
          apps/jobs/views.py on lines 139..143
          apps/jobs/views.py on lines 235..243
          apps/jobs/views.py on lines 438..442
          apps/jobs/views.py on lines 2595..2599
          apps/jobs/views.py on lines 2768..2772
          apps/jobs/views.py on lines 2884..2888
          apps/jobs/views.py on lines 2925..2931

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

          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

              try:
                  challenge_host_team = ChallengeHostTeam.objects.get(pk=pk)
              except ChallengeHostTeam.DoesNotExist:
                  response_data = {"error": "ChallengeHostTeam does not exist"}
                  return Response(response_data, status=status.HTTP_406_NOT_ACCEPTABLE)
          Severity: Major
          Found in apps/hosts/views.py and 11 other locations - About 1 hr to fix
          apps/hosts/views.py on lines 117..123
          apps/hosts/views.py on lines 165..171
          apps/hosts/views.py on lines 268..272
          apps/hosts/views.py on lines 275..281
          apps/jobs/views.py on lines 139..143
          apps/jobs/views.py on lines 235..243
          apps/jobs/views.py on lines 438..442
          apps/jobs/views.py on lines 2595..2599
          apps/jobs/views.py on lines 2768..2772
          apps/jobs/views.py on lines 2884..2888
          apps/jobs/views.py on lines 2925..2931

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

          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

              try:
                  challenge_host_team = ChallengeHostTeam.objects.get(
                      pk=challenge_host_team_pk
                  )
              except ChallengeHostTeam.DoesNotExist:
          Severity: Major
          Found in apps/hosts/views.py and 11 other locations - About 1 hr to fix
          apps/hosts/views.py on lines 75..79
          apps/hosts/views.py on lines 117..123
          apps/hosts/views.py on lines 268..272
          apps/hosts/views.py on lines 275..281
          apps/jobs/views.py on lines 139..143
          apps/jobs/views.py on lines 235..243
          apps/jobs/views.py on lines 438..442
          apps/jobs/views.py on lines 2595..2599
          apps/jobs/views.py on lines 2768..2772
          apps/jobs/views.py on lines 2884..2888
          apps/jobs/views.py on lines 2925..2931

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

          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

              try:
                  participant_team = ParticipantTeam.objects.get(pk=participant_team_id)
              except ParticipantTeam.DoesNotExist:
                  response_data = {"error": "You haven't participated in the challenge"}
                  return Response(response_data, status=status.HTTP_403_FORBIDDEN)
          Severity: Major
          Found in apps/jobs/views.py and 11 other locations - About 1 hr to fix
          apps/hosts/views.py on lines 75..79
          apps/hosts/views.py on lines 117..123
          apps/hosts/views.py on lines 165..171
          apps/hosts/views.py on lines 268..272
          apps/hosts/views.py on lines 275..281
          apps/jobs/views.py on lines 139..143
          apps/jobs/views.py on lines 235..243
          apps/jobs/views.py on lines 438..442
          apps/jobs/views.py on lines 2595..2599
          apps/jobs/views.py on lines 2884..2888
          apps/jobs/views.py on lines 2925..2931

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

          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

              try:
                  challenge_host_team = ChallengeHostTeam.objects.get(
                      pk=challenge_host_team_pk
                  )
              except ChallengeHostTeam.DoesNotExist:
          Severity: Major
          Found in apps/hosts/views.py and 11 other locations - About 1 hr to fix
          apps/hosts/views.py on lines 75..79
          apps/hosts/views.py on lines 165..171
          apps/hosts/views.py on lines 268..272
          apps/hosts/views.py on lines 275..281
          apps/jobs/views.py on lines 139..143
          apps/jobs/views.py on lines 235..243
          apps/jobs/views.py on lines 438..442
          apps/jobs/views.py on lines 2595..2599
          apps/jobs/views.py on lines 2768..2772
          apps/jobs/views.py on lines 2884..2888
          apps/jobs/views.py on lines 2925..2931

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

          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

              try:
                  user = User.objects.get(email=email)
              except User.DoesNotExist:
                  response_data = {
                      "error": "User does not exist with this email address!"
          Severity: Major
          Found in apps/hosts/views.py and 11 other locations - About 1 hr to fix
          apps/hosts/views.py on lines 75..79
          apps/hosts/views.py on lines 117..123
          apps/hosts/views.py on lines 165..171
          apps/hosts/views.py on lines 268..272
          apps/jobs/views.py on lines 139..143
          apps/jobs/views.py on lines 235..243
          apps/jobs/views.py on lines 438..442
          apps/jobs/views.py on lines 2595..2599
          apps/jobs/views.py on lines 2768..2772
          apps/jobs/views.py on lines 2884..2888
          apps/jobs/views.py on lines 2925..2931

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

          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