flood-io/ruby-jmeter

View on GitHub

Showing 129 of 173 total issues

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

  class JunitRequest
    attr_accessor :doc
    include Helper

    def initialize(params={})
Severity: Major
Found in lib/ruby-jmeter/dsl/junit_request.rb and 107 other locations - About 45 mins to fix
lib/ruby-jmeter/dsl/access_log_sampler.rb on lines 9..29
lib/ruby-jmeter/dsl/aggregate_graph.rb on lines 9..52
lib/ruby-jmeter/dsl/aggregate_report.rb on lines 9..52
lib/ruby-jmeter/dsl/assertion_results.rb on lines 9..52
lib/ruby-jmeter/dsl/beanshell_assertion.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_listener.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_postprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_preprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_sampler.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_timer.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_assertion.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_listener.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_postprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_preprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_sampler.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_timer.rb on lines 9..25
lib/ruby-jmeter/dsl/compare_assertion.rb on lines 9..24
lib/ruby-jmeter/dsl/comparison_assertion_visualizer.rb on lines 9..52
lib/ruby-jmeter/dsl/constant_throughput_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/constant_timer.rb on lines 9..22
lib/ruby-jmeter/dsl/counter.rb on lines 9..28
lib/ruby-jmeter/dsl/cssjquery_extractor.rb on lines 9..28
lib/ruby-jmeter/dsl/csv_data_set_config.rb on lines 9..30
lib/ruby-jmeter/dsl/debug_postprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/debug_sampler.rb on lines 9..24
lib/ruby-jmeter/dsl/distribution_graphalpha.rb on lines 9..52
lib/ruby-jmeter/dsl/duration_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/foreach_controller.rb on lines 9..24
lib/ruby-jmeter/dsl/ftp_request.rb on lines 9..31
lib/ruby-jmeter/dsl/ftp_request_defaults.rb on lines 9..29
lib/ruby-jmeter/dsl/gaussian_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/generate_summary_results.rb on lines 9..20
lib/ruby-jmeter/dsl/graph_results.rb on lines 9..52
lib/ruby-jmeter/dsl/html_assertion.rb on lines 9..27
lib/ruby-jmeter/dsl/html_link_parser.rb on lines 9..20
lib/ruby-jmeter/dsl/html_parameter_mask.rb on lines 9..29
lib/ruby-jmeter/dsl/http_authorization_manager.rb on lines 9..30
lib/ruby-jmeter/dsl/http_cache_manager.rb on lines 9..23
lib/ruby-jmeter/dsl/http_cookie_manager.rb on lines 9..25
lib/ruby-jmeter/dsl/http_header_manager.rb on lines 9..27
lib/ruby-jmeter/dsl/http_url_rewriting_modifier.rb on lines 9..27
lib/ruby-jmeter/dsl/if_controller.rb on lines 9..24
lib/ruby-jmeter/dsl/include_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/java_request.rb on lines 9..66
lib/ruby-jmeter/dsl/java_request_defaults.rb on lines 9..66
lib/ruby-jmeter/dsl/jdbc_connection_configuration.rb on lines 9..34
lib/ruby-jmeter/dsl/jdbc_postprocessor.rb on lines 9..30
lib/ruby-jmeter/dsl/jdbc_preprocessor.rb on lines 9..30
lib/ruby-jmeter/dsl/jdbc_request.rb on lines 9..30
lib/ruby-jmeter/dsl/jms_publisher.rb on lines 9..40
lib/ruby-jmeter/dsl/jms_subscriber.rb on lines 9..32
lib/ruby-jmeter/dsl/json_path_postprocessor.rb on lines 9..24
lib/ruby-jmeter/dsl/jsr223_assertion.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_listener.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_postprocessor.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_preprocessor.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_sampler.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_timer.rb on lines 9..26
lib/ruby-jmeter/dsl/keystore_configuration.rb on lines 9..25
lib/ruby-jmeter/dsl/ldap_extended_request.rb on lines 9..39
lib/ruby-jmeter/dsl/ldap_extended_request_defaults.rb on lines 9..39
lib/ruby-jmeter/dsl/login_config_element.rb on lines 9..23
lib/ruby-jmeter/dsl/loop_controller.rb on lines 9..23
lib/ruby-jmeter/dsl/mail_reader_sampler.rb on lines 9..34
lib/ruby-jmeter/dsl/mailer_visualizer.rb on lines 9..61
lib/ruby-jmeter/dsl/md5hex_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/module_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/monitor_results.rb on lines 9..52
lib/ruby-jmeter/dsl/once_only_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/poisson_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/random_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/random_order_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/random_variable.rb on lines 9..27
lib/ruby-jmeter/dsl/recording_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/regex_user_parameters.rb on lines 9..24
lib/ruby-jmeter/dsl/regular_expression_extractor.rb on lines 9..29
lib/ruby-jmeter/dsl/response_assertion.rb on lines 9..28
lib/ruby-jmeter/dsl/response_time_graph.rb on lines 9..52
lib/ruby-jmeter/dsl/result_status_action_handler.rb on lines 9..22
lib/ruby-jmeter/dsl/runtime_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/save_responses_to_a_file.rb on lines 9..26
lib/ruby-jmeter/dsl/simple_config_element.rb on lines 9..20
lib/ruby-jmeter/dsl/simple_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/simple_data_writer.rb on lines 9..52
lib/ruby-jmeter/dsl/smime_assertion.rb on lines 9..32
lib/ruby-jmeter/dsl/smtp_sampler.rb on lines 9..48
lib/ruby-jmeter/dsl/soapxmlrpc_request.rb on lines 9..30
lib/ruby-jmeter/dsl/spline_visualizer.rb on lines 9..52
lib/ruby-jmeter/dsl/summary_report.rb on lines 9..52
lib/ruby-jmeter/dsl/switch_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/synchronizing_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/tcp_sampler.rb on lines 9..30
lib/ruby-jmeter/dsl/tcp_sampler_config.rb on lines 9..28
lib/ruby-jmeter/dsl/test_action.rb on lines 9..24
lib/ruby-jmeter/dsl/test_fragment.rb on lines 9..20
lib/ruby-jmeter/dsl/throughput_controller.rb on lines 9..29
lib/ruby-jmeter/dsl/transaction_controller.rb on lines 9..23
lib/ruby-jmeter/dsl/uniform_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/user_defined_variables.rb on lines 9..30
lib/ruby-jmeter/dsl/user_parameters.rb on lines 9..27
lib/ruby-jmeter/dsl/view_results_in_table.rb on lines 9..52
lib/ruby-jmeter/dsl/view_results_tree.rb on lines 9..52
lib/ruby-jmeter/dsl/while_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/xml_assertion.rb on lines 9..20
lib/ruby-jmeter/dsl/xml_schema_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/xpath_assertion.rb on lines 9..28
lib/ruby-jmeter/dsl/xpath_extractor.rb on lines 9..28

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

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

  class UserParameters
    attr_accessor :doc
    include Helper

    def initialize(params={})
Severity: Major
Found in lib/ruby-jmeter/dsl/user_parameters.rb and 107 other locations - About 45 mins to fix
lib/ruby-jmeter/dsl/access_log_sampler.rb on lines 9..29
lib/ruby-jmeter/dsl/aggregate_graph.rb on lines 9..52
lib/ruby-jmeter/dsl/aggregate_report.rb on lines 9..52
lib/ruby-jmeter/dsl/assertion_results.rb on lines 9..52
lib/ruby-jmeter/dsl/beanshell_assertion.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_listener.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_postprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_preprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_sampler.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_timer.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_assertion.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_listener.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_postprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_preprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_sampler.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_timer.rb on lines 9..25
lib/ruby-jmeter/dsl/compare_assertion.rb on lines 9..24
lib/ruby-jmeter/dsl/comparison_assertion_visualizer.rb on lines 9..52
lib/ruby-jmeter/dsl/constant_throughput_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/constant_timer.rb on lines 9..22
lib/ruby-jmeter/dsl/counter.rb on lines 9..28
lib/ruby-jmeter/dsl/cssjquery_extractor.rb on lines 9..28
lib/ruby-jmeter/dsl/csv_data_set_config.rb on lines 9..30
lib/ruby-jmeter/dsl/debug_postprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/debug_sampler.rb on lines 9..24
lib/ruby-jmeter/dsl/distribution_graphalpha.rb on lines 9..52
lib/ruby-jmeter/dsl/duration_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/foreach_controller.rb on lines 9..24
lib/ruby-jmeter/dsl/ftp_request.rb on lines 9..31
lib/ruby-jmeter/dsl/ftp_request_defaults.rb on lines 9..29
lib/ruby-jmeter/dsl/gaussian_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/generate_summary_results.rb on lines 9..20
lib/ruby-jmeter/dsl/graph_results.rb on lines 9..52
lib/ruby-jmeter/dsl/html_assertion.rb on lines 9..27
lib/ruby-jmeter/dsl/html_link_parser.rb on lines 9..20
lib/ruby-jmeter/dsl/html_parameter_mask.rb on lines 9..29
lib/ruby-jmeter/dsl/http_authorization_manager.rb on lines 9..30
lib/ruby-jmeter/dsl/http_cache_manager.rb on lines 9..23
lib/ruby-jmeter/dsl/http_cookie_manager.rb on lines 9..25
lib/ruby-jmeter/dsl/http_header_manager.rb on lines 9..27
lib/ruby-jmeter/dsl/http_url_rewriting_modifier.rb on lines 9..27
lib/ruby-jmeter/dsl/if_controller.rb on lines 9..24
lib/ruby-jmeter/dsl/include_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/java_request.rb on lines 9..66
lib/ruby-jmeter/dsl/java_request_defaults.rb on lines 9..66
lib/ruby-jmeter/dsl/jdbc_connection_configuration.rb on lines 9..34
lib/ruby-jmeter/dsl/jdbc_postprocessor.rb on lines 9..30
lib/ruby-jmeter/dsl/jdbc_preprocessor.rb on lines 9..30
lib/ruby-jmeter/dsl/jdbc_request.rb on lines 9..30
lib/ruby-jmeter/dsl/jms_publisher.rb on lines 9..40
lib/ruby-jmeter/dsl/jms_subscriber.rb on lines 9..32
lib/ruby-jmeter/dsl/json_path_postprocessor.rb on lines 9..24
lib/ruby-jmeter/dsl/jsr223_assertion.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_listener.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_postprocessor.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_preprocessor.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_sampler.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_timer.rb on lines 9..26
lib/ruby-jmeter/dsl/junit_request.rb on lines 9..34
lib/ruby-jmeter/dsl/keystore_configuration.rb on lines 9..25
lib/ruby-jmeter/dsl/ldap_extended_request.rb on lines 9..39
lib/ruby-jmeter/dsl/ldap_extended_request_defaults.rb on lines 9..39
lib/ruby-jmeter/dsl/login_config_element.rb on lines 9..23
lib/ruby-jmeter/dsl/loop_controller.rb on lines 9..23
lib/ruby-jmeter/dsl/mail_reader_sampler.rb on lines 9..34
lib/ruby-jmeter/dsl/mailer_visualizer.rb on lines 9..61
lib/ruby-jmeter/dsl/md5hex_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/module_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/monitor_results.rb on lines 9..52
lib/ruby-jmeter/dsl/once_only_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/poisson_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/random_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/random_order_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/random_variable.rb on lines 9..27
lib/ruby-jmeter/dsl/recording_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/regex_user_parameters.rb on lines 9..24
lib/ruby-jmeter/dsl/regular_expression_extractor.rb on lines 9..29
lib/ruby-jmeter/dsl/response_assertion.rb on lines 9..28
lib/ruby-jmeter/dsl/response_time_graph.rb on lines 9..52
lib/ruby-jmeter/dsl/result_status_action_handler.rb on lines 9..22
lib/ruby-jmeter/dsl/runtime_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/save_responses_to_a_file.rb on lines 9..26
lib/ruby-jmeter/dsl/simple_config_element.rb on lines 9..20
lib/ruby-jmeter/dsl/simple_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/simple_data_writer.rb on lines 9..52
lib/ruby-jmeter/dsl/smime_assertion.rb on lines 9..32
lib/ruby-jmeter/dsl/smtp_sampler.rb on lines 9..48
lib/ruby-jmeter/dsl/soapxmlrpc_request.rb on lines 9..30
lib/ruby-jmeter/dsl/spline_visualizer.rb on lines 9..52
lib/ruby-jmeter/dsl/summary_report.rb on lines 9..52
lib/ruby-jmeter/dsl/switch_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/synchronizing_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/tcp_sampler.rb on lines 9..30
lib/ruby-jmeter/dsl/tcp_sampler_config.rb on lines 9..28
lib/ruby-jmeter/dsl/test_action.rb on lines 9..24
lib/ruby-jmeter/dsl/test_fragment.rb on lines 9..20
lib/ruby-jmeter/dsl/throughput_controller.rb on lines 9..29
lib/ruby-jmeter/dsl/transaction_controller.rb on lines 9..23
lib/ruby-jmeter/dsl/uniform_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/user_defined_variables.rb on lines 9..30
lib/ruby-jmeter/dsl/view_results_in_table.rb on lines 9..52
lib/ruby-jmeter/dsl/view_results_tree.rb on lines 9..52
lib/ruby-jmeter/dsl/while_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/xml_assertion.rb on lines 9..20
lib/ruby-jmeter/dsl/xml_schema_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/xpath_assertion.rb on lines 9..28
lib/ruby-jmeter/dsl/xpath_extractor.rb on lines 9..28

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

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

  class SmimeAssertion
    attr_accessor :doc
    include Helper

    def initialize(params={})
