nus-yam/ex-repair huggingface dataset:
Program: 162869
Project: 162869
Buggy source:
/** 
 * @param entryCallback call this to get an entry, this class will take care of the locking
 * @return true if an entry was processed
 */
@Override public boolean nextEntry(@NotNull EntryCallback entryCallback,int chronicleId){
  long position=this.position;
  while (true) {
    long oldPosition=position;
    position=changesForIteration.nextSetBit(oldPosition + 1L);
    if (position == NOT_FOUND) {
      if (oldPosition == NOT_FOUND) {
        this.position=NOT_FOUND;
        return false;
      }
      continue;
    }
    this.position=position;
    int segmentIndex=(int)(position >>> segmentIndexShift);
    try (CompiledReplicatedMapIterationContext<K,KI,MKI,V,VI,MVI,R,?> context=iterationContext()){
      context.initTheSegmentIndex(segmentIndex);
      context.updateLock().lock();
      if (changesForUpdates.get(position)) {
        entryCallback.onBeforeEntry();
        final long segmentPos=position & posMask;
        context.readExistingEntry(segmentPos);
        if (entryCallback.shouldBeIgnored(context,chronicleId)) {
          changesForUpdates.clear(position);
          continue;
        }
        context.entryBytes().limit(context.valueOffset() + context.valueSize());
        context.entryBytes().position(context.keySizeOffset());
        boolean success=entryCallback.onEntry(context.entryBytes(),chronicleId);
        entryCallback.onAfterEntry();
        if (success)         changesForUpdates.clear(position);
        return success;
      }
    }
   }
}

Fixed version (ground truth):
/** 
 * @param entryCallback call this to get an entry, this class will take care of the locking
 * @return true if an entry was processed
 */
@Override public boolean nextEntry(@NotNull EntryCallback entryCallback,int chronicleId){
  long position=this.position;
  while (true) {
    long oldPosition=position;
    position=changesForIteration.nextSetBit(oldPosition + 1L);
    if (position == NOT_FOUND) {
      if (oldPosition == NOT_FOUND) {
        this.position=NOT_FOUND;
        return false;
      }
      bootStrapTimeStamp.set(0);
      continue;
    }
    this.position=position;
    int segmentIndex=(int)(position >>> segmentIndexShift);
    try (CompiledReplicatedMapIterationContext<K,KI,MKI,V,VI,MVI,R,?> context=iterationContext()){
      context.initTheSegmentIndex(segmentIndex);
      context.updateLock().lock();
      if (changesForUpdates.get(position)) {
        entryCallback.onBeforeEntry();
        final long segmentPos=position & posMask;
        context.readExistingEntry(segmentPos);
        if (entryCallback.shouldBeIgnored(context,chronicleId)) {
          changesForUpdates.clear(position);
          continue;
        }
        context.entryBytes().limit(context.valueOffset() + context.valueSize());
        context.entryBytes().position(context.keySizeOffset());
        boolean success=entryCallback.onEntry(context.entryBytes(),chronicleId,bootStrapTimeStamp());
        entryCallback.onAfterEntry();
        if (success)         changesForUpdates.clear(position);
        return success;
      }
    }
   }
}
Program: 162870
Project: 162870
Buggy source:
public void moveChange(long segmentIndex,long oldPos,long newPos){
  for (long next=modIterSet.nextSetBit(0L); next > 0L; next=modIterSet.nextSetBit(next + 1L)) {
    try {
      ModificationIterator modificationIterator=acquireModificationIterator((byte)next);
      if (modificationIterator.dropChange(segmentIndex,oldPos))       modificationIterator.raiseChange(segmentIndex,newPos);
    }
 catch (    Exception e) {
      LOG.error("String_Node_Str",e);
    }
  }
}

Fixed version (ground truth):
public void moveChange(long segmentIndex,long oldPos,long newPos,long timestamp){
  for (long next=modIterSet.nextSetBit(0L); next > 0L; next=modIterSet.nextSetBit(next + 1L)) {
    try {
      ModificationIterator modificationIterator=acquireModificationIterator((byte)next);
      if (modificationIterator.dropChange(segmentIndex,oldPos))       modificationIterator.raiseChange(segmentIndex,newPos,timestamp);
    }
 catch (    Exception e) {
      LOG.error("String_Node_Str",e);
    }
  }
}
Program: 162871
Project: 162871
Buggy source:
@Override public void dirtyEntries(long fromTimeStamp){
  try (CompiledReplicatedMapIterationContext<K,KI,MKI,V,VI,MVI,R,?> c=iterationContext()){
    boolean debugEnabled=LOG.isDebugEnabled();
    for (int i=0; i < actualSegments; i++) {
      final int segmentIndex=i;
      c.initTheSegmentIndex(segmentIndex);
      c.forEachReplicableEntry(entry -> {
        if (debugEnabled) {
          LOG.debug("String_Node_Str",localIdentifier,c.key(),c.value());
        }
        MapReplicableEntry re=(MapReplicableEntry)entry;
        if (debugEnabled) {
          LOG.debug("String_Node_Str" + "String_Node_Str",fromTimeStamp,re.originTimestamp(),re.originIdentifier(),localIdentifier);
        }
        if (re.originTimestamp() >= fromTimeStamp && (!bootstrapOnlyLocalEntries || re.originIdentifier() == localIdentifier)) {
          raiseChange(segmentIndex,c.pos());
        }
      }
);
    }
  }
 }

Fixed version (ground truth):
@Override public void dirtyEntries(long fromTimeStamp){
  try (CompiledReplicatedMapIterationContext<K,KI,MKI,V,VI,MVI,R,?> c=iterationContext()){
    boolean debugEnabled=LOG.isDebugEnabled();
    for (int i=0; i < actualSegments; i++) {
      final int segmentIndex=i;
      c.initTheSegmentIndex(segmentIndex);
      c.forEachReplicableEntry(entry -> {
        if (debugEnabled) {
          LOG.debug("String_Node_Str",localIdentifier,c.key(),c.value());
        }
        MapReplicableEntry re=(MapReplicableEntry)entry;
        if (debugEnabled) {
          LOG.debug("String_Node_Str" + "String_Node_Str",fromTimeStamp,re.originTimestamp(),re.originIdentifier(),localIdentifier);
        }
        if (re.originTimestamp() >= fromTimeStamp && (!bootstrapOnlyLocalEntries || re.originIdentifier() == localIdentifier)) {
          raiseChange(segmentIndex,c.pos(),c.timestamp());
        }
      }
);
    }
  }
 }
