itachi1706/CheesecakeUtilities

View on GitHub

Showing 236 of 532 total issues

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

    override fun toString(): String {
        return startHr.toString() + ":" + startMin + " - " + endHr + ":" + endMin
    }
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/connectivityquiethours/objects/ConnectivityPeriod.kt on lines 46..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 70.

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 (edited.courseCode != module!!.courseCode) {
                // Change of shortname as well, delete old key
                db.child(module!!.courseCode).removeValue()
            }
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/gpacalculator/AddInstitutionActivity.kt on lines 163..166

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

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 (edited.shortName != institute!!.shortName) {
                // Change of shortname as well, delete old key
                db.child(institute!!.shortName).removeValue()
            }
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/gpacalculator/AddModuleActivity.kt on lines 140..143

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

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

    HtcSerialNumberDates(String code, int year, String month, int date){
        this.code = code;
        this.year = year;
        this.month = month;
        this.date = date;
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/StorageFragment.java on lines 48..53
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/vehiclemileagetracker/recyclerAdapters/VehicleMileageRecordsAdapter.java on lines 48..53

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

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

    public VehicleMileageRecordsAdapter(List<Record> recordList, List<String> tags, DataSnapshot vehicles, boolean decimal) {
        this.recordsList = recordList;
        this.tags = tags;
        this.vehicles = vehicles;
        this.decimal = decimal;
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/htcserialidentification/util/HtcSerialNumberDates.java on lines 49..54
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/StorageFragment.java on lines 48..53

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

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

        Mounts(String mountDevice, String mountPoint, String filesystem, String options) {
            this.mountDevice = mountDevice;
            this.mountPoint = mountPoint;
            this.filesystem = filesystem;
            this.options = options;
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/htcserialidentification/util/HtcSerialNumberDates.java on lines 49..54
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/vehiclemileagetracker/recyclerAdapters/VehicleMileageRecordsAdapter.java on lines 48..53

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

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

            Surface.ROTATION_90, Surface.ROTATION_270 -> if (sensorOrientation == 0 || sensorOrientation == 180) swappedDimensions = true
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/cameraviewer/Camera2BasicFragment.kt on lines 211..211

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

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

            Surface.ROTATION_0, Surface.ROTATION_180 -> if (sensorOrientation == 90 || sensorOrientation == 270) swappedDimensions = true
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/cameraviewer/Camera2BasicFragment.kt on lines 212..212

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

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 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 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 (availableSize >= 1024.0d) {
            availableSize = ((double) Math.round((100.0d * availableSize) / 1024.0d)) / 100.0d;
            unitAvail = " 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 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 (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/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

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 (availableSize >= 1024.0d) {
            availableSize = ((double) Math.round((100.0d * availableSize) / 1024.0d)) / 100.0d;
            unitAvail = " 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 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 (availableSize >= 1024.0d) {
            availableSize = ((double) Math.round((100.0d * availableSize) / 1024.0d)) / 100.0d;
            unitAvail = " 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 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 (availableSize >= 1024.0d) {
            availableSize = ((double) Math.round((100.0d * availableSize) / 1024.0d)) / 100.0d;
            unitAvail = " 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 165..168
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 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

Severity
Category
Status
Source
Language