cs306-versus/versus-app

View on GitHub

Showing 10 of 69 total issues

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

    Consider simplifying this complex logical expression.
    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 - About 1 hr to fix

      Avoid too many return statements within this method.
      Confirmed

              else if(month_index==6) return "June";
      Severity: Major
      Found in app/src/main/java/com/github/versus/ScheduleFragment.java - About 30 mins to fix

        Avoid too many return statements within this method.
        Confirmed

                else if(month_index==4) return "April";
        Severity: Major
        Found in app/src/main/java/com/github/versus/ScheduleFragment.java - About 30 mins to fix

          Avoid too many return statements within this method.
          Confirmed

                  else if(month_index==3) return "March";
          Severity: Major
          Found in app/src/main/java/com/github/versus/ScheduleFragment.java - About 30 mins to fix

            Avoid too many return statements within this method.
            Confirmed

                    else if(month_index==2) return "February";
            Severity: Major
            Found in app/src/main/java/com/github/versus/ScheduleFragment.java - About 30 mins to fix

              Avoid too many return statements within this method.
              Confirmed

                      else if(month_index==8) return "August";
              Severity: Major
              Found in app/src/main/java/com/github/versus/ScheduleFragment.java - About 30 mins to fix

                Avoid too many return statements within this method.
                Confirmed

                        else if(month_index==7) return "July";
                Severity: Major
                Found in app/src/main/java/com/github/versus/ScheduleFragment.java - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Confirmed

                          else if(month_index==5) return "May";
                  Severity: Major
                  Found in app/src/main/java/com/github/versus/ScheduleFragment.java - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Confirmed

                            if(month_index==1) return "January";
                    Severity: Major
                    Found in app/src/main/java/com/github/versus/ScheduleFragment.java - About 30 mins to fix
                      Severity
                      Category
                      Status
                      Source
                      Language