Severity: Major
Found in lib/ruby-jmeter/dsl/smime_assertion.rb and 107 other locations - About 45 mins to fix
lib/ruby-jmeter/dsl/access_log_sampler.rb on lines 9..29
lib/ruby-jmeter/dsl/aggregate_graph.rb on lines 9..52
lib/ruby-jmeter/dsl/aggregate_report.rb on lines 9..52
lib/ruby-jmeter/dsl/assertion_results.rb on lines 9..52
lib/ruby-jmeter/dsl/beanshell_assertion.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_listener.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_postprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_preprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_sampler.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_timer.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_assertion.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_listener.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_postprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_preprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_sampler.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_timer.rb on lines 9..25
lib/ruby-jmeter/dsl/compare_assertion.rb on lines 9..24
lib/ruby-jmeter/dsl/comparison_assertion_visualizer.rb on lines 9..52
lib/ruby-jmeter/dsl/constant_throughput_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/constant_timer.rb on lines 9..22
lib/ruby-jmeter/dsl/counter.rb on lines 9..28
lib/ruby-jmeter/dsl/cssjquery_extractor.rb on lines 9..28
lib/ruby-jmeter/dsl/csv_data_set_config.rb on lines 9..30
lib/ruby-jmeter/dsl/debug_postprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/debug_sampler.rb on lines 9..24
lib/ruby-jmeter/dsl/distribution_graphalpha.rb on lines 9..52
lib/ruby-jmeter/dsl/duration_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/foreach_controller.rb on lines 9..24
lib/ruby-jmeter/dsl/ftp_request.rb on lines 9..31
lib/ruby-jmeter/dsl/ftp_request_defaults.rb on lines 9..29
lib/ruby-jmeter/dsl/gaussian_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/generate_summary_results.rb on lines 9..20
lib/ruby-jmeter/dsl/graph_results.rb on lines 9..52
lib/ruby-jmeter/dsl/html_assertion.rb on lines 9..27
lib/ruby-jmeter/dsl/html_link_parser.rb on lines 9..20
lib/ruby-jmeter/dsl/html_parameter_mask.rb on lines 9..29
lib/ruby-jmeter/dsl/http_authorization_manager.rb on lines 9..30
lib/ruby-jmeter/dsl/http_cache_manager.rb on lines 9..23
lib/ruby-jmeter/dsl/http_cookie_manager.rb on lines 9..25
lib/ruby-jmeter/dsl/http_header_manager.rb on lines 9..27
lib/ruby-jmeter/dsl/http_url_rewriting_modifier.rb on lines 9..27
lib/ruby-jmeter/dsl/if_controller.rb on lines 9..24
lib/ruby-jmeter/dsl/include_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/java_request.rb on lines 9..66
lib/ruby-jmeter/dsl/java_request_defaults.rb on lines 9..66
lib/ruby-jmeter/dsl/jdbc_connection_configuration.rb on lines 9..34
lib/ruby-jmeter/dsl/jdbc_postprocessor.rb on lines 9..30
lib/ruby-jmeter/dsl/jdbc_preprocessor.rb on lines 9..30
lib/ruby-jmeter/dsl/jdbc_request.rb on lines 9..30
lib/ruby-jmeter/dsl/jms_publisher.rb on lines 9..40
lib/ruby-jmeter/dsl/jms_subscriber.rb on lines 9..32
lib/ruby-jmeter/dsl/json_path_postprocessor.rb on lines 9..24
lib/ruby-jmeter/dsl/jsr223_assertion.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_listener.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_postprocessor.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_preprocessor.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_sampler.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_timer.rb on lines 9..26
lib/ruby-jmeter/dsl/junit_request.rb on lines 9..34
lib/ruby-jmeter/dsl/keystore_configuration.rb on lines 9..25
lib/ruby-jmeter/dsl/ldap_extended_request.rb on lines 9..39
lib/ruby-jmeter/dsl/ldap_extended_request_defaults.rb on lines 9..39
lib/ruby-jmeter/dsl/login_config_element.rb on lines 9..23
lib/ruby-jmeter/dsl/loop_controller.rb on lines 9..23
lib/ruby-jmeter/dsl/mail_reader_sampler.rb on lines 9..34
lib/ruby-jmeter/dsl/mailer_visualizer.rb on lines 9..61
lib/ruby-jmeter/dsl/md5hex_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/module_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/monitor_results.rb on lines 9..52
lib/ruby-jmeter/dsl/once_only_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/poisson_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/random_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/random_order_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/random_variable.rb on lines 9..27
lib/ruby-jmeter/dsl/recording_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/regex_user_parameters.rb on lines 9..24
lib/ruby-jmeter/dsl/regular_expression_extractor.rb on lines 9..29
lib/ruby-jmeter/dsl/response_assertion.rb on lines 9..28
lib/ruby-jmeter/dsl/response_time_graph.rb on lines 9..52
lib/ruby-jmeter/dsl/result_status_action_handler.rb on lines 9..22
lib/ruby-jmeter/dsl/runtime_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/save_responses_to_a_file.rb on lines 9..26
lib/ruby-jmeter/dsl/simple_config_element.rb on lines 9..20
lib/ruby-jmeter/dsl/simple_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/simple_data_writer.rb on lines 9..52
lib/ruby-jmeter/dsl/smtp_sampler.rb on lines 9..48
lib/ruby-jmeter/dsl/soapxmlrpc_request.rb on lines 9..30
lib/ruby-jmeter/dsl/spline_visualizer.rb on lines 9..52
lib/ruby-jmeter/dsl/summary_report.rb on lines 9..52
lib/ruby-jmeter/dsl/switch_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/synchronizing_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/tcp_sampler.rb on lines 9..30
lib/ruby-jmeter/dsl/tcp_sampler_config.rb on lines 9..28
lib/ruby-jmeter/dsl/test_action.rb on lines 9..24
lib/ruby-jmeter/dsl/test_fragment.rb on lines 9..20
lib/ruby-jmeter/dsl/throughput_controller.rb on lines 9..29
lib/ruby-jmeter/dsl/transaction_controller.rb on lines 9..23
lib/ruby-jmeter/dsl/uniform_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/user_defined_variables.rb on lines 9..30
lib/ruby-jmeter/dsl/user_parameters.rb on lines 9..27
lib/ruby-jmeter/dsl/view_results_in_table.rb on lines 9..52
lib/ruby-jmeter/dsl/view_results_tree.rb on lines 9..52
lib/ruby-jmeter/dsl/while_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/xml_assertion.rb on lines 9..20
lib/ruby-jmeter/dsl/xml_schema_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/xpath_assertion.rb on lines 9..28
lib/ruby-jmeter/dsl/xpath_extractor.rb on lines 9..28

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

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

  class GraphResults
    attr_accessor :doc
    include Helper

    def initialize(params={})
Severity: Major
Found in lib/ruby-jmeter/dsl/graph_results.rb and 107 other locations - About 45 mins to fix
lib/ruby-jmeter/dsl/access_log_sampler.rb on lines 9..29
lib/ruby-jmeter/dsl/aggregate_graph.rb on lines 9..52
lib/ruby-jmeter/dsl/aggregate_report.rb on lines 9..52
lib/ruby-jmeter/dsl/assertion_results.rb on lines 9..52
lib/ruby-jmeter/dsl/beanshell_assertion.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_listener.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_postprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_preprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_sampler.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_timer.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_assertion.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_listener.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_postprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_preprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_sampler.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_timer.rb on lines 9..25
lib/ruby-jmeter/dsl/compare_assertion.rb on lines 9..24
lib/ruby-jmeter/dsl/comparison_assertion_visualizer.rb on lines 9..52
lib/ruby-jmeter/dsl/constant_throughput_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/constant_timer.rb on lines 9..22
lib/ruby-jmeter/dsl/counter.rb on lines 9..28
lib/ruby-jmeter/dsl/cssjquery_extractor.rb on lines 9..28
lib/ruby-jmeter/dsl/csv_data_set_config.rb on lines 9..30
lib/ruby-jmeter/dsl/debug_postprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/debug_sampler.rb on lines 9..24
lib/ruby-jmeter/dsl/distribution_graphalpha.rb on lines 9..52
lib/ruby-jmeter/dsl/duration_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/foreach_controller.rb on lines 9..24
lib/ruby-jmeter/dsl/ftp_request.rb on lines 9..31
lib/ruby-jmeter/dsl/ftp_request_defaults.rb on lines 9..29
lib/ruby-jmeter/dsl/gaussian_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/generate_summary_results.rb on lines 9..20
lib/ruby-jmeter/dsl/html_assertion.rb on lines 9..27
lib/ruby-jmeter/dsl/html_link_parser.rb on lines 9..20
lib/ruby-jmeter/dsl/html_parameter_mask.rb on lines 9..29
lib/ruby-jmeter/dsl/http_authorization_manager.rb on lines 9..30
lib/ruby-jmeter/dsl/http_cache_manager.rb on lines 9..23
lib/ruby-jmeter/dsl/http_cookie_manager.rb on lines 9..25
lib/ruby-jmeter/dsl/http_header_manager.rb on lines 9..27
lib/ruby-jmeter/dsl/http_url_rewriting_modifier.rb on lines 9..27
lib/ruby-jmeter/dsl/if_controller.rb on lines 9..24
lib/ruby-jmeter/dsl/include_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/java_request.rb on lines 9..66
lib/ruby-jmeter/dsl/java_request_defaults.rb on lines 9..66
lib/ruby-jmeter/dsl/jdbc_connection_configuration.rb on lines 9..34
lib/ruby-jmeter/dsl/jdbc_postprocessor.rb on lines 9..30
lib/ruby-jmeter/dsl/jdbc_preprocessor.rb on lines 9..30
lib/ruby-jmeter/dsl/jdbc_request.rb on lines 9..30
lib/ruby-jmeter/dsl/jms_publisher.rb on lines 9..40
lib/ruby-jmeter/dsl/jms_subscriber.rb on lines 9..32
lib/ruby-jmeter/dsl/json_path_postprocessor.rb on lines 9..24
lib/ruby-jmeter/dsl/jsr223_assertion.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_listener.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_postprocessor.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_preprocessor.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_sampler.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_timer.rb on lines 9..26
lib/ruby-jmeter/dsl/junit_request.rb on lines 9..34
lib/ruby-jmeter/dsl/keystore_configuration.rb on lines 9..25
lib/ruby-jmeter/dsl/ldap_extended_request.rb on lines 9..39
lib/ruby-jmeter/dsl/ldap_extended_request_defaults.rb on lines 9..39
lib/ruby-jmeter/dsl/login_config_element.rb on lines 9..23
lib/ruby-jmeter/dsl/loop_controller.rb on lines 9..23
lib/ruby-jmeter/dsl/mail_reader_sampler.rb on lines 9..34
lib/ruby-jmeter/dsl/mailer_visualizer.rb on lines 9..61
lib/ruby-jmeter/dsl/md5hex_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/module_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/monitor_results.rb on lines 9..52
lib/ruby-jmeter/dsl/once_only_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/poisson_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/random_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/random_order_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/random_variable.rb on lines 9..27
lib/ruby-jmeter/dsl/recording_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/regex_user_parameters.rb on lines 9..24
lib/ruby-jmeter/dsl/regular_expression_extractor.rb on lines 9..29
lib/ruby-jmeter/dsl/response_assertion.rb on lines 9..28
lib/ruby-jmeter/dsl/response_time_graph.rb on lines 9..52
lib/ruby-jmeter/dsl/result_status_action_handler.rb on lines 9..22
lib/ruby-jmeter/dsl/runtime_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/save_responses_to_a_file.rb on lines 9..26
lib/ruby-jmeter/dsl/simple_config_element.rb on lines 9..20
lib/ruby-jmeter/dsl/simple_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/simple_data_writer.rb on lines 9..52
lib/ruby-jmeter/dsl/smime_assertion.rb on lines 9..32
lib/ruby-jmeter/dsl/smtp_sampler.rb on lines 9..48
lib/ruby-jmeter/dsl/soapxmlrpc_request.rb on lines 9..30
lib/ruby-jmeter/dsl/spline_visualizer.rb on lines 9..52
lib/ruby-jmeter/dsl/summary_report.rb on lines 9..52
lib/ruby-jmeter/dsl/switch_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/synchronizing_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/tcp_sampler.rb on lines 9..30
lib/ruby-jmeter/dsl/tcp_sampler_config.rb on lines 9..28
lib/ruby-jmeter/dsl/test_action.rb on lines 9..24
lib/ruby-jmeter/dsl/test_fragment.rb on lines 9..20
lib/ruby-jmeter/dsl/throughput_controller.rb on lines 9..29
lib/ruby-jmeter/dsl/transaction_controller.rb on lines 9..23
lib/ruby-jmeter/dsl/uniform_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/user_defined_variables.rb on lines 9..30
lib/ruby-jmeter/dsl/user_parameters.rb on lines 9..27
lib/ruby-jmeter/dsl/view_results_in_table.rb on lines 9..52
lib/ruby-jmeter/dsl/view_results_tree.rb on lines 9..52
lib/ruby-jmeter/dsl/while_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/xml_assertion.rb on lines 9..20
lib/ruby-jmeter/dsl/xml_schema_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/xpath_assertion.rb on lines 9..28
lib/ruby-jmeter/dsl/xpath_extractor.rb on lines 9..28

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

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

  class MonitorResults
    attr_accessor :doc
    include Helper

    def initialize(params={})
Severity: Major
Found in lib/ruby-jmeter/dsl/monitor_results.rb and 107 other locations - About 45 mins to fix
lib/ruby-jmeter/dsl/access_log_sampler.rb on lines 9..29
lib/ruby-jmeter/dsl/aggregate_graph.rb on lines 9..52
lib/ruby-jmeter/dsl/aggregate_report.rb on lines 9..52
lib/ruby-jmeter/dsl/assertion_results.rb on lines 9..52
lib/ruby-jmeter/dsl/beanshell_assertion.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_listener.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_postprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_preprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_sampler.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_timer.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_assertion.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_listener.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_postprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_preprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_sampler.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_timer.rb on lines 9..25
lib/ruby-jmeter/dsl/compare_assertion.rb on lines 9..24
lib/ruby-jmeter/dsl/comparison_assertion_visualizer.rb on lines 9..52
lib/ruby-jmeter/dsl/constant_throughput_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/constant_timer.rb on lines 9..22
lib/ruby-jmeter/dsl/counter.rb on lines 9..28
lib/ruby-jmeter/dsl/cssjquery_extractor.rb on lines 9..28
lib/ruby-jmeter/dsl/csv_data_set_config.rb on lines 9..30
lib/ruby-jmeter/dsl/debug_postprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/debug_sampler.rb on lines 9..24
lib/ruby-jmeter/dsl/distribution_graphalpha.rb on lines 9..52
lib/ruby-jmeter/dsl/duration_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/foreach_controller.rb on lines 9..24
lib/ruby-jmeter/dsl/ftp_request.rb on lines 9..31
lib/ruby-jmeter/dsl/ftp_request_defaults.rb on lines 9..29
lib/ruby-jmeter/dsl/gaussian_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/generate_summary_results.rb on lines 9..20
lib/ruby-jmeter/dsl/graph_results.rb on lines 9..52
lib/ruby-jmeter/dsl/html_assertion.rb on lines 9..27
lib/ruby-jmeter/dsl/html_link_parser.rb on lines 9..20
lib/ruby-jmeter/dsl/html_parameter_mask.rb on lines 9..29
lib/ruby-jmeter/dsl/http_authorization_manager.rb on lines 9..30
lib/ruby-jmeter/dsl/http_cache_manager.rb on lines 9..23
lib/ruby-jmeter/dsl/http_cookie_manager.rb on lines 9..25
lib/ruby-jmeter/dsl/http_header_manager.rb on lines 9..27
lib/ruby-jmeter/dsl/http_url_rewriting_modifier.rb on lines 9..27
lib/ruby-jmeter/dsl/if_controller.rb on lines 9..24
lib/ruby-jmeter/dsl/include_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/java_request.rb on lines 9..66
lib/ruby-jmeter/dsl/java_request_defaults.rb on lines 9..66
lib/ruby-jmeter/dsl/jdbc_connection_configuration.rb on lines 9..34
lib/ruby-jmeter/dsl/jdbc_postprocessor.rb on lines 9..30
lib/ruby-jmeter/dsl/jdbc_preprocessor.rb on lines 9..30
lib/ruby-jmeter/dsl/jdbc_request.rb on lines 9..30
lib/ruby-jmeter/dsl/jms_publisher.rb on lines 9..40
lib/ruby-jmeter/dsl/jms_subscriber.rb on lines 9..32
lib/ruby-jmeter/dsl/json_path_postprocessor.rb on lines 9..24
lib/ruby-jmeter/dsl/jsr223_assertion.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_listener.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_postprocessor.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_preprocessor.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_sampler.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_timer.rb on lines 9..26
lib/ruby-jmeter/dsl/junit_request.rb on lines 9..34
lib/ruby-jmeter/dsl/keystore_configuration.rb on lines 9..25
lib/ruby-jmeter/dsl/ldap_extended_request.rb on lines 9..39
lib/ruby-jmeter/dsl/ldap_extended_request_defaults.rb on lines 9..39
lib/ruby-jmeter/dsl/login_config_element.rb on lines 9..23
lib/ruby-jmeter/dsl/loop_controller.rb on lines 9..23
lib/ruby-jmeter/dsl/mail_reader_sampler.rb on lines 9..34
lib/ruby-jmeter/dsl/mailer_visualizer.rb on lines 9..61
lib/ruby-jmeter/dsl/md5hex_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/module_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/once_only_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/poisson_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/random_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/random_order_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/random_variable.rb on lines 9..27
lib/ruby-jmeter/dsl/recording_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/regex_user_parameters.rb on lines 9..24
lib/ruby-jmeter/dsl/regular_expression_extractor.rb on lines 9..29
lib/ruby-jmeter/dsl/response_assertion.rb on lines 9..28
lib/ruby-jmeter/dsl/response_time_graph.rb on lines 9..52
lib/ruby-jmeter/dsl/result_status_action_handler.rb on lines 9..22
lib/ruby-jmeter/dsl/runtime_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/save_responses_to_a_file.rb on lines 9..26
lib/ruby-jmeter/dsl/simple_config_element.rb on lines 9..20
lib/ruby-jmeter/dsl/simple_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/simple_data_writer.rb on lines 9..52
lib/ruby-jmeter/dsl/smime_assertion.rb on lines 9..32
lib/ruby-jmeter/dsl/smtp_sampler.rb on lines 9..48
lib/ruby-jmeter/dsl/soapxmlrpc_request.rb on lines 9..30
lib/ruby-jmeter/dsl/spline_visualizer.rb on lines 9..52
lib/ruby-jmeter/dsl/summary_report.rb on lines 9..52
lib/ruby-jmeter/dsl/switch_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/synchronizing_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/tcp_sampler.rb on lines 9..30
lib/ruby-jmeter/dsl/tcp_sampler_config.rb on lines 9..28
lib/ruby-jmeter/dsl/test_action.rb on lines 9..24
lib/ruby-jmeter/dsl/test_fragment.rb on lines 9..20
lib/ruby-jmeter/dsl/throughput_controller.rb on lines 9..29
lib/ruby-jmeter/dsl/transaction_controller.rb on lines 9..23
lib/ruby-jmeter/dsl/uniform_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/user_defined_variables.rb on lines 9..30
lib/ruby-jmeter/dsl/user_parameters.rb on lines 9..27
lib/ruby-jmeter/dsl/view_results_in_table.rb on lines 9..52
lib/ruby-jmeter/dsl/view_results_tree.rb on lines 9..52
lib/ruby-jmeter/dsl/while_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/xml_assertion.rb on lines 9..20
lib/ruby-jmeter/dsl/xml_schema_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/xpath_assertion.rb on lines 9..28
lib/ruby-jmeter/dsl/xpath_extractor.rb on lines 9..28

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

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

  class JavaRequestDefaults
    attr_accessor :doc
    include Helper

    def initialize(params={})
