nus-yam/ex-repair huggingface dataset:
Program: 47482
Project: 47482
Buggy source:
@Test public void testQuery(){
  final int entityCount=10;
  final int queryCount=3;
  insertDummyEntities(entityCount);
  sleep(2);
  List<DummyEntity> list=null;
  for (int i=0; i < queryCount; i++) {
    list=executeQuery(sf);
    assertEquals(entityCount,list.size());
    sleep(2);
  }
  assertNotNull(list);
  Session session=sf.openSession();
  Transaction tx=session.beginTransaction();
  try {
    for (    DummyEntity dummy : list) {
      session.delete(dummy);
    }
    tx.commit();
  }
 catch (  Exception e) {
    tx.rollback();
    e.printStackTrace();
  }
 finally {
    session.close();
  }
  Statistics stats=sf.getStatistics();
  assertEquals(1,stats.getQueryCachePutCount());
  assertEquals(1,stats.getQueryCacheMissCount());
  assertEquals(queryCount - 1,stats.getQueryCacheHitCount());
  assertEquals(1,stats.getQueryExecutionCount());
  assertEquals(entityCount,stats.getEntityInsertCount());
  assertEquals(entityCount,stats.getEntityLoadCount());
  assertEquals(entityCount,stats.getEntityDeleteCount());
  assertEquals(entityCount * (queryCount - 1) * 2,stats.getSecondLevelCacheHitCount());
  assertEquals(entityCount,stats.getSecondLevelCacheMissCount());
  stats.logSummary();
}

Fixed version (ground truth):
@Test public void testQuery(){
  final int entityCount=10;
  final int queryCount=3;
  insertDummyEntities(entityCount);
  sleep(2);
  List<DummyEntity> list=null;
  for (int i=0; i < queryCount; i++) {
    list=executeQuery(sf);
    assertEquals(entityCount,list.size());
    sleepAtLeastSeconds(1);
  }
  assertNotNull(list);
  Session session=sf.openSession();
  Transaction tx=session.beginTransaction();
  try {
    for (    DummyEntity dummy : list) {
      session.delete(dummy);
    }
    tx.commit();
  }
 catch (  Exception e) {
    tx.rollback();
    e.printStackTrace();
  }
 finally {
    session.close();
  }
  Statistics stats=sf.getStatistics();
  assertEquals(1,stats.getQueryCachePutCount());
  assertEquals(1,stats.getQueryCacheMissCount());
  assertEquals(queryCount - 1,stats.getQueryCacheHitCount());
  assertEquals(1,stats.getQueryExecutionCount());
  assertEquals(entityCount,stats.getEntityInsertCount());
  assertEquals(entityCount,stats.getEntityLoadCount());
  assertEquals(entityCount,stats.getEntityDeleteCount());
  assertEquals(entityCount * (queryCount - 1) * 2,stats.getSecondLevelCacheHitCount());
  assertEquals(entityCount,stats.getSecondLevelCacheMissCount());
  stats.logSummary();
}
Program: 47483
Project: 47483
Buggy source:
@Test public void testQuery(){
  final int entityCount=10;
  final int queryCount=3;
  insertDummyEntities(entityCount);
  sleep(2);
  List<DummyEntity> list=null;
  for (int i=0; i < queryCount; i++) {
    list=executeQuery(sf);
    assertEquals(entityCount,list.size());
    sleep(2);
  }
  assertNotNull(list);
  Session session=sf.openSession();
  Transaction tx=session.beginTransaction();
  try {
    for (    DummyEntity dummy : list) {
      session.delete(dummy);
    }
    tx.commit();
  }
 catch (  Exception e) {
    tx.rollback();
    e.printStackTrace();
  }
 finally {
    session.close();
  }
  Statistics stats=sf.getStatistics();
  assertEquals(1,stats.getQueryCachePutCount());
  assertEquals(1,stats.getQueryCacheMissCount());
  assertEquals(queryCount - 1,stats.getQueryCacheHitCount());
  assertEquals(1,stats.getQueryExecutionCount());
  assertEquals(entityCount,stats.getEntityInsertCount());
  assertEquals(entityCount,stats.getEntityLoadCount());
  assertEquals(entityCount,stats.getEntityDeleteCount());
  assertEquals(entityCount * (queryCount - 1) * 2,stats.getSecondLevelCacheHitCount());
  assertEquals(entityCount,stats.getSecondLevelCacheMissCount());
  stats.logSummary();
}

Fixed version (ground truth):
@Test public void testQuery(){
  final int entityCount=10;
  final int queryCount=3;
  insertDummyEntities(entityCount);
  sleep(2);
  List<DummyEntity> list=null;
  for (int i=0; i < queryCount; i++) {
    list=executeQuery(sf);
    assertEquals(entityCount,list.size());
    sleepAtLeastSeconds(1);
  }
  assertNotNull(list);
  Session session=sf.openSession();
  Transaction tx=session.beginTransaction();
  try {
    for (    DummyEntity dummy : list) {
      session.delete(dummy);
    }
    tx.commit();
  }
 catch (  Exception e) {
    tx.rollback();
    e.printStackTrace();
  }
 finally {
    session.close();
  }
  Statistics stats=sf.getStatistics();
  assertEquals(1,stats.getQueryCachePutCount());
  assertEquals(1,stats.getQueryCacheMissCount());
  assertEquals(queryCount - 1,stats.getQueryCacheHitCount());
  assertEquals(1,stats.getQueryExecutionCount());
  assertEquals(entityCount,stats.getEntityInsertCount());
  assertEquals(entityCount,stats.getEntityLoadCount());
  assertEquals(entityCount,stats.getEntityDeleteCount());
  assertEquals(entityCount * (queryCount - 1) * 2,stats.getSecondLevelCacheHitCount());
  assertEquals(entityCount,stats.getSecondLevelCacheMissCount());
  stats.logSummary();
}
Program: 47484
Project: 47484
Buggy source:
@Test public void testQuery(){
  final int entityCount=10;
  final int queryCount=3;
  insertDummyEntities(entityCount);
  sleep(2);
  List<DummyEntity> list=null;
  for (int i=0; i < queryCount; i++) {
    list=executeQuery(sf);
    assertEquals(entityCount,list.size());
    sleep(2);
  }
  assertNotNull(list);
  Session session=sf.openSession();
  Transaction tx=session.beginTransaction();
  try {
    for (    DummyEntity dummy : list) {
      session.delete(dummy);
    }
    tx.commit();
  }
 catch (  Exception e) {
    tx.rollback();
    e.printStackTrace();
  }
 finally {
    session.close();
  }
  Statistics stats=sf.getStatistics();
  assertEquals(1,stats.getQueryCachePutCount());
  assertEquals(1,stats.getQueryCacheMissCount());
  assertEquals(queryCount - 1,stats.getQueryCacheHitCount());
  assertEquals(1,stats.getQueryExecutionCount());
  assertEquals(entityCount,stats.getEntityInsertCount());
  assertEquals(entityCount,stats.getEntityLoadCount());
  assertEquals(entityCount,stats.getEntityDeleteCount());
  assertEquals(entityCount * (queryCount - 1) * 2,stats.getSecondLevelCacheHitCount());
  assertEquals(entityCount,stats.getSecondLevelCacheMissCount());
  stats.logSummary();
}

