nus-yam/ex-repair huggingface dataset:
Program: 55245
Project: 55245
Buggy source:
@Override public MonitorCfg install(String path,AssetTree assetTree) throws IOException, URISyntaxException {
  if (subscriptionMonitoringEnabled) {
    LOGGER.info("String_Node_Str" + assetTree);
    assetTree.acquireMap("String_Node_Str",String.class,SubscriptionStat.class);
  }
  if (userMonitoringEnabled) {
    LOGGER.info("String_Node_Str" + assetTree);
    assetTree.acquireMap("String_Node_Str",String.class,UserStat.class);
  }
  return this;
}

Fixed version (ground truth):
@Override public MonitorCfg install(String path,AssetTree assetTree) throws IOException, URISyntaxException {
  ((VanillaAsset)assetTree.acquireAsset("String_Node_Str")).configMapServer();
  if (subscriptionMonitoringEnabled) {
    LOGGER.info("String_Node_Str" + assetTree);
    assetTree.acquireMap("String_Node_Str",String.class,SubscriptionStat.class);
  }
  if (userMonitoringEnabled) {
    LOGGER.info("String_Node_Str" + assetTree);
    assetTree.acquireMap("String_Node_Str",String.class,UserStat.class);
  }
  return this;
}
Program: 55246
Project: 55246
Buggy source:
@Override public boolean put(K key,V value){
  return chronicleMap.update(key,value) != UpdateResult.INSERT;
}

Fixed version (ground truth):
@Override public boolean put(K key,V value){
  try {
    return chronicleMap.update(key,value) != UpdateResult.INSERT;
  }
 catch (  Exception e) {
    System.err.println("String_Node_Str" + key + "String_Node_Str"+ value);
    throw e;
  }
}
Program: 55247
Project: 55247
Buggy source:
public EngineWireNetworkContext(Asset asset){
  this.rootAsset=asset.root();
  try {
{
      String path="String_Node_Str";
      RequestContext requestContext=RequestContext.requestContext(path).type(ConnectionDetails.class).type2(ConnectionStatus.class);
      hostByConnectionStatus=rootAsset.root().acquireAsset(path).acquireView(MapView.class,requestContext);
    }
{
      String path="String_Node_Str";
      RequestContext requestContext=RequestContext.requestContext(path).type(SocketChannel.class).type2(TcpHandler.class);
      socketChannelByHandlers=rootAsset.root().acquireAsset(path).acquireView(MapView.class,requestContext);
      onHandlerChanged0(handler);
    }
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str",e);
    throw Jvm.rethrow(e);
  }
}

Fixed version (ground truth):
public EngineWireNetworkContext(Asset asset){
  this.rootAsset=asset.root();
  ((VanillaAsset)rootAsset.acquireAsset("String_Node_Str")).configMapServer();
  try {
{
      String path="String_Node_Str";
      RequestContext requestContext=RequestContext.requestContext(path).type(ConnectionDetails.class).type2(ConnectionStatus.class);
      hostByConnectionStatus=rootAsset.root().acquireAsset(path).acquireView(MapView.class,requestContext);
    }
{
      String path="String_Node_Str";
      RequestContext requestContext=RequestContext.requestContext(path).type(SocketChannel.class).type2(TcpHandler.class);
      socketChannelByHandlers=rootAsset.root().acquireAsset(path).acquireView(MapView.class,requestContext);
      onHandlerChanged0(handler);
    }
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str",e);
    throw Jvm.rethrow(e);
  }
}
Program: 55248
Project: 55248
Buggy source:
@Override public String toString(){
  return "String_Node_Str" + hostByConnectionStatus.entrySet().toString();
}

Fixed version (ground truth):
@Override public String toString(){
  return "String_Node_Str" + localIdentifier + "String_Node_Str"+ remoteIdentifier;
}
Program: 55249
Project: 55249
Buggy source:
public void onMessageReceived(){
  lastTimeMessageReceived=System.currentTimeMillis();
  long currentSecond=TimeUnit.MILLISECONDS.toSeconds(System.currentTimeMillis());
  if (lastPing != currentSecond) {
    LOG.info("String_Node_Str" + lastTimeMessageReceived);
    lastPing=currentSecond;
  }
}

Fixed version (ground truth):
public void onMessageReceived(){
  lastTimeMessageReceived=System.currentTimeMillis();
  long currentSecond=TimeUnit.MILLISECONDS.toSeconds(lastTimeMessageReceived);
  if (lastPing != currentSecond) {
    LOG.info("String_Node_Str" + lastTimeMessageReceived);
    lastPing=currentSecond;
  }
}
Program: 55250
Project: 55250
Buggy source:
@NotNull private WireOutConsumer excerptConsumer(@NotNull IndexQuery<V> vanillaIndexQuery,@NotNull ExcerptTailer tailer,@NotNull Iterator<IndexedValue<V>> iterator){
  final IndexedValue<V> indexedValue=new IndexedValue<>();
  final ObjectCache objectCache=asset.acquireView(ObjectCache.class);
  return out -> {
    if (iterator.hasNext()) {
      out.getValueOut().typedMarshallable(iterator.next());
      return;
    }
    final String eventName=vanillaIndexQuery.eventName();
    final Predicate<V> filter=vanillaIndexQuery.filter();
    if (isClosed.get()) {
      tailer.close();
      throw new InvalidEventHandlerException("String_Node_Str");
    }
    try (DocumentContext dc=tailer.readingDocument()){
      if (!dc.isPresent())       return;
      final StringBuilder sb=Wires.acquireStringBuilder();
      if (!eventName.contentEquals(sb))       return;
      final V v=dc.wire().read(sb).typedMarshallable(objectCache);
      if (!filter.test(v))       return;
      out.getValueOut().typedMarshallable(indexedValue);
    }
   }
;
}

Fixed version (ground truth):
@NotNull private Supplier<Marshallable> excerptConsumer(@NotNull IndexQuery<V> vanillaIndexQuery,@NotNull ExcerptTailer tailer,@NotNull Iterator<IndexedValue<V>> iterator){
  final IndexedValue<V> indexedValue=new IndexedValue<>();
  final ObjectCache objectCache=asset.acquireView(ObjectCache.class);
  return () -> {
    if (iterator.hasNext()) {
      return iterator.next();
    }
    final String eventName=vanillaIndexQuery.eventName();
    final Predicate<V> filter=vanillaIndexQuery.filter();
    if (isClosed.get()) {
      tailer.close();
      throw Jvm.rethrow(new InvalidEventHandlerException("String_Node_Str"));
    }
    try (DocumentContext dc=tailer.readingDocument()){
      if (!dc.isPresent())       return null;
      final StringBuilder sb=Wires.acquireStringBuilder();
      if (!eventName.contentEquals(sb))       return null;
      final V v=dc.wire().read(sb).typedMarshallable(objectCache);
      if (!filter.test(v))       return null;
      return indexedValue;
    }
   }
;
}
Program: 55251
Project: 55251
Buggy source:
/** 
 * consumers wire on the NIO socket thread
 * @param sub
 * @param vanillaIndexQuery
 * @return
 */
