christoph2/pyA2L

View on GitHub

Showing 171 of 238 total issues

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

    def exitFixAxisParList(self, ctx):
        axisPts_Value = self.getList(ctx.axisPts_Value)
        ctx.value = model.FixAxisParList(axisPts_Value=axisPts_Value)
        self.db.session.add(ctx.value)
Severity: Major
Found in pya2l/a2l_listener.py and 15 other locations - About 2 hrs to fix
pya2l/a2l_listener.py on lines 201..204
pya2l/a2l_listener.py on lines 257..260
pya2l/a2l_listener.py on lines 305..308
pya2l/a2l_listener.py on lines 658..661
pya2l/a2l_listener.py on lines 839..842
pya2l/a2l_listener.py on lines 873..876
pya2l/a2l_listener.py on lines 883..886
pya2l/a2l_listener.py on lines 888..891
pya2l/a2l_listener.py on lines 893..896
pya2l/a2l_listener.py on lines 898..901
pya2l/a2l_listener.py on lines 928..931
pya2l/a2l_listener.py on lines 937..940
pya2l/a2l_listener.py on lines 1127..1130
pya2l/a2l_listener.py on lines 1949..1952
pya2l/a2l_listener.py on lines 1986..1989

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

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

    def exitFunctionList(self, ctx):
        name = self.getList(ctx.name)
        ctx.value = model.FunctionList(name=name)
        self.db.session.add(ctx.value)
Severity: Major
Found in pya2l/a2l_listener.py and 15 other locations - About 2 hrs to fix
pya2l/a2l_listener.py on lines 201..204
pya2l/a2l_listener.py on lines 305..308
pya2l/a2l_listener.py on lines 637..640
pya2l/a2l_listener.py on lines 658..661
pya2l/a2l_listener.py on lines 839..842
pya2l/a2l_listener.py on lines 873..876
pya2l/a2l_listener.py on lines 883..886
pya2l/a2l_listener.py on lines 888..891
pya2l/a2l_listener.py on lines 893..896
pya2l/a2l_listener.py on lines 898..901
pya2l/a2l_listener.py on lines 928..931
pya2l/a2l_listener.py on lines 937..940
pya2l/a2l_listener.py on lines 1127..1130
pya2l/a2l_listener.py on lines 1949..1952
pya2l/a2l_listener.py on lines 1986..1989

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

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

    def exitInMeasurement(self, ctx):
        identifier = self.getList(ctx.identifier)
        ctx.value = model.InMeasurement(identifier=identifier)
        self.db.session.add(ctx.value)
Severity: Major
Found in pya2l/a2l_listener.py and 15 other locations - About 2 hrs to fix
pya2l/a2l_listener.py on lines 201..204
pya2l/a2l_listener.py on lines 257..260
pya2l/a2l_listener.py on lines 305..308
pya2l/a2l_listener.py on lines 637..640
pya2l/a2l_listener.py on lines 658..661
pya2l/a2l_listener.py on lines 839..842
pya2l/a2l_listener.py on lines 873..876
pya2l/a2l_listener.py on lines 888..891
pya2l/a2l_listener.py on lines 893..896
pya2l/a2l_listener.py on lines 898..901
pya2l/a2l_listener.py on lines 928..931
pya2l/a2l_listener.py on lines 937..940
pya2l/a2l_listener.py on lines 1127..1130
pya2l/a2l_listener.py on lines 1949..1952
pya2l/a2l_listener.py on lines 1986..1989

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

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

    def exitRefMeasurement(self, ctx):
        identifier = self.getList(ctx.identifier)
        ctx.value = model.RefMeasurement(identifier=identifier)
        self.db.session.add(ctx.value)
Severity: Major
Found in pya2l/a2l_listener.py and 15 other locations - About 2 hrs to fix
pya2l/a2l_listener.py on lines 201..204
pya2l/a2l_listener.py on lines 257..260
pya2l/a2l_listener.py on lines 305..308
pya2l/a2l_listener.py on lines 637..640
pya2l/a2l_listener.py on lines 658..661
pya2l/a2l_listener.py on lines 839..842
pya2l/a2l_listener.py on lines 873..876
pya2l/a2l_listener.py on lines 883..886
pya2l/a2l_listener.py on lines 888..891
pya2l/a2l_listener.py on lines 893..896
pya2l/a2l_listener.py on lines 898..901
pya2l/a2l_listener.py on lines 937..940
pya2l/a2l_listener.py on lines 1127..1130
pya2l/a2l_listener.py on lines 1949..1952
pya2l/a2l_listener.py on lines 1986..1989

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

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

    def exitSubGroup(self, ctx):
        identifier = self.getList(ctx.identifier)
        ctx.value = model.SubGroup(identifier=identifier)
        self.db.session.add(ctx.value)
Severity: Major
Found in pya2l/a2l_listener.py and 15 other locations - About 2 hrs to fix
pya2l/a2l_listener.py on lines 201..204
pya2l/a2l_listener.py on lines 257..260
pya2l/a2l_listener.py on lines 305..308
pya2l/a2l_listener.py on lines 637..640
pya2l/a2l_listener.py on lines 658..661
pya2l/a2l_listener.py on lines 839..842
pya2l/a2l_listener.py on lines 873..876
pya2l/a2l_listener.py on lines 883..886
pya2l/a2l_listener.py on lines 888..891
pya2l/a2l_listener.py on lines 893..896
pya2l/a2l_listener.py on lines 898..901
pya2l/a2l_listener.py on lines 928..931
pya2l/a2l_listener.py on lines 1127..1130
pya2l/a2l_listener.py on lines 1949..1952
pya2l/a2l_listener.py on lines 1986..1989

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

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

    def exitRefGroup(self, ctx):
        identifier = self.getList(ctx.identifier)
        ctx.value = model.RefGroup(identifier=identifier)
        self.db.session.add(ctx.value)
