Buggy code:
public class DomainController implements Service < DomainController > { private static final Logger log = Logger . getLogger ( "org.jboss.as.domain.controller" ) ; public static final ServiceName SERVICE_NAME = JBOSS . append ( "domain" , "controller" ) ; private DomainModel domainModel ; private final ConcurrentMap < String , ServerManagerClient > clients = new ConcurrentHashMap < String , ServerManagerClient > ( ) ; private final InjectedValue < XMLMapper > xmlMapper = new InjectedValue < XMLMapper > ( ) ; private final InjectedValue < File > domainConfigDir = new InjectedValue < File > ( ) ; private final InjectedValue < File > domainDeploymentsDir = new InjectedValue < File > ( ) ; private final InjectedValue < ScheduledExecutorService > scheduledExecutorService = new InjectedValue < ScheduledExecutorService > ( ) ; private volatile DomainConfigurationPersister configPersister ; private ScheduledFuture < ? > pollingFuture ; private DomainDeploymentHandler deploymentPlanHandler ; private DomainDeploymentRepository deploymentRepository ; public DomainController ( ) { } public DomainController ( final DomainConfigurationPersister configPersister , final DomainDeploymentRepository deploymentRepository ) { } @ Override public synchronized void start ( final StartContext context ) throws StartException { } @ Override public synchronized void stop ( final StopContext stopContext ) { } @ Override public DomainController getValue ( ) throws IllegalStateException { } public void addClient ( final ServerManagerClient domainControllerClient ) { } public void removeClient ( final String id ) { } public synchronized DomainModel getDomainModel ( ) { } public Set < String > getServerManagerNames ( ) { } public HostModel getHostModel ( final String serverManagerName ) { } public Map < ServerIdentity , ServerStatus > getServerStatuses ( ) { } public ServerModel getServerModel ( final String serverManagerName , final String serverName ) { } public ServerStatus startServer ( final String serverManagerName , final String serverName ) { } public ServerStatus stopServer ( final String serverManagerName , final String serverName , final long gracefulTimeout ) { } public ServerStatus restartServer ( final String serverManagerName , final String serverName , final long gracefulTimeout ) { } private DomainModel parseDomain ( final XMLMapper mapper ) { try { <START_BUG> InputStream reader = configPersister . getConfigurationReader ( ) ; <END_BUG> final List < AbstractDomainModelUpdate < ? > > domainUpdates = new ArrayList < AbstractDomainModelUpdate < ? > > ( ) ; mapper . parseDocument ( domainUpdates , XMLInputFactory . newInstance ( ) . createXMLStreamReader ( new BufferedInputStream ( reader ) ) ) ; final DomainModel domainModel = new DomainModel ( ) ; for ( final AbstractDomainModelUpdate < ? > update : domainUpdates ) { domainModel . update ( update ) ; } return domainModel ; } catch ( RuntimeException e ) { throw e ; } catch ( Exception e ) { throw new RuntimeException ( "Caught<seq2seq4repair_space>exception<seq2seq4repair_space>during<seq2seq4repair_space>processing<seq2seq4repair_space>of<seq2seq4repair_space>domain.xml" , e ) ; } } public Injector < XMLMapper > getXmlMapperInjector ( ) { } File getDomainConfigDir ( ) { } File getDomainDeploymentsDir ( ) { } public Injector < File > getDomainConfigDirInjector ( ) { } public Injector < File > getDomainDeploymentsDirInjector ( ) { } public Injector < ScheduledExecutorService > getScheduledExecutorServiceInjector ( ) { } public List < DomainUpdateResult < ? > > applyUpdates ( List < AbstractDomainModelUpdate < ? > > updates ) { } public < T > DomainUpdateResult < T > applyUpdate ( AbstractDomainModelUpdate < T > update ) { } public DomainUpdateApplierResponse applyUpdateToModel ( AbstractDomainModelUpdate < ? > update ) { } public List < DomainUpdateApplierResponse > applyUpdatesToModel ( final List < AbstractDomainModelUpdate < ? > > updates ) { } public List < UpdateResultHandlerResponse < ? > > applyUpdatesToServer ( final ServerIdentity server , final List < AbstractServerModelUpdate < ? > > updates , final boolean allowOverallRollback ) { } public void executeDeploymentPlan ( DeploymentPlan plan , BlockingQueue < List < StreamedResponse > > responseQueue ) { } public DomainDeploymentRepository getDomainDeploymentRepository ( ) { } public boolean isDeploymentNameUnique ( String deploymentName ) { } private List < DomainUpdateApplierResponse > applyUpdatesToServerManagers ( final List < AbstractDomainModelUpdate < ? > > updates , List < AbstractDomainModelUpdate < ? > > rollbacks ) { } private List < DomainUpdateResult < ? > > applyUpdatesToServers ( final List < AbstractDomainModelUpdate < ? > > updates , final List < DomainUpdateApplierResponse > domainResults , final boolean allowOverallRollback ) { } private Map < ServerIdentity , List < AbstractServerModelUpdate < ? > > > getUpdatesByServer ( final List < AbstractDomainModelUpdate < ? > > domainUpdates , final List < DomainUpdateApplierResponse > domainResults , final Map < AbstractDomainModelUpdate < ? > , AbstractServerModelUpdate < ? > > serverByDomain ) { } UpdateResultHandlerResponse < ? > restartServer ( ServerIdentity server , long gracefulTimeout ) { } public List < HostUpdateResult < ? > > applyHostUpdates ( String serverManagerName , List < AbstractHostModelUpdate < ? > > updates ) { } }

Fix:
InputStream reader = configPersister . getConfigurationInputStream ( ) ;