Buggy code:
public class ResponseAssertion extends AbstractTestElement implements Serializable , Assertion { public static final String TEST_FIELD = "Assertion.test_field" ; public static final String SAMPLE_LABEL = "Assertion.sample_label" ; public static final String RESPONSE_DATA = "Assertion.response_data" ; public static final String RESPONSE_CODE = "Assertion.response_code" ; public static final String RESPONSE_MESSAGE = "Assertion.response_message" ; public static final String TEST_STRINGS = "Asserion.test_strings" ; public static final String TEST_TYPE = "Assertion.test_type" ; public static final int MATCH = 1 << 0 ; public static final int CONTAINS = 1 << 1 ; public static final int NOT = 1 << 2 ; private static ThreadLocal matcher = new ThreadLocal ( ) { protected Object initialValue ( ) { } } ; private static PatternCacheLRU patternCache = new PatternCacheLRU ( 1000 , new Perl5Compiler ( ) ) ; public ResponseAssertion ( ) { } public ResponseAssertion ( String field , int type , String string ) { } public void clear ( ) { } public void setTestField ( String testField ) { } public void setTestType ( int testType ) { } public void addTestString ( String testString ) { } public void setTestString ( String testString , int index ) { } public void removeTestString ( String testString ) { } public void removeTestString ( int index ) { } public void clearTestStrings ( ) { } public AssertionResult getResult ( SampleResult response ) { } public String getTestField ( ) { } public int getTestType ( ) { } public CollectionProperty getTestStrings ( ) { } public boolean isContainsType ( ) { } public boolean isMatchType ( ) { } public boolean isNotType ( ) { } public void setToContainsType ( ) { } public void setToMatchType ( ) { } public void setToNotType ( ) { } public void unsetNotType ( ) { } private AssertionResult evaluateResponse ( SampleResult response ) { } private String getFailText ( String stringPattern ) { } protected AssertionResult setResultForNull ( AssertionResult result ) { } public static class Test extends TestCase { int threadsRunning ; int failed ; public Test ( String name ) { } public void testThreadSafety ( ) throws Exception { } class TestThread extends Thread { static final String TEST_STRING = "DAbale<seq2seq4repair_space>arroz<seq2seq4repair_space>a<seq2seq4repair_space>la<seq2seq4repair_space>zorra<seq2seq4repair_space>el<seq2seq4repair_space>abad." ; static final String TEST_PATTERN = ".*A.*\\." ; public void run ( ) { ResponseAssertion assertion = new ResponseAssertion ( ResponseAssertion . RESPONSE_DATA , ResponseAssertion . CONTAINS , ResponseAssertion . Test . TestThread . TEST_PATTERN ) ; SampleResult response = new SampleResult ( ) ; response . setResponseData ( ResponseAssertion . Test . TestThread . TEST_STRING . getBytes ( ) ) ; for ( int i = 0 ; i < 100 ; i ++ ) { AssertionResult result ; result = assertion . evaluateResponse ( response ) ; if ( ( result . isFailure ( ) ) || ( result . isError ( ) ) ) { ( failed ) ++ ; } } synchronized ( ResponseAssertion . Test . this ) { ( threadsRunning ) -- ; <START_BUG> ResponseAssertion . Test . this . notify ( ) ; <END_BUG> } } } } }

Fix:
ResponseAssertion . Test . this . notifyAll ( ) ;