Severity: Major
Found in pya2l/a2l_listener.py and 15 other locations - About 2 hrs to fix
pya2l/a2l_listener.py on lines 201..204
pya2l/a2l_listener.py on lines 257..260
pya2l/a2l_listener.py on lines 305..308
pya2l/a2l_listener.py on lines 637..640
pya2l/a2l_listener.py on lines 658..661
pya2l/a2l_listener.py on lines 839..842
pya2l/a2l_listener.py on lines 873..876
pya2l/a2l_listener.py on lines 883..886
pya2l/a2l_listener.py on lines 888..891
pya2l/a2l_listener.py on lines 893..896
pya2l/a2l_listener.py on lines 898..901
pya2l/a2l_listener.py on lines 928..931
pya2l/a2l_listener.py on lines 937..940
pya2l/a2l_listener.py on lines 1127..1130
pya2l/a2l_listener.py on lines 1986..1989

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

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

    def exitFrameMeasurement(self, ctx):
        identifier = self.getList(ctx.identifier)
        ctx.value = model.FrameMeasurement(identifier=identifier)
        self.db.session.add(ctx.value)
Severity: Major
Found in pya2l/a2l_listener.py and 15 other locations - About 2 hrs to fix
pya2l/a2l_listener.py on lines 201..204
pya2l/a2l_listener.py on lines 257..260
pya2l/a2l_listener.py on lines 305..308
pya2l/a2l_listener.py on lines 637..640
pya2l/a2l_listener.py on lines 658..661
pya2l/a2l_listener.py on lines 873..876
pya2l/a2l_listener.py on lines 883..886
pya2l/a2l_listener.py on lines 888..891
pya2l/a2l_listener.py on lines 893..896
pya2l/a2l_listener.py on lines 898..901
pya2l/a2l_listener.py on lines 928..931
pya2l/a2l_listener.py on lines 937..940
pya2l/a2l_listener.py on lines 1127..1130
pya2l/a2l_listener.py on lines 1949..1952
pya2l/a2l_listener.py on lines 1986..1989

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

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

    def exitRefCharacteristic(self, ctx):
        identifier = self.getList(ctx.identifier)
        ctx.value = model.RefCharacteristic(identifier=identifier)
        self.db.session.add(ctx.value)
Severity: Major
Found in pya2l/a2l_listener.py and 15 other locations - About 2 hrs to fix
pya2l/a2l_listener.py on lines 201..204
pya2l/a2l_listener.py on lines 257..260
pya2l/a2l_listener.py on lines 637..640
pya2l/a2l_listener.py on lines 658..661
pya2l/a2l_listener.py on lines 839..842
pya2l/a2l_listener.py on lines 873..876
pya2l/a2l_listener.py on lines 883..886
pya2l/a2l_listener.py on lines 888..891
pya2l/a2l_listener.py on lines 893..896
pya2l/a2l_listener.py on lines 898..901
pya2l/a2l_listener.py on lines 928..931
pya2l/a2l_listener.py on lines 937..940
pya2l/a2l_listener.py on lines 1127..1130
pya2l/a2l_listener.py on lines 1949..1952
pya2l/a2l_listener.py on lines 1986..1989

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

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

    def exitVirtual(self, ctx):
        measuringChannel = self.getList(ctx.measuringChannel)
        ctx.value = model.Virtual(measuringChannel=measuringChannel)
        self.db.session.add(ctx.value)
Severity: Major
Found in pya2l/a2l_listener.py and 15 other locations - About 2 hrs to fix
pya2l/a2l_listener.py on lines 201..204
pya2l/a2l_listener.py on lines 257..260
pya2l/a2l_listener.py on lines 305..308
pya2l/a2l_listener.py on lines 637..640
pya2l/a2l_listener.py on lines 658..661
pya2l/a2l_listener.py on lines 839..842
pya2l/a2l_listener.py on lines 873..876
pya2l/a2l_listener.py on lines 883..886
pya2l/a2l_listener.py on lines 888..891
pya2l/a2l_listener.py on lines 893..896
pya2l/a2l_listener.py on lines 898..901
pya2l/a2l_listener.py on lines 928..931
pya2l/a2l_listener.py on lines 937..940
pya2l/a2l_listener.py on lines 1949..1952
pya2l/a2l_listener.py on lines 1986..1989

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

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

    def exitAlignmentFloat32Ieee(self, ctx):
        alignmentBorder = ctx.alignmentBorder.value
        ctx.value = model.AlignmentFloat32Ieee(alignmentBorder=alignmentBorder)
        self.db.session.add(ctx.value)
Severity: Major
Found in pya2l/a2l_listener.py and 62 other locations - About 1 hr to fix
pya2l/a2l_listener.py on lines 145..148
pya2l/a2l_listener.py on lines 150..153
pya2l/a2l_listener.py on lines 160..163
pya2l/a2l_listener.py on lines 165..168
pya2l/a2l_listener.py on lines 170..173
pya2l/a2l_listener.py on lines 175..178
pya2l/a2l_listener.py on lines 191..194
pya2l/a2l_listener.py on lines 196..199
pya2l/a2l_listener.py on lines 206..209
pya2l/a2l_listener.py on lines 211..214
pya2l/a2l_listener.py on lines 216..219
pya2l/a2l_listener.py on lines 221..224
pya2l/a2l_listener.py on lines 226..230
pya2l/a2l_listener.py on lines 236..239
pya2l/a2l_listener.py on lines 241..244
pya2l/a2l_listener.py on lines 252..255
pya2l/a2l_listener.py on lines 291..294
pya2l/a2l_listener.py on lines 296..299
pya2l/a2l_listener.py on lines 310..313
pya2l/a2l_listener.py on lines 315..318
pya2l/a2l_listener.py on lines 320..323
pya2l/a2l_listener.py on lines 331..334
pya2l/a2l_listener.py on lines 367..370
pya2l/a2l_listener.py on lines 613..616
pya2l/a2l_listener.py on lines 618..621
pya2l/a2l_listener.py on lines 642..645
pya2l/a2l_listener.py on lines 647..650
pya2l/a2l_listener.py on lines 663..666
pya2l/a2l_listener.py on lines 718..721
pya2l/a2l_listener.py on lines 729..732
pya2l/a2l_listener.py on lines 734..737
pya2l/a2l_listener.py on lines 767..770
pya2l/a2l_listener.py on lines 878..881
pya2l/a2l_listener.py on lines 1082..1085
pya2l/a2l_listener.py on lines 1094..1097
pya2l/a2l_listener.py on lines 1099..1102
pya2l/a2l_listener.py on lines 1108..1111
pya2l/a2l_listener.py on lines 1113..1116
pya2l/a2l_listener.py on lines 1118..1121
pya2l/a2l_listener.py on lines 1163..1166
pya2l/a2l_listener.py on lines 1168..1171
pya2l/a2l_listener.py on lines 1214..1217
pya2l/a2l_listener.py on lines 1232..1235
pya2l/a2l_listener.py on lines 1237..1240
pya2l/a2l_listener.py on lines 1242..1245
pya2l/a2l_listener.py on lines 1247..1250
pya2l/a2l_listener.py on lines 1252..1255
pya2l/a2l_listener.py on lines 1257..1260
pya2l/a2l_listener.py on lines 1262..1265
pya2l/a2l_listener.py on lines 1325..1328
pya2l/a2l_listener.py on lines 1330..1333
pya2l/a2l_listener.py on lines 1335..1338
pya2l/a2l_listener.py on lines 1346..1349
pya2l/a2l_listener.py on lines 1654..1657
pya2l/a2l_listener.py on lines 1659..1662
pya2l/a2l_listener.py on lines 1664..1667
pya2l/a2l_listener.py on lines 1669..1672
pya2l/a2l_listener.py on lines 1674..1677
pya2l/a2l_listener.py on lines 2008..2011
pya2l/a2l_listener.py on lines 2013..2016
pya2l/a2l_listener.py on lines 2029..2032
pya2l/a2l_listener.py on lines 2034..2037

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

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

    def exitNumber(self, ctx):
        number_ = ctx.number_.value
        ctx.value = model.Number(number=number_)
        self.db.session.add(ctx.value)
