MiraitSystems/enju_trunk

View on GitHub

Showing 351 of 1,155 total issues

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

  def create
    @checkout_stat_has_user = CheckoutStatHasUser.new(params[:checkout_stat_has_user])

    respond_to do |format|
      if @checkout_stat_has_user.save
Severity: Major
Found in app/controllers/checkout_stat_has_users_controller.rb and 17 other locations - About 1 hr to fix
app/controllers/abbreviations_controller.rb on lines 23..33
app/controllers/areas_controller.rb on lines 32..41
app/controllers/budget_categories_controller.rb on lines 35..45
app/controllers/budget_types_controller.rb on lines 13..23
app/controllers/checkout_stat_has_manifestations_controller.rb on lines 41..51
app/controllers/copy_requests_controller.rb on lines 21..30
app/controllers/departments_controller.rb on lines 13..22
app/controllers/keycodes_controller.rb on lines 16..25
app/controllers/manifestation_checkout_stats_controller.rb on lines 48..58
app/controllers/manifestation_reserve_stats_controller.rb on lines 47..57
app/controllers/reserve_stat_has_manifestations_controller.rb on lines 41..51
app/controllers/reserve_stat_has_users_controller.rb on lines 41..51
app/controllers/series_statement_merge_lists_controller.rb on lines 42..52
app/controllers/series_statement_merges_controller.rb on lines 50..60
app/controllers/terms_controller.rb on lines 13..23
app/controllers/user_checkout_stats_controller.rb on lines 47..57
app/controllers/user_reserve_stats_controller.rb on lines 47..57

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

  def create
    @department = Department.new(params[:department])
      respond_to do |format|
      if @department.save
        flash[:notice] = t('controller.successfully_created', :model => t('activerecord.models.department'))
Severity: Major
Found in app/controllers/departments_controller.rb and 17 other locations - About 1 hr to fix
app/controllers/abbreviations_controller.rb on lines 23..33
app/controllers/areas_controller.rb on lines 32..41
app/controllers/budget_categories_controller.rb on lines 35..45
app/controllers/budget_types_controller.rb on lines 13..23
app/controllers/checkout_stat_has_manifestations_controller.rb on lines 41..51
app/controllers/checkout_stat_has_users_controller.rb on lines 41..51
app/controllers/copy_requests_controller.rb on lines 21..30
app/controllers/keycodes_controller.rb on lines 16..25
app/controllers/manifestation_checkout_stats_controller.rb on lines 48..58
app/controllers/manifestation_reserve_stats_controller.rb on lines 47..57
app/controllers/reserve_stat_has_manifestations_controller.rb on lines 41..51
app/controllers/reserve_stat_has_users_controller.rb on lines 41..51
app/controllers/series_statement_merge_lists_controller.rb on lines 42..52
app/controllers/series_statement_merges_controller.rb on lines 50..60
app/controllers/terms_controller.rb on lines 13..23
app/controllers/user_checkout_stats_controller.rb on lines 47..57
app/controllers/user_reserve_stats_controller.rb on lines 47..57

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

  def create
    @reserve_stat_has_user = ReserveStatHasUser.new(params[:reserve_stat_has_user])

    respond_to do |format|
      if @reserve_stat_has_user.save
Severity: Major
Found in app/controllers/reserve_stat_has_users_controller.rb and 17 other locations - About 1 hr to fix
app/controllers/abbreviations_controller.rb on lines 23..33
app/controllers/areas_controller.rb on lines 32..41
app/controllers/budget_categories_controller.rb on lines 35..45
app/controllers/budget_types_controller.rb on lines 13..23
app/controllers/checkout_stat_has_manifestations_controller.rb on lines 41..51
app/controllers/checkout_stat_has_users_controller.rb on lines 41..51
app/controllers/copy_requests_controller.rb on lines 21..30
app/controllers/departments_controller.rb on lines 13..22
app/controllers/keycodes_controller.rb on lines 16..25
app/controllers/manifestation_checkout_stats_controller.rb on lines 48..58
app/controllers/manifestation_reserve_stats_controller.rb on lines 47..57
app/controllers/reserve_stat_has_manifestations_controller.rb on lines 41..51
app/controllers/series_statement_merge_lists_controller.rb on lines 42..52
app/controllers/series_statement_merges_controller.rb on lines 50..60
app/controllers/terms_controller.rb on lines 13..23
app/controllers/user_checkout_stats_controller.rb on lines 47..57
app/controllers/user_reserve_stats_controller.rb on lines 47..57

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

  def create
    @budget_category = BudgetCategory.new(params[:budget_category])

    respond_to do |format|
      if @budget_category.save
