ezralazuardy/orb

View on GitHub
orb/src/main/java/com/ezralazuardy/orb/Orb.kt

Summary

Maintainability
A
0 mins
Test Coverage

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

    /**
     * allowLowPanOnly() is a helper function to enable the low pan only network type filtering in Orb.
     * Calling this function will make Orb to detect low pan network type only.
     *
     * This function will only work on API Level 23+ (Marshmallow), otherwise Orb will not detecting
Severity: Major
Found in orb/src/main/java/com/ezralazuardy/orb/Orb.kt and 1 other location - About 2 hrs to fix
orb/src/main/java/com/ezralazuardy/orb/Orb.kt on lines 316..336

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

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

    /**
     * allowWifiAwareOnly() is a helper function to enable the wifi aware only network type filtering in Orb.
     * Calling this function will make Orb to detect wifi aware network type only.
     *
     * This function will only work on API Level 23+ (Marshmallow), otherwise Orb will not detecting
Severity: Major
Found in orb/src/main/java/com/ezralazuardy/orb/Orb.kt and 1 other location - About 2 hrs to fix
orb/src/main/java/com/ezralazuardy/orb/Orb.kt on lines 276..296

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

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

    /**
     * allowBluetoothOnly() is a helper function to enable the bluetooth only network type filtering in Orb.
     * Calling this function will make Orb to detect bluetooth network type only.
     */
    fun allowBluetoothOnly(): Orb {
Severity: Major
Found in orb/src/main/java/com/ezralazuardy/orb/Orb.kt and 3 other locations - About 2 hrs to fix
orb/src/main/java/com/ezralazuardy/orb/Orb.kt on lines 240..256
orb/src/main/java/com/ezralazuardy/orb/Orb.kt on lines 258..274
orb/src/main/java/com/ezralazuardy/orb/Orb.kt on lines 298..314

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

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

    /**
     * allowWifiOnly() is a helper function to enable the wifi only network type filtering in Orb.
     * Calling this function will make Orb to detect wifi network type only.
     */
    fun allowWifiOnly(): Orb {
Severity: Major
Found in orb/src/main/java/com/ezralazuardy/orb/Orb.kt and 3 other locations - About 2 hrs to fix
orb/src/main/java/com/ezralazuardy/orb/Orb.kt on lines 222..238
orb/src/main/java/com/ezralazuardy/orb/Orb.kt on lines 240..256
orb/src/main/java/com/ezralazuardy/orb/Orb.kt on lines 258..274

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

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

    /**
     * allowCelullarOnly() is a helper function to enable the cellular only network type filtering in Orb.
     * Calling this function will make Orb to detect cellular network type only.
     */
    fun allowCelullarOnly(): Orb {
Severity: Major
Found in orb/src/main/java/com/ezralazuardy/orb/Orb.kt and 3 other locations - About 2 hrs to fix
orb/src/main/java/com/ezralazuardy/orb/Orb.kt on lines 222..238
orb/src/main/java/com/ezralazuardy/orb/Orb.kt on lines 258..274
orb/src/main/java/com/ezralazuardy/orb/Orb.kt on lines 298..314

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

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

    /**
     * allowEthernetOnly() is a helper function to enable the ethernet only network type filtering in Orb.
     * Calling this function will make Orb to detect ethernet network type only.
     */
    fun allowEthernetOnly(): Orb {
Severity: Major
Found in orb/src/main/java/com/ezralazuardy/orb/Orb.kt and 3 other locations - About 2 hrs to fix
orb/src/main/java/com/ezralazuardy/orb/Orb.kt on lines 222..238
orb/src/main/java/com/ezralazuardy/orb/Orb.kt on lines 240..256
orb/src/main/java/com/ezralazuardy/orb/Orb.kt on lines 298..314

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

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

    /**
     * allowWifiAware() is a helper function to toggle the wifi aware network type filtering in Orb.
     * Disallowing wifi aware will make Orb to not detecting wifi aware network type.
     *
     * This function will only work on API Level 23+ (Marshmallow), otherwise Orb will not detecting
Severity: Major
Found in orb/src/main/java/com/ezralazuardy/orb/Orb.kt and 1 other location - About 1 hr to fix
orb/src/main/java/com/ezralazuardy/orb/Orb.kt on lines 162..177

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

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

    /**
     * allowLowPan() is a helper function to toggle the low pan network type filtering in Orb.
     * Disallowing low pan will make Orb to not detecting low pan network type.
     *
     * This function will only work on API Level 23+ (Marshmallow), otherwise Orb will not detecting
Severity: Major
Found in orb/src/main/java/com/ezralazuardy/orb/Orb.kt and 1 other location - About 1 hr to fix
orb/src/main/java/com/ezralazuardy/orb/Orb.kt on lines 205..220

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

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

    /**
     * allowCellular() is a helper function to toggle the cellular network type filtering in Orb.
     * Disallowing cellular will make Orb to not detecting cellular network type.
     *
     * Default parameter is boolean true.
Severity: Major
Found in orb/src/main/java/com/ezralazuardy/orb/Orb.kt and 4 other locations - About 40 mins to fix
orb/src/main/java/com/ezralazuardy/orb/Orb.kt on lines 123..134
orb/src/main/java/com/ezralazuardy/orb/Orb.kt on lines 149..160
orb/src/main/java/com/ezralazuardy/orb/Orb.kt on lines 179..190
orb/src/main/java/com/ezralazuardy/orb/Orb.kt on lines 192..203

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

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

    /**
     * allowVPN() is a helper function to toggle the VPN network type filtering in Orb.
     * Disallowing VPN will make Orb to not detecting VPN network type.
     *
     * Default parameter is boolean true.
Severity: Major
Found in orb/src/main/java/com/ezralazuardy/orb/Orb.kt and 4 other locations - About 40 mins to fix
orb/src/main/java/com/ezralazuardy/orb/Orb.kt on lines 123..134
orb/src/main/java/com/ezralazuardy/orb/Orb.kt on lines 136..147
orb/src/main/java/com/ezralazuardy/orb/Orb.kt on lines 149..160
orb/src/main/java/com/ezralazuardy/orb/Orb.kt on lines 192..203

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

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

    /**
     * allowEthernet() is a helper function to toggle the ethernet network type filtering in Orb.
     * Disallowing ethernet will make Orb to not detecting ethernet network type.
     *
     * Default parameter is boolean true.
Severity: Major
Found in orb/src/main/java/com/ezralazuardy/orb/Orb.kt and 4 other locations - About 40 mins to fix
orb/src/main/java/com/ezralazuardy/orb/Orb.kt on lines 123..134
orb/src/main/java/com/ezralazuardy/orb/Orb.kt on lines 136..147
orb/src/main/java/com/ezralazuardy/orb/Orb.kt on lines 179..190
orb/src/main/java/com/ezralazuardy/orb/Orb.kt on lines 192..203

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

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

    /**
     * allowBluetooth() is a helper function to toggle the bluetooth network type filtering in Orb.
     * Disallowing bluetooth will make Orb to not detecting bluetooth network type.
     *
     * Default parameter is boolean true.
Severity: Major
Found in orb/src/main/java/com/ezralazuardy/orb/Orb.kt and 4 other locations - About 40 mins to fix
orb/src/main/java/com/ezralazuardy/orb/Orb.kt on lines 136..147
orb/src/main/java/com/ezralazuardy/orb/Orb.kt on lines 149..160
orb/src/main/java/com/ezralazuardy/orb/Orb.kt on lines 179..190
orb/src/main/java/com/ezralazuardy/orb/Orb.kt on lines 192..203

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

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

    /**
     * allowWifi() is a helper function to toggle the wifi network type filtering in Orb.
     * Disallowing wifi will make Orb to not detecting wifi network type.
     *
     * Default parameter is boolean true.
Severity: Major
Found in orb/src/main/java/com/ezralazuardy/orb/Orb.kt and 4 other locations - About 40 mins to fix
orb/src/main/java/com/ezralazuardy/orb/Orb.kt on lines 123..134
orb/src/main/java/com/ezralazuardy/orb/Orb.kt on lines 136..147
orb/src/main/java/com/ezralazuardy/orb/Orb.kt on lines 149..160
orb/src/main/java/com/ezralazuardy/orb/Orb.kt on lines 179..190

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

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