src/main/java/seedu/address/MainApp.java
/**
     * Returns a {@code ModelManager} with the data from {@code storage}'s study tracker and {@code userPrefs}. <br>
     * The data from the sample study tracker will be used instead if {@code storage}'s study tracker is not found,
     * or an empty study tracker will be used instead if errors occur when reading {@code storage}'s study tracker.
     */
Returns a  ModelManager with the data from  storage's study tracker and  userPrefs. 
The data from the sample study tracker will be used instead if  storage's study tracker is not found,
or an empty study tracker will be used instead if errors occur when reading  storage's study tracker.
Returns a ModelManager with the data from storage ' s study tracker and userPrefs . The data from the sample study tracker will be used instead if storage ' s study tracker is not found or an empty study tracker will be used instead if errors occur when reading storage ' s study tracker .
private Model initModelManager(Storage storage, ReadOnlyUserPrefs userPrefs) {
        Optional<ReadOnlyStudyTracker> studyTrackerOptional;
        ReadOnlyStudyTracker initialData;
        try {
            studyTrackerOptional = storage.readStudyTracker();
            if (!studyTrackerOptional.isPresent()) {
                logger.info("Data file not found. Will be starting with a sample StudyTracker");
            }
            initialData = studyTrackerOptional.orElseGet(SampleDataUtil::getSampleStudyTracker);
        } catch (DataConversionException e) {
            logger.warning("Data file not in the correct format. Will be starting with an empty StudyTracker");
            initialData = new StudyTracker();
        } catch (IOException e) {
            logger.warning("Problem while reading from the file. Will be starting with an empty StudyTracker");
            initialData = new StudyTracker();
        }
        return new ModelManager(initialData, userPrefs);
    }
private Model initModelManager ( Storage storage , ReadOnlyUserPrefs userPrefs ) { Optional < ReadOnlyStudyTracker > studyTrackerOptional ; ReadOnlyStudyTracker initialData ; try { studyTrackerOptional = storage . readStudyTracker ( ) ; if ( ! studyTrackerOptional . isPresent ( ) ) { logger . info ( "Data file not found. Will be starting with a sample StudyTracker" ) ; } initialData = studyTrackerOptional . orElseGet ( SampleDataUtil :: getSampleStudyTracker ) ; } catch ( DataConversionException e ) { logger . warning ( "Data file not in the correct format. Will be starting with an empty StudyTracker" ) ; initialData = new StudyTracker ( ) ; } catch ( IOException e ) { logger . warning ( "Problem while reading from the file. Will be starting with an empty StudyTracker" ) ; initialData = new StudyTracker ( ) ; } return new ModelManager ( initialData , userPrefs ) ; }
Returns a {@code ModelManager} with the data from {@code storage}'s study tracker and {@code userPrefs}.
Returns a { @code ModelManager } with the data from { @code storage } ' s study tracker and { @code userPrefs } .