Fixed version (ground truth):
@Test public void testQuery(){
  final int entityCount=10;
  final int queryCount=3;
  insertDummyEntities(entityCount);
  sleep(2);
  List<DummyEntity> list=null;
  for (int i=0; i < queryCount; i++) {
    list=executeQuery(sf);
    assertEquals(entityCount,list.size());
    sleepAtLeastSeconds(1);
  }
  assertNotNull(list);
  Session session=sf.openSession();
  Transaction tx=session.beginTransaction();
  try {
    for (    DummyEntity dummy : list) {
      session.delete(dummy);
    }
    tx.commit();
  }
 catch (  Exception e) {
    tx.rollback();
    e.printStackTrace();
  }
 finally {
    session.close();
  }
  Statistics stats=sf.getStatistics();
  assertEquals(1,stats.getQueryCachePutCount());
  assertEquals(1,stats.getQueryCacheMissCount());
  assertEquals(queryCount - 1,stats.getQueryCacheHitCount());
  assertEquals(1,stats.getQueryExecutionCount());
  assertEquals(entityCount,stats.getEntityInsertCount());
  assertEquals(entityCount,stats.getEntityLoadCount());
  assertEquals(entityCount,stats.getEntityDeleteCount());
  assertEquals(entityCount * (queryCount - 1) * 2,stats.getSecondLevelCacheHitCount());
  assertEquals(entityCount,stats.getSecondLevelCacheMissCount());
  stats.logSummary();
}
Program: 47485
Project: 47485
Buggy source:
@Test public void testQuery(){
  final int entityCount=10;
  final int queryCount=3;
  insertDummyEntities(entityCount);
  sleep(2);
  List<DummyEntity> list=null;
  for (int i=0; i < queryCount; i++) {
    list=executeQuery(sf);
    assertEquals(entityCount,list.size());
    sleep(2);
  }
  assertNotNull(list);
  Session session=sf.openSession();
  Transaction tx=session.beginTransaction();
  try {
    for (    DummyEntity dummy : list) {
      session.delete(dummy);
    }
    tx.commit();
  }
 catch (  Exception e) {
    tx.rollback();
    e.printStackTrace();
  }
 finally {
    session.close();
  }
  Statistics stats=sf.getStatistics();
  assertEquals(1,stats.getQueryCachePutCount());
  assertEquals(1,stats.getQueryCacheMissCount());
  assertEquals(queryCount - 1,stats.getQueryCacheHitCount());
  assertEquals(1,stats.getQueryExecutionCount());
  assertEquals(entityCount,stats.getEntityInsertCount());
  assertEquals(entityCount,stats.getEntityLoadCount());
  assertEquals(entityCount,stats.getEntityDeleteCount());
  assertEquals(entityCount * (queryCount - 1) * 2,stats.getSecondLevelCacheHitCount());
  assertEquals(entityCount,stats.getSecondLevelCacheMissCount());
  stats.logSummary();
}

Fixed version (ground truth):
@Test public void testQuery(){
  final int entityCount=10;
  final int queryCount=3;
  insertDummyEntities(entityCount);
  sleep(2);
  List<DummyEntity> list=null;
  for (int i=0; i < queryCount; i++) {
    list=executeQuery(sf);
    assertEquals(entityCount,list.size());
    sleepAtLeastSeconds(1);
  }
  assertNotNull(list);
  Session session=sf.openSession();
  Transaction tx=session.beginTransaction();
  try {
    for (    DummyEntity dummy : list) {
      session.delete(dummy);
    }
    tx.commit();
  }
 catch (  Exception e) {
    tx.rollback();
    e.printStackTrace();
  }
 finally {
    session.close();
  }
  Statistics stats=sf.getStatistics();
  assertEquals(1,stats.getQueryCachePutCount());
  assertEquals(1,stats.getQueryCacheMissCount());
  assertEquals(queryCount - 1,stats.getQueryCacheHitCount());
  assertEquals(1,stats.getQueryExecutionCount());
  assertEquals(entityCount,stats.getEntityInsertCount());
  assertEquals(entityCount,stats.getEntityLoadCount());
  assertEquals(entityCount,stats.getEntityDeleteCount());
  assertEquals(entityCount * (queryCount - 1) * 2,stats.getSecondLevelCacheHitCount());
  assertEquals(entityCount,stats.getSecondLevelCacheMissCount());
  stats.logSummary();
}
Program: 47486
Project: 47486
Buggy source:
@Test public void testQuery(){
  final int entityCount=10;
  final int queryCount=3;
  insertDummyEntities(entityCount);
  sleep(2);
  List<DummyEntity> list=null;
  for (int i=0; i < queryCount; i++) {
    list=executeQuery(sf);
    assertEquals(entityCount,list.size());
    sleep(2);
  }
  assertNotNull(list);
  Session session=sf.openSession();
  Transaction tx=session.beginTransaction();
  try {
    for (    DummyEntity dummy : list) {
      session.delete(dummy);
    }
    tx.commit();
  }
 catch (  Exception e) {
    tx.rollback();
    e.printStackTrace();
  }
 finally {
    session.close();
  }
  Statistics stats=sf.getStatistics();
  assertEquals(1,stats.getQueryCachePutCount());
  assertEquals(1,stats.getQueryCacheMissCount());
  assertEquals(queryCount - 1,stats.getQueryCacheHitCount());
  assertEquals(1,stats.getQueryExecutionCount());
  assertEquals(entityCount,stats.getEntityInsertCount());
  assertEquals(entityCount,stats.getEntityLoadCount());
  assertEquals(entityCount,stats.getEntityDeleteCount());
  assertEquals(entityCount * (queryCount - 1) * 2,stats.getSecondLevelCacheHitCount());
  assertEquals(entityCount,stats.getSecondLevelCacheMissCount());
  stats.logSummary();
}

