Buggy code:
@ Override public void run ( ) { File file = new File ( outputDir ) ; if ( ( ! ( file . exists ( ) ) ) || ( ! ( file . isDirectory ( ) ) ) ) { boolean wasDirectoryMade = file . mkdirs ( ) ; if ( wasDirectoryMade ) System . out . println ( ( ( "Directory<seq2seq4repair_space>" + ( outputDir ) ) + "<seq2seq4repair_space>created" ) ) ; else System . out . println ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>create<seq2seq4repair_space>directory<seq2seq4repair_space>" + ( outputDir ) ) ) ; } Date date = new Date ( ) ; SimpleDateFormat sdf1 = new SimpleDateFormat ( "yyyy-MM-dd<seq2seq4repair_space>HH:mm:ss.SSS" ) ; String date1 = sdf1 . format ( date ) ; SimpleDateFormat sdfFile = new SimpleDateFormat ( "yyyy-MM-dd_HHmmss" ) ; String dateFile = sdfFile . format ( date ) ; System . out . println ( ( ( ( ( ( ( ( date1 + "<seq2seq4repair_space>-<seq2seq4repair_space>Logging<seq2seq4repair_space>RTCM3<seq2seq4repair_space>stream<seq2seq4repair_space>in<seq2seq4repair_space>" ) + ( outputDir ) ) + "//" ) + ( markerName ) ) + "_" ) + dateFile ) + ".rtcm" ) ) ; setStreamFileLogger ( ( ( ( ( ( ( outputDir ) + "//" ) + ( markerName ) ) + "_" ) + dateFile ) + ".rtcm" ) ) ; try { try { Proxy proxy = Proxy . NO_PROXY ; sck = new Socket ( proxy ) ; InetSocketAddress dest = new InetSocketAddress ( settings . getHost ( ) , settings . getPort ( ) ) ; sck . connect ( dest ) ; if ( debug ) System . out . println ( ( ( ( "Connected<seq2seq4repair_space>to<seq2seq4repair_space>" + ( settings . getHost ( ) ) ) + ":" ) + ( settings . getPort ( ) ) ) ) ; running = true ; } catch ( Exception e ) { if ( debug ) System . out . println ( ( ( ( ( ( "Connection<seq2seq4repair_space>to<seq2seq4repair_space>" + ( settings . getHost ( ) ) ) + ":" ) + ( settings . getPort ( ) ) ) + "<seq2seq4repair_space>failed:<seq2seq4repair_space>\n<seq2seq4repair_space>" ) + e ) ) ; closeAll ( ) ; if ( ( ! ( askForStop ) ) && ( ( reconnectionPolicy ) == ( RTCM3Client . CONNECTION_POLICY_RECONNECT ) ) ) { if ( debug ) System . out . println ( ( ( "Sleep<seq2seq4repair_space>" + ( ( reconnectionWaitingTime ) // 1000 ) ) + "<seq2seq4repair_space>s<seq2seq4repair_space>before<seq2seq4repair_space>retry" ) ) ; Thread . sleep ( reconnectionWaitingTime ) ; start ( ) ; } else { for ( StreamEventListener sel : streamEventListeners ) { sel . streamClosed ( ) ; } } return ; } out = new PrintWriter ( sck . getOutputStream ( ) , true ) ; in = sck . getInputStream ( ) ; out . print ( ( ( "GET<seq2seq4repair_space>//" + ( settings . getSource ( ) ) ) + "<seq2seq4repair_space>HTTP//1.1\r\n" ) ) ; out . print ( ( ( "Host:<seq2seq4repair_space>" + ( settings . getHost ( ) ) ) + "\r\n" ) ) ; out . print ( "Accept:<seq2seq4repair_space>rtk//rtcm,<seq2seq4repair_space>dgps//rtcm\r\n" ) ; out . print ( "User-Agent:<seq2seq4repair_space>NTRIP<seq2seq4repair_space>goGPSprojectJava\r\n" ) ; if ( ( virtualReferenceStationPosition ) != null ) { virtualReferenceStationPosition . computeGeodetic ( ) ; String hhmmss = new SimpleDateFormat ( "HHmmss" ) . format ( new Date ( ) ) ; int h = ( ( int ) ( virtualReferenceStationPosition . getGeodeticHeight ( ) ) ) ; double lon = virtualReferenceStationPosition . getGeodeticLongitude ( ) ; double lat = virtualReferenceStationPosition . getGeodeticLatitude ( ) ; int lon_deg = ( ( int ) ( lon ) ) ; double lon_min = ( lon - lon_deg ) * 60 ; double lon_nmea = ( lon_deg * 100 ) + lon_min ; String lonn = new DecimalFormat ( "00000.000" ) . format ( lon_nmea ) ; int lat_deg = ( ( int ) ( lat ) ) ; double lat_min = ( lat - lat_deg ) * 60 ; double lat_nmea = ( lat_deg * 100 ) + lat_min ; String latn = new DecimalFormat ( "0000.000" ) . format ( lat_nmea ) ; <START_BUG> ntripGAA = ( ( ( ( ( ( ( ( ( ( ( "$GPGGA," + hhmmss ) + "," ) + latn ) + "," ) + ( lat < 0 ? "S" : "N" ) ) + "," ) + lonn ) + "," ) + ( lon < 0 ? "W" : "E" ) ) + ",1,10,1.00," ) + ( h < 0 ? 0 : h ) ) + ",M,1,M,,,," ; <END_BUG> ntripGAA = ( ( ntripGAA ) + "*" ) + ( RTCM3Client . computeNMEACheckSum ( ntripGAA ) ) ; if ( debug ) System . out . println ( ntripGAA ) ; } out . print ( "Connection:<seq2seq4repair_space>close\r\n" ) ; out . print ( ( ( "Authorization:<seq2seq4repair_space>Basic<seq2seq4repair_space>" + ( settings . getAuthbase64 ( ) ) ) + "\r\n" ) ) ; out . print ( "\r\n" ) ; if ( ( ntripGAA ) != null ) { out . print ( ( ( ntripGAA ) + "\r\n" ) ) ; lastNtripGAAsent = System . currentTimeMillis ( ) ; } out . flush ( ) ; int state = 0 ; int [ ] header = new int [ 11 ] ; int [ ] correctHeader = new int [ ] { 73 , 67 , 89 , 32 , 50 , 48 , 48 , 32 , 79 , 75 , 13 } ; int hindex = 0 ; while ( ( running ) && ( state == 0 ) ) { int c = in . read ( ) ; if ( debug ) System . out . print ( ( ( char ) ( c ) ) ) ; if ( c < 0 ) { break ; } state = transition ( state , c ) ; if ( hindex > 10 ) { running = false ; } else { header [ hindex ] = c ; hindex ++ ; }

Fix:
ntripGAA = ( ( ( ( ( ( ( ( ( ( ( "$GPGGA," + hhmmss ) + "," ) + latn ) + "," ) + ( lat < 0 ? "S" : "N" ) ) + "," ) + lonn ) + "," ) + ( lon < 0 ? "W" : "E" ) ) + ",1,10,1.00," ) + ( h < 0 ? 0 : h ) ) + ",M,1,M,," ;