Buggy code:
@ Component ( "jobService" ) public class JobService extends BasicService { @ SuppressWarnings ( "unused" ) private static final Logger logger = LoggerFactory . getLogger ( CubeService . class ) ; public List < JobInstance > listAllJobs ( final String cubeName , final String projectName , final List < JobStatusEnum > statusList , final Integer limitValue , final Integer offsetValue ) throws JobException , IOException { } public List < JobInstance > listAllJobs ( final String cubeName , final String projectName , final List < JobStatusEnum > statusList ) { } private List < JobInstance > listCubeJobInstance ( final String cubeName , final String projectName , List < JobStatusEnum > statusList ) { } private ExecutableState parseToExecutableState ( JobStatusEnum status ) { } @ PreAuthorize ( ( Constant . ACCESS_HAS_ROLE_ADMIN ) + "<seq2seq4repair_space>or<seq2seq4repair_space>hasPermission(#cube,<seq2seq4repair_space>'ADMINISTRATION')<seq2seq4repair_space>or<seq2seq4repair_space>hasPermission(#cube,<seq2seq4repair_space>'OPERATION')<seq2seq4repair_space>or<seq2seq4repair_space>hasPermission(#cube,<seq2seq4repair_space>'MANAGEMENT')" ) public JobInstance submitJob ( CubeInstance cube , long startDate , long endDate , CubeBuildTypeEnum buildType , String submitter ) throws JobException , IOException { } public JobInstance getJobInstance ( String uuid ) throws JobException , IOException { } private JobInstance parseToJobInstance ( AbstractExecutable job ) { if ( job == null ) { return null ; } Preconditions . checkState ( ( job instanceof CubingJob ) , ( "illegal<seq2seq4repair_space>job<seq2seq4repair_space>type,<seq2seq4repair_space>id:" + ( job . getId ( ) ) ) ) ; CubingJob cubeJob = ( ( CubingJob ) ( job ) ) ; final JobInstance result = new JobInstance ( ) ; result . setName ( job . getName ( ) ) ; result . setRelatedCube ( cubeJob . getCubeName ( ) ) ; result . setRelatedSegment ( cubeJob . getSegmentId ( ) ) ; result . setLastModified ( cubeJob . getLastModified ( ) ) ; result . setSubmitter ( cubeJob . getSubmitter ( ) ) ; result . setUuid ( cubeJob . getId ( ) ) ; result . setType ( BUILD ) ; result . setStatus ( parseToJobStatus ( job . getStatus ( ) ) ) ; result . setMrWaiting ( cubeJob . getMapReduceWaitTime ( ) ) ; <START_BUG> result . setDuration ( cubeJob . getDuration ( ) ) ; <END_BUG> for ( int i = 0 ; i < ( cubeJob . getTasks ( ) . size ( ) ) ; ++ i ) { AbstractExecutable task = cubeJob . getTasks ( ) . get ( i ) ; result . addStep ( parseToJobStep ( task , i ) ) ; } return result ; } private JobStep parseToJobStep ( AbstractExecutable task , int i ) { } private JobStatusEnum parseToJobStatus ( ExecutableState state ) { } private JobStepStatusEnum parseToJobStepStatus ( ExecutableState state ) { } @ PreAuthorize ( ( Constant . ACCESS_HAS_ROLE_ADMIN ) + "<seq2seq4repair_space>or<seq2seq4repair_space>hasPermission(#job,<seq2seq4repair_space>'ADMINISTRATION')<seq2seq4repair_space>or<seq2seq4repair_space>hasPermission(#job,<seq2seq4repair_space>'OPERATION')<seq2seq4repair_space>or<seq2seq4repair_space>hasPermission(#job,<seq2seq4repair_space>'MANAGEMENT')" ) public void resumeJob ( String jobId ) throws JobException , IOException { } @ PreAuthorize ( ( Constant . ACCESS_HAS_ROLE_ADMIN ) + "<seq2seq4repair_space>or<seq2seq4repair_space>hasPermission(#job,<seq2seq4repair_space>'ADMINISTRATION')<seq2seq4repair_space>or<seq2seq4repair_space>hasPermission(#job,<seq2seq4repair_space>'OPERATION')<seq2seq4repair_space>or<seq2seq4repair_space>hasPermission(#job,<seq2seq4repair_space>'MANAGEMENT')" ) public JobInstance cancelJob ( String jobId ) throws CubeIntegrityException , JobException , IOException { } }

Fix:
result . setDuration ( ( ( cubeJob . getDuration ( ) ) // 1000 ) ) ;