cs306-versus/versus-app

View on GitHub

Showing 48 of 69 total issues

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

        wednesdayButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                TextView MondayText=(TextView)view.findViewById(R.id.Wednesday_date);
Severity: Major
Found in app/src/main/java/com/github/versus/ScheduleFragment.java and 5 other locations - About 5 hrs to fix
app/src/main/java/com/github/versus/ScheduleFragment.java on lines 368..400
app/src/main/java/com/github/versus/ScheduleFragment.java on lines 403..433
app/src/main/java/com/github/versus/ScheduleFragment.java on lines 469..499
app/src/main/java/com/github/versus/ScheduleFragment.java on lines 502..532
app/src/main/java/com/github/versus/ScheduleFragment.java on lines 581..613

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

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

        sundayButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                TextView MondayText=(TextView)view.findViewById(R.id.Sunday_date);
Severity: Major
Found in app/src/main/java/com/github/versus/ScheduleFragment.java and 5 other locations - About 5 hrs to fix
app/src/main/java/com/github/versus/ScheduleFragment.java on lines 368..400
app/src/main/java/com/github/versus/ScheduleFragment.java on lines 403..433
app/src/main/java/com/github/versus/ScheduleFragment.java on lines 436..466
app/src/main/java/com/github/versus/ScheduleFragment.java on lines 469..499
app/src/main/java/com/github/versus/ScheduleFragment.java on lines 502..532

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

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

        tuesdayButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                TextView MondayText=(TextView)view.findViewById(R.id.Tuesday_date);
Severity: Major
Found in app/src/main/java/com/github/versus/ScheduleFragment.java and 5 other locations - About 5 hrs to fix
app/src/main/java/com/github/versus/ScheduleFragment.java on lines 368..400
app/src/main/java/com/github/versus/ScheduleFragment.java on lines 436..466
app/src/main/java/com/github/versus/ScheduleFragment.java on lines 469..499
app/src/main/java/com/github/versus/ScheduleFragment.java on lines 502..532
app/src/main/java/com/github/versus/ScheduleFragment.java on lines 581..613

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

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

        thursdayButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                TextView MondayText=(TextView)view.findViewById(R.id.Thursday_date);
Severity: Major
Found in app/src/main/java/com/github/versus/ScheduleFragment.java and 5 other locations - About 5 hrs to fix
app/src/main/java/com/github/versus/ScheduleFragment.java on lines 368..400
app/src/main/java/com/github/versus/ScheduleFragment.java on lines 403..433
app/src/main/java/com/github/versus/ScheduleFragment.java on lines 436..466
app/src/main/java/com/github/versus/ScheduleFragment.java on lines 502..532
app/src/main/java/com/github/versus/ScheduleFragment.java on lines 581..613

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

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

        fridayButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                TextView MondayText=(TextView)view.findViewById(R.id.Friday_date);
Severity: Major
Found in app/src/main/java/com/github/versus/ScheduleFragment.java and 5 other locations - About 5 hrs to fix
app/src/main/java/com/github/versus/ScheduleFragment.java on lines 368..400
app/src/main/java/com/github/versus/ScheduleFragment.java on lines 403..433
app/src/main/java/com/github/versus/ScheduleFragment.java on lines 436..466
app/src/main/java/com/github/versus/ScheduleFragment.java on lines 469..499
app/src/main/java/com/github/versus/ScheduleFragment.java on lines 581..613

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

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

        mondayButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                TextView MondayText=(TextView)view.findViewById(R.id.Monday_date);
Severity: Major
Found in app/src/main/java/com/github/versus/ScheduleFragment.java and 5 other locations - About 5 hrs to fix
app/src/main/java/com/github/versus/ScheduleFragment.java on lines 403..433
app/src/main/java/com/github/versus/ScheduleFragment.java on lines 436..466
app/src/main/java/com/github/versus/ScheduleFragment.java on lines 469..499
app/src/main/java/com/github/versus/ScheduleFragment.java on lines 502..532
app/src/main/java/com/github/versus/ScheduleFragment.java on lines 581..613

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

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

LocationFragment has 33 methods (exceeds 20 allowed). Consider refactoring.
Open

public class LocationFragment extends Fragment implements OnMapReadyCallback {

    private static final String TAG = LocationFragment.class.getSimpleName();
    private static final int DEFAULT_ZOOM = 15;
    private static final int PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION = 1;
Severity: Minor
Found in app/src/main/java/com/github/versus/LocationFragment.java - About 4 hrs to fix

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

