XYOracleNetwork/sdk-ble-android

View on GitHub
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt

Summary

Maintainability
D
2 days
Test Coverage

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

    private fun extraDevice(intent: Intent?) {
        log.info("extraDevice $intent")

        for ((_, listener) in listeners) {
            listener.extraDevice(intent)
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 95..101
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 103..109
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 111..117
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 119..125
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 127..133
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 135..141
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 143..149
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 151..157
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 159..165
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 167..173
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 175..181
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 191..197
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 199..205
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 207..213
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 215..221

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

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

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

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

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

Refactorings

Further Reading

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

    private fun extraName(intent: Intent?) {
        log.info("extraName $intent")

        for ((_, listener) in listeners) {
            listener.extraName(intent)
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 95..101
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 103..109
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 111..117
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 119..125
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 127..133
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 135..141
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 143..149
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 151..157
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 159..165
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 167..173
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 175..181
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 183..189
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 199..205
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 207..213
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 215..221

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

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

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

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

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

Refactorings

Further Reading

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

    private fun extraClass(intent: Intent?) {
        log.info("extraClass $intent")

        for ((_, listener) in listeners) {
            listener.extraClass(intent)
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 95..101
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 103..109
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 111..117
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 119..125
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 127..133
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 135..141
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 143..149
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 151..157
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 159..165
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 167..173
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 183..189
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 191..197
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 199..205
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 207..213
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 215..221

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

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

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

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

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

Refactorings

Further Reading

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

    private fun extraRssi(intent: Intent?) {
        log.info("extraRssi $intent")

        for ((_, listener) in listeners) {
            listener.extraRssi(intent)
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 95..101
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 103..109
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 111..117
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 119..125
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 127..133
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 135..141
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 143..149
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 151..157
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 159..165
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 167..173
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 175..181
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 183..189
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 191..197
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 207..213
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 215..221

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

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

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

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

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

Refactorings

Further Reading

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

    private fun actionAclConnected(intent: Intent?) {
        log.info("actionAclConnected $intent")

        for ((_, listener) in listeners) {
            listener.actionAclConnected(intent)
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 103..109
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 111..117
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 119..125
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 127..133
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 135..141
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 143..149
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 151..157
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 159..165
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 167..173
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 175..181
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 183..189
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 191..197
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 199..205
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 207..213
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 215..221

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

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

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

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

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

Refactorings

Further Reading

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

    private fun actionPairingRequest(intent: Intent?) {
        log.info("actionPairingRequest $intent")

        for ((_, listener) in listeners) {
            listener.actionPairingRequest(intent)
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 95..101
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 103..109
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 111..117
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 119..125
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 127..133
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 135..141
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 143..149
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 159..165
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 167..173
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 175..181
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 183..189
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 191..197
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 199..205
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 207..213
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 215..221

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

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

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

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

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

Refactorings

Further Reading

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

    private fun actionAclDisconnected(intent: Intent?) {
        log.info("actionAclDisconnected $intent")

        for ((_, listener) in listeners) {
            listener.actionAclDisconnected(intent)
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 95..101
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 111..117
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 119..125
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 127..133
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 135..141
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 143..149
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 151..157
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 159..165
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 167..173
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 175..181
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 183..189
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 191..197
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 199..205
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 207..213
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 215..221

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

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

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

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

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

Refactorings

Further Reading

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

    private fun actionFound(intent: Intent?) {
        log.info("actionFound $intent")

        for ((_, listener) in listeners) {
            listener.actionFound(intent)
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 95..101
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 103..109
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 111..117
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 119..125
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 127..133
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 143..149
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 151..157
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 159..165
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 167..173
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 175..181
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 183..189
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 191..197
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 199..205
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 207..213
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 215..221

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

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

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

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

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

Refactorings

Further Reading

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

    private fun actionBondStateChanged(intent: Intent?) {
        log.info("actionBondStateChanged $intent")

        for ((_, listener) in listeners) {
            listener.actionBondStateChanged(intent)
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 95..101
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 103..109
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 111..117
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 127..133
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 135..141
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 143..149
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 151..157
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 159..165
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 167..173
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 175..181
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 183..189
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 191..197
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 199..205
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 207..213
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 215..221

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

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

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

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

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

Refactorings

Further Reading

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

    private fun actionUuid(intent: Intent?) {
        log.info("actionUuid $intent")

        for ((_, listener) in listeners) {
            listener.actionUuid(intent)
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 95..101
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 103..109
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 111..117
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 119..125
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 127..133
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 135..141
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 143..149
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 151..157
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 167..173
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 175..181
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 183..189
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 191..197
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 199..205
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 207..213
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 215..221

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

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

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

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

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

Refactorings

Further Reading

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

    private fun extraBondState(intent: Intent?) {
        log.info("extraBondState $intent")

        for ((_, listener) in listeners) {
            listener.extraBondState(intent)
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 95..101
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 103..109
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 111..117
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 119..125
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 127..133
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 135..141
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 143..149
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 151..157
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 159..165
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 175..181
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 183..189
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 191..197
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 199..205
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 207..213
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 215..221

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

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

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

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

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

Refactorings

Further Reading

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

    private fun actionAclDisconnectRequested(intent: Intent?) {
        log.info("actionAclDisconnectRequested $intent")

        for ((_, listener) in listeners) {
            listener.actionAclDisconnectRequested(intent)
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 95..101
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 103..109
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 119..125
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 127..133
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 135..141
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 143..149
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 151..157
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 159..165
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 167..173
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 175..181
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 183..189
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 191..197
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 199..205
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 207..213
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 215..221

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

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

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

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

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

Refactorings

Further Reading

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

    private fun actionNameChanged(intent: Intent?) {
        log.info("actionNameChanged $intent")

        for ((_, listener) in listeners) {
            listener.actionNameChanged(intent)
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 95..101
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 103..109
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 111..117
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 119..125
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 127..133
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 135..141
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 151..157
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 159..165
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 167..173
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 175..181
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 183..189
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 191..197
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 199..205
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 207..213
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 215..221

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

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

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

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

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

Refactorings

Further Reading

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

    private fun extraPairingKey(intent: Intent?) {
        log.info("extraPairingKey $intent")

        for ((_, listener) in listeners) {
            listener.extraPairingKey(intent)
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 95..101
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 103..109
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 111..117
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 119..125
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 127..133
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 135..141
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 143..149
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 151..157
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 159..165
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 167..173
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 175..181
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 183..189
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 191..197
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 199..205
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 215..221

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

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

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

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

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

Refactorings

Further Reading

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

    private fun actionClassChanged(intent: Intent?) {
        log.info("actionClassChanged $intent")

        for ((_, listener) in listeners) {
            listener.actionClassChanged(intent)
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 95..101
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 103..109
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 111..117
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 119..125
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 135..141
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 143..149
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 151..157
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 159..165
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 167..173
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 175..181
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 183..189
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 191..197
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 199..205
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 207..213
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 215..221

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

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

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

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

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

Refactorings

Further Reading

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

    private fun extraPairingVagrant(intent: Intent?) {
        log.info("extraPairingVagrant $intent")

        for ((_, listener) in listeners) {
            listener.extraPairingVagrant(intent)
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 95..101
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 103..109
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 111..117
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 119..125
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 127..133
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 135..141
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 143..149
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 151..157
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 159..165
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 167..173
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 175..181
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 183..189
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 191..197
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 199..205
ble-android-library/src/main/kotlin/network/xyo/ble/generic/bluetooth/BluetoothIntentReceiver.kt on lines 207..213

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

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