Program: 115820
Project: 115820
Buggy source:
@Override public void run(){
  Lock lock=null;
  try {
    lock=CloudControllerContext.getInstance().acquireMemberContextWriteLock();
    String clusterId=memberContext.getClusterId();
    Partition partition=memberContext.getPartition();
    ClusterContext clusterContext=CloudControllerContext.getInstance().getClusterContext(clusterId);
    Iaas iaas=iaasProvider.getIaas();
    if (log.isDebugEnabled()) {
      log.debug(String.format("String_Node_Str",memberContext.getMemberId(),new String(iaasProvider.getPayload())));
    }
    memberContext=startInstance(iaas,memberContext);
    if (log.isInfoEnabled()) {
      log.info(String.format("String_Node_Str" + "String_Node_Str",memberContext.getCartridgeType(),memberContext.getClusterId(),memberContext.getInstanceId(),memberContext.getDefaultPrivateIP(),memberContext.getDefaultPublicIP()));
    }
    if (clusterContext.isVolumeRequired()) {
      attachVolumes(iaas,clusterContext,memberContext);
    }
    iaas.allocateIpAddresses(clusterId,memberContext,partition);
    TopologyBuilder.handleMemberInitializedEvent(memberContext);
    BAMUsageDataPublisher.publish(memberContext.getMemberId(),memberContext.getPartition().getId(),memberContext.getNetworkPartitionId(),memberContext.getClusterId(),memberContext.getCartridgeType(),MemberStatus.Initialized.toString(),memberContext.getInstanceMetadata());
  }
 catch (  Exception e) {
    String message=String.format("String_Node_Str",memberContext.getCartridgeType(),memberContext.getClusterId());
    log.error(message,e);
  }
 finally {
    if (lock != null) {
      CloudControllerContext.getInstance().releaseWriteLock(lock);
    }
  }
}

Fixed version (ground truth):
@Override public void run(){
  Lock lock=null;
  try {
    lock=CloudControllerContext.getInstance().acquireMemberContextWriteLock();
    String clusterId=memberContext.getClusterId();
    Partition partition=memberContext.getPartition();
    ClusterContext clusterContext=CloudControllerContext.getInstance().getClusterContext(clusterId);
    Iaas iaas=iaasProvider.getIaas();
    if (log.isDebugEnabled()) {
      log.debug(String.format("String_Node_Str",memberContext.getMemberId(),new String(payload)));
    }
    memberContext=startInstance(iaas,memberContext,payload);
    if (log.isInfoEnabled()) {
      log.info(String.format("String_Node_Str" + "String_Node_Str",memberContext.getCartridgeType(),memberContext.getClusterId(),memberContext.getInstanceId(),memberContext.getDefaultPrivateIP(),memberContext.getDefaultPublicIP()));
    }
    if (clusterContext.isVolumeRequired()) {
      attachVolumes(iaas,clusterContext,memberContext);
    }
    iaas.allocateIpAddresses(clusterId,memberContext,partition);
    TopologyBuilder.handleMemberInitializedEvent(memberContext);
    BAMUsageDataPublisher.publish(memberContext.getMemberId(),memberContext.getPartition().getId(),memberContext.getNetworkPartitionId(),memberContext.getClusterId(),memberContext.getCartridgeType(),MemberStatus.Initialized.toString(),memberContext.getInstanceMetadata());
  }
 catch (  Exception e) {
    String message=String.format("String_Node_Str",memberContext.getCartridgeType(),memberContext.getClusterId());
    log.error(message,e);
  }
 finally {
    if (lock != null) {
      CloudControllerContext.getInstance().releaseWriteLock(lock);
    }
  }
}