itachi1706/CheesecakeUtilities

View on GitHub

Showing 517 of 532 total issues

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

    val doubt = arrayOf("(¬_¬)","(→_→)","(¬ ¬)","(¬‿¬ )", "(¬_¬ )","(←_←)","(¬ ¬ )","(¬‿¬ )", "(↼_↼)","(⇀_⇀)")
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/unicodekeyboard/Kaomojis.kt on lines 55..55
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/unicodekeyboard/Kaomojis.kt on lines 87..89

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

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 magic = arrayOf("(ノ ˘_˘)ノ ζ|||ζ ζ|||ζ ζ|||ζ","(ノ≧∀≦)ノ ‥…━━━★","(ノ>ω<)ノ :。・:*:・゚’★,。・:*:・゚’☆",
            "(ノ°∀°)ノ⌒・*:.。. .。.:*・゜゚・*☆","╰( ͡° ͜ʖ ͡° )つ──☆*:・゚","(# ̄□ ̄)o━∈・・━━━━☆",
            "(⊃。•́‿•̀。)⊃━✿✿✿✿✿✿","(∩ᄑ_ᄑ)⊃━☆゚*・。*・:≡( ε:)","(/ ̄ー ̄)/~~☆’.・.・:★’.・.・:☆", "(∩` ロ ´)⊃━炎炎炎炎炎")
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/unicodekeyboard/Kaomojis.kt on lines 40..40
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/unicodekeyboard/Kaomojis.kt on lines 55..55

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

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 (selectedInstitutionString == null) {
            LogHelper.e(TAG, "Institution not selected!")
            Snackbar.make(v, "An error has occurred. (Institution not found)", Snackbar.LENGTH_LONG).show()
            callback?.goBack()
            return false
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/gpacalculator/fragment/ModuleListFragment.kt on lines 47..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 91.

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

    public void popDialog(View v) {
        Calendar calendar = Calendar.getInstance();
        if (this.popMS > 0) calendar.setTimeInMillis(this.popMS);
        new DatePickerDialog(this, this.pop, calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH), calendar.get(Calendar.DAY_OF_MONTH)).show();
    }
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/ordcountdown/ORDSettingsActivity.java on lines 182..186
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/ordcountdown/ORDSettingsActivity.java on lines 188..192
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/ordcountdown/ORDSettingsActivity.java on lines 194..198

Duplicated Code

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

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

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

Tuning

This issue has a mass of 70.

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

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

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

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

Refactorings

Further Reading

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

    public void enlistDialog(View v) {
        Calendar calendar = Calendar.getInstance();
        if (this.enlistMS > 0) calendar.setTimeInMillis(this.enlistMS);
        new DatePickerDialog(this, this.enlist, calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH), calendar.get(Calendar.DAY_OF_MONTH)).show();
    }
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/ordcountdown/ORDSettingsActivity.java on lines 182..186
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/ordcountdown/ORDSettingsActivity.java on lines 188..192
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/ordcountdown/ORDSettingsActivity.java on lines 200..204

Duplicated Code

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

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

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

Tuning

This issue has a mass of 70.

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

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

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

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

Refactorings

Further Reading

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

        try {
            freq = new RandomAccessFile("/sys/devices/platform/gpusysfs/gpu_clock", "r").readLine();
        } catch (IOException ex) {
            if (err_gpu_clock1_count <= SUPRESS_WARNINGS)
                LogHelper.e("GPU-READ", "Error reading file: " + ex.getLocalizedMessage());
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/DeviceFragment.java on lines 148..156
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/DeviceFragment.java on lines 188..196
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/GpuFragment.java on lines 114..122

Duplicated Code

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

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

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

Tuning

This issue has a mass of 70.

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

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

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

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

Refactorings

Further Reading

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

    public void ptpDialog(View v) {
        Calendar calendar = Calendar.getInstance();
        if (this.ptpMS > 0) calendar.setTimeInMillis(this.ptpMS);
        new DatePickerDialog(this, this.ptp, calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH), calendar.get(Calendar.DAY_OF_MONTH)).show();
    }
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/ordcountdown/ORDSettingsActivity.java on lines 188..192
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/ordcountdown/ORDSettingsActivity.java on lines 194..198
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/ordcountdown/ORDSettingsActivity.java on lines 200..204

Duplicated Code

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

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

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

Tuning

This issue has a mass of 70.

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

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

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

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

Refactorings

Further Reading

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

    public void ordDialog(View v) {
        Calendar calendar = Calendar.getInstance();
        if (this.ordMS > 0) calendar.setTimeInMillis(this.ordMS);
        new DatePickerDialog(this, this.ord, calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH), calendar.get(Calendar.DAY_OF_MONTH)).show();
    }
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/ordcountdown/ORDSettingsActivity.java on lines 182..186
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/ordcountdown/ORDSettingsActivity.java on lines 194..198
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/ordcountdown/ORDSettingsActivity.java on lines 200..204

Duplicated Code

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

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

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

Tuning

This issue has a mass of 70.

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

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

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

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

Refactorings

