Buggy code:
public class ShowScheduleReportTest extends MockStrutsTestCase { private CreateProject mCP ; private CreateSprint mCS ; private AddStoryToSprint mASTS ; private AddTaskToStory mATTS ; private Configuration mConfig ; private final String mActionPath = "//showScheduleReport" ; public ShowScheduleReportTest ( String testMethod ) { } protected void setUp ( ) throws Exception { } protected void tearDown ( ) throws IOException , Exception { } public void testShowScheduleReport_1 ( ) throws Exception { mCS = new CreateSprint ( 1 , mCP ) ; mCS . exe ( ) ; mASTS = new AddStoryToSprint ( 2 , 1 , mCS , mCP , CreateProductBacklog . COLUMN_TYPE_EST ) ; mASTS . exe ( ) ; mATTS = new AddTaskToStory ( 2 , 1 , mASTS , mCP ) ; mATTS . exe ( ) ; IProject project = mCP . getProjectList ( ) . get ( 0 ) ; <START_BUG> int sprintId = Integer . parseInt ( mCS . getSprintsId ( ) . get ( 0 ) ) ; <END_BUG> SprintBacklogLogic sprintBacklogLogic = new SprintBacklogLogic ( project , mConfig . getUserSession ( ) , mCS . getSprintsId ( ) . get ( 0 ) ) ; SprintBacklogMapper sprintBacklogMapper = sprintBacklogLogic . getSprintBacklogMapper ( ) ; List < IIssue > stories = sprintBacklogLogic . getStories ( ) ; String projectName = project . getName ( ) ; request . setHeader ( "Referer" , ( "?PID=" + projectName ) ) ; request . getSession ( ) . setAttribute ( "UserSession" , mConfig . getUserSession ( ) ) ; request . getSession ( ) . setAttribute ( "Project" , project ) ; request . getSession ( ) . setAttribute ( "sprintID" , sprintId ) ; actionPerform ( ) ; verifyForwardPath ( "//Pages//ShowScheduleReport.jsp" ) ; verifyForward ( "success" ) ; verifyNoActionErrors ( ) ; ScheduleReport ActualReport = ( ( ScheduleReport ) ( request . getAttribute ( "report" ) ) ) ; String startDate = DateUtil . format ( sprintBacklogMapper . getSprintStartDate ( ) , _8DIGIT_DATE_1 ) ; String endtDate = DateUtil . format ( sprintBacklogMapper . getSprintEndDate ( ) , _8DIGIT_DATE_1 ) ; String ExpectedDuration = ( startDate + "<seq2seq4repair_space>~<seq2seq4repair_space>" ) + endtDate ; assertEquals ( sprintId , ActualReport . getIteration ( ) ) ; assertEquals ( ".//Workspace//TEST_PROJECT_1//_metadata//ScheduleReport//Sprint1//ScheduleReport.png" , ActualReport . getPath ( ) ) ; assertEquals ( stories . size ( ) , ActualReport . getStorySize ( ) ) ; assertEquals ( sprintBacklogMapper . getSprintGoal ( ) , ActualReport . getSprintGoal ( ) ) ; assertEquals ( ExpectedDuration , ActualReport . getDuration ( ) ) ; SprintPlanHelper sprintPlanHelper = new SprintPlanHelper ( project ) ; List < ISprintPlanDesc > ExpectedPlans = sprintPlanHelper . loadListPlans ( ) ; List < ISprintPlanDesc > ActualPlans = ( ( List < ISprintPlanDesc > ) ( request . getAttribute ( "SprintPlans" ) ) ) ; for ( int i = 0 ; i < ( ExpectedPlans . size ( ) ) ; i ++ ) { assertEquals ( ExpectedPlans . get ( i ) . getID ( ) , ActualPlans . get ( i ) . getID ( ) ) ; } project = null ; sprintPlanHelper = null ; sprintBacklogLogic = null ; sprintBacklogMapper = null ; stories = null ; ExpectedPlans = null ; ActualPlans = null ; } public void testShowScheduleReport_2 ( ) throws IOException { } public void testShowScheduleReport_3 ( ) throws IOException { } }

Fix:
long sprintId = mCS . getSprintsId ( ) . get ( 0 ) ;