camdub/Internships

View on GitHub

Showing 387 of 584 total issues

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

  def create
    @academic_focus_type = AcademicFocusType.new(params[:academic_focus_type])

    respond_to do |format|
      if @academic_focus_type.save
Severity: Major
Found in app/controllers/academic_focus_types_controller.rb and 23 other locations - About 1 hr to fix
app/controllers/academic_contacts_controller.rb on lines 53..62
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
    @semester = Semester.new(params[:semester])

    respond_to do |format|
      if @semester.save
Severity: Major
Found in app/controllers/semesters_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/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
    @academic_focus = AcademicFocus.new(params[:academic_focus])

    respond_to do |format|
      if @academic_focus.save
Severity: Major
Found in app/controllers/academic_focuses_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/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
    @long_term_goal = LongTermGoal.new(params[:long_term_goal])

    respond_to do |format|
      if @long_term_goal.save
Severity: Major
Found in app/controllers/long_term_goals_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/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
    @tag = Tag.new(params[:tag])

    respond_to do |format|
      if @tag.save
Severity: Major
Found in app/controllers/tags_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/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
    @role = Role.new(params[:role])

    respond_to do |format|
      if @role.save
Severity: Major
Found in app/controllers/roles_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/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
    @industry = Industry.new(params[:industry])

    respond_to do |format|
      if @industry.save
Severity: Major
Found in app/controllers/industries_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/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
    @provider = Provider.new(params[:provider])

    respond_to do |format|
      if @provider.save
Severity: Major
Found in app/controllers/providers_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/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 2 locations. Consider refactoring.
Open

    var clean = function(content)
    {
        content = content.replace(/\\/g, '\\\\');
        content = content.replace(/\n/g, '\\n');
        content = content.replace(/"/g,  '\\"');
Severity: Major
Found in public/javascripts/ejs.js and 1 other location - About 1 hr to fix
public/javascripts/jquery.svg/jquery.svg.js on lines 1051..1056

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
    @internship = Internship.new(params[:internship])
    
    respond_to do |format|
      if @internship.save
Severity: Major
Found in app/controllers/internships_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/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
    @user = User.new(params[:user])
    respond_to do |format|
      if @user.save
        format.html { redirect_to(@user, :notice => 'User was successfully created.') }
Severity: Major
Found in app/controllers/users_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/tasks_controller.rb on lines 51..60

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

    _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($e.is(":submit") || $e.is(":reset") || $e.is("button") || $e.is("a") || elem.is("input[type=button]")){
          var divTag = $e.closest("div");
          divTag.removeClass(options.hoverClass+" "+options.focusClass+" "+options.activeClass);
          
          if($e.is(":disabled")){
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 665..667

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
    @financial_assistance_option = FinancialAssistanceOption.new(params[:financial_assistance_option])

    respond_to do |format|
      if @financial_assistance_option.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_option_types_controller.rb on lines 49..58
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
    @department = Department.new(params[:department])

    respond_to do |format|
      if @department.save
Severity: Major
Found in app/controllers/departments_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/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 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 24 locations. Consider refactoring.
Open

  def create
    @language = Language.new(params[:language])

    respond_to do |format|
      if @language.save
Severity: Major
Found in app/controllers/languages_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/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
    @provider_type = ProviderType.new(params[:provider_type])

    respond_to do |format|
      if @provider_type.save
Severity: Major
Found in app/controllers/provider_types_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/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
    @college = College.new(params[:college])

    respond_to do |format|
      if @college.save
Severity: Major
Found in app/controllers/colleges_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/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 2 locations. Consider refactoring.
Open

        var gt = this._wrapper.group(this._plot, $.extend({class_: id + 'Labels',
            textAnchor: (horiz ? 'middle' : 'end')}, axis._labelFormat));
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 460..461

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

Severity
Category
Status
Source
Language