Severity: Major
Found in pya2l/a2l_listener.py and 62 other locations - About 1 hr to fix
pya2l/a2l_listener.py on lines 145..148
pya2l/a2l_listener.py on lines 150..153
pya2l/a2l_listener.py on lines 155..158
pya2l/a2l_listener.py on lines 160..163
pya2l/a2l_listener.py on lines 165..168
pya2l/a2l_listener.py on lines 170..173
pya2l/a2l_listener.py on lines 175..178
pya2l/a2l_listener.py on lines 191..194
pya2l/a2l_listener.py on lines 196..199
pya2l/a2l_listener.py on lines 206..209
pya2l/a2l_listener.py on lines 211..214
pya2l/a2l_listener.py on lines 216..219
pya2l/a2l_listener.py on lines 221..224
pya2l/a2l_listener.py on lines 226..230
pya2l/a2l_listener.py on lines 236..239
pya2l/a2l_listener.py on lines 241..244
pya2l/a2l_listener.py on lines 252..255
pya2l/a2l_listener.py on lines 291..294
pya2l/a2l_listener.py on lines 296..299
pya2l/a2l_listener.py on lines 310..313
pya2l/a2l_listener.py on lines 315..318
pya2l/a2l_listener.py on lines 320..323
pya2l/a2l_listener.py on lines 331..334
pya2l/a2l_listener.py on lines 367..370
pya2l/a2l_listener.py on lines 613..616
pya2l/a2l_listener.py on lines 618..621
pya2l/a2l_listener.py on lines 642..645
pya2l/a2l_listener.py on lines 647..650
pya2l/a2l_listener.py on lines 718..721
pya2l/a2l_listener.py on lines 729..732
pya2l/a2l_listener.py on lines 734..737
pya2l/a2l_listener.py on lines 767..770
pya2l/a2l_listener.py on lines 878..881
pya2l/a2l_listener.py on lines 1082..1085
pya2l/a2l_listener.py on lines 1094..1097
pya2l/a2l_listener.py on lines 1099..1102
pya2l/a2l_listener.py on lines 1108..1111
pya2l/a2l_listener.py on lines 1113..1116
pya2l/a2l_listener.py on lines 1118..1121
pya2l/a2l_listener.py on lines 1163..1166
pya2l/a2l_listener.py on lines 1168..1171
pya2l/a2l_listener.py on lines 1214..1217
pya2l/a2l_listener.py on lines 1232..1235
pya2l/a2l_listener.py on lines 1237..1240
pya2l/a2l_listener.py on lines 1242..1245
pya2l/a2l_listener.py on lines 1247..1250
pya2l/a2l_listener.py on lines 1252..1255
pya2l/a2l_listener.py on lines 1257..1260
pya2l/a2l_listener.py on lines 1262..1265
pya2l/a2l_listener.py on lines 1325..1328
pya2l/a2l_listener.py on lines 1330..1333
pya2l/a2l_listener.py on lines 1335..1338
pya2l/a2l_listener.py on lines 1346..1349
pya2l/a2l_listener.py on lines 1654..1657
pya2l/a2l_listener.py on lines 1659..1662
pya2l/a2l_listener.py on lines 1664..1667
pya2l/a2l_listener.py on lines 1669..1672
pya2l/a2l_listener.py on lines 1674..1677
pya2l/a2l_listener.py on lines 2008..2011
pya2l/a2l_listener.py on lines 2013..2016
pya2l/a2l_listener.py on lines 2029..2032
pya2l/a2l_listener.py on lines 2034..2037

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

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

    def exitPhoneNo(self, ctx):
        telnum = ctx.telnum.value
        ctx.value = model.PhoneNo(telnum=telnum)
        self.db.session.add(ctx.value)
