camdub/Internships

View on GitHub

Showing 387 of 584 total issues

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

        this._wrapper.rect(g, dims[this.X], dims[this.Y], dims[this.W], dims[this.H],
            this.legend._bgSettings);
Severity: Major
Found in public/javascripts/jquery.svg/jquery.svgplot.js and 1 other location - About 1 hr to fix
public/javascripts/jquery.svg/jquery.svggraph.js on lines 533..534

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

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

                graph._wrapper.text(gt, dims[graph.X] - axis._ticks.size, y,
                    (axis._labels ? axis._labels[i] : '' + i));
Severity: Major
Found in public/javascripts/jquery.svg/jquery.svggraph.js and 1 other location - About 1 hr to fix
public/javascripts/jquery.svg/jquery.svggraph.js on lines 1188..1189

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

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

    Chosen.prototype.blur_test = function(evt) {
      if (!this.active_field && this.container.hasClass("chzn-container-active")) {
        return this.close_field();
      }
    };
Severity: Major
Found in public/javascripts/chosen/chosen.jquery.js and 1 other location - About 1 hr to fix
public/javascripts/chosen/chosen.proto.js on lines 401..405

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

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

      target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
Severity: Major
Found in public/javascripts/chosen/chosen.jquery.js and 1 other location - About 1 hr to fix
public/javascripts/chosen/chosen.jquery.js on lines 575..575

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

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

        var p = graph._wrapper.path(this._chart, path,
            $.extend({id: 'series' + cur, fill: 'none', stroke: series._stroke,
            strokeWidth: series._strokeWidth}, series._settings || {}));
Severity: Major
Found in public/javascripts/jquery.svg/jquery.svggraph.js and 1 other location - About 1 hr to fix
public/javascripts/jquery.svg/jquery.svgplot.js on lines 406..408

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

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 (this._gridlines[0] && this.yAxis._ticks.major && !noYGrid) {
            this._drawGridlines(bg, true, this._gridlines[0], dims);
        }
Severity: Major
Found in public/javascripts/jquery.svg/jquery.svgplot.js and 1 other location - About 1 hr to fix
public/javascripts/jquery.svg/jquery.svgplot.js on lines 305..307

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

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 (this._gridlines[1] && this.xAxis._ticks.major && !noXGrid) {
            this._drawGridlines(bg, false, this._gridlines[1], dims);
        }
Severity: Major
Found in public/javascripts/jquery.svg/jquery.svgplot.js and 1 other location - About 1 hr to fix
public/javascripts/jquery.svg/jquery.svgplot.js on lines 302..304

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

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

        $("a.toggle").click(function(){
            $(this).toggleClass("toggle_closed").next().slideToggle("slow");
            return false; //Prevent the browser jump to the link anchor
        });
Severity: Major
Found in public/javascripts/adminica_ui.js and 1 other location - About 1 hr to fix
public/javascripts/application.js on lines 152..155

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

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

            $("a.toggle").click(function(){
                $(this).toggleClass("toggle_closed").next().slideToggle("slow");
                return false; //Prevent the browser jump to the link anchor
            });
Severity: Major
Found in public/javascripts/application.js and 1 other location - About 1 hr to fix
public/javascripts/adminica_ui.js on lines 43..46

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

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

    polygon: function(parent, points, settings) {
        var args = this._args(arguments, ['points']);
        return this._poly(args.parent, 'polygon', args.points, args.settings);
    },
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 676..679

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

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

    polyline: function(parent, points, settings) {
        var args = this._args(arguments, ['points']);
        return this._poly(args.parent, 'polyline', args.points, args.settings);
    },
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 686..689

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

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

        var p = this._wrapper.path(this._plot, path,
            $.extend({class_: 'fn' + cur, fill: 'none', stroke: fn._stroke,
            strokeWidth: fn._strokeWidth}, fn._settings || {}));
