itachi1706/CheesecakeUtilities

View on GitHub

Showing 517 of 532 total issues

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

        if (totalSize >= 1024.0d) {
            totalSize = ((double) Math.round((100.0d * totalSize) / 1024.0d)) / 100.0d;
            unitTotal = " GB";
        }
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/StorageFragment.java on lines 135..138
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/StorageFragment.java on lines 139..142
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/StorageFragment.java on lines 169..172
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/StorageFragment.java on lines 173..176
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/StorageFragment.java on lines 177..180
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/StorageFragment.java on lines 243..246
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/StorageFragment.java on lines 247..250
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/StorageFragment.java on lines 251..254
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/SystemFragment.java on lines 165..168
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/SystemFragment.java on lines 169..172
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/SystemFragment.java on lines 173..176

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

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

        if (totalSize >= 1024.0d) {
            totalSize = ((double) Math.round((100.0d * totalSize) / 1024.0d)) / 100.0d;
            unitTotal = " GB";
        }
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/StorageFragment.java on lines 131..134
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/StorageFragment.java on lines 135..138
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/StorageFragment.java on lines 139..142
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/StorageFragment.java on lines 169..172
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/StorageFragment.java on lines 173..176
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/StorageFragment.java on lines 177..180
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/StorageFragment.java on lines 243..246
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/StorageFragment.java on lines 247..250
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/StorageFragment.java on lines 251..254
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/SystemFragment.java on lines 169..172
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/SystemFragment.java on lines 173..176

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

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

        if (usedSize >= 1024.0d) {
            usedSize = ((double) Math.round((100.0d * usedSize) / 1024.0d)) / 100.0d;
            unitUsed = " GB";
        }
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/StorageFragment.java on lines 131..134
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/StorageFragment.java on lines 135..138
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/StorageFragment.java on lines 139..142
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/StorageFragment.java on lines 169..172
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/StorageFragment.java on lines 173..176
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/StorageFragment.java on lines 177..180
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/StorageFragment.java on lines 243..246
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/StorageFragment.java on lines 247..250
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/SystemFragment.java on lines 165..168
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/SystemFragment.java on lines 169..172
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/SystemFragment.java on lines 173..176

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

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

        return ((gameBoardCheck[0][0].equals(gameBoardCheck[1][1]) && gameBoardCheck[1][1].equals(gameBoardCheck[2][2]))
app/src/main/java/com/itachi1706/cheesecakeutilities/games/tictactoe/AlgorithmCheck.java on lines 48..48

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

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

        if (totalSize >= 1024.0d) {
            totalSize = ((double) Math.round((100.0d * totalSize) / 1024.0d)) / 100.0d;
            unitTotal = " GB";
        }
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/StorageFragment.java on lines 131..134
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/StorageFragment.java on lines 135..138
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/StorageFragment.java on lines 139..142
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/StorageFragment.java on lines 173..176
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/StorageFragment.java on lines 177..180
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/StorageFragment.java on lines 243..246
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/StorageFragment.java on lines 247..250
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/StorageFragment.java on lines 251..254
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/SystemFragment.java on lines 165..168
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/SystemFragment.java on lines 169..172
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/SystemFragment.java on lines 173..176

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

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

        if (usedSize >= 1024.0d) {
            usedSize = ((double) Math.round((100.0d * usedSize) / 1024.0d)) / 100.0d;
            unitUsed = " GB";
        }
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/StorageFragment.java on lines 131..134
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/StorageFragment.java on lines 135..138
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/StorageFragment.java on lines 139..142
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/StorageFragment.java on lines 169..172
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/StorageFragment.java on lines 173..176
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/StorageFragment.java on lines 243..246
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/StorageFragment.java on lines 247..250
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/StorageFragment.java on lines 251..254
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/SystemFragment.java on lines 165..168
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/SystemFragment.java on lines 169..172
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/SystemFragment.java on lines 173..176

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

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

                || (gameBoardCheck[0][2].equals(gameBoardCheck[1][1]) && gameBoardCheck[1][1].equals(gameBoardCheck[2][0])))
app/src/main/java/com/itachi1706/cheesecakeutilities/games/tictactoe/AlgorithmCheck.java on lines 47..47

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

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

                dataSnapshot.children.forEach {
                    modules.add(it.getValue(GpaModule::class.java)!!)
                }
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/gpacalculator/fragment/InstitutionListFragment.kt on lines 112..114

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

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

                Snackbar.make(findViewById(android.R.id.content), "Please update grade agian", Snackbar.LENGTH_LONG).show()
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/gpacalculator/AddInstitutionActivity.kt on lines 102..102

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

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

                    if (!barcode.email?.subject.isNullOrEmpty()) putExtra(Intent.EXTRA_SUBJECT, barcode.email?.subject)
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/barcodetools/BarcodeHelper.kt on lines 220..220

Duplicated Code

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

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

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

Tuning

This issue has a mass of 68.

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

        if (selectedInstitution != null) title = "${selectedInstitution!!.name} (${selectedInstitution!!.shortName})"
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/gpacalculator/fragment/ModuleListFragment.kt on lines 186..186

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

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

                Snackbar.make(findViewById(android.R.id.content), "Please update scoring mode agian", Snackbar.LENGTH_LONG).show()
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/gpacalculator/AddModuleActivity.kt on lines 90..90

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

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

                    if (!barcode.email?.body.isNullOrEmpty()) putExtra(Intent.EXTRA_TEXT, barcode.email?.body)
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/barcodetools/BarcodeHelper.kt on lines 221..221

Duplicated Code

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

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

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

Tuning

This issue has a mass of 68.

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

                dataSnapshot.children.forEach {
                    institutions.add(it.getValue(GpaInstitution::class.java)!!)
                }
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/gpacalculator/fragment/ModuleListFragment.kt on lines 148..150

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

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

        if (selectedInstitution != null) title = "${selectedInstitution!!.name} (${selectedInstitution!!.shortName})"
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/gpacalculator/fragment/SemesterListFragment.kt on lines 170..170

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

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 void setFromDate() {
        Calendar cal = Calendar.getInstance();
        new DatePickerDialog(this, new FromTimeDate(), cal.get(Calendar.YEAR), cal.get(Calendar.MONTH), cal.get(Calendar.DAY_OF_MONTH)).show();
    }
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/vehiclemileagetracker/AddNewMileageRecordActivity.java on lines 330..333

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

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 void setToDate() {
        Calendar cal = Calendar.getInstance();
        new DatePickerDialog(this, new ToTimeDate(), cal.get(Calendar.YEAR), cal.get(Calendar.MONTH), cal.get(Calendar.DAY_OF_MONTH)).show();
    }
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/vehiclemileagetracker/AddNewMileageRecordActivity.java on lines 291..294

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

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

        } else {
            cameraStatus.setText(R.string.camera_disable_disabled);
            cameraStatus.setTextColor(Color.RED);
            cameraBtn.setText(getString(R.string.camera_disable_camera_status, getString(R.string.camera_disable_enable)));
        }
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/CameraDisablerActivity.java on lines 127..131

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

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

        if (ca) {
            cameraStatus.setText(R.string.camera_disable_enabled);
            cameraStatus.setTextColor(Color.GREEN);
            cameraBtn.setText(getString(R.string.camera_disable_camera_status, getString(R.string.camera_disable_disable)));
        } else {
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/CameraDisablerActivity.java on lines 131..135

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

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

            if (calendarEvent.start != null) result.append("Start: ${getCalString(calendarEvent.start)}\n")
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/barcodetools/BarcodeHelper.kt on lines 327..327

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

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