Fixed version (ground truth):
@Test public void testQuery(){
  final int entityCount=10;
  final int queryCount=3;
  insertDummyEntities(entityCount);
  sleep(2);
  List<DummyEntity> list=null;
  for (int i=0; i < queryCount; i++) {
    list=executeQuery(sf);
    assertEquals(entityCount,list.size());
    sleepAtLeastSeconds(1);
  }
  assertNotNull(list);
  Session session=sf.openSession();
  Transaction tx=session.beginTransaction();
  try {
    for (    DummyEntity dummy : list) {
      session.delete(dummy);
    }
    tx.commit();
  }
 catch (  Exception e) {
    tx.rollback();
    e.printStackTrace();
  }
 finally {
    session.close();
  }
  Statistics stats=sf.getStatistics();
  assertEquals(1,stats.getQueryCachePutCount());
  assertEquals(1,stats.getQueryCacheMissCount());
  assertEquals(queryCount - 1,stats.getQueryCacheHitCount());
  assertEquals(1,stats.getQueryExecutionCount());
  assertEquals(entityCount,stats.getEntityInsertCount());
  assertEquals(entityCount,stats.getEntityLoadCount());
  assertEquals(entityCount,stats.getEntityDeleteCount());
  assertEquals(entityCount * (queryCount - 1) * 2,stats.getSecondLevelCacheHitCount());
  assertEquals(entityCount,stats.getSecondLevelCacheMissCount());
  stats.logSummary();
}
Program: 47487
Project: 47487
Buggy source:
@Test public void testQuery(){
  final int entityCount=10;
  final int queryCount=3;
  insertDummyEntities(entityCount);
  sleep(2);
  List<DummyEntity> list=null;
  for (int i=0; i < queryCount; i++) {
    list=executeQuery(sf);
    assertEquals(entityCount,list.size());
    sleep(2);
  }
  assertNotNull(list);
  Session session=sf.openSession();
  Transaction tx=session.beginTransaction();
  try {
    for (    DummyEntity dummy : list) {
      session.delete(dummy);
    }
    tx.commit();
  }
 catch (  Exception e) {
    tx.rollback();
    e.printStackTrace();
  }
 finally {
    session.close();
  }
  Statistics stats=sf.getStatistics();
  assertEquals(1,stats.getQueryCachePutCount());
  assertEquals(1,stats.getQueryCacheMissCount());
  assertEquals(queryCount - 1,stats.getQueryCacheHitCount());
  assertEquals(1,stats.getQueryExecutionCount());
  assertEquals(entityCount,stats.getEntityInsertCount());
  assertEquals(entityCount,stats.getEntityLoadCount());
  assertEquals(entityCount,stats.getEntityDeleteCount());
  assertEquals(entityCount * (queryCount - 1) * 2,stats.getSecondLevelCacheHitCount());
  assertEquals(entityCount,stats.getSecondLevelCacheMissCount());
  stats.logSummary();
}

Fixed version (ground truth):
@Test public void testQuery(){
  final int entityCount=10;
  final int queryCount=3;
  insertDummyEntities(entityCount);
  sleep(2);
  List<DummyEntity> list=null;
  for (int i=0; i < queryCount; i++) {
    list=executeQuery(sf);
    assertEquals(entityCount,list.size());
    sleepAtLeastSeconds(1);
  }
  assertNotNull(list);
  Session session=sf.openSession();
  Transaction tx=session.beginTransaction();
  try {
    for (    DummyEntity dummy : list) {
      session.delete(dummy);
    }
    tx.commit();
  }
 catch (  Exception e) {
    tx.rollback();
    e.printStackTrace();
  }
 finally {
    session.close();
  }
  Statistics stats=sf.getStatistics();
  assertEquals(1,stats.getQueryCachePutCount());
  assertEquals(1,stats.getQueryCacheMissCount());
  assertEquals(queryCount - 1,stats.getQueryCacheHitCount());
  assertEquals(1,stats.getQueryExecutionCount());
  assertEquals(entityCount,stats.getEntityInsertCount());
  assertEquals(entityCount,stats.getEntityLoadCount());
  assertEquals(entityCount,stats.getEntityDeleteCount());
  assertEquals(entityCount * (queryCount - 1) * 2,stats.getSecondLevelCacheHitCount());
  assertEquals(entityCount,stats.getSecondLevelCacheMissCount());
  stats.logSummary();
}
Program: 47488
Project: 47488
Buggy source:
@Override public void close(EventRegistration eventRegistration){
  Registration registration=(Registration)eventRegistration;
  if (!(registration.getListener() instanceof Closeable)) {
    return;
  }
  try {
    ((Closeable)eventRegistration).close();
  }
 catch (  IOException e) {
    EmptyStatement.ignore(e);
  }
}

Fixed version (ground truth):
@Override public void close(EventRegistration eventRegistration){
  Registration registration=(Registration)eventRegistration;
  Object listener=registration.getListener();
  if (!(listener instanceof Closeable)) {
    return;
  }
  try {
    ((Closeable)listener).close();
  }
 catch (  IOException e) {
    EmptyStatement.ignore(e);
  }
}
Program: 47489
Project: 47489
Buggy source:
@Override protected <K,V>CacheConfig<K,V> findConfig(String cacheName,String simpleCacheName,boolean createAlsoOnOthers,boolean syncCreate){
  CacheConfig<K,V> config=configs.get(cacheName);
  if (config == null) {
    if (config == null) {
      config=getCacheConfigFromPartition(cacheName,simpleCacheName);
    }
    if (config != null) {
      createConfig(cacheName,config,createAlsoOnOthers,syncCreate);
    }
  }
  return config;
}

Fixed version (ground truth):
@Override protected <K,V>CacheConfig<K,V> findConfig(String cacheName,String simpleCacheName,boolean createAlsoOnOthers,boolean syncCreate){
  CacheConfig<K,V> config=configs.get(cacheName);
  if (config == null) {
    config=getCacheConfigFromPartition(cacheName,simpleCacheName);
    if (config != null) {
      createConfig(cacheName,config,createAlsoOnOthers,syncCreate);
    }
  }
  return config;
}
Program: 47490
Project: 47490
Buggy source:
@Override protected <K,V>CacheConfig<K,V> findConfig(String cacheName,String simpleCacheName,boolean createAlsoOnOthers,boolean syncCreate){
  CacheConfig<K,V> config=configs.get(cacheName);
  if (config == null) {
    if (config == null) {
      config=getCacheConfigFromPartition(cacheName,simpleCacheName);
    }
    if (config != null) {
      createConfig(cacheName,config,createAlsoOnOthers,syncCreate);
    }
  }
  return config;
}

Fixed version (ground truth):
@Override protected <K,V>CacheConfig<K,V> findConfig(String cacheName,String simpleCacheName,boolean createAlsoOnOthers,boolean syncCreate){
  CacheConfig<K,V> config=configs.get(cacheName);
  if (config == null) {
    config=getCacheConfigFromPartition(cacheName,simpleCacheName);
    if (config != null) {
      createConfig(cacheName,config,createAlsoOnOthers,syncCreate);
    }
  }
  return config;
}
Program: 47491
Project: 47491
Buggy source:
public CacheSimpleConfig findCacheConfig(String simpleName){
  return nodeEngine.getConfig().findCacheConfig(simpleName);
}

Fixed version (ground truth):
public CacheSimpleConfig findCacheConfig(String simpleName){
  if (simpleName == null) {
    return null;
  }
  return nodeEngine.getConfig().findCacheConfig(simpleName);
}
Program: 47492
Project: 47492
Buggy source:
@Override public CacheConfig createCacheConfigIfAbsent(CacheConfig config){
  final CacheConfig localConfig=configs.putIfAbsent(config.getNameWithPrefix(),config);
  if (localConfig == null) {
    if (config.isStatisticsEnabled()) {
      setStatisticsEnabled(config,config.getNameWithPrefix(),true);
    }
    if (config.isManagementEnabled()) {
      setManagementEnabled(config,config.getNameWithPrefix(),true);
    }
  }
  return localConfig;
}