Program: 162872
Project: 162872
Buggy source:
public void initReplicationInput(Bytes replicatedInputBytes){
  initReplicatedInputBytes(replicatedInputBytes);
  riKeySize=mh.m().keySizeMarshaller.readSize(replicatedInputBytes);
  riValueSize=mh.m().valueSizeMarshaller.readSize(replicatedInputBytes);
  riTimestamp=replicatedInputBytes.readStopBit();
  riId=replicatedInputBytes.readByte();
  ru.initReplicationUpdate(riTimestamp,riId);
  isDeleted=replicatedInputBytes.readBoolean();
  riKeyOffset=replicatedInputBytes.position();
  riValueOffset=riKeyOffset + riKeySize;
}

Fixed version (ground truth):
public void initReplicationInput(Bytes replicatedInputBytes){
  initReplicatedInputBytes(replicatedInputBytes);
  bootstrapTimestamp=replicatedInputBytes.readLong();
  riKeySize=mh.m().keySizeMarshaller.readSize(replicatedInputBytes);
  riValueSize=mh.m().valueSizeMarshaller.readSize(replicatedInputBytes);
  riTimestamp=replicatedInputBytes.readStopBit();
  riId=replicatedInputBytes.readByte();
  ru.initReplicationUpdate(riTimestamp,riId);
  isDeleted=replicatedInputBytes.readBoolean();
  riKeyOffset=replicatedInputBytes.position();
  riValueOffset=riKeyOffset + riKeySize;
}
Program: 162873
Project: 162873
Buggy source:
public void processReplicatedEvent(){
  if (riId == mh.m().identifier()) {
    return;
  }
  q.initInputKey(replicatedInputKeyBytesValue);
  boolean debugEnabled=lh.LOG.isDebugEnabled();
  s.innerUpdateLock.lock();
  if (isDeleted) {
    if (debugEnabled) {
      lh.LOG.debug("String_Node_Str",mh.m().identifier(),riId,q.inputKey);
    }
    mh.m().remoteOperations.remove(this);
    mh.m().setLastModificationTime(riId,riTimestamp);
    return;
  }
  String message=null;
  if (debugEnabled) {
    message=String.format("String_Node_Str",mh.m().identifier(),riId,q.inputKey);
  }
  mh.m().remoteOperations.put(this,replicatedInputValueBytesValue);
  mh.m().setLastModificationTime(riId,riTimestamp);
  if (debugEnabled) {
    lh.LOG.debug(message + "String_Node_Str" + replicatedInputValueBytesValue+ "String_Node_Str");
  }
}

Fixed version (ground truth):
public void processReplicatedEvent(){
  if (riId == mh.m().identifier()) {
    return;
  }
  mh.m().setLastModificationTime(riId,bootstrapTimestamp);
  q.initInputKey(replicatedInputKeyBytesValue);
  boolean debugEnabled=lh.LOG.isDebugEnabled();
  s.innerUpdateLock.lock();
  if (isDeleted) {
    if (debugEnabled) {
      lh.LOG.debug("String_Node_Str",mh.m().identifier(),riId,q.inputKey);
    }
    mh.m().remoteOperations.remove(this);
    return;
  }
  String message=null;
  if (debugEnabled) {
    message=String.format("String_Node_Str",mh.m().identifier(),riId,q.inputKey);
  }
  mh.m().remoteOperations.put(this,replicatedInputValueBytesValue);
  if (debugEnabled) {
    lh.LOG.debug(message + "String_Node_Str" + replicatedInputValueBytesValue+ "String_Node_Str");
  }
}
Program: 162874
Project: 162874
Buggy source:
public void initEntryAndKeyCopying(long entrySize,long bytesToCopy){
  initAllocatedChunks(hh.h().inChunks(entrySize));
  entry.copyExistingEntry(s.alloc(allocatedChunks),bytesToCopy);
  incrementSegmentEntriesIfNeeded();
}

Fixed version (ground truth):
public void initEntryAndKeyCopying(long entrySize,long bytesToCopy){
  initAllocatedChunks(hh.h().inChunks(entrySize));
  incrementSegmentEntriesIfNeeded();
  entry.copyExistingEntry(s.alloc(allocatedChunks),bytesToCopy);
}
Program: 162875
Project: 162875
Buggy source:
public void initEntryAndKey(long entrySize){
  initAllocatedChunks(hh.h().inChunks(entrySize));
  entry.writeNewEntry(s.alloc(allocatedChunks),q.inputKey);
  incrementSegmentEntriesIfNeeded();
}

Fixed version (ground truth):
public void initEntryAndKey(long entrySize){
  initAllocatedChunks(hh.h().inChunks(entrySize));
  incrementSegmentEntriesIfNeeded();
  entry.writeNewEntry(s.alloc(allocatedChunks),q.inputKey);
}
Program: 162876
Project: 162876
Buggy source:
@NotNull EQC queryContext(Value<K,?> key);

Fixed version (ground truth):
@NotNull EQC queryContext(Data<K,?> key);
Program: 162877
Project: 162877
Buggy source:
/** 
 * Returns the key is going to be inserted into the   {@code ChronicleHash}.
 */
@NotNull Value<K,?> absentKey();

Fixed version (ground truth):
/** 
 * Returns the key is going to be inserted into the   {@code ChronicleHash}.
 */
@NotNull Data<K,?> absentKey();
Program: 162878
Project: 162878
Buggy source:
/** 
 * Returns the entry key.
 */
@NotNull Value<K,?> key();

Fixed version (ground truth):
/** 
 * Returns the entry key.
 */
@NotNull Data<K,?> key();
Program: 162879
Project: 162879
Buggy source:
/** 
 * Returns the queried key as a   {@code Value}.
 */
Value<K,?> queriedKey();

Fixed version (ground truth):
/** 
 * Returns the queried key as a   {@code Data}.
 */
Data<K,?> queriedKey();
Program: 162880
Project: 162880
Buggy source:
/** 
 * Returns the acceptance decision, should be made about the modification operation in the given   {@code context}, aiming to modify the given   {@code entry}. This method doesn't do any changes to   {@code entry} nor {@code context} state. {@link MapRemoteOperations} and{@link SetRemoteOperations} method implementations should guide the result of calling thismethod to do something to <i>actually</i> apply the remote operation.
 * @param entry the entry to be modified
 * @param context the remote operation context
 * @return if the remote operation should be accepted or discarded
 */
