Showing 10 of 42 total issues
Method ChatFragment_Test_Sender
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
@SuppressWarnings("unchecked") @Test public void ChatFragment_Test_Sender() { Bundle bundle = new Bundle(); bundle.putString(UIConstants.BUNDLE_EVENT_REF, "anyRef");
Method onActivityCreated
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override public void onActivityCreated(@Nullable Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); mViewModel = new ViewModelProvider(this, mFactory).get(UserProfileViewModel.class);
Similar blocks of code found in 2 locations. Consider refactoring. Open
@Override public Map<String, Object> serializeToMap(@NonNull ChatMessage message) { return new HashMap<String, Object>() {{ put("text", message.getText()); put("date", FieldValue.serverTimestamp());
- Read upRead up
Similar blocks of code found in 2 locations. Consider refactoring. Open
@Override public Map<String, Object> serializeToMap(@NonNull User object) { return new HashMap<String, Object>() {{ put("username", object.getName()); put("email", object.getEmail());
- Read upRead up
Identical blocks of code found in 2 locations. Consider refactoring. Open
try (FileInputStream fi = new FileInputStream(fileDescriptor); ObjectInputStream oi = new ObjectInputStream(fi);){ tempRead = (T) oi.readObject(); } catch (IOException | ClassNotFoundException e) { e.printStackTrace(); }
- Read upRead up
Identical blocks of code found in 2 locations. Consider refactoring. Open
try (FileInputStream fi = new FileInputStream(statusFile);ObjectInputStream oi = new ObjectInputStream(fi);){ eventStatusFiles = (HashMap<String, Map<String,Object>>) oi.readObject(); } catch (IOException | ClassNotFoundException e) { e.printStackTrace(); }
- Read upRead up
Similar blocks of code found in 2 locations. Consider refactoring. Open
private static final Event DUMMY_EVENT = sEventBuilder .setTitle("testtitle") .setDescription("description") .setDate("01/01/2020 00:00") .setOrganizerRef("testref")
- Read upRead up
Identical blocks of code found in 2 locations. Consider refactoring. Open
try(FileOutputStream f = new FileOutputStream(statusFile);ObjectOutputStream o = new ObjectOutputStream((f));){ o.writeObject(eventStatusFiles); } catch (IOException e) { e.printStackTrace(); }
- Read upRead up
Similar blocks of code found in 2 locations. Consider refactoring. Open
private static final Event DUMMY_EVENT2 = sEventBuilder .setTitle("testtitle2") .setDescription("description2") .setDate("01/01/2020 00:00") .setOrganizerRef("testref2")
- Read upRead up
Identical blocks of code found in 2 locations. Consider refactoring. Open
try (FileOutputStream f = new FileOutputStream(newFile); ObjectOutputStream o = new ObjectOutputStream((f))) { o.writeObject(toSave); } catch (IOException e) { e.printStackTrace(); }
- Read upRead up