Program: 47207
Project: 47207
Buggy source:
private void startJoin(){
  logger.finest("String_Node_Str");
  lock.lock();
  try {
    try {
      joinInProgress=true;
      node.getPartitionService().pauseMigration();
      final Collection<MemberImpl> members=getMemberList();
      final Collection<MemberInfo> memberInfos=createMemberInfos(members);
      for (      MemberInfo memberJoining : setJoins) {
        memberInfos.add(memberJoining);
      }
      final long time=clusterClock.getClusterTime();
      final Operation[] postJoinOps=nodeEngine.getPostJoinOperations();
      final PostJoinOperation postJoinOp=postJoinOps != null && postJoinOps.length > 0 ? new PostJoinOperation(postJoinOps) : null;
      final int count=members.size() - 1 + setJoins.size();
      final List<Future> calls=new ArrayList<Future>(count);
      for (      MemberInfo member : setJoins) {
        final long startTime=clusterClock.getClusterStartTime();
        calls.add(invokeClusterOperation(new FinalizeJoinOperation(memberInfos,postJoinOp,time,clusterId,startTime),member.getAddress()));
      }
      for (      MemberImpl member : members) {
        if (!member.getAddress().equals(thisAddress)) {
          calls.add(invokeClusterOperation(new MemberInfoUpdateOperation(memberInfos,time,true),member.getAddress()));
        }
      }
      updateMembers(memberInfos);
      int timeout=Math.min(calls.size() * FINALIZE_JOIN_TIMEOUT_FACTOR,FINALIZE_JOIN_MAX_TIMEOUT);
      waitWithDeadline(calls,timeout,TimeUnit.SECONDS,whileFinalizeJoinsExceptionHandler);
    }
  finally {
      node.getPartitionService().resumeMigration();
    }
  }
  finally {
    lock.unlock();
  }
}

Fixed version (ground truth):
private void startJoin(){
  logger.finest("String_Node_Str");
  lock.lock();
  try {
    try {
      joinInProgress=true;
      node.getPartitionService().pauseMigration();
      final Collection<MemberImpl> members=getMemberList();
      final Collection<MemberInfo> memberInfos=createMemberInfoList(members);
      for (      MemberInfo memberJoining : setJoins) {
        memberInfos.add(memberJoining);
      }
      final long time=clusterClock.getClusterTime();
      final Operation[] postJoinOps=nodeEngine.getPostJoinOperations();
      final PostJoinOperation postJoinOp=postJoinOps != null && postJoinOps.length > 0 ? new PostJoinOperation(postJoinOps) : null;
      final int count=members.size() - 1 + setJoins.size();
      final List<Future> calls=new ArrayList<Future>(count);
      for (      MemberInfo member : setJoins) {
        final long startTime=clusterClock.getClusterStartTime();
        calls.add(invokeClusterOperation(new FinalizeJoinOperation(memberInfos,postJoinOp,time,clusterId,startTime),member.getAddress()));
      }
      for (      MemberImpl member : members) {
        if (!member.getAddress().equals(thisAddress)) {
          calls.add(invokeClusterOperation(new MemberInfoUpdateOperation(memberInfos,time,true),member.getAddress()));
        }
      }
      updateMembers(memberInfos);
      int timeout=Math.min(calls.size() * FINALIZE_JOIN_TIMEOUT_FACTOR,FINALIZE_JOIN_MAX_TIMEOUT);
      waitWithDeadline(calls,timeout,TimeUnit.SECONDS,whileFinalizeJoinsExceptionHandler);
    }
  finally {
      node.getPartitionService().resumeMigration();
    }
  }
  finally {
    lock.unlock();
  }
}