Buggy code:
private static final AssertionResult [ ] EMPTY_AR = new AssertionResult [ 0 ] ; private SampleSaveConfiguration saveConfig ; private SampleResult parent = null ; public void setSaveConfig ( SampleSaveConfiguration propertiesToSave ) { } public SampleSaveConfiguration getSaveConfig ( ) { } private byte [ ] responseData = SampleResult . EMPTY_BA ; private String responseCode = "" ; private String label = "" ; private String resultFileName = "" ; private String samplerData ; private String threadName = "" ; private String responseMessage = "" ; private String responseHeaders = "" ; private String contentType = "" ; private String requestHeaders = "" ; private long timeStamp = 0 ; private long startTime = 0 ; private long endTime = 0 ; private long idleTime = 0 ; private long pauseTime = 0 ; private List assertionResults ; private List subResults ; private String dataType = "" ; private boolean success ; private Set files ; private String dataEncoding ; private static Method initNanoTimeMethod ( ) { } private static boolean haveNanoTime ( ) { } private static long nanoTime ( ) { } private static final Method nanoTimeMethod = SampleResult . initNanoTimeMethod ( ) ; private static final long referenceTimeNsClock = ( SampleResult . haveNanoTime ( ) ) ? SampleResult . sampleNsClockInMs ( ) : Long . MIN_VALUE ; private static final long referenceTimeMsClock = System . currentTimeMillis ( ) ; private long time = 0 ; private long latency = 0 ; private boolean stopThread = false ; private boolean stopTest = false ; private boolean isMonitor = false ; private int sampleCount = 1 ; private int bytes = 0 ; private volatile int groupThreads = 0 ; private volatile int allThreads = 0 ; private static final String TOTAL_TIME = "totalTime" ; private static final boolean startTimeStamp = JMeterUtils . getPropDefault ( "sampleresult.timestamp.start" , false ) ; public SampleResult ( ) { } public SampleResult ( SampleResult res ) { } public boolean isStampedAtStart ( ) { } protected SampleResult ( long elapsed , boolean atend ) { } public static SampleResult createTestSample ( long start , long end ) { } public static SampleResult createTestSample ( long elapsed ) { } public SampleResult ( long stamp , long elapsed ) { } private static long sampleNsClockInMs ( ) { } public static long currentTimeInMs ( ) { } private void stampAndTime ( long stamp , long elapsed ) { } public void setStampAndTime ( long stamp , long elapsed ) { } public void setTime ( long elapsed ) { } public void setMarked ( String filename ) { } public boolean isMarked ( String filename ) { } public String getResponseCode ( ) { } private static final String OK = Integer . toString ( HttpURLConnection . HTTP_OK ) ; public void setResponseCodeOK ( ) { } public void setResponseCode ( String code ) { } public boolean isResponseCodeOK ( ) { } public String getResponseMessage ( ) { } public void setResponseMessage ( String msg ) { } public void setResponseMessageOK ( ) { } public String getThreadName ( ) { } public void setThreadName ( String threadName ) { } public long getTimeStamp ( ) { } public String getSampleLabel ( ) { } public String getSampleLabel ( boolean includeGroup ) { } public void setSampleLabel ( String label ) { } public void addAssertionResult ( AssertionResult assertResult ) { } public AssertionResult [ ] getAssertionResults ( ) { } public void addSubResult ( SampleResult subResult ) { String tn = getThreadName ( ) ; if ( ( tn . length ( ) ) == 0 ) { tn = Thread . currentThread ( ) . getName ( ) ; this . setThreadName ( tn ) ; } subResult . setThreadName ( tn ) ; if ( ( subResults ) == null ) { subResults = new ArrayList ( ) ; } subResults . add ( subResult ) ; <START_BUG> setEndTime ( subResult . getEndTime ( ) ) ; <END_BUG> setBytes ( ( ( getBytes ( ) ) + ( subResult . getBytes ( ) ) ) ) ; subResult . setParent ( this ) ; } public void storeSubResult ( SampleResult subResult ) { } public SampleResult [ ] getSubResults ( ) { } public void configure ( Configuration info ) { } public void setResponseData ( byte [ ] response ) { } public void setResponseData ( String response ) { } public byte [ ] getResponseData ( ) { } public String getResponseDataAsString ( ) { } public void setSamplerData ( String s ) { } public String getSamplerData ( ) { } public long getTime ( ) { } public boolean isSuccessful ( ) { } public void setDataType ( String dataType ) { } public String getDataType ( ) { } public void setEncodingAndType ( String ct ) { } private static final String [ ] BINARY_TYPES = new String [ ] { "image//" , "audio//" , "video//" } ; private static boolean isBinaryType ( String ct ) { } public void setSuccessful ( boolean success ) { } public String toString ( ) { } public String getDataEncoding ( ) { } public String getDataEncodingWithDefault ( ) { } public String getDataEncodingNoDefault ( ) { } public void setDataEncoding ( String dataEncoding ) { } public boolean isStopTest ( ) { } public boolean isStopThread ( ) { } public void setStopTest ( boolean b ) { } public void setStopThread ( boolean b ) { } public String getRequestHeaders ( ) { } public String getResponseHeaders ( ) { } public void setRequestHeaders ( String string ) { } public void setResponseHeaders ( String string ) { } public String getContentType ( ) { } public String getMediaType ( ) { } public void setContentType ( String string ) { } public long getIdleTime ( ) { } public long getEndTime ( ) { } public long getStartTime ( ) { }

Fix:
setEndTime ( Math . max ( getEndTime ( ) , subResult . getEndTime ( ) ) ) ;