Buggy code:
if ( val == null ) { return null ; } hostConfig = val ; } else if ( arg . startsWith ( MASTER_ADDRESS ) ) { int idx = arg . indexOf ( '=' ) ; if ( idx == ( ( arg . length ( ) ) - 1 ) ) { System . err . println ( HostControllerMessages . MESSAGES . argumentExpected ( arg ) ) ; usage ( ) ; return null ; } String value = ( idx > ( - 1 ) ) ? arg . substring ( ( idx + 1 ) ) : args [ ( ++ i ) ] ; hostSystemProperties . put ( JBOSS_DOMAIN_MASTER_ADDRESS , value ) ; 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 ) ) ; usage ( ) ; 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 ) ) ; usage ( ) ; return null ; } String value = ( idx > ( - 1 ) ) ? arg . substring ( ( idx + 1 ) ) : args [ ( ++ i ) ] ; String propertyName = null ; 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 ) ) ; usage ( ) ; return null ; } String value = ( idx > ( - 1 ) ) ? arg . substring ( ( idx + 1 ) ) : args [ ( ++ i ) ] ; hostSystemProperties . put ( JBOSS_DEFAULT_MULTICAST_ADDRESS , value ) ; SecurityActions . setSystemProperty ( JBOSS_DEFAULT_MULTICAST_ADDRESS , value ) ; } else { System . err . println ( HostControllerMessages . MESSAGES . invalidOption ( arg ) ) ; usage ( ) ; return null ; } } catch ( IndexOutOfBoundsException e ) { System . err . println ( HostControllerMessages . MESSAGES . argumentExpected ( arg ) ) ; usage ( ) ; return null ; } } productConfig = new ProductConfig ( Module . getBootModuleLoader ( ) , SecurityActions . getSystemProperty ( HOME_DIR ) ) ; <START_BUG> return new HostControllerEnvironment ( hostSystemProperties , isRestart , stdin , stdout , stderr , pmAddress , pmPort , pcSocketConfig . getBindAddress ( ) , pcSocketConfig . getBindPort ( ) , defaultJVM , domainConfig , hostConfig , initialRunningMode , backupDomainFiles , cachedDc , productConfig ) ; <END_BUG> } private static String parseValue ( final String arg , final String key ) { } 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 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:
return new HostControllerEnvironment ( hostSystemProperties , isRestart , pmAddress , pmPort , pcSocketConfig . getBindAddress ( ) , pcSocketConfig . getBindPort ( ) , defaultJVM , domainConfig , hostConfig , initialRunningMode , backupDomainFiles , cachedDc , productConfig ) ;