Buggy code:
public class EjbTimerXmlParser_1_0 implements XMLElementReader < List < TimerImpl > > { public static final String NAMESPACE = "urn:jboss:wildfly:ejb-timers:1.0" ; private final TimerServiceImpl timerService ; private final MarshallerFactory factory ; private final MarshallingConfiguration configuration ; private final ClassLoader classLoader ; public EjbTimerXmlParser_1_0 ( TimerServiceImpl timerService , MarshallerFactory factory , MarshallingConfiguration configuration , ClassLoader classLoader ) { } @ Override public void readElement ( XMLExtendedStreamReader reader , List < TimerImpl > timers ) throws XMLStreamException { } private void parseTimer ( XMLExtendedStreamReader reader , List < TimerImpl > timers ) throws XMLStreamException { EjbTimerXmlParser_1_0 . LoadableElements loadableElements = new EjbTimerXmlParser_1_0 . LoadableElements ( ) ; TimerImpl . Builder builder = TimerImpl . builder ( ) ; <START_BUG> final Set < String > required = new HashSet < > ( Arrays . asList ( new String [ ] { EjbTimerXmlPersister . TIMED_OBJECT_ID , EjbTimerXmlPersister . TIMER_ID , EjbTimerXmlPersister . INITIAL_DATE , EjbTimerXmlPersister . REPEAT_INTERVAL , EjbTimerXmlPersister . TIMER_STATE } ) ) ; <END_BUG> for ( int i = 0 ; i < ( reader . getAttributeCount ( ) ) ; ++ i ) { String attr = reader . getAttributeValue ( i ) ; String attrName = reader . getAttributeLocalName ( i ) ; required . remove ( attrName ) ; boolean handled = handleCommonAttributes ( builder , reader , i ) ; if ( ! handled ) { switch ( attrName ) { case EjbTimerXmlPersister . REPEAT_INTERVAL : builder . setRepeatInterval ( Long . parseLong ( attr ) ) ; break ; default : throw ParseUtils . unexpectedAttribute ( reader , i ) ; } } } if ( ! ( required . isEmpty ( ) ) ) { throw ParseUtils . missingRequired ( reader , required ) ; } while ( reader . hasNext ( ) ) { switch ( reader . nextTag ( ) ) { case XMLStreamConstants . END_ELEMENT : { try { if ( ( loadableElements . info ) != null ) { builder . setInfo ( ( ( Serializable ) ( deserialize ( loadableElements . info ) ) ) ) ; } if ( ( loadableElements . primaryKey ) != null ) { builder . setPrimaryKey ( deserialize ( loadableElements . primaryKey ) ) ; } timers . add ( builder . build ( timerService ) ) ; } catch ( Exception e ) { ROOT_LOGGER . timerReinstatementFailed ( builder . getTimedObjectId ( ) , builder . getId ( ) , e ) ; } return ; } case XMLStreamConstants . START_ELEMENT : { boolean handled = handleCommonElements ( reader , loadableElements ) ; if ( ! handled ) { throw ParseUtils . unexpectedElement ( reader ) ; } break ; } } } } private Object deserialize ( final String info ) throws IOException , ClassNotFoundException { } private boolean handleCommonElements ( XMLExtendedStreamReader reader , EjbTimerXmlParser_1_0 . LoadableElements builder ) throws XMLStreamException { } private void parseCalendarTimer ( XMLExtendedStreamReader reader , List < TimerImpl > timers ) throws XMLStreamException { } private void parseTimeoutMethod ( XMLExtendedStreamReader reader , EjbTimerXmlParser_1_0 . LoadableElements loadableElements ) throws XMLStreamException { } private void handleParam ( XMLExtendedStreamReader reader , EjbTimerXmlParser_1_0 . LoadableElements loadableElements ) throws XMLStreamException { } private boolean handleCommonAttributes ( TimerImpl . Builder builder , XMLExtendedStreamReader reader , int i ) { } private void unexpectedEndOfDocument ( Location location ) throws XMLStreamException { } private static class LoadableElements { String info ; String primaryKey ; String className ; String methodName ; final List < String > params = new ArrayList < > ( ) ; } }

Fix:
final Set < String > required = new HashSet < > ( Arrays . asList ( new String [ ] { EjbTimerXmlPersister . TIMED_OBJECT_ID , EjbTimerXmlPersister . TIMER_ID , EjbTimerXmlPersister . INITIAL_DATE , EjbTimerXmlPersister . REPEAT_INTERVAL , EjbTimerXmlPersister . NEXT_DATE , EjbTimerXmlPersister . TIMER_STATE } ) ) ;