camdub/Internships

View on GitHub

Showing 387 of 584 total issues

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

        var left = (area[this.L] > 1 ? area[this.L] : availWidth * area[this.L]);
Severity: Major
Found in public/javascripts/jquery.svg/jquery.svggraph.js and 3 other locations - About 30 mins to fix
public/javascripts/jquery.svg/jquery.svggraph.js on lines 366..366
public/javascripts/jquery.svg/jquery.svgplot.js on lines 273..273
public/javascripts/jquery.svg/jquery.svgplot.js on lines 274..274

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

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

        var left = (area[this.L] > 1 ? area[this.L] : availWidth * area[this.L]);
Severity: Major
Found in public/javascripts/jquery.svg/jquery.svgplot.js and 3 other locations - About 30 mins to fix
public/javascripts/jquery.svg/jquery.svggraph.js on lines 365..365
public/javascripts/jquery.svg/jquery.svggraph.js on lines 366..366
public/javascripts/jquery.svg/jquery.svgplot.js on lines 274..274

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

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

        var top = (area[this.T] > 1 ? area[this.T] : availHeight * area[this.T]);
Severity: Major
Found in public/javascripts/jquery.svg/jquery.svggraph.js and 3 other locations - About 30 mins to fix
public/javascripts/jquery.svg/jquery.svggraph.js on lines 365..365
public/javascripts/jquery.svg/jquery.svgplot.js on lines 273..273
public/javascripts/jquery.svg/jquery.svgplot.js on lines 274..274

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

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

      this.default_text = this.form_field.readAttribute('data-placeholder') ? this.form_field.readAttribute('data-placeholder') : this.default_text_default;
Severity: Minor
Found in public/javascripts/chosen/chosen.proto.js and 1 other location - About 30 mins to fix
public/javascripts/chosen/chosen.jquery.js on lines 277..277

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

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

      this.default_text = this.form_field_jq.data('placeholder') ? this.form_field_jq.data('placeholder') : this.default_text_default;
