Buggy code:
private static final int SECONDS_PER_HOUR = DateTimeConstants . SECONDS_PER_HOUR ; private static final String NEW_LINE = "\n" ; private ProjectService projSrv ; private TaskService taskSrv ; private SprintRepository sprintRepo ; private WorkLogService wrkLogSrv ; private MessageSource msg ; @ Autowired public SprintController ( ProjectService prjSrv , TaskService taskSrv , SprintRepository sprintRepo , WorkLogService wrkLogSrv , MessageSource msg ) { } @ RequestMapping ( value = "{id}//scrum//board" , method = RequestMethod . GET ) public String showBoard ( @ PathVariable String id , Model model , HttpServletRequest request , RedirectAttributes ra ) { } @ Transactional @ RequestMapping ( value = "//{id}//scrum//backlog" , method = RequestMethod . GET ) public String showBacklog ( @ PathVariable String id , Model model , HttpServletRequest request ) { } @ RequestMapping ( value = "//{id}//scrum//create" , method = RequestMethod . POST ) public String createSprint ( @ PathVariable String id , Model model , HttpServletRequest request , RedirectAttributes ra ) { } @ Transactional @ RequestMapping ( value = "//{id}//scrum//sprintAssign" , method = RequestMethod . POST ) public String assignSprint ( @ PathVariable String id , @ RequestParam ( "taskID" ) String taskID , @ RequestParam ( "sprintID" ) Long sprintID , HttpServletRequest request , RedirectAttributes ra ) { } @ Transactional @ RequestMapping ( value = "//task//sprintRemove" , method = RequestMethod . POST ) public String removeFromSprint ( @ RequestParam ( "taskID" ) String taskID , @ RequestParam ( "sprintID" ) Long sprintID , Model model , HttpServletRequest request , RedirectAttributes ra ) { } @ Transactional @ RequestMapping ( value = "//scrum//delete" , method = RequestMethod . GET ) public String deleteSprint ( @ RequestParam ( "id" ) Long id , Model model , HttpServletRequest request , RedirectAttributes ra ) { } @ Transactional @ ResponseBody @ RequestMapping ( value = "//scrum//start" , method = RequestMethod . POST ) public ResultData startSprint ( @ RequestParam ( "sprintID" ) Long id , @ RequestParam ( "projectID" ) Long projectId , @ RequestParam ( "sprintStart" ) String sprintStart , @ RequestParam ( "sprintEnd" ) String sprintEnd , @ RequestParam ( "sprintStartTime" ) String sprintStartTime , @ RequestParam ( "sprintEndTime" ) String sprintEndTime ) { List < Sprint > allSprints = sprintRepo . findByProjectId ( projectId ) ; sprintStart += "<seq2seq4repair_space>" + sprintStartTime ; sprintEnd += "<seq2seq4repair_space>" + sprintEndTime ; Date startDate = Utils . convertStringToDateAndTime ( sprintStart ) ; Date endDate = Utils . convertStringToDateAndTime ( sprintEnd ) ; for ( Sprint sprint : allSprints ) { if ( ( sprint . getRawEnd_date ( ) ) != null ) { DateTime sprintEndDate = new DateTime ( sprint . getRawEnd_date ( ) ) ; DateTime sprintStartDate = new DateTime ( startDate ) ; if ( ( sprintEndDate . equals ( sprintStartDate ) ) || ( sprintStartDate . isBefore ( sprintEndDate ) ) ) { return new ResultData ( ResultData . WARNING , msg . getMessage ( "agile.sprint.startOnEnd" , new Object [ ] { sprint . getSprintNo ( ) , sprintStart } , Utils . getCurrentLocale ( ) ) ) ; } } } Sprint sprint = sprintRepo . findById ( id ) ; Project project = projSrv . findById ( projectId ) ; Sprint active = sprintRepo . findByProjectIdAndActiveTrue ( projectId ) ; if ( ( ( sprint != null ) && ( ! ( sprint . isActive ( ) ) ) ) && ( active == null ) ) { if ( ( canEdit ( sprint . getProject ( ) ) ) || ( Roles . isAdmin ( ) ) ) { Period total_estimate = new Period ( ) ; int totalStoryPoints = 0 ; StringBuilder warnings = new StringBuilder ( ) ; List < Task > taskList = taskSrv . findAllBySprint ( sprint ) ; for ( Task task : taskList ) { if ( ( task . getState ( ) . equals ( ONGOING ) ) || ( task . getState ( ) . equals ( BLOCKED ) ) ) { total_estimate = PeriodHelper . plusPeriods ( total_estimate , task . getRawRemaining ( ) ) ; } else { total_estimate = PeriodHelper . plusPeriods ( total_estimate , task . getRawEstimate ( ) ) ; } if ( ! ( project . getTimeTracked ( ) ) ) { <START_BUG> if ( ( task . getStory_points ( ) ) == 0 ) { <END_BUG> warnings . append ( task . getId ( ) ) ; warnings . append ( "<seq2seq4repair_space>" ) ; } } totalStoryPoints += task . getStory_points ( ) ; } if ( ( warnings . length ( ) ) > 0 ) { return new ResultData ( ResultData . WARNING , msg . getMessage ( "agile.sprint.notEstimated.sp" , new Object [ ] { warnings . toString ( ) } , Utils . getCurrentLocale ( ) ) ) ; } sprint . setTotalEstimate ( total_estimate ) ; sprint . setTotalStoryPoints ( totalStoryPoints ) ; sprint . setStart_date ( startDate ) ; sprint . setEnd_date ( endDate ) ; sprint . setActive ( true ) ; sprintRepo . save ( sprint ) ; wrkLogSrv . addWorkLogNoTask ( null , project , SPRINT_START ) ; return new ResultData ( ResultData . OK , msg . getMessage ( "agile.sprint.started" , new Object [ ] { sprint . getSprintNo ( ) } , Utils . getCurrentLocale ( ) ) ) ; } } return new ResultData ( ResultData . ERROR , msg . getMessage ( "error.unknown" , null , Utils . getCurrentLocale ( ) ) ) ; } @ Transactional @ RequestMapping ( value = "//scrum//stop" , method = RequestMethod . GET ) public String finishSprint ( @ RequestParam ( "id" ) Long id , HttpServletRequest request , RedirectAttributes ra ) { } @ Transactional @ RequestMapping ( value = "//{id}//scrum//reports" , method = RequestMethod . GET , produces = "application//json" ) public String showBurndown ( @ PathVariable String id , @ RequestParam ( value = "sprint" , required = false ) Long sprintNo , Model model , RedirectAttributes ra ) { } @ RequestMapping ( value = "//{id}//sprint-data"

Fix:
if ( ( ( task . getStory_points ( ) ) == 0 ) && ( task . isEstimated ( ) ) ) {