Severity: Major
Found in pya2l/a2l_listener.py and 62 other locations - About 1 hr to fix
pya2l/a2l_listener.py on lines 145..148
pya2l/a2l_listener.py on lines 150..153
pya2l/a2l_listener.py on lines 155..158
pya2l/a2l_listener.py on lines 160..163
pya2l/a2l_listener.py on lines 165..168
pya2l/a2l_listener.py on lines 170..173
pya2l/a2l_listener.py on lines 175..178
pya2l/a2l_listener.py on lines 191..194
pya2l/a2l_listener.py on lines 196..199
pya2l/a2l_listener.py on lines 206..209
pya2l/a2l_listener.py on lines 211..214
pya2l/a2l_listener.py on lines 216..219
pya2l/a2l_listener.py on lines 221..224
pya2l/a2l_listener.py on lines 226..230
pya2l/a2l_listener.py on lines 236..239
pya2l/a2l_listener.py on lines 241..244
pya2l/a2l_listener.py on lines 252..255
pya2l/a2l_listener.py on lines 291..294
pya2l/a2l_listener.py on lines 296..299
pya2l/a2l_listener.py on lines 310..313
pya2l/a2l_listener.py on lines 315..318
pya2l/a2l_listener.py on lines 320..323
pya2l/a2l_listener.py on lines 331..334
pya2l/a2l_listener.py on lines 367..370
pya2l/a2l_listener.py on lines 613..616
pya2l/a2l_listener.py on lines 618..621
pya2l/a2l_listener.py on lines 642..645
pya2l/a2l_listener.py on lines 647..650
pya2l/a2l_listener.py on lines 663..666
pya2l/a2l_listener.py on lines 718..721
pya2l/a2l_listener.py on lines 729..732
pya2l/a2l_listener.py on lines 734..737
pya2l/a2l_listener.py on lines 767..770
pya2l/a2l_listener.py on lines 878..881
pya2l/a2l_listener.py on lines 1082..1085
pya2l/a2l_listener.py on lines 1094..1097
pya2l/a2l_listener.py on lines 1099..1102
pya2l/a2l_listener.py on lines 1108..1111
pya2l/a2l_listener.py on lines 1113..1116
pya2l/a2l_listener.py on lines 1118..1121
pya2l/a2l_listener.py on lines 1163..1166
pya2l/a2l_listener.py on lines 1168..1171
pya2l/a2l_listener.py on lines 1214..1217
pya2l/a2l_listener.py on lines 1232..1235
pya2l/a2l_listener.py on lines 1237..1240
pya2l/a2l_listener.py on lines 1242..1245
pya2l/a2l_listener.py on lines 1247..1250
pya2l/a2l_listener.py on lines 1252..1255
pya2l/a2l_listener.py on lines 1257..1260
pya2l/a2l_listener.py on lines 1262..1265
pya2l/a2l_listener.py on lines 1325..1328
pya2l/a2l_listener.py on lines 1335..1338
pya2l/a2l_listener.py on lines 1346..1349
pya2l/a2l_listener.py on lines 1654..1657
pya2l/a2l_listener.py on lines 1659..1662
pya2l/a2l_listener.py on lines 1664..1667
pya2l/a2l_listener.py on lines 1669..1672
pya2l/a2l_listener.py on lines 1674..1677
pya2l/a2l_listener.py on lines 2008..2011
pya2l/a2l_listener.py on lines 2013..2016
pya2l/a2l_listener.py on lines 2029..2032
pya2l/a2l_listener.py on lines 2034..2037

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

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

    def exitVarNaming(self, ctx):
        tag = ctx.tag.text
        ctx.value = model.VarNaming(tag=tag)
        self.db.session.add(ctx.value)
Severity: Major
Found in pya2l/a2l_listener.py and 62 other locations - About 1 hr to fix
pya2l/a2l_listener.py on lines 145..148
pya2l/a2l_listener.py on lines 150..153
pya2l/a2l_listener.py on lines 155..158
pya2l/a2l_listener.py on lines 160..163
pya2l/a2l_listener.py on lines 165..168
pya2l/a2l_listener.py on lines 170..173
pya2l/a2l_listener.py on lines 175..178
pya2l/a2l_listener.py on lines 191..194
pya2l/a2l_listener.py on lines 196..199
pya2l/a2l_listener.py on lines 206..209
pya2l/a2l_listener.py on lines 211..214
pya2l/a2l_listener.py on lines 216..219
pya2l/a2l_listener.py on lines 221..224
pya2l/a2l_listener.py on lines 226..230
pya2l/a2l_listener.py on lines 236..239
pya2l/a2l_listener.py on lines 241..244
pya2l/a2l_listener.py on lines 252..255
pya2l/a2l_listener.py on lines 291..294
pya2l/a2l_listener.py on lines 296..299
pya2l/a2l_listener.py on lines 310..313
pya2l/a2l_listener.py on lines 315..318
pya2l/a2l_listener.py on lines 320..323
pya2l/a2l_listener.py on lines 331..334
pya2l/a2l_listener.py on lines 367..370
pya2l/a2l_listener.py on lines 613..616
pya2l/a2l_listener.py on lines 618..621
pya2l/a2l_listener.py on lines 642..645
pya2l/a2l_listener.py on lines 647..650
pya2l/a2l_listener.py on lines 663..666
pya2l/a2l_listener.py on lines 718..721
pya2l/a2l_listener.py on lines 729..732
pya2l/a2l_listener.py on lines 734..737
pya2l/a2l_listener.py on lines 767..770
pya2l/a2l_listener.py on lines 878..881
pya2l/a2l_listener.py on lines 1082..1085
pya2l/a2l_listener.py on lines 1094..1097
pya2l/a2l_listener.py on lines 1099..1102
pya2l/a2l_listener.py on lines 1108..1111
pya2l/a2l_listener.py on lines 1113..1116
pya2l/a2l_listener.py on lines 1118..1121
pya2l/a2l_listener.py on lines 1163..1166
pya2l/a2l_listener.py on lines 1168..1171
pya2l/a2l_listener.py on lines 1214..1217
pya2l/a2l_listener.py on lines 1232..1235
pya2l/a2l_listener.py on lines 1237..1240
pya2l/a2l_listener.py on lines 1242..1245
pya2l/a2l_listener.py on lines 1247..1250
pya2l/a2l_listener.py on lines 1252..1255
pya2l/a2l_listener.py on lines 1257..1260
pya2l/a2l_listener.py on lines 1262..1265
pya2l/a2l_listener.py on lines 1325..1328
pya2l/a2l_listener.py on lines 1330..1333
pya2l/a2l_listener.py on lines 1335..1338
pya2l/a2l_listener.py on lines 1346..1349
pya2l/a2l_listener.py on lines 1654..1657
pya2l/a2l_listener.py on lines 1659..1662
pya2l/a2l_listener.py on lines 1664..1667
pya2l/a2l_listener.py on lines 1669..1672
pya2l/a2l_listener.py on lines 1674..1677
pya2l/a2l_listener.py on lines 2008..2011
pya2l/a2l_listener.py on lines 2013..2016
pya2l/a2l_listener.py on lines 2034..2037

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

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

    def exitDeposit(self, ctx):
        mode_ = ctx.mode_.text
        ctx.value = model.Deposit(mode=mode_)

        self.db.session.add(ctx.value)