Fixed version (ground truth):
@Override public CacheConfig createCacheConfigIfAbsent(CacheConfig config,boolean createAlsoOnOthers,boolean syncCreate){
  CacheConfig cacheConfig=createCacheConfigIfAbsent(config);
  if (createAlsoOnOthers) {
    OperationService operationService=nodeEngine.getOperationService();
    CacheCreateConfigOperation op=new CacheCreateConfigOperation(cacheConfig == null ? config : cacheConfig,false,true);
    InternalCompletableFuture future=operationService.invokeOnTarget(SERVICE_NAME,op,nodeEngine.getThisAddress());
    if (syncCreate) {
      future.getSafely();
    }
  }
  return cacheConfig;
}
Program: 47493
Project: 47493
Buggy source:
@Override public <K,V,C extends Configuration<K,V>>ICache<K,V> createCache(String cacheName,C configuration) throws IllegalArgumentException {
  checkIfManagerNotClosed();
  checkNotNull(cacheName,"String_Node_Str");
  checkNotNull(configuration,"String_Node_Str");
  final CacheConfig<K,V> newCacheConfig=createCacheConfig(cacheName,configuration);
  if (caches.containsKey(newCacheConfig.getNameWithPrefix())) {
    throw new CacheException("String_Node_Str" + cacheName + "String_Node_Str");
  }
  final ICache<K,V> cacheProxy=createCacheProxy(newCacheConfig);
  CacheConfig<K,V> current=createConfigOnPartition(newCacheConfig);
  if (current == null) {
    addCacheConfigIfAbsentToLocal(newCacheConfig);
    caches.put(newCacheConfig.getNameWithPrefix(),cacheProxy);
    registerListeners(newCacheConfig,cacheProxy);
    return cacheProxy;
  }
  ICache<?,?> cache=getOrPutIfAbsent(current.getNameWithPrefix(),cacheProxy);
  CacheConfig config=cache.getConfiguration(CacheConfig.class);
  if (config.equals(newCacheConfig)) {
    return (ICache<K,V>)cache;
  }
  throw new CacheException("String_Node_Str" + cacheName + "String_Node_Str");
}

Fixed version (ground truth):
@Override public <K,V,C extends Configuration<K,V>>ICache<K,V> createCache(String cacheName,C configuration) throws IllegalArgumentException {
  checkIfManagerNotClosed();
  checkNotNull(cacheName,"String_Node_Str");
  checkNotNull(configuration,"String_Node_Str");
  final CacheConfig<K,V> newCacheConfig=createCacheConfig(cacheName,configuration);
  if (caches.containsKey(newCacheConfig.getNameWithPrefix())) {
    throw new CacheException("String_Node_Str" + cacheName + "String_Node_Str");
  }
  final ICache<K,V> cacheProxy=createCacheProxy(newCacheConfig);
  CacheConfig<K,V> current=createConfigOnPartition(newCacheConfig);
  if (current == null) {
    addCacheConfigIfAbsent(newCacheConfig);
    caches.put(newCacheConfig.getNameWithPrefix(),cacheProxy);
    registerListeners(newCacheConfig,cacheProxy);
    return cacheProxy;
  }
  ICache<?,?> cache=getOrPutIfAbsent(current.getNameWithPrefix(),cacheProxy);
  CacheConfig config=cache.getConfiguration(CacheConfig.class);
  if (config.equals(newCacheConfig)) {
    return (ICache<K,V>)cache;
  }
  throw new CacheException("String_Node_Str" + cacheName + "String_Node_Str");
}
Program: 47494
Project: 47494
Buggy source:
CacheConfig createCacheConfigIfAbsent(CacheConfig config);

Fixed version (ground truth):
CacheConfig createCacheConfigIfAbsent(CacheConfig config,boolean createAlsoOnOthers,boolean syncCreate);
Program: 47495
Project: 47495
Buggy source:
public CacheCreateConfigOperation(CacheConfig config,boolean isLocal){
  super(config.getNameWithPrefix());
  this.config=config;
  this.isLocal=isLocal;
}

Fixed version (ground truth):
public CacheCreateConfigOperation(CacheConfig config,boolean isLocal,boolean ignoreLocal){
  super(config.getNameWithPrefix());
  this.config=config;
  this.isLocal=isLocal;
  this.ignoreLocal=ignoreLocal;
}
Program: 47496
Project: 47496
Buggy source:
@Override public void run() throws Exception {
  AbstractCacheService service=getService();
  response=service.createCacheConfigIfAbsent(config);
  if (!isLocal && response == null) {
    NodeEngine nodeEngine=getNodeEngine();
    Collection<MemberImpl> members=nodeEngine.getClusterService().getMemberList();
    int remoteNodeCount=members.size() - 1;
    if (remoteNodeCount > 0) {
      postponeReturnResponse();
      Callback<Object> callback=new CacheConfigCreateCallback(getResponseHandler(),remoteNodeCount);
      OperationService operationService=nodeEngine.getOperationService();
      for (      MemberImpl member : members) {
        if (!member.localMember()) {
          CacheCreateConfigOperation op=new CacheCreateConfigOperation(config,true);
          operationService.createInvocationBuilder(AbstractCacheService.SERVICE_NAME,op,member.getAddress()).setCallback(callback).invoke();
        }
      }
    }
  }
}

Fixed version (ground truth):
@Override public void run() throws Exception {
  AbstractCacheService service=getService();
  if (!ignoreLocal) {
    response=service.createCacheConfigIfAbsent(config);
  }
  if (!isLocal && response == null) {
    NodeEngine nodeEngine=getNodeEngine();
    Collection<MemberImpl> members=nodeEngine.getClusterService().getMemberList();
    int remoteNodeCount=members.size() - 1;
    if (remoteNodeCount > 0) {
      postponeReturnResponse();
      Callback<Object> callback=new CacheConfigCreateCallback(getResponseHandler(),remoteNodeCount);
      OperationService operationService=nodeEngine.getOperationService();
      for (      MemberImpl member : members) {
        if (!member.localMember()) {
          CacheCreateConfigOperation op=new CacheCreateConfigOperation(config,true);
          operationService.createInvocationBuilder(AbstractCacheService.SERVICE_NAME,op,member.getAddress()).setCallback(callback).invoke();
        }
      }
    }
  }
}
Program: 47497
Project: 47497
Buggy source:
@Override protected void readInternal(ObjectDataInput in) throws IOException {
  super.readInternal(in);
  config=in.readObject();
  isLocal=in.readBoolean();
}

