Buggy code:
public class EmbededTomcat { protected ContextManager contextM = new ContextManager ( ) ; protected Object application ; protected Vector connectors = new Vector ( ) ; String home = null ; String installDir = null ; Hashtable attributes = new Hashtable ( ) ; protected int dL = 0 ; boolean defaultConnectors = true ; boolean autoDeploy = true ; boolean serverXml = true ; boolean help ; boolean nostart = false ; public EmbededTomcat ( ) { } public ContextManager getContextManager ( ) { } public void setDebug ( int debug ) { } public void setHome ( String s ) { } public void setInstall ( String install ) { } public void setConfig ( String s ) { } public void setSandbox ( boolean b ) { } public void setJkconf ( boolean b ) { } public void setStart ( boolean b ) { } public void setEstart ( boolean b ) { } public void setRun ( boolean b ) { } public void setHelp ( boolean b ) { } public void setProperty ( String name , String v ) { } public void setAttribute ( String name , Object v ) { } public void addProperty ( Property prop ) { } public void setApplication ( Object app ) { } public Object getApplication ( ) { } Vector modules = new Vector ( ) ; public int addModule ( BaseInterceptor ri ) throws TomcatException { } public int addModule ( String className ) throws TomcatException { } public int findModule ( String className , int startPos ) { } public void setModuleProperty ( int id , String name , String value ) throws TomcatException { } public void addServerXmlModules ( ) throws TomcatException { } public void addDefaultModules ( ) throws TomcatException { } public void addAutoDeploy ( ) throws TomcatException { } protected boolean initialized = false ; public Context addContext ( String ctxPath , URL docRoot , String [ ] hosts ) throws TomcatException { } public Context getContext ( String host , String cpath ) { } public void initContextManager ( ) throws TomcatException { } public void start ( ) throws TomcatException { } public void stop ( ) throws TomcatException { } public int addEndpoint ( int port , InetAddress addr , String hostname ) throws TomcatException { if ( ( modules . size ( ) ) == 0 ) addDefaultModules ( ) ; defaultConnectors = false ; if ( ( dL ) > 0 ) debug ( ( ( ( ( ( "addConnector<seq2seq4repair_space>" + port ) + "<seq2seq4repair_space>" ) + addr ) + "<seq2seq4repair_space>" ) + hostname ) ) ; int mid = addModule ( "org.apache.tomcat.modules.server.Http10Interceptor" ) ; setModuleProperty ( mid , "port" , Integer . toString ( port ) ) ; if ( addr != null ) <START_BUG> setModuleProperty ( mid , "address" , addr . toString ( ) ) ; <END_BUG> if ( hostname != null ) setModuleProperty ( mid , "hostName" , hostname ) ; return mid ; } public int addAjpEndpoint ( int port , InetAddress addr , String hostname ) throws TomcatException { } public int addSecureEndpoint ( int port , InetAddress addr , String hostname , String keyFile , String keyPass ) throws TomcatException { } public void addDefaultConnectors ( ) throws TomcatException { } public void execute ( ) throws Exception { } public void execute1 ( ) throws Exception { } protected String [ ] args = null ; public void setArgs ( String [ ] args ) { } public boolean processArgs ( String [ ] args ) { } public static void main ( String [ ] args ) { } public void cleanupPrevious ( ) { } private void setTomcatProperties ( ) throws TomcatException { } ClassLoader parentCL ; ClassLoader appsCL ; ClassLoader commonCL ; ClassLoader containerCL ; URL [ ] commonCP ; URL [ ] appsCP ; URL [ ] containerCP ; public void setParentClassLoader ( ClassLoader cl ) { } public void setCommonClassLoader ( ClassLoader cl ) { } public void setCommonClassPath ( URL [ ] cp ) { } public void setAppsClassLoader ( ClassLoader cl ) { } public void setContainerClassLoader ( ClassLoader cl ) { } static final Jdk11Compat jdk11Compat = Jdk11Compat . getJdkCompat ( ) ; public static final String PROPERTY_APPS_LOADER = "org.apache.tomcat.apps.classpath" ; public static final String PROPERTY_CONTAINER_LOADER = "org.apache.tomcat.container.classpath" ; public void initClassLoaders ( ) throws IOException , MalformedURLException { } public void debug ( String s ) { } public void debug ( String s , Throwable t ) { } protected BaseInterceptor createModule ( String classN ) { } public void setSecurity ( boolean b ) { } public void setH ( String s ) { } public void setI ( String s ) { } public void setF ( String s ) { } public void addInterceptor ( BaseInterceptor ri ) throws TomcatException { } public boolean isInitialized ( ) { } public void addApplicationAdapter ( BaseInterceptor adapter ) throws TomcatException { } protected String [ ] moduleSet1 = new String [ ] { "org.apache.tomcat.modules.config.HookSetter" , "org.apache.tomcat.modules.config.PathSetter" , "org.apache.tomcat.modules.config.LoaderInterceptor11" , "org.apache.tomcat.modules.config.TrustedLoader" , "org.apache.tomcat.modules.config.LogSetter" , "org.apache.tomcat.modules.mappers.SimpleMapper1" , "org.apache.tomcat.modules.session.SessionExpirer" , "org.apache.tomcat.modules.session.SessionIdGenerator" , "org.apache.tomcat.modules.session.SessionId" , "org.apache.tomcat.facade.WebXmlReader" , "org.apache.tomcat.modules.generators.ErrorHandler" , "org.apache.tomcat.modules.config.WorkDirSetup" , "org.apache.tomcat.modules.generators.Jdk12Interceptor" , "org.apache.tomcat.modules.generators.InvokerInterceptor" , "org.apache.tomcat.facade.JspInterceptor" , "org.apache.tomcat.modules.generators.StaticInterceptor" , "org.apache.tomcat.modules.mappers.ReloadInterceptor" , "org.apache.tomcat.modules.session.SimpleSessionStore" , "org.apache.tomcat.modules.aaa.AccessInterceptor" , "org.apache.tomcat.modules.aaa.CredentialsInterceptor" , "org.apache.tomcat.modules.aaa.SimpleRealm" , "org.apache.tomcat.facade.LoadOnStartupInterceptor" , "org.apache.tomcat.facade.Servlet22Interceptor" , "org.apache.tomcat.modules.mappers.DecodeInterceptor" } ; static String POLICY_MODULE = "org.apache.tomcat.modules.config.PolicyInterceptor" ; static String LOG_EVENTS_MODULE = "org.apache.tomcat.modules.loggers.LogEvents" ; protected String [ ] moduleSetAD = new String [ ] { "org.apache.tomcat.modules.config.ContextXmlReader" , "org.apache.tomcat.modules.config.AutoDeploy" , "org.apache.tomcat.modules.config.AutoWebApp" } ; public static void printUsage ( ) { } protected void beforeAddInterceptors ( ) throws TomcatException { } }

Fix:
setModuleProperty ( mid , "address" , addr . getHostAddress ( ) ) ;