itachi1706/CheesecakeUtilities

View on GitHub

Showing 517 of 532 total issues

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

        if ((moveMade == 1 || moveMade == 3 || moveMade == 5 || moveMade == 7)
                && gameBoard[lastRow][lastCol].equals(TicTacToeValues.X))
app/src/main/java/com/itachi1706/cheesecakeutilities/games/tictactoe/ComputerAI.java on lines 164..165

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

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

Consider simplifying this complex logical expression.
Open

        if (locationTo.getText().toString().isEmpty() || purpose.getText().toString().isEmpty()
                || mileageAfter.getText().toString().isEmpty() || mileageBefore.getText().toString().isEmpty() || fromTimeVal == 0
                || toTimeVal == 0) {
            Snackbar.make(layout, "Please fill up all of the fields and ensure that they are correct", Snackbar.LENGTH_SHORT).show();
            return false;

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

    package com.itachi1706.cheesecakeutilities.views;
    
    import android.content.Context;
    import android.util.AttributeSet;
    import android.view.MotionEvent;
    app/src/main/java/com/itachi1706/cheesecakeutilities/views/VScroll.java on lines 1..31

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

    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

    package com.itachi1706.cheesecakeutilities.views;
    
    import android.content.Context;
    import android.util.AttributeSet;
    import android.view.MotionEvent;
    app/src/main/java/com/itachi1706/cheesecakeutilities/views/HScroll.java on lines 1..31

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

    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

        fun serialize(): String {
            return startHr.toString() + ":" + startMin + ":" + endHr + ":" + endMin
        }
    app/src/main/java/com/itachi1706/cheesecakeutilities/modules/connectivityquiethours/objects/ConnectivityPeriod.kt on lines 42..44

    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

        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

    Severity
    Category
    Status
    Source
    Language