phodal/chapi

View on GitHub

Showing 388 of 390 total issues

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

        val code = """
            package chapi.ast.javaast;

            import hello.Expandable;

chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaBasicIdentListenerTest.kt on lines 87..97
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaBasicIdentListenerTest.kt on lines 123..133
chapi-ast-scala/src/test/kotlin/chapi/ast/scalaast/ScalaFullIdentListenerTest.kt on lines 86..96
chapi-ast-typescript/src/test/kotlin/chapi/ast/typescriptast/JsxTest.kt on lines 21..31
chapi-ast-typescript/src/test/kotlin/chapi/ast/typescriptast/TypeScriptFullIdentListenerTest.kt on lines 864..868
chapi-ast-typescript/src/test/kotlin/chapi/ast/typescriptast/TypeScriptFullIdentListenerTest.kt on lines 1245..1255
chapi-ast-typescript/src/test/kotlin/chapi/ast/typescriptast/TypeScriptRegressionTest.kt on lines 347..355

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

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

        assertEquals(codeFile.DataStructures[0].Functions[0].Parameters[1].DefaultValue, "35")
chapi-ast-csharp/src/test/kotlin/chapi/ast/csharpast/CSharpAstListenerTest.kt on lines 106..106
chapi-ast-csharp/src/test/kotlin/chapi/ast/csharpast/CSharpAstListenerTest.kt on lines 142..142
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 130..130
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 176..176
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 177..177
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 199..199
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 218..218
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 235..235
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 236..236
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 270..270
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 293..293
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 294..294
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 295..295
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 296..296
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 186..186
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 256..256
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 257..257
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 278..278
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 365..365
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 366..366
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 383..383
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 403..403
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 404..404
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 426..426
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 427..427
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 89..89
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 106..106
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 107..107
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 152..152
chapi-ast-typescript/src/test/kotlin/chapi/ast/typescriptast/TypeScriptFullIdentListenerTest.kt on lines 400..400

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

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

        assertEquals(codeFile.DataStructures[0].Functions[0].MultipleReturns[0].TypeType, "string")
chapi-ast-csharp/src/test/kotlin/chapi/ast/csharpast/CSharpAstListenerTest.kt on lines 106..106
chapi-ast-csharp/src/test/kotlin/chapi/ast/csharpast/CSharpAstListenerTest.kt on lines 142..142
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 176..176
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 177..177
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 199..199
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 218..218
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 235..235
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 236..236
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 270..270
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 293..293
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 294..294
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 295..295
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 296..296
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 186..186
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 256..256
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 257..257
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 278..278
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 365..365
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 366..366
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 383..383
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 403..403
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 404..404
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 426..426
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 427..427
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 89..89
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 106..106
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 107..107
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 108..108
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 152..152
chapi-ast-typescript/src/test/kotlin/chapi/ast/typescriptast/TypeScriptFullIdentListenerTest.kt on lines 400..400

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

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

        assertEquals(codeFile.DataStructures[0].Functions[0].Parameters[0].TypeValue, "name")
chapi-ast-csharp/src/test/kotlin/chapi/ast/csharpast/CSharpAstListenerTest.kt on lines 106..106
chapi-ast-csharp/src/test/kotlin/chapi/ast/csharpast/CSharpAstListenerTest.kt on lines 142..142
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 130..130
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 176..176
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 177..177
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 199..199
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 218..218
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 235..235
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 236..236
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 270..270
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 293..293
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 294..294
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 295..295
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 296..296
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 186..186
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 256..256
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 257..257
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 278..278
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 365..365
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 366..366
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 383..383
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 403..403
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 404..404
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 426..426
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 427..427
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 89..89
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 107..107
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 108..108
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 152..152
chapi-ast-typescript/src/test/kotlin/chapi/ast/typescriptast/TypeScriptFullIdentListenerTest.kt on lines 400..400

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

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

        assertEquals(codeFile.DataStructures[0].Functions[0].FunctionCalls[0].NodeName, "fmt")
chapi-ast-csharp/src/test/kotlin/chapi/ast/csharpast/CSharpAstListenerTest.kt on lines 106..106
chapi-ast-csharp/src/test/kotlin/chapi/ast/csharpast/CSharpAstListenerTest.kt on lines 142..142
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 130..130
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 176..176
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 177..177
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 218..218
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 235..235
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 236..236
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 270..270
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 293..293
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 294..294
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 295..295
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 296..296
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 186..186
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 256..256
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 257..257
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 278..278
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 365..365
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 366..366
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 383..383
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 403..403
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 404..404
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 426..426
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 427..427
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 89..89
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 106..106
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 107..107
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 108..108
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 152..152
chapi-ast-typescript/src/test/kotlin/chapi/ast/typescriptast/TypeScriptFullIdentListenerTest.kt on lines 400..400

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

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

        assertEquals(codeFile.DataStructures[0].Functions[0].LocalVariables[1].TypeValue, "b")
chapi-ast-csharp/src/test/kotlin/chapi/ast/csharpast/CSharpAstListenerTest.kt on lines 106..106
chapi-ast-csharp/src/test/kotlin/chapi/ast/csharpast/CSharpAstListenerTest.kt on lines 142..142
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 130..130
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 176..176
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 177..177
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 199..199
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 218..218
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 235..235
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 270..270
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 293..293
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 294..294
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 295..295
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 296..296
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 186..186
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 256..256
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 257..257
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 278..278
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 365..365
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 366..366
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 383..383
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 403..403
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 404..404
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 426..426
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 427..427
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 89..89
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 106..106
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 107..107
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 108..108
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 152..152
chapi-ast-typescript/src/test/kotlin/chapi/ast/typescriptast/TypeScriptFullIdentListenerTest.kt on lines 400..400

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

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

        val parameter = CodeProperty(
            TypeType = classParamContext.paramType().text,
            TypeValue = classParamContext.Id().text
        )
chapi-ast-csharp/src/main/kotlin/chapi/ast/csharpast/CSharpAstListener.kt on lines 182..185

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

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

        assertEquals(codeFile.DataStructures[0].Functions[0].LocalVariables[0].TypeType, "String[]")
chapi-ast-csharp/src/test/kotlin/chapi/ast/csharpast/CSharpAstListenerTest.kt on lines 106..106
chapi-ast-csharp/src/test/kotlin/chapi/ast/csharpast/CSharpAstListenerTest.kt on lines 142..142
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 130..130
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 176..176
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 177..177
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 199..199
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 218..218
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 235..235
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 236..236
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 270..270
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 293..293
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 294..294
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 295..295
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 296..296
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 186..186
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 256..256
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 257..257
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 278..278
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 365..365
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 383..383
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 403..403
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 404..404
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 426..426
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 427..427
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 89..89
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 106..106
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 107..107
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 108..108
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 152..152
chapi-ast-typescript/src/test/kotlin/chapi/ast/typescriptast/TypeScriptFullIdentListenerTest.kt on lines 400..400

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

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

        assertEquals(codeFile.DataStructures[0].Functions[0].MultipleReturns[0].TypeType, "void")
chapi-ast-csharp/src/test/kotlin/chapi/ast/csharpast/CSharpAstListenerTest.kt on lines 106..106
chapi-ast-csharp/src/test/kotlin/chapi/ast/csharpast/CSharpAstListenerTest.kt on lines 142..142
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 130..130
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 176..176
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 177..177
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 199..199
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 218..218
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 235..235
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 236..236
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 270..270
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 293..293
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 294..294
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 295..295
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 296..296
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 186..186
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 256..256
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 257..257
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 278..278
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 365..365
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 366..366
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 383..383
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 403..403
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 404..404
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 426..426
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 427..427
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 89..89
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 106..106
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 107..107
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 108..108
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 152..152

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

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

        val code = """
