Buggy code:
public class ResultCollector extends AbstractListenerElement implements Serializable , NoThreadClone , Clearable , Remoteable , SampleListener , TestListener { private static final Logger log = LoggingManager . getLoggerForClass ( ) ; private static final long serialVersionUID = 2 ; private static final String TESTRESULTS_START = "<testResults>" ; private static final String TESTRESULTS_START_V1_1_PREVER = "<testResults<seq2seq4repair_space>version=\"" ; private static final String TESTRESULTS_START_V1_1_POSTVER = "\">" ; private static final String TESTRESULTS_END = "<//testResults>" ; private static final String XML_HEADER = "<?xml<seq2seq4repair_space>version=\"1.0\"<seq2seq4repair_space>encoding=\"UTF-8\"?>" ; private static final int MIN_XML_FILE_LEN = ( ( ResultCollector . XML_HEADER . length ( ) ) + ( ResultCollector . TESTRESULTS_START . length ( ) ) ) + ( ResultCollector . TESTRESULTS_END . length ( ) ) ; public static final String FILENAME = "filename" ; private static final String SAVE_CONFIG = "saveConfig" ; private static final String ERROR_LOGGING = "ResultCollector.error_logging" ; private transient DefaultConfigurationSerializer serializer ; private volatile transient PrintWriter out ; private boolean inTest = false ; private static Map files = new HashMap ( ) ; private Set hosts = new HashSet ( ) ; protected boolean isStats = false ; public ResultCollector ( ) { } private void setFilenameProperty ( String f ) { } public String getFilename ( ) { } public boolean isErrorLogging ( ) { } public void setErrorLogging ( boolean errorLogging ) { } public void setFilename ( String f ) { } public void testEnded ( String host ) { } public void testStarted ( String host ) { } public void testEnded ( ) { } public void testStarted ( ) { } public void loadExistingFile ( ) { boolean parsedOK = false ; boolean errorDetected = false ; String filename = getFilename ( ) ; File file = new File ( filename ) ; if ( file . exists ( ) ) { clearVisualizer ( ) ; BufferedReader dataReader = null ; BufferedInputStream bufferedInputStream = null ; try { dataReader = new BufferedReader ( new FileReader ( file ) ) ; String line = dataReader . readLine ( ) ; if ( line == null ) { ResultCollector . log . warn ( ( filename + "<seq2seq4repair_space>is<seq2seq4repair_space>empty" ) ) ; } else { if ( ! ( line . startsWith ( "<?xml<seq2seq4repair_space>" ) ) ) { while ( line != null ) { try { <START_BUG> SampleResult result = OldSaveService . makeResultFromDelimitedString ( line ) ; <END_BUG> if ( result != null ) sendToVisualizer ( result ) ; } catch ( NumberFormatException ignored ) { errorDetected = true ; } line = dataReader . readLine ( ) ; } parsedOK = true ; } else { try { bufferedInputStream = new BufferedInputStream ( new FileInputStream ( file ) ) ; readSamples ( SaveService . loadTestResults ( bufferedInputStream ) ) ; parsedOK = true ; } catch ( Exception e ) { ResultCollector . log . info ( ( "File<seq2seq4repair_space>load<seq2seq4repair_space>failure,<seq2seq4repair_space>trying<seq2seq4repair_space>old<seq2seq4repair_space>XML<seq2seq4repair_space>format.<seq2seq4repair_space>" + ( e . getLocalizedMessage ( ) ) ) ) ; try { Configuration savedSamples = getConfiguration ( filename ) ; Configuration [ ] samples = savedSamples . getChildren ( ) ; for ( int i = 0 ; i < ( samples . length ) ; i ++ ) { SampleResult result = OldSaveService . getSampleResult ( samples [ i ] ) ; sendToVisualizer ( result ) ; } parsedOK = true ; } catch ( Exception e1 ) { ResultCollector . log . warn ( ( "Error<seq2seq4repair_space>parsing<seq2seq4repair_space>Avalon<seq2seq4repair_space>XML.<seq2seq4repair_space>" + ( e1 . getLocalizedMessage ( ) ) ) ) ; } } } } } catch ( IOException e ) { ResultCollector . log . warn ( ( "Problem<seq2seq4repair_space>reading<seq2seq4repair_space>JTL<seq2seq4repair_space>file:<seq2seq4repair_space>" + file ) ) ; } catch ( JMeterError e ) { ResultCollector . log . warn ( ( "Problem<seq2seq4repair_space>reading<seq2seq4repair_space>JTL<seq2seq4repair_space>file:<seq2seq4repair_space>" + file ) ) ; } finally { JOrphanUtils . closeQuietly ( dataReader ) ; JOrphanUtils . closeQuietly ( bufferedInputStream ) ; if ( ( ! parsedOK ) || errorDetected ) { GuiPackage . showErrorMessage ( "Error<seq2seq4repair_space>loading<seq2seq4repair_space>results<seq2seq4repair_space>file<seq2seq4repair_space>-<seq2seq4repair_space>see<seq2seq4repair_space>log<seq2seq4repair_space>file" , "Result<seq2seq4repair_space>file<seq2seq4repair_space>loader" ) ; } } } } private static void writeFileStart ( PrintWriter writer , SampleSaveConfiguration saveConfig ) { } private static void writeFileEnd ( PrintWriter pw , SampleSaveConfiguration saveConfig ) { } private static synchronized PrintWriter getFileWriter ( String filename , SampleSaveConfiguration saveConfig ) throws IOException { } private static boolean trimLastLine ( String filename ) { } private void readSamples ( TestResultWrapper testResults ) throws Exception { } private Configuration getConfiguration ( String filename ) throws IOException , ConfigurationException , SAXException { } public void clearVisualizer ( ) { } public void sampleStarted ( SampleEvent e ) { } public void sampleStopped ( SampleEvent e ) { } public void sampleOccurred ( SampleEvent e ) { } protected void sendToVisualizer ( SampleResult r ) { } private void recordResult ( SampleResult result ) throws Exception { } private String getSerializedSampleResult ( SampleResult result ) throws IOException , ConfigurationException , SAXException { } public void recordStats ( TestElement e ) throws Exception { } private synchronized boolean isResultMarked ( SampleResult res ) { } private void initializeFileOutput ( ) throws IOException { } private synchronized void finalizeFileOutput ( ) { } public void testIterationStart ( LoopIterationEvent event ) { } public SampleSaveConfiguration getSaveConfig ( ) { } public void setSaveConfig ( SampleSaveConfiguration saveConfig ) { } }

Fix:
SampleResult result = OldSaveService . makeResultFromDelimitedString ( line , getSaveConfig ( ) ) ;