Buggy code:
public final class OldSaveService { private static final Logger log = LoggingManager . getLoggerForClass ( ) ; static final String PRESERVE = "preserve" ; static final String XML_SPACE = "xml:space" ; private static final String ASSERTION_RESULT_TAG_NAME = "assertionResult" ; private static final String BINARY = "binary" ; private static final String DATA_TYPE = "dataType" ; private static final String ERROR = "error" ; private static final String FAILURE = "failure" ; private static final String FAILURE_MESSAGE = "failureMessage" ; private static final String LABEL = "label" ; private static final String RESPONSE_CODE = "responseCode" ; private static final String RESPONSE_MESSAGE = "responseMessage" ; private static final String SAMPLE_RESULT_TAG_NAME = "sampleResult" ; private static final String SUCCESSFUL = "success" ; private static final String THREAD_NAME = "threadName" ; private static final String TIME = "time" ; private static final String TIME_STAMP = "timeStamp" ; private static final DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder ( ) ; private OldSaveService ( ) { } public static void saveSubTree ( HashTree subTree , OutputStream writer ) throws IOException { } public static SampleResult getSampleResult ( Configuration config ) { } private static List getConfigsFromTree ( HashTree subTree ) { } private static Configuration getConfiguration ( byte [ ] bin ) { } private static byte [ ] getBinaryData ( Configuration config ) { } private static AssertionResult getAssertionResult ( Configuration config ) { } private static Configuration getConfiguration ( AssertionResult assResult ) { } public static Configuration getConfiguration ( SampleResult result , SampleSaveConfiguration saveConfig ) { } private static Configuration getConfigForTestElement ( String named , TestElement item ) { } private static Configuration createConfigForString ( String name , String value ) { } public static synchronized HashTree loadSubTree ( InputStream in ) throws IOException { } private static TestElement createTestElement ( Configuration config ) throws ClassNotFoundException , IllegalAccessException , InstantiationException , ConfigurationException { } private static Collection createCollection ( Configuration config , String testClass ) throws ClassNotFoundException , IllegalAccessException , InstantiationException , ConfigurationException { } private static JMeterProperty createProperty ( Configuration config , String testClass ) throws ClassNotFoundException , IllegalAccessException , InstantiationException { } private static Map createMap ( Configuration config , String testClass ) throws ClassNotFoundException , IllegalAccessException , InstantiationException , ConfigurationException { } private static HashTree generateNode ( Configuration config ) { } public static void processSamples ( String filename , Visualizer visualizer , ResultCollector rc ) throws IOException , ConfigurationException , SAXException { DefaultConfigurationBuilder cfgbuilder = new DefaultConfigurationBuilder ( ) ; Configuration savedSamples = cfgbuilder . buildFromFile ( filename ) ; Configuration [ ] samples = savedSamples . getChildren ( ) ; final boolean errorsOnly = rc . isErrorLogging ( ) ; final boolean successOnly = rc . isSuccessOnlyLogging ( ) ; for ( int i = 0 ; i < ( samples . length ) ; i ++ ) { SampleResult result = OldSaveService . getSampleResult ( samples [ i ] ) ; <START_BUG> if ( rc . isSampleWanted ( result . isSuccessful ( ) , errorsOnly , successOnly ) ) { <END_BUG> visualizer . add ( result ) ; } } } public static String getSerializedSampleResult ( SampleResult result , DefaultConfigurationSerializer slzr , SampleSaveConfiguration cfg ) throws IOException , ConfigurationException , SAXException { } }

Fix:
if ( ResultCollector . isSampleWanted ( result . isSuccessful ( ) , errorsOnly , successOnly ) ) {