export function queryDFMSMetricBy(by: "module" | "package" | "class", params: MetricParams, ) {

}
"""
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaBasicIdentListenerTest.kt on lines 87..97
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaBasicIdentListenerTest.kt on lines 123..133
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaBasicIdentListenerTest.kt on lines 208..218
chapi-ast-scala/src/test/kotlin/chapi/ast/scalaast/ScalaFullIdentListenerTest.kt on lines 86..96
chapi-ast-typescript/src/test/kotlin/chapi/ast/typescriptast/JsxTest.kt on lines 21..31
chapi-ast-typescript/src/test/kotlin/chapi/ast/typescriptast/TypeScriptFullIdentListenerTest.kt on lines 1245..1255
chapi-ast-typescript/src/test/kotlin/chapi/ast/typescriptast/TypeScriptRegressionTest.kt on lines 347..355

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

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

        assertEquals(codeFile.DataStructures[0].Functions[0].FunctionCalls[0].NodeName, "fmt")
chapi-ast-csharp/src/test/kotlin/chapi/ast/csharpast/CSharpAstListenerTest.kt on lines 106..106
chapi-ast-csharp/src/test/kotlin/chapi/ast/csharpast/CSharpAstListenerTest.kt on lines 142..142
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 130..130
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 176..176
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 177..177
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 199..199
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 235..235
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 236..236
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 270..270
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 293..293
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 294..294
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 295..295
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 296..296
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 186..186
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 256..256
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 257..257
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 278..278
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 365..365
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 366..366
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 383..383
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 403..403
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 404..404
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 426..426
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 427..427
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 89..89
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 106..106
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 107..107
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 108..108
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 152..152
chapi-ast-typescript/src/test/kotlin/chapi/ast/typescriptast/TypeScriptFullIdentListenerTest.kt on lines 400..400

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

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

        assertEquals(codeFile.DataStructures[0].Functions[0].LocalVariables[3].TypeValue, "eof")
chapi-ast-csharp/src/test/kotlin/chapi/ast/csharpast/CSharpAstListenerTest.kt on lines 106..106
chapi-ast-csharp/src/test/kotlin/chapi/ast/csharpast/CSharpAstListenerTest.kt on lines 142..142
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 130..130
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 176..176
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 177..177
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 199..199
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 218..218
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 235..235
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 236..236
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 293..293
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 294..294
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 295..295
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 296..296
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 186..186
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 256..256
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 257..257
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 278..278
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 365..365
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 366..366
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 383..383
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 403..403
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 404..404
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 426..426
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 427..427
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 89..89
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 106..106
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 107..107
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 108..108
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 152..152
chapi-ast-typescript/src/test/kotlin/chapi/ast/typescriptast/TypeScriptFullIdentListenerTest.kt on lines 400..400

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

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

        if (ctx.formalParameterList() != null) {
            codeFunction.Parameters += buildParameters(ctx.formalParameterList())
        }
chapi-ast-typescript/src/main/kotlin/chapi/ast/typescriptast/TypeScriptFullIdentListener.kt on lines 503..505
chapi-ast-typescript/src/main/kotlin/chapi/ast/typescriptast/TypeScriptFullIdentListener.kt on lines 601..603

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

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

                    val parameter = CodeProperty(
                        TypeType = argDeclCtx.type_().text,
                        TypeValue = argDeclCtx.identifier().text
                    )
chapi-ast-scala/src/main/kotlin/chapi/ast/scalaast/ScalaAstBaseListener.kt on lines 17..20

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

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

            if (getOS() == OS.WINDOWS) pathname = pathname.replace("\\", "/")
chapi-ast-typescript/src/main/kotlin/chapi/ast/typescriptast/EcmaImportHelper.kt on lines 106..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 61.

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

        assertEquals("template-string", defaultStruct.Functions[0].FunctionCalls[0].Parameters[0].TypeValue)
chapi-ast-typescript/src/test/kotlin/chapi/ast/typescriptast/TypeScriptFullIdentListenerTest.kt on lines 807..807

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

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

        assertEquals(codeFile.DataStructures[0].Functions[0].Parameters[1].TypeValue, "age")
chapi-ast-csharp/src/test/kotlin/chapi/ast/csharpast/CSharpAstListenerTest.kt on lines 106..106
chapi-ast-csharp/src/test/kotlin/chapi/ast/csharpast/CSharpAstListenerTest.kt on lines 142..142
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 130..130
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 176..176
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 177..177
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 199..199
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 218..218
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 235..235
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 236..236
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 270..270
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 293..293
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 294..294
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 295..295
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 296..296
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 186..186
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 256..256
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 257..257
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 278..278
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 365..365
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 366..366
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 383..383
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 403..403
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 404..404
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 426..426
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 427..427
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 89..89
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 106..106
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 108..108
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 152..152
chapi-ast-typescript/src/test/kotlin/chapi/ast/typescriptast/TypeScriptFullIdentListenerTest.kt on lines 400..400

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

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

        assertEquals(codeFile.DataStructures[0].Annotations[0].KeyValues[0].Key, "key")
chapi-ast-csharp/src/test/kotlin/chapi/ast/csharpast/CSharpAstListenerTest.kt on lines 106..106
chapi-ast-csharp/src/test/kotlin/chapi/ast/csharpast/CSharpAstListenerTest.kt on lines 142..142
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 130..130
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 176..176
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 177..177
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 199..199
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 218..218
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 235..235
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 236..236
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 270..270
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 293..293
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 294..294
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 295..295
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 296..296
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 186..186
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 256..256
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 257..257
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 278..278
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 365..365
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 366..366
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 383..383
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 403..403
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 404..404
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 426..426
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 427..427
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 89..89
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 106..106
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 107..107
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 108..108
chapi-ast-typescript/src/test/kotlin/chapi/ast/typescriptast/TypeScriptFullIdentListenerTest.kt on lines 400..400

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

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

        assertEquals(codeFile.DataStructures[0].Annotations[0].KeyValues[0].Value, "AccessLevel.PROTECTED")
chapi-ast-csharp/src/test/kotlin/chapi/ast/csharpast/CSharpAstListenerTest.kt on lines 106..106
chapi-ast-csharp/src/test/kotlin/chapi/ast/csharpast/CSharpAstListenerTest.kt on lines 142..142
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 130..130
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 176..176
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 177..177
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 199..199
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 218..218
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 235..235
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 236..236
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 270..270
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 293..293
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 294..294
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 295..295
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 296..296
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 186..186
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 256..256
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 278..278
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 365..365
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 366..366
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 383..383
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 403..403
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 404..404
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 426..426
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 427..427
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 89..89
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 106..106
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 107..107
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 108..108
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 152..152
chapi-ast-typescript/src/test/kotlin/chapi/ast/typescriptast/TypeScriptFullIdentListenerTest.kt on lines 400..400

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

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

        assertEquals(codeFile.DataStructures[0].Fields[0].Annotations[1].Name, "Method")
chapi-ast-csharp/src/test/kotlin/chapi/ast/csharpast/CSharpAstListenerTest.kt on lines 106..106
chapi-ast-csharp/src/test/kotlin/chapi/ast/csharpast/CSharpAstListenerTest.kt on lines 142..142
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 130..130
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 176..176
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 177..177
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 199..199
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 218..218
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 235..235
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 236..236
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 270..270
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 293..293
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 294..294
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 295..295
chapi-ast-go/src/test/kotlin/chapi/ast/goast/GoFullIdentListenerTest.kt on lines 296..296
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 186..186
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 256..256
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 257..257
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 278..278
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 365..365
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 366..366
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 383..383
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 403..403
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 404..404
chapi-ast-java/src/test/kotlin/chapi/ast/javaast/JavaFullIdentListenerTest.kt on lines 426..426
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 89..89
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 106..106
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 107..107
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 108..108
chapi-ast-python/src/test/kotlin/chapi/ast/pythonast/PythonFullIdentListenerTest.kt on lines 152..152
chapi-ast-typescript/src/test/kotlin/chapi/ast/typescriptast/TypeScriptFullIdentListenerTest.kt on lines 400..400

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

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