Showing 9 of 33 total issues
OthersInfo
has 31 methods (exceeds 20 allowed). Consider refactoring. Open
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;
ProfileFragment
has 26 methods (exceeds 20 allowed). Consider refactoring. Confirmed
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;
ChatlogsUtil
has 23 methods (exceeds 20 allowed). Consider refactoring. Open
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<>();
File ProfileFragment.java
has 262 lines of code (exceeds 250 allowed). Consider refactoring. Confirmed
Confirmed
package ch.epfl.sweng.radius.profile;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
HomeFragment
has 21 methods (exceeds 20 allowed). Consider refactoring. Open
Open
public class HomeFragment extends Fragment implements OnMapReadyCallback, DBLocationObserver {
//constants
private static final String TAG = "HomeFragment";
private static float ZOOM = 13f/2;
Method onCreate
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
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);
Method fillLocationsTable
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
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
Open
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
View view = inflater.inflate(R.layout.fragment_profile, container, false);
Method testChatLogs
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
@Test
public void testChatLogs() {
ArrayList<String> usersIds = new ArrayList<String>();
new ChatLogs(usersIds);