Severity: Major
Found in lib/ruby-jmeter/dsl/java_request_defaults.rb and 107 other locations - About 45 mins to fix
lib/ruby-jmeter/dsl/access_log_sampler.rb on lines 9..29
lib/ruby-jmeter/dsl/aggregate_graph.rb on lines 9..52
lib/ruby-jmeter/dsl/aggregate_report.rb on lines 9..52
lib/ruby-jmeter/dsl/assertion_results.rb on lines 9..52
lib/ruby-jmeter/dsl/beanshell_assertion.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_listener.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_postprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_preprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_sampler.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_timer.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_assertion.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_listener.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_postprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_preprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_sampler.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_timer.rb on lines 9..25
lib/ruby-jmeter/dsl/compare_assertion.rb on lines 9..24
lib/ruby-jmeter/dsl/comparison_assertion_visualizer.rb on lines 9..52
lib/ruby-jmeter/dsl/constant_throughput_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/constant_timer.rb on lines 9..22
lib/ruby-jmeter/dsl/counter.rb on lines 9..28
lib/ruby-jmeter/dsl/cssjquery_extractor.rb on lines 9..28
lib/ruby-jmeter/dsl/csv_data_set_config.rb on lines 9..30
lib/ruby-jmeter/dsl/debug_postprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/debug_sampler.rb on lines 9..24
lib/ruby-jmeter/dsl/distribution_graphalpha.rb on lines 9..52
lib/ruby-jmeter/dsl/duration_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/foreach_controller.rb on lines 9..24
lib/ruby-jmeter/dsl/ftp_request.rb on lines 9..31
lib/ruby-jmeter/dsl/ftp_request_defaults.rb on lines 9..29
lib/ruby-jmeter/dsl/gaussian_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/generate_summary_results.rb on lines 9..20
lib/ruby-jmeter/dsl/graph_results.rb on lines 9..52
lib/ruby-jmeter/dsl/html_assertion.rb on lines 9..27
lib/ruby-jmeter/dsl/html_link_parser.rb on lines 9..20
lib/ruby-jmeter/dsl/html_parameter_mask.rb on lines 9..29
lib/ruby-jmeter/dsl/http_authorization_manager.rb on lines 9..30
lib/ruby-jmeter/dsl/http_cache_manager.rb on lines 9..23
lib/ruby-jmeter/dsl/http_cookie_manager.rb on lines 9..25
lib/ruby-jmeter/dsl/http_header_manager.rb on lines 9..27
lib/ruby-jmeter/dsl/http_url_rewriting_modifier.rb on lines 9..27
lib/ruby-jmeter/dsl/if_controller.rb on lines 9..24
lib/ruby-jmeter/dsl/include_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/java_request.rb on lines 9..66
lib/ruby-jmeter/dsl/jdbc_connection_configuration.rb on lines 9..34
lib/ruby-jmeter/dsl/jdbc_postprocessor.rb on lines 9..30
lib/ruby-jmeter/dsl/jdbc_preprocessor.rb on lines 9..30
lib/ruby-jmeter/dsl/jdbc_request.rb on lines 9..30
lib/ruby-jmeter/dsl/jms_publisher.rb on lines 9..40
lib/ruby-jmeter/dsl/jms_subscriber.rb on lines 9..32
lib/ruby-jmeter/dsl/json_path_postprocessor.rb on lines 9..24
lib/ruby-jmeter/dsl/jsr223_assertion.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_listener.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_postprocessor.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_preprocessor.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_sampler.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_timer.rb on lines 9..26
lib/ruby-jmeter/dsl/junit_request.rb on lines 9..34
lib/ruby-jmeter/dsl/keystore_configuration.rb on lines 9..25
lib/ruby-jmeter/dsl/ldap_extended_request.rb on lines 9..39
lib/ruby-jmeter/dsl/ldap_extended_request_defaults.rb on lines 9..39
lib/ruby-jmeter/dsl/login_config_element.rb on lines 9..23
lib/ruby-jmeter/dsl/loop_controller.rb on lines 9..23
lib/ruby-jmeter/dsl/mail_reader_sampler.rb on lines 9..34
lib/ruby-jmeter/dsl/mailer_visualizer.rb on lines 9..61
lib/ruby-jmeter/dsl/md5hex_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/module_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/monitor_results.rb on lines 9..52
lib/ruby-jmeter/dsl/once_only_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/poisson_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/random_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/random_order_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/random_variable.rb on lines 9..27
lib/ruby-jmeter/dsl/recording_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/regex_user_parameters.rb on lines 9..24
lib/ruby-jmeter/dsl/regular_expression_extractor.rb on lines 9..29
lib/ruby-jmeter/dsl/response_assertion.rb on lines 9..28
lib/ruby-jmeter/dsl/response_time_graph.rb on lines 9..52
lib/ruby-jmeter/dsl/result_status_action_handler.rb on lines 9..22
lib/ruby-jmeter/dsl/runtime_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/save_responses_to_a_file.rb on lines 9..26
lib/ruby-jmeter/dsl/simple_config_element.rb on lines 9..20
lib/ruby-jmeter/dsl/simple_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/simple_data_writer.rb on lines 9..52
lib/ruby-jmeter/dsl/smime_assertion.rb on lines 9..32
lib/ruby-jmeter/dsl/smtp_sampler.rb on lines 9..48
lib/ruby-jmeter/dsl/soapxmlrpc_request.rb on lines 9..30
lib/ruby-jmeter/dsl/spline_visualizer.rb on lines 9..52
lib/ruby-jmeter/dsl/summary_report.rb on lines 9..52
lib/ruby-jmeter/dsl/switch_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/synchronizing_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/tcp_sampler.rb on lines 9..30
lib/ruby-jmeter/dsl/tcp_sampler_config.rb on lines 9..28
lib/ruby-jmeter/dsl/test_action.rb on lines 9..24
lib/ruby-jmeter/dsl/test_fragment.rb on lines 9..20
lib/ruby-jmeter/dsl/throughput_controller.rb on lines 9..29
lib/ruby-jmeter/dsl/transaction_controller.rb on lines 9..23
lib/ruby-jmeter/dsl/uniform_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/user_defined_variables.rb on lines 9..30
lib/ruby-jmeter/dsl/user_parameters.rb on lines 9..27
lib/ruby-jmeter/dsl/view_results_in_table.rb on lines 9..52
lib/ruby-jmeter/dsl/view_results_tree.rb on lines 9..52
lib/ruby-jmeter/dsl/while_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/xml_assertion.rb on lines 9..20
lib/ruby-jmeter/dsl/xml_schema_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/xpath_assertion.rb on lines 9..28
lib/ruby-jmeter/dsl/xpath_extractor.rb on lines 9..28

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

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

  class Jsr223Postprocessor
    attr_accessor :doc
    include Helper

    def initialize(params={})
Severity: Major
Found in lib/ruby-jmeter/dsl/jsr223_postprocessor.rb and 107 other locations - About 45 mins to fix
lib/ruby-jmeter/dsl/access_log_sampler.rb on lines 9..29
lib/ruby-jmeter/dsl/aggregate_graph.rb on lines 9..52
lib/ruby-jmeter/dsl/aggregate_report.rb on lines 9..52
lib/ruby-jmeter/dsl/assertion_results.rb on lines 9..52
lib/ruby-jmeter/dsl/beanshell_assertion.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_listener.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_postprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_preprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_sampler.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_timer.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_assertion.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_listener.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_postprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_preprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_sampler.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_timer.rb on lines 9..25
lib/ruby-jmeter/dsl/compare_assertion.rb on lines 9..24
lib/ruby-jmeter/dsl/comparison_assertion_visualizer.rb on lines 9..52
lib/ruby-jmeter/dsl/constant_throughput_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/constant_timer.rb on lines 9..22
lib/ruby-jmeter/dsl/counter.rb on lines 9..28
lib/ruby-jmeter/dsl/cssjquery_extractor.rb on lines 9..28
lib/ruby-jmeter/dsl/csv_data_set_config.rb on lines 9..30
lib/ruby-jmeter/dsl/debug_postprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/debug_sampler.rb on lines 9..24
lib/ruby-jmeter/dsl/distribution_graphalpha.rb on lines 9..52
lib/ruby-jmeter/dsl/duration_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/foreach_controller.rb on lines 9..24
lib/ruby-jmeter/dsl/ftp_request.rb on lines 9..31
lib/ruby-jmeter/dsl/ftp_request_defaults.rb on lines 9..29
lib/ruby-jmeter/dsl/gaussian_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/generate_summary_results.rb on lines 9..20
lib/ruby-jmeter/dsl/graph_results.rb on lines 9..52
lib/ruby-jmeter/dsl/html_assertion.rb on lines 9..27
lib/ruby-jmeter/dsl/html_link_parser.rb on lines 9..20
lib/ruby-jmeter/dsl/html_parameter_mask.rb on lines 9..29
lib/ruby-jmeter/dsl/http_authorization_manager.rb on lines 9..30
lib/ruby-jmeter/dsl/http_cache_manager.rb on lines 9..23
lib/ruby-jmeter/dsl/http_cookie_manager.rb on lines 9..25
lib/ruby-jmeter/dsl/http_header_manager.rb on lines 9..27
lib/ruby-jmeter/dsl/http_url_rewriting_modifier.rb on lines 9..27
lib/ruby-jmeter/dsl/if_controller.rb on lines 9..24
lib/ruby-jmeter/dsl/include_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/java_request.rb on lines 9..66
lib/ruby-jmeter/dsl/java_request_defaults.rb on lines 9..66
lib/ruby-jmeter/dsl/jdbc_connection_configuration.rb on lines 9..34
lib/ruby-jmeter/dsl/jdbc_postprocessor.rb on lines 9..30
lib/ruby-jmeter/dsl/jdbc_preprocessor.rb on lines 9..30
lib/ruby-jmeter/dsl/jdbc_request.rb on lines 9..30
lib/ruby-jmeter/dsl/jms_publisher.rb on lines 9..40
lib/ruby-jmeter/dsl/jms_subscriber.rb on lines 9..32
lib/ruby-jmeter/dsl/json_path_postprocessor.rb on lines 9..24
lib/ruby-jmeter/dsl/jsr223_assertion.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_listener.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_preprocessor.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_sampler.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_timer.rb on lines 9..26
lib/ruby-jmeter/dsl/junit_request.rb on lines 9..34
lib/ruby-jmeter/dsl/keystore_configuration.rb on lines 9..25
lib/ruby-jmeter/dsl/ldap_extended_request.rb on lines 9..39
lib/ruby-jmeter/dsl/ldap_extended_request_defaults.rb on lines 9..39
lib/ruby-jmeter/dsl/login_config_element.rb on lines 9..23
lib/ruby-jmeter/dsl/loop_controller.rb on lines 9..23
lib/ruby-jmeter/dsl/mail_reader_sampler.rb on lines 9..34
lib/ruby-jmeter/dsl/mailer_visualizer.rb on lines 9..61
lib/ruby-jmeter/dsl/md5hex_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/module_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/monitor_results.rb on lines 9..52
lib/ruby-jmeter/dsl/once_only_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/poisson_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/random_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/random_order_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/random_variable.rb on lines 9..27
lib/ruby-jmeter/dsl/recording_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/regex_user_parameters.rb on lines 9..24
lib/ruby-jmeter/dsl/regular_expression_extractor.rb on lines 9..29
lib/ruby-jmeter/dsl/response_assertion.rb on lines 9..28
lib/ruby-jmeter/dsl/response_time_graph.rb on lines 9..52
lib/ruby-jmeter/dsl/result_status_action_handler.rb on lines 9..22
lib/ruby-jmeter/dsl/runtime_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/save_responses_to_a_file.rb on lines 9..26
lib/ruby-jmeter/dsl/simple_config_element.rb on lines 9..20
lib/ruby-jmeter/dsl/simple_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/simple_data_writer.rb on lines 9..52
lib/ruby-jmeter/dsl/smime_assertion.rb on lines 9..32
lib/ruby-jmeter/dsl/smtp_sampler.rb on lines 9..48
lib/ruby-jmeter/dsl/soapxmlrpc_request.rb on lines 9..30
lib/ruby-jmeter/dsl/spline_visualizer.rb on lines 9..52
lib/ruby-jmeter/dsl/summary_report.rb on lines 9..52
lib/ruby-jmeter/dsl/switch_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/synchronizing_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/tcp_sampler.rb on lines 9..30
lib/ruby-jmeter/dsl/tcp_sampler_config.rb on lines 9..28
lib/ruby-jmeter/dsl/test_action.rb on lines 9..24
lib/ruby-jmeter/dsl/test_fragment.rb on lines 9..20
lib/ruby-jmeter/dsl/throughput_controller.rb on lines 9..29
lib/ruby-jmeter/dsl/transaction_controller.rb on lines 9..23
lib/ruby-jmeter/dsl/uniform_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/user_defined_variables.rb on lines 9..30
lib/ruby-jmeter/dsl/user_parameters.rb on lines 9..27
lib/ruby-jmeter/dsl/view_results_in_table.rb on lines 9..52
lib/ruby-jmeter/dsl/view_results_tree.rb on lines 9..52
lib/ruby-jmeter/dsl/while_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/xml_assertion.rb on lines 9..20
lib/ruby-jmeter/dsl/xml_schema_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/xpath_assertion.rb on lines 9..28
lib/ruby-jmeter/dsl/xpath_extractor.rb on lines 9..28

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

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

  class SoapxmlrpcRequest
    attr_accessor :doc
    include Helper

    def initialize(params={})
Severity: Major
Found in lib/ruby-jmeter/dsl/soapxmlrpc_request.rb and 107 other locations - About 45 mins to fix
lib/ruby-jmeter/dsl/access_log_sampler.rb on lines 9..29
lib/ruby-jmeter/dsl/aggregate_graph.rb on lines 9..52
lib/ruby-jmeter/dsl/aggregate_report.rb on lines 9..52
lib/ruby-jmeter/dsl/assertion_results.rb on lines 9..52
lib/ruby-jmeter/dsl/beanshell_assertion.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_listener.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_postprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_preprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_sampler.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_timer.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_assertion.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_listener.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_postprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_preprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_sampler.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_timer.rb on lines 9..25
lib/ruby-jmeter/dsl/compare_assertion.rb on lines 9..24
lib/ruby-jmeter/dsl/comparison_assertion_visualizer.rb on lines 9..52
lib/ruby-jmeter/dsl/constant_throughput_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/constant_timer.rb on lines 9..22
lib/ruby-jmeter/dsl/counter.rb on lines 9..28
lib/ruby-jmeter/dsl/cssjquery_extractor.rb on lines 9..28
lib/ruby-jmeter/dsl/csv_data_set_config.rb on lines 9..30
lib/ruby-jmeter/dsl/debug_postprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/debug_sampler.rb on lines 9..24
lib/ruby-jmeter/dsl/distribution_graphalpha.rb on lines 9..52
lib/ruby-jmeter/dsl/duration_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/foreach_controller.rb on lines 9..24
lib/ruby-jmeter/dsl/ftp_request.rb on lines 9..31
lib/ruby-jmeter/dsl/ftp_request_defaults.rb on lines 9..29
lib/ruby-jmeter/dsl/gaussian_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/generate_summary_results.rb on lines 9..20
lib/ruby-jmeter/dsl/graph_results.rb on lines 9..52
lib/ruby-jmeter/dsl/html_assertion.rb on lines 9..27
lib/ruby-jmeter/dsl/html_link_parser.rb on lines 9..20
lib/ruby-jmeter/dsl/html_parameter_mask.rb on lines 9..29
lib/ruby-jmeter/dsl/http_authorization_manager.rb on lines 9..30
lib/ruby-jmeter/dsl/http_cache_manager.rb on lines 9..23
lib/ruby-jmeter/dsl/http_cookie_manager.rb on lines 9..25
lib/ruby-jmeter/dsl/http_header_manager.rb on lines 9..27
lib/ruby-jmeter/dsl/http_url_rewriting_modifier.rb on lines 9..27
lib/ruby-jmeter/dsl/if_controller.rb on lines 9..24
lib/ruby-jmeter/dsl/include_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/java_request.rb on lines 9..66
lib/ruby-jmeter/dsl/java_request_defaults.rb on lines 9..66
lib/ruby-jmeter/dsl/jdbc_connection_configuration.rb on lines 9..34
lib/ruby-jmeter/dsl/jdbc_postprocessor.rb on lines 9..30
lib/ruby-jmeter/dsl/jdbc_preprocessor.rb on lines 9..30
lib/ruby-jmeter/dsl/jdbc_request.rb on lines 9..30
lib/ruby-jmeter/dsl/jms_publisher.rb on lines 9..40
lib/ruby-jmeter/dsl/jms_subscriber.rb on lines 9..32
lib/ruby-jmeter/dsl/json_path_postprocessor.rb on lines 9..24
lib/ruby-jmeter/dsl/jsr223_assertion.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_listener.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_postprocessor.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_preprocessor.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_sampler.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_timer.rb on lines 9..26
lib/ruby-jmeter/dsl/junit_request.rb on lines 9..34
lib/ruby-jmeter/dsl/keystore_configuration.rb on lines 9..25
lib/ruby-jmeter/dsl/ldap_extended_request.rb on lines 9..39
lib/ruby-jmeter/dsl/ldap_extended_request_defaults.rb on lines 9..39
lib/ruby-jmeter/dsl/login_config_element.rb on lines 9..23
lib/ruby-jmeter/dsl/loop_controller.rb on lines 9..23
lib/ruby-jmeter/dsl/mail_reader_sampler.rb on lines 9..34
lib/ruby-jmeter/dsl/mailer_visualizer.rb on lines 9..61
lib/ruby-jmeter/dsl/md5hex_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/module_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/monitor_results.rb on lines 9..52
lib/ruby-jmeter/dsl/once_only_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/poisson_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/random_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/random_order_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/random_variable.rb on lines 9..27
lib/ruby-jmeter/dsl/recording_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/regex_user_parameters.rb on lines 9..24
lib/ruby-jmeter/dsl/regular_expression_extractor.rb on lines 9..29
lib/ruby-jmeter/dsl/response_assertion.rb on lines 9..28
lib/ruby-jmeter/dsl/response_time_graph.rb on lines 9..52
lib/ruby-jmeter/dsl/result_status_action_handler.rb on lines 9..22
lib/ruby-jmeter/dsl/runtime_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/save_responses_to_a_file.rb on lines 9..26
lib/ruby-jmeter/dsl/simple_config_element.rb on lines 9..20
lib/ruby-jmeter/dsl/simple_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/simple_data_writer.rb on lines 9..52
lib/ruby-jmeter/dsl/smime_assertion.rb on lines 9..32
lib/ruby-jmeter/dsl/smtp_sampler.rb on lines 9..48
lib/ruby-jmeter/dsl/spline_visualizer.rb on lines 9..52
lib/ruby-jmeter/dsl/summary_report.rb on lines 9..52
lib/ruby-jmeter/dsl/switch_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/synchronizing_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/tcp_sampler.rb on lines 9..30
lib/ruby-jmeter/dsl/tcp_sampler_config.rb on lines 9..28
lib/ruby-jmeter/dsl/test_action.rb on lines 9..24
lib/ruby-jmeter/dsl/test_fragment.rb on lines 9..20
lib/ruby-jmeter/dsl/throughput_controller.rb on lines 9..29
lib/ruby-jmeter/dsl/transaction_controller.rb on lines 9..23
lib/ruby-jmeter/dsl/uniform_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/user_defined_variables.rb on lines 9..30
lib/ruby-jmeter/dsl/user_parameters.rb on lines 9..27
lib/ruby-jmeter/dsl/view_results_in_table.rb on lines 9..52
lib/ruby-jmeter/dsl/view_results_tree.rb on lines 9..52
lib/ruby-jmeter/dsl/while_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/xml_assertion.rb on lines 9..20
lib/ruby-jmeter/dsl/xml_schema_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/xpath_assertion.rb on lines 9..28
lib/ruby-jmeter/dsl/xpath_extractor.rb on lines 9..28

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

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

  class BsfSampler
    attr_accessor :doc
    include Helper

    def initialize(params={})
