Buggy code:
public class Server extends WritableFrameContainer implements ConfigChangeListener , Connection , CertificateProblemListener { private static final String DOMAIN_GENERAL = "general" . intern ( ) ; private static final String DOMAIN_PROFILE = "profile" . intern ( ) ; private static final String DOMAIN_SERVER = "server" . intern ( ) ; private final Map < String , Channel > channels = new ConcurrentSkipListMap < String , Channel > ( ) ; private final Map < String , Query > queries = new ConcurrentSkipListMap < String , Query > ( ) ; private Parser parser ; private Parser oldParser ; private ProtocolDescription protocolDescription ; private final ReadWriteLock parserLock = new ReentrantReadWriteLock ( ) ; private Raw raw ; private URI address ; private Identity profile ; private final Object myStateLock = new Object ( ) ; private final ServerStatus myState = new ServerStatus ( this , myStateLock ) ; private Timer reconnectTimer ; private final TabCompleter tabCompleter = new TabCompleter ( ) ; private String awayMessage ; private final ServerEventHandler eventHandler = new ServerEventHandler ( this ) ; private final List < Invite > invites = new ArrayList < Invite > ( ) ; private final Set < String > backgroundChannels = new HashSet < String > ( ) ; private final IgnoreList ignoreList = new IgnoreList ( ) ; private StringConverter converter = new DefaultStringConverter ( ) ; private CertificateManager certificateManager ; public Server ( final URI uri , final Identity profile ) { } private void setConnectionDetails ( final URI uri , final Identity profile ) { } @ Override public void connect ( ) { } @ Override @ Precondition ( { "The<seq2seq4repair_space>current<seq2seq4repair_space>parser<seq2seq4repair_space>is<seq2seq4repair_space>null<seq2seq4repair_space>or<seq2seq4repair_space>not<seq2seq4repair_space>connected" , "The<seq2seq4repair_space>specified<seq2seq4repair_space>profile<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>null" } ) @ SuppressWarnings ( "fallthrough" ) public void connect ( final URI address , final Identity profile ) { assert profile != null ; synchronized ( myStateLock ) { switch ( myState . getState ( ) ) { case RECONNECT_WAIT : reconnectTimer . cancel ( ) ; break ; case CLOSING : return ; case CONNECTED : case CONNECTING : disconnect ( getConfigManager ( ) . getOption ( Server . DOMAIN_GENERAL , "quitmessage" ) ) ; case DISCONNECTING : while ( ! ( myState . getState ( ) . isDisconnected ( ) ) ) { try { myStateLock . wait ( ) ; } catch ( InterruptedException ex ) { return ; } } break ; default : break ; } final URI connectAddress ; try { parserLock . writeLock ( ) . lock ( ) ; if ( ( parser ) != null ) { throw new IllegalArgumentException ( ( ( "Connection<seq2seq4repair_space>attempt<seq2seq4repair_space>while<seq2seq4repair_space>parser<seq2seq4repair_space>" + "is<seq2seq4repair_space>still<seq2seq4repair_space>connected.\n\nMy<seq2seq4repair_space>state:" ) + ( getState ( ) ) ) ) ; } getConfigManager ( ) . migrate ( address . getScheme ( ) , "" , "" , address . getHost ( ) ) ; setConnectionDetails ( address , profile ) ; updateTitle ( ) ; updateIcon ( ) ; parser = buildParser ( ) ; if ( ( parser ) == null ) { addLine ( "serverUnknownProtocol" , address . getScheme ( ) ) ; return ; } connectAddress = parser . getURI ( ) ; } finally { parserLock . writeLock ( ) . unlock ( ) ; } addLine ( "serverConnecting" , connectAddress . getHost ( ) , connectAddress . getPort ( ) ) ; myState . transition ( CONNECTING ) ; doCallbacks ( ) ; updateAwayState ( null ) ; removeInvites ( ) ; parser . connect ( ) ; if ( ( parser ) instanceof ThreadedParser ) { <START_BUG> ( ( ThreadedParser ) ( parser ) ) . getControlThread ( ) . setName ( ( "Parser<seq2seq4repair_space>-<seq2seq4repair_space>" + ( connectAddress . toString ( ) ) ) ) ; <END_BUG> } } ActionManager . getActionManager ( ) . triggerEvent ( SERVER_CONNECTING , null , this ) ; } @ Override public void reconnect ( final String reason ) { } @ Override public void reconnect ( ) { } @ Override public void disconnect ( ) { } @ Override public void disconnect ( final String reason ) { } @ Precondition ( "The<seq2seq4repair_space>server<seq2seq4repair_space>state<seq2seq4repair_space>is<seq2seq4repair_space>transiently<seq2seq4repair_space>disconnected" ) private void doDelayedReconnect ( ) { } @ Override public boolean hasChannel ( final String channel ) { } @ Override public Channel getChannel ( final String channel ) { } @ Override public List < String > getChannels ( ) { } @ Override public boolean hasQuery ( final String host ) { } @ Override public Query getQuery ( final String host ) { } @ Override public Query getQuery ( final String host , final boolean focus ) { } @ Override public void updateQuery ( final Query query , final String oldNick , final String newNick ) { } @ Override public Collection < Query > getQueries ( ) { } @ Override public void delQuery ( final Query query ) { } @ Override public void addRaw ( ) { } @ Override public Raw getRaw ( ) { } @ Override public void delRaw ( ) { } @ Override public void delChannel ( final String chan ) { } @ Override public Channel addChannel ( final ChannelInfo chan ) { } @ Override public Channel addChannel ( final ChannelInfo chan , final boolean focus ) { } private void closeChannels ( ) { } private void clearChannels ( ) { } private void closeQueries ( ) { } private static String getHost ( final URI uri ) { } private Parser buildParser ( ) { } private URI buildProxyURI ( ) { } @ Override public boolean compareURI ( final URI uri ) { } @ Override public String [ ] parseHostmask ( final String hostmask ) { } @ Precondition ( { "The<seq2seq4repair_space>current<seq2seq4repair_space>profile<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>null" , "The<seq2seq4repair_space>current<seq2seq4repair_space>profile<seq2seq4repair_space>specifies<seq2seq4repair_space>at<seq2seq4repair_space>least<seq2seq4repair_space>one<seq2seq4repair_space>nickname" } ) private MyInfo buildMyInfo ( ) { } private void updateIcon ( ) { } private void doCallbacks ( ) { } @ Override public void join ( final ChannelJoinRequest ... requests ) { }

Fix:
( ( ThreadedParser ) ( parser ) ) . getControlThread ( ) . setName ( ( "Parser<seq2seq4repair_space>-<seq2seq4repair_space>" + ( connectAddress . getHost ( ) ) ) ) ;