Severity: Major
Found in pya2l/a2l_listener.py and 62 other locations - About 1 hr to fix
pya2l/a2l_listener.py on lines 145..148
pya2l/a2l_listener.py on lines 150..153
pya2l/a2l_listener.py on lines 155..158
pya2l/a2l_listener.py on lines 160..163
pya2l/a2l_listener.py on lines 165..168
pya2l/a2l_listener.py on lines 170..173
pya2l/a2l_listener.py on lines 175..178
pya2l/a2l_listener.py on lines 191..194
pya2l/a2l_listener.py on lines 196..199
pya2l/a2l_listener.py on lines 206..209
pya2l/a2l_listener.py on lines 211..214
pya2l/a2l_listener.py on lines 216..219
pya2l/a2l_listener.py on lines 221..224
pya2l/a2l_listener.py on lines 236..239
pya2l/a2l_listener.py on lines 241..244
pya2l/a2l_listener.py on lines 252..255
pya2l/a2l_listener.py on lines 291..294
pya2l/a2l_listener.py on lines 296..299
pya2l/a2l_listener.py on lines 310..313
pya2l/a2l_listener.py on lines 315..318
pya2l/a2l_listener.py on lines 320..323
pya2l/a2l_listener.py on lines 331..334
pya2l/a2l_listener.py on lines 367..370
pya2l/a2l_listener.py on lines 613..616
pya2l/a2l_listener.py on lines 618..621
pya2l/a2l_listener.py on lines 642..645
pya2l/a2l_listener.py on lines 647..650
pya2l/a2l_listener.py on lines 663..666
pya2l/a2l_listener.py on lines 718..721
pya2l/a2l_listener.py on lines 729..732
pya2l/a2l_listener.py on lines 734..737
pya2l/a2l_listener.py on lines 767..770
pya2l/a2l_listener.py on lines 878..881
pya2l/a2l_listener.py on lines 1082..1085
pya2l/a2l_listener.py on lines 1094..1097
pya2l/a2l_listener.py on lines 1099..1102
pya2l/a2l_listener.py on lines 1108..1111
pya2l/a2l_listener.py on lines 1113..1116
pya2l/a2l_listener.py on lines 1118..1121
pya2l/a2l_listener.py on lines 1163..1166
pya2l/a2l_listener.py on lines 1168..1171
pya2l/a2l_listener.py on lines 1214..1217
pya2l/a2l_listener.py on lines 1232..1235
pya2l/a2l_listener.py on lines 1237..1240
pya2l/a2l_listener.py on lines 1242..1245
pya2l/a2l_listener.py on lines 1247..1250
pya2l/a2l_listener.py on lines 1252..1255
pya2l/a2l_listener.py on lines 1257..1260
pya2l/a2l_listener.py on lines 1262..1265
pya2l/a2l_listener.py on lines 1325..1328
pya2l/a2l_listener.py on lines 1330..1333
pya2l/a2l_listener.py on lines 1335..1338
pya2l/a2l_listener.py on lines 1346..1349
pya2l/a2l_listener.py on lines 1654..1657
pya2l/a2l_listener.py on lines 1659..1662
pya2l/a2l_listener.py on lines 1664..1667
pya2l/a2l_listener.py on lines 1669..1672
pya2l/a2l_listener.py on lines 1674..1677
pya2l/a2l_listener.py on lines 2008..2011
pya2l/a2l_listener.py on lines 2013..2016
pya2l/a2l_listener.py on lines 2029..2032
pya2l/a2l_listener.py on lines 2034..2037

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

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

    def exitRightShift(self, ctx):
        bitcount = ctx.bitcount.value
        ctx.value = model.RightShift(bitcount=bitcount)
        self.db.session.add(ctx.value)
Severity: Major
Found in pya2l/a2l_listener.py and 62 other locations - About 1 hr to fix
pya2l/a2l_listener.py on lines 145..148
pya2l/a2l_listener.py on lines 150..153
pya2l/a2l_listener.py on lines 155..158
pya2l/a2l_listener.py on lines 160..163
pya2l/a2l_listener.py on lines 165..168
pya2l/a2l_listener.py on lines 170..173
pya2l/a2l_listener.py on lines 175..178
pya2l/a2l_listener.py on lines 191..194
pya2l/a2l_listener.py on lines 196..199
pya2l/a2l_listener.py on lines 206..209
pya2l/a2l_listener.py on lines 211..214
pya2l/a2l_listener.py on lines 216..219
pya2l/a2l_listener.py on lines 221..224
pya2l/a2l_listener.py on lines 226..230
pya2l/a2l_listener.py on lines 236..239
pya2l/a2l_listener.py on lines 241..244
pya2l/a2l_listener.py on lines 252..255
pya2l/a2l_listener.py on lines 291..294
pya2l/a2l_listener.py on lines 296..299
pya2l/a2l_listener.py on lines 310..313
pya2l/a2l_listener.py on lines 315..318
pya2l/a2l_listener.py on lines 320..323
pya2l/a2l_listener.py on lines 331..334
pya2l/a2l_listener.py on lines 367..370
pya2l/a2l_listener.py on lines 613..616
pya2l/a2l_listener.py on lines 618..621
pya2l/a2l_listener.py on lines 642..645
pya2l/a2l_listener.py on lines 647..650
pya2l/a2l_listener.py on lines 663..666
pya2l/a2l_listener.py on lines 718..721
pya2l/a2l_listener.py on lines 729..732
pya2l/a2l_listener.py on lines 734..737
pya2l/a2l_listener.py on lines 767..770
pya2l/a2l_listener.py on lines 878..881
pya2l/a2l_listener.py on lines 1082..1085
pya2l/a2l_listener.py on lines 1094..1097
pya2l/a2l_listener.py on lines 1108..1111
pya2l/a2l_listener.py on lines 1113..1116
pya2l/a2l_listener.py on lines 1118..1121
pya2l/a2l_listener.py on lines 1163..1166
pya2l/a2l_listener.py on lines 1168..1171
pya2l/a2l_listener.py on lines 1214..1217
pya2l/a2l_listener.py on lines 1232..1235
pya2l/a2l_listener.py on lines 1237..1240
pya2l/a2l_listener.py on lines 1242..1245
pya2l/a2l_listener.py on lines 1247..1250
pya2l/a2l_listener.py on lines 1252..1255
pya2l/a2l_listener.py on lines 1257..1260
pya2l/a2l_listener.py on lines 1262..1265
pya2l/a2l_listener.py on lines 1325..1328
pya2l/a2l_listener.py on lines 1330..1333
pya2l/a2l_listener.py on lines 1335..1338
pya2l/a2l_listener.py on lines 1346..1349
pya2l/a2l_listener.py on lines 1654..1657
pya2l/a2l_listener.py on lines 1659..1662
pya2l/a2l_listener.py on lines 1664..1667
pya2l/a2l_listener.py on lines 1669..1672
pya2l/a2l_listener.py on lines 1674..1677
pya2l/a2l_listener.py on lines 2008..2011
pya2l/a2l_listener.py on lines 2013..2016
pya2l/a2l_listener.py on lines 2029..2032
pya2l/a2l_listener.py on lines 2034..2037

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

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

    def exitAlignmentLong(self, ctx):
        alignmentBorder = ctx.alignmentBorder.value
        ctx.value = model.AlignmentLong(alignmentBorder=alignmentBorder)
        self.db.session.add(ctx.value)
