Playhi/FreezeYou

View on GitHub

Showing 285 of 313 total issues

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

    override fun update(
        uri: Uri,
        values: ContentValues?,
        selection: String?,
        selectionArgs: Array<String>?
Severity: Minor
Found in app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt and 1 other location - About 1 hr to fix
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 40..47

Duplicated Code

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

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

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

Tuning

This issue has a mass of 89.

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

    createQuickFUFNotiAfterUnfrozen {
        override fun defaultValue(): Boolean = true
        override fun titleTextStringId(): Int = R.string.createQuickFUFNotiAfterUnfrozen
        override fun category(): Int =
            CATEGORY_SETTINGS or CATEGORY_SETTINGS_NOTIFICATION or CATEGORY_SETTINGS_NOTIFICATION_FUF
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 142..147
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 156..161

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

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

    notificationBarFreezeImmediately {
        override fun defaultValue(): Boolean = true
        override fun titleTextStringId(): Int = R.string.notificationBarFreezeImmediately
        override fun category(): Int =
            CATEGORY_SETTINGS or CATEGORY_SETTINGS_NOTIFICATION or CATEGORY_SETTINGS_NOTIFICATION_FUF
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 135..140
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 156..161

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

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

    notificationBarDisableClickDisappear {
        override fun defaultValue(): Boolean = true
        override fun titleTextStringId(): Int = R.string.disableClickDisappear
        override fun category(): Int =
            CATEGORY_SETTINGS or CATEGORY_SETTINGS_NOTIFICATION or CATEGORY_SETTINGS_NOTIFICATION_FUF
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 135..140
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 142..147

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

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

        if (w != null) {
            View v = (View) w.findViewById(android.R.id.custom);
            if (v != null) {
                View p = (View) v.getParent();
                if (p != null)
app/src/main/java/cf/playhi/freezeyou/ui/InstallPackagesActivity.java on lines 524..531
app/src/main/java/cf/playhi/freezeyou/ui/ShortcutLauncherFolderActivity.java on lines 152..159
app/src/main/java/cf/playhi/freezeyou/ui/ShortcutLauncherFolderActivity.java on lines 261..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 68.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

            if (w != null) {
                View v1 = (View) w.findViewById(android.R.id.custom);
                if (v1 != null) {
                    View p = (View) v1.getParent();
                    if (p != null)
app/src/main/java/cf/playhi/freezeyou/ui/InstallPackagesActivity.java on lines 524..531
app/src/main/java/cf/playhi/freezeyou/ui/ShortcutLauncherFolderActivity.java on lines 152..159
app/src/main/java/cf/playhi/freezeyou/ui/UriFreezeActivity.java on lines 286..293

Duplicated Code

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

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

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

Tuning

This issue has a mass of 68.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

        if (w != null) {
            View v = (View) w.findViewById(android.R.id.custom);
            if (v != null) {
                View p = (View) v.getParent();
                if (p != null)
app/src/main/java/cf/playhi/freezeyou/ui/ShortcutLauncherFolderActivity.java on lines 152..159
app/src/main/java/cf/playhi/freezeyou/ui/ShortcutLauncherFolderActivity.java on lines 261..268
app/src/main/java/cf/playhi/freezeyou/ui/UriFreezeActivity.java on lines 286..293

Duplicated Code

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

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

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

Tuning

This issue has a mass of 68.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

        if (w != null) {
            View v = (View) w.findViewById(android.R.id.custom);
            if (v != null) {
                View p = (View) v.getParent();
                if (p != null)
app/src/main/java/cf/playhi/freezeyou/ui/InstallPackagesActivity.java on lines 524..531
app/src/main/java/cf/playhi/freezeyou/ui/ShortcutLauncherFolderActivity.java on lines 261..268
app/src/main/java/cf/playhi/freezeyou/ui/UriFreezeActivity.java on lines 286..293

Duplicated Code

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

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

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

Tuning

This issue has a mass of 68.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

                case "foq":
                    HashMap<String, String> keyValuePair = new HashMap<>();
                    keyValuePair.put("title",
                            keyToStringIdValuePair.containsKey(s) ?
                                    keyToStringIdValuePair.get(s) : s);
app/src/main/java/cf/playhi/freezeyou/ui/BackupImportChooserActivity.java on lines 254..262

Duplicated Code

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

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

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

Tuning

This issue has a mass of 66.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

                case "sortMethodStatus":
                    HashMap<String, String> keyValuePair = new HashMap<>();
                    keyValuePair.put("title",
                            keyToStringIdValuePair.containsKey(s) ?
                                    keyToStringIdValuePair.get(s) : s);
app/src/main/java/cf/playhi/freezeyou/ui/BackupImportChooserActivity.java on lines 329..337

Duplicated Code

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

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

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

Tuning

This issue has a mass of 66.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

                                        if (cursor1.moveToFirst()) {
                                            for (int i = 0; i < cursor1.getCount(); i++) {
                                                if (label.equals(cursor1.getString(cursor1.getColumnIndexOrThrow("label")))) {
                                                    alreadyExists = true;
                                                    break;
Severity: Minor
Found in app/src/main/java/cf/playhi/freezeyou/utils/Support.java and 1 other location - About 55 mins to fix
app/src/main/java/cf/playhi/freezeyou/Main.java on lines 2184..2192

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

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 (cursor.moveToFirst()) {
                        for (int i = 0; i < cursor.getCount(); i++) {
                            if (label.equals(cursor.getString(cursor.getColumnIndex("label")))) {
                                alreadyExists = true;
                                break;
Severity: Minor
Found in app/src/main/java/cf/playhi/freezeyou/Main.java and 1 other location - About 55 mins to fix
app/src/main/java/cf/playhi/freezeyou/utils/Support.java on lines 159..167

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

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

    lesserToast {
        override fun defaultValue(): Boolean = false
        override fun titleTextStringId(): Int = R.string.lesserToast
        override fun category(): Int = CATEGORY_SETTINGS or CATEGORY_SETTINGS_COMMON
    },
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 21..25
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 33..37
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 39..43
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 45..49
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 57..61
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 69..73
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 75..79
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 81..85
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 87..91
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 93..97
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 99..103
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 117..121
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 129..133
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultSharedPreferenceStorageBooleanKeys.kt on lines 21..25
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultSharedPreferenceStorageBooleanKeys.kt on lines 27..31
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultSharedPreferenceStorageBooleanKeys.kt on lines 39..43

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

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

    freezeOnceQuit {
        override fun defaultValue(): Boolean = false
        override fun titleTextStringId(): Int = R.string.freezeOnceQuit
        override fun category(): Int = CATEGORY_SETTINGS or CATEGORY_SETTINGS_AUTOMATION
    },
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 21..25
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 33..37
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 45..49
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 57..61
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 63..67
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 69..73
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 75..79
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 81..85
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 87..91
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 93..97
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 99..103
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 117..121
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 129..133
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultSharedPreferenceStorageBooleanKeys.kt on lines 21..25
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultSharedPreferenceStorageBooleanKeys.kt on lines 27..31
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultSharedPreferenceStorageBooleanKeys.kt on lines 39..43

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

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

    includeFUFActivityInRecents {
        override fun defaultValue(): Boolean = false
        override fun titleTextStringId(): Int = R.string.includeFUFActivityInRecents
        override fun category(): Int = CATEGORY_SETTINGS or CATEGORY_SETTINGS_COMMON
    },
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 21..25
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 33..37
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 39..43
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 45..49
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 63..67
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 69..73
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 75..79
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 81..85
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 87..91
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 93..97
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 99..103
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 117..121
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 129..133
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultSharedPreferenceStorageBooleanKeys.kt on lines 21..25
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultSharedPreferenceStorageBooleanKeys.kt on lines 27..31
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultSharedPreferenceStorageBooleanKeys.kt on lines 39..43

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

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

    avoidFreezeForegroundApplications {
        override fun defaultValue(): Boolean = false
        override fun titleTextStringId(): Int = R.string.avoidFreezeForegroundApplications
        override fun category(): Int = CATEGORY_SETTINGS or CATEGORY_SETTINGS_FREEZE_AND_UNFREEZE
    },
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 21..25
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 33..37
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 39..43
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 45..49
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 57..61
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 63..67
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 75..79
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 81..85
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 87..91
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 93..97
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 99..103
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 117..121
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 129..133
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultSharedPreferenceStorageBooleanKeys.kt on lines 21..25
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultSharedPreferenceStorageBooleanKeys.kt on lines 27..31
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultSharedPreferenceStorageBooleanKeys.kt on lines 39..43

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

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

    avoidFreezeNotifyingApplications {
        override fun defaultValue(): Boolean = false
        override fun titleTextStringId(): Int = R.string.avoidFreezeNotifyingApplications
        override fun category(): Int = CATEGORY_SETTINGS or CATEGORY_SETTINGS_FREEZE_AND_UNFREEZE
    },
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 21..25
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 33..37
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 39..43
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 45..49
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 57..61
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 63..67
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 69..73
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 81..85
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 87..91
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 93..97
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 99..103
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 117..121
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 129..133
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultSharedPreferenceStorageBooleanKeys.kt on lines 21..25
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultSharedPreferenceStorageBooleanKeys.kt on lines 27..31
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultSharedPreferenceStorageBooleanKeys.kt on lines 39..43

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

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

    noCaution {
        override fun defaultValue(): Boolean = false
        override fun titleTextStringId(): Int = R.string.nSCaution
        override fun category(): Int = CATEGORY_SETTINGS or CATEGORY_SETTINGS_COMMON
    },
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 21..25
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 33..37
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 39..43
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 45..49
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 57..61
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 63..67
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 69..73
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 75..79
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 81..85
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 87..91
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 93..97
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 99..103
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 117..121
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 129..133
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultSharedPreferenceStorageBooleanKeys.kt on lines 27..31
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultSharedPreferenceStorageBooleanKeys.kt on lines 39..43

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

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

    cacheApplicationsIcons {
        override fun defaultValue(): Boolean = false
        override fun titleTextStringId(): Int = R.string.cacheApplicationsIcons
        override fun category(): Int = CATEGORY_SETTINGS or CATEGORY_SETTINGS_COMMON
    },
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 21..25
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 33..37
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 39..43
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 45..49
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 57..61
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 63..67
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 69..73
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 75..79
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 81..85
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 87..91
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 93..97
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 99..103
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 117..121
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 129..133
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultSharedPreferenceStorageBooleanKeys.kt on lines 21..25
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultSharedPreferenceStorageBooleanKeys.kt on lines 27..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 81.

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

    tryDelApkAfterInstalled {
        override fun defaultValue(): Boolean = false
        override fun titleTextStringId(): Int = R.string.tryDelApkAfterInstalled
        override fun category(): Int = CATEGORY_SETTINGS or CATEGORY_SETTINGS_INSTALL_UNINSTALL
    },
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 21..25
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 33..37
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 39..43
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 45..49
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 57..61
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 63..67
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 69..73
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 75..79
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 81..85
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 87..91
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 93..97
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 99..103
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultMultiProcessMMKVStorageBooleanKeys.kt on lines 129..133
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultSharedPreferenceStorageBooleanKeys.kt on lines 21..25
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultSharedPreferenceStorageBooleanKeys.kt on lines 27..31
app/src/main/java/cf/playhi/freezeyou/storage/key/DefaultSharedPreferenceStorageBooleanKeys.kt on lines 39..43

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

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