deeplearning4j/deeplearning4j

View on GitHub
codegen/op-codegen/src/main/kotlin/org/nd4j/codegen/dsl/OpBuilder.kt

Summary

Maintainability
F
6 days
Test Coverage

File OpBuilder.kt has 292 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 *  ******************************************************************************
 *  *
 *  *
 *  * This program and the accompanying materials are made available under the
Severity: Minor
Found in codegen/op-codegen/src/main/kotlin/org/nd4j/codegen/dsl/OpBuilder.kt - About 3 hrs to fix

    Class ConstraintBuilder has 25 methods (exceeds 20 allowed). Consider refactoring.
    Open

    class ConstraintBuilder {
        fun broadcastableShapes(vararg inputs: Input) = BroadcastableShapesExpression(inputs.toList())
        fun sameShape(vararg inputs: Input) = SameShapeExpression(inputs.toList())
        fun sameType(vararg inputs: Input) = SameTypeExpression(inputs.toList())
    
    
    Severity: Minor
    Found in codegen/op-codegen/src/main/kotlin/org/nd4j/codegen/dsl/OpBuilder.kt - About 2 hrs to fix

      Method useMixin has 29 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      fun Op.useMixin(mixin: Mixin,
                      keepArgs: Boolean = true,
                      keepInputs: Boolean = true,
                      keepOutputs: Boolean = true,
                      keepConstraints: Boolean = true,

        Method useMixin has 29 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        fun Mixin.useMixin(mixin: Mixin,
                           keepArgs: Boolean = true,
                           keepInputs: Boolean = true,
                           keepOutputs: Boolean = true,
                           keepConstraints: Boolean = true,

          Method Op has 9 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          fun NamespaceOps.Op(name: String,
                              extends: Mixin,
                              keepArgs: Boolean = true,
                              keepInputs: Boolean = true,
                              keepOutputs: Boolean = true,

            Method useMixin has 8 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            fun Mixin.useMixin(mixin: Mixin,
                               keepArgs: Boolean = true,
                               keepInputs: Boolean = true,
                               keepOutputs: Boolean = true,
                               keepConstraints: Boolean = true,

              Method useMixin has 8 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              fun Op.useMixin(mixin: Mixin,
                              keepArgs: Boolean = true,
                              keepInputs: Boolean = true,
                              keepOutputs: Boolean = true,
                              keepConstraints: Boolean = true,

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

                fun Op.useMixin(mixin: Mixin,
                                keepArgs: Boolean = true,
                                keepInputs: Boolean = true,
                                keepOutputs: Boolean = true,
                                keepConstraints: Boolean = true,
                codegen/op-codegen/src/main/kotlin/org/nd4j/codegen/dsl/OpBuilder.kt on lines 335..370

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

                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

                fun Mixin.useMixin(mixin: Mixin,
                                   keepArgs: Boolean = true,
                                   keepInputs: Boolean = true,
                                   keepOutputs: Boolean = true,
                                   keepConstraints: Boolean = true,
                codegen/op-codegen/src/main/kotlin/org/nd4j/codegen/dsl/OpBuilder.kt on lines 297..333

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

                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

                fun Config.Arg(dataType: DataType, name: String, block: (Arg.() -> Unit)? = null): Arg {
                    val input = Arg(name, dataType)
                    if (block != null) input.block()
                
                    this.addArgument(input)
                codegen/op-codegen/src/main/kotlin/org/nd4j/codegen/dsl/OpBuilder.kt on lines 103..112

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

                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

                fun OpLike.Arg(dataType: DataType, name: String, block: (Arg.() -> Unit)? = null): Arg {
                    val input = Arg(name, dataType)
                    if (block != null) input.block()
                
                    this.addArgument(input)
                codegen/op-codegen/src/main/kotlin/org/nd4j/codegen/dsl/OpBuilder.kt on lines 256..266

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

                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

                fun Config.Doc(language: Language, scope: DocScope, block: DocSection.() -> String): DocSection {
                    val doc = DocSection().apply {
                        this.language = language
                        this.scope = scope
                        text = this.block()
                codegen/op-codegen/src/main/kotlin/org/nd4j/codegen/dsl/OpBuilder.kt on lines 126..134

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

                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

                fun OpLike.Doc(language: Language, scope: DocScope, block: DocSection.() -> String): DocSection {
                    val doc = DocSection().apply {
                        this.language = language
                        this.scope = scope
                        text = this.block()
                codegen/op-codegen/src/main/kotlin/org/nd4j/codegen/dsl/OpBuilder.kt on lines 282..290

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

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

                fun OpLike.Constraint(desc: String, block: ConstraintBuilder.() -> Expression): Constraint {
                    val check = ConstraintBuilder().block()
                    val constraint = Constraint(desc, check)
                    this.addConstraint(constraint)
                    return constraint
                codegen/op-codegen/src/main/kotlin/org/nd4j/codegen/dsl/OpBuilder.kt on lines 189..194
                codegen/op-codegen/src/main/kotlin/org/nd4j/codegen/dsl/OpBuilder.kt on lines 268..273
                codegen/op-codegen/src/main/kotlin/org/nd4j/codegen/dsl/OpBuilder.kt on lines 275..280

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

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

                fun OpLike.BackendConstraint(desc: String, block: ConstraintBuilder.() -> Expression): Constraint {
                    val check = ConstraintBuilder().block()
                    val constraint = BackendConstraint(desc, check)
                    this.addConstraint(constraint)
                    return constraint
                codegen/op-codegen/src/main/kotlin/org/nd4j/codegen/dsl/OpBuilder.kt on lines 182..187
                codegen/op-codegen/src/main/kotlin/org/nd4j/codegen/dsl/OpBuilder.kt on lines 268..273
                codegen/op-codegen/src/main/kotlin/org/nd4j/codegen/dsl/OpBuilder.kt on lines 275..280

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

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

                fun Config.Constraint(desc: String, block: ConstraintBuilder.() -> Expression): Constraint {
                    val check = ConstraintBuilder().block()
                    val constraint = Constraint(desc, check)
                    this.addConstraint(constraint)
                    return constraint
                codegen/op-codegen/src/main/kotlin/org/nd4j/codegen/dsl/OpBuilder.kt on lines 182..187
                codegen/op-codegen/src/main/kotlin/org/nd4j/codegen/dsl/OpBuilder.kt on lines 189..194
                codegen/op-codegen/src/main/kotlin/org/nd4j/codegen/dsl/OpBuilder.kt on lines 275..280

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

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

                fun Config.BackendConstraint(desc: String, block: ConstraintBuilder.() -> Expression): Constraint {
                    val check = ConstraintBuilder().block()
                    val constraint = BackendConstraint(desc, check)
                    this.addConstraint(constraint)
                    return constraint
                codegen/op-codegen/src/main/kotlin/org/nd4j/codegen/dsl/OpBuilder.kt on lines 182..187
                codegen/op-codegen/src/main/kotlin/org/nd4j/codegen/dsl/OpBuilder.kt on lines 189..194
                codegen/op-codegen/src/main/kotlin/org/nd4j/codegen/dsl/OpBuilder.kt on lines 268..273

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

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

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

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

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

                Refactorings

                Further Reading

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

                    if (withOutput) {
                        val withOutputParams = mutableListOf<Parameter>().also {
                            it.addAll(this.outputs())
                            it.addAll(allParameters)
                        }
                codegen/op-codegen/src/main/kotlin/org/nd4j/codegen/dsl/OpBuilder.kt on lines 155..161

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

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

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

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

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

                Refactorings

                Further Reading

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

                        if (withOutput) {
                            val withOutputParams = mutableListOf<Parameter>().also {
                                it.addAll(this.outputs())
                                it.addAll(allParameters)
                            }
                codegen/op-codegen/src/main/kotlin/org/nd4j/codegen/dsl/OpBuilder.kt on lines 140..146

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

                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

                    fun all(expr: BooleanExpression, vararg exprs: BooleanExpression) = exprs.fold(expr, { acc, cur -> acc and cur })
                codegen/op-codegen/src/main/kotlin/org/nd4j/codegen/dsl/OpBuilder.kt on lines 205..205

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

                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

                    fun some(expr: BooleanExpression, vararg exprs: BooleanExpression) = exprs.fold(expr, { acc, cur -> acc or cur })
                codegen/op-codegen/src/main/kotlin/org/nd4j/codegen/dsl/OpBuilder.kt on lines 206..206

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

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

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

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

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

                Refactorings

                Further Reading

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

                    infix fun <T : Number> Reference.gt(other: T) = this gt NumberReference(other)
                codegen/op-codegen/src/main/kotlin/org/nd4j/codegen/dsl/OpBuilder.kt on lines 219..219
                codegen/op-codegen/src/main/kotlin/org/nd4j/codegen/dsl/OpBuilder.kt on lines 226..226
                codegen/op-codegen/src/main/kotlin/org/nd4j/codegen/dsl/OpBuilder.kt on lines 229..229
                codegen/op-codegen/src/main/kotlin/org/nd4j/codegen/dsl/OpBuilder.kt on lines 232..232

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

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

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

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

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

                Refactorings

                Further Reading

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

                    infix fun <T : Number> Reference.lte(other: T) = this lte NumberReference(other)
                codegen/op-codegen/src/main/kotlin/org/nd4j/codegen/dsl/OpBuilder.kt on lines 219..219
                codegen/op-codegen/src/main/kotlin/org/nd4j/codegen/dsl/OpBuilder.kt on lines 223..223
                codegen/op-codegen/src/main/kotlin/org/nd4j/codegen/dsl/OpBuilder.kt on lines 226..226
                codegen/op-codegen/src/main/kotlin/org/nd4j/codegen/dsl/OpBuilder.kt on lines 229..229

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

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

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

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

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

                Refactorings

                Further Reading

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

                    infix fun <T : Number> Reference.gte(other: T) = this gte NumberReference(other)
                codegen/op-codegen/src/main/kotlin/org/nd4j/codegen/dsl/OpBuilder.kt on lines 219..219
                codegen/op-codegen/src/main/kotlin/org/nd4j/codegen/dsl/OpBuilder.kt on lines 223..223
                codegen/op-codegen/src/main/kotlin/org/nd4j/codegen/dsl/OpBuilder.kt on lines 226..226
                codegen/op-codegen/src/main/kotlin/org/nd4j/codegen/dsl/OpBuilder.kt on lines 232..232

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

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

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

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

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

                Refactorings

                Further Reading

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

                    infix fun <T : Number> Reference.neq(other: T) = this neq NumberReference(other)
                codegen/op-codegen/src/main/kotlin/org/nd4j/codegen/dsl/OpBuilder.kt on lines 223..223
                codegen/op-codegen/src/main/kotlin/org/nd4j/codegen/dsl/OpBuilder.kt on lines 226..226
                codegen/op-codegen/src/main/kotlin/org/nd4j/codegen/dsl/OpBuilder.kt on lines 229..229
                codegen/op-codegen/src/main/kotlin/org/nd4j/codegen/dsl/OpBuilder.kt on lines 232..232

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

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

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

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

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

                Refactorings

                Further Reading

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

                    infix fun <T : Number> Reference.lt(other: T) = this lt NumberReference(other)
                codegen/op-codegen/src/main/kotlin/org/nd4j/codegen/dsl/OpBuilder.kt on lines 219..219
                codegen/op-codegen/src/main/kotlin/org/nd4j/codegen/dsl/OpBuilder.kt on lines 223..223
                codegen/op-codegen/src/main/kotlin/org/nd4j/codegen/dsl/OpBuilder.kt on lines 229..229
                codegen/op-codegen/src/main/kotlin/org/nd4j/codegen/dsl/OpBuilder.kt on lines 232..232

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

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

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

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

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

                Refactorings

                Further Reading

                There are no issues that match your filters.

                Category
                Status