public static AcceptanceDecision decideOnRemoteModification(HashReplicableEntry<?> entry,RemoteOperationContext<?> context){
  long remoteTimestamp=context.remoteTimestamp();
  long originTimestamp=entry.originTimestamp();
  boolean shouldAccept=remoteTimestamp > originTimestamp || (remoteTimestamp == originTimestamp && context.remoteIdentifier() <= entry.originIdentifier());
  return shouldAccept ? ACCEPT : DISCARD;
}

Fixed version (ground truth):
/** 
 * Returns the acceptance decision, should be made about the modification operation in the given   {@code context}, aiming to modify the given   {@code entry}. This method doesn't do any changes to   {@code entry} nor {@code context} state. {@link MapRemoteOperations} and{@link SetRemoteOperations} method implementations should guide the result of calling thismethod to do something to <i>actually</i> apply the remote operation.
 * @param entry the entry to be modified
 * @param context the remote operation context
 * @return if the remote operation should be accepted or discarded
 */
public static AcceptanceDecision decideOnRemoteModification(ReplicableEntry entry,RemoteOperationContext<?> context){
  long remoteTimestamp=context.remoteTimestamp();
  long originTimestamp=entry.originTimestamp();
  boolean shouldAccept=remoteTimestamp > originTimestamp || (remoteTimestamp == originTimestamp && context.remoteIdentifier() <= entry.originIdentifier());
  return shouldAccept ? ACCEPT : DISCARD;
}
Program: 162881
Project: 162881
Buggy source:
@Override public boolean shouldBeIgnored(final HashReplicableEntry<?> entry,final int chronicleId){
  return !externalizable.identifierCheck(entry,chronicleId);
}

Fixed version (ground truth):
@Override public boolean shouldBeIgnored(final ReplicableEntry entry,final int chronicleId){
  return !externalizable.identifierCheck(entry,chronicleId);
}
Program: 162882
Project: 162882
Buggy source:
@Override public boolean identifierCheck(@NotNull HashReplicableEntry<?> entry,int chronicleId){
  return true;
}

Fixed version (ground truth):
@Override public boolean identifierCheck(@NotNull ReplicableEntry entry,int chronicleId){
  return true;
}
Program: 162883
Project: 162883
Buggy source:
@NotNull @Override public ExternalMapQueryContext<String,String,?> queryContext(Value<String,?> key){
  throw new UnsupportedOperationException();
}

Fixed version (ground truth):
@NotNull @Override public ExternalMapQueryContext<String,String,?> queryContext(Data<String,?> key){
  throw new UnsupportedOperationException();
}
Program: 162884
Project: 162884
Buggy source:
/** 
 * Returns the <i>default</i> (or <i>nil</i>) value, that should be inserted into the map in this context. This is primarily used in   {@link ChronicleMap#acquireUsing} operationimplementation, i. e.  {@link MapMethods#acquireUsing}. <p>This method if the default implementation for   {@link MapEntryOperations#defaultValue}, which might be customized over the default.
 * @return the default value to be inserted into the map
 * @see MapEntryOperations#defaultValue(MapAbsentEntry)
 */
@NotNull Value<V,?> defaultValue();

Fixed version (ground truth):
/** 
 * Returns the <i>default</i> (or <i>nil</i>) value, that should be inserted into the map in this context. This is primarily used in   {@link ChronicleMap#acquireUsing} operationimplementation, i. e.  {@link MapMethods#acquireUsing}. <p>This method if the default implementation for   {@link MapEntryOperations#defaultValue}, which might be customized over the default.
 * @return the default value to be inserted into the map
 * @see MapEntryOperations#defaultValue(MapAbsentEntry)
 */
@NotNull Data<V,?> defaultValue();
Program: 162885
Project: 162885
Buggy source:
/** 
 * Inserts the new entry into the map, of   {@linkplain #absentKey() the key} and the given {@code value}. <p>This method is the default implementation for   {@link MapEntryOperations#insert(MapAbsentEntry,Value)}, which might be customized over the default. 
 * @param value the value to insert into the map along with {@link #absentKey() the key}
 * @throws IllegalStateException if some locking/state conditions required to perform insertionoperation are not met
 * @see MapEntryOperations#insert(MapAbsentEntry,Value)
 */
void doInsert(Value<V,?> value);

Fixed version (ground truth):
/** 
 * Inserts the new entry into the map, of   {@linkplain #absentKey() the key} and the given {@code value}. <p>This method is the default implementation for   {@link MapEntryOperations#insert(MapAbsentEntry,Data)}, which might be customized over the default.
 * @param value the value to insert into the map along with {@link #absentKey() the key}
 * @throws IllegalStateException if some locking/state conditions required to perform insertionoperation are not met
 * @see MapEntryOperations#insert(MapAbsentEntry,Data)
 */
void doInsert(Data<V,?> value);
Program: 162886
Project: 162886
Buggy source:
/** 
 * Wraps the given value as a   {@code Value}. Useful when you need to pass a value to some method accepting   {@code Value}, for example,   {@link MapEntryOperations#replaceValue(MapEntry,Value)}, without allocating new objects (i. e. garbage) and   {@code ThreadLocals}. <p>The returned   {@code Value} object shouldn't outlive this {@code MapContext}.
 * @param value the value object to wrap
 * @return the value as {@code Value}
 */
Value<V,?> wrapValueAsValue(V value);

Fixed version (ground truth):
/** 
 * Wraps the given value as a   {@code Data}. Useful when you need to pass a value to some method accepting   {@code Data}, for example,   {@link MapEntryOperations#replaceValue(MapEntry,Data)}, without allocating new objects (i. e. garbage) and   {@code ThreadLocals}. <p>The returned   {@code Data} object shouldn't outlive this {@code MapContext}.
 * @param value the value object to wrap
 * @return the value as {@code Data}
 */
Data<V,?> wrapValueAsValue(V value);
Program: 162887
Project: 162887
Buggy source:
public final void createMappedStoreAndSegments(File file) throws IOException {
  OS.warnOnWindows(sizeInBytes());
  createMappedStoreAndSegments(new MappedStore(file,FileChannel.MapMode.READ_WRITE,sizeInBytes(),BytesMarshallableSerializer.create()));
}