@Nullable public void registerSubscriber(@NotNull ConsumingSubscriber<IndexedValue<V>> sub,@NotNull IndexQuery<V> vanillaIndexQuery){
  final AtomicBoolean isClosed=new AtomicBoolean();
  activeSubscriptions.put(sub,isClosed);
  final long from=vanillaIndexQuery.from() == 0 ? lastIndexRead : vanillaIndexQuery.from();
  Iterator<IndexedValue<V>> iterator=EMPTY_ITERATOR;
  if (from != 0) {
    if (from > lastIndexRead)     throw new UnsupportedOperationException("String_Node_Str" + "String_Node_Str");
    final String eventName=vanillaIndexQuery.eventName();
    final Predicate<V> filter=vanillaIndexQuery.filter();
    if (from == lastIndexRead) {
      multiMap.computeIfAbsent(eventName,k -> new ConcurrentHashMap<>()).values().stream().filter((      IndexedValue<V> i) -> filter.test(i.v())).forEach(sub);
    }
 else     multiMap.computeIfAbsent(eventName,k -> new ConcurrentHashMap<>()).values().stream().filter((    IndexedValue<V> i) -> i.index() <= from && filter.test(i.v())).forEach(sub);
  }
  final ExcerptTailer tailer=chronicleQueue.createTailer();
  try {
    if (from != 0)     tailer.moveToIndex(from);
    WireOutConsumer consumer=excerptConsumer(vanillaIndexQuery,tailer,iterator);
    sub.addWireConsumer(consumer);
  }
 catch (  TimeoutException e) {
    tailer.close();
    sub.onEndOfSubscription();
    LOG.error("String_Node_Str",e);
  }
}

Fixed version (ground truth):
/** 
 * consumers wire on the NIO socket thread
 * @param sub
 * @param vanillaIndexQuery
 * @return
 */
@Nullable public void registerSubscriber(@NotNull ConsumingSubscriber<IndexedValue<V>> sub,@NotNull IndexQuery<V> vanillaIndexQuery){
  final AtomicBoolean isClosed=new AtomicBoolean();
  activeSubscriptions.put(sub,isClosed);
  final long from=vanillaIndexQuery.from() == 0 ? lastIndexRead : vanillaIndexQuery.from();
  Iterator<IndexedValue<V>> iterator=EMPTY_ITERATOR;
  if (from != 0) {
    if (from > lastIndexRead)     throw new UnsupportedOperationException("String_Node_Str" + "String_Node_Str");
    final String eventName=vanillaIndexQuery.eventName();
    final Predicate<V> filter=vanillaIndexQuery.filter();
    if (from == lastIndexRead) {
      iterator=multiMap.computeIfAbsent(eventName,k -> new ConcurrentHashMap<>()).values().stream().filter((      IndexedValue<V> i) -> filter.test(i.v())).iterator();
    }
 else     iterator=multiMap.computeIfAbsent(eventName,k -> new ConcurrentHashMap<>()).values().stream().filter((    IndexedValue<V> i) -> i.index() <= from && filter.test(i.v())).iterator();
  }
  final ExcerptTailer tailer=chronicleQueue.createTailer();
  try {
    if (from != 0)     tailer.moveToIndex(from);
    final Supplier<Marshallable> consumer=excerptConsumer(vanillaIndexQuery,tailer,iterator);
    sub.addValueOutConsumer(consumer);
  }
 catch (  TimeoutException e) {
    tailer.close();
    sub.onEndOfSubscription();
    LOG.error("String_Node_Str",e);
  }
}
Program: 55252
Project: 55252
Buggy source:
@Override public boolean hasValueSubscribers(){
  return !topicSubscribers.isEmpty() || !subscribers.isEmpty() || !downstream.isEmpty()|| asset.hasChildren();
}

Fixed version (ground truth):
@Override public boolean hasValueSubscribers(){
  return !topicSubscribers.isEmpty() || !subscribers.isEmpty() || !downstream.isEmpty()|| asset.hasChildren()|| !subscriptionDelegate.isEmpty();
}
Program: 55253
Project: 55253
Buggy source:
private void notifyEvent1(@NotNull MapEvent<K,V> changeEvent){
  K key=changeEvent.getKey();
  if (!topicSubscribers.isEmpty()) {
    V value=changeEvent.getValue();
    notifyEachSubscriber(topicSubscribers,ts -> ts.onMessage(key,value));
  }
  if (!subscribers.isEmpty()) {
    notifyEachSubscriber(subscribers,s -> s.onMessage(changeEvent));
  }
  if (!keySubscribers.isEmpty()) {
    notifyEachSubscriber(keySubscribers,s -> s.onMessage(key));
  }
  if (!downstream.isEmpty()) {
    notifyEachSubscriber(downstream,d -> d.notifyEvent(changeEvent));
  }
}

Fixed version (ground truth):
private void notifyEvent1(@NotNull MapEvent<K,V> changeEvent){
  K key=changeEvent.getKey();
  if (!topicSubscribers.isEmpty()) {
    V value=changeEvent.getValue();
    notifyEachSubscriber(topicSubscribers,ts -> ts.onMessage(key,value));
  }
  if (!subscribers.isEmpty()) {
    notifyEachSubscriber(subscribers,s -> s.onMessage(changeEvent));
  }
  if (!keySubscribers.isEmpty()) {
    notifyEachSubscriber(keySubscribers,s -> s.onMessage(key));
  }
  if (!downstream.isEmpty()) {
    notifyEachSubscriber(downstream,d -> d.notifyEvent(changeEvent));
  }
  if (!subscriptionDelegate.isEmpty()) {
    Iterator<Subscriber> iterator=subscriptionDelegate.values().iterator();
    while (iterator.hasNext()) {
      Subscriber next=iterator.next();
      try {
        next.onMessage(changeEvent);
      }
 catch (      InvalidSubscriberException e) {
        iterator.remove();
      }
    }
  }
}
Program: 55254
Project: 55254
Buggy source:
@Override public boolean hasSubscribers(){
  return !topicSubscribers.isEmpty() || !subscribers.isEmpty() || !keySubscribers.isEmpty()|| !downstream.isEmpty()|| asset.hasChildren();
}

