Buggy code:
SecurityActions . setSystemProperty ( JBOSS_DOMAIN_MASTER_ADDRESS , value ) ; } else if ( arg . startsWith ( MASTER_PORT ) ) { int idx = arg . indexOf ( '=' ) ; if ( idx == ( ( arg . length ( ) ) - 1 ) ) { System . err . println ( HostControllerMessages . MESSAGES . argumentExpected ( arg , Main . usageNote ( ) ) ) ; return null ; } String value = ( idx > ( - 1 ) ) ? arg . substring ( ( idx + 1 ) ) : args [ ( ++ i ) ] ; final Integer port = Main . parsePort ( value , MASTER_PORT ) ; if ( port == null ) { return null ; } hostSystemProperties . put ( JBOSS_DOMAIN_MASTER_PORT , value ) ; SecurityActions . setSystemProperty ( JBOSS_DOMAIN_MASTER_PORT , value ) ; } else if ( ADMIN_ONLY . equals ( arg ) ) { initialRunningMode = RunningMode . ADMIN_ONLY ; } else if ( arg . startsWith ( SYS_PROP ) ) { String name ; String value ; int idx = arg . indexOf ( "=" ) ; if ( idx == ( - 1 ) ) { name = arg . substring ( 2 ) ; value = "true" ; } else { name = arg . substring ( 2 , idx ) ; value = arg . substring ( ( idx + 1 ) , arg . length ( ) ) ; } SecurityActions . setSystemProperty ( name , value ) ; hostSystemProperties . put ( name , value ) ; } else if ( arg . startsWith ( PUBLIC_BIND_ADDRESS ) ) { int idx = arg . indexOf ( '=' ) ; if ( idx == ( ( arg . length ( ) ) - 1 ) ) { System . err . println ( HostControllerMessages . MESSAGES . argumentExpected ( arg , Main . usageNote ( ) ) ) ; return null ; } String value = ( idx > ( - 1 ) ) ? arg . substring ( ( idx + 1 ) ) : Main . checkValueIsNotAnArg ( arg , args [ ( ++ i ) ] ) ; if ( value == null ) { return null ; } String propertyName ; if ( idx < 0 ) { propertyName = ( ( arg . length ( ) ) == 2 ) ? HostControllerEnvironment . JBOSS_BIND_ADDRESS : ( HostControllerEnvironment . JBOSS_BIND_ADDRESS_PREFIX ) + ( arg . substring ( 2 ) ) ; } else if ( idx == 2 ) { propertyName = HostControllerEnvironment . JBOSS_BIND_ADDRESS ; } else { propertyName = ( HostControllerEnvironment . JBOSS_BIND_ADDRESS_PREFIX ) + ( arg . substring ( 2 , idx ) ) ; } hostSystemProperties . put ( propertyName , value ) ; SecurityActions . setSystemProperty ( propertyName , value ) ; } else if ( arg . startsWith ( DEFAULT_MULTICAST_ADDRESS ) ) { int idx = arg . indexOf ( '=' ) ; if ( idx == ( ( arg . length ( ) ) - 1 ) ) { System . err . println ( HostControllerMessages . MESSAGES . argumentExpected ( arg , Main . usageNote ( ) ) ) ; return null ; } String value = ( idx > ( - 1 ) ) ? arg . substring ( ( idx + 1 ) ) : Main . checkValueIsNotAnArg ( arg , args [ ( ++ i ) ] ) ; if ( value == null ) { return null ; } hostSystemProperties . put ( JBOSS_DEFAULT_MULTICAST_ADDRESS , value ) ; SecurityActions . setSystemProperty ( JBOSS_DEFAULT_MULTICAST_ADDRESS , value ) ; } else if ( arg . equals ( MODULE_PATH ) ) { modulePath = Main . checkValueIsNotAnArg ( arg , args [ ( ++ i ) ] ) ; if ( modulePath == null ) { return null ; } } else { System . err . println ( HostControllerMessages . MESSAGES . invalidOption ( arg , Main . usageNote ( ) ) ) ; return null ; } } catch ( IndexOutOfBoundsException e ) { System . err . println ( HostControllerMessages . MESSAGES . argumentExpected ( arg , Main . usageNote ( ) ) ) ; return null ; } } <START_BUG> productConfig = new ProductConfig ( Module . getBootModuleLoader ( ) , SecurityActions . getSystemProperty ( HOME_DIR ) ) ; <END_BUG> return new HostControllerEnvironment ( hostSystemProperties , isRestart , modulePath , pmAddress , pmPort , pcSocketConfig . getBindAddress ( ) , pcSocketConfig . getBindPort ( ) , defaultJVM , domainConfig , initialDomainConfig , hostConfig , initialHostConfig , initialRunningMode , backupDomainFiles , cachedDc , productConfig ) ; } private static String parseValue ( final String arg , final String key ) { } private static String checkValueIsNotAnArg ( String argument , String value ) { } private static boolean processProperties ( final String arg , final String urlSpec , Map < String , String > hostSystemProperties ) { } private static Integer parsePort ( final String value , final String key ) { } private static InetAddress parseAddress ( final String value , final String key ) { } private static URL makeURL ( String urlspec ) throws MalformedURLException { } private static Map < String , String > getHostSystemProperties ( ) { } private static String usageNote ( ) { } private static class PCSocketConfig { private final String defaultBindAddress ; private InetAddress bindAddress ; private int bindPort = 0 ; private int argIncrement = 0 ; private boolean parseFailed ; private final UnknownHostException uhe ; private PCSocketConfig ( ) { } private InetAddress getBindAddress ( ) { } private int getBindPort ( ) { } private int getArgIncrement ( ) { } private boolean isParseFailed ( ) { } private boolean processPCSocketConfigArgument ( final String arg , final String [ ] args , final int index ) { } private void setBindAddress ( String key , String value ) { } } }

Fix:
productConfig = new ProductConfig ( Module . getBootModuleLoader ( ) , SecurityActions . getSystemProperty ( HOME_DIR ) , hostSystemProperties ) ;