Further Reading

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

        try {
            freq = new RandomAccessFile("/sys/class/kgsl/kgsl-3d0/gpuclk", "r").readLine();
        } catch (IOException ex) {
            if (err_gpu_clock_count <= SUPRESS_WARNINGS)
                LogHelper.e("GPU-READ", "Error reading file: " + ex.getLocalizedMessage());
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/DeviceFragment.java on lines 148..156
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/DeviceFragment.java on lines 188..196
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/GpuFragment.java on lines 144..152

Duplicated Code

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

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

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

Tuning

This issue has a mass of 70.

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

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

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

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

Refactorings

Further Reading

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

        try {
            freq = new RandomAccessFile("/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq", "r").readLine();
        } catch (IOException ex) {
            if (err_cpu_freq_count <= SUPRESS_WARNINGS)
                LogHelper.e("CPU-READ", "Error reading file: " + ex.getLocalizedMessage());
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/DeviceFragment.java on lines 148..156
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/GpuFragment.java on lines 114..122
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/GpuFragment.java on lines 144..152

Duplicated Code

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

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

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

Tuning

This issue has a mass of 70.

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

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

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

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

Refactorings

Further Reading

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

        try {
            load = new RandomAccessFile("/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq", "r").readLine();
        } catch (IOException ex) {
            if (err_cpu_min_count <= SUPRESS_WARNINGS)
                LogHelper.e("CPU-READ", "Error reading file: " + ex.getLocalizedMessage());
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/DeviceFragment.java on lines 188..196
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/GpuFragment.java on lines 114..122
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/GpuFragment.java on lines 144..152

Duplicated Code

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

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

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

Tuning

This issue has a mass of 70.

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

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

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

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

Refactorings

Further Reading

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

    private static class MyInnerHandler extends Handler {
        WeakReference<NetworkFragment> mFrag;

        MyInnerHandler(NetworkFragment aFragment) {
            this.mFrag = new WeakReference<>(aFragment);
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/DeviceFragment.java on lines 39..56
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/GpuFragment.java on lines 32..49
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/SystemFragment.java on lines 50..67

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

    private static class MyInnerHandler extends Handler {
        WeakReference<SystemFragment> mFrag;

        MyInnerHandler(SystemFragment aFragment) {
            this.mFrag = new WeakReference<>(aFragment);
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/DeviceFragment.java on lines 39..56
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/GpuFragment.java on lines 32..49
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/NetworkFragment.java on lines 33..50

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

    private static class MyInnerHandler extends Handler {
        WeakReference<GpuFragment> mFrag;

        MyInnerHandler(GpuFragment aFragment) {
            this.mFrag = new WeakReference<>(aFragment);
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/DeviceFragment.java on lines 39..56
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/NetworkFragment.java on lines 33..50
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/SystemFragment.java on lines 50..67

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

    private static class MyInnerHandler extends Handler {
        WeakReference<DeviceFragment> mFrag;

        MyInnerHandler(DeviceFragment aFragment) {
            this.mFrag = new WeakReference<>(aFragment);
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/GpuFragment.java on lines 32..49
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/NetworkFragment.java on lines 33..50
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/systeminformation/fragments/SystemFragment.java on lines 50..67

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

        val clearButton = onView(allOf(withId(R.id.btn_binhex_clear), withText("CLEAR"), childAtPosition(allOf(withId(R.id.tr_binhex_action),
                childAtPosition(withId(R.id.table_binhex_action), 0)), 2)))
app/src/androidTest/java/com/itachi1706/cheesecakeutilities/BinHexModuleActivityTest.kt on lines 59..60

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

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 decodeOption = onView(allOf(withId(R.id.rb_binhex_decode), withText("Decode"), childAtPosition(allOf(withId(R.id.radio_binhex_action),
                childAtPosition(withId(R.id.tr_binhex_01), 2)), 1), isDisplayed()))
app/src/androidTest/java/com/itachi1706/cheesecakeutilities/BinHexModuleActivityTest.kt on lines 54..55

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

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

        if (sharedPreferences.getBoolean(NAVBAR_SHOW_APPNAME, true) && tvAppName.getVisibility() == View.GONE)
            tvAppName.setVisibility(View.VISIBLE);
        else if (!sharedPreferences.getBoolean(NAVBAR_SHOW_APPNAME, true) && tvAppName.getVisibility() == View.VISIBLE)
            tvAppName.setVisibility(View.GONE);
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/navbarcustomization/NavBarService.java on lines 271..274

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

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

        if (sharedPreferences.getBoolean(NAVBAR_SHOW_IMAGE, true) && ivImage.getVisibility() == View.GONE)
            ivImage.setVisibility(View.VISIBLE);
        else if (!sharedPreferences.getBoolean(NAVBAR_SHOW_IMAGE, true) && ivImage.getVisibility() == View.VISIBLE)
            ivImage.setVisibility(View.GONE);
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/navbarcustomization/NavBarService.java on lines 266..269

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 (!enabled) {
                if (ActivityCompat.checkSelfPermission(context, Manifest.permission.BLUETOOTH_CONNECT) != PackageManager.PERMISSION_GRANTED) {
                    LogHelper.e(TAG, "No Permission to enable bluetooth");
                    return;
                }
app/src/main/java/com/itachi1706/cheesecakeutilities/modules/connectivityquiethours/receivers/BluetoothToggleReceiver.java on lines 40..48

Duplicated Code

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

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

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

Tuning

This issue has a mass of 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

Severity
Category
Status
Source
Language