Program: 49278
Project: 49278
Buggy source:
@Test public void testLockConditionSignalAllShutDownKeyOwner() throws InterruptedException {
  final StaticNodeFactory nodeFactory=new StaticNodeFactory(2);
  final Config config=new Config();
  final String name="String_Node_Str";
  final HazelcastInstance instance=nodeFactory.newHazelcastInstance(config);
  final AtomicInteger count=new AtomicInteger(0);
  final int size=50;
  int k=0;
  final HazelcastInstance keyOwner=nodeFactory.newHazelcastInstance(config);
  while (!keyOwner.getCluster().getLocalMember().equals(instance.getPartitionService().getPartition(++k).getOwner()))   ;
  final ILock lock=instance.getLock(k);
  final ICondition condition=lock.newCondition(name);
  final CountDownLatch awaitLatch=new CountDownLatch(size);
  final CountDownLatch finalLatch=new CountDownLatch(size);
  for (int i=0; i < size; i++) {
    new Thread(new Runnable(){
      public void run(){
        try {
          lock.lock();
          if (lock.isLocked() && lock.tryLock()) {
            count.incrementAndGet();
            lock.unlock();
          }
          awaitLatch.countDown();
          condition.await();
          Thread.sleep(5);
          if (lock.isLocked() && lock.tryLock()) {
            count.incrementAndGet();
            lock.unlock();
          }
        }
 catch (        InterruptedException e) {
          return;
        }
 finally {
          lock.unlock();
          finalLatch.countDown();
        }
      }
    }
).start();
  }
  final ILock lock1=keyOwner.getLock(k);
  final ICondition condition1=lock1.newCondition(name);
  awaitLatch.await(1,TimeUnit.MINUTES);
  lock1.lock();
  condition1.signalAll();
  lock1.unlock();
  keyOwner.getLifecycleService().shutdown();
  finalLatch.await(1,TimeUnit.MINUTES);
  Assert.assertEquals(size * 2,count.get());
}

Fixed version (ground truth):
@Test public void testLockConditionSignalAllShutDownKeyOwner() throws InterruptedException {
  final StaticNodeFactory nodeFactory=new StaticNodeFactory(2);
  final Config config=new Config();
  final String name="String_Node_Str";
  final HazelcastInstance instance=nodeFactory.newHazelcastInstance(config);
  final AtomicInteger count=new AtomicInteger(0);
  final int size=50;
  int k=0;
  final HazelcastInstance keyOwner=nodeFactory.newHazelcastInstance(config);
  while (!keyOwner.getCluster().getLocalMember().equals(instance.getPartitionService().getPartition(++k).getOwner())) {
    Thread.sleep(1);
  }
  final ILock lock=instance.getLock(k);
  final ICondition condition=lock.newCondition(name);
  final CountDownLatch awaitLatch=new CountDownLatch(size);
  final CountDownLatch finalLatch=new CountDownLatch(size);
  for (int i=0; i < size; i++) {
    new Thread(new Runnable(){
      public void run(){
        lock.lock();
        try {
          awaitLatch.countDown();
          condition.await();
          Thread.sleep(5);
          if (lock.isLocked() && lock.tryLock()) {
            count.incrementAndGet();
            lock.unlock();
          }
        }
 catch (        InterruptedException ignored) {
        }
 finally {
          lock.unlock();
          finalLatch.countDown();
        }
      }
    }
).start();
  }
  final ILock lock1=keyOwner.getLock(k);
  final ICondition condition1=lock1.newCondition(name);
  awaitLatch.await(1,TimeUnit.MINUTES);
  lock1.lock();
  condition1.signalAll();
  lock1.unlock();
  keyOwner.getLifecycleService().shutdown();
  finalLatch.await(2,TimeUnit.MINUTES);
  Assert.assertEquals(size,count.get());
}