Cloud-CV/EvalAI

View on GitHub

Showing 1,371 of 1,371 total issues

Function main has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring.
Open

def main():
    killer = GracefulKiller()
    logger.info(
        "{} Using {} as temp directory to store data".format(
            WORKER_LOGS_PREFIX, BASE_TEMP_DIR
Severity: Minor
Found in scripts/workers/submission_worker.py - About 6 hrs to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

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

    if submission.challenge_phase.challenge.is_docker_based:
        try:
            response = requests.get(submission.input_file.url)
        except Exception:
            logger.exception("Failed to get input_file")
Severity: Major
Found in apps/jobs/utils.py and 1 other location - About 6 hrs to fix
apps/jobs/utils.py on lines 262..276

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

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 submission.challenge_phase.challenge.is_docker_based:
        try:
            response = requests.get(submission.input_file.url)
        except Exception:
            logger.exception("Failed to get input_file")
Severity: Major
Found in apps/jobs/utils.py and 1 other location - About 6 hrs to fix
apps/jobs/utils.py on lines 220..234

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

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

class Migration(migrations.Migration):

    dependencies = [
        ('jobs', '0021_add_submission_verified_field'),
    ]
Severity: Major
Found in apps/jobs/migrations/0022_add_submission_model_db_index.py and 1 other location - About 6 hrs to fix
apps/accounts/migrations/0001_add_url_fields_in_profile_model.py on lines 8..26

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

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

class Migration(migrations.Migration):

    dependencies = [("accounts", "remove_affiliation_model")]

    operations = [
apps/jobs/migrations/0022_add_submission_model_db_index.py on lines 6..26

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

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

describe('NotFoundComponent', () => {
  let component: NotFoundComponent;
  let fixture: ComponentFixture<NotFoundComponent>;

  beforeEach(async(() => {
frontend_v2/src/app/components/challenge/challengeanalytics/challengeanalytics.component.spec.ts on lines 5..24
frontend_v2/src/app/components/challenge/challengediscuss/challengediscuss.component.spec.ts on lines 5..24
frontend_v2/src/app/components/challenge/submission-meta-attributes-dialogue/submission-meta-attributes-dialogue.component.spec.ts on lines 5..24
frontend_v2/src/app/components/home/partners/partners.component.spec.ts on lines 5..24
frontend_v2/src/app/components/home/rules/rules.component.spec.ts on lines 5..24
frontend_v2/src/app/components/permission-denied/permission-denied.component.spec.ts on lines 5..24
frontend_v2/src/app/components/utility/side-bar/side-bar.component.spec.ts on lines 5..24

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

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

describe('ChallengeanalyticsComponent', () => {
  let component: ChallengeanalyticsComponent;
  let fixture: ComponentFixture<ChallengeanalyticsComponent>;

  beforeEach(async(() => {
frontend_v2/src/app/components/challenge/challengediscuss/challengediscuss.component.spec.ts on lines 5..24
frontend_v2/src/app/components/challenge/submission-meta-attributes-dialogue/submission-meta-attributes-dialogue.component.spec.ts on lines 5..24
frontend_v2/src/app/components/home/partners/partners.component.spec.ts on lines 5..24
frontend_v2/src/app/components/home/rules/rules.component.spec.ts on lines 5..24
frontend_v2/src/app/components/not-found/not-found.component.spec.ts on lines 5..24
frontend_v2/src/app/components/permission-denied/permission-denied.component.spec.ts on lines 5..24
frontend_v2/src/app/components/utility/side-bar/side-bar.component.spec.ts on lines 5..24

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

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

describe('SubmissionMetaAttributesDialogueComponent', () => {
  let component: SubmissionMetaAttributesDialogueComponent;
  let fixture: ComponentFixture<SubmissionMetaAttributesDialogueComponent>;

  beforeEach(async(() => {
frontend_v2/src/app/components/challenge/challengeanalytics/challengeanalytics.component.spec.ts on lines 5..24
frontend_v2/src/app/components/challenge/challengediscuss/challengediscuss.component.spec.ts on lines 5..24
frontend_v2/src/app/components/home/partners/partners.component.spec.ts on lines 5..24
frontend_v2/src/app/components/home/rules/rules.component.spec.ts on lines 5..24
frontend_v2/src/app/components/not-found/not-found.component.spec.ts on lines 5..24
frontend_v2/src/app/components/permission-denied/permission-denied.component.spec.ts on lines 5..24
frontend_v2/src/app/components/utility/side-bar/side-bar.component.spec.ts on lines 5..24

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

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

describe('PermissionDeniedComponent', () => {
  let component: PermissionDeniedComponent;
  let fixture: ComponentFixture<PermissionDeniedComponent>;

  beforeEach(async(() => {
frontend_v2/src/app/components/challenge/challengeanalytics/challengeanalytics.component.spec.ts on lines 5..24
frontend_v2/src/app/components/challenge/challengediscuss/challengediscuss.component.spec.ts on lines 5..24
frontend_v2/src/app/components/challenge/submission-meta-attributes-dialogue/submission-meta-attributes-dialogue.component.spec.ts on lines 5..24
frontend_v2/src/app/components/home/partners/partners.component.spec.ts on lines 5..24
frontend_v2/src/app/components/home/rules/rules.component.spec.ts on lines 5..24
frontend_v2/src/app/components/not-found/not-found.component.spec.ts on lines 5..24
frontend_v2/src/app/components/utility/side-bar/side-bar.component.spec.ts on lines 5..24

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

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

describe('SideBarComponent', () => {
  let component: SideBarComponent;
  let fixture: ComponentFixture<SideBarComponent>;

  beforeEach(async(() => {
frontend_v2/src/app/components/challenge/challengeanalytics/challengeanalytics.component.spec.ts on lines 5..24
frontend_v2/src/app/components/challenge/challengediscuss/challengediscuss.component.spec.ts on lines 5..24
frontend_v2/src/app/components/challenge/submission-meta-attributes-dialogue/submission-meta-attributes-dialogue.component.spec.ts on lines 5..24
frontend_v2/src/app/components/home/partners/partners.component.spec.ts on lines 5..24
frontend_v2/src/app/components/home/rules/rules.component.spec.ts on lines 5..24
frontend_v2/src/app/components/not-found/not-found.component.spec.ts on lines 5..24
frontend_v2/src/app/components/permission-denied/permission-denied.component.spec.ts on lines 5..24

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

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

describe('ChallengediscussComponent', () => {
  let component: ChallengediscussComponent;
  let fixture: ComponentFixture<ChallengediscussComponent>;

  beforeEach(async(() => {
frontend_v2/src/app/components/challenge/challengeanalytics/challengeanalytics.component.spec.ts on lines 5..24
frontend_v2/src/app/components/challenge/submission-meta-attributes-dialogue/submission-meta-attributes-dialogue.component.spec.ts on lines 5..24
frontend_v2/src/app/components/home/partners/partners.component.spec.ts on lines 5..24
frontend_v2/src/app/components/home/rules/rules.component.spec.ts on lines 5..24
frontend_v2/src/app/components/not-found/not-found.component.spec.ts on lines 5..24
frontend_v2/src/app/components/permission-denied/permission-denied.component.spec.ts on lines 5..24
frontend_v2/src/app/components/utility/side-bar/side-bar.component.spec.ts on lines 5..24

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

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

describe('PartnersComponent', () => {
  let component: PartnersComponent;
  let fixture: ComponentFixture<PartnersComponent>;

  beforeEach(async(() => {
frontend_v2/src/app/components/challenge/challengeanalytics/challengeanalytics.component.spec.ts on lines 5..24
frontend_v2/src/app/components/challenge/challengediscuss/challengediscuss.component.spec.ts on lines 5..24
frontend_v2/src/app/components/challenge/submission-meta-attributes-dialogue/submission-meta-attributes-dialogue.component.spec.ts on lines 5..24
frontend_v2/src/app/components/home/rules/rules.component.spec.ts on lines 5..24
frontend_v2/src/app/components/not-found/not-found.component.spec.ts on lines 5..24
frontend_v2/src/app/components/permission-denied/permission-denied.component.spec.ts on lines 5..24
frontend_v2/src/app/components/utility/side-bar/side-bar.component.spec.ts on lines 5..24

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

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

describe('RulesComponent', () => {
  let component: RulesComponent;
  let fixture: ComponentFixture<RulesComponent>;

  beforeEach(async(() => {
frontend_v2/src/app/components/challenge/challengeanalytics/challengeanalytics.component.spec.ts on lines 5..24
frontend_v2/src/app/components/challenge/challengediscuss/challengediscuss.component.spec.ts on lines 5..24
frontend_v2/src/app/components/challenge/submission-meta-attributes-dialogue/submission-meta-attributes-dialogue.component.spec.ts on lines 5..24
frontend_v2/src/app/components/home/partners/partners.component.spec.ts on lines 5..24
frontend_v2/src/app/components/not-found/not-found.component.spec.ts on lines 5..24
frontend_v2/src/app/components/permission-denied/permission-denied.component.spec.ts on lines 5..24
frontend_v2/src/app/components/utility/side-bar/side-bar.component.spec.ts on lines 5..24

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

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 main has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring.
Open

def main():
    killer = GracefulKiller()
    evalai = EvalAI_Interface(
        AUTH_TOKEN=AUTH_TOKEN,
        EVALAI_API_SERVER=EVALAI_API_SERVER,
Severity: Minor
Found in scripts/workers/code_upload_submission_worker.py - About 5 hrs to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

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

                    for (var i = 0; i < details.results.length; i++) {
                        vm.submissionVisibility[details.results[i].id] = details.results[i].is_public;
                        vm.baselineStatus[details.results[i].id] = details.results[i].is_baseline;
                        vm.verifiedStatus[details.results[i].id] = details.results[i].is_verified_by_host;
                    }
Severity: Major
Found in frontend/src/js/controllers/challengeCtrl.js and 1 other location - About 5 hrs to fix
frontend/src/js/controllers/challengeCtrl.js on lines 1221..1225

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

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

                            for (var i = 0; i < details.results.length; i++) {
                                vm.submissionVisibility[details.results[i].id] = details.results[i].is_public;
                                vm.baselineStatus[details.results[i].id] = details.results[i].is_baseline;
                                vm.verifiedStatus[details.results[i].id] = details.results[i].is_verified_by_host;
                            }
Severity: Major
Found in frontend/src/js/controllers/challengeCtrl.js and 1 other location - About 5 hrs to fix
frontend/src/js/controllers/challengeCtrl.js on lines 1464..1468

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

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

  fetchOurTeamMembers() {
    const API_PATH = this.endpointsService.ourTeamURL();
    const SELF = this;
    SELF.apiService.getUrl(API_PATH).subscribe(
      (data) => {
Severity: Major
Found in frontend_v2/src/app/components/our-team/our-team.component.ts - About 5 hrs to fix

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

        } else if (e.target.name === 'update_google_scholar_url') {
          if (this.validURL(e.target.value) || e.target.value === '') {
            this.isDisabled = false;
    
            this.invalidFields = this.invalidFields.filter((element) => element !== 'Google Scholar');
    frontend_v2/src/app/components/utility/modal/modal.component.ts on lines 336..370
    frontend_v2/src/app/components/utility/modal/modal.component.ts on lines 347..370

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

    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

        } else if (e.target.name === 'update_github_url') {
          if (this.validURL(e.target.value) || e.target.value === '') {
            this.isDisabled = false;
    
            this.invalidFields = this.invalidFields.filter((element) => element !== 'GitHub');
    frontend_v2/src/app/components/utility/modal/modal.component.ts on lines 325..370
    frontend_v2/src/app/components/utility/modal/modal.component.ts on lines 347..370

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

    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

        } else if (e.target.name === 'update_linkedin_url') {
          if (this.validURL(e.target.value) || e.target.value === '') {
            this.isDisabled = false;
    
            this.invalidFields = this.invalidFields.filter((element) => element !== 'LinkedIn');
    frontend_v2/src/app/components/utility/modal/modal.component.ts on lines 325..370
    frontend_v2/src/app/components/utility/modal/modal.component.ts on lines 336..370

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

    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