2018-SWENG/2018-SWENG-Radius

View on GitHub

Showing 9 of 33 total issues

OthersInfo has 31 methods (exceeds 20 allowed). Consider refactoring.
Open

public class OthersInfo extends DBObservable{
    public Timer timer = new Timer(true);
    private final int REFRESH_PERIOD = 5; // in seconds

    private static OthersInfo othersInfo = null;
Severity: Minor
Found in app/src/main/java/ch/epfl/sweng/radius/database/OthersInfo.java - About 3 hrs to fix

    ProfileFragment has 26 methods (exceeds 20 allowed). Consider refactoring.
    Confirmed

    public class ProfileFragment extends Fragment implements DBUserObserver {
        private final int MAX_SIZE_USERNAME = 20;
        private final int MAX_SIZE_STATUS = 50;
        private final int MAX_SIZE_INTERESTS = 100;
        private static int userRadius;
    Severity: Minor
    Found in app/src/main/java/ch/epfl/sweng/radius/profile/ProfileFragment.java - About 3 hrs to fix

      ChatlogsUtil has 23 methods (exceeds 20 allowed). Consider refactoring.
      Open

      public class ChatlogsUtil implements DBLocationObserver, DBUserObserver{
          private static ChatlogsUtil instance = null;
          private static Map<String, ChatLogs> userChat = new HashMap<>();
          private static Map<String, ChatLogs> topicChat = new HashMap<>();
          private static Map<String, ChatLogs> groupChat = new HashMap<>();
      Severity: Minor
      Found in app/src/main/java/ch/epfl/sweng/radius/database/ChatlogsUtil.java - About 2 hrs to fix

        File ProfileFragment.java has 262 lines of code (exceeds 250 allowed). Consider refactoring.
        Confirmed

        package ch.epfl.sweng.radius.profile;
        
        import android.app.AlertDialog;
        import android.content.DialogInterface;
        import android.content.Intent;
        Severity: Minor
        Found in app/src/main/java/ch/epfl/sweng/radius/profile/ProfileFragment.java - About 2 hrs to fix

          HomeFragment has 21 methods (exceeds 20 allowed). Consider refactoring.
          Open

          public class HomeFragment extends Fragment implements OnMapReadyCallback, DBLocationObserver {
          
              //constants
              private static final String TAG = "HomeFragment";
              private static float ZOOM = 13f/2;
          Severity: Minor
          Found in app/src/main/java/ch/epfl/sweng/radius/home/HomeFragment.java - About 2 hrs to fix

            Method onCreate has 44 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                @Override
                protected void onCreate(Bundle savedInstanceState) {
                    PreferenceManager.setDefaultValues(this, R.xml.app_preferences, false);
                    SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(this);
                    boolean nightMode = settings.getBoolean("nightModeSwitch", false);
            Severity: Minor
            Found in app/src/main/java/ch/epfl/sweng/radius/AccountActivity.java - About 1 hr to fix

              Method fillLocationsTable has 36 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  private void fillLocationsTable(){
              
                      currentLoc = new MLocation("testUser1", defaultLng, defaultLat);
                      currentLoc.setUrlProfilePhoto("./app/src/androidTest/java/ch/epfl/sweng/radius/utils/default.png");
                      currentLoc.setTitle("testUser1");

                Method onCreateView has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    @Override
                    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                                             Bundle savedInstanceState) {
                        super.onCreate(savedInstanceState);
                        View view = inflater.inflate(R.layout.fragment_profile, container, false);
                Severity: Minor
                Found in app/src/main/java/ch/epfl/sweng/radius/profile/ProfileFragment.java - About 1 hr to fix

                  Method testChatLogs has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      @Test
                      public void testChatLogs() {
                          ArrayList<String> usersIds = new ArrayList<String>();
                          new ChatLogs(usersIds);
                  
                  
                    Severity
                    Category
                    Status
                    Source
                    Language