davidmigloz/go-bees

View on GitHub

Showing 118 of 387 total issues

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

            @Override
            public void onDataNotAvailable() {
                // The view may not be able to handle UI updates anymore
                if (!apiaryHivesView.isActive() && !apiaryInfoView.isActive()) {
                    return;
app/src/main/java/com/davidmiguel/gobees/hive/HivePresenter.java on lines 127..138

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

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

        if (jsonObject.has(OWM_RAIN)) {
            JSONObject jsonRainObject = jsonObject.getJSONObject(OWM_RAIN);
            rain = jsonRainObject.has(OWM_RAIN_3H) ?
                    jsonRainObject.getDouble(OWM_RAIN_3H) : 0;
        }
app/src/main/java/com/davidmiguel/gobees/data/source/network/OpenWeatherMapUtils.java on lines 146..150
app/src/main/java/com/davidmiguel/gobees/data/source/network/OpenWeatherMapUtils.java on lines 160..164

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

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

        if (jsonObject.has(OWM_CLOUDS)) {
            JSONObject jsonCloudsObject = jsonObject.getJSONObject(OWM_CLOUDS);
            clouds = jsonCloudsObject.has(OWM_CLOUDS_CLOUDINESS) ?
                    jsonCloudsObject.getInt(OWM_CLOUDS_CLOUDINESS) : 0;
        }
app/src/main/java/com/davidmiguel/gobees/data/source/network/OpenWeatherMapUtils.java on lines 153..157
app/src/main/java/com/davidmiguel/gobees/data/source/network/OpenWeatherMapUtils.java on lines 160..164

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

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 getNextHiveId(@NonNull GetNextHiveIdCallback callback) {
        Number nextId = realm.where(Hive.class).max(ID);
        callback.onNextHiveIdLoaded(nextId != null ? nextId.longValue() + 1 : 0);
    }
app/src/main/java/com/davidmiguel/gobees/data/source/local/GoBeesLocalDataSource.java on lines 202..206

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 44.

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

        if (jsonObject.has(OWM_SNOW)) {
            JSONObject jsonSnowObject = jsonObject.getJSONObject(OWM_SNOW);
            snow = jsonSnowObject.has(OWM_SNOW_3H) ?
                    jsonSnowObject.getDouble(OWM_SNOW_3H) : 0;
        }
app/src/main/java/com/davidmiguel/gobees/data/source/network/OpenWeatherMapUtils.java on lines 146..150
app/src/main/java/com/davidmiguel/gobees/data/source/network/OpenWeatherMapUtils.java on lines 153..157

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

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 getNextApiaryId(@NonNull GetNextApiaryIdCallback callback) {
        Number nextId = realm.where(Apiary.class).max(ID);
        callback.onNextApiaryIdLoaded(nextId != null ? nextId.longValue() + 1 : 0);
    }
app/src/main/java/com/davidmiguel/gobees/data/source/local/GoBeesLocalDataSource.java on lines 340..344

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

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 onRecordingTooShort() {
                        // Finish activity with error
                        Intent intent = new Intent();
                        intent.putExtra(HiveRecordingsFragment.ARGUMENT_MONITORING_ERROR,
app/src/main/java/com/davidmiguel/gobees/monitoring/MonitoringFragment.java on lines 160..168

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

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 saveInvalidLocation_showsErrorUi() {
        // Get a reference to the class under test
        addEditApiaryPresenter =
                new AddEditApiaryPresenter(apiariesRepository, addeditapiaryView,
app/src/test/java/com/davidmiguel/gobees/addeditapiary/AddEditApiaryPresenterTest.java on lines 100..110

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

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 saveEmptyApiary_showsErrorUi() {
        // Get a reference to the class under test
        addEditApiaryPresenter =
                new AddEditApiaryPresenter(apiariesRepository, addeditapiaryView,
app/src/test/java/com/davidmiguel/gobees/addeditapiary/AddEditApiaryPresenterTest.java on lines 112..123

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

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 onFailure() {
                        // Finish activity with error
                        Intent intent = new Intent();
                        intent.putExtra(HiveRecordingsFragment.ARGUMENT_MONITORING_ERROR,
app/src/main/java/com/davidmiguel/gobees/monitoring/MonitoringFragment.java on lines 142..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 43.

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/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/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 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/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

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/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 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/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 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/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 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/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

Severity
Category
Status
Source
Language