Severity: Major
Found in lib/ruby-jmeter/dsl/bsf_sampler.rb and 107 other locations - About 45 mins to fix
lib/ruby-jmeter/dsl/access_log_sampler.rb on lines 9..29
lib/ruby-jmeter/dsl/aggregate_graph.rb on lines 9..52
lib/ruby-jmeter/dsl/aggregate_report.rb on lines 9..52
lib/ruby-jmeter/dsl/assertion_results.rb on lines 9..52
lib/ruby-jmeter/dsl/beanshell_assertion.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_listener.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_postprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_preprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_sampler.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_timer.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_assertion.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_listener.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_postprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_preprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_timer.rb on lines 9..25
lib/ruby-jmeter/dsl/compare_assertion.rb on lines 9..24
lib/ruby-jmeter/dsl/comparison_assertion_visualizer.rb on lines 9..52
lib/ruby-jmeter/dsl/constant_throughput_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/constant_timer.rb on lines 9..22
lib/ruby-jmeter/dsl/counter.rb on lines 9..28
lib/ruby-jmeter/dsl/cssjquery_extractor.rb on lines 9..28
lib/ruby-jmeter/dsl/csv_data_set_config.rb on lines 9..30
lib/ruby-jmeter/dsl/debug_postprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/debug_sampler.rb on lines 9..24
lib/ruby-jmeter/dsl/distribution_graphalpha.rb on lines 9..52
lib/ruby-jmeter/dsl/duration_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/foreach_controller.rb on lines 9..24
lib/ruby-jmeter/dsl/ftp_request.rb on lines 9..31
lib/ruby-jmeter/dsl/ftp_request_defaults.rb on lines 9..29
lib/ruby-jmeter/dsl/gaussian_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/generate_summary_results.rb on lines 9..20
lib/ruby-jmeter/dsl/graph_results.rb on lines 9..52
lib/ruby-jmeter/dsl/html_assertion.rb on lines 9..27
lib/ruby-jmeter/dsl/html_link_parser.rb on lines 9..20
lib/ruby-jmeter/dsl/html_parameter_mask.rb on lines 9..29
lib/ruby-jmeter/dsl/http_authorization_manager.rb on lines 9..30
lib/ruby-jmeter/dsl/http_cache_manager.rb on lines 9..23
lib/ruby-jmeter/dsl/http_cookie_manager.rb on lines 9..25
lib/ruby-jmeter/dsl/http_header_manager.rb on lines 9..27
lib/ruby-jmeter/dsl/http_url_rewriting_modifier.rb on lines 9..27
lib/ruby-jmeter/dsl/if_controller.rb on lines 9..24
lib/ruby-jmeter/dsl/include_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/java_request.rb on lines 9..66
lib/ruby-jmeter/dsl/java_request_defaults.rb on lines 9..66
lib/ruby-jmeter/dsl/jdbc_connection_configuration.rb on lines 9..34
lib/ruby-jmeter/dsl/jdbc_postprocessor.rb on lines 9..30
lib/ruby-jmeter/dsl/jdbc_preprocessor.rb on lines 9..30
lib/ruby-jmeter/dsl/jdbc_request.rb on lines 9..30
lib/ruby-jmeter/dsl/jms_publisher.rb on lines 9..40
lib/ruby-jmeter/dsl/jms_subscriber.rb on lines 9..32
lib/ruby-jmeter/dsl/json_path_postprocessor.rb on lines 9..24
lib/ruby-jmeter/dsl/jsr223_assertion.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_listener.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_postprocessor.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_preprocessor.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_sampler.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_timer.rb on lines 9..26
lib/ruby-jmeter/dsl/junit_request.rb on lines 9..34
lib/ruby-jmeter/dsl/keystore_configuration.rb on lines 9..25
lib/ruby-jmeter/dsl/ldap_extended_request.rb on lines 9..39
lib/ruby-jmeter/dsl/ldap_extended_request_defaults.rb on lines 9..39
lib/ruby-jmeter/dsl/login_config_element.rb on lines 9..23
lib/ruby-jmeter/dsl/loop_controller.rb on lines 9..23
lib/ruby-jmeter/dsl/mail_reader_sampler.rb on lines 9..34
lib/ruby-jmeter/dsl/mailer_visualizer.rb on lines 9..61
lib/ruby-jmeter/dsl/md5hex_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/module_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/monitor_results.rb on lines 9..52
lib/ruby-jmeter/dsl/once_only_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/poisson_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/random_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/random_order_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/random_variable.rb on lines 9..27
lib/ruby-jmeter/dsl/recording_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/regex_user_parameters.rb on lines 9..24
lib/ruby-jmeter/dsl/regular_expression_extractor.rb on lines 9..29
lib/ruby-jmeter/dsl/response_assertion.rb on lines 9..28
lib/ruby-jmeter/dsl/response_time_graph.rb on lines 9..52
lib/ruby-jmeter/dsl/result_status_action_handler.rb on lines 9..22
lib/ruby-jmeter/dsl/runtime_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/save_responses_to_a_file.rb on lines 9..26
lib/ruby-jmeter/dsl/simple_config_element.rb on lines 9..20
lib/ruby-jmeter/dsl/simple_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/simple_data_writer.rb on lines 9..52
lib/ruby-jmeter/dsl/smime_assertion.rb on lines 9..32
lib/ruby-jmeter/dsl/smtp_sampler.rb on lines 9..48
lib/ruby-jmeter/dsl/soapxmlrpc_request.rb on lines 9..30
lib/ruby-jmeter/dsl/spline_visualizer.rb on lines 9..52
lib/ruby-jmeter/dsl/summary_report.rb on lines 9..52
lib/ruby-jmeter/dsl/switch_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/synchronizing_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/tcp_sampler.rb on lines 9..30
lib/ruby-jmeter/dsl/tcp_sampler_config.rb on lines 9..28
lib/ruby-jmeter/dsl/test_action.rb on lines 9..24
lib/ruby-jmeter/dsl/test_fragment.rb on lines 9..20
lib/ruby-jmeter/dsl/throughput_controller.rb on lines 9..29
lib/ruby-jmeter/dsl/transaction_controller.rb on lines 9..23
lib/ruby-jmeter/dsl/uniform_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/user_defined_variables.rb on lines 9..30
lib/ruby-jmeter/dsl/user_parameters.rb on lines 9..27
lib/ruby-jmeter/dsl/view_results_in_table.rb on lines 9..52
lib/ruby-jmeter/dsl/view_results_tree.rb on lines 9..52
lib/ruby-jmeter/dsl/while_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/xml_assertion.rb on lines 9..20
lib/ruby-jmeter/dsl/xml_schema_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/xpath_assertion.rb on lines 9..28
lib/ruby-jmeter/dsl/xpath_extractor.rb on lines 9..28

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

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

  class CssjqueryExtractor
    attr_accessor :doc
    include Helper

    def initialize(params={})
Severity: Major
Found in lib/ruby-jmeter/dsl/cssjquery_extractor.rb and 107 other locations - About 45 mins to fix
lib/ruby-jmeter/dsl/access_log_sampler.rb on lines 9..29
lib/ruby-jmeter/dsl/aggregate_graph.rb on lines 9..52
lib/ruby-jmeter/dsl/aggregate_report.rb on lines 9..52
lib/ruby-jmeter/dsl/assertion_results.rb on lines 9..52
lib/ruby-jmeter/dsl/beanshell_assertion.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_listener.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_postprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_preprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_sampler.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_timer.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_assertion.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_listener.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_postprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_preprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_sampler.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_timer.rb on lines 9..25
lib/ruby-jmeter/dsl/compare_assertion.rb on lines 9..24
lib/ruby-jmeter/dsl/comparison_assertion_visualizer.rb on lines 9..52
lib/ruby-jmeter/dsl/constant_throughput_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/constant_timer.rb on lines 9..22
lib/ruby-jmeter/dsl/counter.rb on lines 9..28
lib/ruby-jmeter/dsl/csv_data_set_config.rb on lines 9..30
lib/ruby-jmeter/dsl/debug_postprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/debug_sampler.rb on lines 9..24
lib/ruby-jmeter/dsl/distribution_graphalpha.rb on lines 9..52
lib/ruby-jmeter/dsl/duration_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/foreach_controller.rb on lines 9..24
lib/ruby-jmeter/dsl/ftp_request.rb on lines 9..31
lib/ruby-jmeter/dsl/ftp_request_defaults.rb on lines 9..29
lib/ruby-jmeter/dsl/gaussian_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/generate_summary_results.rb on lines 9..20
lib/ruby-jmeter/dsl/graph_results.rb on lines 9..52
lib/ruby-jmeter/dsl/html_assertion.rb on lines 9..27
lib/ruby-jmeter/dsl/html_link_parser.rb on lines 9..20
lib/ruby-jmeter/dsl/html_parameter_mask.rb on lines 9..29
lib/ruby-jmeter/dsl/http_authorization_manager.rb on lines 9..30
lib/ruby-jmeter/dsl/http_cache_manager.rb on lines 9..23
lib/ruby-jmeter/dsl/http_cookie_manager.rb on lines 9..25
lib/ruby-jmeter/dsl/http_header_manager.rb on lines 9..27
lib/ruby-jmeter/dsl/http_url_rewriting_modifier.rb on lines 9..27
lib/ruby-jmeter/dsl/if_controller.rb on lines 9..24
lib/ruby-jmeter/dsl/include_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/java_request.rb on lines 9..66
lib/ruby-jmeter/dsl/java_request_defaults.rb on lines 9..66
lib/ruby-jmeter/dsl/jdbc_connection_configuration.rb on lines 9..34
lib/ruby-jmeter/dsl/jdbc_postprocessor.rb on lines 9..30
lib/ruby-jmeter/dsl/jdbc_preprocessor.rb on lines 9..30
lib/ruby-jmeter/dsl/jdbc_request.rb on lines 9..30
lib/ruby-jmeter/dsl/jms_publisher.rb on lines 9..40
lib/ruby-jmeter/dsl/jms_subscriber.rb on lines 9..32
lib/ruby-jmeter/dsl/json_path_postprocessor.rb on lines 9..24
lib/ruby-jmeter/dsl/jsr223_assertion.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_listener.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_postprocessor.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_preprocessor.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_sampler.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_timer.rb on lines 9..26
lib/ruby-jmeter/dsl/junit_request.rb on lines 9..34
lib/ruby-jmeter/dsl/keystore_configuration.rb on lines 9..25
lib/ruby-jmeter/dsl/ldap_extended_request.rb on lines 9..39
lib/ruby-jmeter/dsl/ldap_extended_request_defaults.rb on lines 9..39
lib/ruby-jmeter/dsl/login_config_element.rb on lines 9..23
lib/ruby-jmeter/dsl/loop_controller.rb on lines 9..23
lib/ruby-jmeter/dsl/mail_reader_sampler.rb on lines 9..34
lib/ruby-jmeter/dsl/mailer_visualizer.rb on lines 9..61
lib/ruby-jmeter/dsl/md5hex_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/module_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/monitor_results.rb on lines 9..52
lib/ruby-jmeter/dsl/once_only_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/poisson_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/random_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/random_order_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/random_variable.rb on lines 9..27
lib/ruby-jmeter/dsl/recording_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/regex_user_parameters.rb on lines 9..24
lib/ruby-jmeter/dsl/regular_expression_extractor.rb on lines 9..29
lib/ruby-jmeter/dsl/response_assertion.rb on lines 9..28
lib/ruby-jmeter/dsl/response_time_graph.rb on lines 9..52
lib/ruby-jmeter/dsl/result_status_action_handler.rb on lines 9..22
lib/ruby-jmeter/dsl/runtime_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/save_responses_to_a_file.rb on lines 9..26
lib/ruby-jmeter/dsl/simple_config_element.rb on lines 9..20
lib/ruby-jmeter/dsl/simple_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/simple_data_writer.rb on lines 9..52
lib/ruby-jmeter/dsl/smime_assertion.rb on lines 9..32
lib/ruby-jmeter/dsl/smtp_sampler.rb on lines 9..48
lib/ruby-jmeter/dsl/soapxmlrpc_request.rb on lines 9..30
lib/ruby-jmeter/dsl/spline_visualizer.rb on lines 9..52
lib/ruby-jmeter/dsl/summary_report.rb on lines 9..52
lib/ruby-jmeter/dsl/switch_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/synchronizing_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/tcp_sampler.rb on lines 9..30
lib/ruby-jmeter/dsl/tcp_sampler_config.rb on lines 9..28
lib/ruby-jmeter/dsl/test_action.rb on lines 9..24
lib/ruby-jmeter/dsl/test_fragment.rb on lines 9..20
lib/ruby-jmeter/dsl/throughput_controller.rb on lines 9..29
lib/ruby-jmeter/dsl/transaction_controller.rb on lines 9..23
lib/ruby-jmeter/dsl/uniform_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/user_defined_variables.rb on lines 9..30
lib/ruby-jmeter/dsl/user_parameters.rb on lines 9..27
lib/ruby-jmeter/dsl/view_results_in_table.rb on lines 9..52
lib/ruby-jmeter/dsl/view_results_tree.rb on lines 9..52
lib/ruby-jmeter/dsl/while_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/xml_assertion.rb on lines 9..20
lib/ruby-jmeter/dsl/xml_schema_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/xpath_assertion.rb on lines 9..28
lib/ruby-jmeter/dsl/xpath_extractor.rb on lines 9..28

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

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

  class ForeachController
    attr_accessor :doc
    include Helper

    def initialize(params={})
