Program: 91351
Project: 91351
Buggy source:
static VanillaSharedReplicatedHashMap<Integer,CharSequence> newSocketShmIntString(final byte identifier,final int serverPort,ClientPort... clientSocketChannelProviderMaps) throws IOException {
  final VanillaSharedReplicatedHashMapBuilder builder=new VanillaSharedReplicatedHashMapBuilder().entries(1000).identifier(identifier);
  final VanillaSharedReplicatedHashMap<Integer,CharSequence> result=builder.create(getPersistenceFile(),Integer.class,CharSequence.class);
  final int adjustedEntrySize=builder.entrySize() + 128;
  final short maxNumberOfEntriesPerChunk=ServerTcpSocketReplicator.toMaxNumberOfEntriesPerChunk(1024 * 8,adjustedEntrySize);
  for (  ClientPort clientSocketChannelProvider : clientSocketChannelProviderMaps) {
    final SocketChannelEntryWriter socketChannelEntryWriter0=new SocketChannelEntryWriter(adjustedEntrySize,maxNumberOfEntriesPerChunk,result);
    final SocketChannelEntryReader socketChannelEntryReader=new SocketChannelEntryReader(builder.entrySize(),result);
    ClientTcpSocketReplicator clientTcpSocketReplicator=new ClientTcpSocketReplicator(clientSocketChannelProvider,socketChannelEntryReader,socketChannelEntryWriter0,result);
    result.addCloseable(clientTcpSocketReplicator);
  }
  final SocketChannelEntryWriter socketChannelEntryWriter=new SocketChannelEntryWriter(adjustedEntrySize,maxNumberOfEntriesPerChunk,result);
  ServerTcpSocketReplicator serverTcpSocketReplicator=new ServerTcpSocketReplicator(result,result,serverPort,socketChannelEntryWriter);
  result.addCloseable(serverTcpSocketReplicator);
  return result;
}

Fixed version (ground truth):
static VanillaSharedReplicatedHashMap<Integer,CharSequence> newSocketShmIntString(final byte identifier,final int serverPort,ClientPort... clientSocketChannelProviderMaps) throws IOException {
  final VanillaSharedReplicatedHashMapBuilder builder=new VanillaSharedReplicatedHashMapBuilder().entries(1000).identifier(identifier);
  final VanillaSharedReplicatedHashMap<Integer,CharSequence> result=builder.create(getPersistenceFile(),Integer.class,CharSequence.class);
  final int adjustedEntrySize=result.maxEntrySize();
  final short maxNumberOfEntriesPerChunk=ServerTcpSocketReplicator.toMaxNumberOfEntriesPerChunk(1024 * 8,adjustedEntrySize);
  for (  ClientPort clientSocketChannelProvider : clientSocketChannelProviderMaps) {
    final SocketChannelEntryWriter socketChannelEntryWriter0=new SocketChannelEntryWriter(adjustedEntrySize,maxNumberOfEntriesPerChunk,result);
    final SocketChannelEntryReader socketChannelEntryReader=new SocketChannelEntryReader(builder.entrySize(),result);
    ClientTcpSocketReplicator clientTcpSocketReplicator=new ClientTcpSocketReplicator(clientSocketChannelProvider,socketChannelEntryReader,socketChannelEntryWriter0,result);
    result.addCloseable(clientTcpSocketReplicator);
  }
  final SocketChannelEntryWriter socketChannelEntryWriter=new SocketChannelEntryWriter(adjustedEntrySize,maxNumberOfEntriesPerChunk,result);
  ServerTcpSocketReplicator serverTcpSocketReplicator=new ServerTcpSocketReplicator(result,result,serverPort,socketChannelEntryWriter);
  result.addCloseable(serverTcpSocketReplicator);
  return result;
}