davidmigloz/go-bees

View on GitHub

Showing 118 of 387 total issues

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

        ViewInteraction recyclerView2 = onView(
                allOf(withId(R.id.hives_list),
                        withParent(allOf(withId(R.id.hivesLL),
                                withParent(withId(R.id.hivesContainer)))),
                        isDisplayed()));
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/ViewApiaryTest.java on lines 105..109
app/src/androidTest/java/com/davidmiguel/gobees/apiary/AddHiveTest.java on lines 100..104
app/src/androidTest/java/com/davidmiguel/gobees/apiary/DeleteHiveTest.java on lines 102..106
app/src/androidTest/java/com/davidmiguel/gobees/apiary/EditHiveTest.java on lines 101..105
app/src/androidTest/java/com/davidmiguel/gobees/apiary/ListHivesTest.java on lines 72..76
app/src/androidTest/java/com/davidmiguel/gobees/apiary/ViewHiveTest.java on lines 101..105
app/src/androidTest/java/com/davidmiguel/gobees/apiary/ViewHiveTest.java on lines 128..132
app/src/androidTest/java/com/davidmiguel/gobees/hive/AddRecordingTest.java on lines 101..105
app/src/androidTest/java/com/davidmiguel/gobees/hive/DeleteRecordingTest.java on lines 78..82
app/src/androidTest/java/com/davidmiguel/gobees/hive/DeleteRecordingTest.java on lines 101..105
app/src/androidTest/java/com/davidmiguel/gobees/hive/ListRecordingsTest.java on lines 100..104
app/src/androidTest/java/com/davidmiguel/gobees/hive/ListRecordingsTest.java on lines 107..111
app/src/androidTest/java/com/davidmiguel/gobees/hive/ViewRecordingTest.java on lines 101..105
app/src/androidTest/java/com/davidmiguel/gobees/hive/ViewRecordingTest.java on lines 124..128
app/src/androidTest/java/com/davidmiguel/gobees/hive/ViewRecordingTest.java on lines 147..151

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

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

        ViewInteraction recyclerView2 = onView(
                allOf(withId(R.id.hives_list),
                        withParent(allOf(withId(R.id.hivesLL),
                                withParent(withId(R.id.hivesContainer)))),
                        isDisplayed()));
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/ViewApiaryTest.java on lines 105..109
app/src/androidTest/java/com/davidmiguel/gobees/apiary/AddHiveTest.java on lines 100..104
app/src/androidTest/java/com/davidmiguel/gobees/apiary/DeleteHiveTest.java on lines 102..106
app/src/androidTest/java/com/davidmiguel/gobees/apiary/EditHiveTest.java on lines 101..105
app/src/androidTest/java/com/davidmiguel/gobees/apiary/ListHivesTest.java on lines 72..76
app/src/androidTest/java/com/davidmiguel/gobees/apiary/ViewHiveTest.java on lines 101..105
app/src/androidTest/java/com/davidmiguel/gobees/apiary/ViewHiveTest.java on lines 128..132
app/src/androidTest/java/com/davidmiguel/gobees/hive/AddRecordingTest.java on lines 101..105
app/src/androidTest/java/com/davidmiguel/gobees/hive/AddRecordingTest.java on lines 124..128
app/src/androidTest/java/com/davidmiguel/gobees/hive/DeleteRecordingTest.java on lines 78..82
app/src/androidTest/java/com/davidmiguel/gobees/hive/DeleteRecordingTest.java on lines 101..105
app/src/androidTest/java/com/davidmiguel/gobees/hive/ListRecordingsTest.java on lines 100..104
app/src/androidTest/java/com/davidmiguel/gobees/hive/ViewRecordingTest.java on lines 101..105
app/src/androidTest/java/com/davidmiguel/gobees/hive/ViewRecordingTest.java on lines 124..128
app/src/androidTest/java/com/davidmiguel/gobees/hive/ViewRecordingTest.java on lines 147..151

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

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

        ViewInteraction recyclerView = onView(
                allOf(withId(R.id.apiaries_list),
                        withParent(allOf(withId(R.id.apiariesLL),
                                withParent(withId(R.id.apiariesContainer)))),
                        isDisplayed()));
