concord-consortium/rigse

View on GitHub

Showing 2,136 of 2,138 total issues

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

  def destroy
    @nces06_district = Portal::Nces06District.find(params[:id])
    # PUNDIT_REVIEW_AUTHORIZE
    # PUNDIT_CHECK_AUTHORIZE (found instance)
    # authorize @nces06_district
Severity: Major
Found in rails/app/controllers/portal/nces06_districts_controller.rb and 7 other locations - About 15 mins to fix
rails/app/controllers/portal/courses_controller.rb on lines 105..114
rails/app/controllers/portal/learners_controller.rb on lines 160..169
rails/app/controllers/portal/nces06_schools_controller.rb on lines 129..138
rails/app/controllers/portal/school_memberships_controller.rb on lines 103..112
rails/app/controllers/portal/students_controller.rb on lines 245..254
rails/app/controllers/portal/subjects_controller.rb on lines 101..110
rails/app/controllers/portal/teachers_controller.rb on lines 75..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 25.

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

  def destroy
    @nces06_school = Portal::Nces06School.find(params[:id])
    # PUNDIT_REVIEW_AUTHORIZE
    # PUNDIT_CHECK_AUTHORIZE (found instance)
    # authorize @nces06_school
Severity: Major
Found in rails/app/controllers/portal/nces06_schools_controller.rb and 7 other locations - About 15 mins to fix
rails/app/controllers/portal/courses_controller.rb on lines 105..114
rails/app/controllers/portal/learners_controller.rb on lines 160..169
rails/app/controllers/portal/nces06_districts_controller.rb on lines 128..137
rails/app/controllers/portal/school_memberships_controller.rb on lines 103..112
rails/app/controllers/portal/students_controller.rb on lines 245..254
rails/app/controllers/portal/subjects_controller.rb on lines 101..110
rails/app/controllers/portal/teachers_controller.rb on lines 75..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 25.

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

  def destroy
    @school_membership = Portal::SchoolMembership.find(params[:id])
    # PUNDIT_REVIEW_AUTHORIZE
    # PUNDIT_CHECK_AUTHORIZE (found instance)
    # authorize @school_membership
Severity: Major
Found in rails/app/controllers/portal/school_memberships_controller.rb and 7 other locations - About 15 mins to fix
rails/app/controllers/portal/courses_controller.rb on lines 105..114
rails/app/controllers/portal/learners_controller.rb on lines 160..169
rails/app/controllers/portal/nces06_districts_controller.rb on lines 128..137
rails/app/controllers/portal/nces06_schools_controller.rb on lines 129..138
rails/app/controllers/portal/students_controller.rb on lines 245..254
rails/app/controllers/portal/subjects_controller.rb on lines 101..110
rails/app/controllers/portal/teachers_controller.rb on lines 75..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 25.

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

  def destroy
    @course = Portal::Course.find(params[:id])
    # PUNDIT_REVIEW_AUTHORIZE
    # PUNDIT_CHECK_AUTHORIZE (found instance)
    # authorize @course
Severity: Major
Found in rails/app/controllers/portal/courses_controller.rb and 7 other locations - About 15 mins to fix
rails/app/controllers/portal/learners_controller.rb on lines 160..169
rails/app/controllers/portal/nces06_districts_controller.rb on lines 128..137
rails/app/controllers/portal/nces06_schools_controller.rb on lines 129..138
rails/app/controllers/portal/school_memberships_controller.rb on lines 103..112
rails/app/controllers/portal/students_controller.rb on lines 245..254
rails/app/controllers/portal/subjects_controller.rb on lines 101..110
rails/app/controllers/portal/teachers_controller.rb on lines 75..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 25.

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 self.up
    create_table :maven_jnlp_versioned_jnlp_urls do |t|
      t.string :uuid
      t.integer :maven_jnlp_family_id
      t.string :path
rails/db/migrate/20090529154426_create_maven_jnlp_maven_jnlp_servers.rb on lines 2..10
rails/db/migrate/20090529154441_create_maven_jnlp_maven_jnlp_families.rb on lines 2..10
rails/db/migrate/20090529154452_create_maven_jnlp_icons.rb on lines 2..10

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

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 self.up
    create_table :maven_jnlp_icons do |t|
      t.string :uuid
      t.string :name
      t.string :href
Severity: Minor
Found in rails/db/migrate/20090529154452_create_maven_jnlp_icons.rb and 3 other locations - About 15 mins to fix
rails/db/migrate/20090529154426_create_maven_jnlp_maven_jnlp_servers.rb on lines 2..10
rails/db/migrate/20090529154441_create_maven_jnlp_maven_jnlp_families.rb on lines 2..10
rails/db/migrate/20090529154502_create_maven_jnlp_versioned_jnlp_urls.rb on lines 2..10

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

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 self.up
    create_table :maven_jnlp_maven_jnlp_servers do |t|
      t.string :uuid
      t.string :host
      t.string :path
rails/db/migrate/20090529154441_create_maven_jnlp_maven_jnlp_families.rb on lines 2..10
rails/db/migrate/20090529154452_create_maven_jnlp_icons.rb on lines 2..10
rails/db/migrate/20090529154502_create_maven_jnlp_versioned_jnlp_urls.rb on lines 2..10

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

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

  def destroy
    # PUNDIT_REVIEW_AUTHORIZE
    # PUNDIT_CHECK_AUTHORIZE (did not find instance)
    # authorize @student
    @portal_student = Portal::Student.find(params[:id])