Fixed version (ground truth):
@Override protected void readInternal(ObjectDataInput in) throws IOException {
  super.readInternal(in);
  config=in.readObject();
  isLocal=in.readBoolean();
  ignoreLocal=in.readBoolean();
}
Program: 47498
Project: 47498
Buggy source:
@Override protected void writeInternal(ObjectDataOutput out) throws IOException {
  super.writeInternal(out);
  out.writeObject(config);
  out.writeBoolean(isLocal);
}

Fixed version (ground truth):
@Override protected void writeInternal(ObjectDataOutput out) throws IOException {
  super.writeInternal(out);
  out.writeObject(config);
  out.writeBoolean(isLocal);
  out.writeBoolean(ignoreLocal);
}
Program: 47499
Project: 47499
Buggy source:
@Override public void run() throws Exception {
  final CacheService service=getService();
  final CacheConfig cacheConfig=service.getCacheConfig(name);
  if (cacheConfig == null) {
    CacheSimpleConfig simpleConfig=service.findCacheConfig(simpleName);
    if (simpleConfig != null) {
      try {
        CacheConfig cacheConfigFromSimpleConfig=new CacheConfig(simpleConfig);
        cacheConfigFromSimpleConfig.setName(simpleName);
        cacheConfigFromSimpleConfig.setManagerPrefix(name.substring(0,name.lastIndexOf(simpleName)));
        if (service.createCacheConfigIfAbsent(cacheConfigFromSimpleConfig) == null) {
          response=cacheConfigFromSimpleConfig;
          return;
        }
      }
 catch (      Exception e) {
        throw new CacheException(e);
      }
    }
  }
  response=cacheConfig;
}

Fixed version (ground truth):
@Override public void run() throws Exception {
  final CacheService service=getService();
  final CacheConfig cacheConfig=service.getCacheConfig(name);
  if (cacheConfig == null) {
    CacheSimpleConfig simpleConfig=service.findCacheConfig(simpleName);
    if (simpleConfig != null) {
      try {
        CacheConfig cacheConfigFromSimpleConfig=new CacheConfig(simpleConfig);
        cacheConfigFromSimpleConfig.setName(simpleName);
        cacheConfigFromSimpleConfig.setManagerPrefix(name.substring(0,name.lastIndexOf(simpleName)));
        if (service.createCacheConfigIfAbsent(cacheConfigFromSimpleConfig,true,false) == null) {
          response=cacheConfigFromSimpleConfig;
          return;
        }
      }
 catch (      Exception e) {
        throw new CacheException(e);
      }
    }
  }
  response=cacheConfig;
}
Program: 47500
Project: 47500
Buggy source:
private void waitInitialMemberListFetched() throws InterruptedException {
  boolean success=initialListFetchedLatch.await(INITIAL_MEMBERS_TIMEOUT_SECONDS,TimeUnit.SECONDS);
  if (success) {
    LOGGER.warning("String_Node_Str");
  }
}

Fixed version (ground truth):
private void waitInitialMemberListFetched() throws InterruptedException {
  boolean success=initialListFetchedLatch.await(INITIAL_MEMBERS_TIMEOUT_SECONDS,TimeUnit.SECONDS);
  if (!success) {
    LOGGER.warning("String_Node_Str");
  }
}
Program: 47501
Project: 47501
Buggy source:
private void waitInitialMemberListFetched() throws InterruptedException {
  boolean success=initialListFetchedLatch.await(INITIAL_MEMBERS_TIMEOUT_SECONDS,TimeUnit.SECONDS);
  if (success) {
    LOGGER.warning("String_Node_Str");
  }
}

Fixed version (ground truth):
private void waitInitialMemberListFetched() throws InterruptedException {
  boolean success=initialListFetchedLatch.await(INITIAL_MEMBERS_TIMEOUT_SECONDS,TimeUnit.SECONDS);
  if (!success) {
    LOGGER.warning("String_Node_Str");
  }
}
Program: 47502
Project: 47502
Buggy source:
@Override protected <K,V>CacheConfig<K,V> findConfig(String cacheName,String simpleCacheName,boolean createAlsoOnOthers,boolean syncCreate){
  CacheConfig<K,V> config=configs.get(cacheName);
  if (config == null) {
    if (config == null) {
      config=getCacheConfigFromPartition(cacheName,simpleCacheName);
    }
    if (config != null) {
      createConfig(cacheName,config,createAlsoOnOthers,syncCreate);
    }
  }
  return config;
}

Fixed version (ground truth):
@Override protected <K,V>CacheConfig<K,V> findConfig(String cacheName,String simpleCacheName,boolean createAlsoOnOthers,boolean syncCreate){
  CacheConfig<K,V> config=configs.get(cacheName);
  if (config == null) {
    config=getCacheConfigFromPartition(cacheName,simpleCacheName);
    if (config != null) {
      createConfig(cacheName,config,createAlsoOnOthers,syncCreate);
    }
  }
  return config;
}
Program: 47503
Project: 47503
Buggy source:
@Override public void run(){
  try {
    while (!shutdown) {
      scanHandleOperationTimeout();
      backPressureService.cleanup();
      sleep();
    }
  }
 catch (  Throwable t) {
    inspectOutputMemoryError(t);
    logger.severe("String_Node_Str",t);
  }
}

Fixed version (ground truth):
@Override public void run(){
  try {
    while (!shutdown) {
      scanHandleOperationTimeout();
      if (!shutdown) {
        backPressureService.cleanup();
      }
      if (!shutdown) {
        sleep();
      }
    }
  }
 catch (  Throwable t) {
    inspectOutputMemoryError(t);
    logger.severe("String_Node_Str",t);
  }
}
Program: 47504
Project: 47504
Buggy source:
private void scanHandleOperationTimeout(){
  if (invocations.isEmpty()) {
    return;
  }
  for (  BasicInvocation invocation : invocations.values()) {
    try {
      invocation.handleOperationTimeout();
    }
 catch (    Throwable t) {
      inspectOutputMemoryError(t);
      logger.severe("String_Node_Str" + invocation,t);
    }
    try {
      invocation.handleBackupTimeout(backupOperationTimeoutMillis);
    }
 catch (    Throwable t) {
      inspectOutputMemoryError(t);
      logger.severe("String_Node_Str" + invocation,t);
    }
  }
}

Fixed version (ground truth):
private void scanHandleOperationTimeout(){
  if (invocations.isEmpty()) {
    return;
  }
  for (  BasicInvocation invocation : invocations.values()) {
    if (shutdown) {
      return;
    }
    try {
      invocation.handleOperationTimeout();
    }
 catch (    Throwable t) {
      inspectOutputMemoryError(t);
      logger.severe("String_Node_Str" + invocation,t);
    }
    try {
      invocation.handleBackupTimeout(backupOperationTimeoutMillis);
    }
 catch (    Throwable t) {
      inspectOutputMemoryError(t);
      logger.severe("String_Node_Str" + invocation,t);
    }
  }
}
Program: 47505
Project: 47505
Buggy source:
@Override public void shutdown(){
  shutdown=true;
  logger.finest("String_Node_Str");
  for (  BasicInvocation invocation : invocations.values()) {
    try {
      invocation.notify(new HazelcastInstanceNotActiveException());
    }
 catch (    Throwable e) {
      logger.warning(invocation + "String_Node_Str" + e.getMessage());
    }
  }
  invocations.clear();
  scheduler.shutdown();
}

