Buggy code:
public void setChannelFactory ( ChannelFactory factory ) { } public String getChannelStackName ( ) { } public void setChannelStackName ( String stackName ) { } @ Override public long getMethodCallTimeout ( ) { } public void setMethodCallTimeout ( long timeout ) { } public void setGroupName ( String groupName ) { } public void setChannel ( Channel channel ) { } public void create ( ) throws Exception { } public void start ( ) throws Exception { } public void stop ( ) { } public void destroy ( ) { } public CoreGroupCommunicationService . State getState ( ) { } protected void createService ( ) throws Exception { } protected void startService ( ) throws Exception { } protected void stopService ( ) throws Exception { } protected void destroyService ( ) { } protected Channel createChannel ( ) { } protected Channel getChannel ( ) { } protected void registerGroupMembershipListener ( GroupMembershipListener listener , boolean sync ) { } protected void unregisterGroupMembershipListener ( GroupMembershipListener listener , boolean sync ) { } protected void logHistory ( String pattern , Object ... args ) { } Object objectFromByteBufferInternal ( ClassLoader loader , byte [ ] buffer , int offset , int length ) throws Exception { } byte [ ] objectToByteBufferInternal ( Object object ) throws Exception { } Object objectFromByteBufferResponseInternal ( ClassLoader loader , byte [ ] buffer , int offset , int length ) throws Exception { } byte [ ] objectToByteBufferResponseInternal ( Object obj ) throws Exception { } private void notifyChannelLock ( ) { } private < T > List < T > processResponseList ( RspList < T > rspList , boolean trace ) { } CoreGroupCommunicationService . GroupView processViewChange ( View newView ) throws Exception { } private void waitForView ( ) throws Exception { } private void setupLoggers ( String partitionName ) { } private void verifyNodeIsUnique ( ) throws IllegalStateException { } static List < ClusterNode > translateAddresses ( List < Address > addresses , ClusterNodeFactory factory ) { } static List < ClusterNode > getDeadMembers ( List < ClusterNode > oldMembers , List < ClusterNode > newMembers ) { } static List < ClusterNode > getNewMembers ( List < ClusterNode > oldMembers , List < ClusterNode > allMembers ) { } void notifyListeners ( List < GroupMembershipListener > listeners , long viewID , List < ClusterNode > allMembers , List < ClusterNode > deadMembers , List < ClusterNode > newMembers , List < List < ClusterNode > > originatingGroups ) { } protected static class GroupView { protected final long viewId ; protected final List < ClusterNode > deadMembers ; protected final List < ClusterNode > newMembers ; protected final List < ClusterNode > allMembers ; protected final List < List < ClusterNode > > originatingGroups ; protected final List < Address > jgmembers ; protected final Address coordinator ; GroupView ( ) { } GroupView ( View newView , CoreGroupCommunicationService . GroupView previousView , ClusterNodeFactory factory ) { } } class RequestMarshallerImpl implements RpcDispatcher . Marshaller { @ Override public Buffer objectToBuffer ( Object obj ) throws Exception { } @ Override public Object objectFromBuffer ( byte [ ] buf , int offset , int length ) throws Exception { } } class ResponseMarshallerImpl implements RpcDispatcher . Marshaller { @ Override public Buffer objectToBuffer ( Object obj ) throws Exception { } @ Override public Object objectFromBuffer ( byte [ ] buf , int offset , int length ) throws Exception { } } private class RpcHandler extends MuxRpcDispatcher { RpcHandler ( short scopeId , Channel channel , MessageListener messageListener , MembershipListener membershipListener , Marshaller reqMarshaller , Marshaller rspMarshaller ) { } @ Override public UpHandler getProtocolAdapter ( ) { } @ Override public Object handle ( Message req ) { } } class ViewChangeEventProcessor implements AsynchEventHandler . AsynchEventProcessor { @ Override public void processEvent ( Object event ) { } } static class ThreadGate { private static final int OPEN = 1 ; private static final int CLOSED = - 1 ; private static class Sync extends AbstractQueuedSynchronizer { private static final long serialVersionUID = 1L ; Sync ( int state ) { } @ Override <START_BUG> protected int tryAcquireShared ( int ingored ) { <END_BUG> return this . getState ( ) ; } @ Override protected boolean tryReleaseShared ( int state ) { } } private final CoreGroupCommunicationService . ThreadGate . Sync sync = new CoreGroupCommunicationService . ThreadGate . Sync ( CoreGroupCommunicationService . ThreadGate . CLOSED ) ; public void open ( ) { } public void close ( ) { } public boolean await ( long timeout ) throws InterruptedException { } } class ClusterNodeFactoryImpl implements ClusterNodeFactory { private final ConcurrentMap < Address , IpAddress > addressMap = new ConcurrentHashMap < Address , IpAddress > ( ) ; @ Override public ClusterNode getClusterNode ( Address a ) { } } public static class NoHandlerForRPC implements Serializable { static final long serialVersionUID = - 1263095408483622838L ; } private static class HAServiceResponse implements Serializable { private static final long serialVersionUID = - 6485594652749906437L ; private final String serviceName ; private final byte [ ] payload ; public HAServiceResponse ( String serviceName , byte [ ] payload ) { } public String getServiceName ( ) { } public byte [ ] getPayload ( ) { } } class MembershipListenerImpl implements MembershipListener { @ Override public void suspect ( Address suspected_mbr ) { } @ Override public void block ( ) { } @ Override public void unblock ( ) { } @ Override public void viewAccepted ( View newView ) { } } class MessageListenerImpl implements MessageListener { @ Override public void receive ( Message msg ) { } @ Override public void getState ( OutputStream stream ) { } @ Override public void setState ( InputStream stream ) { } } private abstract class StateTransferTask < T extends StateTransferResult , V > implements Callable < T > { private final String serviceName ;

Fix:
protected int tryAcquireShared ( int ignored ) {