Fixed version (ground truth):
@Override public boolean hasSubscribers(){
  return !keySubscribers.isEmpty() || hasValueSubscribers();
}
Program: 55255
Project: 55255
Buggy source:
@Override @NotNull public Query<Map.Entry<K,V>> query(){
  return new RemoteQuery<>((subscriber,filter,contextOperations) -> {
    mapView.registerSubscriber((Subscriber)subscriber,(Filter)filter,of(BOOTSTRAP,END_SUBSCRIPTION_AFTER_BOOTSTRAP));
  }
);
}

Fixed version (ground truth):
@Override @NotNull public Query<Map.Entry<K,V>> query(){
  return new RemoteQuery<>((subscriber,filter,contextOperations) -> {
    mapView.registerSubscriber((Subscriber)subscriber,(Filter)filter,contextOperations);
  }
);
}
Program: 55257
Project: 55257
Buggy source:
private void logToBuffer(@NotNull WireIn in,StringBuilder logBuffer){
  if (YamlLogging.showServerReads()) {
    logBuffer.setLength(0);
    try {
      logBuffer.append("String_Node_Str").append(Wires.fromSizePrefixedBlobs(in.bytes()));
    }
 catch (    Exception e) {
      logBuffer.append("String_Node_Str").append(Bytes.toString(in.bytes()));
    }
  }
}

Fixed version (ground truth):
private void logToBuffer(@NotNull WireIn in,StringBuilder logBuffer,long start){
  if (YamlLogging.showServerReads()) {
    logBuffer.setLength(0);
    try {
      logBuffer.append("String_Node_Str").append(Wires.fromSizePrefixedBlobs(in.bytes(),start));
    }
 catch (    Exception e) {
      logBuffer.append("String_Node_Str").append(Bytes.toString(in.bytes(),start,in.bytes().readLimit() - start));
    }
  }
}
Program: 55258
Project: 55258
Buggy source:
@Before public void before() throws IOException {
  serverAssetTree=new VanillaAssetTree().forTesting(x -> t.compareAndSet(null,x));
  if (isRemote) {
    methodName(name.getMethodName());
    connection="String_Node_Str";
    TCPRegistry.createServerSocketChannelFor(connection);
    serverEndpoint=new ServerEndpoint(connection,serverAssetTree);
    assetTree=new VanillaAssetTree().forRemoteAccess(connection,wireType,x -> t.set(x));
  }
 else {
    assetTree=serverAssetTree;
  }
}

Fixed version (ground truth):
@Before public void before() throws IOException {
  serverAssetTree=new VanillaAssetTree().forTesting(x -> {
    t.compareAndSet(null,x);
    x.printStackTrace();
  }
);
  if (isRemote) {
    methodName(name.getMethodName());
    connection="String_Node_Str";
    TCPRegistry.createServerSocketChannelFor(connection);
    serverEndpoint=new ServerEndpoint(connection,serverAssetTree);
    assetTree=new VanillaAssetTree().forRemoteAccess(connection,wireType,x -> t.set(x));
  }
 else {
    assetTree=serverAssetTree;
  }
}
Program: 55259
Project: 55259
Buggy source:
@Ignore @Test public void testThatSendingAlotOfDataToTheServer() throws Exception {
  map=assetTree.acquireMap("String_Node_Str",String.class,String.class);
  char[] largeChar=new char[TcpChannelHub.BUFFER_SIZE - 1024];
  Arrays.fill(largeChar,'X');
  final String large2MbString=new String(largeChar);
  for (int i=0; i < SIZE; i++) {
    map.put("String_Node_Str" + i,large2MbString);
  }
  System.out.println("String_Node_Str");
  Assert.assertEquals(SIZE,map.size());
  System.out.println("String_Node_Str");
}

Fixed version (ground truth):
@Test public void testThatSendingAlotOfDataToTheServer() throws Exception {
  map=assetTree.acquireMap("String_Node_Str",String.class,String.class);
  char[] largeChar=new char[66000];
  Arrays.fill(largeChar,'X');
  final String large2MbString=new String(largeChar);
  for (int i=0; i < SIZE; i++) {
    Assert.assertEquals(i,map.size());
    map.put("String_Node_Str" + i,large2MbString);
  }
  System.out.println("String_Node_Str");
  Assert.assertEquals(SIZE,map.size());
}
Program: 55260
Project: 55260
Buggy source:
@Override public void registerTopicSubscriber(@NotNull RequestContext rc,@NotNull final TopicSubscriber<T,M> subscriber){
  addToStats("String_Node_Str");
  topicSubscribers.add(subscriber);
  AtomicBoolean terminate=new AtomicBoolean();
  final QueueView<T,M> chronicleQueue=asset.acquireView(QueueView.class,rc);
  eventLoop.addHandler(() -> {
    if (terminate.get())     throw new InvalidEventHandlerException();
    final QueueView.Excerpt<T,M> next=chronicleQueue.next();
    if (next == null)     return false;
    try {
      subscriber.onMessage(next.topic(),next.message());
    }
 catch (    Exception e) {
      LOG.error("String_Node_Str",e);
      terminate.set(true);
    }
    return true;
  }
);
}

Fixed version (ground truth):
@Override public void registerTopicSubscriber(@NotNull RequestContext rc,@NotNull final TopicSubscriber<T,M> subscriber){
  addToStats("String_Node_Str");
  topicSubscribers.add(subscriber);
  AtomicBoolean terminate=new AtomicBoolean();
  final ChronicleQueueView<T,M> chronicleQueue=(ChronicleQueueView)asset.acquireView(QueueView.class,rc);
  QueueView.Tailer<T,M> iterator=chronicleQueue.tailer();
  eventLoop.addHandler(() -> {
    if (terminate.get())     throw new InvalidEventHandlerException();
    final QueueView.Excerpt<T,M> next=iterator.read();
    if (next == null)     return false;
    try {
      subscriber.onMessage(next.topic(),next.message());
    }
 catch (    Exception e) {
      LOG.error("String_Node_Str",e);
      terminate.set(true);
    }
    return true;
  }
);
}
Program: 55261
Project: 55261
Buggy source:
@Nullable @Override public M get(){
  final QueueView.Excerpt<T,M> next=chronicleQueue.next();
  if (next == null)   return null;
  return next.message();
}

