berict/Tapad

View on GitHub
app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java

Summary

Maintainability
D
2 days
Test Coverage

Method setPresetInfo has 125 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public void setPresetInfo() {
        toolbar.setActionBar(a, v);
        toolbar.setActionBarTitle(R.string.about);
        toolbar.setActionBarPadding(a, v);
        toolbar.setActionBarDisplayHomeAsUpIcon(R.drawable.ic_close_white);
Severity: Major
Found in app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java - About 5 hrs to fix

    AboutFragment has 25 methods (exceeds 20 allowed). Consider refactoring.
    Open

    public class AboutFragment extends Fragment {
    
        private WindowHelper w = new WindowHelper();
        private AdMobHelper ad = new AdMobHelper();
        private IntentHelper intent = new IntentHelper();
    Severity: Minor
    Found in app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java - About 2 hrs to fix

      File AboutFragment.java has 258 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      package com.bedrock.padder.fragment;
      
      import android.content.Context;
      import android.net.Uri;
      import android.os.Bundle;
      Severity: Minor
      Found in app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java - About 2 hrs to fix

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

                (v.findViewById(R.id.cardview_about_settings)).setOnClickListener(new View.OnClickListener() {
                    @Override
                    public void onClick(View view) {
                        anim.circularRevealInPx(R.id.placeholder,
                                coordinate[2], coordinate[3],
        app/src/main/java/com/bedrock/padder/activity/MainActivity.java on lines 727..737

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

        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

            private void pressBack() {
                KeyEvent kDown = new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_BACK);
                a.dispatchKeyEvent(kDown);
                KeyEvent kUp = new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_BACK);
                a.dispatchKeyEvent(kUp);
        app/src/main/java/com/bedrock/padder/activity/AboutActivity.java on lines 214..219
        app/src/main/java/com/bedrock/padder/activity/ColorActivity.java on lines 155..160
        app/src/main/java/com/bedrock/padder/activity/PresetStoreActivity.java on lines 460..465

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

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

                (v.findViewById(R.id.cardview_preset_store)).setOnClickListener(new View.OnClickListener() {
                    @Override
                    public void onClick(View view) {
                        intent.intentSharedElementWithExtra(a, "activity.PresetStoreActivity",
                                R.id.cardview_preset_store_image, "transition", "about", "now_playing", 0, v);
        app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java on lines 176..182
        app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java on lines 184..190
        app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java on lines 210..216
        app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java on lines 219..225
        app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java on lines 227..233
        app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java on lines 258..264
        app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java on lines 266..272

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

                (v.findViewById(R.id.cardview_about)).setOnClickListener(new View.OnClickListener() {
                    @Override
                    public void onClick(View view) {
                        intent.intentSharedElementWithExtra(a, "activity.AboutActivity",
                                R.id.cardview_about_image, "transition", "about", "tapad", 0, v);
        app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java on lines 176..182
        app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java on lines 184..190
        app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java on lines 202..208
        app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java on lines 210..216
        app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java on lines 227..233
        app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java on lines 258..264
        app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java on lines 266..272

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

                (v.findViewById(R.id.cardview_music_explore)).setOnClickListener(new View.OnClickListener() {
                    @Override
                    public void onClick(View view) {
                        intent.intentSharedElementWithExtra(a, "activity.AboutActivity",
                                R.id.cardview_music_image, "transition", "about", "now_playing", 0, v);
        app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java on lines 176..182
        app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java on lines 202..208
        app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java on lines 210..216
        app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java on lines 219..225
        app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java on lines 227..233
        app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java on lines 258..264
        app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java on lines 266..272

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

                (v.findViewById(R.id.cardview_music)).setOnClickListener(new View.OnClickListener() {
                    @Override
                    public void onClick(View view) {
                        intent.intentSharedElementWithExtra(a, "activity.AboutActivity",
                                R.id.cardview_music_image, "transition", "about", "now_playing", 0, v);
        app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java on lines 184..190
        app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java on lines 202..208
        app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java on lines 210..216
        app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java on lines 219..225
        app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java on lines 227..233
        app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java on lines 258..264
        app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java on lines 266..272

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

                (v.findViewById(R.id.cardview_dev)).setOnClickListener(new View.OnClickListener() {
                    @Override
                    public void onClick(View view) {
                        intent.intentSharedElementWithExtra(a, "activity.AboutActivity",
                                R.id.cardview_dev_image, "transition", "about", "dev", 0, v);
        app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java on lines 176..182
        app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java on lines 184..190
        app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java on lines 202..208
        app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java on lines 210..216
        app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java on lines 219..225
        app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java on lines 227..233
        app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java on lines 266..272

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

                (v.findViewById(R.id.cardview_preset_store_explore)).setOnClickListener(new View.OnClickListener() {
                    @Override
                    public void onClick(View view) {
                        intent.intentSharedElementWithExtra(a, "activity.PresetStoreActivity",
                                R.id.cardview_preset_store_image, "transition", "about", "now_playing", 0, v);
        app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java on lines 176..182
        app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java on lines 184..190
        app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java on lines 202..208
        app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java on lines 219..225
        app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java on lines 227..233
        app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java on lines 258..264
        app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java on lines 266..272

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

                (v.findViewById(R.id.cardview_about_explore)).setOnClickListener(new View.OnClickListener() {
                    @Override
                    public void onClick(View view) {
                        intent.intentSharedElementWithExtra(a, "activity.AboutActivity",
                                R.id.cardview_about_image, "transition", "about", "tapad", 0, v);
        app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java on lines 176..182
        app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java on lines 184..190
        app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java on lines 202..208
        app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java on lines 210..216
        app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java on lines 219..225
        app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java on lines 258..264
        app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java on lines 266..272

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

                (v.findViewById(R.id.cardview_dev_explore)).setOnClickListener(new View.OnClickListener() {
                    @Override
                    public void onClick(View view) {
                        intent.intentSharedElementWithExtra(a, "activity.AboutActivity",
                                R.id.cardview_dev_image, "transition", "about", "dev", 0, v);
        app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java on lines 176..182
        app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java on lines 184..190
        app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java on lines 202..208
        app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java on lines 210..216
        app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java on lines 219..225
        app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java on lines 227..233
        app/src/main/java/com/bedrock/padder/fragment/AboutFragment.java on lines 258..264

        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

                (v.findViewById(R.id.cardview_music_change)).setOnClickListener(new View.OnClickListener() {
                    @Override
                    public void onClick(View view) {
                        if (isPresetVisible == false) {
                            intent.intent(a, "activity.PresetStoreActivity");
        app/src/main/java/com/bedrock/padder/activity/SettingsActivity.java on lines 82..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 42.

        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

        There are no issues that match your filters.

        Category
        Status