Severity: Major
Found in rails/app/controllers/portal/students_controller.rb and 7 other locations - About 15 mins to fix
rails/app/controllers/portal/courses_controller.rb on lines 105..114
rails/app/controllers/portal/learners_controller.rb on lines 160..169
rails/app/controllers/portal/nces06_districts_controller.rb on lines 128..137
rails/app/controllers/portal/nces06_schools_controller.rb on lines 129..138
rails/app/controllers/portal/school_memberships_controller.rb on lines 103..112
rails/app/controllers/portal/subjects_controller.rb on lines 101..110
rails/app/controllers/portal/teachers_controller.rb on lines 75..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 25.

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 self.up
    create_table :maven_jnlp_maven_jnlp_families do |t|
      t.integer :maven_jnlp_server_id
      t.string :uuid
      t.string :name
rails/db/migrate/20090529154426_create_maven_jnlp_maven_jnlp_servers.rb on lines 2..10
rails/db/migrate/20090529154452_create_maven_jnlp_icons.rb on lines 2..10
rails/db/migrate/20090529154502_create_maven_jnlp_versioned_jnlp_urls.rb on lines 2..10

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

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

  def destroy
    # PUNDIT_REVIEW_AUTHORIZE
    # PUNDIT_CHECK_AUTHORIZE (did not find instance)
    # authorize @learner
    @portal_learner = Portal::Learner.find(params[:id])
Severity: Major
Found in rails/app/controllers/portal/learners_controller.rb and 7 other locations - About 15 mins to fix
rails/app/controllers/portal/courses_controller.rb on lines 105..114
rails/app/controllers/portal/nces06_districts_controller.rb on lines 128..137
rails/app/controllers/portal/nces06_schools_controller.rb on lines 129..138
rails/app/controllers/portal/school_memberships_controller.rb on lines 103..112
rails/app/controllers/portal/students_controller.rb on lines 245..254
rails/app/controllers/portal/subjects_controller.rb on lines 101..110
rails/app/controllers/portal/teachers_controller.rb on lines 75..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 25.

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

  def destroy
    @subject = Portal::Subject.find(params[:id])
    # PUNDIT_REVIEW_AUTHORIZE
    # PUNDIT_CHECK_AUTHORIZE (found instance)
    # authorize @subject
Severity: Major
Found in rails/app/controllers/portal/subjects_controller.rb and 7 other locations - About 15 mins to fix
rails/app/controllers/portal/courses_controller.rb on lines 105..114
rails/app/controllers/portal/learners_controller.rb on lines 160..169
rails/app/controllers/portal/nces06_districts_controller.rb on lines 128..137
rails/app/controllers/portal/nces06_schools_controller.rb on lines 129..138
rails/app/controllers/portal/school_memberships_controller.rb on lines 103..112
rails/app/controllers/portal/students_controller.rb on lines 245..254
rails/app/controllers/portal/teachers_controller.rb on lines 75..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 25.

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

  def self.up
    create_table :portal_teachers do |t|

      t.string    :uuid, :limit => 36
      t.string    :name
Severity: Minor
Found in rails/db/migrate/20090701153612_create_teachers.rb and 2 other locations - About 15 mins to fix
rails/db/migrate/20090701153606_create_schools.rb on lines 2..11
rails/db/migrate/20090701153611_create_subjects.rb on lines 2..11

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

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 current_user
      # If the user has a portal_teacher or portal_student, we don't want them re-registering
      # The errors in this case will be passed down to the registration form.
      # The use of school_id is so the error message is shown in the form.
      if current_user.portal_teacher
Severity: Minor
Found in rails/app/controllers/api/v1/teachers_controller.rb and 1 other location - About 15 mins to fix
rails/app/controllers/api/v1/students_controller.rb on lines 10..20

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

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 current_user
      # If the user has a portal_teacher or portal_student, we don't want them re-registering
      # The errors in this case will be passed down to the registration form.
      # The use of class_word is so the error message is shown in the form.
      if current_user.portal_teacher
Severity: Minor
Found in rails/app/controllers/api/v1/students_controller.rb and 1 other location - About 15 mins to fix
rails/app/controllers/api/v1/teachers_controller.rb on lines 12..22

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

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

  def self.up
    create_table :portal_subjects do |t|

      t.string    :uuid, :limit => 36
      t.string    :name
Severity: Minor
Found in rails/db/migrate/20090701153611_create_subjects.rb and 2 other locations - About 15 mins to fix
rails/db/migrate/20090701153606_create_schools.rb on lines 2..11
rails/db/migrate/20090701153612_create_teachers.rb on lines 2..11

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

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

  def self.up
    create_table :portal_schools do |t|

      t.string    :uuid, :limit => 36
      t.string    :name
Severity: Minor
Found in rails/db/migrate/20090701153606_create_schools.rb and 2 other locations - About 15 mins to fix
rails/db/migrate/20090701153611_create_subjects.rb on lines 2..11
rails/db/migrate/20090701153612_create_teachers.rb on lines 2..11

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

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