Fixed version (ground truth):
@Nullable @Override public M get(){
  final QueueView.Excerpt<T,M> next=tailer.read();
  if (next == null)   return null;
  return next.message();
}
Program: 55262
Project: 55262
Buggy source:
@Override public void registerSubscriber(boolean bootstrap,int throttlePeriodMs,Subscriber<M> subscriber) throws AssetNotFoundException {
  AtomicBoolean terminate=new AtomicBoolean();
  subscribers.put(subscriber,terminate);
  final ChronicleQueueView<T,M> chronicleQueue=(ChronicleQueueView<T,M>)asset.acquireView(QueueView.class);
  final QueueView.Iterator<T,M> iterator=chronicleQueue.iterator();
  eventLoop.addHandler(() -> {
    if (terminate.get())     throw new InvalidEventHandlerException();
    final QueueView.Excerpt<T,M> next=iterator.next();
    if (next == null)     return false;
    try {
      subscriber.onMessage(next.message());
    }
 catch (    InvalidSubscriberException e) {
      terminate.set(true);
    }
    return true;
  }
);
}

Fixed version (ground truth):
@Override public void registerSubscriber(boolean bootstrap,int throttlePeriodMs,Subscriber<M> subscriber) throws AssetNotFoundException {
  AtomicBoolean terminate=new AtomicBoolean();
  subscribers.put(subscriber,terminate);
  final ChronicleQueueView<T,M> chronicleQueue=(ChronicleQueueView<T,M>)asset.acquireView(QueueView.class);
  final QueueView.Tailer<T,M> iterator=chronicleQueue.tailer();
  eventLoop.addHandler(() -> {
    if (terminate.get())     throw new InvalidEventHandlerException();
    final QueueView.Excerpt<T,M> next=iterator.read();
    if (next == null)     return false;
    try {
      subscriber.onMessage(next.message());
    }
 catch (    InvalidSubscriberException e) {
      terminate.set(true);
    }
    return true;
  }
);
}
Program: 55263
Project: 55263
Buggy source:
public void registerSubscriber(boolean bootstrap,int throttlePeriodMs,Subscriber<E> subscriber) throws AssetNotFoundException {
  AtomicBoolean terminate=new AtomicBoolean();
  subscribers.put(subscriber,terminate);
  final QueueView.Iterator<?,E> iterator=chronicleQueue.iterator();
  eventLoop.addHandler(() -> {
    if (terminate.get())     throw new InvalidEventHandlerException();
    final QueueView.Excerpt<?,E> next=iterator.next();
    if (next == null)     return false;
    try {
      Object topic=next.topic();
      if (!this.topic.equals(topic.toString()))       return true;
      subscriber.onMessage(next.message());
    }
 catch (    InvalidSubscriberException e) {
      terminate.set(true);
    }
    return true;
  }
);
}

Fixed version (ground truth):
public void registerSubscriber(boolean bootstrap,int throttlePeriodMs,Subscriber<E> subscriber) throws AssetNotFoundException {
  AtomicBoolean terminate=new AtomicBoolean();
  subscribers.put(subscriber,terminate);
  final QueueView.Tailer<?,E> tailer=chronicleQueue.tailer();
  eventLoop.addHandler(() -> {
    if (terminate.get())     throw new InvalidEventHandlerException();
    final QueueView.Excerpt<?,E> next=tailer.read();
    if (next == null)     return false;
    try {
      Object topic=next.topic();
      if (!this.topic.equals(topic.toString()))       return true;
      subscriber.onMessage(next.message());
    }
 catch (    InvalidSubscriberException e) {
      terminate.set(true);
    }
    return true;
  }
);
}
Program: 55264
Project: 55264
Buggy source:
public QueueSimpleSubscription(Function<Object,E> valueReader,Asset parent,String topic){
  this.valueReader=valueReader;
  this.topic=topic;
  chronicleQueue=parent.acquireView(QueueView.class);
  eventLoop=parent.acquireView(EventLoop.class);
}

Fixed version (ground truth):
public QueueSimpleSubscription(Function<Object,E> valueReader,Asset parent,String topic){
  this.valueReader=valueReader;
  this.topic=topic;
  chronicleQueue=(ChronicleQueueView)parent.acquireView(QueueView.class);
  eventLoop=parent.acquireView(EventLoop.class);
}
Program: 55265
Project: 55265
Buggy source:
VanillaSubAsset(@NotNull VanillaAsset parent,String name,Class<E> type,Function<Object,E> valueReader) throws AssetNotFoundException {
  this.parent=parent;
  this.name=name;
  TcpChannelHub tcpChannelHub=parent.findView(TcpChannelHub.class);
  if (tcpChannelHub == null) {
    QueueView queueView=parent.getView(QueueView.class);
    if (queueView == null) {
      reference=new MapReference<>(name,type,parent.acquireView(MapView.class));
      subscription=new MapSimpleSubscription<>(reference,valueReader);
    }
 else {
      reference=new QueueReference<>(type,parent,queueView,name);
      subscription=new QueueSimpleSubscription<>(valueReader,parent,name);
    }
  }
 else {
    reference=new RemoteReference<>(tcpChannelHub,type,fullName());
    subscription=new RemoteSimpleSubscription<>(reference);
  }
}

Fixed version (ground truth):
public VanillaSubAsset(@NotNull VanillaAsset parent,String name,Class<E> type,Function<Object,E> valueReader) throws AssetNotFoundException {
  this.parent=parent;
  this.name=name;
  TcpChannelHub tcpChannelHub=parent.findView(TcpChannelHub.class);
  if (tcpChannelHub == null) {
    QueueView queueView=parent.getView(QueueView.class);
    if (queueView == null) {
      reference=new MapReference<>(name,type,parent.acquireView(MapView.class));
      subscription=new MapSimpleSubscription<>(reference,valueReader);
    }
 else {
      reference=new QueueReference<>(type,parent,queueView,name);
      subscription=new QueueSimpleSubscription<>(valueReader,parent,name);
    }
  }
 else {
    reference=new RemoteReference<>(tcpChannelHub,type,fullName());
    subscription=new RemoteSimpleSubscription<>(reference);
  }
}
Program: 55266
Project: 55266
Buggy source:
@Test public void testStringPublishWithTopicSubscribe() throws InterruptedException {
  Publisher<String> publisher=null;
  String uri="String_Node_Str" + methodName + System.nanoTime();
  String messageType="String_Node_Str";
  try {
    if (!isRemote)     assetTree.acquireQueue(uri,String.class,String.class);
    publisher=assetTree.acquirePublisher(uri + "String_Node_Str" + messageType,String.class);
    BlockingQueue<String> values=new ArrayBlockingQueue<>(1);
    TopicSubscriber<String,String> subscriber=(topic,message) -> {
      values.add(topic + "String_Node_Str" + message);
    }
;
    assetTree.registerTopicSubscriber(uri,String.class,String.class,subscriber);
    publisher.publish("String_Node_Str");
    assertEquals("String_Node_Str",values.poll(20,SECONDS));
  }
  finally {
    deleteFiles(publisher);
  }
}