Fixed version (ground truth):
@Override public void shutdown(){
  shutdown=true;
  logger.finest("String_Node_Str");
  for (  BasicInvocation invocation : invocations.values()) {
    try {
      invocation.notify(new HazelcastInstanceNotActiveException());
    }
 catch (    Throwable e) {
      logger.warning(invocation + "String_Node_Str" + e.getMessage());
    }
  }
  invocations.clear();
  scheduler.shutdown();
  try {
    cleanupThread.join(CLEANUP_THREAD_MAX_WAIT_TIME_TO_FINISH);
  }
 catch (  InterruptedException e) {
    EmptyStatement.ignore(e);
  }
}
Program: 47506
Project: 47506
Buggy source:
BasicOperationService(NodeEngineImpl nodeEngine){
  this.nodeEngine=nodeEngine;
  this.node=nodeEngine.getNode();
  this.logger=node.getLogger(OperationService.class);
  this.invocationLogger=nodeEngine.getLogger(BasicInvocation.class);
  this.defaultCallTimeoutMillis=node.getGroupProperties().OPERATION_CALL_TIMEOUT_MILLIS.getLong();
  this.backupOperationTimeoutMillis=node.getGroupProperties().OPERATION_BACKUP_TIMEOUT_MILLIS.getLong();
  this.executionService=nodeEngine.getExecutionService();
  this.backPressureService=new BasicBackPressureService(node.getGroupProperties(),logger);
  int coreSize=Runtime.getRuntime().availableProcessors();
  boolean reallyMultiCore=coreSize >= CORE_SIZE_CHECK;
  int concurrencyLevel=reallyMultiCore ? coreSize * CORE_SIZE_FACTOR : CONCURRENCY_LEVEL;
  this.executingCalls=new ConcurrentHashMap<RemoteCallKey,RemoteCallKey>(INITIAL_CAPACITY,LOAD_FACTOR,concurrencyLevel);
  this.invocations=new ConcurrentHashMap<Long,BasicInvocation>(INITIAL_CAPACITY,LOAD_FACTOR,concurrencyLevel);
  this.scheduler=new BasicOperationScheduler(node,executionService,new BasicDispatcherImpl());
  this.operationHandler=new OperationHandler();
  this.operationBackupHandler=new OperationBackupHandler();
  this.operationPacketHandler=new OperationPacketHandler();
  this.responsePacketHandler=new ResponsePacketHandler();
  this.asyncExecutor=executionService.register(ExecutionService.ASYNC_EXECUTOR,coreSize,ASYNC_QUEUE_CAPACITY,ExecutorType.CONCRETE);
  startCleanupThread();
}

Fixed version (ground truth):
BasicOperationService(NodeEngineImpl nodeEngine){
  this.nodeEngine=nodeEngine;
  this.node=nodeEngine.getNode();
  this.logger=node.getLogger(OperationService.class);
  this.invocationLogger=nodeEngine.getLogger(BasicInvocation.class);
  this.defaultCallTimeoutMillis=node.getGroupProperties().OPERATION_CALL_TIMEOUT_MILLIS.getLong();
  this.backupOperationTimeoutMillis=node.getGroupProperties().OPERATION_BACKUP_TIMEOUT_MILLIS.getLong();
  this.executionService=nodeEngine.getExecutionService();
  this.backPressureService=new BasicBackPressureService(node.getGroupProperties(),logger);
  int coreSize=Runtime.getRuntime().availableProcessors();
  boolean reallyMultiCore=coreSize >= CORE_SIZE_CHECK;
  int concurrencyLevel=reallyMultiCore ? coreSize * CORE_SIZE_FACTOR : CONCURRENCY_LEVEL;
  this.executingCalls=new ConcurrentHashMap<RemoteCallKey,RemoteCallKey>(INITIAL_CAPACITY,LOAD_FACTOR,concurrencyLevel);
  this.invocations=new ConcurrentHashMap<Long,BasicInvocation>(INITIAL_CAPACITY,LOAD_FACTOR,concurrencyLevel);
  this.scheduler=new BasicOperationScheduler(node,executionService,new BasicDispatcherImpl());
  this.operationHandler=new OperationHandler();
  this.operationBackupHandler=new OperationBackupHandler();
  this.operationPacketHandler=new OperationPacketHandler();
  this.responsePacketHandler=new ResponsePacketHandler();
  this.asyncExecutor=executionService.register(ExecutionService.ASYNC_EXECUTOR,coreSize,ASYNC_QUEUE_CAPACITY,ExecutorType.CONCRETE);
  this.cleanupThread=new CleanupThread();
  this.cleanupThread.start();
}
Program: 47507
Project: 47507
Buggy source:
@Override protected List<FrameworkMethod> getChildren(){
  final List<FrameworkMethod> children=super.getChildren();
  Collections.shuffle(children);
  return children;
}

Fixed version (ground truth):
@Override protected List<FrameworkMethod> getChildren(){
  final List<FrameworkMethod> children=super.getChildren();
  Collections.shuffle(new LinkedList<FrameworkMethod>(children));
  return children;
}
Program: 47508
Project: 47508
Buggy source:
@Override public void run(){
  try {
    while (!shutdown) {
      scanHandleOperationTimeout();
      backPressureService.cleanup();
      sleep();
    }
  }
 catch (  Throwable t) {
    inspectOutputMemoryError(t);
    logger.severe("String_Node_Str",t);
  }
}

Fixed version (ground truth):
@Override public void run(){
  try {
    while (!shutdown) {
      scanHandleOperationTimeout();
      if (!shutdown) {
        backPressureService.cleanup();
      }
      if (!shutdown) {
        sleep();
      }
    }
  }
 catch (  Throwable t) {
    inspectOutputMemoryError(t);
    logger.severe("String_Node_Str",t);
  }
}
Program: 47509
Project: 47509
Buggy source:
private void scanHandleOperationTimeout(){
  if (invocations.isEmpty()) {
    return;
  }
  for (  BasicInvocation invocation : invocations.values()) {
    try {
      invocation.handleOperationTimeout();
    }
 catch (    Throwable t) {
      inspectOutputMemoryError(t);
      logger.severe("String_Node_Str" + invocation,t);
    }
    try {
      invocation.handleBackupTimeout(backupOperationTimeoutMillis);
    }
 catch (    Throwable t) {
      inspectOutputMemoryError(t);
      logger.severe("String_Node_Str" + invocation,t);
    }
  }
}