Severity: Major
Found in pya2l/a2l_listener.py and 62 other locations - About 1 hr to fix
pya2l/a2l_listener.py on lines 145..148
pya2l/a2l_listener.py on lines 150..153
pya2l/a2l_listener.py on lines 155..158
pya2l/a2l_listener.py on lines 160..163
pya2l/a2l_listener.py on lines 165..168
pya2l/a2l_listener.py on lines 175..178
pya2l/a2l_listener.py on lines 191..194
pya2l/a2l_listener.py on lines 196..199
pya2l/a2l_listener.py on lines 206..209
pya2l/a2l_listener.py on lines 211..214
pya2l/a2l_listener.py on lines 216..219
pya2l/a2l_listener.py on lines 221..224
pya2l/a2l_listener.py on lines 226..230
pya2l/a2l_listener.py on lines 236..239
pya2l/a2l_listener.py on lines 241..244
pya2l/a2l_listener.py on lines 252..255
pya2l/a2l_listener.py on lines 291..294
pya2l/a2l_listener.py on lines 296..299
pya2l/a2l_listener.py on lines 310..313
pya2l/a2l_listener.py on lines 315..318
pya2l/a2l_listener.py on lines 320..323
pya2l/a2l_listener.py on lines 331..334
pya2l/a2l_listener.py on lines 367..370
pya2l/a2l_listener.py on lines 613..616
pya2l/a2l_listener.py on lines 618..621
pya2l/a2l_listener.py on lines 642..645
pya2l/a2l_listener.py on lines 647..650
pya2l/a2l_listener.py on lines 663..666
pya2l/a2l_listener.py on lines 718..721
pya2l/a2l_listener.py on lines 729..732
pya2l/a2l_listener.py on lines 734..737
pya2l/a2l_listener.py on lines 767..770
pya2l/a2l_listener.py on lines 878..881
pya2l/a2l_listener.py on lines 1082..1085
pya2l/a2l_listener.py on lines 1094..1097
pya2l/a2l_listener.py on lines 1099..1102
pya2l/a2l_listener.py on lines 1108..1111
pya2l/a2l_listener.py on lines 1113..1116
pya2l/a2l_listener.py on lines 1118..1121
pya2l/a2l_listener.py on lines 1163..1166
pya2l/a2l_listener.py on lines 1168..1171
pya2l/a2l_listener.py on lines 1214..1217
pya2l/a2l_listener.py on lines 1232..1235
pya2l/a2l_listener.py on lines 1237..1240
pya2l/a2l_listener.py on lines 1242..1245
pya2l/a2l_listener.py on lines 1247..1250
pya2l/a2l_listener.py on lines 1252..1255
pya2l/a2l_listener.py on lines 1257..1260
pya2l/a2l_listener.py on lines 1262..1265
pya2l/a2l_listener.py on lines 1325..1328
pya2l/a2l_listener.py on lines 1330..1333
pya2l/a2l_listener.py on lines 1335..1338
pya2l/a2l_listener.py on lines 1346..1349
pya2l/a2l_listener.py on lines 1654..1657
pya2l/a2l_listener.py on lines 1659..1662
pya2l/a2l_listener.py on lines 1664..1667
pya2l/a2l_listener.py on lines 1669..1672
pya2l/a2l_listener.py on lines 1674..1677
pya2l/a2l_listener.py on lines 2008..2011
pya2l/a2l_listener.py on lines 2013..2016
pya2l/a2l_listener.py on lines 2029..2032
pya2l/a2l_listener.py on lines 2034..2037

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

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

    def exitPhysUnit(self, ctx):
        unit_ = ctx.unit_.value
        ctx.value = model.PhysUnit(unit=unit_)
        self.db.session.add(ctx.value)
Severity: Major
Found in pya2l/a2l_listener.py and 62 other locations - About 1 hr to fix
pya2l/a2l_listener.py on lines 145..148
pya2l/a2l_listener.py on lines 150..153
pya2l/a2l_listener.py on lines 155..158
pya2l/a2l_listener.py on lines 160..163
pya2l/a2l_listener.py on lines 165..168
pya2l/a2l_listener.py on lines 170..173
pya2l/a2l_listener.py on lines 175..178
pya2l/a2l_listener.py on lines 191..194
pya2l/a2l_listener.py on lines 196..199
pya2l/a2l_listener.py on lines 206..209
pya2l/a2l_listener.py on lines 211..214
pya2l/a2l_listener.py on lines 216..219
pya2l/a2l_listener.py on lines 221..224
pya2l/a2l_listener.py on lines 226..230
pya2l/a2l_listener.py on lines 236..239
pya2l/a2l_listener.py on lines 241..244
pya2l/a2l_listener.py on lines 252..255
pya2l/a2l_listener.py on lines 291..294
pya2l/a2l_listener.py on lines 310..313
pya2l/a2l_listener.py on lines 315..318
pya2l/a2l_listener.py on lines 320..323
pya2l/a2l_listener.py on lines 331..334
pya2l/a2l_listener.py on lines 367..370
pya2l/a2l_listener.py on lines 613..616
pya2l/a2l_listener.py on lines 618..621
pya2l/a2l_listener.py on lines 642..645
pya2l/a2l_listener.py on lines 647..650
pya2l/a2l_listener.py on lines 663..666
pya2l/a2l_listener.py on lines 718..721
pya2l/a2l_listener.py on lines 729..732
pya2l/a2l_listener.py on lines 734..737
pya2l/a2l_listener.py on lines 767..770
pya2l/a2l_listener.py on lines 878..881
pya2l/a2l_listener.py on lines 1082..1085
pya2l/a2l_listener.py on lines 1094..1097
pya2l/a2l_listener.py on lines 1099..1102
pya2l/a2l_listener.py on lines 1108..1111
pya2l/a2l_listener.py on lines 1113..1116
pya2l/a2l_listener.py on lines 1118..1121
pya2l/a2l_listener.py on lines 1163..1166
pya2l/a2l_listener.py on lines 1168..1171
pya2l/a2l_listener.py on lines 1214..1217
pya2l/a2l_listener.py on lines 1232..1235
pya2l/a2l_listener.py on lines 1237..1240
pya2l/a2l_listener.py on lines 1242..1245
pya2l/a2l_listener.py on lines 1247..1250
pya2l/a2l_listener.py on lines 1252..1255
pya2l/a2l_listener.py on lines 1257..1260
pya2l/a2l_listener.py on lines 1262..1265
pya2l/a2l_listener.py on lines 1325..1328
pya2l/a2l_listener.py on lines 1330..1333
pya2l/a2l_listener.py on lines 1335..1338
pya2l/a2l_listener.py on lines 1346..1349
pya2l/a2l_listener.py on lines 1654..1657
pya2l/a2l_listener.py on lines 1659..1662
pya2l/a2l_listener.py on lines 1664..1667
pya2l/a2l_listener.py on lines 1669..1672
pya2l/a2l_listener.py on lines 1674..1677
pya2l/a2l_listener.py on lines 2008..2011
pya2l/a2l_listener.py on lines 2013..2016
pya2l/a2l_listener.py on lines 2029..2032
pya2l/a2l_listener.py on lines 2034..2037

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

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

    def exitRefMemorySegment(self, ctx):
        name = ctx.name.value
        ctx.value = model.RefMemorySegment(name=name)
        self.db.session.add(ctx.value)