Fixed version (ground truth):
@Test public void testStringPublishWithTopicSubscribe() throws InterruptedException {
  Publisher<String> publisher=null;
  String uri="String_Node_Str" + methodName + System.nanoTime();
  String messageType="String_Node_Str";
  try {
    if (!isRemote)     assetTree.acquireQueue(uri,String.class,String.class);
    publisher=assetTree.acquirePublisher(uri + "String_Node_Str" + messageType,String.class);
    BlockingQueue<String> values=new ArrayBlockingQueue<>(10);
    TopicSubscriber<String,String> subscriber=(topic,message) -> {
      values.add(topic + "String_Node_Str" + message);
    }
;
    assetTree.registerTopicSubscriber(uri,String.class,String.class,subscriber);
    publisher.publish("String_Node_Str");
    assertEquals("String_Node_Str",values.poll(20,SECONDS));
  }
  finally {
    deleteFiles(publisher);
  }
}
Program: 55267
Project: 55267
Buggy source:
@Test public void testPublishAtIndexCheckIndex() throws InterruptedException {
  QueueView<String,String> queueView=null;
  try {
    String uri="String_Node_Str" + methodName + System.nanoTime();
    String messageType="String_Node_Str";
    queueView=assetTree.acquireQueue(uri,String.class,String.class);
    Thread.sleep(500);
    final long index=queueView.publishAndIndex(messageType,"String_Node_Str");
    final Excerpt<String,String> actual=queueView.next();
    assertEquals(index,actual.index());
  }
  finally {
    deleteFiles(queueView);
  }
}

Fixed version (ground truth):
@Test public void testPublishAtIndexCheckIndex() throws InterruptedException {
  QueueView<String,String> queueView=null;
  try {
    String uri="String_Node_Str" + methodName + System.nanoTime();
    String messageType="String_Node_Str";
    queueView=assetTree.acquireQueue(uri,String.class,String.class);
    Thread.sleep(500);
    final long index=queueView.publishAndIndex(messageType,"String_Node_Str");
    final Excerpt<String,String> actual=queueView.get(index);
    assertEquals(index,actual.index());
  }
  finally {
    deleteFiles(queueView);
  }
}
Program: 55268
Project: 55268
Buggy source:
@Test public void testStringTopicPublisherWithSubscribe() throws InterruptedException {
  String uri="String_Node_Str" + methodName + System.nanoTime();
  String messageType="String_Node_Str";
  TopicPublisher<String,String> publisher=assetTree.acquireTopicPublisher(uri,String.class,String.class);
  BlockingQueue<String> values0=new ArrayBlockingQueue<>(1);
  Subscriber<String> subscriber=e -> {
    if (e != null) {
      values0.add(e);
    }
  }
;
  assetTree.registerSubscriber(uri + "String_Node_Str" + messageType,String.class,subscriber);
  Thread.sleep(1000);
  publisher.publish(messageType,"String_Node_Str");
  assertEquals("String_Node_Str",values0.poll(3,SECONDS));
  deleteFiles(publisher);
}

Fixed version (ground truth):
@Test public void testStringTopicPublisherWithSubscribe() throws InterruptedException {
  String uri="String_Node_Str" + methodName + System.nanoTime();
  String messageType="String_Node_Str";
  TopicPublisher<String,String> publisher=assetTree.acquireTopicPublisher(uri,String.class,String.class);
  BlockingQueue<String> values0=new ArrayBlockingQueue<>(1);
  Subscriber<String> subscriber=e -> {
    if (e != null) {
      values0.add(e);
    }
  }
;
  publisher.publish(messageType,"String_Node_Str");
  Thread.sleep(1000);
  assetTree.registerSubscriber(uri + "String_Node_Str" + messageType,String.class,subscriber);
  assertEquals("String_Node_Str",values0.poll(3,SECONDS));
  deleteFiles(publisher);
}
Program: 55269
Project: 55269
Buggy source:
@Test public void testStringTopicPublisherWithSubscribe() throws InterruptedException {
  String uri="String_Node_Str" + methodName + System.nanoTime();
  String messageType="String_Node_Str";
  TopicPublisher<String,String> publisher=assetTree.acquireTopicPublisher(uri,String.class,String.class);
  BlockingQueue<String> values0=new ArrayBlockingQueue<>(1);
  Subscriber<String> subscriber=e -> {
    if (e != null) {
      values0.add(e);
    }
  }
;
  assetTree.registerSubscriber(uri,String.class,subscriber);
  Thread.sleep(500);
  publisher.publish(messageType,"String_Node_Str");
  assertEquals("String_Node_Str",values0.poll(3,SECONDS));
  deleteFiles(publisher);
}

Fixed version (ground truth):
@Ignore @Test public void testStringTopicPublisherWithSubscribe() throws InterruptedException {
  String uri="String_Node_Str" + methodName + System.nanoTime();
  String messageType="String_Node_Str";
  TopicPublisher<String,String> publisher=assetTree.acquireTopicPublisher(uri,String.class,String.class);
  BlockingQueue<String> values0=new ArrayBlockingQueue<>(1);
  Subscriber<String> subscriber=e -> {
    if (e != null) {
      values0.add(e);
    }
  }
;
  assetTree.registerSubscriber(uri + "String_Node_Str" + messageType,String.class,subscriber);
  Thread.sleep(500);
  publisher.publish(messageType,"String_Node_Str");
  assertEquals("String_Node_Str",values0.poll(3,SECONDS));
  deleteFiles(publisher);
}
Program: 55270
Project: 55270
Buggy source:
@After public void after() throws Throwable {
  final Throwable tr=t.getAndSet(null);
  if (tr != null)   throw tr;
  if (serverEndpoint != null)   serverEndpoint.close();
  if (assetTree != null)   assetTree.close();
  methodName="String_Node_Str";
  TCPRegistry.reset();
}