Fixed version (ground truth):
public final void createMappedStoreAndSegments(File file) throws IOException {
  createMappedStoreAndSegments(new MappedStore(file,FileChannel.MapMode.READ_WRITE,sizeInBytes(),BytesMarshallableSerializer.create()));
}
Program: 162888
Project: 162888
Buggy source:
ChronicleMap<K,V> createWithoutFile(SingleChronicleHashReplication singleHashReplication,ReplicationChannel channel){
  try {
    VanillaChronicleMap<K,?,?,V,?,?,?> map=newMap(singleHashReplication,channel);
    if (OS.warnOnWindows(map.sizeInBytes())) {
      throw new IllegalStateException("String_Node_Str");
    }
    BytesStore bytesStore=new DirectStore(JDKObjectSerializer.INSTANCE,map.sizeInBytes(),true);
    map.createMappedStoreAndSegments(bytesStore);
    return establishReplication(map,singleHashReplication,channel);
  }
 catch (  IOException e) {
    throw new AssertionError(e);
  }
}

Fixed version (ground truth):
ChronicleMap<K,V> createWithoutFile(SingleChronicleHashReplication singleHashReplication,ReplicationChannel channel){
  try {
    VanillaChronicleMap<K,?,?,V,?,?,?> map=newMap(singleHashReplication,channel);
    BytesStore bytesStore=new DirectStore(JDKObjectSerializer.INSTANCE,map.sizeInBytes(),true);
    map.createMappedStoreAndSegments(bytesStore);
    return establishReplication(map,singleHashReplication,channel);
  }
 catch (  IOException e) {
    throw new AssertionError(e);
  }
}
Program: 162889
Project: 162889
Buggy source:
/** 
 * This method does not set a segment lock, A segment lock should be obtained before calling this method, especially when being used in a multi threaded context.
 */
@Override public void readExternalEntry(@NotNull Bytes source){
  try (CompiledReplicatedMapQueryContext<K,KI,MKI,V,VI,MVI,R,?> remoteOpContext=mapContext()){
    remoteOpContext.initReplicationInput(source);
  }
 }

Fixed version (ground truth):
/** 
 * This method does not set a segment lock, A segment lock should be obtained before calling this method, especially when being used in a multi threaded context.
 */
@Override public void readExternalEntry(@NotNull Bytes source){
  try (CompiledReplicatedMapQueryContext<K,KI,MKI,V,VI,MVI,R,?> remoteOpContext=mapContext()){
    remoteOpContext.initReplicationInput(source);
    remoteOpContext.processReplicatedEvent();
  }
 }
Program: 162890
Project: 162890
Buggy source:
private void checkTimeout(long timeoutTime){
  if (timeoutTime < System.currentTimeMillis() && !IS_DEBUG)   throw new RemoteCallTimeoutException();
}

Fixed version (ground truth):
private void checkTimeout(long timeoutTime){
}
Program: 162891
Project: 162891
Buggy source:
@Override public void process(@NotNull final Wire in,@NotNull final Wire out,@NotNull final ConcurrentMap<K,V> map,@NotNull final CharSequence csp,@NotNull final BiConsumer<ValueOut,V> vToWire,@NotNull final Function<ValueIn,K> kFromWire,@NotNull final Function<ValueIn,V> vFromWire) throws StreamCorruptedException {
  this.vToWire=vToWire;
  this.wireToK=kFromWire;
  this.wireToV=vFromWire;
  try {
    this.inWire=in;
    this.outWire=out;
    this.map=map;
    this.csp=csp;
    inWire.readDocument(metaDataConsumer,dataConsumer);
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str",e);
  }
}

Fixed version (ground truth):
@Override public <K,V>void process(Wire in,Wire out,Map<K,V> map,CharSequence csp,BiConsumer<ValueOut,V> vToWire,Function<ValueIn,K> kFromWire,Function<ValueIn,V> vFromWire) throws StreamCorruptedException {
  this.vToWire=(BiConsumer<ValueOut,Object>)vToWire;
  this.wireToK=(Function<ValueIn,Object>)kFromWire;
  this.wireToV=(Function<ValueIn,Object>)vFromWire;
  try {
    this.inWire=in;
    this.outWire=out;
    this.map=map;
    this.csp=csp;
    inWire.readDocument(metaDataConsumer,dataConsumer);
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str",e);
  }
}
Program: 162892
Project: 162892
Buggy source:
@Override public <K,V>void process(Wire in,Wire out,Map<K,V> map,CharSequence csp,BiConsumer<ValueOut,V> vToWire,Function<ValueIn,K> kFromWire,Function<ValueIn,V> vFromWire) throws StreamCorruptedException {
  this.vToWire=(BiConsumer<ValueOut,Object>)vToWire;
  this.wireToK=(Function<ValueIn,Object>)kFromWire;
  this.wireToV=(Function<ValueIn,Object>)vFromWire;
  try {
    this.inWire=in;
    this.outWire=out;
    this.map=map;
    this.csp=csp;
    inWire.readDocument(metaDataConsumer,dataConsumer);
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str",e);
  }
}

Fixed version (ground truth):
@Override public void process(Wire in,Wire out,Map<K,V> map,CharSequence csp,BiConsumer<ValueOut,V> vToWire,Function<ValueIn,K> kFromWire,Function<ValueIn,V> vFromWire) throws StreamCorruptedException {
  this.vToWire=vToWire;
  this.wireToK=kFromWire;
  this.wireToV=vFromWire;
  try {
    this.inWire=in;
    this.outWire=out;
    this.map=map;
    this.csp=csp;
    inWire.readDocument(metaDataConsumer,dataConsumer);
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str",e);
  }
}
Program: 162893
Project: 162893
Buggy source:
private byte[] bytes(Object b){
  if (b == null)   return null;
  final Wire wire=toWire();
  ((ValueOut)b).object(b);
  wire.bytes().flip();
  return toWire().getValueIn().bytes();
}

Fixed version (ground truth):
private byte[] bytes(Object b){
  if (b == null)   return null;
  final Wire wire=toWire();
  wire.getValueOut().object(b);
  wire.bytes().flip();
  return toWire().getValueIn().bytes();
}
Program: 162894
Project: 162894
Buggy source:
@Nullable protected <R>R proxyReturnObject(@NotNull final Class<R> rClass,@NotNull final E eventId,Object field){
  final long startTime=System.currentTimeMillis();
  final long tid=sendEvent(startTime,eventId,out -> out.object(out));
  if (eventReturnsNull(eventId))   return null;
  if (rClass == vClass)   return (R)readValue(reply,tid,startTime,null);
 else   throw new UnsupportedOperationException("String_Node_Str" + rClass + "String_Node_Str"+ "String_Node_Str");
}