Severity: Major
Found in public/javascripts/jquery.svg/jquery.svgplot.js and 1 other location - About 1 hr to fix
public/javascripts/jquery.svg/jquery.svggraph.js on lines 1362..1364

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

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

  def create
    @task = Task.new(params[:task])

    respond_to do |format|
      if @task.save
Severity: Major
Found in app/controllers/tasks_controller.rb and 23 other locations - About 1 hr to fix
app/controllers/academic_contacts_controller.rb on lines 53..62
app/controllers/academic_focus_types_controller.rb on lines 49..58
app/controllers/academic_focuses_controller.rb on lines 54..63
app/controllers/colleges_controller.rb on lines 49..58
app/controllers/countries_controller.rb on lines 49..58
app/controllers/departments_controller.rb on lines 49..58
app/controllers/financial_assistance_option_types_controller.rb on lines 49..58
app/controllers/financial_assistance_options_controller.rb on lines 51..60
app/controllers/industries_controller.rb on lines 49..58
app/controllers/internship_instances_controller.rb on lines 49..58
app/controllers/internships_controller.rb on lines 175..184
app/controllers/languages_controller.rb on lines 51..60
app/controllers/locations_controller.rb on lines 51..60
app/controllers/long_term_goals_controller.rb on lines 51..60
app/controllers/provider_contacts_controller.rb on lines 59..68
app/controllers/provider_types_controller.rb on lines 49..58
app/controllers/providers_controller.rb on lines 52..61
app/controllers/roles_controller.rb on lines 42..51
app/controllers/semesters_controller.rb on lines 51..60
app/controllers/states_controller.rb on lines 49..58
app/controllers/students_controller.rb on lines 42..51
app/controllers/tags_controller.rb on lines 51..60
app/controllers/users_controller.rb on lines 64..72

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

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

  def create
    @academic_contact = AcademicContact.new(params[:academic_contact])

    respond_to do |format|
      if @academic_contact.save
Severity: Major
Found in app/controllers/academic_contacts_controller.rb and 23 other locations - About 1 hr to fix
app/controllers/academic_focus_types_controller.rb on lines 49..58
app/controllers/academic_focuses_controller.rb on lines 54..63
app/controllers/colleges_controller.rb on lines 49..58
app/controllers/countries_controller.rb on lines 49..58
app/controllers/departments_controller.rb on lines 49..58
app/controllers/financial_assistance_option_types_controller.rb on lines 49..58
app/controllers/financial_assistance_options_controller.rb on lines 51..60
app/controllers/industries_controller.rb on lines 49..58
app/controllers/internship_instances_controller.rb on lines 49..58
app/controllers/internships_controller.rb on lines 175..184
app/controllers/languages_controller.rb on lines 51..60
app/controllers/locations_controller.rb on lines 51..60
app/controllers/long_term_goals_controller.rb on lines 51..60
app/controllers/provider_contacts_controller.rb on lines 59..68
app/controllers/provider_types_controller.rb on lines 49..58
app/controllers/providers_controller.rb on lines 52..61
app/controllers/roles_controller.rb on lines 42..51
app/controllers/semesters_controller.rb on lines 51..60
app/controllers/states_controller.rb on lines 49..58
app/controllers/students_controller.rb on lines 42..51
app/controllers/tags_controller.rb on lines 51..60
app/controllers/tasks_controller.rb on lines 51..60
app/controllers/users_controller.rb on lines 64..72

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

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

  def create
    @financial_assistance_option_type = FinancialAssistanceOptionType.new(params[:financial_assistance_option_type])

    respond_to do |format|
      if @financial_assistance_option_type.save
