Buggy code:
public class RPCClient { private static Logger logger = LoggerFactory . get ( RPCClient . class ) ; public static final AttributeKey < RPCSession > SESSION_KEY = AttributeKey . valueOf ( "rpcsession" ) ; private EventLoopGroup group ; private RPCClientHandler clientHandler ; private Bootstrap bootstrap ; private RPCMessageCallback pushMessageCallback ; private NetworkTrafficStat networkTrafficStat ; private static final int DEFAULT_TIMEOUT = 15000 ; private AtomicInteger messageId ; private Map < Integer , RPCClient . RPCLock > lockMap ; private long timeout ; private String principal ; static class RPCLock { public int id ; public long startTime ; public RPCMessage response ; public RPCMessageCallback asyncCallback ; } public RPCClient ( ) { } public void principal ( String p ) { } public String principal ( ) { } private void checkAsyncTimeout ( ) { } public void stop ( ) { } private void initNettyConnector ( ) { <START_BUG> group = new NioEventLoopGroup ( 1 ) ; <END_BUG> bootstrap = new Bootstrap ( ) ; clientHandler = new RPCClientHandler ( this ) ; ChannelInitializer < SocketChannel > channelInitializer = new ChannelInitializer < SocketChannel > ( ) { @ Override public void initChannel ( SocketChannel sc ) throws Exception { if ( ( RPCServer . codec ) == ( RPCServer . CODEC_ZJSON ) ) { sc . pipeline ( ) . addLast ( new jazmin . server . rpc . codec . zjson . CompressedJSONEncoder ( networkTrafficStat ) , new jazmin . server . rpc . codec . zjson . CompressedJSONDecoder ( networkTrafficStat ) , clientHandler ) ; } else if ( ( RPCServer . codec ) == ( RPCServer . CODEC_JSON ) ) { sc . pipeline ( ) . addLast ( new jazmin . server . rpc . codec . json . JSONEncoder ( networkTrafficStat ) , new jazmin . server . rpc . codec . json . JSONDecoder ( networkTrafficStat ) , clientHandler ) ; } else if ( ( RPCServer . codec ) == ( RPCServer . CODEC_FST ) ) { sc . pipeline ( ) . addLast ( new jazmin . server . rpc . codec . fst . FSTEncoder ( networkTrafficStat ) , new jazmin . server . rpc . codec . fst . FSTDecoder ( networkTrafficStat ) , clientHandler ) ; } else { throw new IllegalArgumentException ( ( "bad<seq2seq4repair_space>codec<seq2seq4repair_space>type:" + ( RPCServer . codec ) ) ) ; } } } ; bootstrap . group ( group ) ; bootstrap . channel ( NioSocketChannel . class ) . option ( SO_KEEPALIVE , true ) . option ( TCP_NODELAY , true ) . handler ( channelInitializer ) ; } public void connect ( RPCSession session ) { } private void auth ( RPCSession session ) { } public void messageRecieved ( RPCSession session , RPCMessage message ) { } private void pushMessageReceived ( RPCSession session , RPCMessage msg ) { } private void rpcRspMessageReceived ( RPCSession session , RPCMessage msg ) { } public int sendMessage ( int msgId , RPCSession session , String serviceId , Object [ ] args ) { } public RPCMessage invokeSync ( RPCSession session , String serviceId , Object [ ] args ) { } public void invokeAsync ( RPCSession session , String serviceId , Object [ ] args , RPCMessageCallback callback ) { } public RPCMessageCallback getPushMessageCallback ( ) { } public void setPushMessageCallback ( RPCMessageCallback pushMessageCallback ) { } }

Fix:
group = new io . netty . channel . nio . NioEventLoopGroup ( 1 , Jazmin . dispatcher ) ;