Fixed version (ground truth):
@Nullable protected <R>R proxyReturnObject(@NotNull final Class<R> rClass,@NotNull final E eventId,@NotNull final Object o){
  final long startTime=System.currentTimeMillis();
  final long tid=sendEvent(startTime,eventId,out -> out.object(o));
  if (eventReturnsNull(eventId))   return null;
  if (rClass == vClass)   return (R)readValue(reply,tid,startTime,null);
 else   throw new UnsupportedOperationException("String_Node_Str" + rClass + "String_Node_Str"+ "String_Node_Str");
}
Program: 162895
Project: 162895
Buggy source:
public boolean containsValue(Object value){
  return proxyReturnBoolean(containsValue,out -> out.object(out));
}

Fixed version (ground truth):
public boolean containsValue(Object value){
  return proxyReturnBoolean(containsValue,out -> out.object(value));
}
Program: 162896
Project: 162896
Buggy source:
public boolean containsKey(Object key){
  return proxyReturnBoolean(containsKey,out -> out.object(out));
}

Fixed version (ground truth):
public boolean containsKey(Object key){
  return proxyReturnBoolean(containsKey,out -> out.object(key));
}
Program: 162897
Project: 162897
Buggy source:
private synchronized void attemptConnect(final InetSocketAddress remoteAddress){
  closeExisting();
  try {
    SocketChannel socketChannel=AbstractChannelReplicator.openSocketChannel(closeables);
    if (socketChannel.connect(remoteAddress)) {
      clientChannel=socketChannel;
    }
  }
 catch (  IOException e) {
    if (closeables != null)     closeables.closeQuietly();
    clientChannel=null;
  }
}

Fixed version (ground truth):
private synchronized void attemptConnect(final InetSocketAddress remoteAddress){
  closeExisting();
  try {
    SocketChannel socketChannel=AbstractChannelReplicator.openSocketChannel(closeables);
    if (socketChannel.connect(remoteAddress))     clientChannel=socketChannel;
  }
 catch (  IOException e) {
    LOG.error("String_Node_Str",e);
    if (closeables != null)     closeables.closeQuietly();
    clientChannel=null;
  }
}
Program: 162898
Project: 162898
Buggy source:
private ByteBuffer inWireByteBuffer(){
  return (ByteBuffer)intWire.bytes().underlyingObject();
}

Fixed version (ground truth):
private ByteBuffer inWireByteBuffer(long requiredCapacity){
  intWire.bytes().ensureCapacity(requiredCapacity);
  return (ByteBuffer)intWire.bytes().underlyingObject();
}
Program: 162899
Project: 162899
Buggy source:
private byte[] toBytes(WireKey fieldName){
  final Wire wire=inWire;
  final ValueIn read=wire.read(fieldName);
  final long l=read.readLength();
  if (l > Integer.MAX_VALUE)   throw new BufferOverflowException();
  final int fieldLength=(int)l;
  final long endPos=wire.bytes().position() + fieldLength;
  final long limit=wire.bytes().limit();
  try {
    byte[] bytes=new byte[fieldLength];
    wire.bytes().read(bytes);
    return bytes;
  }
  finally {
    wire.bytes().position(endPos);
    wire.bytes().limit(limit);
  }
}

Fixed version (ground truth):
private byte[] toBytes(WireKey fieldName){
  final Wire wire=inWire;
  final ValueIn read=wire.read(fieldName);
  final long l=read.readLength();
  if (l > Integer.MAX_VALUE)   throw new BufferOverflowException();
  final int fieldLength=(int)l;
  Bytes<?> bytes1=wire.bytes();
  final long endPos=bytes1.position() + fieldLength;
  final long limit=bytes1.limit();
  try {
    byte[] bytes=new byte[fieldLength];
    bytes1.read(bytes);
    return bytes;
  }
  finally {
    bytes1.position(endPos);
    bytes1.limit(limit);
  }
}
Program: 162900
Project: 162900
Buggy source:
@Override public void run(){
  boolean hasNext;
  for (; ; ) {
    hasNext=inWire.read(Fields.hasNext).bool();
    collectData.put(toBytes(arg1),toBytes(arg2));
    if (!hasNext) {
      incompleteWork.remove(transactionId);
      outWire.write(Fields.transactionId).int64(transactionId);
      writeVoid(() -> {
        bytesMap.delegate.putAll((Map)collectData);
        return null;
      }
);
      return;
    }
    if (inWire.bytes().remaining() == 0)     return;
  }
}