Fixed version (ground truth):
@After public void after() throws Throwable {
  if (serverEndpoint != null)   serverEndpoint.close();
  if (assetTree != null)   assetTree.close();
  methodName="String_Node_Str";
  TCPRegistry.reset();
  final Throwable tr=t.getAndSet(null);
  if (tr != null)   throw tr;
}
Program: 55271
Project: 55271
Buggy source:
@Override public void registerSubscriber(@NotNull final RequestContext rc,@NotNull final Subscriber subscriber,@NotNull final Filter filter){
  final int that=this.hashCode();
  final QueueView<T,M> chronicleQueue=asset.acquireView(QueueView.class,rc);
  eventLoop.addHandler(() -> {
    final T topic=ObjectUtils.convertTo(topicType,rc.name());
    QueueView.Excerpt<T,M> excerpt=chronicleQueue.get(topic);
    if (excerpt == null)     return false;
    final M e=excerpt.message();
    if (e == null)     return false;
    subscriber.accept(e);
    return true;
  }
);
}

Fixed version (ground truth):
@Override public void registerSubscriber(@NotNull final RequestContext rc,@NotNull final Subscriber subscriber,@NotNull final Filter filter){
  final QueueView<T,M> chronicleQueue=asset.acquireView(QueueView.class,rc);
  final T topic=ObjectUtils.convertTo(topicType,rc.name());
  eventLoop.addHandler(() -> {
    QueueView.Excerpt<T,M> excerpt=chronicleQueue.get(topic);
    if (excerpt == null)     return false;
    final M e=excerpt.message();
    if (e == null)     return false;
    subscriber.accept(e);
    return true;
  }
);
}
Program: 55272
Project: 55272
Buggy source:
@Parameters public static Collection<Object[]> data(){
  return Arrays.asList(new Class[][]{{RemoteMapSupplier.class}});
}

Fixed version (ground truth):
@Parameters public static Collection<Object[]> data(){
  return Arrays.asList(new Class[][]{{LocalMapSupplier.class},{RemoteMapSupplier.class}});
}
Program: 55273
Project: 55273
Buggy source:
@Before public void clearState(){
  TcpChannelHub.closeAllHubs();
  TCPRegistry.reset();
  YamlLogging.setAll(true);
}

Fixed version (ground truth):
@Before public void clearState(){
  if (supplier == LocalMapSupplier.class)   assetTree.forTesting(x -> t.compareAndSet(null,x));
  TcpChannelHub.closeAllHubs();
  TCPRegistry.reset();
  YamlLogging.setAll(true);
}
Program: 55274
Project: 55274
Buggy source:
public Class topicType(){
  if (type == null)   return String.class;
  return type;
}

Fixed version (ground truth):
public RequestContext topicType(Class topicType){
  this.type=topicType;
  return this;
}
Program: 55275
Project: 55275
Buggy source:
@Override public void registerTopicSubscriber(@NotNull RequestContext rc,@NotNull final TopicSubscriber<T,M> subscriber){
  addToStats("String_Node_Str");
  topicSubscribers.add(subscriber);
  AtomicBoolean terminate=new AtomicBoolean();
  final QueueView<T,M> chronicleQueue=asset.acquireView(QueueView.class);
  eventLoop.addHandler(() -> {
    if (terminate.get())     throw new InvalidEventHandlerException();
    final QueueView.Excerpt<T,M> next=chronicleQueue.next();
    if (next == null)     return false;
    try {
      subscriber.onMessage(next.topic(),next.message());
    }
 catch (    InvalidSubscriberException e) {
      terminate.set(true);
    }
    return true;
  }
);
}

