itachi1706/CheesecakeUtilities

View on GitHub

Showing 517 of 532 total issues

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

    public static String countPushupMore(int neededPts, int ageGroup, Gender object) {
        final int PUSHUP_MAX = 25;
        if (neededPts > PUSHUP_MAX) return "Cannot pass already";
        if (neededPts < 0) return "Pass Already";

app/src/main/java/com/itachi1706/cheesecakeutilities/modules/ipptcalculator/helpers/JsonHelper.java on lines 228..247
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/ipptcalculator/helpers/JsonHelper.java on lines 270..291

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

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 static String countRunMore(int neededPts, int ageGroup, Gender object) {
        final int RUN_MAX = 50;
        if (neededPts > RUN_MAX) return "Cannot pass already";
        if (neededPts < 0) return "Pass Already";

app/src/main/java/com/itachi1706/cheesecakeutilities/modules/ipptcalculator/helpers/JsonHelper.java on lines 228..247
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/ipptcalculator/helpers/JsonHelper.java on lines 249..268

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

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 class FromTimeDate implements DatePickerDialog.OnDateSetListener, TimePickerDialog.OnTimeSetListener {

        @Override
        public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {
            Calendar c = Calendar.getInstance();
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/vehiclemileagetracker/AddNewMileageRecordActivity.java on lines 345..367

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

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 class ToTimeDate implements DatePickerDialog.OnDateSetListener, TimePickerDialog.OnTimeSetListener {

        @Override
        public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {
            Calendar c = Calendar.getInstance();
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/vehiclemileagetracker/AddNewMileageRecordActivity.java on lines 306..328

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

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(view!!, "Institute Deleted", Snackbar.LENGTH_LONG).setAction("Undo") { v ->
            data.child(instituteToDelete.shortName).setValue(instituteToDelete)
            Snackbar.make(v, "Delete undone", Snackbar.LENGTH_SHORT).show()
        }.show()
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/gpacalculator/fragment/ModuleListFragment.kt on lines 123..126

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

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(view!!, "Module Deleted", Snackbar.LENGTH_LONG).setAction("Undo") { v ->
            data.child(moduleToDelete.courseCode).setValue(moduleToDelete)
            Snackbar.make(v, "Delete undone", Snackbar.LENGTH_SHORT).show()
        }.show()
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/gpacalculator/fragment/InstitutionListFragment.kt on lines 91..94

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

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 updateHistory(BarcodeHistoryScan bc) {
        if (getContext() == null) return;
        SharedPreferences sp = PrefHelper.getSharedPreferences(getContext(), "BarcodeHistory");
        String bcString = sp.getString(BarcodeHelper.SP_BARCODE_SCANNED, "");
        ArrayList<BarcodeHistoryScan> array;
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/barcodetools/fragments/BarcodeGeneratorFragment.java on lines 267..280

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

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 updateHistory(BarcodeHistoryGen bc) {
        if (getContext() == null) return;
        SharedPreferences sp = PrefHelper.getSharedPreferences(getContext(), "BarcodeHistory");
        String bcString = sp.getString(BarcodeHelper.SP_BARCODE_GENERATED, "");
        ArrayList<BarcodeHistoryGen> array;
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/barcodetools/fragments/BarcodeScannerFragment.java on lines 112..125

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

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

    val faces = arrayOf("( ͡° ͜ʖ ͡°)","( ͡° ʖ̯ ͡°)","( ͠° ͟ʖ ͡°)","( ͡ᵔ ͜ʖ ͡ᵔ)", "( . •́ _ʖ •̀ .)","( ఠ ͟ʖ ఠ)","( ͡ಠ ʖ̯ ͡ಠ)","( ಠ ʖ̯ ಠ)",
            "( ಠ ͜ʖ ಠ)","( ಥ ʖ̯ ಥ)","( ͡• ͜ʖ ͡• )","( ・ิ ͜ʖ ・ิ)", "( ͡ ͜ʖ ͡ )","(≖ ͜ʖ≖)","(ʘ ʖ̯ ʘ)","(ʘ ͟ʖ ʘ)", "(ʘ ͜ʖ ʘ)","(;´༎ຶٹ༎ຶ`)")
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/unicodekeyboard/Kaomojis.kt on lines 84..86
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/unicodekeyboard/Kaomojis.kt on lines 90..92

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

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

    val weapons = arrayOf("( ・∀・)・・・--------☆","(/-_・)/D・・・・・------ →","(^ω^)ノ゙(((((((((●~*", "( -ω-)/占~~~~~","(/・・)ノ   (( く ((へ","―⊂|=0ヘ(^^ )",
            "○∞∞∞∞ヽ(^ー^ )","(; ・_・)――――C","(ಠ o ಠ)¤=[]:::::>", "(*^^)/~~~~~~~~~~◎","¬o( ̄- ̄メ)","―(T_T)→",
            "(((  ̄□)_/","(メ` ロ ´)︻デ═一","( ´-ω・)︻┻┳══━一", "(メ ̄▽ ̄)︻┳═一","✴==≡눈٩(`皿´҂)ง","Q(`⌒´Q)")
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/unicodekeyboard/Kaomojis.kt on lines 90..92
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/unicodekeyboard/Kaomojis.kt on lines 100..101

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

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

    val food = arrayOf("(っ˘ڡ˘ς)","( o˘◡˘o) ┌iii┐","( ’ω’)旦~~", "( ˘▽˘)っ♨","♨o(>_<)o♨","( ・ω・)o-{{[〃]}}",
            "( ・ω・)⊃-[二二]","( ・・)つ―{}@{}@{}-","( ・・)つ-●●●", "(*´ー`)旦 旦( ̄ω ̄*)","(*´з`)口゚。゚口(・∀・ )","( o^ ^o)且 且(´ω`*)",
            "(  ̄▽ ̄)[] [](≧▽≦ )","( *^^)o∀*∀o(^^* )","( ^^)_旦~~  ~~U_(^^ )", "(* ̄▽ ̄)旦 且(´∀`*)","-●●●-c(・・ )","( ・・)つ―●○◎-")
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/unicodekeyboard/Kaomojis.kt on lines 84..86
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/unicodekeyboard/Kaomojis.kt on lines 100..101

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

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 (albumart != null && nowPlayingLayout != null && album != null && title != null && state != null && artist != null
                            && albumart.getDrawable() != null && newImage instanceof BitmapDrawable && lyrics != null
                            && mainLayout != null) {
                        Bitmap toUseForPalette = ((BitmapDrawable) newImage).getBitmap();
                        new Palette.Builder(toUseForPalette)

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

        val fear = arrayOf("(ノωヽ)","(/。\)","(ノ_ヽ)","..・ヾ(。><)シ", "(″ロ゛)","(;;;*_*)","(・人・)","\(〇_o)/",
                "(/ω\)","(/_\)","〜(><)〜","Σ(°△°|||)︴", "(((><)))","{{ (>_<) }}","\(º □ º l|l)/","〣( ºΔº )〣", "▓▒░(°◡°)░▒▓")
    app/src/main/java/com/itachi1706/cheesecakeutilities/modules/unicodekeyboard/Kaomojis.kt on lines 48..49

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

    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

        val winking = arrayOf("(^_~)","( ゚o⌒)","(^_-)≡☆","(^ω~)", "(>ω^)","(~人^)","(^_-)","( -_・)",
                "(^_<)〜☆","(^人<)〜☆","☆⌒(≧▽​° )","☆⌒(ゝ。∂)", "(^_<)","(^_−)☆","(・ω<)☆","(^.~)☆", "(^.~)")
    app/src/main/java/com/itachi1706/cheesecakeutilities/modules/unicodekeyboard/Kaomojis.kt on lines 34..35

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

    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

                        case SITUP:
                            message.append("\n\nDetails:\nPush-Ups: ").append(pu).append(" (")
                                    .append(JsonHelper.getPushUpScore(pu, ageGroup, exercisesScore)).append(" pts)");
                            message.append("\n2.4 Run: ").append(rm).append(":").append(rs).append(" (")
                                    .append(JsonHelper.getRunScore(rm, rs, ageGroup, exercisesScore)).append(" pts)");
    app/src/main/java/com/itachi1706/cheesecakeutilities/modules/ipptcalculator/IpptCalculatorActivity.java on lines 134..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 124.

    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

                        case PUSHUP:
                            message.append("\n\nDetails:\nSit Ups: ").append(su).append(" (")
                                    .append(JsonHelper.getSitUpScore(su, ageGroup, exercisesScore)).append(" pts)");
                            message.append("\n2.4 Run: ").append(rm).append(":").append(rs).append(" (")
                                    .append(JsonHelper.getRunScore(rm, rs, ageGroup, exercisesScore)).append(" pts)");
    app/src/main/java/com/itachi1706/cheesecakeutilities/modules/ipptcalculator/IpptCalculatorActivity.java on lines 124..133

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

    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 getClassType(id: String): VehClass? {
            if (vehClassList == null) init()
            for (v in vehClassList!!) {
                if (v.id.equals(id, ignoreCase = true)) return v
            }
    app/src/main/java/com/itachi1706/cheesecakeutilities/modules/vehiclemileagetracker/objects/VehicleClass.kt on lines 22..28

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

    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 getClassTypeWithName(className: String): VehClass? {
            if (vehClassList == null) init()
            for (v in vehClassList!!) {
                if (v.fullname.equals(className, ignoreCase = true)) return v
            }
    app/src/main/java/com/itachi1706/cheesecakeutilities/modules/vehiclemileagetracker/objects/VehicleClass.kt on lines 14..20

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

    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

        val surprise = arrayOf("w(°o°)w","ヽ(°〇°)ノ","Σ(O_O)","Σ(°ロ°)", "(⊙_⊙)","(o_O)","(O_O;)","(O.O)", "(°ロ°) !","(o_O) !","(□_□)","Σ(□_□)", "∑(O_O;)","( : ౦ ‸ ౦ : )")
    app/src/main/java/com/itachi1706/cheesecakeutilities/modules/unicodekeyboard/Kaomojis.kt on lines 33..33
    app/src/main/java/com/itachi1706/cheesecakeutilities/modules/unicodekeyboard/Kaomojis.kt on lines 52..52

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

    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

        val pain = arrayOf("~(>_<~)","☆⌒(> _ <)","☆⌒(>。<)","(☆_@)", "(×_×)","(x_x)","(×_×)⌒☆","(x_x)⌒☆", "(×﹏×)","☆(#××)","(+_+)","[ ± _ ± ]", "٩(× ×)۶","_:(´ཀ`」 ∠):_")
    app/src/main/java/com/itachi1706/cheesecakeutilities/modules/unicodekeyboard/Kaomojis.kt on lines 41..41
    app/src/main/java/com/itachi1706/cheesecakeutilities/modules/unicodekeyboard/Kaomojis.kt on lines 52..52

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

    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