app/src/androidTest/java/com/davidmiguel/gobees/apiary/AddHiveTest.java on lines 100..104
app/src/androidTest/java/com/davidmiguel/gobees/apiary/DeleteHiveTest.java on lines 102..106
app/src/androidTest/java/com/davidmiguel/gobees/apiary/EditHiveTest.java on lines 101..105
app/src/androidTest/java/com/davidmiguel/gobees/apiary/ListHivesTest.java on lines 72..76
app/src/androidTest/java/com/davidmiguel/gobees/apiary/ViewHiveTest.java on lines 101..105
app/src/androidTest/java/com/davidmiguel/gobees/apiary/ViewHiveTest.java on lines 128..132
app/src/androidTest/java/com/davidmiguel/gobees/hive/AddRecordingTest.java on lines 101..105
app/src/androidTest/java/com/davidmiguel/gobees/hive/AddRecordingTest.java on lines 124..128
app/src/androidTest/java/com/davidmiguel/gobees/hive/DeleteRecordingTest.java on lines 78..82
app/src/androidTest/java/com/davidmiguel/gobees/hive/DeleteRecordingTest.java on lines 101..105
app/src/androidTest/java/com/davidmiguel/gobees/hive/ListRecordingsTest.java on lines 100..104
app/src/androidTest/java/com/davidmiguel/gobees/hive/ListRecordingsTest.java on lines 107..111
app/src/androidTest/java/com/davidmiguel/gobees/hive/ViewRecordingTest.java on lines 101..105
app/src/androidTest/java/com/davidmiguel/gobees/hive/ViewRecordingTest.java on lines 124..128
app/src/androidTest/java/com/davidmiguel/gobees/hive/ViewRecordingTest.java on lines 147..151

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

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

        ViewInteraction recyclerView = onView(
                allOf(withId(R.id.apiaries_list),
                        withParent(allOf(withId(R.id.apiariesLL),
                                withParent(withId(R.id.apiariesContainer)))),
                        isDisplayed()));
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/ViewApiaryTest.java on lines 105..109
app/src/androidTest/java/com/davidmiguel/gobees/apiary/AddHiveTest.java on lines 100..104
app/src/androidTest/java/com/davidmiguel/gobees/apiary/DeleteHiveTest.java on lines 102..106
app/src/androidTest/java/com/davidmiguel/gobees/apiary/EditHiveTest.java on lines 101..105
app/src/androidTest/java/com/davidmiguel/gobees/apiary/ListHivesTest.java on lines 72..76
app/src/androidTest/java/com/davidmiguel/gobees/apiary/ViewHiveTest.java on lines 101..105
app/src/androidTest/java/com/davidmiguel/gobees/apiary/ViewHiveTest.java on lines 128..132
app/src/androidTest/java/com/davidmiguel/gobees/hive/AddRecordingTest.java on lines 101..105
app/src/androidTest/java/com/davidmiguel/gobees/hive/AddRecordingTest.java on lines 124..128
app/src/androidTest/java/com/davidmiguel/gobees/hive/DeleteRecordingTest.java on lines 78..82
app/src/androidTest/java/com/davidmiguel/gobees/hive/DeleteRecordingTest.java on lines 101..105
app/src/androidTest/java/com/davidmiguel/gobees/hive/ListRecordingsTest.java on lines 100..104
app/src/androidTest/java/com/davidmiguel/gobees/hive/ListRecordingsTest.java on lines 107..111
app/src/androidTest/java/com/davidmiguel/gobees/hive/ViewRecordingTest.java on lines 124..128
app/src/androidTest/java/com/davidmiguel/gobees/hive/ViewRecordingTest.java on lines 147..151

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

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

        ViewInteraction recyclerView2 = onView(
                allOf(withId(R.id.hives_list),
                        withParent(allOf(withId(R.id.hivesLL),
                                withParent(withId(R.id.hivesContainer)))),
                        isDisplayed()));
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/ViewApiaryTest.java on lines 105..109
app/src/androidTest/java/com/davidmiguel/gobees/apiary/AddHiveTest.java on lines 100..104
app/src/androidTest/java/com/davidmiguel/gobees/apiary/DeleteHiveTest.java on lines 102..106
app/src/androidTest/java/com/davidmiguel/gobees/apiary/EditHiveTest.java on lines 101..105
app/src/androidTest/java/com/davidmiguel/gobees/apiary/ListHivesTest.java on lines 72..76
app/src/androidTest/java/com/davidmiguel/gobees/apiary/ViewHiveTest.java on lines 101..105
app/src/androidTest/java/com/davidmiguel/gobees/hive/AddRecordingTest.java on lines 101..105
app/src/androidTest/java/com/davidmiguel/gobees/hive/AddRecordingTest.java on lines 124..128
app/src/androidTest/java/com/davidmiguel/gobees/hive/DeleteRecordingTest.java on lines 78..82
app/src/androidTest/java/com/davidmiguel/gobees/hive/DeleteRecordingTest.java on lines 101..105
app/src/androidTest/java/com/davidmiguel/gobees/hive/ListRecordingsTest.java on lines 100..104
app/src/androidTest/java/com/davidmiguel/gobees/hive/ListRecordingsTest.java on lines 107..111
app/src/androidTest/java/com/davidmiguel/gobees/hive/ViewRecordingTest.java on lines 101..105
app/src/androidTest/java/com/davidmiguel/gobees/hive/ViewRecordingTest.java on lines 124..128
app/src/androidTest/java/com/davidmiguel/gobees/hive/ViewRecordingTest.java on lines 147..151

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

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

        ViewInteraction recyclerView = onView(
                allOf(withId(R.id.apiaries_list),
                        withParent(allOf(withId(R.id.apiariesLL),
                                withParent(withId(R.id.apiariesContainer)))),
                        isDisplayed()));
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/ViewApiaryTest.java on lines 105..109
app/src/androidTest/java/com/davidmiguel/gobees/apiary/AddHiveTest.java on lines 100..104
app/src/androidTest/java/com/davidmiguel/gobees/apiary/DeleteHiveTest.java on lines 102..106
app/src/androidTest/java/com/davidmiguel/gobees/apiary/EditHiveTest.java on lines 101..105
app/src/androidTest/java/com/davidmiguel/gobees/apiary/ListHivesTest.java on lines 72..76
app/src/androidTest/java/com/davidmiguel/gobees/apiary/ViewHiveTest.java on lines 101..105
app/src/androidTest/java/com/davidmiguel/gobees/apiary/ViewHiveTest.java on lines 128..132
app/src/androidTest/java/com/davidmiguel/gobees/hive/AddRecordingTest.java on lines 124..128
app/src/androidTest/java/com/davidmiguel/gobees/hive/DeleteRecordingTest.java on lines 78..82
app/src/androidTest/java/com/davidmiguel/gobees/hive/DeleteRecordingTest.java on lines 101..105
app/src/androidTest/java/com/davidmiguel/gobees/hive/ListRecordingsTest.java on lines 100..104
app/src/androidTest/java/com/davidmiguel/gobees/hive/ListRecordingsTest.java on lines 107..111
app/src/androidTest/java/com/davidmiguel/gobees/hive/ViewRecordingTest.java on lines 101..105
app/src/androidTest/java/com/davidmiguel/gobees/hive/ViewRecordingTest.java on lines 124..128
app/src/androidTest/java/com/davidmiguel/gobees/hive/ViewRecordingTest.java on lines 147..151

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

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

    private long getFrameRate() {
        // Get value
        String value = PreferenceManager.getDefaultSharedPreferences(getActivity())
                .getString(getString(R.string.pref_frame_rate_key), getString(R.string.pref_frame_rate_1min));
        // Convert
app/src/main/java/com/davidmiguel/gobees/monitoring/MonitoringSettingsFragment.java on lines 306..312

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

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

    @Test
    public void formatTemperatureCelsius() throws Exception {
        // Set metric system
        when(GoBeesPreferences.isMetric(Matchers.<Context>any()))
                .thenReturn(true);
app/src/test/java/com/davidmiguel/gobees/utils/WeatherUtilsTest.java on lines 79..86

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

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

    @Test
    public void formatTemperatureFahrenheit() throws Exception {
        // Set imperial system
        when(GoBeesPreferences.isMetric(Matchers.<Context>any()))
                .thenReturn(false);
app/src/test/java/com/davidmiguel/gobees/utils/WeatherUtilsTest.java on lines 69..77

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

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

    private int getZoomRatio() {
        // Get value
        String value = PreferenceManager.getDefaultSharedPreferences(getActivity())
                .getString(getString(R.string.pref_zoom_key), getString(R.string.pref_zoom_x1));
        // Convert
app/src/main/java/com/davidmiguel/gobees/monitoring/MonitoringSettingsFragment.java on lines 319..325

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

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

        ViewInteraction textView = onView(
                allOf(withId(R.id.apiary_name), withText("Apiary"),
                        childAtPosition(
                                childAtPosition(
                                        withId(R.id.card),
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/AddApiaryTest.java on lines 103..110
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/AddApiaryTest.java on lines 113..120
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/EditApiaryTest.java on lines 122..129
app/src/androidTest/java/com/davidmiguel/gobees/apiary/AddHiveTest.java on lines 123..130
app/src/androidTest/java/com/davidmiguel/gobees/apiary/EditHiveTest.java on lines 146..153

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

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

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

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

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

Refactorings

Further Reading

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

    @Override
    public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions,
                                           @NonNull int[] grantResults) {
        if (addEditApiaryFragment != null) {
            addEditApiaryFragment.onRequestPermissionsResult(requestCode,
app/src/main/java/com/davidmiguel/gobees/hive/HiveActivity.java on lines 87..93

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

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

        ViewInteraction textView = onView(
                allOf(withId(R.id.hive_name), withText("Hive"),
                        childAtPosition(
                                childAtPosition(
                                        withId(R.id.card),
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/AddApiaryTest.java on lines 103..110
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/AddApiaryTest.java on lines 113..120
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/DeleteApiaryTest.java on lines 101..108
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/EditApiaryTest.java on lines 122..129
app/src/androidTest/java/com/davidmiguel/gobees/apiary/EditHiveTest.java on lines 146..153

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

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

        ViewInteraction textView = onView(
                allOf(withId(R.id.hive_name), withText("Hive Edited"),
                        childAtPosition(
                                childAtPosition(
                                        withId(R.id.card),
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/AddApiaryTest.java on lines 103..110
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/AddApiaryTest.java on lines 113..120
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/DeleteApiaryTest.java on lines 101..108
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/EditApiaryTest.java on lines 122..129
app/src/androidTest/java/com/davidmiguel/gobees/apiary/AddHiveTest.java on lines 123..130

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

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

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

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

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

Refactorings

Further Reading

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

    @Override
    public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
        if (hiveRecordingsFragment != null) {
            hiveRecordingsFragment.onRequestPermissionsResult(requestCode, permissions, grantResults);
        }
Severity: Minor
Found in app/src/main/java/com/davidmiguel/gobees/hive/HiveActivity.java and 1 other location - About 30 mins to fix
app/src/main/java/com/davidmiguel/gobees/addeditapiary/AddEditApiaryActivity.java on lines 81..89

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

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

        ViewInteraction textView = onView(
                allOf(withId(R.id.apiary_name), withText("Apiary"),
                        childAtPosition(
                                childAtPosition(
                                        withId(R.id.card),
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/AddApiaryTest.java on lines 113..120
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/DeleteApiaryTest.java on lines 101..108
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/EditApiaryTest.java on lines 122..129
app/src/androidTest/java/com/davidmiguel/gobees/apiary/AddHiveTest.java on lines 123..130
app/src/androidTest/java/com/davidmiguel/gobees/apiary/EditHiveTest.java on lines 146..153

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

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

        ViewInteraction textView = onView(
                allOf(withId(R.id.apiary_name), withText("Apiary Edited"),
                        childAtPosition(
                                childAtPosition(
                                        withId(R.id.card),
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/AddApiaryTest.java on lines 103..110
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/AddApiaryTest.java on lines 113..120
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/DeleteApiaryTest.java on lines 101..108
app/src/androidTest/java/com/davidmiguel/gobees/apiary/AddHiveTest.java on lines 123..130
app/src/androidTest/java/com/davidmiguel/gobees/apiary/EditHiveTest.java on lines 146..153

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

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

        ViewInteraction textView2 = onView(
                allOf(withId(R.id.num_hives), withText("0"),
                        childAtPosition(
                                childAtPosition(
                                        withId(R.id.card),
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/AddApiaryTest.java on lines 103..110
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/DeleteApiaryTest.java on lines 101..108
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/EditApiaryTest.java on lines 122..129
app/src/androidTest/java/com/davidmiguel/gobees/apiary/AddHiveTest.java on lines 123..130
app/src/androidTest/java/com/davidmiguel/gobees/apiary/EditHiveTest.java on lines 146..153

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

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

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

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

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

Refactorings

Further Reading

Severity
Category
Status
Source
Language