camdub/Internships

View on GitHub

Showing 387 of 584 total issues

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

    _escapeXML: function(text) {
        text = text.replace(/&/g, '&');
        text = text.replace(/</g, '&lt;');
        text = text.replace(/>/g, '&gt;');
        return text;
Severity: Major
Found in public/javascripts/jquery.svg/jquery.svg.js and 1 other location - About 1 hr to fix
public/javascripts/ejs.js on lines 281..287

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

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

        }else if(elem.is("a") || elem.is(":submit") || elem.is(":reset") || elem.is("button") || elem.is("input[type=button]")){
          doButton(elem);
        }
Severity: Major
Found in public/javascripts/jquery.uniform.js and 1 other location - About 1 hr to fix
public/javascripts/jquery.uniform.js on lines 625..635

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

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

    Chosen.prototype.result_clear_highlight = function() {
      if (this.result_highlight) {
        this.result_highlight.removeClass("highlighted");
      }
      return this.result_highlight = null;
Severity: Major
Found in public/javascripts/chosen/chosen.jquery.js and 3 other locations - About 1 hr to fix
public/javascripts/chosen/chosen.jquery.js on lines 818..823
public/javascripts/chosen/chosen.proto.js on lines 500..505
public/javascripts/chosen/chosen.proto.js on lines 834..839

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

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

        $( ".content_accordion" ).accordion({
            collapsible: true,
            active:false,
            header: 'h3.bar', // this is the element that will be clicked to activate the accordion 
            autoHeight:false,
Severity: Major
Found in public/javascripts/adminica_ui.js and 1 other location - About 1 hr to fix
public/javascripts/application.js on lines 171..179

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

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

    Chosen.prototype.clear_backstroke = function() {
      if (this.pending_backstroke) {
        this.pending_backstroke.removeClassName("search-choice-focus");
      }
      return this.pending_backstroke = null;
Severity: Major
Found in public/javascripts/chosen/chosen.proto.js and 3 other locations - About 1 hr to fix
public/javascripts/chosen/chosen.jquery.js on lines 509..514
public/javascripts/chosen/chosen.jquery.js on lines 818..823
public/javascripts/chosen/chosen.proto.js on lines 500..505

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

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 (result = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(colour)) {
        return [parseInt(result[1], 16), parseInt(result[2], 16), parseInt(result[3], 16)];
    }
Severity: Major
Found in public/javascripts/jquery.svg/jquery.svganim.js and 1 other location - About 1 hr to fix
public/javascripts/jquery.svg/jquery.svganim.js on lines 231..233

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

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

    Chosen.prototype.result_clear_highlight = function() {
      if (this.result_highlight) {
        this.result_highlight.removeClassName('highlighted');
      }
      return this.result_highlight = null;
Severity: Major
Found in public/javascripts/chosen/chosen.proto.js and 3 other locations - About 1 hr to fix
public/javascripts/chosen/chosen.jquery.js on lines 509..514
public/javascripts/chosen/chosen.jquery.js on lines 818..823
public/javascripts/chosen/chosen.proto.js on lines 834..839

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

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 (result = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(colour)) {
        return [parseInt(result[1], 10), parseInt(result[2], 10), parseInt(result[3], 10)];
    }
Severity: Major
Found in public/javascripts/jquery.svg/jquery.svganim.js and 1 other location - About 1 hr to fix
public/javascripts/jquery.svg/jquery.svganim.js on lines 240..242

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

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

    Chosen.prototype.clear_backstroke = function() {
      if (this.pending_backstroke) {
        this.pending_backstroke.removeClass("search-choice-focus");
      }
      return this.pending_backstroke = null;
Severity: Major
Found in public/javascripts/chosen/chosen.jquery.js and 3 other locations - About 1 hr to fix
public/javascripts/chosen/chosen.jquery.js on lines 509..514
public/javascripts/chosen/chosen.proto.js on lines 500..505
public/javascripts/chosen/chosen.proto.js on lines 834..839

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

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

            $( ".content_accordion" ).accordion({
                collapsible: true,
                active:false,
                header: 'h3.bar', // this is the element that will be clicked to activate the accordion 
                autoHeight:false,
Severity: Major
Found in public/javascripts/application.js and 1 other location - About 1 hr to fix
public/javascripts/adminica_ui.js on lines 59..67

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

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

  def update
    @college = College.find(params[:id])

    respond_to do |format|
      if @college.update_attributes(params[:college])
Severity: Major
Found in app/controllers/colleges_controller.rb and 24 other locations - About 1 hr to fix
app/controllers/academic_contacts_controller.rb on lines 69..78
app/controllers/academic_focus_types_controller.rb on lines 65..74
app/controllers/academic_focuses_controller.rb on lines 70..79
app/controllers/countries_controller.rb on lines 65..74
app/controllers/departments_controller.rb on lines 65..74
app/controllers/fields_controller.rb on lines 70..79
app/controllers/financial_assistance_option_types_controller.rb on lines 65..74
app/controllers/financial_assistance_options_controller.rb on lines 67..76
app/controllers/industries_controller.rb on lines 65..74
app/controllers/internship_instances_controller.rb on lines 65..74
app/controllers/internships_controller.rb on lines 191..199
app/controllers/languages_controller.rb on lines 67..76
app/controllers/locations_controller.rb on lines 67..76
app/controllers/long_term_goals_controller.rb on lines 67..76
app/controllers/provider_contacts_controller.rb on lines 75..84
app/controllers/provider_types_controller.rb on lines 65..74
app/controllers/providers_controller.rb on lines 68..77
app/controllers/roles_controller.rb on lines 58..67
app/controllers/semesters_controller.rb on lines 67..76
app/controllers/states_controller.rb on lines 65..74
app/controllers/students_controller.rb on lines 58..67
app/controllers/tags_controller.rb on lines 67..76
app/controllers/tasks_controller.rb on lines 67..76
app/controllers/users_controller.rb on lines 79..89

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

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

  def update
    @provider = Provider.find(params[:id])

    respond_to do |format|
      if @provider.update_attributes(params[:provider])
Severity: Major
Found in app/controllers/providers_controller.rb and 24 other locations - About 1 hr to fix
app/controllers/academic_contacts_controller.rb on lines 69..78
app/controllers/academic_focus_types_controller.rb on lines 65..74
app/controllers/academic_focuses_controller.rb on lines 70..79
app/controllers/colleges_controller.rb on lines 65..74
app/controllers/countries_controller.rb on lines 65..74
app/controllers/departments_controller.rb on lines 65..74
app/controllers/fields_controller.rb on lines 70..79
app/controllers/financial_assistance_option_types_controller.rb on lines 65..74
app/controllers/financial_assistance_options_controller.rb on lines 67..76
app/controllers/industries_controller.rb on lines 65..74
app/controllers/internship_instances_controller.rb on lines 65..74
app/controllers/internships_controller.rb on lines 191..199
app/controllers/languages_controller.rb on lines 67..76
app/controllers/locations_controller.rb on lines 67..76
app/controllers/long_term_goals_controller.rb on lines 67..76
app/controllers/provider_contacts_controller.rb on lines 75..84
app/controllers/provider_types_controller.rb on lines 65..74
app/controllers/roles_controller.rb on lines 58..67
app/controllers/semesters_controller.rb on lines 67..76
app/controllers/states_controller.rb on lines 65..74
app/controllers/students_controller.rb on lines 58..67
app/controllers/tags_controller.rb on lines 67..76
app/controllers/tasks_controller.rb on lines 67..76
app/controllers/users_controller.rb on lines 79..89

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

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

  def update
    @state = State.find(params[:id])

    respond_to do |format|
      if @state.update_attributes(params[:state])
Severity: Major
Found in app/controllers/states_controller.rb and 24 other locations - About 1 hr to fix
app/controllers/academic_contacts_controller.rb on lines 69..78
app/controllers/academic_focus_types_controller.rb on lines 65..74
app/controllers/academic_focuses_controller.rb on lines 70..79
app/controllers/colleges_controller.rb on lines 65..74
app/controllers/countries_controller.rb on lines 65..74
app/controllers/departments_controller.rb on lines 65..74
app/controllers/fields_controller.rb on lines 70..79
app/controllers/financial_assistance_option_types_controller.rb on lines 65..74
app/controllers/financial_assistance_options_controller.rb on lines 67..76
app/controllers/industries_controller.rb on lines 65..74
app/controllers/internship_instances_controller.rb on lines 65..74
app/controllers/internships_controller.rb on lines 191..199
app/controllers/languages_controller.rb on lines 67..76
app/controllers/locations_controller.rb on lines 67..76
app/controllers/long_term_goals_controller.rb on lines 67..76
app/controllers/provider_contacts_controller.rb on lines 75..84
app/controllers/provider_types_controller.rb on lines 65..74
app/controllers/providers_controller.rb on lines 68..77
app/controllers/roles_controller.rb on lines 58..67
app/controllers/semesters_controller.rb on lines 67..76
app/controllers/students_controller.rb on lines 58..67
app/controllers/tags_controller.rb on lines 67..76
app/controllers/tasks_controller.rb on lines 67..76
app/controllers/users_controller.rb on lines 79..89

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

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

    vert: function(y, relative) {
        this._path += (relative ? 'v' : 'V') + (isArray(y) ? y.join(' ') : y);
        return this;
    },
Severity: Major
Found in public/javascripts/jquery.svg/jquery.svg.js and 1 other location - About 1 hr to fix
public/javascripts/jquery.svg/jquery.svg.js on lines 1108..1111

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

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

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

    respond_to do |format|
      if @academic_contact.update_attributes(params[:academic_contact])
Severity: Major
Found in app/controllers/academic_contacts_controller.rb and 24 other locations - About 1 hr to fix
app/controllers/academic_focus_types_controller.rb on lines 65..74
app/controllers/academic_focuses_controller.rb on lines 70..79
app/controllers/colleges_controller.rb on lines 65..74
app/controllers/countries_controller.rb on lines 65..74
app/controllers/departments_controller.rb on lines 65..74
app/controllers/fields_controller.rb on lines 70..79
app/controllers/financial_assistance_option_types_controller.rb on lines 65..74
app/controllers/financial_assistance_options_controller.rb on lines 67..76
app/controllers/industries_controller.rb on lines 65..74
app/controllers/internship_instances_controller.rb on lines 65..74
app/controllers/internships_controller.rb on lines 191..199
app/controllers/languages_controller.rb on lines 67..76
app/controllers/locations_controller.rb on lines 67..76
app/controllers/long_term_goals_controller.rb on lines 67..76
app/controllers/provider_contacts_controller.rb on lines 75..84
app/controllers/provider_types_controller.rb on lines 65..74
app/controllers/providers_controller.rb on lines 68..77
app/controllers/roles_controller.rb on lines 58..67
app/controllers/semesters_controller.rb on lines 67..76
app/controllers/states_controller.rb on lines 65..74
app/controllers/students_controller.rb on lines 58..67
app/controllers/tags_controller.rb on lines 67..76
app/controllers/tasks_controller.rb on lines 67..76
app/controllers/users_controller.rb on lines 79..89

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

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

  def update
    @internship = Internship.find(params[:id])
    respond_to do |format|
      if @internship.update_attributes(params[:internship])
        format.html { redirect_to(@internship, :notice => 'Internship was successfully updated.') }
Severity: Major
Found in app/controllers/internships_controller.rb and 24 other locations - About 1 hr to fix
app/controllers/academic_contacts_controller.rb on lines 69..78
app/controllers/academic_focus_types_controller.rb on lines 65..74
app/controllers/academic_focuses_controller.rb on lines 70..79
app/controllers/colleges_controller.rb on lines 65..74
app/controllers/countries_controller.rb on lines 65..74
app/controllers/departments_controller.rb on lines 65..74
app/controllers/fields_controller.rb on lines 70..79
app/controllers/financial_assistance_option_types_controller.rb on lines 65..74
app/controllers/financial_assistance_options_controller.rb on lines 67..76
app/controllers/industries_controller.rb on lines 65..74
app/controllers/internship_instances_controller.rb on lines 65..74
app/controllers/languages_controller.rb on lines 67..76
app/controllers/locations_controller.rb on lines 67..76
app/controllers/long_term_goals_controller.rb on lines 67..76
app/controllers/provider_contacts_controller.rb on lines 75..84
app/controllers/provider_types_controller.rb on lines 65..74
app/controllers/providers_controller.rb on lines 68..77
app/controllers/roles_controller.rb on lines 58..67
app/controllers/semesters_controller.rb on lines 67..76
app/controllers/states_controller.rb on lines 65..74
app/controllers/students_controller.rb on lines 58..67
app/controllers/tags_controller.rb on lines 67..76
app/controllers/tasks_controller.rb on lines 67..76
app/controllers/users_controller.rb on lines 79..89

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

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

  def update
    @task = Task.find(params[:id])

    respond_to do |format|
      if @task.update_attributes(params[:task])
Severity: Major
Found in app/controllers/tasks_controller.rb and 24 other locations - About 1 hr to fix
app/controllers/academic_contacts_controller.rb on lines 69..78
app/controllers/academic_focus_types_controller.rb on lines 65..74
app/controllers/academic_focuses_controller.rb on lines 70..79
app/controllers/colleges_controller.rb on lines 65..74
app/controllers/countries_controller.rb on lines 65..74
app/controllers/departments_controller.rb on lines 65..74
app/controllers/fields_controller.rb on lines 70..79
app/controllers/financial_assistance_option_types_controller.rb on lines 65..74
app/controllers/financial_assistance_options_controller.rb on lines 67..76
app/controllers/industries_controller.rb on lines 65..74
app/controllers/internship_instances_controller.rb on lines 65..74
app/controllers/internships_controller.rb on lines 191..199
app/controllers/languages_controller.rb on lines 67..76
app/controllers/locations_controller.rb on lines 67..76
app/controllers/long_term_goals_controller.rb on lines 67..76
app/controllers/provider_contacts_controller.rb on lines 75..84
app/controllers/provider_types_controller.rb on lines 65..74
app/controllers/providers_controller.rb on lines 68..77
app/controllers/roles_controller.rb on lines 58..67
app/controllers/semesters_controller.rb on lines 67..76
app/controllers/states_controller.rb on lines 65..74
app/controllers/students_controller.rb on lines 58..67
app/controllers/tags_controller.rb on lines 67..76
app/controllers/users_controller.rb on lines 79..89

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

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

  def update
    @country = Country.find(params[:id])

    respond_to do |format|
      if @country.update_attributes(params[:country])
Severity: Major
Found in app/controllers/countries_controller.rb and 24 other locations - About 1 hr to fix
app/controllers/academic_contacts_controller.rb on lines 69..78
app/controllers/academic_focus_types_controller.rb on lines 65..74
app/controllers/academic_focuses_controller.rb on lines 70..79
app/controllers/colleges_controller.rb on lines 65..74
app/controllers/departments_controller.rb on lines 65..74
app/controllers/fields_controller.rb on lines 70..79
app/controllers/financial_assistance_option_types_controller.rb on lines 65..74
app/controllers/financial_assistance_options_controller.rb on lines 67..76
app/controllers/industries_controller.rb on lines 65..74
app/controllers/internship_instances_controller.rb on lines 65..74
app/controllers/internships_controller.rb on lines 191..199
app/controllers/languages_controller.rb on lines 67..76
app/controllers/locations_controller.rb on lines 67..76
app/controllers/long_term_goals_controller.rb on lines 67..76
app/controllers/provider_contacts_controller.rb on lines 75..84
app/controllers/provider_types_controller.rb on lines 65..74
app/controllers/providers_controller.rb on lines 68..77
app/controllers/roles_controller.rb on lines 58..67
app/controllers/semesters_controller.rb on lines 67..76
app/controllers/states_controller.rb on lines 65..74
app/controllers/students_controller.rb on lines 58..67
app/controllers/tags_controller.rb on lines 67..76
app/controllers/tasks_controller.rb on lines 67..76
app/controllers/users_controller.rb on lines 79..89

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

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

  def update
    @location = Location.find(params[:id])

    respond_to do |format|
      if @location.update_attributes(params[:location])
Severity: Major
Found in app/controllers/locations_controller.rb and 24 other locations - About 1 hr to fix
app/controllers/academic_contacts_controller.rb on lines 69..78
app/controllers/academic_focus_types_controller.rb on lines 65..74
app/controllers/academic_focuses_controller.rb on lines 70..79
app/controllers/colleges_controller.rb on lines 65..74
app/controllers/countries_controller.rb on lines 65..74
app/controllers/departments_controller.rb on lines 65..74
app/controllers/fields_controller.rb on lines 70..79
app/controllers/financial_assistance_option_types_controller.rb on lines 65..74
app/controllers/financial_assistance_options_controller.rb on lines 67..76
app/controllers/industries_controller.rb on lines 65..74
app/controllers/internship_instances_controller.rb on lines 65..74
app/controllers/internships_controller.rb on lines 191..199
app/controllers/languages_controller.rb on lines 67..76
app/controllers/long_term_goals_controller.rb on lines 67..76
app/controllers/provider_contacts_controller.rb on lines 75..84
app/controllers/provider_types_controller.rb on lines 65..74
app/controllers/providers_controller.rb on lines 68..77
app/controllers/roles_controller.rb on lines 58..67
app/controllers/semesters_controller.rb on lines 67..76
app/controllers/states_controller.rb on lines 65..74
app/controllers/students_controller.rb on lines 58..67
app/controllers/tags_controller.rb on lines 67..76
app/controllers/tasks_controller.rb on lines 67..76
app/controllers/users_controller.rb on lines 79..89

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

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

  def update
    @semester = Semester.find(params[:id])

    respond_to do |format|
      if @semester.update_attributes(params[:semester])
Severity: Major
Found in app/controllers/semesters_controller.rb and 24 other locations - About 1 hr to fix
app/controllers/academic_contacts_controller.rb on lines 69..78
app/controllers/academic_focus_types_controller.rb on lines 65..74
app/controllers/academic_focuses_controller.rb on lines 70..79
app/controllers/colleges_controller.rb on lines 65..74
app/controllers/countries_controller.rb on lines 65..74
app/controllers/departments_controller.rb on lines 65..74
app/controllers/fields_controller.rb on lines 70..79
app/controllers/financial_assistance_option_types_controller.rb on lines 65..74
app/controllers/financial_assistance_options_controller.rb on lines 67..76
app/controllers/industries_controller.rb on lines 65..74
app/controllers/internship_instances_controller.rb on lines 65..74
app/controllers/internships_controller.rb on lines 191..199
app/controllers/languages_controller.rb on lines 67..76
app/controllers/locations_controller.rb on lines 67..76
app/controllers/long_term_goals_controller.rb on lines 67..76
app/controllers/provider_contacts_controller.rb on lines 75..84
app/controllers/provider_types_controller.rb on lines 65..74
app/controllers/providers_controller.rb on lines 68..77
app/controllers/roles_controller.rb on lines 58..67
app/controllers/states_controller.rb on lines 65..74
app/controllers/students_controller.rb on lines 58..67
app/controllers/tags_controller.rb on lines 67..76
app/controllers/tasks_controller.rb on lines 67..76
app/controllers/users_controller.rb on lines 79..89

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

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