Fixed version (ground truth):
private void scanHandleOperationTimeout(){
  if (invocations.isEmpty()) {
    return;
  }
  for (  BasicInvocation invocation : invocations.values()) {
    if (shutdown) {
      return;
    }
    try {
      invocation.handleOperationTimeout();
    }
 catch (    Throwable t) {
      inspectOutputMemoryError(t);
      logger.severe("String_Node_Str" + invocation,t);
    }
    try {
      invocation.handleBackupTimeout(backupOperationTimeoutMillis);
    }
 catch (    Throwable t) {
      inspectOutputMemoryError(t);
      logger.severe("String_Node_Str" + invocation,t);
    }
  }
}
Program: 47510
Project: 47510
Buggy source:
@Override public void shutdown(){
  shutdown=true;
  logger.finest("String_Node_Str");
  for (  BasicInvocation invocation : invocations.values()) {
    try {
      invocation.notify(new HazelcastInstanceNotActiveException());
    }
 catch (    Throwable e) {
      logger.warning(invocation + "String_Node_Str" + e.getMessage());
    }
  }
  invocations.clear();
  operationExecutor.shutdown();
  slowOperationDetector.shutdown();
}

Fixed version (ground truth):
@Override public void shutdown(){
  shutdown=true;
  logger.finest("String_Node_Str");
  for (  BasicInvocation invocation : invocations.values()) {
    try {
      invocation.notify(new HazelcastInstanceNotActiveException());
    }
 catch (    Throwable e) {
      logger.warning(invocation + "String_Node_Str" + e.getMessage());
    }
  }
  invocations.clear();
  operationExecutor.shutdown();
  slowOperationDetector.shutdown();
  try {
    cleanupThread.join(CLEANUP_THREAD_MAX_WAIT_TIME_TO_FINISH);
  }
 catch (  InterruptedException e) {
    EmptyStatement.ignore(e);
  }
}
Program: 47512
Project: 47512
Buggy source:
private void scan(long nowNanos,long nowMillis,OperationRunner[] operationRunners,CurrentOperationData[] currentOperationDataArray){
  for (int i=0; i < operationRunners.length; i++) {
    if (operationRunners[i].currentTask() == null) {
      continue;
    }
    scanOperationRunner(nowNanos,nowMillis,operationRunners[i],currentOperationDataArray[i]);
  }
}

Fixed version (ground truth):
private void scan(long nowNanos,long nowMillis,OperationRunner[] operationRunners,CurrentOperationData[] currentOperationDataArray){
  for (int i=0; i < operationRunners.length && running; i++) {
    if (operationRunners[i].currentTask() == null) {
      continue;
    }
    scanOperationRunner(nowNanos,nowMillis,operationRunners[i],currentOperationDataArray[i]);
  }
}
Program: 47513
Project: 47513
Buggy source:
public SlowOperationDetector(OperationRunner[] genericOperationRunners,OperationRunner[] partitionOperationRunners,GroupProperties groupProperties,HazelcastThreadGroup hazelcastThreadGroup){
  this.genericOperationRunners=genericOperationRunners;
  this.partitionOperationRunners=partitionOperationRunners;
  genericCurrentOperationData=initCurrentOperationData(genericOperationRunners);
  partitionCurrentOperationData=initCurrentOperationData(partitionOperationRunners);
  slowOperationThresholdNanos=getGroupPropertyMillisAsNanos(groupProperties.SLOW_OPERATION_DETECTOR_THRESHOLD_MILLIS);
  logPurgeIntervalNanos=getGroupPropertySecAsNanos(groupProperties.SLOW_OPERATION_DETECTOR_LOG_PURGE_INTERVAL_SECONDS);
  logRetentionNanos=getGroupPropertySecAsNanos(groupProperties.SLOW_OPERATION_DETECTOR_LOG_RETENTION_SECONDS);
  new SlowOperationDetectorThread(hazelcastThreadGroup).start();
}

Fixed version (ground truth):
public SlowOperationDetector(OperationRunner[] genericOperationRunners,OperationRunner[] partitionOperationRunners,GroupProperties groupProperties,HazelcastThreadGroup hazelcastThreadGroup){
  this.genericOperationRunners=genericOperationRunners;
  this.partitionOperationRunners=partitionOperationRunners;
  genericCurrentOperationData=initCurrentOperationData(genericOperationRunners);
  partitionCurrentOperationData=initCurrentOperationData(partitionOperationRunners);
  slowOperationThresholdNanos=getGroupPropertyMillisAsNanos(groupProperties.SLOW_OPERATION_DETECTOR_THRESHOLD_MILLIS);
  logPurgeIntervalNanos=getGroupPropertySecAsNanos(groupProperties.SLOW_OPERATION_DETECTOR_LOG_PURGE_INTERVAL_SECONDS);
  logRetentionNanos=getGroupPropertySecAsNanos(groupProperties.SLOW_OPERATION_DETECTOR_LOG_RETENTION_SECONDS);
  slowOperationDetectorThread=new SlowOperationDetectorThread(hazelcastThreadGroup);
  slowOperationDetectorThread.start();
}
Program: 47514
Project: 47514
Buggy source:
public void run(){
  long lastLogPurge=System.nanoTime();
  while (running) {
    long nowNanos=System.nanoTime();
    long nowMillis=System.currentTimeMillis();
    scan(nowNanos,nowMillis,genericOperationRunners,genericCurrentOperationData);
    scan(nowNanos,nowMillis,partitionOperationRunners,partitionCurrentOperationData);
    if (purge(nowNanos,lastLogPurge)) {
      lastLogPurge=nowNanos;
    }
    sleepInterval(nowNanos);
  }
}

Fixed version (ground truth):
public void run(){
  long lastLogPurge=System.nanoTime();
  while (running) {
    long nowNanos=System.nanoTime();
    long nowMillis=System.currentTimeMillis();
    scan(nowNanos,nowMillis,genericOperationRunners,genericCurrentOperationData);
    scan(nowNanos,nowMillis,partitionOperationRunners,partitionCurrentOperationData);
    if (purge(nowNanos,lastLogPurge)) {
      lastLogPurge=nowNanos;
    }
    if (running) {
      sleepInterval(nowNanos);
    }
  }
}
Program: 47515
Project: 47515
Buggy source:
private boolean purge(long nowNanos,long lastLogPurge){
  if (nowNanos - lastLogPurge <= logPurgeIntervalNanos) {
    return false;
  }
  for (  SlowOperationLog log : slowOperationLogs.values()) {
    log.purgeInvocations(nowNanos,logRetentionNanos);
    if (log.isEmpty()) {
      slowOperationLogs.remove(log.getStackTrace().hashCode());
    }
  }
  return true;
}

Fixed version (ground truth):
private boolean purge(long nowNanos,long lastLogPurge){
  if (nowNanos - lastLogPurge <= logPurgeIntervalNanos) {
    return false;
  }
  for (  SlowOperationLog log : slowOperationLogs.values()) {
    if (!running) {
      return false;
    }
    log.purgeInvocations(nowNanos,logRetentionNanos);
    if (log.isEmpty()) {
      slowOperationLogs.remove(log.getStackTrace().hashCode());
    }
  }
  return true;
}
Program: 47516
Project: 47516
Buggy source:
void shutdown(){
  running=false;
}