Fixed version (ground truth):
@Override public void registerTopicSubscriber(@NotNull RequestContext rc,@NotNull final TopicSubscriber<T,M> subscriber){
  addToStats("String_Node_Str");
  topicSubscribers.add(subscriber);
  AtomicBoolean terminate=new AtomicBoolean();
  final QueueView<T,M> chronicleQueue=asset.acquireView(QueueView.class,rc);
  eventLoop.addHandler(() -> {
    if (terminate.get())     throw new InvalidEventHandlerException();
    final QueueView.Excerpt<T,M> next=chronicleQueue.next();
    if (next == null)     return false;
    try {
      subscriber.onMessage(next.topic(),next.message());
    }
 catch (    Exception e) {
      LOG.error("String_Node_Str",e);
      terminate.set(true);
    }
    return true;
  }
);
}
Program: 55276
Project: 55276
Buggy source:
@Override protected void onRead(@NotNull WireIn inWire,@NotNull WireOut outWire){
  if (isClosed.get()) {
    inWire.clear();
    return;
  }
  if (YamlLogging.showServerReads() && inWire.hasMore()) {
    String s=Wires.fromSizePrefixedBlobs(inWire.bytes());
    LOG.info("String_Node_Str" + s);
  }
  onMessageReceived();
  while (inWire.hasMore()) {
    try (final DocumentContext dc=inWire.readingDocument()){
      if (!dc.isPresent())       continue;
      if (dc.isMetaData()) {
        if (!readMeta(inWire))         continue;
        handler().remoteIdentifier(remoteIdentifier);
        handler().localIdentifier(localIdentifier);
        handler().onInitialize(outWire);
        continue;
      }
      if (handler() == null)       throw new IllegalStateException("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
      if (dc.isData()) {
        handler().onRead(inWire,outWire);
      }
    }
 catch (    Exception e) {
      LOG.error("String_Node_Str",e);
    }
  }
}

Fixed version (ground truth):
@Override protected void onRead(@NotNull WireIn inWire,@NotNull WireOut outWire){
  if (isClosed.get()) {
    inWire.clear();
    return;
  }
  if (YamlLogging.showServerReads() && inWire.hasMore()) {
    String s=Wires.fromSizePrefixedBlobs(inWire.bytes());
    LOG.info("String_Node_Str" + s);
  }
  onMessageReceived();
  while (!inWire.bytes().isEmpty()) {
    try (final DocumentContext dc=inWire.readingDocument()){
      if (!dc.isPresent())       continue;
      if (dc.isMetaData()) {
        if (!readMeta(inWire))         continue;
        handler().remoteIdentifier(remoteIdentifier);
        handler().localIdentifier(localIdentifier);
        handler().onInitialize(outWire);
        continue;
      }
      if (handler() == null)       throw new IllegalStateException("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
      if (dc.isData()) {
        handler().onRead(inWire,outWire);
      }
    }
 catch (    Exception e) {
      LOG.error("String_Node_Str",e);
    }
  }
}
Program: 55278
Project: 55278
Buggy source:
public static WriteMarshallable newSync(){
  try {
    Class<?> aClass=Class.forName("String_Node_Str");
    return (WriteMarshallable)aClass.newInstance();
  }
 catch (  Exception e) {
    IllegalStateException licence=new IllegalStateException("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
    LOG.error("String_Node_Str",e);
    throw licence;
  }
}

Fixed version (ground truth):
public static WriteMarshallable newSync(Class topicType,Class elementType){
  try {
    Class<?> aClass=Class.forName("String_Node_Str");
    Constructor<?> declaredConstructor=aClass.getConstructor(Class.class,Class.class);
    return (WriteMarshallable)declaredConstructor.newInstance(topicType,elementType);
  }
 catch (  Exception e) {
    IllegalStateException licence=new IllegalStateException("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
    LOG.error("String_Node_Str",e);
    throw licence;
  }
}
Program: 55279
Project: 55279
Buggy source:
public static WriteMarshallable newSource(long lastIndexReceived){
  try {
    Class<?> aClass=Class.forName("String_Node_Str");
    Constructor<?> declaredConstructor=aClass.getDeclaredConstructor(long.class);
    return (WriteMarshallable)declaredConstructor.newInstance(lastIndexReceived);
  }
 catch (  Exception e) {
    IllegalStateException licence=new IllegalStateException("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
    LOG.error("String_Node_Str",e);
    throw licence;
  }
}

Fixed version (ground truth):
public static WriteMarshallable newSource(long lastIndexReceived,Class topicType,Class elementType){
  try {
    Class<?> aClass=Class.forName("String_Node_Str");
    Constructor<?> declaredConstructor=aClass.getDeclaredConstructor(long.class,Class.class,Class.class);
    return (WriteMarshallable)declaredConstructor.newInstance(lastIndexReceived,topicType,elementType);
  }
 catch (  Exception e) {
    IllegalStateException licence=new IllegalStateException("String_Node_Str" + "String_Node_Str");
    LOG.error("String_Node_Str",e);
    throw licence;
  }
}
Program: 55280
Project: 55280
Buggy source:
public ChronicleQueueView(@Nullable ChronicleQueue queue,@NotNull RequestContext context,@NotNull Asset asset){
  String s=asset.fullName();
  if (s.startsWith("String_Node_Str"))   s=s.substring(1);
  defaultPath=s;
  final HostIdentifier hostIdentifier=asset.findOrCreateView(HostIdentifier.class);
  final Byte hostId=hostIdentifier == null ? null : hostIdentifier.hostId();
  chronicleQueue=queue != null ? queue : newInstance(context.name(),context.basePath(),hostId);
  messageTypeClass=context.messageType();
  elementTypeClass=context.elementType();
  LOG.info("String_Node_Str" + context.name() + "String_Node_Str"+ chronicleQueue);
  threadLocal=ThreadLocal.withInitial(() -> new ThreadLocalData(chronicleQueue));
  if (hostId != null)   replication(context,asset);
}

Fixed version (ground truth):
public ChronicleQueueView(@Nullable ChronicleQueue queue,@NotNull RequestContext context,@NotNull Asset asset){
  String s=asset.fullName();
  if (s.startsWith("String_Node_Str"))   s=s.substring(1);
  defaultPath=s;
  final HostIdentifier hostIdentifier=asset.findOrCreateView(HostIdentifier.class);
  final Byte hostId=hostIdentifier == null ? null : hostIdentifier.hostId();
  chronicleQueue=queue != null ? queue : newInstance(context.name(),context.basePath(),hostId);
  messageTypeClass=context.messageType();
  elementTypeClass=context.elementType();
  threadLocal=ThreadLocal.withInitial(() -> new ThreadLocalData(chronicleQueue));
  if (hostId != null)   replication(context,asset);
}
Program: 55281
Project: 55281
Buggy source:
/** 
 * peeks the csp or if it has a cid converts the cid into a Csp and returns that
 * @return {@code true} if if a csp was read rather than a cid
 */
boolean readMeta(@NotNull final WireIn wireIn){
}

Fixed version (ground truth):
/** 
 * peeks the csp or if it has a cid converts the cid into a Csp and returns that
 * @return {@code true} if if a csp was read rather than a cid
 */
boolean readMeta(@NotNull final WireIn wireIn,String yaml){
}
Program: 55282
Project: 55282
Buggy source:
@Override public void onInitialize(@NotNull WireOut outWire){
  if (isClosed())   return;
  Asset rootAsset=nc().rootAsset();
  final RequestContext requestContext=RequestContext.requestContext(csp());
  final Asset asset=rootAsset.acquireAsset(requestContext.fullName());
  replication=asset.acquireView(Replication.class,RequestContext.requestContext(asset.fullName()).keyType(keyType).valueType(valueType));
  if (nc().isAcceptor()) {
    final long lastUpdateTime=replication.lastModificationTime((byte)remoteIdentifier());
    WriteMarshallable writeMarshallable=newMapReplicationHandler(lastUpdateTime,keyType,valueType,csp(),cid());
    publish(writeMarshallable);
  }
  final HostIdentifier hostIdentifier=rootAsset.findOrCreateView(HostIdentifier.class);
  if (hostIdentifier != null)   localIdentifier=hostIdentifier.hostId();
  EventLoop eventLoop=rootAsset.findOrCreateView(EventLoop.class);
  eventLoop.start();
  final ModificationIterator mi=replication.acquireModificationIterator((byte)remoteIdentifier());
  if (mi != null)   mi.dirtyEntries(timestamp);
  if (mi == null)   return;
  mi.setModificationNotifier(eventLoop::unpause);
  if (!eventLoop.isAlive() && !eventLoop.isClosed())   throw new IllegalStateException("String_Node_Str");
  eventLoop.addHandler(true,new ReplicationEventHandler(mi,(byte)remoteIdentifier()));
}

Fixed version (ground truth):
@Override public void onInitialize(@NotNull WireOut outWire){
  if (isClosed())   return;
  Asset rootAsset=nc().rootAsset();
  final RequestContext requestContext=RequestContext.requestContext(csp());
  final Asset asset=rootAsset.acquireAsset(requestContext.fullName());
  replication=asset.acquireView(Replication.class,RequestContext.requestContext(asset.fullName()).keyType(keyType).valueType(valueType));
  final long lastUpdateTime=replication.lastModificationTime((byte)remoteIdentifier());
  WriteMarshallable writeMarshallable=newMapReplicationHandler(lastUpdateTime,keyType,valueType,csp(),cid());
  publish(writeMarshallable);
  final HostIdentifier hostIdentifier=rootAsset.findOrCreateView(HostIdentifier.class);
  if (hostIdentifier != null)   localIdentifier=hostIdentifier.hostId();
  EventLoop eventLoop=rootAsset.findOrCreateView(EventLoop.class);
  eventLoop.start();
  final ModificationIterator mi=replication.acquireModificationIterator((byte)remoteIdentifier());
  if (mi != null)   mi.dirtyEntries(timestamp);
  if (mi == null)   return;
  mi.setModificationNotifier(eventLoop::unpause);
  if (!eventLoop.isAlive() && !eventLoop.isClosed())   throw new IllegalStateException("String_Node_Str");
  eventLoop.addHandler(true,new ReplicationEventHandler(mi,(byte)remoteIdentifier()));
}
Program: 55283
Project: 55283
Buggy source:
@Override protected void process(@NotNull WireIn inWire,@NotNull WireOut outWire){
  String s=Wires.fromSizePrefixedBlobs(inWire.bytes());
  if (YamlLogging.showServerReads() && inWire.hasMore())   LOG.info("String_Node_Str" + s);
  onMessageReceived();
  boolean processedData=false;
  while (inWire.hasMore()) {
    try (final DocumentContext dc=inWire.readingDocument()){
      if (!dc.isPresent())       continue;
      if (dc.isMetaData()) {
        if (!readMeta(inWire))         continue;
        handler().remoteIdentifier(remoteIdentifier);
        handler().localIdentifier(localIdentifier);
        handler().onInitialize(outWire);
        continue;
      }
      if (dc.isData() && handler() != null) {
        handler().processData(inWire,outWire);
        processedData=true;
      }
 else {
        if (handler() == null)         throw new IllegalStateException("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ s);
 else         throw new IllegalStateException("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ s);
      }
    }
 catch (    Exception e) {
      LOG.error("String_Node_Str",e);
    }
  }
  final SubHandler handler=handler();
  if (!processedData && handler != null)   handler.processData(Wires.EMPTY,outWire);
}

Fixed version (ground truth):
@Override protected void process(@NotNull WireIn inWire,@NotNull WireOut outWire){
  String s=Wires.fromSizePrefixedBlobs(inWire.bytes());
  if (YamlLogging.showServerReads() && inWire.hasMore())   LOG.info("String_Node_Str" + s);
  onMessageReceived();
  boolean processedData=false;
  while (inWire.hasMore()) {
    String yaml=Wires.fromSizePrefixedBlobs(inWire.bytes());
    try (final DocumentContext dc=inWire.readingDocument()){
      if (!dc.isPresent())       continue;
      if (dc.isMetaData()) {
        if (!readMeta(inWire,yaml))         continue;
        handler().remoteIdentifier(remoteIdentifier);
        handler().localIdentifier(localIdentifier);
        handler().onInitialize(outWire);
        continue;
      }
      if (handler() == null)       throw new IllegalStateException("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ s);
      if (dc.isData()) {
        handler().processData(inWire,outWire);
        processedData=true;
      }
    }
 catch (    Exception e) {
      LOG.error("String_Node_Str",e);
    }
  }
  final SubHandler handler=handler();
  if (!processedData && handler != null)   handler.processData(Wires.EMPTY,outWire);
}
Program: 55285
Project: 55285
Buggy source:
private WriteMarshallable newSync(){
  try {
    Class<?> aClass=Class.forName("String_Node_Str");
    return (WriteMarshallable)aClass.newInstance();
  }
 catch (  Exception e) {
    IllegalStateException licence=new IllegalStateException("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
    LOG.error("String_Node_Str",e);
    throw licence;
  }
}

Fixed version (ground truth):
public static WriteMarshallable newSync(){
  try {
    Class<?> aClass=Class.forName("String_Node_Str");
    return (WriteMarshallable)aClass.newInstance();
  }
 catch (  Exception e) {
    IllegalStateException licence=new IllegalStateException("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
    LOG.error("String_Node_Str",e);
    throw licence;
  }
}
Program: 55286
Project: 55286
Buggy source:
private WriteMarshallable newSource(long lastIndexReceived){
  try {
    Class<?> aClass=Class.forName("String_Node_Str");
    Constructor<?> declaredConstructor=aClass.getDeclaredConstructor(long.class);
    return (WriteMarshallable)declaredConstructor.newInstance(lastIndexReceived);
  }
 catch (  Exception e) {
    IllegalStateException licence=new IllegalStateException("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
    LOG.error("String_Node_Str",e);
    throw licence;
  }
}

Fixed version (ground truth):
public static WriteMarshallable newSource(long lastIndexReceived){
  try {
    Class<?> aClass=Class.forName("String_Node_Str");
    Constructor<?> declaredConstructor=aClass.getDeclaredConstructor(long.class);
    return (WriteMarshallable)declaredConstructor.newInstance(lastIndexReceived);
  }
 catch (  Exception e) {
    IllegalStateException licence=new IllegalStateException("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
    LOG.error("String_Node_Str",e);
    throw licence;
  }
}
Program: 55287
Project: 55287
Buggy source:
private void onPut0(@NotNull K key,V newValue,@Nullable V replacedValue,boolean replicationEvent,boolean added,boolean hasValueChanged){
  if (added) {
    subscriptions.notifyEvent(InsertedEvent.of(assetFullName,key,newValue,replicationEvent));
  }
 else {
    subscriptions.notifyEvent(UpdatedEvent.of(assetFullName,key,replacedValue,newValue,replicationEvent,hasValueChanged));
  }
}

Fixed version (ground truth):
private void onPut0(@NotNull K key,V newValue,@Nullable V replacedValue,boolean replicationEvent,boolean added,boolean hasValueChanged){
  if (added) {
    subscriptions.notifyEvent(InsertedEvent.of(assetFullName,key,newValue,replicationEvent));
  }
 else {
    if (hasValueChanged)     subscriptions.notifyEvent(UpdatedEvent.of(assetFullName,key,replacedValue,newValue,replicationEvent,hasValueChanged));
  }
}