Severity: Major
Found in lib/ruby-jmeter/dsl/foreach_controller.rb and 107 other locations - About 45 mins to fix
lib/ruby-jmeter/dsl/access_log_sampler.rb on lines 9..29
lib/ruby-jmeter/dsl/aggregate_graph.rb on lines 9..52
lib/ruby-jmeter/dsl/aggregate_report.rb on lines 9..52
lib/ruby-jmeter/dsl/assertion_results.rb on lines 9..52
lib/ruby-jmeter/dsl/beanshell_assertion.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_listener.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_postprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_preprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_sampler.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_timer.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_assertion.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_listener.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_postprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_preprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_sampler.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_timer.rb on lines 9..25
lib/ruby-jmeter/dsl/compare_assertion.rb on lines 9..24
lib/ruby-jmeter/dsl/comparison_assertion_visualizer.rb on lines 9..52
lib/ruby-jmeter/dsl/constant_throughput_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/constant_timer.rb on lines 9..22
lib/ruby-jmeter/dsl/counter.rb on lines 9..28
lib/ruby-jmeter/dsl/cssjquery_extractor.rb on lines 9..28
lib/ruby-jmeter/dsl/csv_data_set_config.rb on lines 9..30
lib/ruby-jmeter/dsl/debug_postprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/debug_sampler.rb on lines 9..24
lib/ruby-jmeter/dsl/distribution_graphalpha.rb on lines 9..52
lib/ruby-jmeter/dsl/duration_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/ftp_request.rb on lines 9..31
lib/ruby-jmeter/dsl/ftp_request_defaults.rb on lines 9..29
lib/ruby-jmeter/dsl/gaussian_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/generate_summary_results.rb on lines 9..20
lib/ruby-jmeter/dsl/graph_results.rb on lines 9..52
lib/ruby-jmeter/dsl/html_assertion.rb on lines 9..27
lib/ruby-jmeter/dsl/html_link_parser.rb on lines 9..20
lib/ruby-jmeter/dsl/html_parameter_mask.rb on lines 9..29
lib/ruby-jmeter/dsl/http_authorization_manager.rb on lines 9..30
lib/ruby-jmeter/dsl/http_cache_manager.rb on lines 9..23
lib/ruby-jmeter/dsl/http_cookie_manager.rb on lines 9..25
lib/ruby-jmeter/dsl/http_header_manager.rb on lines 9..27
lib/ruby-jmeter/dsl/http_url_rewriting_modifier.rb on lines 9..27
lib/ruby-jmeter/dsl/if_controller.rb on lines 9..24
lib/ruby-jmeter/dsl/include_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/java_request.rb on lines 9..66
lib/ruby-jmeter/dsl/java_request_defaults.rb on lines 9..66
lib/ruby-jmeter/dsl/jdbc_connection_configuration.rb on lines 9..34
lib/ruby-jmeter/dsl/jdbc_postprocessor.rb on lines 9..30
lib/ruby-jmeter/dsl/jdbc_preprocessor.rb on lines 9..30
lib/ruby-jmeter/dsl/jdbc_request.rb on lines 9..30
lib/ruby-jmeter/dsl/jms_publisher.rb on lines 9..40
lib/ruby-jmeter/dsl/jms_subscriber.rb on lines 9..32
lib/ruby-jmeter/dsl/json_path_postprocessor.rb on lines 9..24
lib/ruby-jmeter/dsl/jsr223_assertion.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_listener.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_postprocessor.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_preprocessor.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_sampler.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_timer.rb on lines 9..26
lib/ruby-jmeter/dsl/junit_request.rb on lines 9..34
lib/ruby-jmeter/dsl/keystore_configuration.rb on lines 9..25
lib/ruby-jmeter/dsl/ldap_extended_request.rb on lines 9..39
lib/ruby-jmeter/dsl/ldap_extended_request_defaults.rb on lines 9..39
lib/ruby-jmeter/dsl/login_config_element.rb on lines 9..23
lib/ruby-jmeter/dsl/loop_controller.rb on lines 9..23
lib/ruby-jmeter/dsl/mail_reader_sampler.rb on lines 9..34
lib/ruby-jmeter/dsl/mailer_visualizer.rb on lines 9..61
lib/ruby-jmeter/dsl/md5hex_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/module_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/monitor_results.rb on lines 9..52
lib/ruby-jmeter/dsl/once_only_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/poisson_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/random_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/random_order_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/random_variable.rb on lines 9..27
lib/ruby-jmeter/dsl/recording_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/regex_user_parameters.rb on lines 9..24
lib/ruby-jmeter/dsl/regular_expression_extractor.rb on lines 9..29
lib/ruby-jmeter/dsl/response_assertion.rb on lines 9..28
lib/ruby-jmeter/dsl/response_time_graph.rb on lines 9..52
lib/ruby-jmeter/dsl/result_status_action_handler.rb on lines 9..22
lib/ruby-jmeter/dsl/runtime_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/save_responses_to_a_file.rb on lines 9..26
lib/ruby-jmeter/dsl/simple_config_element.rb on lines 9..20
lib/ruby-jmeter/dsl/simple_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/simple_data_writer.rb on lines 9..52
lib/ruby-jmeter/dsl/smime_assertion.rb on lines 9..32
lib/ruby-jmeter/dsl/smtp_sampler.rb on lines 9..48
lib/ruby-jmeter/dsl/soapxmlrpc_request.rb on lines 9..30
lib/ruby-jmeter/dsl/spline_visualizer.rb on lines 9..52
lib/ruby-jmeter/dsl/summary_report.rb on lines 9..52
lib/ruby-jmeter/dsl/switch_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/synchronizing_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/tcp_sampler.rb on lines 9..30
lib/ruby-jmeter/dsl/tcp_sampler_config.rb on lines 9..28
lib/ruby-jmeter/dsl/test_action.rb on lines 9..24
lib/ruby-jmeter/dsl/test_fragment.rb on lines 9..20
lib/ruby-jmeter/dsl/throughput_controller.rb on lines 9..29
lib/ruby-jmeter/dsl/transaction_controller.rb on lines 9..23
lib/ruby-jmeter/dsl/uniform_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/user_defined_variables.rb on lines 9..30
lib/ruby-jmeter/dsl/user_parameters.rb on lines 9..27
lib/ruby-jmeter/dsl/view_results_in_table.rb on lines 9..52
lib/ruby-jmeter/dsl/view_results_tree.rb on lines 9..52
lib/ruby-jmeter/dsl/while_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/xml_assertion.rb on lines 9..20
lib/ruby-jmeter/dsl/xml_schema_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/xpath_assertion.rb on lines 9..28
lib/ruby-jmeter/dsl/xpath_extractor.rb on lines 9..28

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

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

  class ViewResultsTree
    attr_accessor :doc
    include Helper

    def initialize(params={})
Severity: Major
Found in lib/ruby-jmeter/dsl/view_results_tree.rb and 107 other locations - About 45 mins to fix
lib/ruby-jmeter/dsl/access_log_sampler.rb on lines 9..29
lib/ruby-jmeter/dsl/aggregate_graph.rb on lines 9..52
lib/ruby-jmeter/dsl/aggregate_report.rb on lines 9..52
lib/ruby-jmeter/dsl/assertion_results.rb on lines 9..52
lib/ruby-jmeter/dsl/beanshell_assertion.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_listener.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_postprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_preprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_sampler.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_timer.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_assertion.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_listener.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_postprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_preprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_sampler.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_timer.rb on lines 9..25
lib/ruby-jmeter/dsl/compare_assertion.rb on lines 9..24
lib/ruby-jmeter/dsl/comparison_assertion_visualizer.rb on lines 9..52
lib/ruby-jmeter/dsl/constant_throughput_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/constant_timer.rb on lines 9..22
lib/ruby-jmeter/dsl/counter.rb on lines 9..28
lib/ruby-jmeter/dsl/cssjquery_extractor.rb on lines 9..28
lib/ruby-jmeter/dsl/csv_data_set_config.rb on lines 9..30
lib/ruby-jmeter/dsl/debug_postprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/debug_sampler.rb on lines 9..24
lib/ruby-jmeter/dsl/distribution_graphalpha.rb on lines 9..52
lib/ruby-jmeter/dsl/duration_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/foreach_controller.rb on lines 9..24
lib/ruby-jmeter/dsl/ftp_request.rb on lines 9..31
lib/ruby-jmeter/dsl/ftp_request_defaults.rb on lines 9..29
lib/ruby-jmeter/dsl/gaussian_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/generate_summary_results.rb on lines 9..20
lib/ruby-jmeter/dsl/graph_results.rb on lines 9..52
lib/ruby-jmeter/dsl/html_assertion.rb on lines 9..27
lib/ruby-jmeter/dsl/html_link_parser.rb on lines 9..20
lib/ruby-jmeter/dsl/html_parameter_mask.rb on lines 9..29
lib/ruby-jmeter/dsl/http_authorization_manager.rb on lines 9..30
lib/ruby-jmeter/dsl/http_cache_manager.rb on lines 9..23
lib/ruby-jmeter/dsl/http_cookie_manager.rb on lines 9..25
lib/ruby-jmeter/dsl/http_header_manager.rb on lines 9..27
lib/ruby-jmeter/dsl/http_url_rewriting_modifier.rb on lines 9..27
lib/ruby-jmeter/dsl/if_controller.rb on lines 9..24
lib/ruby-jmeter/dsl/include_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/java_request.rb on lines 9..66
lib/ruby-jmeter/dsl/java_request_defaults.rb on lines 9..66
lib/ruby-jmeter/dsl/jdbc_connection_configuration.rb on lines 9..34
lib/ruby-jmeter/dsl/jdbc_postprocessor.rb on lines 9..30
lib/ruby-jmeter/dsl/jdbc_preprocessor.rb on lines 9..30
lib/ruby-jmeter/dsl/jdbc_request.rb on lines 9..30
lib/ruby-jmeter/dsl/jms_publisher.rb on lines 9..40
lib/ruby-jmeter/dsl/jms_subscriber.rb on lines 9..32
lib/ruby-jmeter/dsl/json_path_postprocessor.rb on lines 9..24
lib/ruby-jmeter/dsl/jsr223_assertion.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_listener.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_postprocessor.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_preprocessor.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_sampler.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_timer.rb on lines 9..26
lib/ruby-jmeter/dsl/junit_request.rb on lines 9..34
lib/ruby-jmeter/dsl/keystore_configuration.rb on lines 9..25
lib/ruby-jmeter/dsl/ldap_extended_request.rb on lines 9..39
lib/ruby-jmeter/dsl/ldap_extended_request_defaults.rb on lines 9..39
lib/ruby-jmeter/dsl/login_config_element.rb on lines 9..23
lib/ruby-jmeter/dsl/loop_controller.rb on lines 9..23
lib/ruby-jmeter/dsl/mail_reader_sampler.rb on lines 9..34
lib/ruby-jmeter/dsl/mailer_visualizer.rb on lines 9..61
lib/ruby-jmeter/dsl/md5hex_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/module_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/monitor_results.rb on lines 9..52
lib/ruby-jmeter/dsl/once_only_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/poisson_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/random_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/random_order_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/random_variable.rb on lines 9..27
lib/ruby-jmeter/dsl/recording_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/regex_user_parameters.rb on lines 9..24
lib/ruby-jmeter/dsl/regular_expression_extractor.rb on lines 9..29
lib/ruby-jmeter/dsl/response_assertion.rb on lines 9..28
lib/ruby-jmeter/dsl/response_time_graph.rb on lines 9..52
lib/ruby-jmeter/dsl/result_status_action_handler.rb on lines 9..22
lib/ruby-jmeter/dsl/runtime_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/save_responses_to_a_file.rb on lines 9..26
lib/ruby-jmeter/dsl/simple_config_element.rb on lines 9..20
lib/ruby-jmeter/dsl/simple_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/simple_data_writer.rb on lines 9..52
lib/ruby-jmeter/dsl/smime_assertion.rb on lines 9..32
lib/ruby-jmeter/dsl/smtp_sampler.rb on lines 9..48
lib/ruby-jmeter/dsl/soapxmlrpc_request.rb on lines 9..30
lib/ruby-jmeter/dsl/spline_visualizer.rb on lines 9..52
lib/ruby-jmeter/dsl/summary_report.rb on lines 9..52
lib/ruby-jmeter/dsl/switch_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/synchronizing_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/tcp_sampler.rb on lines 9..30
lib/ruby-jmeter/dsl/tcp_sampler_config.rb on lines 9..28
lib/ruby-jmeter/dsl/test_action.rb on lines 9..24
lib/ruby-jmeter/dsl/test_fragment.rb on lines 9..20
lib/ruby-jmeter/dsl/throughput_controller.rb on lines 9..29
lib/ruby-jmeter/dsl/transaction_controller.rb on lines 9..23
lib/ruby-jmeter/dsl/uniform_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/user_defined_variables.rb on lines 9..30
lib/ruby-jmeter/dsl/user_parameters.rb on lines 9..27
lib/ruby-jmeter/dsl/view_results_in_table.rb on lines 9..52
lib/ruby-jmeter/dsl/while_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/xml_assertion.rb on lines 9..20
lib/ruby-jmeter/dsl/xml_schema_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/xpath_assertion.rb on lines 9..28
lib/ruby-jmeter/dsl/xpath_extractor.rb on lines 9..28

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

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

  class ResultStatusActionHandler
    attr_accessor :doc
    include Helper

    def initialize(params={})
Severity: Major
Found in lib/ruby-jmeter/dsl/result_status_action_handler.rb and 107 other locations - About 45 mins to fix
lib/ruby-jmeter/dsl/access_log_sampler.rb on lines 9..29
lib/ruby-jmeter/dsl/aggregate_graph.rb on lines 9..52
lib/ruby-jmeter/dsl/aggregate_report.rb on lines 9..52
lib/ruby-jmeter/dsl/assertion_results.rb on lines 9..52
lib/ruby-jmeter/dsl/beanshell_assertion.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_listener.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_postprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_preprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_sampler.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_timer.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_assertion.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_listener.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_postprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_preprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_sampler.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_timer.rb on lines 9..25
lib/ruby-jmeter/dsl/compare_assertion.rb on lines 9..24
lib/ruby-jmeter/dsl/comparison_assertion_visualizer.rb on lines 9..52
lib/ruby-jmeter/dsl/constant_throughput_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/constant_timer.rb on lines 9..22
lib/ruby-jmeter/dsl/counter.rb on lines 9..28
lib/ruby-jmeter/dsl/cssjquery_extractor.rb on lines 9..28
lib/ruby-jmeter/dsl/csv_data_set_config.rb on lines 9..30
lib/ruby-jmeter/dsl/debug_postprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/debug_sampler.rb on lines 9..24
lib/ruby-jmeter/dsl/distribution_graphalpha.rb on lines 9..52
lib/ruby-jmeter/dsl/duration_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/foreach_controller.rb on lines 9..24
lib/ruby-jmeter/dsl/ftp_request.rb on lines 9..31
lib/ruby-jmeter/dsl/ftp_request_defaults.rb on lines 9..29
lib/ruby-jmeter/dsl/gaussian_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/generate_summary_results.rb on lines 9..20
lib/ruby-jmeter/dsl/graph_results.rb on lines 9..52
lib/ruby-jmeter/dsl/html_assertion.rb on lines 9..27
lib/ruby-jmeter/dsl/html_link_parser.rb on lines 9..20
lib/ruby-jmeter/dsl/html_parameter_mask.rb on lines 9..29
lib/ruby-jmeter/dsl/http_authorization_manager.rb on lines 9..30
lib/ruby-jmeter/dsl/http_cache_manager.rb on lines 9..23
lib/ruby-jmeter/dsl/http_cookie_manager.rb on lines 9..25
lib/ruby-jmeter/dsl/http_header_manager.rb on lines 9..27
lib/ruby-jmeter/dsl/http_url_rewriting_modifier.rb on lines 9..27
lib/ruby-jmeter/dsl/if_controller.rb on lines 9..24
lib/ruby-jmeter/dsl/include_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/java_request.rb on lines 9..66
lib/ruby-jmeter/dsl/java_request_defaults.rb on lines 9..66
lib/ruby-jmeter/dsl/jdbc_connection_configuration.rb on lines 9..34
lib/ruby-jmeter/dsl/jdbc_postprocessor.rb on lines 9..30
lib/ruby-jmeter/dsl/jdbc_preprocessor.rb on lines 9..30
lib/ruby-jmeter/dsl/jdbc_request.rb on lines 9..30
lib/ruby-jmeter/dsl/jms_publisher.rb on lines 9..40
lib/ruby-jmeter/dsl/jms_subscriber.rb on lines 9..32
lib/ruby-jmeter/dsl/json_path_postprocessor.rb on lines 9..24
lib/ruby-jmeter/dsl/jsr223_assertion.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_listener.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_postprocessor.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_preprocessor.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_sampler.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_timer.rb on lines 9..26
lib/ruby-jmeter/dsl/junit_request.rb on lines 9..34
lib/ruby-jmeter/dsl/keystore_configuration.rb on lines 9..25
lib/ruby-jmeter/dsl/ldap_extended_request.rb on lines 9..39
lib/ruby-jmeter/dsl/ldap_extended_request_defaults.rb on lines 9..39
lib/ruby-jmeter/dsl/login_config_element.rb on lines 9..23
lib/ruby-jmeter/dsl/loop_controller.rb on lines 9..23
lib/ruby-jmeter/dsl/mail_reader_sampler.rb on lines 9..34
lib/ruby-jmeter/dsl/mailer_visualizer.rb on lines 9..61
lib/ruby-jmeter/dsl/md5hex_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/module_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/monitor_results.rb on lines 9..52
lib/ruby-jmeter/dsl/once_only_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/poisson_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/random_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/random_order_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/random_variable.rb on lines 9..27
lib/ruby-jmeter/dsl/recording_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/regex_user_parameters.rb on lines 9..24
lib/ruby-jmeter/dsl/regular_expression_extractor.rb on lines 9..29
lib/ruby-jmeter/dsl/response_assertion.rb on lines 9..28
lib/ruby-jmeter/dsl/response_time_graph.rb on lines 9..52
lib/ruby-jmeter/dsl/runtime_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/save_responses_to_a_file.rb on lines 9..26
lib/ruby-jmeter/dsl/simple_config_element.rb on lines 9..20
lib/ruby-jmeter/dsl/simple_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/simple_data_writer.rb on lines 9..52
lib/ruby-jmeter/dsl/smime_assertion.rb on lines 9..32
lib/ruby-jmeter/dsl/smtp_sampler.rb on lines 9..48
lib/ruby-jmeter/dsl/soapxmlrpc_request.rb on lines 9..30
lib/ruby-jmeter/dsl/spline_visualizer.rb on lines 9..52
lib/ruby-jmeter/dsl/summary_report.rb on lines 9..52
lib/ruby-jmeter/dsl/switch_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/synchronizing_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/tcp_sampler.rb on lines 9..30
lib/ruby-jmeter/dsl/tcp_sampler_config.rb on lines 9..28
lib/ruby-jmeter/dsl/test_action.rb on lines 9..24
lib/ruby-jmeter/dsl/test_fragment.rb on lines 9..20
lib/ruby-jmeter/dsl/throughput_controller.rb on lines 9..29
lib/ruby-jmeter/dsl/transaction_controller.rb on lines 9..23
lib/ruby-jmeter/dsl/uniform_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/user_defined_variables.rb on lines 9..30
lib/ruby-jmeter/dsl/user_parameters.rb on lines 9..27
lib/ruby-jmeter/dsl/view_results_in_table.rb on lines 9..52
lib/ruby-jmeter/dsl/view_results_tree.rb on lines 9..52
lib/ruby-jmeter/dsl/while_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/xml_assertion.rb on lines 9..20
lib/ruby-jmeter/dsl/xml_schema_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/xpath_assertion.rb on lines 9..28
lib/ruby-jmeter/dsl/xpath_extractor.rb on lines 9..28

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

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

  class AggregateGraph
    attr_accessor :doc
    include Helper

    def initialize(params={})
