Extracted Methods: public long getAmount(Date startDate, Date endDate) is extracted into 2 new methods named sameStartEndBudgetPeriod() and overlapStartEndBudgetPeriod()