        @Override
        public Future<Boolean> addPostToSchedule(String UID, Post post) {
            //accessing the schedule collection
            CollectionReference scheduleRef = db.collection(SCHEDULECOLLECTION.toString());
    
    app/src/main/java/com/github/versus/db/FsChatManager.java on lines 127..170

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

    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

        public Future<Boolean> addMessageToChat(String chatId, Message m) {
            //accessing the chat collection
            CollectionReference chatRef = db.collection(CHATCOLLECTION.toString());
    
            //finding the schedule with the right chatId
    Severity: Major
    Found in app/src/main/java/com/github/versus/db/FsChatManager.java and 1 other location - About 3 hrs to fix
    app/src/main/java/com/github/versus/db/FsScheduleManager.java on lines 132..176

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

    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

        @Override
        public Future<Location> fetch(String id) {
    
            //accessing the user location
            CollectionReference postsRef = db.collection(LOCATIONCOLLECTION.toString());
    app/src/main/java/com/github/versus/db/FsChatManager.java on lines 47..80
    app/src/main/java/com/github/versus/db/FsScheduleManager.java on lines 48..81

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

    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

        private void changeWindowDimensions(Window window) {
            // Set the window's background drawable resource
            window.setBackgroundDrawableResource(R.drawable.custom_dialog_background);
    
            // Apply the resizing logic inside a post() call on the window's decor view,
    Severity: Major
    Found in app/src/main/java/com/github/versus/LocationFragment.java and 1 other location - About 1 hr to fix
    app/src/main/java/com/github/versus/LocationFragment.java on lines 715..730

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

    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 (window != null) {
                window.setBackgroundDrawableResource(R.drawable.custom_dialog_background);
    
                window.getDecorView().post(() -> {
                    DisplayMetrics displayMetrics = new DisplayMetrics();
    Severity: Major
    Found in app/src/main/java/com/github/versus/LocationFragment.java and 1 other location - About 1 hr to fix
    app/src/main/java/com/github/versus/LocationFragment.java on lines 630..656

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

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

            if(months.get(month_index)==1 || months.get(month_index)==3 ||months.get(month_index)==5 ||months.get(month_index)==7 ||months.get(month_index)==8 ||months.get(month_index)==10 ||months.get(month_index)==12 ){
                if(number_date+7<=31){
                    date.setText(String.valueOf((number_date+7)));
    
                }
    Severity: Major
    Found in app/src/main/java/com/github/versus/ScheduleFragment.java and 1 other location - About 1 hr to fix
    app/src/main/java/com/github/versus/ScheduleFragment.java on lines 220..237

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

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

            else if(months.get(month_index)!=2  ){
                if(number_date+7<=30){
                    date.setText(String.valueOf((number_date+7)));
    
                }
    Severity: Major
    Found in app/src/main/java/com/github/versus/ScheduleFragment.java and 1 other location - About 1 hr to fix
    app/src/main/java/com/github/versus/ScheduleFragment.java on lines 202..219

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

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

            if(months.get(month_index)==5 ||months.get(month_index)==7  ||months.get(month_index)==10 ||months.get(month_index)==12 ){
                if(number_date-7>0){
                    date.setText(String.valueOf((number_date-7)));
    
                }
    Severity: Major
    Found in app/src/main/java/com/github/versus/ScheduleFragment.java and 2 other locations - About 1 hr to fix
    app/src/main/java/com/github/versus/ScheduleFragment.java on lines 181..198
    app/src/main/java/com/github/versus/ScheduleFragment.java on lines 163..180

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

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

            else {
                if(number_date-7>0){
                    date.setText(String.valueOf((number_date-7)));
    
                }
    Severity: Major
    Found in app/src/main/java/com/github/versus/ScheduleFragment.java and 2 other locations - About 1 hr to fix
    app/src/main/java/com/github/versus/ScheduleFragment.java on lines 163..180
    app/src/main/java/com/github/versus/ScheduleFragment.java on lines 145..162

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

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

            else if(months.get(month_index)!=3  ){
                if(number_date-7>0){
                    date.setText(String.valueOf((number_date-7)));
    
                }
    Severity: Major
    Found in app/src/main/java/com/github/versus/ScheduleFragment.java and 2 other locations - About 1 hr to fix
    app/src/main/java/com/github/versus/ScheduleFragment.java on lines 181..198
    app/src/main/java/com/github/versus/ScheduleFragment.java on lines 145..162

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

    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

        @Override
        public boolean equals(Object obj) {
            if (obj == this) {
                return true;
            }
    Severity: Major
    Found in app/src/main/java/com/github/versus/chats/Message.java and 1 other location - About 1 hr to fix
    app/src/main/java/com/github/versus/chats/Chat.java on lines 88..103

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

    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

        @Override
        public boolean equals(Object obj) {
            if (obj == this) {
                return true;
            }
    Severity: Major
    Found in app/src/main/java/com/github/versus/chats/Chat.java and 1 other location - About 1 hr to fix
    app/src/main/java/com/github/versus/chats/Message.java on lines 73..88

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

    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 (currentPositionInRating == 1) {
                        gold_medal.setVisibility(View.VISIBLE);
                        silver_medal.setVisibility(View.INVISIBLE);
    
                    } else if (currentPositionInRating == 2) {
    app/src/main/java/com/github/versus/TrendingGamesFragment.java on lines 124..134

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

    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