Severity: Major
Found in lib/ruby-jmeter/dsl/aggregate_graph.rb and 107 other locations - About 45 mins to fix
lib/ruby-jmeter/dsl/access_log_sampler.rb on lines 9..29
lib/ruby-jmeter/dsl/aggregate_report.rb on lines 9..52
lib/ruby-jmeter/dsl/assertion_results.rb on lines 9..52
lib/ruby-jmeter/dsl/beanshell_assertion.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_listener.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_postprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_preprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_sampler.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_timer.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_assertion.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_listener.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_postprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_preprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_sampler.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_timer.rb on lines 9..25
lib/ruby-jmeter/dsl/compare_assertion.rb on lines 9..24
lib/ruby-jmeter/dsl/comparison_assertion_visualizer.rb on lines 9..52
lib/ruby-jmeter/dsl/constant_throughput_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/constant_timer.rb on lines 9..22
lib/ruby-jmeter/dsl/counter.rb on lines 9..28
lib/ruby-jmeter/dsl/cssjquery_extractor.rb on lines 9..28
lib/ruby-jmeter/dsl/csv_data_set_config.rb on lines 9..30
lib/ruby-jmeter/dsl/debug_postprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/debug_sampler.rb on lines 9..24
lib/ruby-jmeter/dsl/distribution_graphalpha.rb on lines 9..52
lib/ruby-jmeter/dsl/duration_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/foreach_controller.rb on lines 9..24
lib/ruby-jmeter/dsl/ftp_request.rb on lines 9..31
lib/ruby-jmeter/dsl/ftp_request_defaults.rb on lines 9..29
lib/ruby-jmeter/dsl/gaussian_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/generate_summary_results.rb on lines 9..20
lib/ruby-jmeter/dsl/graph_results.rb on lines 9..52
lib/ruby-jmeter/dsl/html_assertion.rb on lines 9..27
lib/ruby-jmeter/dsl/html_link_parser.rb on lines 9..20
lib/ruby-jmeter/dsl/html_parameter_mask.rb on lines 9..29
lib/ruby-jmeter/dsl/http_authorization_manager.rb on lines 9..30
lib/ruby-jmeter/dsl/http_cache_manager.rb on lines 9..23
lib/ruby-jmeter/dsl/http_cookie_manager.rb on lines 9..25
lib/ruby-jmeter/dsl/http_header_manager.rb on lines 9..27
lib/ruby-jmeter/dsl/http_url_rewriting_modifier.rb on lines 9..27
lib/ruby-jmeter/dsl/if_controller.rb on lines 9..24
lib/ruby-jmeter/dsl/include_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/java_request.rb on lines 9..66
lib/ruby-jmeter/dsl/java_request_defaults.rb on lines 9..66
lib/ruby-jmeter/dsl/jdbc_connection_configuration.rb on lines 9..34
lib/ruby-jmeter/dsl/jdbc_postprocessor.rb on lines 9..30
lib/ruby-jmeter/dsl/jdbc_preprocessor.rb on lines 9..30
lib/ruby-jmeter/dsl/jdbc_request.rb on lines 9..30
lib/ruby-jmeter/dsl/jms_publisher.rb on lines 9..40
lib/ruby-jmeter/dsl/jms_subscriber.rb on lines 9..32
lib/ruby-jmeter/dsl/json_path_postprocessor.rb on lines 9..24
lib/ruby-jmeter/dsl/jsr223_assertion.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_listener.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_postprocessor.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_preprocessor.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_sampler.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_timer.rb on lines 9..26
lib/ruby-jmeter/dsl/junit_request.rb on lines 9..34
lib/ruby-jmeter/dsl/keystore_configuration.rb on lines 9..25
lib/ruby-jmeter/dsl/ldap_extended_request.rb on lines 9..39
lib/ruby-jmeter/dsl/ldap_extended_request_defaults.rb on lines 9..39
lib/ruby-jmeter/dsl/login_config_element.rb on lines 9..23
lib/ruby-jmeter/dsl/loop_controller.rb on lines 9..23
lib/ruby-jmeter/dsl/mail_reader_sampler.rb on lines 9..34
lib/ruby-jmeter/dsl/mailer_visualizer.rb on lines 9..61
lib/ruby-jmeter/dsl/md5hex_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/module_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/monitor_results.rb on lines 9..52
lib/ruby-jmeter/dsl/once_only_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/poisson_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/random_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/random_order_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/random_variable.rb on lines 9..27
lib/ruby-jmeter/dsl/recording_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/regex_user_parameters.rb on lines 9..24
lib/ruby-jmeter/dsl/regular_expression_extractor.rb on lines 9..29
lib/ruby-jmeter/dsl/response_assertion.rb on lines 9..28
lib/ruby-jmeter/dsl/response_time_graph.rb on lines 9..52
lib/ruby-jmeter/dsl/result_status_action_handler.rb on lines 9..22
lib/ruby-jmeter/dsl/runtime_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/save_responses_to_a_file.rb on lines 9..26
lib/ruby-jmeter/dsl/simple_config_element.rb on lines 9..20
lib/ruby-jmeter/dsl/simple_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/simple_data_writer.rb on lines 9..52
lib/ruby-jmeter/dsl/smime_assertion.rb on lines 9..32
lib/ruby-jmeter/dsl/smtp_sampler.rb on lines 9..48
lib/ruby-jmeter/dsl/soapxmlrpc_request.rb on lines 9..30
lib/ruby-jmeter/dsl/spline_visualizer.rb on lines 9..52
lib/ruby-jmeter/dsl/summary_report.rb on lines 9..52
lib/ruby-jmeter/dsl/switch_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/synchronizing_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/tcp_sampler.rb on lines 9..30
lib/ruby-jmeter/dsl/tcp_sampler_config.rb on lines 9..28
lib/ruby-jmeter/dsl/test_action.rb on lines 9..24
lib/ruby-jmeter/dsl/test_fragment.rb on lines 9..20
lib/ruby-jmeter/dsl/throughput_controller.rb on lines 9..29
lib/ruby-jmeter/dsl/transaction_controller.rb on lines 9..23
lib/ruby-jmeter/dsl/uniform_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/user_defined_variables.rb on lines 9..30
lib/ruby-jmeter/dsl/user_parameters.rb on lines 9..27
lib/ruby-jmeter/dsl/view_results_in_table.rb on lines 9..52
lib/ruby-jmeter/dsl/view_results_tree.rb on lines 9..52
lib/ruby-jmeter/dsl/while_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/xml_assertion.rb on lines 9..20
lib/ruby-jmeter/dsl/xml_schema_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/xpath_assertion.rb on lines 9..28
lib/ruby-jmeter/dsl/xpath_extractor.rb on lines 9..28

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

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

  class LoopController
    attr_accessor :doc
    include Helper

    def initialize(params={})
Severity: Major
Found in lib/ruby-jmeter/dsl/loop_controller.rb and 107 other locations - About 45 mins to fix
lib/ruby-jmeter/dsl/access_log_sampler.rb on lines 9..29
lib/ruby-jmeter/dsl/aggregate_graph.rb on lines 9..52
lib/ruby-jmeter/dsl/aggregate_report.rb on lines 9..52
lib/ruby-jmeter/dsl/assertion_results.rb on lines 9..52
lib/ruby-jmeter/dsl/beanshell_assertion.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_listener.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_postprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_preprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_sampler.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_timer.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_assertion.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_listener.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_postprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_preprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_sampler.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_timer.rb on lines 9..25
lib/ruby-jmeter/dsl/compare_assertion.rb on lines 9..24
lib/ruby-jmeter/dsl/comparison_assertion_visualizer.rb on lines 9..52
lib/ruby-jmeter/dsl/constant_throughput_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/constant_timer.rb on lines 9..22
lib/ruby-jmeter/dsl/counter.rb on lines 9..28
lib/ruby-jmeter/dsl/cssjquery_extractor.rb on lines 9..28
lib/ruby-jmeter/dsl/csv_data_set_config.rb on lines 9..30
lib/ruby-jmeter/dsl/debug_postprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/debug_sampler.rb on lines 9..24
lib/ruby-jmeter/dsl/distribution_graphalpha.rb on lines 9..52
lib/ruby-jmeter/dsl/duration_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/foreach_controller.rb on lines 9..24
lib/ruby-jmeter/dsl/ftp_request.rb on lines 9..31
lib/ruby-jmeter/dsl/ftp_request_defaults.rb on lines 9..29
lib/ruby-jmeter/dsl/gaussian_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/generate_summary_results.rb on lines 9..20
lib/ruby-jmeter/dsl/graph_results.rb on lines 9..52
lib/ruby-jmeter/dsl/html_assertion.rb on lines 9..27
lib/ruby-jmeter/dsl/html_link_parser.rb on lines 9..20
lib/ruby-jmeter/dsl/html_parameter_mask.rb on lines 9..29
lib/ruby-jmeter/dsl/http_authorization_manager.rb on lines 9..30
lib/ruby-jmeter/dsl/http_cache_manager.rb on lines 9..23
lib/ruby-jmeter/dsl/http_cookie_manager.rb on lines 9..25
lib/ruby-jmeter/dsl/http_header_manager.rb on lines 9..27
lib/ruby-jmeter/dsl/http_url_rewriting_modifier.rb on lines 9..27
lib/ruby-jmeter/dsl/if_controller.rb on lines 9..24
lib/ruby-jmeter/dsl/include_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/java_request.rb on lines 9..66
lib/ruby-jmeter/dsl/java_request_defaults.rb on lines 9..66
lib/ruby-jmeter/dsl/jdbc_connection_configuration.rb on lines 9..34
lib/ruby-jmeter/dsl/jdbc_postprocessor.rb on lines 9..30
lib/ruby-jmeter/dsl/jdbc_preprocessor.rb on lines 9..30
lib/ruby-jmeter/dsl/jdbc_request.rb on lines 9..30
lib/ruby-jmeter/dsl/jms_publisher.rb on lines 9..40
lib/ruby-jmeter/dsl/jms_subscriber.rb on lines 9..32
lib/ruby-jmeter/dsl/json_path_postprocessor.rb on lines 9..24
lib/ruby-jmeter/dsl/jsr223_assertion.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_listener.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_postprocessor.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_preprocessor.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_sampler.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_timer.rb on lines 9..26
lib/ruby-jmeter/dsl/junit_request.rb on lines 9..34
lib/ruby-jmeter/dsl/keystore_configuration.rb on lines 9..25
lib/ruby-jmeter/dsl/ldap_extended_request.rb on lines 9..39
lib/ruby-jmeter/dsl/ldap_extended_request_defaults.rb on lines 9..39
lib/ruby-jmeter/dsl/login_config_element.rb on lines 9..23
lib/ruby-jmeter/dsl/mail_reader_sampler.rb on lines 9..34
lib/ruby-jmeter/dsl/mailer_visualizer.rb on lines 9..61
lib/ruby-jmeter/dsl/md5hex_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/module_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/monitor_results.rb on lines 9..52
lib/ruby-jmeter/dsl/once_only_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/poisson_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/random_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/random_order_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/random_variable.rb on lines 9..27
lib/ruby-jmeter/dsl/recording_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/regex_user_parameters.rb on lines 9..24
lib/ruby-jmeter/dsl/regular_expression_extractor.rb on lines 9..29
lib/ruby-jmeter/dsl/response_assertion.rb on lines 9..28
lib/ruby-jmeter/dsl/response_time_graph.rb on lines 9..52
lib/ruby-jmeter/dsl/result_status_action_handler.rb on lines 9..22
lib/ruby-jmeter/dsl/runtime_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/save_responses_to_a_file.rb on lines 9..26
lib/ruby-jmeter/dsl/simple_config_element.rb on lines 9..20
lib/ruby-jmeter/dsl/simple_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/simple_data_writer.rb on lines 9..52
lib/ruby-jmeter/dsl/smime_assertion.rb on lines 9..32
lib/ruby-jmeter/dsl/smtp_sampler.rb on lines 9..48
lib/ruby-jmeter/dsl/soapxmlrpc_request.rb on lines 9..30
lib/ruby-jmeter/dsl/spline_visualizer.rb on lines 9..52
lib/ruby-jmeter/dsl/summary_report.rb on lines 9..52
lib/ruby-jmeter/dsl/switch_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/synchronizing_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/tcp_sampler.rb on lines 9..30
lib/ruby-jmeter/dsl/tcp_sampler_config.rb on lines 9..28
lib/ruby-jmeter/dsl/test_action.rb on lines 9..24
lib/ruby-jmeter/dsl/test_fragment.rb on lines 9..20
lib/ruby-jmeter/dsl/throughput_controller.rb on lines 9..29
lib/ruby-jmeter/dsl/transaction_controller.rb on lines 9..23
lib/ruby-jmeter/dsl/uniform_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/user_defined_variables.rb on lines 9..30
lib/ruby-jmeter/dsl/user_parameters.rb on lines 9..27
lib/ruby-jmeter/dsl/view_results_in_table.rb on lines 9..52
lib/ruby-jmeter/dsl/view_results_tree.rb on lines 9..52
lib/ruby-jmeter/dsl/while_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/xml_assertion.rb on lines 9..20
lib/ruby-jmeter/dsl/xml_schema_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/xpath_assertion.rb on lines 9..28
lib/ruby-jmeter/dsl/xpath_extractor.rb on lines 9..28

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

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

  class BsfPostprocessor
    attr_accessor :doc
    include Helper

    def initialize(params={})
