movemeet/movemeet

View on GitHub
app/src/main/java/com/sdp/movemeet/view/workout/ListViewAdapter.java

Summary

Maintainability
A
3 hrs
Test Coverage
F
56%

Method getView has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    @Override
    public View getView(final int position, View view, ViewGroup parent) {
        ViewHolder holder;
        if (view == null) {
            holder = new ViewHolder();

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

                    if (modelList.get(position).getTitle().equals("Workout #2: Legs")) {
                        //start NewActivity with title for actionbar and text for textview
                        Intent intent = new Intent(context, TextWorkoutActivity.class);
                        intent.putExtra("contentTv", "\n• 4x5 Barbell Squats\n• 4x25 Barbell Hip Thrust\n• 4x15 Leg Extension\n• 4x20 Standing Calf Raises\n");
                        context.startActivity(intent);
    app/src/main/java/com/sdp/movemeet/view/workout/ListViewAdapter.java on lines 75..80
    app/src/main/java/com/sdp/movemeet/view/workout/ListViewAdapter.java on lines 87..92

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 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 3 locations. Consider refactoring.
    Open

                    if (modelList.get(position).getTitle().equals("Workout #3: Upper Body")) {
                        //start NewActivity with title for actionbar and text for textview
                        Intent intent = new Intent(context, TextWorkoutActivity.class);
                        intent.putExtra("contentTv", "\n• 4x15 Bench Presses\n• 4x25 Overhead Presses\n• 4x15 Barbell Split Squats\n• 4x20 Back Squats\n");
                        context.startActivity(intent);
    app/src/main/java/com/sdp/movemeet/view/workout/ListViewAdapter.java on lines 75..80
    app/src/main/java/com/sdp/movemeet/view/workout/ListViewAdapter.java on lines 81..86

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

                    if (modelList.get(position).getTitle().equals("Workout #1: Abs")) {
                        //start NewActivity with title for actionbar and text for textview
                        Intent intent = new Intent(context, TextWorkoutActivity.class);
                        intent.putExtra("contentTv", "\n• 3x15 Leg crunches\n• 3x10 Dumbbell Crunches\n• 3x6 Leg Raises\n• 3x15 Hanging Knee Raises\n");
                        context.startActivity(intent);
    app/src/main/java/com/sdp/movemeet/view/workout/ListViewAdapter.java on lines 81..86
    app/src/main/java/com/sdp/movemeet/view/workout/ListViewAdapter.java on lines 87..92

    Duplicated Code

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

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

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

    Tuning

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

    There are no issues that match your filters.

    Category
    Status