Fixed version (ground truth):
void shutdown(){
  running=false;
  try {
    slowOperationDetectorThread.join(SLOW_OPERATION_THREAD_MAX_WAIT_TIME_TO_FINISH);
  }
 catch (  InterruptedException e) {
    EmptyStatement.ignore(e);
  }
}
Program: 47517
Project: 47517
Buggy source:
@Override public void run(){
  try {
    while (!shutdown) {
      scanHandleOperationTimeout();
      backPressureService.cleanup();
      sleep();
    }
  }
 catch (  Throwable t) {
    inspectOutputMemoryError(t);
    logger.severe("String_Node_Str",t);
  }
}

Fixed version (ground truth):
@Override public void run(){
  try {
    while (!shutdown) {
      scanHandleOperationTimeout();
      if (!shutdown) {
        backPressureService.cleanup();
      }
      if (!shutdown) {
        sleep();
      }
    }
  }
 catch (  Throwable t) {
    inspectOutputMemoryError(t);
    logger.severe("String_Node_Str",t);
  }
}
Program: 47518
Project: 47518
Buggy source:
private void scanHandleOperationTimeout(){
  if (invocations.isEmpty()) {
    return;
  }
  for (  BasicInvocation invocation : invocations.values()) {
    try {
      invocation.handleOperationTimeout();
    }
 catch (    Throwable t) {
      inspectOutputMemoryError(t);
      logger.severe("String_Node_Str" + invocation,t);
    }
    try {
      invocation.handleBackupTimeout(backupOperationTimeoutMillis);
    }
 catch (    Throwable t) {
      inspectOutputMemoryError(t);
      logger.severe("String_Node_Str" + invocation,t);
    }
  }
}

Fixed version (ground truth):
private void scanHandleOperationTimeout(){
  if (invocations.isEmpty()) {
    return;
  }
  for (  BasicInvocation invocation : invocations.values()) {
    if (shutdown) {
      return;
    }
    try {
      invocation.handleOperationTimeout();
    }
 catch (    Throwable t) {
      inspectOutputMemoryError(t);
      logger.severe("String_Node_Str" + invocation,t);
    }
    try {
      invocation.handleBackupTimeout(backupOperationTimeoutMillis);
    }
 catch (    Throwable t) {
      inspectOutputMemoryError(t);
      logger.severe("String_Node_Str" + invocation,t);
    }
  }
}
Program: 47519
Project: 47519
Buggy source:
@Override public void shutdown(){
  shutdown=true;
  logger.finest("String_Node_Str");
  for (  BasicInvocation invocation : invocations.values()) {
    try {
      invocation.notify(new HazelcastInstanceNotActiveException());
    }
 catch (    Throwable e) {
      logger.warning(invocation + "String_Node_Str" + e.getMessage());
    }
  }
  invocations.clear();
  operationExecutor.shutdown();
  slowOperationDetector.shutdown();
}

Fixed version (ground truth):
@Override public void shutdown(){
  shutdown=true;
  logger.finest("String_Node_Str");
  for (  BasicInvocation invocation : invocations.values()) {
    try {
      invocation.notify(new HazelcastInstanceNotActiveException());
    }
 catch (    Throwable e) {
      logger.warning(invocation + "String_Node_Str" + e.getMessage());
    }
  }
  invocations.clear();
  operationExecutor.shutdown();
  slowOperationDetector.shutdown();
  try {
    cleanupThread.join(CLEANUP_THREAD_MAX_WAIT_TIME_TO_FINISH);
  }
 catch (  InterruptedException e) {
    EmptyStatement.ignore(e);
  }
}
Program: 47521
Project: 47521
Buggy source:
private void scan(long nowNanos,long nowMillis,OperationRunner[] operationRunners,CurrentOperationData[] currentOperationDataArray){
  for (int i=0; i < operationRunners.length; i++) {
    if (operationRunners[i].currentTask() == null) {
      continue;
    }
    scanOperationRunner(nowNanos,nowMillis,operationRunners[i],currentOperationDataArray[i]);
  }
}

Fixed version (ground truth):
private void scan(long nowNanos,long nowMillis,OperationRunner[] operationRunners,CurrentOperationData[] currentOperationDataArray){
  for (int i=0; i < operationRunners.length && running; i++) {
    if (operationRunners[i].currentTask() == null) {
      continue;
    }
    scanOperationRunner(nowNanos,nowMillis,operationRunners[i],currentOperationDataArray[i]);
  }
}
Program: 47522
Project: 47522
Buggy source:
public SlowOperationDetector(OperationRunner[] genericOperationRunners,OperationRunner[] partitionOperationRunners,GroupProperties groupProperties,HazelcastThreadGroup hazelcastThreadGroup){
  this.genericOperationRunners=genericOperationRunners;
  this.partitionOperationRunners=partitionOperationRunners;
  genericCurrentOperationData=initCurrentOperationData(genericOperationRunners);
  partitionCurrentOperationData=initCurrentOperationData(partitionOperationRunners);
  slowOperationThresholdNanos=getGroupPropertyMillisAsNanos(groupProperties.SLOW_OPERATION_DETECTOR_THRESHOLD_MILLIS);
  logPurgeIntervalNanos=getGroupPropertySecAsNanos(groupProperties.SLOW_OPERATION_DETECTOR_LOG_PURGE_INTERVAL_SECONDS);
  logRetentionNanos=getGroupPropertySecAsNanos(groupProperties.SLOW_OPERATION_DETECTOR_LOG_RETENTION_SECONDS);
  new SlowOperationDetectorThread(hazelcastThreadGroup).start();
}

Fixed version (ground truth):
public SlowOperationDetector(OperationRunner[] genericOperationRunners,OperationRunner[] partitionOperationRunners,GroupProperties groupProperties,HazelcastThreadGroup hazelcastThreadGroup){
  this.genericOperationRunners=genericOperationRunners;
  this.partitionOperationRunners=partitionOperationRunners;
  genericCurrentOperationData=initCurrentOperationData(genericOperationRunners);
  partitionCurrentOperationData=initCurrentOperationData(partitionOperationRunners);
  slowOperationThresholdNanos=getGroupPropertyMillisAsNanos(groupProperties.SLOW_OPERATION_DETECTOR_THRESHOLD_MILLIS);
  logPurgeIntervalNanos=getGroupPropertySecAsNanos(groupProperties.SLOW_OPERATION_DETECTOR_LOG_PURGE_INTERVAL_SECONDS);
  logRetentionNanos=getGroupPropertySecAsNanos(groupProperties.SLOW_OPERATION_DETECTOR_LOG_RETENTION_SECONDS);
  slowOperationDetectorThread=new SlowOperationDetectorThread(hazelcastThreadGroup);
  slowOperationDetectorThread.start();
}