kputnam/stupidedi

View on GitHub
notes/json_writer/sample_output.rb

Summary

Maintainability
D
2 days
Test Coverage

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

               {:IK5=>
                 [{:E717=>{:name=>"Transaction Set Acknowledgement Code", :value=>{:raw=>"R", :description=>"Rejected"}, :type=>:simple}},
                  {:E618=>{:name=>"Implementation Transaction Set Syntax Error Code", :value=>{:raw=>"5", :description=>"One or More Segments in Error"}, :type=>:simple}},
                  {:E618=>{:name=>"Implementation Transaction Set Syntax Error Code", :value=>{:raw=>"", :description=>nil}, :type=>:simple}},
                  {:E618=>{:name=>"Implementation Transaction Set Syntax Error Code", :value=>{:raw=>"", :description=>nil}, :type=>:simple}},
Severity: Major
Found in notes/json_writer/sample_output.rb and 1 other location - About 2 hrs to fix
notes/json_writer/sample_output.rb on lines 107..113

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

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

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

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

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

Refactorings

Further Reading

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

               {:IK5=>
                 [{:E717=>{:name=>"Transaction Set Acknowledgement Code", :value=>{:raw=>"R", :description=>"Rejected"}, :type=>:simple}},
                  {:E618=>{:name=>"Implementation Transaction Set Syntax Error Code", :value=>{:raw=>"5", :description=>"One or More Segments in Error"}, :type=>:simple}},
                  {:E618=>{:name=>"Implementation Transaction Set Syntax Error Code", :value=>{:raw=>"", :description=>nil}, :type=>:simple}},
                  {:E618=>{:name=>"Implementation Transaction Set Syntax Error Code", :value=>{:raw=>"", :description=>nil}, :type=>:simple}},
Severity: Major
Found in notes/json_writer/sample_output.rb and 1 other location - About 2 hrs to fix
notes/json_writer/sample_output.rb on lines 75..81

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

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

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

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

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

Refactorings

Further Reading

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

                  {:CTX=>
                    [{:C998=>{:name=>"CONTEXT IDENTIFICATION", :value=>[[{:raw=>"CLM01", :description=>nil}, {:raw=>"987654321", :description=>nil}]], :type=>:repeated}},
                     {:E721=>{:name=>"Segment ID Code", :value=>{:raw=>"", :description=>""}, :type=>:simple}},
                     {:E719=>{:name=>"Segment Position in Transaction Set", :value=>{:raw=>"", :description=>nil}, :type=>:simple}},
                     {:E447=>{:name=>"Loop Identifier Code", :value=>{:raw=>"", :description=>nil}, :type=>:simple}},
Severity: Major
Found in notes/json_writer/sample_output.rb and 1 other location - About 2 hrs to fix
notes/json_writer/sample_output.rb on lines 62..68

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

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

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

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

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

Refactorings

Further Reading

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

                  {:CTX=>
                    [{:C998=>{:name=>"CONTEXT IDENTIFICATION", :value=>[[{:raw=>"CLM01", :description=>nil}, {:raw=>"123456789", :description=>nil}]], :type=>:repeated}},
                     {:E721=>{:name=>"Segment ID Code", :value=>{:raw=>"", :description=>""}, :type=>:simple}},
                     {:E719=>{:name=>"Segment Position in Transaction Set", :value=>{:raw=>"", :description=>nil}, :type=>:simple}},
                     {:E447=>{:name=>"Loop Identifier Code", :value=>{:raw=>"", :description=>nil}, :type=>:simple}},
Severity: Major
Found in notes/json_writer/sample_output.rb and 1 other location - About 2 hrs to fix
notes/json_writer/sample_output.rb on lines 100..106

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

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

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

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

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

Refactorings

Further Reading

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

                 [{:IK3=>
                    [{:E721=>{:name=>"Segment ID Code", :value=>{:raw=>"REF", :description=>"REF"}, :type=>:simple}},
                     {:E719=>{:name=>"Segment Position in Transaction Set", :value=>{:raw=>"57", :description=>nil}, :type=>:simple}},
                     {:E447=>{:name=>"Loop Identifier Code", :value=>{:raw=>"", :description=>nil}, :type=>:simple}},
                     {:E620=>{:name=>"Implementation Segment Syntax Error Code", :value=>{:raw=>"3", :description=>"Required Segment Missing"}, :type=>:simple}}]},
Severity: Major
Found in notes/json_writer/sample_output.rb and 1 other location - About 1 hr to fix
notes/json_writer/sample_output.rb on lines 57..61

Duplicated Code

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

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

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

Tuning

This issue has a mass of 55.

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

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

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

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

Refactorings

Further Reading

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

                 [{:IK3=>
                    [{:E721=>{:name=>"Segment ID Code", :value=>{:raw=>"CLM", :description=>"CLM"}, :type=>:simple}},
                     {:E719=>{:name=>"Segment Position in Transaction Set", :value=>{:raw=>"22", :description=>nil}, :type=>:simple}},
                     {:E447=>{:name=>"Loop Identifier Code", :value=>{:raw=>"", :description=>nil}, :type=>:simple}},
                     {:E620=>{:name=>"Implementation Segment Syntax Error Code", :value=>{:raw=>"8", :description=>"Segment Has Data Element Errors"}, :type=>:simple}}]},
Severity: Major
Found in notes/json_writer/sample_output.rb and 1 other location - About 1 hr to fix
notes/json_writer/sample_output.rb on lines 88..92

Duplicated Code

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

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

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

Tuning

This issue has a mass of 55.

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

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

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

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

Refactorings

Further Reading

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

              [{:AK2=>
                 [{:E143=>{:name=>"Transaction Set Identifier Code", :value=>{:raw=>"837", :description=>"Health Care Claim"}, :type=>:simple}},
                  {:E329=>{:name=>"Transaction Set Control Number", :value=>{:raw=>"0003", :description=>nil}, :type=>:simple}},
                  {:E1705=>{:name=>"Implementation Convention Reference", :value=>{:raw=>"", :description=>nil}, :type=>:simple}}]},
Severity: Major
Found in notes/json_writer/sample_output.rb and 4 other locations - About 50 mins to fix
notes/json_writer/sample_output.rb on lines 31..34
notes/json_writer/sample_output.rb on lines 35..38
notes/json_writer/sample_output.rb on lines 40..43
notes/json_writer/sample_output.rb on lines 52..55

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

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

           [{:ST=>
              [{:E143=>{:name=>"Transaction Set Identifier Code", :value=>{:raw=>"999", :description=>"Implementation Acknowledgement"}, :type=>:simple}},
               {:E329=>{:name=>"Transaction Set Control Number", :value=>{:raw=>"2870001", :description=>nil}, :type=>:simple}},
               {:E1705=>{:name=>"Implementation Guide Version Name", :value=>{:raw=>"005010X231", :description=>nil}, :type=>:simple}}]},
Severity: Major
Found in notes/json_writer/sample_output.rb and 4 other locations - About 50 mins to fix
notes/json_writer/sample_output.rb on lines 35..38
notes/json_writer/sample_output.rb on lines 40..43
notes/json_writer/sample_output.rb on lines 52..55
notes/json_writer/sample_output.rb on lines 83..86

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

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

              [{:AK2=>
                 [{:E143=>{:name=>"Transaction Set Identifier Code", :value=>{:raw=>"837", :description=>"Health Care Claim"}, :type=>:simple}},
                  {:E329=>{:name=>"Transaction Set Control Number", :value=>{:raw=>"0001", :description=>nil}, :type=>:simple}},
                  {:E1705=>{:name=>"Implementation Convention Reference", :value=>{:raw=>"", :description=>nil}, :type=>:simple}}]},
Severity: Major
Found in notes/json_writer/sample_output.rb and 4 other locations - About 50 mins to fix
notes/json_writer/sample_output.rb on lines 31..34
notes/json_writer/sample_output.rb on lines 35..38
notes/json_writer/sample_output.rb on lines 52..55
notes/json_writer/sample_output.rb on lines 83..86

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

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

              [{:AK2=>
                 [{:E143=>{:name=>"Transaction Set Identifier Code", :value=>{:raw=>"837", :description=>"Health Care Claim"}, :type=>:simple}},
                  {:E329=>{:name=>"Transaction Set Control Number", :value=>{:raw=>"0002", :description=>nil}, :type=>:simple}},
                  {:E1705=>{:name=>"Implementation Convention Reference", :value=>{:raw=>"", :description=>nil}, :type=>:simple}}]},
Severity: Major
Found in notes/json_writer/sample_output.rb and 4 other locations - About 50 mins to fix
notes/json_writer/sample_output.rb on lines 31..34
notes/json_writer/sample_output.rb on lines 35..38
notes/json_writer/sample_output.rb on lines 40..43
notes/json_writer/sample_output.rb on lines 83..86

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

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

            {:AK1=>
              [{:E479=>{:name=>"Functional Identifier Code", :value=>{:raw=>"HC", :description=>"Health Care Claim"}, :type=>:simple}},
               {:E28=>{:name=>"Group Control Number", :value=>{:raw=>"17456", :description=>nil}, :type=>:simple}},
               {:E480=>{:name=>"Version, Release, or Industry Identifier Code", :value=>{:raw=>"004010X098A1", :description=>nil}, :type=>:simple}}]},
Severity: Major
Found in notes/json_writer/sample_output.rb and 4 other locations - About 50 mins to fix
notes/json_writer/sample_output.rb on lines 31..34
notes/json_writer/sample_output.rb on lines 40..43
notes/json_writer/sample_output.rb on lines 52..55
notes/json_writer/sample_output.rb on lines 83..86

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

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

      {:GE=>[{:E97=>{:name=>"Number of Transaction Sets Included", :value=>{:raw=>"1", :description=>nil}, :type=>:simple}}, {:E28=>{:name=>"Group Control Number", :value=>{:raw=>"287", :description=>nil}, :type=>:simple}}]}]},
Severity: Minor
Found in notes/json_writer/sample_output.rb and 2 other locations - About 25 mins to fix
notes/json_writer/sample_output.rb on lines 124..125
notes/json_writer/sample_output.rb on lines 127..127

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

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

            {:SE=>
              [{:E96=>{:name=>"Transaction Segment Count", :value=>{:raw=>"16", :description=>nil}, :type=>:simple}}, {:E329=>{:name=>"Transaction Set Control Number", :value=>{:raw=>"2870001", :description=>nil}, :type=>:simple}}]}]}]},
Severity: Minor
Found in notes/json_writer/sample_output.rb and 2 other locations - About 25 mins to fix
notes/json_writer/sample_output.rb on lines 126..126
notes/json_writer/sample_output.rb on lines 127..127

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

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

   {:IEA=>[{:I16=>{:name=>"Number of Included Functional Groups", :value=>{:raw=>"1", :description=>nil}, :type=>:simple}}, {:I12=>{:name=>"Interchange Control Number", :value=>{:raw=>"286", :description=>nil}, :type=>:simple}}]}]}
Severity: Minor
Found in notes/json_writer/sample_output.rb and 2 other locations - About 25 mins to fix
notes/json_writer/sample_output.rb on lines 124..125
notes/json_writer/sample_output.rb on lines 126..126

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

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

There are no issues that match your filters.

Category
Status