Severity: Major
Found in lib/ruby-jmeter/dsl/bsf_postprocessor.rb and 107 other locations - About 45 mins to fix
lib/ruby-jmeter/dsl/access_log_sampler.rb on lines 9..29
lib/ruby-jmeter/dsl/aggregate_graph.rb on lines 9..52
lib/ruby-jmeter/dsl/aggregate_report.rb on lines 9..52
lib/ruby-jmeter/dsl/assertion_results.rb on lines 9..52
lib/ruby-jmeter/dsl/beanshell_assertion.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_listener.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_postprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_preprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_sampler.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_timer.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_assertion.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_listener.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_preprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_sampler.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_timer.rb on lines 9..25
lib/ruby-jmeter/dsl/compare_assertion.rb on lines 9..24
lib/ruby-jmeter/dsl/comparison_assertion_visualizer.rb on lines 9..52
lib/ruby-jmeter/dsl/constant_throughput_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/constant_timer.rb on lines 9..22
lib/ruby-jmeter/dsl/counter.rb on lines 9..28
lib/ruby-jmeter/dsl/cssjquery_extractor.rb on lines 9..28
lib/ruby-jmeter/dsl/csv_data_set_config.rb on lines 9..30
lib/ruby-jmeter/dsl/debug_postprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/debug_sampler.rb on lines 9..24
lib/ruby-jmeter/dsl/distribution_graphalpha.rb on lines 9..52
lib/ruby-jmeter/dsl/duration_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/foreach_controller.rb on lines 9..24
lib/ruby-jmeter/dsl/ftp_request.rb on lines 9..31
lib/ruby-jmeter/dsl/ftp_request_defaults.rb on lines 9..29
lib/ruby-jmeter/dsl/gaussian_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/generate_summary_results.rb on lines 9..20
lib/ruby-jmeter/dsl/graph_results.rb on lines 9..52
lib/ruby-jmeter/dsl/html_assertion.rb on lines 9..27
lib/ruby-jmeter/dsl/html_link_parser.rb on lines 9..20
lib/ruby-jmeter/dsl/html_parameter_mask.rb on lines 9..29
lib/ruby-jmeter/dsl/http_authorization_manager.rb on lines 9..30
lib/ruby-jmeter/dsl/http_cache_manager.rb on lines 9..23
lib/ruby-jmeter/dsl/http_cookie_manager.rb on lines 9..25
lib/ruby-jmeter/dsl/http_header_manager.rb on lines 9..27
lib/ruby-jmeter/dsl/http_url_rewriting_modifier.rb on lines 9..27
lib/ruby-jmeter/dsl/if_controller.rb on lines 9..24
lib/ruby-jmeter/dsl/include_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/java_request.rb on lines 9..66
lib/ruby-jmeter/dsl/java_request_defaults.rb on lines 9..66
lib/ruby-jmeter/dsl/jdbc_connection_configuration.rb on lines 9..34
lib/ruby-jmeter/dsl/jdbc_postprocessor.rb on lines 9..30
lib/ruby-jmeter/dsl/jdbc_preprocessor.rb on lines 9..30
lib/ruby-jmeter/dsl/jdbc_request.rb on lines 9..30
lib/ruby-jmeter/dsl/jms_publisher.rb on lines 9..40
lib/ruby-jmeter/dsl/jms_subscriber.rb on lines 9..32
lib/ruby-jmeter/dsl/json_path_postprocessor.rb on lines 9..24
lib/ruby-jmeter/dsl/jsr223_assertion.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_listener.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_postprocessor.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_preprocessor.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_sampler.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_timer.rb on lines 9..26
lib/ruby-jmeter/dsl/junit_request.rb on lines 9..34
lib/ruby-jmeter/dsl/keystore_configuration.rb on lines 9..25
lib/ruby-jmeter/dsl/ldap_extended_request.rb on lines 9..39
lib/ruby-jmeter/dsl/ldap_extended_request_defaults.rb on lines 9..39
lib/ruby-jmeter/dsl/login_config_element.rb on lines 9..23
lib/ruby-jmeter/dsl/loop_controller.rb on lines 9..23
lib/ruby-jmeter/dsl/mail_reader_sampler.rb on lines 9..34
lib/ruby-jmeter/dsl/mailer_visualizer.rb on lines 9..61
lib/ruby-jmeter/dsl/md5hex_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/module_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/monitor_results.rb on lines 9..52
lib/ruby-jmeter/dsl/once_only_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/poisson_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/random_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/random_order_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/random_variable.rb on lines 9..27
lib/ruby-jmeter/dsl/recording_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/regex_user_parameters.rb on lines 9..24
lib/ruby-jmeter/dsl/regular_expression_extractor.rb on lines 9..29
lib/ruby-jmeter/dsl/response_assertion.rb on lines 9..28
lib/ruby-jmeter/dsl/response_time_graph.rb on lines 9..52
lib/ruby-jmeter/dsl/result_status_action_handler.rb on lines 9..22
lib/ruby-jmeter/dsl/runtime_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/save_responses_to_a_file.rb on lines 9..26
lib/ruby-jmeter/dsl/simple_config_element.rb on lines 9..20
lib/ruby-jmeter/dsl/simple_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/simple_data_writer.rb on lines 9..52
lib/ruby-jmeter/dsl/smime_assertion.rb on lines 9..32
lib/ruby-jmeter/dsl/smtp_sampler.rb on lines 9..48
lib/ruby-jmeter/dsl/soapxmlrpc_request.rb on lines 9..30
lib/ruby-jmeter/dsl/spline_visualizer.rb on lines 9..52
lib/ruby-jmeter/dsl/summary_report.rb on lines 9..52
lib/ruby-jmeter/dsl/switch_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/synchronizing_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/tcp_sampler.rb on lines 9..30
lib/ruby-jmeter/dsl/tcp_sampler_config.rb on lines 9..28
lib/ruby-jmeter/dsl/test_action.rb on lines 9..24
lib/ruby-jmeter/dsl/test_fragment.rb on lines 9..20
lib/ruby-jmeter/dsl/throughput_controller.rb on lines 9..29
lib/ruby-jmeter/dsl/transaction_controller.rb on lines 9..23
lib/ruby-jmeter/dsl/uniform_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/user_defined_variables.rb on lines 9..30
lib/ruby-jmeter/dsl/user_parameters.rb on lines 9..27
lib/ruby-jmeter/dsl/view_results_in_table.rb on lines 9..52
lib/ruby-jmeter/dsl/view_results_tree.rb on lines 9..52
lib/ruby-jmeter/dsl/while_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/xml_assertion.rb on lines 9..20
lib/ruby-jmeter/dsl/xml_schema_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/xpath_assertion.rb on lines 9..28
lib/ruby-jmeter/dsl/xpath_extractor.rb on lines 9..28

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

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

  class SaveResponsesToAFile
    attr_accessor :doc
    include Helper

    def initialize(params={})
Severity: Major
Found in lib/ruby-jmeter/dsl/save_responses_to_a_file.rb and 107 other locations - About 45 mins to fix
lib/ruby-jmeter/dsl/access_log_sampler.rb on lines 9..29
lib/ruby-jmeter/dsl/aggregate_graph.rb on lines 9..52
lib/ruby-jmeter/dsl/aggregate_report.rb on lines 9..52
lib/ruby-jmeter/dsl/assertion_results.rb on lines 9..52
lib/ruby-jmeter/dsl/beanshell_assertion.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_listener.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_postprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_preprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_sampler.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_timer.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_assertion.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_listener.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_postprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_preprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_sampler.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_timer.rb on lines 9..25
lib/ruby-jmeter/dsl/compare_assertion.rb on lines 9..24
lib/ruby-jmeter/dsl/comparison_assertion_visualizer.rb on lines 9..52
lib/ruby-jmeter/dsl/constant_throughput_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/constant_timer.rb on lines 9..22
lib/ruby-jmeter/dsl/counter.rb on lines 9..28
lib/ruby-jmeter/dsl/cssjquery_extractor.rb on lines 9..28
lib/ruby-jmeter/dsl/csv_data_set_config.rb on lines 9..30
lib/ruby-jmeter/dsl/debug_postprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/debug_sampler.rb on lines 9..24
lib/ruby-jmeter/dsl/distribution_graphalpha.rb on lines 9..52
lib/ruby-jmeter/dsl/duration_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/foreach_controller.rb on lines 9..24
lib/ruby-jmeter/dsl/ftp_request.rb on lines 9..31
lib/ruby-jmeter/dsl/ftp_request_defaults.rb on lines 9..29
lib/ruby-jmeter/dsl/gaussian_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/generate_summary_results.rb on lines 9..20
lib/ruby-jmeter/dsl/graph_results.rb on lines 9..52
lib/ruby-jmeter/dsl/html_assertion.rb on lines 9..27
lib/ruby-jmeter/dsl/html_link_parser.rb on lines 9..20
lib/ruby-jmeter/dsl/html_parameter_mask.rb on lines 9..29
lib/ruby-jmeter/dsl/http_authorization_manager.rb on lines 9..30
lib/ruby-jmeter/dsl/http_cache_manager.rb on lines 9..23
lib/ruby-jmeter/dsl/http_cookie_manager.rb on lines 9..25
lib/ruby-jmeter/dsl/http_header_manager.rb on lines 9..27
lib/ruby-jmeter/dsl/http_url_rewriting_modifier.rb on lines 9..27
lib/ruby-jmeter/dsl/if_controller.rb on lines 9..24
lib/ruby-jmeter/dsl/include_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/java_request.rb on lines 9..66
lib/ruby-jmeter/dsl/java_request_defaults.rb on lines 9..66
lib/ruby-jmeter/dsl/jdbc_connection_configuration.rb on lines 9..34
lib/ruby-jmeter/dsl/jdbc_postprocessor.rb on lines 9..30
lib/ruby-jmeter/dsl/jdbc_preprocessor.rb on lines 9..30
lib/ruby-jmeter/dsl/jdbc_request.rb on lines 9..30
lib/ruby-jmeter/dsl/jms_publisher.rb on lines 9..40
lib/ruby-jmeter/dsl/jms_subscriber.rb on lines 9..32
lib/ruby-jmeter/dsl/json_path_postprocessor.rb on lines 9..24
lib/ruby-jmeter/dsl/jsr223_assertion.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_listener.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_postprocessor.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_preprocessor.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_sampler.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_timer.rb on lines 9..26
lib/ruby-jmeter/dsl/junit_request.rb on lines 9..34
lib/ruby-jmeter/dsl/keystore_configuration.rb on lines 9..25
lib/ruby-jmeter/dsl/ldap_extended_request.rb on lines 9..39
lib/ruby-jmeter/dsl/ldap_extended_request_defaults.rb on lines 9..39
lib/ruby-jmeter/dsl/login_config_element.rb on lines 9..23
lib/ruby-jmeter/dsl/loop_controller.rb on lines 9..23
lib/ruby-jmeter/dsl/mail_reader_sampler.rb on lines 9..34
lib/ruby-jmeter/dsl/mailer_visualizer.rb on lines 9..61
lib/ruby-jmeter/dsl/md5hex_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/module_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/monitor_results.rb on lines 9..52
lib/ruby-jmeter/dsl/once_only_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/poisson_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/random_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/random_order_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/random_variable.rb on lines 9..27
lib/ruby-jmeter/dsl/recording_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/regex_user_parameters.rb on lines 9..24
lib/ruby-jmeter/dsl/regular_expression_extractor.rb on lines 9..29
lib/ruby-jmeter/dsl/response_assertion.rb on lines 9..28
lib/ruby-jmeter/dsl/response_time_graph.rb on lines 9..52
lib/ruby-jmeter/dsl/result_status_action_handler.rb on lines 9..22
lib/ruby-jmeter/dsl/runtime_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/simple_config_element.rb on lines 9..20
lib/ruby-jmeter/dsl/simple_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/simple_data_writer.rb on lines 9..52
lib/ruby-jmeter/dsl/smime_assertion.rb on lines 9..32
lib/ruby-jmeter/dsl/smtp_sampler.rb on lines 9..48
lib/ruby-jmeter/dsl/soapxmlrpc_request.rb on lines 9..30
lib/ruby-jmeter/dsl/spline_visualizer.rb on lines 9..52
lib/ruby-jmeter/dsl/summary_report.rb on lines 9..52
lib/ruby-jmeter/dsl/switch_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/synchronizing_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/tcp_sampler.rb on lines 9..30
lib/ruby-jmeter/dsl/tcp_sampler_config.rb on lines 9..28
lib/ruby-jmeter/dsl/test_action.rb on lines 9..24
lib/ruby-jmeter/dsl/test_fragment.rb on lines 9..20
lib/ruby-jmeter/dsl/throughput_controller.rb on lines 9..29
lib/ruby-jmeter/dsl/transaction_controller.rb on lines 9..23
lib/ruby-jmeter/dsl/uniform_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/user_defined_variables.rb on lines 9..30
lib/ruby-jmeter/dsl/user_parameters.rb on lines 9..27
lib/ruby-jmeter/dsl/view_results_in_table.rb on lines 9..52
lib/ruby-jmeter/dsl/view_results_tree.rb on lines 9..52
lib/ruby-jmeter/dsl/while_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/xml_assertion.rb on lines 9..20
lib/ruby-jmeter/dsl/xml_schema_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/xpath_assertion.rb on lines 9..28
lib/ruby-jmeter/dsl/xpath_extractor.rb on lines 9..28

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

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

  class ThroughputController
    attr_accessor :doc
    include Helper

    def initialize(params={})
Severity: Major
Found in lib/ruby-jmeter/dsl/throughput_controller.rb and 107 other locations - About 45 mins to fix
lib/ruby-jmeter/dsl/access_log_sampler.rb on lines 9..29
lib/ruby-jmeter/dsl/aggregate_graph.rb on lines 9..52
lib/ruby-jmeter/dsl/aggregate_report.rb on lines 9..52
lib/ruby-jmeter/dsl/assertion_results.rb on lines 9..52
lib/ruby-jmeter/dsl/beanshell_assertion.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_listener.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_postprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_preprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_sampler.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_timer.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_assertion.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_listener.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_postprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_preprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_sampler.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_timer.rb on lines 9..25
lib/ruby-jmeter/dsl/compare_assertion.rb on lines 9..24
lib/ruby-jmeter/dsl/comparison_assertion_visualizer.rb on lines 9..52
lib/ruby-jmeter/dsl/constant_throughput_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/constant_timer.rb on lines 9..22
lib/ruby-jmeter/dsl/counter.rb on lines 9..28
lib/ruby-jmeter/dsl/cssjquery_extractor.rb on lines 9..28
lib/ruby-jmeter/dsl/csv_data_set_config.rb on lines 9..30
lib/ruby-jmeter/dsl/debug_postprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/debug_sampler.rb on lines 9..24
lib/ruby-jmeter/dsl/distribution_graphalpha.rb on lines 9..52
lib/ruby-jmeter/dsl/duration_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/foreach_controller.rb on lines 9..24
lib/ruby-jmeter/dsl/ftp_request.rb on lines 9..31
lib/ruby-jmeter/dsl/ftp_request_defaults.rb on lines 9..29
lib/ruby-jmeter/dsl/gaussian_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/generate_summary_results.rb on lines 9..20
lib/ruby-jmeter/dsl/graph_results.rb on lines 9..52
lib/ruby-jmeter/dsl/html_assertion.rb on lines 9..27
lib/ruby-jmeter/dsl/html_link_parser.rb on lines 9..20
lib/ruby-jmeter/dsl/html_parameter_mask.rb on lines 9..29
lib/ruby-jmeter/dsl/http_authorization_manager.rb on lines 9..30
lib/ruby-jmeter/dsl/http_cache_manager.rb on lines 9..23
lib/ruby-jmeter/dsl/http_cookie_manager.rb on lines 9..25
lib/ruby-jmeter/dsl/http_header_manager.rb on lines 9..27
lib/ruby-jmeter/dsl/http_url_rewriting_modifier.rb on lines 9..27
lib/ruby-jmeter/dsl/if_controller.rb on lines 9..24
lib/ruby-jmeter/dsl/include_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/java_request.rb on lines 9..66
lib/ruby-jmeter/dsl/java_request_defaults.rb on lines 9..66
lib/ruby-jmeter/dsl/jdbc_connection_configuration.rb on lines 9..34
lib/ruby-jmeter/dsl/jdbc_postprocessor.rb on lines 9..30
lib/ruby-jmeter/dsl/jdbc_preprocessor.rb on lines 9..30
lib/ruby-jmeter/dsl/jdbc_request.rb on lines 9..30
lib/ruby-jmeter/dsl/jms_publisher.rb on lines 9..40
lib/ruby-jmeter/dsl/jms_subscriber.rb on lines 9..32
lib/ruby-jmeter/dsl/json_path_postprocessor.rb on lines 9..24
lib/ruby-jmeter/dsl/jsr223_assertion.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_listener.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_postprocessor.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_preprocessor.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_sampler.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_timer.rb on lines 9..26
lib/ruby-jmeter/dsl/junit_request.rb on lines 9..34
lib/ruby-jmeter/dsl/keystore_configuration.rb on lines 9..25
lib/ruby-jmeter/dsl/ldap_extended_request.rb on lines 9..39
lib/ruby-jmeter/dsl/ldap_extended_request_defaults.rb on lines 9..39
lib/ruby-jmeter/dsl/login_config_element.rb on lines 9..23
lib/ruby-jmeter/dsl/loop_controller.rb on lines 9..23
lib/ruby-jmeter/dsl/mail_reader_sampler.rb on lines 9..34
lib/ruby-jmeter/dsl/mailer_visualizer.rb on lines 9..61
lib/ruby-jmeter/dsl/md5hex_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/module_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/monitor_results.rb on lines 9..52
lib/ruby-jmeter/dsl/once_only_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/poisson_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/random_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/random_order_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/random_variable.rb on lines 9..27
lib/ruby-jmeter/dsl/recording_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/regex_user_parameters.rb on lines 9..24
lib/ruby-jmeter/dsl/regular_expression_extractor.rb on lines 9..29
lib/ruby-jmeter/dsl/response_assertion.rb on lines 9..28
lib/ruby-jmeter/dsl/response_time_graph.rb on lines 9..52
lib/ruby-jmeter/dsl/result_status_action_handler.rb on lines 9..22
lib/ruby-jmeter/dsl/runtime_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/save_responses_to_a_file.rb on lines 9..26
lib/ruby-jmeter/dsl/simple_config_element.rb on lines 9..20
lib/ruby-jmeter/dsl/simple_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/simple_data_writer.rb on lines 9..52
lib/ruby-jmeter/dsl/smime_assertion.rb on lines 9..32
lib/ruby-jmeter/dsl/smtp_sampler.rb on lines 9..48
lib/ruby-jmeter/dsl/soapxmlrpc_request.rb on lines 9..30
lib/ruby-jmeter/dsl/spline_visualizer.rb on lines 9..52
lib/ruby-jmeter/dsl/summary_report.rb on lines 9..52
lib/ruby-jmeter/dsl/switch_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/synchronizing_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/tcp_sampler.rb on lines 9..30
lib/ruby-jmeter/dsl/tcp_sampler_config.rb on lines 9..28
lib/ruby-jmeter/dsl/test_action.rb on lines 9..24
lib/ruby-jmeter/dsl/test_fragment.rb on lines 9..20
lib/ruby-jmeter/dsl/transaction_controller.rb on lines 9..23
lib/ruby-jmeter/dsl/uniform_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/user_defined_variables.rb on lines 9..30
lib/ruby-jmeter/dsl/user_parameters.rb on lines 9..27
lib/ruby-jmeter/dsl/view_results_in_table.rb on lines 9..52
lib/ruby-jmeter/dsl/view_results_tree.rb on lines 9..52
lib/ruby-jmeter/dsl/while_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/xml_assertion.rb on lines 9..20
lib/ruby-jmeter/dsl/xml_schema_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/xpath_assertion.rb on lines 9..28
lib/ruby-jmeter/dsl/xpath_extractor.rb on lines 9..28

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

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

  class SimpleController
    attr_accessor :doc
    include Helper

    def initialize(params={})
