Playhi/FreezeYou

View on GitHub

Showing 285 of 313 total issues

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

            FUFMode.MODE_SYSTEM_APP_ENABLE_DISABLE -> {
                bundle.putInt(
                    "result",
                    doApiV2Action(
                        context, pkgName, FUFSinglePackage.API_FREEZEYOU_SYSTEM_APP_ENABLE_DISABLE
Severity: Major
Found in app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt and 13 other locations - About 40 mins to fix
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 152..160
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 161..169
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 170..178
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 190..198
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 199..208
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 209..218
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 219..228
app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt on lines 146..154
app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt on lines 155..163
app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt on lines 164..172
app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt on lines 193..202
app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt on lines 203..212
app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt on lines 213..222

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

            FUFMode.MODE_SYSTEM_APP_ENABLE_DISABLE_USER -> {
                bundle.putInt(
                    "result",
                    doApiV2Action(
                        context, pkgName,
Severity: Major
Found in app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt and 13 other locations - About 40 mins to fix
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 152..160
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 161..169
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 170..178
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 190..198
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 199..208
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 209..218
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 219..228
app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt on lines 146..154
app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt on lines 155..163
app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt on lines 164..172
app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt on lines 184..192
app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt on lines 203..212
app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt on lines 213..222

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

            FUFMode.MODE_ROOT_HIDE_UNHIDE -> {
                bundle.putInt(
                    "result",
                    doApiV2Action(
                        context, pkgName, FUFSinglePackage.API_FREEZEYOU_ROOT_UNHIDE_HIDE
Severity: Major
Found in app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt and 13 other locations - About 40 mins to fix
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 152..160
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 161..169
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 170..178
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 190..198
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 199..208
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 209..218
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 219..228
app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt on lines 146..154
app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt on lines 155..163
app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt on lines 184..192
app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt on lines 193..202
app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt on lines 203..212
app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt on lines 213..222

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

            FUFMode.MODE_ROOT_DISABLE_ENABLE -> {
                bundle.putInt(
                    "result",
                    doApiV2Action(
                        context, pkgName, FUFSinglePackage.API_FREEZEYOU_ROOT_DISABLE_ENABLE
Severity: Major
Found in app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt and 13 other locations - About 40 mins to fix
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 152..160
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 170..178
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 190..198
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 199..208
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 209..218
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 219..228
app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt on lines 146..154
app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt on lines 155..163
app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt on lines 164..172
app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt on lines 184..192
app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt on lines 193..202
app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt on lines 203..212
app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt on lines 213..222

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

            FUFMode.MODE_DPM -> {
                bundle.putInt(
                    "result",
                    doApiV2Action(
                        context, pkgName, FUFSinglePackage.API_FREEZEYOU_MROOT_DPM
Severity: Major
Found in app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt and 13 other locations - About 40 mins to fix
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 161..169
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 170..178
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 190..198
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 199..208
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 209..218
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 219..228
app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt on lines 146..154
app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt on lines 155..163
app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt on lines 164..172
app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt on lines 184..192
app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt on lines 193..202
app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt on lines 203..212
app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt on lines 213..222

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

            FUFMode.MODE_SYSTEM_APP_ENABLE_DISABLE_UNTIL_USED -> {
                bundle.putInt(
                    "result",
                    doApiV2Action(
                        context, pkgName,
Severity: Major
Found in app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt and 13 other locations - About 40 mins to fix
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 152..160
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 161..169
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 170..178
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 190..198
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 199..208
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 209..218
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 219..228
app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt on lines 146..154
app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt on lines 155..163
app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt on lines 164..172
app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt on lines 184..192
app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt on lines 193..202
app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt on lines 213..222

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

            FUFMode.MODE_PROFILE_OWNER -> {
                bundle.putInt(
                    "result",
                    doApiV2Action(
                        context, pkgName,
Severity: Major
Found in app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt and 13 other locations - About 40 mins to fix
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 152..160
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 161..169
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 170..178
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 190..198
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 199..208
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 209..218
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 219..228
app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt on lines 146..154
app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt on lines 155..163
app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt on lines 164..172
app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt on lines 184..192
app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt on lines 193..202
app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt on lines 203..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

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

            FUFMode.MODE_ROOT_HIDE_UNHIDE -> {
                bundle.putInt(
                    "result",
                    doApiV2Action(
                        context, pkgName, FUFSinglePackage.API_FREEZEYOU_ROOT_UNHIDE_HIDE
Severity: Major
Found in app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt and 13 other locations - About 40 mins to fix
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 152..160
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 161..169
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 190..198
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 199..208
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 209..218
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 219..228
app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt on lines 146..154
app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt on lines 155..163
app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt on lines 164..172
app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt on lines 184..192
app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt on lines 193..202
app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt on lines 203..212
app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt on lines 213..222

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

            FUFMode.MODE_SYSTEM_APP_ENABLE_DISABLE -> {
                bundle.putInt(
                    "result",
                    doApiV2Action(
                        context, pkgName, FUFSinglePackage.API_FREEZEYOU_SYSTEM_APP_ENABLE_DISABLE
Severity: Major
Found in app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt and 13 other locations - About 40 mins to fix
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 152..160
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 161..169
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 170..178
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 199..208
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 209..218
app/src/main/java/cf/playhi/freezeyou/export/Freeze.kt on lines 219..228
app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt on lines 146..154
app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt on lines 155..163
app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt on lines 164..172
app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt on lines 184..192
app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt on lines 193..202
app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt on lines 203..212
app/src/main/java/cf/playhi/freezeyou/export/Unfreeze.kt on lines 213..222

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

        addTriggerButton.setOnClickListener(v -> {
            changeFloatButtonsStatus(false);
            startActivityForResult(
                    new Intent(ScheduledTasksManageActivity.this, ScheduledTasksAddActivity.class)
                            .putExtra("label", getString(R.string.add))
app/src/main/java/cf/playhi/freezeyou/ui/ScheduledTasksManageActivity.java on lines 206..213

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

            createShortCut(
                    getApplicationLabel(Main.this, null, null, pkgName),
                    pkgName,
                    getApplicationIcon(
                            Main.this,
Severity: Minor
Found in app/src/main/java/cf/playhi/freezeyou/Main.java and 1 other location - About 40 mins to fix
app/src/main/java/cf/playhi/freezeyou/Main.java on lines 983..994

Duplicated Code

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

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

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

Tuning

This issue has a mass of 48.

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

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

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

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

Refactorings

Further Reading

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

        addTimeButton.setOnClickListener(v -> {
            changeFloatButtonsStatus(false);
            startActivityForResult(
                    new Intent(ScheduledTasksManageActivity.this, ScheduledTasksAddActivity.class)
                            .putExtra("label", getString(R.string.add))
app/src/main/java/cf/playhi/freezeyou/ui/ScheduledTasksManageActivity.java on lines 215..222

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

                                                    createShortCut(
                                                            getApplicationLabel(Main.this, null, null, pkgName),
                                                            pkgName,
                                                            getApplicationIcon(
                                                                    Main.this,
Severity: Minor
Found in app/src/main/java/cf/playhi/freezeyou/Main.java and 1 other location - About 40 mins to fix
app/src/main/java/cf/playhi/freezeyou/Main.java on lines 1567..1578

Duplicated Code

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

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

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

Tuning

This issue has a mass of 48.

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

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

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

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

Refactorings

Further Reading

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

                    API_FREEZEYOU_MROOT_PROFILE_OWNER ->
                        if (!DevicePolicyManagerUtils.isProfileOwner(context)) {
                            showToast(context, R.string.isNotProfileOwner)
                        }
Severity: Minor
Found in app/src/main/java/cf/playhi/freezeyou/utils/SettingsUtils.kt and 1 other location - About 35 mins to fix
app/src/main/java/cf/playhi/freezeyou/utils/SettingsUtils.kt on lines 126..129

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

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

                    API_FREEZEYOU_MROOT_DPM ->
                        if (!DevicePolicyManagerUtils.isDeviceOwner(context)) {
                            showToast(context, R.string.noMRootPermission)
                        }
Severity: Minor
Found in app/src/main/java/cf/playhi/freezeyou/utils/SettingsUtils.kt and 1 other location - About 35 mins to fix
app/src/main/java/cf/playhi/freezeyou/utils/SettingsUtils.kt on lines 130..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 67.

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

        PendingIntent alarmIntent =
                PendingIntent.getBroadcast(
                        context, id, intent,
                        Build.VERSION.SDK_INT >= Build.VERSION_CODES.M
                                ? PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE
Severity: Major
Found in app/src/main/java/cf/playhi/freezeyou/utils/TasksUtils.java and 3 other locations - About 35 mins to fix
app/src/main/java/cf/playhi/freezeyou/utils/NotificationUtils.java on lines 47..51
app/src/main/java/cf/playhi/freezeyou/utils/TasksUtils.java on lines 356..364
app/src/main/java/cf/playhi/freezeyou/utils/TasksUtils.java on lines 517..522

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

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

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

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

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

Refactorings

Further Reading

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

        final SimpleAdapter simpleAdapter =
                new SimpleAdapter(
                        this,
                        listsDataArrayList,
                        R.layout.udlma_list_item,
app/src/main/java/cf/playhi/freezeyou/ui/FUFNotificationsManageActivity.java on lines 71..72
app/src/main/java/cf/playhi/freezeyou/ui/FUFNotificationsManageActivity.java on lines 46..47
app/src/main/java/cf/playhi/freezeyou/ui/UriAutoAllowManageActivity.java on lines 94..95
app/src/main/java/cf/playhi/freezeyou/ui/UriAutoAllowManageActivity.java on lines 62..63

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

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

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

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

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

Refactorings

Further Reading

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

                    if (enabled == 1 && "onLeaveApplications".equals(tg) && ("".equals(tgExtra) || Arrays.asList(OneKeyListUtils.decodeUserListsInPackageNames(this, tgExtra.split(","))).contains(previousPkg))) {
Severity: Minor
Found in app/src/main/java/cf/playhi/freezeyou/AccessibilityService.java and 1 other location - About 35 mins to fix
app/src/main/java/cf/playhi/freezeyou/AccessibilityService.java on lines 138..138

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

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

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

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

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

Refactorings

Further Reading

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

        PendingIntent alarmIntent =
                PendingIntent.getBroadcast(
                        context, id, intent,
                        Build.VERSION.SDK_INT >= Build.VERSION_CODES.M
                                ? PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_IMMUTABLE
Severity: Major
Found in app/src/main/java/cf/playhi/freezeyou/utils/TasksUtils.java and 3 other locations - About 35 mins to fix
app/src/main/java/cf/playhi/freezeyou/utils/NotificationUtils.java on lines 47..51
app/src/main/java/cf/playhi/freezeyou/utils/TasksUtils.java on lines 58..64
app/src/main/java/cf/playhi/freezeyou/utils/TasksUtils.java on lines 356..364

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

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

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

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

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

Refactorings

Further Reading

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

            final SimpleAdapter adapter = new SimpleAdapter(this, pkgList,
                    R.layout.uaam_list, new String[]{"Name", "PkgName"}, new int[]{R.id.uaaml_name, R.id.uaaml_pkgName});
app/src/main/java/cf/playhi/freezeyou/ui/FUFNotificationsManageActivity.java on lines 71..72
app/src/main/java/cf/playhi/freezeyou/ui/FUFNotificationsManageActivity.java on lines 46..47
app/src/main/java/cf/playhi/freezeyou/ui/UriAutoAllowManageActivity.java on lines 94..95
app/src/main/java/cf/playhi/freezeyou/ui/UserDefinedListsManageActivity.java on lines 80..87

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

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

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

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

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

Refactorings

Further Reading

Severity
Category
Status
Source
Language