Severity: Major
Found in pya2l/a2l_listener.py and 62 other locations - About 1 hr to fix
pya2l/a2l_listener.py on lines 145..148
pya2l/a2l_listener.py on lines 150..153
pya2l/a2l_listener.py on lines 155..158
pya2l/a2l_listener.py on lines 160..163
pya2l/a2l_listener.py on lines 165..168
pya2l/a2l_listener.py on lines 170..173
pya2l/a2l_listener.py on lines 175..178
pya2l/a2l_listener.py on lines 191..194
pya2l/a2l_listener.py on lines 196..199
pya2l/a2l_listener.py on lines 206..209
pya2l/a2l_listener.py on lines 211..214
pya2l/a2l_listener.py on lines 216..219
pya2l/a2l_listener.py on lines 221..224
pya2l/a2l_listener.py on lines 226..230
pya2l/a2l_listener.py on lines 236..239
pya2l/a2l_listener.py on lines 241..244
pya2l/a2l_listener.py on lines 252..255
pya2l/a2l_listener.py on lines 291..294
pya2l/a2l_listener.py on lines 296..299
pya2l/a2l_listener.py on lines 315..318
pya2l/a2l_listener.py on lines 320..323
pya2l/a2l_listener.py on lines 331..334
pya2l/a2l_listener.py on lines 367..370
pya2l/a2l_listener.py on lines 613..616
pya2l/a2l_listener.py on lines 618..621
pya2l/a2l_listener.py on lines 642..645
pya2l/a2l_listener.py on lines 647..650
pya2l/a2l_listener.py on lines 663..666
pya2l/a2l_listener.py on lines 718..721
pya2l/a2l_listener.py on lines 729..732
pya2l/a2l_listener.py on lines 734..737
pya2l/a2l_listener.py on lines 767..770
pya2l/a2l_listener.py on lines 878..881
pya2l/a2l_listener.py on lines 1082..1085
pya2l/a2l_listener.py on lines 1094..1097
pya2l/a2l_listener.py on lines 1099..1102
pya2l/a2l_listener.py on lines 1108..1111
pya2l/a2l_listener.py on lines 1113..1116
pya2l/a2l_listener.py on lines 1118..1121
pya2l/a2l_listener.py on lines 1163..1166
pya2l/a2l_listener.py on lines 1168..1171
pya2l/a2l_listener.py on lines 1214..1217
pya2l/a2l_listener.py on lines 1232..1235
pya2l/a2l_listener.py on lines 1237..1240
pya2l/a2l_listener.py on lines 1242..1245
pya2l/a2l_listener.py on lines 1247..1250
pya2l/a2l_listener.py on lines 1252..1255
pya2l/a2l_listener.py on lines 1257..1260
pya2l/a2l_listener.py on lines 1262..1265
pya2l/a2l_listener.py on lines 1325..1328
pya2l/a2l_listener.py on lines 1330..1333
pya2l/a2l_listener.py on lines 1335..1338
pya2l/a2l_listener.py on lines 1346..1349
pya2l/a2l_listener.py on lines 1654..1657
pya2l/a2l_listener.py on lines 1659..1662
pya2l/a2l_listener.py on lines 1664..1667
pya2l/a2l_listener.py on lines 1669..1672
pya2l/a2l_listener.py on lines 1674..1677
pya2l/a2l_listener.py on lines 2008..2011
pya2l/a2l_listener.py on lines 2013..2016
pya2l/a2l_listener.py on lines 2029..2032
pya2l/a2l_listener.py on lines 2034..2037

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

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

    def exitVersion(self, ctx):
        versionIdentifier = ctx.versionIdentifier.value
        ctx.value = model.Version(versionIdentifier=versionIdentifier)
        self.db.session.add(ctx.value)
