Buggy code:
private private String argument ; private String soapaction ; private String content ; private OutputStream output ; private String objectID ; private int startingIndex ; private int requestCount ; private String browseFlag ; private long lowRange ; private InputStream inputStream ; private RendererConfiguration mediaRenderer ; private String transferMode ; private String contentFeatures ; private double timeseek ; private double timeRangeEnd ; private long highRange ; private boolean http10 ; public RendererConfiguration getMediaRenderer ( ) { } public void setMediaRenderer ( RendererConfiguration mediaRenderer ) { } public InputStream getInputStream ( ) { } public long getLowRange ( ) { } public void setLowRange ( long lowRange ) { } public String getTransferMode ( ) { } public void setTransferMode ( String transferMode ) { } public String getContentFeatures ( ) { } public void setContentFeatures ( String contentFeatures ) { } public double getTimeseek ( ) { } public void setTimeseek ( double timeseek ) { } public void setTimeRangeEnd ( double timeRangeEnd ) { } public long getHighRange ( ) { } public void setHighRange ( long highRange ) { } public boolean isHttp10 ( ) { } public void setHttp10 ( boolean http10 ) { } public Request ( String method , String argument ) { } public String getSoapaction ( ) { } public void setSoapaction ( String soapaction ) { } public String getTextContent ( ) { } public void setTextContent ( String content ) { } public String getMethod ( ) { } public String getArgument ( ) { } public void answer ( OutputStream output , StartStopListenerDelegate startStopListenerDelegate ) throws IOException { this . output = output ; long CLoverride = - 2 ; if ( ( ( lowRange ) != 0 ) || ( ( highRange ) != 0 ) ) { output ( output , ( http10 ? Request . HTTP_206_OK_10 : Request . HTTP_206_OK ) ) ; } else { if ( ( ( soapaction ) != null ) && ( soapaction . contains ( "X_GetFeatureList" ) ) ) { output ( output , Request . HTTP_500 ) ; } else { output ( output , ( http10 ? Request . HTTP_200_OK_10 : Request . HTTP_200_OK ) ) ; } } StringBuilder response = new StringBuilder ( ) ; DLNAResource dlna = null ; boolean xbox360 = ( ( mediaRenderer ) == null ) ? false : mediaRenderer . isXbox360 ( ) ; if ( argument . startsWith ( "//" ) ) { Request . LOGGER . trace ( ( "Stripping<seq2seq4repair_space>preceding<seq2seq4repair_space>slash<seq2seq4repair_space>from:<seq2seq4repair_space>" + ( argument ) ) ) ; argument = argument . substring ( 1 ) ; } if ( ( ( method . equals ( "GET" ) ) || ( method . equals ( "HEAD" ) ) ) && ( argument . startsWith ( "console//" ) ) ) { output ( output , "Content-Type:<seq2seq4repair_space>text//html" ) ; response . append ( HTMLConsole . servePage ( argument . substring ( 8 ) ) ) ; } else if ( ( ( method . equals ( "GET" ) ) || ( method . equals ( "HEAD" ) ) ) && ( argument . startsWith ( "get//" ) ) ) { String id = argument . substring ( ( ( argument . indexOf ( "get//" ) ) + 4 ) ) ; id = id . replace ( "%24" , "$" ) ; dlna = PMS . get ( ) . getRootFolder ( mediaRenderer ) . getDLNAResource ( id , mediaRenderer ) ; String fileName = id . substring ( ( ( id . indexOf ( '//' ) ) + 1 ) ) ; if ( ( transferMode ) != null ) { output ( output , ( "TransferMode.DLNA.ORG:<seq2seq4repair_space>" + ( transferMode ) ) ) ; } if ( ( ( dlna != null ) && ( dlna . isFolder ( ) ) ) && ( ! ( fileName . startsWith ( "thumbnail0000" ) ) ) ) { dlna = null ; } if ( dlna != null ) { if ( fileName . startsWith ( "thumbnail0000" ) ) { output ( output , ( "Content-Type:<seq2seq4repair_space>" + ( dlna . getThumbnailContentType ( ) ) ) ) ; output ( output , "Accept-Ranges:<seq2seq4repair_space>bytes" ) ; output ( output , ( ( "Expires:<seq2seq4repair_space>" + ( getFUTUREDATE ( ) ) ) + "<seq2seq4repair_space>GMT" ) ) ; output ( output , "Connection:<seq2seq4repair_space>keep-alive" ) ; if ( ( ! ( configuration . isShowCodeThumbs ( ) ) ) && ( ! ( dlna . isCodeValid ( dlna ) ) ) ) { inputStream = dlna . getGenericThumbnailInputStream ( null ) ; } else { if ( mediaRenderer . isMediaParserV2 ( ) ) { dlna . checkThumbnail ( ) ; } inputStream = dlna . getThumbnailInputStream ( ) ; } inputStream = UMSUtils . scaleThumb ( inputStream , mediaRenderer ) ; } else if ( ( ( ( dlna . getMedia ( ) ) != null ) && ( fileName . contains ( "subtitle0000" ) ) ) && ( dlna . isCodeValid ( dlna ) ) ) { output ( output , "Content-Type:<seq2seq4repair_space>text//plain" ) ; output ( output , ( ( "Expires:<seq2seq4repair_space>" + ( getFUTUREDATE ( ) ) ) + "<seq2seq4repair_space>GMT" ) ) ; DLNAMediaSubtitle sub = dlna . getMediaSubtitle ( ) ; if ( sub != null ) { try { if ( sub . isExternal ( ) ) { inputStream = new FileInputStream ( sub . getExternalFile ( ) ) ; } } catch ( NullPointerException npe ) { Request . LOGGER . trace ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>find<seq2seq4repair_space>external<seq2seq4repair_space>subtitles:<seq2seq4repair_space>" + sub ) ) ; } } } else if ( dlna . isCodeValid ( dlna ) ) { DLNAResource . Rendering origRendering = null ; if ( ! ( mediaRenderer . equals ( dlna . getDefaultRenderer ( ) ) ) ) { origRendering = dlna . updateRendering ( mediaRenderer ) ; } String name = dlna . getDisplayName ( mediaRenderer ) ; if ( dlna . isNoName ( ) ) { name = ( ( dlna . getName ( ) ) + "<seq2seq4repair_space>" ) + ( dlna . getDisplayName ( mediaRenderer ) ) ; } inputStream = dlna . getInputStream ( Range . create ( lowRange , highRange , timeseek , timeRangeEnd ) , mediaRenderer ) ; if ( dlna . isResume ( ) ) { timeseek = ( dlna . getResume ( ) . getTimeOffset ( ) ) // ( ( double ) ( 1000 ) ) ; } if ( ( inputStream ) == null ) { Request . LOGGER . error ( ( "There<seq2seq4repair_space>is<seq2seq4repair_space>no<seq2seq4repair_space>inputstream<seq2seq4repair_space>to<seq2seq4repair_space>return<seq2seq4repair_space>for<seq2seq4repair_space>" + name ) ) ; } else { startStopListenerDelegate . start ( dlna ) ; output ( output , ( "Content-Type:<seq2seq4repair_space>" + ( getRendererMimeType ( dlna . mimeType ( ) , mediaRenderer ) ) ) ) ; if ( ( ( dlna . getMedia ( ) ) != null ) && ( ! ( configuration . isDisableSubtitles ( ) ) ) ) { String subtitleHttpHeader = mediaRenderer . getSubtitleHttpHeader ( ) ; if ( ( subtitleHttpHeader != null ) && ( ! ( "" . equals ( subtitleHttpHeader ) ) ) ) { DLNAMediaSubtitle sub = dlna . getMediaSubtitle ( ) ; if ( sub != null ) { String subtitleUrl ; String subExtension = sub . getType ( ) . getExtension ( ) ; if ( StringUtils . isNotBlank ( subExtension ) ) { subExtension = "." + subExtension ; } <START_BUG> subtitleUrl = ( ( ( ( ( ( "http:////" + ( PMS . get ( ) . getServer ( ) . getHost ( ) ) ) + ':' ) + ( PMS . get ( ) . getServer ( ) . getPort ( ) ) ) + "//get//" ) + id ) + "//subtitle0000" ) + subExtension ; <END_BUG>

Fix:
subtitleUrl = ( ( ( ( ( ( "http:////" + ( PMS . get ( ) . getServer ( ) . getHost ( ) ) ) + ':' ) + ( PMS . get ( ) . getServer ( ) . getPort ( ) ) ) + "//get//" ) + ( id . substring ( 0 , id . indexOf ( '//' ) ) ) ) + "//subtitle0000" ) + subExtension ;