Buggy code:
public class TestNamedWindowStartStop extends TestCase { private EPServiceProvider epService ; private SupportUpdateListener listenerWindow ; private SupportUpdateListener listenerSelect ; public void setUp ( ) { } protected void tearDown ( ) throws Exception { } public void testAddRemoveType ( ) { } public void testStartStopCreator ( ) { String stmtTextCreate = "create<seq2seq4repair_space>window<seq2seq4repair_space>MyWindow.win:keepall()<seq2seq4repair_space>as<seq2seq4repair_space>select<seq2seq4repair_space>theString<seq2seq4repair_space>as<seq2seq4repair_space>a,<seq2seq4repair_space>intPrimitive<seq2seq4repair_space>as<seq2seq4repair_space>b<seq2seq4repair_space>from<seq2seq4repair_space>" + ( SupportBean . class . getName ( ) ) ; EPStatement stmtCreate = epService . getEPAdministrator ( ) . createEPL ( stmtTextCreate , "stmtCreateFirst" ) ; stmtCreate . addListener ( listenerWindow ) ; String stmtTextDelete = ( "on<seq2seq4repair_space>" + ( SupportBean_A . class . getName ( ) ) ) + "<seq2seq4repair_space>delete<seq2seq4repair_space>from<seq2seq4repair_space>MyWindow" ; EPStatement stmtDelete = epService . getEPAdministrator ( ) . createEPL ( stmtTextDelete , "stmtDelete" ) ; String stmtTextInsertOne = "insert<seq2seq4repair_space>into<seq2seq4repair_space>MyWindow<seq2seq4repair_space>select<seq2seq4repair_space>theString<seq2seq4repair_space>as<seq2seq4repair_space>a,<seq2seq4repair_space>intPrimitive<seq2seq4repair_space>as<seq2seq4repair_space>b<seq2seq4repair_space>from<seq2seq4repair_space>" + ( SupportBean . class . getName ( ) ) ; EPStatement stmtInsert = epService . getEPAdministrator ( ) . createEPL ( stmtTextInsertOne , "stmtInsert" ) ; String [ ] fields = new String [ ] { "a" , "b" } ; String stmtTextSelect = "select<seq2seq4repair_space>a,<seq2seq4repair_space>b<seq2seq4repair_space>from<seq2seq4repair_space>MyWindow<seq2seq4repair_space>as<seq2seq4repair_space>s1" ; EPStatement stmtSelect = epService . getEPAdministrator ( ) . createEPL ( stmtTextSelect , "stmtSelect" ) ; stmtSelect . addListener ( listenerSelect ) ; sendSupportBean ( "E1" , 1 ) ; EPAssertionUtil . assertProps ( listenerWindow . assertOneGetNewAndReset ( ) , fields , new Object [ ] { "E1" , 1 } ) ; EPAssertionUtil . assertProps ( listenerSelect . assertOneGetNewAndReset ( ) , fields , new Object [ ] { "E1" , 1 } ) ; EPAssertionUtil . assertPropsPerRow ( stmtCreate . iterator ( ) , fields , new Object [ ] [ ] { new Object [ ] { "E1" , 1 } } ) ; EPAssertionUtil . assertPropsPerRow ( stmtSelect . iterator ( ) , fields , new Object [ ] [ ] { new Object [ ] { "E1" , 1 } } ) ; stmtCreate . stop ( ) ; sendSupportBean ( "E2" , 2 ) ; assertFalse ( listenerSelect . isInvoked ( ) ) ; assertFalse ( listenerWindow . isInvoked ( ) ) ; assertNull ( stmtCreate . iterator ( ) ) ; EPAssertionUtil . assertPropsPerRow ( stmtSelect . iterator ( ) , fields , new Object [ ] [ ] { new Object [ ] { "E1" , 1 } } ) ; stmtCreate . start ( ) ; sendSupportBean ( "E3" , 3 ) ; EPAssertionUtil . assertProps ( listenerWindow . assertOneGetNewAndReset ( ) , fields , new Object [ ] { "E3" , 3 } ) ; assertFalse ( listenerSelect . isInvoked ( ) ) ; EPAssertionUtil . assertPropsPerRow ( stmtCreate . iterator ( ) , fields , new Object [ ] [ ] { new Object [ ] { "E3" , 3 } } ) ; <START_BUG> EPAssertionUtil . assertPropsPerRow ( stmtSelect . iterator ( ) , fields , new Object [ ] [ ] { new Object [ ] { "E1" , 1 } } ) ; <END_BUG> stmtSelect . stop ( ) ; stmtSelect . start ( ) ; EPAssertionUtil . assertPropsPerRow ( stmtSelect . iterator ( ) , fields , new Object [ ] [ ] { new Object [ ] { "E3" , 3 } } ) ; sendSupportBean ( "E4" , 4 ) ; EPAssertionUtil . assertProps ( listenerWindow . assertOneGetNewAndReset ( ) , fields , new Object [ ] { "E4" , 4 } ) ; EPAssertionUtil . assertProps ( listenerSelect . assertOneGetNewAndReset ( ) , fields , new Object [ ] { "E4" , 4 } ) ; EPAssertionUtil . assertPropsPerRow ( stmtCreate . iterator ( ) , fields , new Object [ ] [ ] { new Object [ ] { "E3" , 3 } , new Object [ ] { "E4" , 4 } } ) ; EPAssertionUtil . assertPropsPerRow ( stmtSelect . iterator ( ) , fields , new Object [ ] [ ] { new Object [ ] { "E3" , 3 } , new Object [ ] { "E4" , 4 } } ) ; stmtCreate . destroy ( ) ; sendSupportBean ( "E5" , 5 ) ; assertFalse ( listenerSelect . isInvoked ( ) ) ; assertFalse ( listenerWindow . isInvoked ( ) ) ; assertNull ( stmtCreate . iterator ( ) ) ; EPAssertionUtil . assertPropsPerRow ( stmtSelect . iterator ( ) , fields , new Object [ ] [ ] { new Object [ ] { "E3" , 3 } , new Object [ ] { "E4" , 4 } } ) ; stmtTextCreate = "create<seq2seq4repair_space>window<seq2seq4repair_space>MyWindow.win:keepall()<seq2seq4repair_space>as<seq2seq4repair_space>select<seq2seq4repair_space>theString<seq2seq4repair_space>as<seq2seq4repair_space>a,<seq2seq4repair_space>intPrimitive<seq2seq4repair_space>as<seq2seq4repair_space>b<seq2seq4repair_space>from<seq2seq4repair_space>" + ( SupportBean . class . getName ( ) ) ; stmtCreate = epService . getEPAdministrator ( ) . createEPL ( stmtTextCreate , "stmtCreate" ) ; stmtCreate . addListener ( listenerWindow ) ; sendSupportBean ( "E6" , 6 ) ; EPAssertionUtil . assertProps ( listenerWindow . assertOneGetNewAndReset ( ) , fields , new Object [ ] { "E6" , 6 } ) ; EPAssertionUtil . assertPropsPerRow ( stmtCreate . iterator ( ) , fields , new Object [ ] [ ] { new Object [ ] { "E6" , 6 } } ) ; assertFalse ( listenerSelect . isInvoked ( ) ) ; EPAssertionUtil . assertPropsPerRow ( stmtSelect . iterator ( ) , fields , new Object [ ] [ ] { new Object [ ] { "E3" , 3 } , new Object [ ] { "E4" , 4 } } ) ; String stmtTextOnSelect = ( "on<seq2seq4repair_space>" + ( SupportBean_A . class . getName ( ) ) ) + "<seq2seq4repair_space>insert<seq2seq4repair_space>into<seq2seq4repair_space>A<seq2seq4repair_space>select<seq2seq4repair_space>*<seq2seq4repair_space>from<seq2seq4repair_space>MyWindow" ; EPStatement stmtOnSelect = epService . getEPAdministrator ( ) . createEPL ( stmtTextOnSelect , "stmtOnSelect" ) ; EPServiceProviderSPI spi = ( ( EPServiceProviderSPI ) ( epService ) ) ; assertTrue ( spi . getStatementEventTypeRef ( ) . isInUse ( "MyWindow" ) ) ; Set < String > stmtNames = spi . getStatementEventTypeRef ( ) . getStatementNamesForType ( "MyWindow" ) ; EPAssertionUtil . assertEqualsAnyOrder ( new String [ ] { "stmtCreate" , "stmtSelect" , "stmtInsert" , "stmtDelete" , "stmtOnSelect" } , stmtNames . toArray ( ) ) ;

Fix:
EPAssertionUtil . assertPropsPerRow ( stmtSelect . iterator ( ) , fields , new Object [ ] [ ] { new Object [ ] { "E3" , 3 } } ) ;