Severity: Major
Found in pya2l/a2l_listener.py and 62 other locations - About 1 hr to fix
pya2l/a2l_listener.py on lines 145..148
pya2l/a2l_listener.py on lines 150..153
pya2l/a2l_listener.py on lines 155..158
pya2l/a2l_listener.py on lines 160..163
pya2l/a2l_listener.py on lines 165..168
pya2l/a2l_listener.py on lines 170..173
pya2l/a2l_listener.py on lines 175..178
pya2l/a2l_listener.py on lines 191..194
pya2l/a2l_listener.py on lines 196..199
pya2l/a2l_listener.py on lines 206..209
pya2l/a2l_listener.py on lines 211..214
pya2l/a2l_listener.py on lines 216..219
pya2l/a2l_listener.py on lines 221..224
pya2l/a2l_listener.py on lines 226..230
pya2l/a2l_listener.py on lines 236..239
pya2l/a2l_listener.py on lines 241..244
pya2l/a2l_listener.py on lines 252..255
pya2l/a2l_listener.py on lines 291..294
pya2l/a2l_listener.py on lines 296..299
pya2l/a2l_listener.py on lines 310..313
pya2l/a2l_listener.py on lines 315..318
pya2l/a2l_listener.py on lines 320..323
pya2l/a2l_listener.py on lines 367..370
pya2l/a2l_listener.py on lines 613..616
pya2l/a2l_listener.py on lines 618..621
pya2l/a2l_listener.py on lines 642..645
pya2l/a2l_listener.py on lines 647..650
pya2l/a2l_listener.py on lines 663..666
pya2l/a2l_listener.py on lines 718..721
pya2l/a2l_listener.py on lines 729..732
pya2l/a2l_listener.py on lines 734..737
pya2l/a2l_listener.py on lines 767..770
pya2l/a2l_listener.py on lines 878..881
pya2l/a2l_listener.py on lines 1082..1085
pya2l/a2l_listener.py on lines 1094..1097
pya2l/a2l_listener.py on lines 1099..1102
pya2l/a2l_listener.py on lines 1108..1111
pya2l/a2l_listener.py on lines 1113..1116
pya2l/a2l_listener.py on lines 1118..1121
pya2l/a2l_listener.py on lines 1163..1166
pya2l/a2l_listener.py on lines 1168..1171
pya2l/a2l_listener.py on lines 1214..1217
pya2l/a2l_listener.py on lines 1232..1235
pya2l/a2l_listener.py on lines 1237..1240
pya2l/a2l_listener.py on lines 1242..1245
pya2l/a2l_listener.py on lines 1247..1250
pya2l/a2l_listener.py on lines 1252..1255
pya2l/a2l_listener.py on lines 1257..1260
pya2l/a2l_listener.py on lines 1262..1265
pya2l/a2l_listener.py on lines 1325..1328
pya2l/a2l_listener.py on lines 1330..1333
pya2l/a2l_listener.py on lines 1335..1338
pya2l/a2l_listener.py on lines 1346..1349
pya2l/a2l_listener.py on lines 1654..1657
pya2l/a2l_listener.py on lines 1659..1662
pya2l/a2l_listener.py on lines 1664..1667
pya2l/a2l_listener.py on lines 1669..1672
pya2l/a2l_listener.py on lines 1674..1677
pya2l/a2l_listener.py on lines 2008..2011
pya2l/a2l_listener.py on lines 2013..2016
pya2l/a2l_listener.py on lines 2029..2032
pya2l/a2l_listener.py on lines 2034..2037

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

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

    def exitFixNoAxisPtsZ(self, ctx):
        numberOfAxisPoints = ctx.numberOfAxisPoints.value
        ctx.value = model.FixNoAxisPtsZ(numberOfAxisPoints=numberOfAxisPoints)
        self.db.session.add(ctx.value)
Severity: Major
Found in pya2l/a2l_listener.py and 62 other locations - About 1 hr to fix
pya2l/a2l_listener.py on lines 145..148
pya2l/a2l_listener.py on lines 150..153
pya2l/a2l_listener.py on lines 155..158
pya2l/a2l_listener.py on lines 160..163
pya2l/a2l_listener.py on lines 165..168
pya2l/a2l_listener.py on lines 170..173
pya2l/a2l_listener.py on lines 175..178
pya2l/a2l_listener.py on lines 191..194
pya2l/a2l_listener.py on lines 196..199
pya2l/a2l_listener.py on lines 206..209
pya2l/a2l_listener.py on lines 211..214
pya2l/a2l_listener.py on lines 216..219
pya2l/a2l_listener.py on lines 221..224
pya2l/a2l_listener.py on lines 226..230
pya2l/a2l_listener.py on lines 236..239
pya2l/a2l_listener.py on lines 241..244
pya2l/a2l_listener.py on lines 252..255
pya2l/a2l_listener.py on lines 291..294
pya2l/a2l_listener.py on lines 296..299
pya2l/a2l_listener.py on lines 310..313
pya2l/a2l_listener.py on lines 315..318
pya2l/a2l_listener.py on lines 320..323
pya2l/a2l_listener.py on lines 331..334
pya2l/a2l_listener.py on lines 367..370
pya2l/a2l_listener.py on lines 613..616
pya2l/a2l_listener.py on lines 618..621
pya2l/a2l_listener.py on lines 642..645
pya2l/a2l_listener.py on lines 647..650
pya2l/a2l_listener.py on lines 663..666
pya2l/a2l_listener.py on lines 718..721
pya2l/a2l_listener.py on lines 729..732
pya2l/a2l_listener.py on lines 734..737
pya2l/a2l_listener.py on lines 767..770
pya2l/a2l_listener.py on lines 878..881
pya2l/a2l_listener.py on lines 1082..1085
pya2l/a2l_listener.py on lines 1094..1097
pya2l/a2l_listener.py on lines 1099..1102
pya2l/a2l_listener.py on lines 1108..1111
pya2l/a2l_listener.py on lines 1113..1116
pya2l/a2l_listener.py on lines 1118..1121
pya2l/a2l_listener.py on lines 1163..1166
pya2l/a2l_listener.py on lines 1168..1171
pya2l/a2l_listener.py on lines 1214..1217
pya2l/a2l_listener.py on lines 1232..1235
pya2l/a2l_listener.py on lines 1237..1240
pya2l/a2l_listener.py on lines 1242..1245
pya2l/a2l_listener.py on lines 1247..1250
pya2l/a2l_listener.py on lines 1252..1255
pya2l/a2l_listener.py on lines 1257..1260
pya2l/a2l_listener.py on lines 1262..1265
pya2l/a2l_listener.py on lines 1325..1328
pya2l/a2l_listener.py on lines 1330..1333
pya2l/a2l_listener.py on lines 1335..1338
pya2l/a2l_listener.py on lines 1346..1349
pya2l/a2l_listener.py on lines 1654..1657
pya2l/a2l_listener.py on lines 1659..1662
pya2l/a2l_listener.py on lines 1669..1672
pya2l/a2l_listener.py on lines 1674..1677
pya2l/a2l_listener.py on lines 2008..2011
pya2l/a2l_listener.py on lines 2013..2016
pya2l/a2l_listener.py on lines 2029..2032
pya2l/a2l_listener.py on lines 2034..2037

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

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