Severity: Minor
Found in public/javascripts/chosen/chosen.jquery.js and 1 other location - About 30 mins to fix
public/javascripts/chosen/chosen.proto.js on lines 274..274

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

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

  def new
    @provider_contact = ProviderContact.new

    respond_to do |format|
      format.html { 
Severity: Major
Found in app/controllers/provider_contacts_controller.rb and 9 other locations - About 25 mins to fix
app/controllers/academic_contacts_controller.rb on lines 35..42
app/controllers/academic_focuses_controller.rb on lines 36..43
app/controllers/fields_controller.rb on lines 33..40
app/controllers/financial_assistance_options_controller.rb on lines 33..40
app/controllers/languages_controller.rb on lines 33..40
app/controllers/locations_controller.rb on lines 33..40
app/controllers/providers_controller.rb on lines 34..41
app/controllers/semesters_controller.rb on lines 33..40
app/controllers/tasks_controller.rb on lines 34..40

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

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

  def new
    @provider = Provider.new

    respond_to do |format|
      format.html { 
Severity: Major
Found in app/controllers/providers_controller.rb and 9 other locations - About 25 mins to fix
app/controllers/academic_contacts_controller.rb on lines 35..42
app/controllers/academic_focuses_controller.rb on lines 36..43
app/controllers/fields_controller.rb on lines 33..40
app/controllers/financial_assistance_options_controller.rb on lines 33..40
app/controllers/languages_controller.rb on lines 33..40
app/controllers/locations_controller.rb on lines 33..40
app/controllers/provider_contacts_controller.rb on lines 41..48
app/controllers/semesters_controller.rb on lines 33..40
app/controllers/tasks_controller.rb on lines 34..40

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

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

  def new
    @academic_focus = AcademicFocus.new

    respond_to do |format|
      format.html { 
Severity: Major
Found in app/controllers/academic_focuses_controller.rb and 9 other locations - About 25 mins to fix
app/controllers/academic_contacts_controller.rb on lines 35..42
app/controllers/fields_controller.rb on lines 33..40
app/controllers/financial_assistance_options_controller.rb on lines 33..40
app/controllers/languages_controller.rb on lines 33..40
app/controllers/locations_controller.rb on lines 33..40
app/controllers/provider_contacts_controller.rb on lines 41..48
app/controllers/providers_controller.rb on lines 34..41
app/controllers/semesters_controller.rb on lines 33..40
app/controllers/tasks_controller.rb on lines 34..40

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

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

  def new
    @task = Task.new
    respond_to do |format|
      format.html { 
        render :layout => 'layouts/dialog' if params[:dialog] == 'true'
Severity: Major
Found in app/controllers/tasks_controller.rb and 9 other locations - About 25 mins to fix
app/controllers/academic_contacts_controller.rb on lines 35..42
app/controllers/academic_focuses_controller.rb on lines 36..43
app/controllers/fields_controller.rb on lines 33..40
app/controllers/financial_assistance_options_controller.rb on lines 33..40
app/controllers/languages_controller.rb on lines 33..40
app/controllers/locations_controller.rb on lines 33..40
app/controllers/provider_contacts_controller.rb on lines 41..48
app/controllers/providers_controller.rb on lines 34..41
app/controllers/semesters_controller.rb on lines 33..40

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

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

  def new
    @language = Language.new

    respond_to do |format|
      format.html { 
Severity: Major
Found in app/controllers/languages_controller.rb and 9 other locations - About 25 mins to fix
app/controllers/academic_contacts_controller.rb on lines 35..42
app/controllers/academic_focuses_controller.rb on lines 36..43
app/controllers/fields_controller.rb on lines 33..40
app/controllers/financial_assistance_options_controller.rb on lines 33..40
app/controllers/locations_controller.rb on lines 33..40
app/controllers/provider_contacts_controller.rb on lines 41..48
app/controllers/providers_controller.rb on lines 34..41
app/controllers/semesters_controller.rb on lines 33..40
app/controllers/tasks_controller.rb on lines 34..40

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

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

  def new
    @financial_assistance_option = FinancialAssistanceOption.new

    respond_to do |format|
      format.html { 
Severity: Major
Found in app/controllers/financial_assistance_options_controller.rb and 9 other locations - About 25 mins to fix
app/controllers/academic_contacts_controller.rb on lines 35..42
app/controllers/academic_focuses_controller.rb on lines 36..43
app/controllers/fields_controller.rb on lines 33..40
app/controllers/languages_controller.rb on lines 33..40
app/controllers/locations_controller.rb on lines 33..40
app/controllers/provider_contacts_controller.rb on lines 41..48
app/controllers/providers_controller.rb on lines 34..41
app/controllers/semesters_controller.rb on lines 33..40
app/controllers/tasks_controller.rb on lines 34..40

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

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

  def new
    @semester = Semester.new

    respond_to do |format|
      format.html { 
Severity: Major
Found in app/controllers/semesters_controller.rb and 9 other locations - About 25 mins to fix
app/controllers/academic_contacts_controller.rb on lines 35..42
app/controllers/academic_focuses_controller.rb on lines 36..43
app/controllers/fields_controller.rb on lines 33..40
app/controllers/financial_assistance_options_controller.rb on lines 33..40
app/controllers/languages_controller.rb on lines 33..40
app/controllers/locations_controller.rb on lines 33..40
app/controllers/provider_contacts_controller.rb on lines 41..48
app/controllers/providers_controller.rb on lines 34..41
app/controllers/tasks_controller.rb on lines 34..40

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

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

  def new
    @location = Location.new

    respond_to do |format|
      format.html { 
Severity: Major
Found in app/controllers/locations_controller.rb and 9 other locations - About 25 mins to fix
app/controllers/academic_contacts_controller.rb on lines 35..42
app/controllers/academic_focuses_controller.rb on lines 36..43
app/controllers/fields_controller.rb on lines 33..40
app/controllers/financial_assistance_options_controller.rb on lines 33..40
app/controllers/languages_controller.rb on lines 33..40
app/controllers/provider_contacts_controller.rb on lines 41..48
app/controllers/providers_controller.rb on lines 34..41
app/controllers/semesters_controller.rb on lines 33..40
app/controllers/tasks_controller.rb on lines 34..40

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

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

  def new
    @field = Field.new

    respond_to do |format|
      format.html { 
Severity: Major
Found in app/controllers/fields_controller.rb and 9 other locations - About 25 mins to fix
app/controllers/academic_contacts_controller.rb on lines 35..42
app/controllers/academic_focuses_controller.rb on lines 36..43
app/controllers/financial_assistance_options_controller.rb on lines 33..40
app/controllers/languages_controller.rb on lines 33..40
app/controllers/locations_controller.rb on lines 33..40
app/controllers/provider_contacts_controller.rb on lines 41..48
app/controllers/providers_controller.rb on lines 34..41
app/controllers/semesters_controller.rb on lines 33..40
app/controllers/tasks_controller.rb on lines 34..40

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

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

  def new
    @academic_contact = AcademicContact.new

    respond_to do |format|
      format.html { 
Severity: Major
Found in app/controllers/academic_contacts_controller.rb and 9 other locations - About 25 mins to fix
app/controllers/academic_focuses_controller.rb on lines 36..43
app/controllers/fields_controller.rb on lines 33..40
app/controllers/financial_assistance_options_controller.rb on lines 33..40
app/controllers/languages_controller.rb on lines 33..40
app/controllers/locations_controller.rb on lines 33..40
app/controllers/provider_contacts_controller.rb on lines 41..48
app/controllers/providers_controller.rb on lines 34..41
app/controllers/semesters_controller.rb on lines 33..40
app/controllers/tasks_controller.rb on lines 34..40

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

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 index
    @languages = Language.where("name like ?", "%#{params[:q]}%")

    respond_to do |format|
      format.html # index.html.erb
Severity: Minor
Found in app/controllers/languages_controller.rb and 2 other locations - About 20 mins to fix
app/controllers/fields_controller.rb on lines 12..16
app/controllers/locations_controller.rb on lines 11..16

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 28.

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

  def index
    
    @tags = Tag.all

    respond_to do |format|
Severity: Minor
Found in app/controllers/tags_controller.rb and 1 other location - About 20 mins to fix
app/controllers/tasks_controller.rb on lines 11..17

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 28.

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

  def show
    @provider_contact = ProviderContact.find(params[:id])

    respond_to do |format|
      format.html # show.html.erb
Severity: Minor
Found in app/controllers/provider_contacts_controller.rb and 1 other location - About 20 mins to fix
app/controllers/academic_contacts_controller.rb on lines 23..29

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 28.

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 index
    @fields = Field.where("name like ?", "%#{params[:q]}%")
    respond_to do |format|
      format.html # index.html.erb
      format.json { render :json => @fields.map(&:attributes) }
Severity: Minor
Found in app/controllers/fields_controller.rb and 2 other locations - About 20 mins to fix
app/controllers/languages_controller.rb on lines 11..16
app/controllers/locations_controller.rb on lines 11..16

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 28.

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

  def show
    @academic_contact = AcademicContact.find(params[:id])

    respond_to do |format|
      format.html # show.html.erb
Severity: Minor
Found in app/controllers/academic_contacts_controller.rb and 1 other location - About 20 mins to fix
app/controllers/provider_contacts_controller.rb on lines 29..35

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

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