davidmigloz/go-bees

View on GitHub

Showing 387 of 387 total issues

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

        targetBlur = new Mat(4, 4, CvType.CV_8U) {
            {
                put(0, 0, 100, 110, 110, 100);
                put(1, 0, 110, 120, 120, 110);
                put(2, 0, 110, 120, 120, 110);
app/src/testMock/java/com/davidmiguel/gobees/monitoring/algorithm/processors/ProcessorsTest.java on lines 59..66

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

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

        source = new Mat(4, 4, CvType.CV_8U) {
            {
                put(0, 0, 0, 0, 0, 0);
                put(1, 0, 0, 255, 255, 0);
                put(2, 0, 0, 255, 255, 0);
app/src/testMock/java/com/davidmiguel/gobees/monitoring/algorithm/processors/ProcessorsTest.java on lines 71..78

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

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

    private static Matcher<View> childAtPosition(
            final Matcher<View> parentMatcher, final int position) {

        return new TypeSafeMatcher<View>() {
            @Override
app/src/androidTest/java/com/davidmiguel/gobees/about/AboutTest.java on lines 60..77
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/AddApiaryTest.java on lines 62..79
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/DeleteApiaryTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/EditApiaryTest.java on lines 63..80
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/ViewApiaryTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/apiary/AddHiveTest.java on lines 63..80
app/src/androidTest/java/com/davidmiguel/gobees/apiary/EditHiveTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/apiary/ViewHiveTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/help/HelpTest.java on lines 60..77
app/src/androidTest/java/com/davidmiguel/gobees/hive/AddRecordingTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/hive/ListRecordingsTest.java on lines 61..78
app/src/androidTest/java/com/davidmiguel/gobees/hive/ViewRecordingTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/settings/SettingsTest.java on lines 62..79

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

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

    private static Matcher<View> childAtPosition(
            final Matcher<View> parentMatcher, final int position) {

        return new TypeSafeMatcher<View>() {
            @Override
app/src/androidTest/java/com/davidmiguel/gobees/about/AboutTest.java on lines 60..77
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/AddApiaryTest.java on lines 62..79
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/DeleteApiaryTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/EditApiaryTest.java on lines 63..80
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/ViewApiaryTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/apiary/AddHiveTest.java on lines 63..80
app/src/androidTest/java/com/davidmiguel/gobees/apiary/DeleteHiveTest.java on lines 65..82
app/src/androidTest/java/com/davidmiguel/gobees/apiary/EditHiveTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/apiary/ViewHiveTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/help/HelpTest.java on lines 60..77
app/src/androidTest/java/com/davidmiguel/gobees/hive/AddRecordingTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/hive/ListRecordingsTest.java on lines 61..78
app/src/androidTest/java/com/davidmiguel/gobees/settings/SettingsTest.java on lines 62..79

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

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

    private static Matcher<View> childAtPosition(
            final Matcher<View> parentMatcher, final int position) {

        return new TypeSafeMatcher<View>() {
            @Override
app/src/androidTest/java/com/davidmiguel/gobees/about/AboutTest.java on lines 60..77
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/AddApiaryTest.java on lines 62..79
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/DeleteApiaryTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/ViewApiaryTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/apiary/AddHiveTest.java on lines 63..80
app/src/androidTest/java/com/davidmiguel/gobees/apiary/DeleteHiveTest.java on lines 65..82
app/src/androidTest/java/com/davidmiguel/gobees/apiary/EditHiveTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/apiary/ViewHiveTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/help/HelpTest.java on lines 60..77
app/src/androidTest/java/com/davidmiguel/gobees/hive/AddRecordingTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/hive/ListRecordingsTest.java on lines 61..78
app/src/androidTest/java/com/davidmiguel/gobees/hive/ViewRecordingTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/settings/SettingsTest.java on lines 62..79

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

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

    private static Matcher<View> childAtPosition(
            final Matcher<View> parentMatcher, final int position) {

        return new TypeSafeMatcher<View>() {
            @Override
app/src/androidTest/java/com/davidmiguel/gobees/about/AboutTest.java on lines 60..77
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/AddApiaryTest.java on lines 62..79
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/DeleteApiaryTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/EditApiaryTest.java on lines 63..80
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/ViewApiaryTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/apiary/AddHiveTest.java on lines 63..80
app/src/androidTest/java/com/davidmiguel/gobees/apiary/DeleteHiveTest.java on lines 65..82
app/src/androidTest/java/com/davidmiguel/gobees/apiary/EditHiveTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/apiary/ViewHiveTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/help/HelpTest.java on lines 60..77
app/src/androidTest/java/com/davidmiguel/gobees/hive/AddRecordingTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/hive/ViewRecordingTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/settings/SettingsTest.java on lines 62..79

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

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

    private static Matcher<View> childAtPosition(
            final Matcher<View> parentMatcher, final int position) {

        return new TypeSafeMatcher<View>() {
            @Override
app/src/androidTest/java/com/davidmiguel/gobees/about/AboutTest.java on lines 60..77
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/AddApiaryTest.java on lines 62..79
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/DeleteApiaryTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/EditApiaryTest.java on lines 63..80
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/ViewApiaryTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/apiary/AddHiveTest.java on lines 63..80
app/src/androidTest/java/com/davidmiguel/gobees/apiary/DeleteHiveTest.java on lines 65..82
app/src/androidTest/java/com/davidmiguel/gobees/apiary/EditHiveTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/apiary/ViewHiveTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/help/HelpTest.java on lines 60..77
app/src/androidTest/java/com/davidmiguel/gobees/hive/AddRecordingTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/hive/ListRecordingsTest.java on lines 61..78
app/src/androidTest/java/com/davidmiguel/gobees/hive/ViewRecordingTest.java on lines 64..81

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

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

    private static Matcher<View> childAtPosition(
            final Matcher<View> parentMatcher, final int position) {

        return new TypeSafeMatcher<View>() {
            @Override
app/src/androidTest/java/com/davidmiguel/gobees/about/AboutTest.java on lines 60..77
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/DeleteApiaryTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/EditApiaryTest.java on lines 63..80
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/ViewApiaryTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/apiary/AddHiveTest.java on lines 63..80
app/src/androidTest/java/com/davidmiguel/gobees/apiary/DeleteHiveTest.java on lines 65..82
app/src/androidTest/java/com/davidmiguel/gobees/apiary/EditHiveTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/apiary/ViewHiveTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/help/HelpTest.java on lines 60..77
app/src/androidTest/java/com/davidmiguel/gobees/hive/AddRecordingTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/hive/ListRecordingsTest.java on lines 61..78
app/src/androidTest/java/com/davidmiguel/gobees/hive/ViewRecordingTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/settings/SettingsTest.java on lines 62..79

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

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

    private static Matcher<View> childAtPosition(
            final Matcher<View> parentMatcher, final int position) {

        return new TypeSafeMatcher<View>() {
            @Override
app/src/androidTest/java/com/davidmiguel/gobees/about/AboutTest.java on lines 60..77
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/AddApiaryTest.java on lines 62..79
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/DeleteApiaryTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/EditApiaryTest.java on lines 63..80
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/ViewApiaryTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/apiary/AddHiveTest.java on lines 63..80
app/src/androidTest/java/com/davidmiguel/gobees/apiary/DeleteHiveTest.java on lines 65..82
app/src/androidTest/java/com/davidmiguel/gobees/apiary/EditHiveTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/help/HelpTest.java on lines 60..77
app/src/androidTest/java/com/davidmiguel/gobees/hive/AddRecordingTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/hive/ListRecordingsTest.java on lines 61..78
app/src/androidTest/java/com/davidmiguel/gobees/hive/ViewRecordingTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/settings/SettingsTest.java on lines 62..79

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

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

    private static Matcher<View> childAtPosition(
            final Matcher<View> parentMatcher, final int position) {

        return new TypeSafeMatcher<View>() {
            @Override
app/src/androidTest/java/com/davidmiguel/gobees/about/AboutTest.java on lines 60..77
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/AddApiaryTest.java on lines 62..79
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/DeleteApiaryTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/EditApiaryTest.java on lines 63..80
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/ViewApiaryTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/apiary/AddHiveTest.java on lines 63..80
app/src/androidTest/java/com/davidmiguel/gobees/apiary/DeleteHiveTest.java on lines 65..82
app/src/androidTest/java/com/davidmiguel/gobees/apiary/EditHiveTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/apiary/ViewHiveTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/hive/AddRecordingTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/hive/ListRecordingsTest.java on lines 61..78
app/src/androidTest/java/com/davidmiguel/gobees/hive/ViewRecordingTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/settings/SettingsTest.java on lines 62..79

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

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

    private static Matcher<View> childAtPosition(
            final Matcher<View> parentMatcher, final int position) {

        return new TypeSafeMatcher<View>() {
            @Override
app/src/androidTest/java/com/davidmiguel/gobees/about/AboutTest.java on lines 60..77
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/AddApiaryTest.java on lines 62..79
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/DeleteApiaryTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/EditApiaryTest.java on lines 63..80
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/ViewApiaryTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/apiary/DeleteHiveTest.java on lines 65..82
app/src/androidTest/java/com/davidmiguel/gobees/apiary/EditHiveTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/apiary/ViewHiveTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/help/HelpTest.java on lines 60..77
app/src/androidTest/java/com/davidmiguel/gobees/hive/AddRecordingTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/hive/ListRecordingsTest.java on lines 61..78
app/src/androidTest/java/com/davidmiguel/gobees/hive/ViewRecordingTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/settings/SettingsTest.java on lines 62..79

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

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

    private static Matcher<View> childAtPosition(
            final Matcher<View> parentMatcher, final int position) {

        return new TypeSafeMatcher<View>() {
            @Override
app/src/androidTest/java/com/davidmiguel/gobees/about/AboutTest.java on lines 60..77
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/AddApiaryTest.java on lines 62..79
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/DeleteApiaryTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/EditApiaryTest.java on lines 63..80
app/src/androidTest/java/com/davidmiguel/gobees/apiary/AddHiveTest.java on lines 63..80
app/src/androidTest/java/com/davidmiguel/gobees/apiary/DeleteHiveTest.java on lines 65..82
app/src/androidTest/java/com/davidmiguel/gobees/apiary/EditHiveTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/apiary/ViewHiveTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/help/HelpTest.java on lines 60..77
app/src/androidTest/java/com/davidmiguel/gobees/hive/AddRecordingTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/hive/ListRecordingsTest.java on lines 61..78
app/src/androidTest/java/com/davidmiguel/gobees/hive/ViewRecordingTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/settings/SettingsTest.java on lines 62..79

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

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

    private static Matcher<View> childAtPosition(
            final Matcher<View> parentMatcher, final int position) {

        return new TypeSafeMatcher<View>() {
            @Override
app/src/androidTest/java/com/davidmiguel/gobees/about/AboutTest.java on lines 60..77
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/AddApiaryTest.java on lines 62..79
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/DeleteApiaryTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/EditApiaryTest.java on lines 63..80
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/ViewApiaryTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/apiary/AddHiveTest.java on lines 63..80
app/src/androidTest/java/com/davidmiguel/gobees/apiary/DeleteHiveTest.java on lines 65..82
app/src/androidTest/java/com/davidmiguel/gobees/apiary/EditHiveTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/apiary/ViewHiveTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/help/HelpTest.java on lines 60..77
app/src/androidTest/java/com/davidmiguel/gobees/hive/ListRecordingsTest.java on lines 61..78
app/src/androidTest/java/com/davidmiguel/gobees/hive/ViewRecordingTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/settings/SettingsTest.java on lines 62..79

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

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

    private static Matcher<View> childAtPosition(
            final Matcher<View> parentMatcher, final int position) {

        return new TypeSafeMatcher<View>() {
            @Override
app/src/androidTest/java/com/davidmiguel/gobees/about/AboutTest.java on lines 60..77
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/AddApiaryTest.java on lines 62..79
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/EditApiaryTest.java on lines 63..80
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/ViewApiaryTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/apiary/AddHiveTest.java on lines 63..80
app/src/androidTest/java/com/davidmiguel/gobees/apiary/DeleteHiveTest.java on lines 65..82
app/src/androidTest/java/com/davidmiguel/gobees/apiary/EditHiveTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/apiary/ViewHiveTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/help/HelpTest.java on lines 60..77
app/src/androidTest/java/com/davidmiguel/gobees/hive/AddRecordingTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/hive/ListRecordingsTest.java on lines 61..78
app/src/androidTest/java/com/davidmiguel/gobees/hive/ViewRecordingTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/settings/SettingsTest.java on lines 62..79

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

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

    private static Matcher<View> childAtPosition(
            final Matcher<View> parentMatcher, final int position) {

        return new TypeSafeMatcher<View>() {
            @Override
app/src/androidTest/java/com/davidmiguel/gobees/about/AboutTest.java on lines 60..77
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/AddApiaryTest.java on lines 62..79
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/DeleteApiaryTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/EditApiaryTest.java on lines 63..80
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/ViewApiaryTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/apiary/AddHiveTest.java on lines 63..80
app/src/androidTest/java/com/davidmiguel/gobees/apiary/DeleteHiveTest.java on lines 65..82
app/src/androidTest/java/com/davidmiguel/gobees/apiary/ViewHiveTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/help/HelpTest.java on lines 60..77
app/src/androidTest/java/com/davidmiguel/gobees/hive/AddRecordingTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/hive/ListRecordingsTest.java on lines 61..78
app/src/androidTest/java/com/davidmiguel/gobees/hive/ViewRecordingTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/settings/SettingsTest.java on lines 62..79

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

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

    private static Matcher<View> childAtPosition(
            final Matcher<View> parentMatcher, final int position) {

        return new TypeSafeMatcher<View>() {
            @Override
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/AddApiaryTest.java on lines 62..79
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/DeleteApiaryTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/EditApiaryTest.java on lines 63..80
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/ViewApiaryTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/apiary/AddHiveTest.java on lines 63..80
app/src/androidTest/java/com/davidmiguel/gobees/apiary/DeleteHiveTest.java on lines 65..82
app/src/androidTest/java/com/davidmiguel/gobees/apiary/EditHiveTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/apiary/ViewHiveTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/help/HelpTest.java on lines 60..77
app/src/androidTest/java/com/davidmiguel/gobees/hive/AddRecordingTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/hive/ListRecordingsTest.java on lines 61..78
app/src/androidTest/java/com/davidmiguel/gobees/hive/ViewRecordingTest.java on lines 64..81
app/src/androidTest/java/com/davidmiguel/gobees/settings/SettingsTest.java on lines 62..79

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

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

    @Override
    public void deleteApiary(@NonNull Apiary apiary) {
        // Show progress indicator
        view.setLoadingIndicator(true);
        // Delete apiary
app/src/main/java/com/davidmiguel/gobees/apiary/ApiaryPresenter.java on lines 133..163

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

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

    @Override
    public void deleteHive(@NonNull Hive hive) {
        // Show progress indicator
        apiaryHivesView.setLoadingIndicator(true);
        // Delete hive
app/src/main/java/com/davidmiguel/gobees/apiaries/ApiariesPresenter.java on lines 115..145

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

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

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

    @Override
    public void getRecording(long apiaryId, long hiveId, Date start, Date end,
                             @NonNull GetRecordingCallback callback) {
        // Get apiary
        Apiary apiary = realm.where(Apiary.class).equalTo(ID, apiaryId).findFirst();

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

        @Nullable
        @Override
        public View onCreateView(LayoutInflater inflater, ViewGroup container,
                                 Bundle savedInstanceState) {
            View root = inflater.inflate(R.layout.recording_frag, container, false);
      Severity
      Category
      Status
      Source
      Language