app/controllers/academic_contacts_controller.rb on lines 53..62
app/controllers/academic_focus_types_controller.rb on lines 49..58
app/controllers/academic_focuses_controller.rb on lines 54..63
app/controllers/colleges_controller.rb on lines 49..58
app/controllers/countries_controller.rb on lines 49..58
app/controllers/departments_controller.rb on lines 49..58
app/controllers/financial_assistance_options_controller.rb on lines 51..60
app/controllers/industries_controller.rb on lines 49..58
app/controllers/internship_instances_controller.rb on lines 49..58
app/controllers/internships_controller.rb on lines 175..184
app/controllers/languages_controller.rb on lines 51..60
app/controllers/locations_controller.rb on lines 51..60
app/controllers/long_term_goals_controller.rb on lines 51..60
app/controllers/provider_contacts_controller.rb on lines 59..68
app/controllers/provider_types_controller.rb on lines 49..58
app/controllers/providers_controller.rb on lines 52..61
app/controllers/roles_controller.rb on lines 42..51
app/controllers/semesters_controller.rb on lines 51..60
app/controllers/states_controller.rb on lines 49..58
app/controllers/students_controller.rb on lines 42..51
app/controllers/tags_controller.rb on lines 51..60
app/controllers/tasks_controller.rb on lines 51..60
app/controllers/users_controller.rb on lines 64..72

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

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

  def create
    @country = Country.new(params[:country])

    respond_to do |format|
      if @country.save
Severity: Major
Found in app/controllers/countries_controller.rb and 23 other locations - About 1 hr to fix
app/controllers/academic_contacts_controller.rb on lines 53..62
app/controllers/academic_focus_types_controller.rb on lines 49..58
app/controllers/academic_focuses_controller.rb on lines 54..63
app/controllers/colleges_controller.rb on lines 49..58
app/controllers/departments_controller.rb on lines 49..58
app/controllers/financial_assistance_option_types_controller.rb on lines 49..58
app/controllers/financial_assistance_options_controller.rb on lines 51..60
app/controllers/industries_controller.rb on lines 49..58
app/controllers/internship_instances_controller.rb on lines 49..58
app/controllers/internships_controller.rb on lines 175..184
app/controllers/languages_controller.rb on lines 51..60
app/controllers/locations_controller.rb on lines 51..60
app/controllers/long_term_goals_controller.rb on lines 51..60
app/controllers/provider_contacts_controller.rb on lines 59..68
app/controllers/provider_types_controller.rb on lines 49..58
app/controllers/providers_controller.rb on lines 52..61
app/controllers/roles_controller.rb on lines 42..51
app/controllers/semesters_controller.rb on lines 51..60
app/controllers/states_controller.rb on lines 49..58
app/controllers/students_controller.rb on lines 42..51
app/controllers/tags_controller.rb on lines 51..60
app/controllers/tasks_controller.rb on lines 51..60
app/controllers/users_controller.rb on lines 64..72

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

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

  def create
    @student = Student.new(params[:student])

    respond_to do |format|
      if @student.save
Severity: Major
Found in app/controllers/students_controller.rb and 23 other locations - About 1 hr to fix
app/controllers/academic_contacts_controller.rb on lines 53..62
app/controllers/academic_focus_types_controller.rb on lines 49..58
app/controllers/academic_focuses_controller.rb on lines 54..63
app/controllers/colleges_controller.rb on lines 49..58
app/controllers/countries_controller.rb on lines 49..58
app/controllers/departments_controller.rb on lines 49..58
app/controllers/financial_assistance_option_types_controller.rb on lines 49..58
app/controllers/financial_assistance_options_controller.rb on lines 51..60
app/controllers/industries_controller.rb on lines 49..58
app/controllers/internship_instances_controller.rb on lines 49..58
app/controllers/internships_controller.rb on lines 175..184
app/controllers/languages_controller.rb on lines 51..60
app/controllers/locations_controller.rb on lines 51..60
app/controllers/long_term_goals_controller.rb on lines 51..60
app/controllers/provider_contacts_controller.rb on lines 59..68
app/controllers/provider_types_controller.rb on lines 49..58
app/controllers/providers_controller.rb on lines 52..61
app/controllers/roles_controller.rb on lines 42..51
app/controllers/semesters_controller.rb on lines 51..60
app/controllers/states_controller.rb on lines 49..58
app/controllers/tags_controller.rb on lines 51..60
app/controllers/tasks_controller.rb on lines 51..60
app/controllers/users_controller.rb on lines 64..72

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

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

  def create
    @state = State.new(params[:state])

    respond_to do |format|
      if @state.save
