Buggy code:
public class MessagingSubsystemAdd extends AbstractSubsystemAdd < MessagingSubsystemElement > { private static final long serialVersionUID = - 1306547303259739030L ; private String bindingsDirectory ; private String journalDirectory ; private String largeMessagesDirectory ; private String pagingDirectory ; private Boolean clustered ; private Integer journalMinFiles ; private Integer journalFileSize ; private JournalType journalType ; private Set < TransportSpecification > acceptors = new HashSet < TransportSpecification > ( ) ; private Set < TransportSpecification > connectors = new HashSet < TransportSpecification > ( ) ; private Set < SecuritySettingsSpecification > securitySettings = new HashSet < SecuritySettingsSpecification > ( ) ; private Set < AddressSettingsSpecification > addressSettings = new HashSet < AddressSettingsSpecification > ( ) ; public MessagingSubsystemAdd ( ) { } @ Override protected < P > void applyUpdate ( UpdateContext updateContext , UpdateResultHandler < ? super Void , P > resultHandler , P param ) { } @ Override protected MessagingSubsystemElement createSubsystemElement ( ) { final MessagingSubsystemElement element = new MessagingSubsystemElement ( ) ; if ( ( bindingsDirectory ) != null ) element . setBindingsDirectory ( getBindingsDirectory ( ) ) ; if ( ( journalDirectory ) != null ) element . setJournalDirectory ( getJournalDirectory ( ) ) ; if ( ( largeMessagesDirectory ) != null ) element . setLargeMessagesDirectory ( getLargeMessagesDirectory ( ) ) ; if ( ( pagingDirectory ) != null ) element . setPagingDirectory ( getPagingDirectory ( ) ) ; if ( ( clustered ) != null ) element . setClustered ( isClustered ( ) ) ; if ( ( journalMinFiles ) != null ) element . setJournalMinFiles ( getJournalMinFiles ( ) ) ; if ( ( journalFileSize ) != null ) element . setJournalFileSize ( getJournalFileSize ( ) ) ; if ( ( journalType ) != null ) element . setJournalType ( getJournalType ( ) ) ; for ( TransportSpecification acceptorSpec : acceptors ) { TransportElement acceptorEl = element . addAcceptor ( acceptorSpec . getName ( ) ) ; acceptorEl . setFactoryClassName ( acceptorSpec . getFactoryClassName ( ) ) ; acceptorEl . setParams ( acceptorSpec . getParams ( ) ) ; } for ( AddressSettingsSpecification addressSpec : addressSettings ) { AddressSettingsElement addressEl = element . addAddressSettings ( addressSpec . getMatch ( ) ) ; addressEl . setAddressFullMessagePolicy ( addressSpec . getAddressFullMessagePolicy ( ) ) ; addressEl . setDeadLetterAddress ( addressSpec . getDeadLetterAddress ( ) ) ; addressEl . setExpiryAddress ( addressSpec . getExpiryAddress ( ) ) ; if ( ( addressSpec . isLastValueQueue ( ) ) != null ) { addressEl . setLastValueQueue ( addressSpec . isLastValueQueue ( ) ) ; } if ( ( addressSpec . getMaxDeliveryAttempts ( ) ) != null ) { addressEl . setMaxDeliveryAttempts ( addressSpec . getMaxDeliveryAttempts ( ) ) ; } if ( ( addressSpec . getMaxSizeBytes ( ) ) != null ) { addressEl . setMaxSizeBytes ( addressSpec . getMaxSizeBytes ( ) ) ; } if ( ( addressSpec . getMessageCounterHistoryDayLimit ( ) ) != null ) { addressEl . setMessageCounterHistoryDayLimit ( addressSpec . getMessageCounterHistoryDayLimit ( ) ) ; } if ( ( addressSpec . getPageSizeBytes ( ) ) != null ) { addressEl . setPageSizeBytes ( addressSpec . getPageSizeBytes ( ) ) ; } if ( ( addressSpec . getRedeliveryDelay ( ) ) != null ) { addressEl . setRedeliveryDelay ( addressSpec . getRedeliveryDelay ( ) ) ; } if ( ( addressSpec . getRedistributionDelay ( ) ) != null ) { addressEl . setRedistributionDelay ( addressSpec . getRedistributionDelay ( ) ) ; } if ( ( addressSpec . isSendToDLAOnNoRoute ( ) ) != null ) { addressEl . setSendToDLAOnNoRoute ( addressSpec . isSendToDLAOnNoRoute ( ) ) ; } } for ( TransportSpecification connectorSpec : connectors ) { <START_BUG> TransportElement connectorEl = element . addAcceptor ( connectorSpec . getName ( ) ) ; <END_BUG> connectorEl . setFactoryClassName ( connectorSpec . getFactoryClassName ( ) ) ; connectorEl . setParams ( connectorSpec . getParams ( ) ) ; } for ( SecuritySettingsSpecification securitySetting : securitySettings ) { element . addSecuritySetting ( securitySetting . getMatch ( ) , securitySetting . getRoles ( ) ) ; } return element ; } public String getBindingsDirectory ( ) { } public void setBindingsDirectory ( String bindingsDirectory ) { } public String getJournalDirectory ( ) { } public void setJournalDirectory ( String journalDirectory ) { } public String getLargeMessagesDirectory ( ) { } public void setLargeMessagesDirectory ( String largeMessagesDirectory ) { } public String getPagingDirectory ( ) { } public void setPagingDirectory ( String pagingDirectory ) { } public Boolean isClustered ( ) { } public void setClustered ( boolean clustered ) { } public Integer getJournalMinFiles ( ) { } public void setJournalMinFiles ( int journalMinFiles ) { } public Integer getJournalFileSize ( ) { } public void setJournalFileSize ( int journalFileSize ) { } public JournalType getJournalType ( ) { } public void setJournalType ( JournalType journalType ) { } void addAcceptor ( final TransportSpecification transportSpecification ) { } void addConnector ( final TransportSpecification transportSpecification ) { } void addAddressSettings ( final AddressSettingsSpecification addressSettingsSpecification ) { } void addSecuritySettings ( final SecuritySettingsSpecification securitySettingsSpecification ) { } }

Fix:
TransportElement connectorEl = element . addConnector ( connectorSpec . getName ( ) ) ;