Severity: Major
Found in app/controllers/budget_categories_controller.rb and 17 other locations - About 1 hr to fix
app/controllers/abbreviations_controller.rb on lines 23..33
app/controllers/areas_controller.rb on lines 32..41
app/controllers/budget_types_controller.rb on lines 13..23
app/controllers/checkout_stat_has_manifestations_controller.rb on lines 41..51
app/controllers/checkout_stat_has_users_controller.rb on lines 41..51
app/controllers/copy_requests_controller.rb on lines 21..30
app/controllers/departments_controller.rb on lines 13..22
app/controllers/keycodes_controller.rb on lines 16..25
app/controllers/manifestation_checkout_stats_controller.rb on lines 48..58
app/controllers/manifestation_reserve_stats_controller.rb on lines 47..57
app/controllers/reserve_stat_has_manifestations_controller.rb on lines 41..51
app/controllers/reserve_stat_has_users_controller.rb on lines 41..51
app/controllers/series_statement_merge_lists_controller.rb on lines 42..52
app/controllers/series_statement_merges_controller.rb on lines 50..60
app/controllers/terms_controller.rb on lines 13..23
app/controllers/user_checkout_stats_controller.rb on lines 47..57
app/controllers/user_reserve_stats_controller.rb on lines 47..57

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

    switch(options.positionOpts.posX) {
        case 'left':     xVal = 0; 
            break;                
        case 'center': xVal = dims.refW / 2;
            break;                
Severity: Major
Found in app/assets/javascripts/fg.menu.js and 1 other location - About 1 hr to fix
app/assets/javascripts/fg.menu.js on lines 489..496

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

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

  def create
    @reserve_stat_has_manifestation = ReserveStatHasManifestation.new(params[:reserve_stat_has_manifestation])

    respond_to do |format|
      if @reserve_stat_has_manifestation.save
app/controllers/abbreviations_controller.rb on lines 23..33
app/controllers/areas_controller.rb on lines 32..41
app/controllers/budget_categories_controller.rb on lines 35..45
app/controllers/budget_types_controller.rb on lines 13..23
app/controllers/checkout_stat_has_manifestations_controller.rb on lines 41..51
app/controllers/checkout_stat_has_users_controller.rb on lines 41..51
app/controllers/copy_requests_controller.rb on lines 21..30
app/controllers/departments_controller.rb on lines 13..22
app/controllers/keycodes_controller.rb on lines 16..25
app/controllers/manifestation_checkout_stats_controller.rb on lines 48..58
app/controllers/manifestation_reserve_stats_controller.rb on lines 47..57
app/controllers/reserve_stat_has_users_controller.rb on lines 41..51
app/controllers/series_statement_merge_lists_controller.rb on lines 42..52
app/controllers/series_statement_merges_controller.rb on lines 50..60
app/controllers/terms_controller.rb on lines 13..23
app/controllers/user_checkout_stats_controller.rb on lines 47..57
app/controllers/user_reserve_stats_controller.rb on lines 47..57

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

  def create
    @manifestation_reserve_stat = ManifestationReserveStat.new(params[:manifestation_reserve_stat])

    respond_to do |format|
      if @manifestation_reserve_stat.save
Severity: Major
Found in app/controllers/manifestation_reserve_stats_controller.rb and 17 other locations - About 1 hr to fix
app/controllers/abbreviations_controller.rb on lines 23..33
app/controllers/areas_controller.rb on lines 32..41
app/controllers/budget_categories_controller.rb on lines 35..45
app/controllers/budget_types_controller.rb on lines 13..23
app/controllers/checkout_stat_has_manifestations_controller.rb on lines 41..51
app/controllers/checkout_stat_has_users_controller.rb on lines 41..51
app/controllers/copy_requests_controller.rb on lines 21..30
app/controllers/departments_controller.rb on lines 13..22
app/controllers/keycodes_controller.rb on lines 16..25
app/controllers/manifestation_checkout_stats_controller.rb on lines 48..58
app/controllers/reserve_stat_has_manifestations_controller.rb on lines 41..51
app/controllers/reserve_stat_has_users_controller.rb on lines 41..51
app/controllers/series_statement_merge_lists_controller.rb on lines 42..52
app/controllers/series_statement_merges_controller.rb on lines 50..60
app/controllers/terms_controller.rb on lines 13..23
app/controllers/user_checkout_stats_controller.rb on lines 47..57
app/controllers/user_reserve_stats_controller.rb on lines 47..57

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

  def create
    @realize = Realize.new(params[:realize])

    respond_to do |format|
      if @realize.save
Severity: Major
Found in app/controllers/realizes_controller.rb and 9 other locations - About 1 hr to fix
app/controllers/creates_controller.rb on lines 52..61
app/controllers/donates_controller.rb on lines 42..51
app/controllers/identifier_types_controller.rb on lines 41..50
app/controllers/owns_controller.rb on lines 53..62
app/controllers/picture_files_controller.rb on lines 114..123
app/controllers/produces_controller.rb on lines 57..66
app/controllers/subscribes_controller.rb on lines 45..54
app/controllers/tax_rates_controller.rb on lines 45..54
app/controllers/user_groups_controller.rb on lines 54..63

Duplicated Code

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

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

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

Tuning

This issue has a mass of 57.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

  def create
    @produce = Produce.new(params[:produce])

    respond_to do |format|
      if @produce.save
Severity: Major
Found in app/controllers/produces_controller.rb and 9 other locations - About 1 hr to fix
app/controllers/creates_controller.rb on lines 52..61
app/controllers/donates_controller.rb on lines 42..51
app/controllers/identifier_types_controller.rb on lines 41..50
app/controllers/owns_controller.rb on lines 53..62
app/controllers/picture_files_controller.rb on lines 114..123
app/controllers/realizes_controller.rb on lines 52..61
app/controllers/subscribes_controller.rb on lines 45..54
app/controllers/tax_rates_controller.rb on lines 45..54
app/controllers/user_groups_controller.rb on lines 54..63

Duplicated Code

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

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

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

Tuning

This issue has a mass of 57.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

  def create
    @donate = Donate.new(params[:donate])

    respond_to do |format|
      if @donate.save
Severity: Major
Found in app/controllers/donates_controller.rb and 9 other locations - About 1 hr to fix
app/controllers/creates_controller.rb on lines 52..61
app/controllers/identifier_types_controller.rb on lines 41..50
app/controllers/owns_controller.rb on lines 53..62
app/controllers/picture_files_controller.rb on lines 114..123
app/controllers/produces_controller.rb on lines 57..66
app/controllers/realizes_controller.rb on lines 52..61
app/controllers/subscribes_controller.rb on lines 45..54
app/controllers/tax_rates_controller.rb on lines 45..54
app/controllers/user_groups_controller.rb on lines 54..63

Duplicated Code

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

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

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

Tuning

This issue has a mass of 57.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

  def create
    @tax_rate = TaxRate.new(params[:tax_rate])

    respond_to do |format|
      if @tax_rate.save
Severity: Major
Found in app/controllers/tax_rates_controller.rb and 9 other locations - About 1 hr to fix
app/controllers/creates_controller.rb on lines 52..61
app/controllers/donates_controller.rb on lines 42..51
app/controllers/identifier_types_controller.rb on lines 41..50
app/controllers/owns_controller.rb on lines 53..62
app/controllers/picture_files_controller.rb on lines 114..123
app/controllers/produces_controller.rb on lines 57..66
app/controllers/realizes_controller.rb on lines 52..61
app/controllers/subscribes_controller.rb on lines 45..54
app/controllers/user_groups_controller.rb on lines 54..63

Duplicated Code

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

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

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

Tuning

This issue has a mass of 57.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

  def create
    @own = Own.new(params[:own])

    respond_to do |format|
      if @own.save
Severity: Major
Found in app/controllers/owns_controller.rb and 9 other locations - About 1 hr to fix
app/controllers/creates_controller.rb on lines 52..61
app/controllers/donates_controller.rb on lines 42..51
app/controllers/identifier_types_controller.rb on lines 41..50
app/controllers/picture_files_controller.rb on lines 114..123
app/controllers/produces_controller.rb on lines 57..66
app/controllers/realizes_controller.rb on lines 52..61
app/controllers/subscribes_controller.rb on lines 45..54
app/controllers/tax_rates_controller.rb on lines 45..54
app/controllers/user_groups_controller.rb on lines 54..63

Duplicated Code

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

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

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

Tuning

This issue has a mass of 57.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

  def create
    @identifier_type = IdentifierType.new(params[:identifier_type])

    respond_to do |format|
      if @identifier_type.save
Severity: Major
Found in app/controllers/identifier_types_controller.rb and 9 other locations - About 1 hr to fix
app/controllers/creates_controller.rb on lines 52..61
app/controllers/donates_controller.rb on lines 42..51
app/controllers/owns_controller.rb on lines 53..62
app/controllers/picture_files_controller.rb on lines 114..123
app/controllers/produces_controller.rb on lines 57..66
app/controllers/realizes_controller.rb on lines 52..61
app/controllers/subscribes_controller.rb on lines 45..54
app/controllers/tax_rates_controller.rb on lines 45..54
app/controllers/user_groups_controller.rb on lines 54..63

Duplicated Code

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

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

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

Tuning

This issue has a mass of 57.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

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

    respond_to do |format|
      if @create.save
Severity: Major
Found in app/controllers/creates_controller.rb and 9 other locations - About 1 hr to fix
app/controllers/donates_controller.rb on lines 42..51
app/controllers/identifier_types_controller.rb on lines 41..50
app/controllers/owns_controller.rb on lines 53..62
app/controllers/picture_files_controller.rb on lines 114..123
app/controllers/produces_controller.rb on lines 57..66
app/controllers/realizes_controller.rb on lines 52..61
app/controllers/subscribes_controller.rb on lines 45..54
app/controllers/tax_rates_controller.rb on lines 45..54
app/controllers/user_groups_controller.rb on lines 54..63

Duplicated Code

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

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

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

Tuning

This issue has a mass of 57.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

  def create
    @user_group = UserGroup.new(params[:user_group])

    respond_to do |format|
      if @user_group.save
Severity: Major
Found in app/controllers/user_groups_controller.rb and 9 other locations - About 1 hr to fix
app/controllers/creates_controller.rb on lines 52..61
app/controllers/donates_controller.rb on lines 42..51
app/controllers/identifier_types_controller.rb on lines 41..50
app/controllers/owns_controller.rb on lines 53..62
app/controllers/picture_files_controller.rb on lines 114..123
app/controllers/produces_controller.rb on lines 57..66
app/controllers/realizes_controller.rb on lines 52..61
app/controllers/subscribes_controller.rb on lines 45..54
app/controllers/tax_rates_controller.rb on lines 45..54

Duplicated Code

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

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

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

Tuning

This issue has a mass of 57.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

  def create
    @subscribe = Subscribe.new(params[:subscribe])

    respond_to do |format|
      if @subscribe.save
Severity: Major
Found in app/controllers/subscribes_controller.rb and 9 other locations - About 1 hr to fix
app/controllers/creates_controller.rb on lines 52..61
app/controllers/donates_controller.rb on lines 42..51
app/controllers/identifier_types_controller.rb on lines 41..50
app/controllers/owns_controller.rb on lines 53..62
app/controllers/picture_files_controller.rb on lines 114..123
app/controllers/produces_controller.rb on lines 57..66
app/controllers/realizes_controller.rb on lines 52..61
app/controllers/tax_rates_controller.rb on lines 45..54
app/controllers/user_groups_controller.rb on lines 54..63

Duplicated Code

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

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

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

Tuning

This issue has a mass of 57.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

  def create
    @picture_file = PictureFile.new(params[:picture_file])

    respond_to do |format|
      if @picture_file.save
Severity: Major
Found in app/controllers/picture_files_controller.rb and 9 other locations - About 1 hr to fix
app/controllers/creates_controller.rb on lines 52..61
app/controllers/donates_controller.rb on lines 42..51
app/controllers/identifier_types_controller.rb on lines 41..50
app/controllers/owns_controller.rb on lines 53..62
app/controllers/produces_controller.rb on lines 57..66
app/controllers/realizes_controller.rb on lines 52..61
app/controllers/subscribes_controller.rb on lines 45..54
app/controllers/tax_rates_controller.rb on lines 45..54
app/controllers/user_groups_controller.rb on lines 54..63

Duplicated Code

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

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

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

Tuning

This issue has a mass of 57.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

  def update
    @expense = Expense.find(params[:id])

    respond_to do |format|
      if @expense.update_attributes(params[:expense])
Severity: Major
Found in app/controllers/expenses_controller.rb and 1 other location - About 1 hr to fix
app/controllers/budgets_controller.rb on lines 39..50

Duplicated Code

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

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

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

Tuning

This issue has a mass of 56.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

  def update
    @budget = Budget.find(params[:id])

    respond_to do |format|
      if @budget.update_attributes(params[:budget])
Severity: Major
Found in app/controllers/budgets_controller.rb and 1 other location - About 1 hr to fix
app/controllers/expenses_controller.rb on lines 15..26

Duplicated Code

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

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

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

Tuning

This issue has a mass of 56.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

  def update
    @copy_request = CopyRequest.find(params[:id])

    respond_to do |format|
      if @copy_request.update_attributes(params[:copy_request])
Severity: Major
Found in app/controllers/copy_requests_controller.rb and 3 other locations - About 1 hr to fix
app/controllers/areas_controller.rb on lines 46..55
app/controllers/budget_types_controller.rb on lines 32..42
app/controllers/terms_controller.rb on lines 32..42

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

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