Severity: Major
Found in lib/ruby-jmeter/dsl/simple_controller.rb and 107 other locations - About 45 mins to fix
lib/ruby-jmeter/dsl/access_log_sampler.rb on lines 9..29
lib/ruby-jmeter/dsl/aggregate_graph.rb on lines 9..52
lib/ruby-jmeter/dsl/aggregate_report.rb on lines 9..52
lib/ruby-jmeter/dsl/assertion_results.rb on lines 9..52
lib/ruby-jmeter/dsl/beanshell_assertion.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_listener.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_postprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_preprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_sampler.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_timer.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_assertion.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_listener.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_postprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_preprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_sampler.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_timer.rb on lines 9..25
lib/ruby-jmeter/dsl/compare_assertion.rb on lines 9..24
lib/ruby-jmeter/dsl/comparison_assertion_visualizer.rb on lines 9..52
lib/ruby-jmeter/dsl/constant_throughput_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/constant_timer.rb on lines 9..22
lib/ruby-jmeter/dsl/counter.rb on lines 9..28
lib/ruby-jmeter/dsl/cssjquery_extractor.rb on lines 9..28
lib/ruby-jmeter/dsl/csv_data_set_config.rb on lines 9..30
lib/ruby-jmeter/dsl/debug_postprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/debug_sampler.rb on lines 9..24
lib/ruby-jmeter/dsl/distribution_graphalpha.rb on lines 9..52
lib/ruby-jmeter/dsl/duration_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/foreach_controller.rb on lines 9..24
lib/ruby-jmeter/dsl/ftp_request.rb on lines 9..31
lib/ruby-jmeter/dsl/ftp_request_defaults.rb on lines 9..29
lib/ruby-jmeter/dsl/gaussian_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/generate_summary_results.rb on lines 9..20
lib/ruby-jmeter/dsl/graph_results.rb on lines 9..52
lib/ruby-jmeter/dsl/html_assertion.rb on lines 9..27
lib/ruby-jmeter/dsl/html_link_parser.rb on lines 9..20
lib/ruby-jmeter/dsl/html_parameter_mask.rb on lines 9..29
lib/ruby-jmeter/dsl/http_authorization_manager.rb on lines 9..30
lib/ruby-jmeter/dsl/http_cache_manager.rb on lines 9..23
lib/ruby-jmeter/dsl/http_cookie_manager.rb on lines 9..25
lib/ruby-jmeter/dsl/http_header_manager.rb on lines 9..27
lib/ruby-jmeter/dsl/http_url_rewriting_modifier.rb on lines 9..27
lib/ruby-jmeter/dsl/if_controller.rb on lines 9..24
lib/ruby-jmeter/dsl/include_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/java_request.rb on lines 9..66
lib/ruby-jmeter/dsl/java_request_defaults.rb on lines 9..66
lib/ruby-jmeter/dsl/jdbc_connection_configuration.rb on lines 9..34
lib/ruby-jmeter/dsl/jdbc_postprocessor.rb on lines 9..30
lib/ruby-jmeter/dsl/jdbc_preprocessor.rb on lines 9..30
lib/ruby-jmeter/dsl/jdbc_request.rb on lines 9..30
lib/ruby-jmeter/dsl/jms_publisher.rb on lines 9..40
lib/ruby-jmeter/dsl/jms_subscriber.rb on lines 9..32
lib/ruby-jmeter/dsl/json_path_postprocessor.rb on lines 9..24
lib/ruby-jmeter/dsl/jsr223_assertion.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_listener.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_postprocessor.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_preprocessor.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_sampler.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_timer.rb on lines 9..26
lib/ruby-jmeter/dsl/junit_request.rb on lines 9..34
lib/ruby-jmeter/dsl/keystore_configuration.rb on lines 9..25
lib/ruby-jmeter/dsl/ldap_extended_request.rb on lines 9..39
lib/ruby-jmeter/dsl/ldap_extended_request_defaults.rb on lines 9..39
lib/ruby-jmeter/dsl/login_config_element.rb on lines 9..23
lib/ruby-jmeter/dsl/loop_controller.rb on lines 9..23
lib/ruby-jmeter/dsl/mail_reader_sampler.rb on lines 9..34
lib/ruby-jmeter/dsl/mailer_visualizer.rb on lines 9..61
lib/ruby-jmeter/dsl/md5hex_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/module_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/monitor_results.rb on lines 9..52
lib/ruby-jmeter/dsl/once_only_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/poisson_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/random_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/random_order_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/random_variable.rb on lines 9..27
lib/ruby-jmeter/dsl/recording_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/regex_user_parameters.rb on lines 9..24
lib/ruby-jmeter/dsl/regular_expression_extractor.rb on lines 9..29
lib/ruby-jmeter/dsl/response_assertion.rb on lines 9..28
lib/ruby-jmeter/dsl/response_time_graph.rb on lines 9..52
lib/ruby-jmeter/dsl/result_status_action_handler.rb on lines 9..22
lib/ruby-jmeter/dsl/runtime_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/save_responses_to_a_file.rb on lines 9..26
lib/ruby-jmeter/dsl/simple_config_element.rb on lines 9..20
lib/ruby-jmeter/dsl/simple_data_writer.rb on lines 9..52
lib/ruby-jmeter/dsl/smime_assertion.rb on lines 9..32
lib/ruby-jmeter/dsl/smtp_sampler.rb on lines 9..48
lib/ruby-jmeter/dsl/soapxmlrpc_request.rb on lines 9..30
lib/ruby-jmeter/dsl/spline_visualizer.rb on lines 9..52
lib/ruby-jmeter/dsl/summary_report.rb on lines 9..52
lib/ruby-jmeter/dsl/switch_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/synchronizing_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/tcp_sampler.rb on lines 9..30
lib/ruby-jmeter/dsl/tcp_sampler_config.rb on lines 9..28
lib/ruby-jmeter/dsl/test_action.rb on lines 9..24
lib/ruby-jmeter/dsl/test_fragment.rb on lines 9..20
lib/ruby-jmeter/dsl/throughput_controller.rb on lines 9..29
lib/ruby-jmeter/dsl/transaction_controller.rb on lines 9..23
lib/ruby-jmeter/dsl/uniform_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/user_defined_variables.rb on lines 9..30
lib/ruby-jmeter/dsl/user_parameters.rb on lines 9..27
lib/ruby-jmeter/dsl/view_results_in_table.rb on lines 9..52
lib/ruby-jmeter/dsl/view_results_tree.rb on lines 9..52
lib/ruby-jmeter/dsl/while_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/xml_assertion.rb on lines 9..20
lib/ruby-jmeter/dsl/xml_schema_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/xpath_assertion.rb on lines 9..28
lib/ruby-jmeter/dsl/xpath_extractor.rb on lines 9..28

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

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

  class JsonPathPostprocessor
    attr_accessor :doc
    include Helper

    def initialize(params={})
Severity: Major
Found in lib/ruby-jmeter/dsl/json_path_postprocessor.rb and 107 other locations - About 45 mins to fix
lib/ruby-jmeter/dsl/access_log_sampler.rb on lines 9..29
lib/ruby-jmeter/dsl/aggregate_graph.rb on lines 9..52
lib/ruby-jmeter/dsl/aggregate_report.rb on lines 9..52
lib/ruby-jmeter/dsl/assertion_results.rb on lines 9..52
lib/ruby-jmeter/dsl/beanshell_assertion.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_listener.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_postprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_preprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_sampler.rb on lines 9..25
lib/ruby-jmeter/dsl/beanshell_timer.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_assertion.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_listener.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_postprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_preprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_sampler.rb on lines 9..25
lib/ruby-jmeter/dsl/bsf_timer.rb on lines 9..25
lib/ruby-jmeter/dsl/compare_assertion.rb on lines 9..24
lib/ruby-jmeter/dsl/comparison_assertion_visualizer.rb on lines 9..52
lib/ruby-jmeter/dsl/constant_throughput_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/constant_timer.rb on lines 9..22
lib/ruby-jmeter/dsl/counter.rb on lines 9..28
lib/ruby-jmeter/dsl/cssjquery_extractor.rb on lines 9..28
lib/ruby-jmeter/dsl/csv_data_set_config.rb on lines 9..30
lib/ruby-jmeter/dsl/debug_postprocessor.rb on lines 9..25
lib/ruby-jmeter/dsl/debug_sampler.rb on lines 9..24
lib/ruby-jmeter/dsl/distribution_graphalpha.rb on lines 9..52
lib/ruby-jmeter/dsl/duration_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/foreach_controller.rb on lines 9..24
lib/ruby-jmeter/dsl/ftp_request.rb on lines 9..31
lib/ruby-jmeter/dsl/ftp_request_defaults.rb on lines 9..29
lib/ruby-jmeter/dsl/gaussian_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/generate_summary_results.rb on lines 9..20
lib/ruby-jmeter/dsl/graph_results.rb on lines 9..52
lib/ruby-jmeter/dsl/html_assertion.rb on lines 9..27
lib/ruby-jmeter/dsl/html_link_parser.rb on lines 9..20
lib/ruby-jmeter/dsl/html_parameter_mask.rb on lines 9..29
lib/ruby-jmeter/dsl/http_authorization_manager.rb on lines 9..30
lib/ruby-jmeter/dsl/http_cache_manager.rb on lines 9..23
lib/ruby-jmeter/dsl/http_cookie_manager.rb on lines 9..25
lib/ruby-jmeter/dsl/http_header_manager.rb on lines 9..27
lib/ruby-jmeter/dsl/http_url_rewriting_modifier.rb on lines 9..27
lib/ruby-jmeter/dsl/if_controller.rb on lines 9..24
lib/ruby-jmeter/dsl/include_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/java_request.rb on lines 9..66
lib/ruby-jmeter/dsl/java_request_defaults.rb on lines 9..66
lib/ruby-jmeter/dsl/jdbc_connection_configuration.rb on lines 9..34
lib/ruby-jmeter/dsl/jdbc_postprocessor.rb on lines 9..30
lib/ruby-jmeter/dsl/jdbc_preprocessor.rb on lines 9..30
lib/ruby-jmeter/dsl/jdbc_request.rb on lines 9..30
lib/ruby-jmeter/dsl/jms_publisher.rb on lines 9..40
lib/ruby-jmeter/dsl/jms_subscriber.rb on lines 9..32
lib/ruby-jmeter/dsl/jsr223_assertion.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_listener.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_postprocessor.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_preprocessor.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_sampler.rb on lines 9..26
lib/ruby-jmeter/dsl/jsr223_timer.rb on lines 9..26
lib/ruby-jmeter/dsl/junit_request.rb on lines 9..34
lib/ruby-jmeter/dsl/keystore_configuration.rb on lines 9..25
lib/ruby-jmeter/dsl/ldap_extended_request.rb on lines 9..39
lib/ruby-jmeter/dsl/ldap_extended_request_defaults.rb on lines 9..39
lib/ruby-jmeter/dsl/login_config_element.rb on lines 9..23
lib/ruby-jmeter/dsl/loop_controller.rb on lines 9..23
lib/ruby-jmeter/dsl/mail_reader_sampler.rb on lines 9..34
lib/ruby-jmeter/dsl/mailer_visualizer.rb on lines 9..61
lib/ruby-jmeter/dsl/md5hex_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/module_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/monitor_results.rb on lines 9..52
lib/ruby-jmeter/dsl/once_only_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/poisson_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/random_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/random_order_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/random_variable.rb on lines 9..27
lib/ruby-jmeter/dsl/recording_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/regex_user_parameters.rb on lines 9..24
lib/ruby-jmeter/dsl/regular_expression_extractor.rb on lines 9..29
lib/ruby-jmeter/dsl/response_assertion.rb on lines 9..28
lib/ruby-jmeter/dsl/response_time_graph.rb on lines 9..52
lib/ruby-jmeter/dsl/result_status_action_handler.rb on lines 9..22
lib/ruby-jmeter/dsl/runtime_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/save_responses_to_a_file.rb on lines 9..26
lib/ruby-jmeter/dsl/simple_config_element.rb on lines 9..20
lib/ruby-jmeter/dsl/simple_controller.rb on lines 9..20
lib/ruby-jmeter/dsl/simple_data_writer.rb on lines 9..52
lib/ruby-jmeter/dsl/smime_assertion.rb on lines 9..32
lib/ruby-jmeter/dsl/smtp_sampler.rb on lines 9..48
lib/ruby-jmeter/dsl/soapxmlrpc_request.rb on lines 9..30
lib/ruby-jmeter/dsl/spline_visualizer.rb on lines 9..52
lib/ruby-jmeter/dsl/summary_report.rb on lines 9..52
lib/ruby-jmeter/dsl/switch_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/synchronizing_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/tcp_sampler.rb on lines 9..30
lib/ruby-jmeter/dsl/tcp_sampler_config.rb on lines 9..28
lib/ruby-jmeter/dsl/test_action.rb on lines 9..24
lib/ruby-jmeter/dsl/test_fragment.rb on lines 9..20
lib/ruby-jmeter/dsl/throughput_controller.rb on lines 9..29
lib/ruby-jmeter/dsl/transaction_controller.rb on lines 9..23
lib/ruby-jmeter/dsl/uniform_random_timer.rb on lines 9..23
lib/ruby-jmeter/dsl/user_defined_variables.rb on lines 9..30
lib/ruby-jmeter/dsl/user_parameters.rb on lines 9..27
lib/ruby-jmeter/dsl/view_results_in_table.rb on lines 9..52
lib/ruby-jmeter/dsl/view_results_tree.rb on lines 9..52
lib/ruby-jmeter/dsl/while_controller.rb on lines 9..22
lib/ruby-jmeter/dsl/xml_assertion.rb on lines 9..20
lib/ruby-jmeter/dsl/xml_schema_assertion.rb on lines 9..22
lib/ruby-jmeter/dsl/xpath_assertion.rb on lines 9..28
lib/ruby-jmeter/dsl/xpath_extractor.rb on lines 9..28

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

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