Fixed version (ground truth):
@Override public void run(){
  boolean hasNext;
  for (; ; ) {
    hasNext=inWire.read(Fields.hasNext).bool();
    collectData.put(toBytes(arg1),toBytes(arg2));
    if (!hasNext) {
      incompleteWork.remove(transactionId);
      outWire.write(Fields.transactionId).int64(transactionId);
      writeVoid(() -> {
        bytesMap.delegate.putAll((Map)collectData);
        return null;
      }
);
      return;
    }
    final Bytes<?> bytes=inWire.bytes();
    if (bytes.remaining() == 0)     return;
  }
}
Program: 162901
Project: 162901
Buggy source:
@SuppressWarnings("String_Node_Str") private void writeValueFromBytes(final Function<BytesChronicleMap,byte[]> f){
  write(b -> {
    byte[] fromBytes=f.apply(b);
    boolean isNull=fromBytes == null || fromBytes.length == 0;
    outWire.write(resultIsNull).bool(isNull);
    if (isNull)     return;
    outWire.write(result);
    outWire.bytes().write(fromBytes);
  }
);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private void writeValueFromBytes(final Function<BytesChronicleMap,byte[]> f){
  write(b -> {
    byte[] fromBytes=f.apply(b);
    boolean isNull=fromBytes == null || fromBytes.length == 0;
    outWire.write(resultIsNull).bool(isNull);
    if (isNull)     return;
    outWire.write(result);
    Bytes<?> bytes=outWire.bytes();
    bytes.write(fromBytes);
  }
);
}
Program: 162902
Project: 162902
Buggy source:
@SuppressWarnings("String_Node_Str") private void writeValueUsingDelegate(final Function<ChronicleMap<byte[],byte[]>,byte[]> f){
  write(b -> {
    byte[] result=f.apply((ChronicleMap)b.delegate);
    boolean isNull=result == null;
    outWire.write(resultIsNull).bool(isNull);
    if (isNull)     return;
    isNull=result.length == 0;
    outWire.write(Fields.result);
    outWire.bytes().write(result);
  }
);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private void writeValueUsingDelegate(final Function<ChronicleMap<byte[],byte[]>,byte[]> f){
  write(b -> {
    byte[] result=f.apply((ChronicleMap)b.delegate);
    boolean isNull=result == null;
    outWire.write(resultIsNull).bool(isNull);
    if (isNull)     return;
    isNull=result.length == 0;
    outWire.write(Fields.result);
    final Bytes<?> bytes=outWire.bytes();
    bytes.write(result);
  }
);
}
Program: 162904
Project: 162904
Buggy source:
/** 
 * creates a lang buffer that holds just the payload of the args
 * @param wire the inbound wire
 * @return a new lang buffer containing the bytes of the args
 */
private byte[] toByteArray(@NotNull Wire wire,@NotNull WireKey field){
  final ValueIn read=wire.read(field);
  final long fieldLength=read.readLength();
  final long endPos=wire.bytes().position() + fieldLength;
  final long limit=wire.bytes().limit();
  byte[] result=new byte[]{};
  try {
    final Bytes source=wire.bytes();
    source.limit(endPos);
    if (source.remaining() > Integer.MAX_VALUE)     throw new BufferOverflowException();
    result=new byte[(int)source.remaining()];
    source.read(result);
  }
  finally {
    wire.bytes().position(endPos);
    wire.bytes().limit(limit);
  }
  return result;
}

Fixed version (ground truth):
/** 
 * creates a lang buffer that holds just the payload of the args
 * @param wire the inbound wire
 * @return a new lang buffer containing the bytes of the args
 */
private byte[] toByteArray(@NotNull Wire wire,@NotNull WireKey field){
  final ValueIn read=wire.read(field);
  final long fieldLength=read.readLength();
  Bytes<?> bytes=wire.bytes();
  final long endPos=bytes.position() + fieldLength;
  final long limit=bytes.limit();
  byte[] result=new byte[]{};
  try {
    final Bytes source=bytes;
    source.limit(endPos);
    if (source.remaining() > Integer.MAX_VALUE)     throw new BufferOverflowException();
    result=new byte[(int)source.remaining()];
    source.read(result);
  }
  finally {
    bytes.position(endPos);
    bytes.limit(limit);
  }
  return result;
}
Program: 162905
Project: 162905
Buggy source:
private void putAll(long transactionId){
  final BytesChronicleMap bytesMap=bytesMap(MapWireHandler.this.channelId);
  if (bytesMap == null)   return;
  Runnable runnable=incompleteWork.get(transactionId);
  if (runnable != null) {
    runnable.run();
    return;
  }
  runnable=new Runnable(){
    final Map<byte[],byte[]> collectData=new HashMap<>();
    @Override public void run(){
      boolean hasNext;
      for (; ; ) {
        hasNext=inWire.read(Fields.hasNext).bool();
        collectData.put(toBytes(arg1),toBytes(arg2));
        if (!hasNext) {
          incompleteWork.remove(transactionId);
          outWire.write(Fields.transactionId).int64(transactionId);
          writeVoid(() -> {
            bytesMap.delegate.putAll((Map)collectData);
            return null;
          }
);
          return;
        }
        if (inWire.bytes().remaining() == 0)         return;
      }
    }
  }
;
  incompleteWork.put(transactionId,runnable);
  runnable.run();
}

Fixed version (ground truth):
private void putAll(long transactionId){
  final BytesChronicleMap bytesMap=bytesMap(MapWireHandler.this.channelId);
  if (bytesMap == null)   return;
  Runnable runnable=incompleteWork.get(transactionId);
  if (runnable != null) {
    runnable.run();
    return;
  }
  runnable=new Runnable(){
    final Map<byte[],byte[]> collectData=new HashMap<>();
    @Override public void run(){
      boolean hasNext;
      for (; ; ) {
        hasNext=inWire.read(Fields.hasNext).bool();
        collectData.put(toBytes(arg1),toBytes(arg2));
        if (!hasNext) {
          incompleteWork.remove(transactionId);
          outWire.write(Fields.transactionId).int64(transactionId);
          writeVoid(() -> {
            bytesMap.delegate.putAll((Map)collectData);
            return null;
          }
);
          return;
        }
        final Bytes<?> bytes=inWire.bytes();
        if (bytes.remaining() == 0)         return;
      }
    }
  }
;
  incompleteWork.put(transactionId,runnable);
  runnable.run();
}
Program: 162906
Project: 162906
Buggy source:
/** 
 * creates a lang buffer that holds just the payload of the args
 * @param wire the inbound wire
 * @param args the key names of the {@code wire} args
 * @return a new lang buffer containing the bytes of the args
 */
private net.openhft.lang.io.Bytes toReader(@NotNull Wire wire,@NotNull WireKey... args){
  final long inSize=wire.bytes().limit();
  final net.openhft.lang.io.Bytes bytes=DirectStore.allocate(inSize).bytes();
  for (  final WireKey field : args) {
    final ValueIn read=wire.read(field);
    final long fieldLength=read.readLength();
    final long endPos=wire.bytes().position() + fieldLength;
    final long limit=wire.bytes().limit();
    try {
      final Bytes source=wire.bytes();
      source.limit(endPos);
      bytes.writeStopBit(source.remaining());
      while (source.remaining() > 0) {
        if (source.remaining() >= 8)         bytes.writeLong(source.readLong());
 else         bytes.writeByte(source.readByte());
      }
    }
  finally {
      wire.bytes().position(endPos);
      wire.bytes().limit(limit);
    }
  }
  return bytes.flip();
}

Fixed version (ground truth):
/** 
 * creates a lang buffer that holds just the payload of the args
 * @param wire the inbound wire
 * @param args the key names of the {@code wire} args
 * @return a new lang buffer containing the bytes of the args
 */
private net.openhft.lang.io.Bytes toReader(@NotNull Wire wire,@NotNull WireKey... args){
  Bytes<?> bytes1=wire.bytes();
  final long inSize=bytes1.limit();
  final net.openhft.lang.io.Bytes bytes=DirectStore.allocate(inSize).bytes();
  for (  final WireKey field : args) {
    final ValueIn read=wire.read(field);
    final long fieldLength=read.readLength();
    final long endPos=bytes1.position() + fieldLength;
    final long limit=bytes1.limit();
    try {
      final Bytes source=bytes1;
      source.limit(endPos);
      bytes.writeStopBit(source.remaining());
      while (source.remaining() > 0) {
        if (source.remaining() >= 8)         bytes.writeLong(source.readLong());
 else         bytes.writeByte(source.readByte());
      }
    }
  finally {
      bytes1.position(endPos);
      bytes1.limit(limit);
    }
  }
  return bytes.flip();
}
Program: 162907
Project: 162907
Buggy source:
@SuppressWarnings("String_Node_Str") private void write(@NotNull Consumer<BytesChronicleMap> c){
  final BytesChronicleMap bytesMap=bytesMap(channelId);
  if (bytesMap == null) {
    LOG.error("String_Node_Str" + channelId + "String_Node_Str");
    return;
  }
  bytesMap.output=null;
  outWire.bytes().mark();
  outWire.write(isException).bool(false);
  try {
    c.accept(bytesMap);
  }
 catch (  Exception e) {
    outWire.bytes().reset();
    outWire.write(isException).bool(true);
    outWire.write(exception).text(toString(e));
    LOG.error("String_Node_Str",e);
    return;
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private void write(@NotNull Consumer<BytesChronicleMap> c){
  final BytesChronicleMap bytesMap=bytesMap(channelId);
  if (bytesMap == null) {
    LOG.error("String_Node_Str" + channelId + "String_Node_Str");
    return;
  }
  bytesMap.output=null;
  final Bytes<?> bytes=outWire.bytes();
  bytes.mark();
  outWire.write(isException).bool(false);
  try {
    c.accept(bytesMap);
  }
 catch (  Exception e) {
    bytes.reset();
    outWire.write(isException).bool(true);
    outWire.write(exception).text(toString(e));
    LOG.error("String_Node_Str",e);
    return;
  }
}
Program: 162908
Project: 162908
Buggy source:
/** 
 * only used for debugging
 */
@SuppressWarnings("String_Node_Str") private void showOutWire(){
  System.out.println("String_Node_Str" + outWire.bytes().position() + "String_Node_Str"+ Bytes.toDebugString(outWire.bytes(),0,outWire.bytes().position()));
}

Fixed version (ground truth):
/** 
 * only used for debugging
 */
@SuppressWarnings("String_Node_Str") private void showOutWire(){
  Bytes<?> bytes=outWire.bytes();
  System.out.println("String_Node_Str" + bytes.position() + "String_Node_Str"+ Bytes.toDebugString(bytes,0,bytes.position()));
}
Program: 162910
Project: 162910
Buggy source:
@SuppressWarnings("String_Node_Str") private void writeVoid(@NotNull Consumer<BytesChronicleMap> process){
  final BytesChronicleMap bytesMap=bytesMap(channelId);
  if (bytesMap == null) {
    LOG.error("String_Node_Str" + channelId + "String_Node_Str");
    return;
  }
  bytesMap.output=null;
  try {
    process.accept(bytesMap);
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str",e);
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private void writeVoid(@NotNull Consumer<BytesChronicleMap> process){
  final BytesChronicleMap bytesMap=bytesMap(channelId);
  if (bytesMap == null) {
    LOG.error("String_Node_Str" + channelId + "String_Node_Str");
    return;
  }
  bytesMap.output=null;
  try {
    process.accept(bytesMap);
    outWire.write(IS_EXCEPTION).bool(false);
  }
 catch (  Exception e) {
    outWire.write(IS_EXCEPTION).bool(true);
    LOG.error("String_Node_Str",e);
  }
}
Program: 162911
Project: 162911
Buggy source:
/** 
 * Returns a hash function implementing <a href="https://code.google.com/p/cityhash/source/browse/trunk/src/city.cc?r=10"> CityHash64 algorithm, version 1.1</a> using the two given seed values. This implementation produce equal results for equal input on platforms with different   {@link ByteOrder}, but is slower on big-endian platforms than on little-endian.
 * @see #city_1_1()
 * @see #city_1_1(long)
 */
public static LongHashFunction city_1_1(long seed0,long seed1){
  return CityHash_1_1.asLongHashFunctionWithTwoSeeds(seed0,seed1);
}

Fixed version (ground truth):
/** 
 * Returns a hash function implementing <a href="https://code.google.com/p/cityhash/source/browse/trunk/src/city.cc?r=10"> CityHash64 algorithm, version 1.1</a> using the two given seed values. This implementation produce equal results for equal input on platforms with different   {@link ByteOrder}, but is slower on big-endian platforms than on little-endian.
 * @return an instance of LongHashFunction
 * @see #city_1_1()
 * @see #city_1_1(long)
 */
public static LongHashFunction city_1_1(long seed0,long seed1){
  return CityHash_1_1.asLongHashFunctionWithTwoSeeds(seed0,seed1);
}
Program: 162912
Project: 162912
Buggy source:
/** 
 * Returns the hash code for the given   {@code short} value; this method is consistent with{@code LongHashFunction} methods that accept sequences of bytes, assuming the {@code input}value is interpreted in   {@linkplain ByteOrder#nativeOrder() native} byte order. For example,the result of  {@code hashShort(v)} call is identical to the result of{@code} hashShorts(new short[] v})} call for any  {@code short} value.As a consequence,  {@code hashShort(v)} call produce always the same result as {@code hashChar((char) v)}.
 */
public abstract long hashShort(short input);

Fixed version (ground truth):
/** 
 * Returns the hash code for the given   {@code short} value; this method is consistent with{@code LongHashFunction} methods that accept sequences of bytes, assuming the {@code input}value is interpreted in   {@linkplain ByteOrder#nativeOrder() native} byte order. For example,the result of  {@code hashShort(v)} call is identical to the result of{@code} hashShorts(new short[] v})} call for any  {@code short} value.As a consequence,  {@code hashShort(v)} call produce always the same result as {@code hashChar((char) v)}.
 * @param input the input
 * @return a hashShort
 */
public abstract long hashShort(short input);
Program: 162913
Project: 162913
Buggy source:
/** 
 * Returns the hash code for the given   {@code int} value; this method is consistent with{@code LongHashFunction} methods that accept sequences of bytes, assuming the {@code input}value is interpreted in   {@linkplain ByteOrder#nativeOrder() native} byte order. For example,the result of  {@code hashInt(v)} call is identical to the result of{@code} hashInts(new int[] v})} call for any  {@code int} value.
 */
public abstract long hashInt(int input);

Fixed version (ground truth):
/** 
 * Returns the hash code for the given   {@code int} value; this method is consistent with{@code LongHashFunction} methods that accept sequences of bytes, assuming the {@code input}value is interpreted in   {@linkplain ByteOrder#nativeOrder() native} byte order. For example,the result of  {@code hashInt(v)} call is identical to the result of{@code} hashInts(new int[] v})} call for any  {@code int} value.
 * @param input the input
 * @return a hashLong
 */
public abstract long hashInt(int input);
Program: 162914
Project: 162914
Buggy source:
/** 
 * Returns the hash code for the empty (zero-length) bytes sequence, for example   {@code hashBytes(new byte[0])}.
 */
public abstract long hashVoid();

Fixed version (ground truth):
/** 
 * Returns the hash code for the empty (zero-length) bytes sequence, for example   {@code hashBytes(new byte[0])}.
 * @return a hash
 */
public abstract long hashVoid();
Program: 162915
Project: 162915
Buggy source:
/** 
 * Returns the hash code for the given   {@code long} value; this method is consistent with{@code LongHashFunction} methods that accept sequences of bytes, assuming the {@code input}value is interpreted in   {@linkplain ByteOrder#nativeOrder() native} byte order. For example,the result of  {@code hashLong(v)} call is identical to the result of{@code} hashLongs(new long[] v})} call for any  {@code long} value.
 */
public abstract long hashLong(long input);

Fixed version (ground truth):
/** 
 * Returns the hash code for the given   {@code long} value; this method is consistent with{@code LongHashFunction} methods that accept sequences of bytes, assuming the {@code input}value is interpreted in   {@linkplain ByteOrder#nativeOrder() native} byte order. For example,the result of  {@code hashLong(v)} call is identical to the result of{@code} hashLongs(new long[] v})} call for any  {@code long} value.
 * @param input the input
 * @return a hashLong
 */
public abstract long hashLong(long input);
Program: 162916
Project: 162916
Buggy source:
/** 
 * Returns the hash code for the given   {@code byte} value. This method is consistent with{@code LongHashFunction} methods that accept sequences of bytes. For example, the result of{@code hashByte(v)} call is identical to the result of{@code} hashBytes(new byte[] v})} call for any  {@code byte} value.
 */
public abstract long hashByte(byte input);

Fixed version (ground truth):
/** 
 * Returns the hash code for the given   {@code byte} value. This method is consistent with{@code LongHashFunction} methods that accept sequences of bytes. For example, the result of{@code hashByte(v)} call is identical to the result of{@code} hashBytes(new byte[] v})} call for any  {@code byte} value.
 * @param input the input
 * @return a hashByte
 */
public abstract long hashByte(byte input);
Program: 162917
Project: 162917
Buggy source:
/** 
 * Equivalent of   {@code ChronicleMapStatelessClientBuilder.<K, V>of(serverAddress).create()}.
 * @param serverAddress address of the server map
 * @param < K > key type of the map
 * @param < V > value type of the map
 * @return stateless client of the ChronicleMap of server
 */
public static <K,V>ChronicleMap<K,V> createClientOf(InetSocketAddress serverAddress) throws IOException {
  return ChronicleMapStatelessClientBuilder.<K,V>of(serverAddress).create();
}

Fixed version (ground truth):
/** 
 * Equivalent of   {@code ChronicleMapStatelessClientBuilder.<K,V>of(serverAddress).create()}.
 * @param serverAddress address of the server map
 * @param < K > key type of the map
 * @param < V > value type of the map
 * @return stateless client of the ChronicleMap of server
 * @throws IOException if it not possible to connect to the {@code serverAddress}
 */
public static <K,V>ChronicleMap<K,V> createClientOf(InetSocketAddress serverAddress) throws IOException {
  return ChronicleMapStatelessClientBuilder.<K,V>of(serverAddress).create();
}
Program: 162918
Project: 162918
Buggy source:
/** 
 * Called just after   {@link #onEntry(VanillaContext,int)}. No-op by default.
 */
public void onAfterEntry(){
}

Fixed version (ground truth):
/** 
 * Called just after   {@link #onEntry(net.openhft.lang.io.Bytes,int)}. No-op by default.
 */
public void onAfterEntry(){
}
Program: 162919
Project: 162919
Buggy source:
/** 
 * Called just before   {@link #onEntry(VanillaContext,int)}. No-op by default.
 */
public void onBeforeEntry(){
}

Fixed version (ground truth):
/** 
 * Called just before   {@link #onEntry(net.openhft.lang.io.Bytes,int)}. No-op by default.
 */
public void onBeforeEntry(){
}
Program: 162920
Project: 162920
Buggy source:
/** 
 * Called whenever a put() or remove() has occurred to a replicating map.
 * @param context       the entry you will receive, this does not have to be locked, aslocking is already provided from the caller.
 * @param chronicleId only assigned when clustering
 * @return {@code false} if this entry should be ignored because the identifier of thesource node is not from one of our changes, WARNING even though we check the identifier in the ModificationIterator the entry may have been updated.
 */
public abstract boolean onEntry(final Bytes entry,final int chronicleId);

Fixed version (ground truth):
/** 
 * Called whenever a put() or remove() has occurred to a replicating map.
 * @param entry       the entry you will receive, this does not have to be locked, aslocking is already provided from the caller.
 * @param chronicleId only assigned when clustering
 * @return {@code false} if this entry should be ignored because the identifier of thesource node is not from one of our changes, WARNING even though we check the identifier in the ModificationIterator the entry may have been updated.
 */
public abstract boolean onEntry(final Bytes entry,final int chronicleId);
Program: 162921
Project: 162921
Buggy source:
/** 
 * The map implements this method to restore its contents. This method must read the values in the same sequence and with the same types as were written by   {@code writeExternalEntry()}. This method is typically called when we receive a remote replication event, this event could originate from either a remote   {@code put(K key, Vvalue)} or {@code remove(Object key)}
 * @param copies
 * @param context
 * @param source       bytes to read an entry from
 */
void readExternalEntry(@NotNull ReplicatedChronicleMap.BytesReplicatedContext context,@NotNull Bytes source);

Fixed version (ground truth):
/** 
 * The map implements this method to restore its contents. This method must read the values in the same sequence and with the same types as were written by   {@code writeExternalEntry()}. This method is typically called when we receive a remote replication event, this event could originate from either a remote   {@code put(K key, Vvalue)} or {@code remove(Object key)}
 * @param context       the Bytes Replicated Context
 * @param source       bytes to read an entry from
 */
void readExternalEntry(@NotNull ReplicatedChronicleMap.BytesReplicatedContext context,@NotNull Bytes source);