Source:
public AdminDailyReport getDailyStatistics() { Date today = DateUtils.truncate(new Date(), Calendar.DAY_OF_MONTH); Date yesterday = DateUtils.addDays(today, -1); report = new AdminDailyReport(); report.setStartDate(yesterday); report.setEndDate(today); report.setAddedCategoriesCounter(categoryService.countAddedSince(yesterday)); report.setAddedCountriesCounter(countryService.countAddedSince(yesterday)); report.setAddedSeriesCounter(seriesService.countAddedSince(yesterday)); report.setUpdatedSeriesCounter(seriesService.countUpdatedSince(yesterday)); report.setRegistrationRequestsCounter(usersActivationService.countCreatedSince(yesterday)); report.setRegisteredUsersCounter(userService.countRegisteredSince(yesterday)); long notFoundCounter = suspiciousActivityService.countByTypeSince( SiteServiceImpl.PAGE_NOT_FOUND, yesterday ); report.setNotFoundCounter(notFoundCounter); long failedAuthCounter = suspiciousActivityService.countByTypeSince( SiteServiceImpl.AUTHENTICATION_FAILED, yesterday ); report.setFailedAuthCounter(failedAuthCounter); long missingCsrfCounter = suspiciousActivityService.countByTypeSince( SiteServiceImpl.MISSING_CSRF_TOKEN, yesterday ); report.setMissingCsrfCounter(missingCsrfCounter); long invalidCsrfCounter = suspiciousActivityService.countByTypeSince( SiteServiceImpl.INVALID_CSRF_TOKEN, yesterday ); report.setInvalidCsrfCounter(invalidCsrfCounter); return report; }

Target:
public AdminDailyReport getDailyStatistics() { Date today = DateUtils.truncate(new Date(), Calendar.DAY_OF_MONTH); Date yesterday = DateUtils.addDays(today, -1); AdminDailyReport report = new AdminDailyReport(); report.setStartDate(yesterday); report.setEndDate(today); report.setAddedCategoriesCounter(categoryService.countAddedSince(yesterday)); report.setAddedCountriesCounter(countryService.countAddedSince(yesterday)); long untranslatedCategories = categoryService.countUntranslatedNamesSince(yesterday); report.setUntranslatedCategoriesCounter(untranslatedCategories); long untranslatedCountries = countryService.countUntranslatedNamesSince(yesterday); report.setUntranslatedCountriesCounter(untranslatedCountries); report.setAddedSeriesCounter(seriesService.countAddedSince(yesterday)); report.setUpdatedSeriesCounter(seriesService.countUpdatedSince(yesterday)); report.setUpdatedCollectionsCounter(collectionService.countUpdatedSince(yesterday)); report.setRegistrationRequestsCounter(usersActivationService.countCreatedSince(yesterday)); report.setRegisteredUsersCounter(userService.countRegisteredSince(yesterday)); long notFoundCounter = suspiciousActivityService.countByTypeSince( SiteServiceImpl.PAGE_NOT_FOUND, yesterday ); report.setNotFoundCounter(notFoundCounter); long failedAuthCounter = suspiciousActivityService.countByTypeSince( SiteServiceImpl.AUTHENTICATION_FAILED, yesterday ); report.setFailedAuthCounter(failedAuthCounter); long missingCsrfCounter = suspiciousActivityService.countByTypeSince( SiteServiceImpl.MISSING_CSRF_TOKEN, yesterday ); report.setMissingCsrfCounter(missingCsrfCounter); long invalidCsrfCounter = suspiciousActivityService.countByTypeSince( SiteServiceImpl.INVALID_CSRF_TOKEN, yesterday ); report.setInvalidCsrfCounter(invalidCsrfCounter); return report; }