Severity: Major
Found in app/controllers/states_controller.rb and 23 other locations - About 1 hr to fix
app/controllers/academic_contacts_controller.rb on lines 53..62
app/controllers/academic_focus_types_controller.rb on lines 49..58
app/controllers/academic_focuses_controller.rb on lines 54..63
app/controllers/colleges_controller.rb on lines 49..58
app/controllers/countries_controller.rb on lines 49..58
app/controllers/departments_controller.rb on lines 49..58
app/controllers/financial_assistance_option_types_controller.rb on lines 49..58
app/controllers/financial_assistance_options_controller.rb on lines 51..60
app/controllers/industries_controller.rb on lines 49..58
app/controllers/internship_instances_controller.rb on lines 49..58
app/controllers/internships_controller.rb on lines 175..184
app/controllers/languages_controller.rb on lines 51..60
app/controllers/locations_controller.rb on lines 51..60
app/controllers/long_term_goals_controller.rb on lines 51..60
app/controllers/provider_contacts_controller.rb on lines 59..68
app/controllers/provider_types_controller.rb on lines 49..58
app/controllers/providers_controller.rb on lines 52..61
app/controllers/roles_controller.rb on lines 42..51
app/controllers/semesters_controller.rb on lines 51..60
app/controllers/students_controller.rb on lines 42..51
app/controllers/tags_controller.rb on lines 51..60
app/controllers/tasks_controller.rb on lines 51..60
app/controllers/users_controller.rb on lines 64..72

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

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

        var gt = this._wrapper.group(this._chartCont, $.extend({class_: id + 'Labels',
            textAnchor: (horiz ? 'middle' : 'end')}, axis._labelFormat));
Severity: Major
Found in public/javascripts/jquery.svg/jquery.svggraph.js and 1 other location - About 1 hr to fix
public/javascripts/jquery.svg/jquery.svgplot.js on lines 339..340

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

  def create
    @location = Location.new(params[:location])

    respond_to do |format|
      if @location.save
Severity: Major
Found in app/controllers/locations_controller.rb and 23 other locations - About 1 hr to fix
app/controllers/academic_contacts_controller.rb on lines 53..62
app/controllers/academic_focus_types_controller.rb on lines 49..58
app/controllers/academic_focuses_controller.rb on lines 54..63
app/controllers/colleges_controller.rb on lines 49..58
app/controllers/countries_controller.rb on lines 49..58
app/controllers/departments_controller.rb on lines 49..58
app/controllers/financial_assistance_option_types_controller.rb on lines 49..58
app/controllers/financial_assistance_options_controller.rb on lines 51..60
app/controllers/industries_controller.rb on lines 49..58
app/controllers/internship_instances_controller.rb on lines 49..58
app/controllers/internships_controller.rb on lines 175..184
app/controllers/languages_controller.rb on lines 51..60
app/controllers/long_term_goals_controller.rb on lines 51..60
app/controllers/provider_contacts_controller.rb on lines 59..68
app/controllers/provider_types_controller.rb on lines 49..58
app/controllers/providers_controller.rb on lines 52..61
app/controllers/roles_controller.rb on lines 42..51
app/controllers/semesters_controller.rb on lines 51..60
app/controllers/states_controller.rb on lines 49..58
app/controllers/students_controller.rb on lines 42..51
app/controllers/tags_controller.rb on lines 51..60
app/controllers/tasks_controller.rb on lines 51..60
app/controllers/users_controller.rb on lines 64..72

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

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