MiraitSystems/enju_trunk

View on GitHub

Showing 1,155 of 1,155 total issues

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

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

    respond_to do |format|
      if @abbreviation.save
Severity: Major
Found in app/controllers/abbreviations_controller.rb and 17 other locations - About 1 hr to fix
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/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
    @user_reserve_stat = UserReserveStat.new(params[:user_reserve_stat])

    respond_to do |format|
      if @user_reserve_stat.save
Severity: Major
Found in app/controllers/user_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/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

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
    @keycode = Keycode.new(params[:keycode])
    respond_to do |format|
      if @keycode.save
        flash[:notice] = t('controller.successfully_created', :model => t('activerecord.models.keycode'))
Severity: Major
Found in app/controllers/keycodes_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/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_type = BudgetType.new(params[:budget_type])

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

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

    respond_to do |format|
      if @series_statement_merge_list.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_manifestations_controller.rb on lines 41..51
app/controllers/reserve_stat_has_users_controller.rb on lines 41..51
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
    @user_checkout_stat = UserCheckoutStat.new(params[:user_checkout_stat])

    respond_to do |format|
      if @user_checkout_stat.save
Severity: Major
Found in app/controllers/user_checkout_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/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_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
    @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
    @checkout_stat_has_manifestation = CheckoutStatHasManifestation.new(params[:checkout_stat_has_manifestation])

    respond_to do |format|
      if @checkout_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_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 18 locations. Consider refactoring.
Open

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

    respond_to do |format|
      if @series_statement_merge.save
Severity: Major
Found in app/controllers/series_statement_merges_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/reserve_stat_has_users_controller.rb on lines 41..51
app/controllers/series_statement_merge_lists_controller.rb on lines 42..52
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 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_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
    @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 18 locations. Consider refactoring.
Open

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

    respond_to do |format|
      if @term.save
Severity: Major
Found in app/controllers/terms_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/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/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_checkout_stat = ManifestationCheckoutStat.new(params[:manifestation_checkout_stat])

    respond_to do |format|
      if @manifestation_checkout_stat.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_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
    @area = Area.new(params[:area])
      respond_to do |format|
      if @area.save
        flash[:notice] = t('controller.successfully_created', :model => t('activerecord.models.area'))
Severity: Major
Found in app/controllers/areas_controller.rb and 17 other locations - About 1 hr to fix
app/controllers/abbreviations_controller.rb on lines 23..33
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/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.posY) {
        case 'top':     yVal = 0;
            break;                
        case 'center': yVal = dims.refH / 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 479..486

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

Method perform has 33 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  def perform(method_identifier, param = nil) # param = id of object offering the method
    logger.info "Asynchronized_Service start. method: #{method_identifier} id: #{param}"
    case method_identifier
    when :ResoureceImportFile_import
      import = ResoureceImportFile.find(param)
Severity: Minor
Found in app/servies/asynchronized_service.rb - About 1 hr to fix
    Severity
    Category
    Status
    Source
    Language