Program: 46610
Project: 46610
Buggy source:
public Node(HazelcastInstanceImpl hazelcastInstance,Config config,NodeContext nodeContext){
  this.hazelcastInstance=hazelcastInstance;
  this.config=config;
  this.liteMember=config.isLiteMember();
  this.configClassLoader=config.getClassLoader();
  this.groupProperties=new GroupProperties(config);
  this.buildInfo=BuildInfoProvider.getBuildInfo();
  String loggingType=groupProperties.getString(GroupProperty.LOGGING_TYPE);
  loggingService=new LoggingServiceImpl(config.getGroupConfig().getName(),loggingType,buildInfo);
  final AddressPicker addressPicker=nodeContext.createAddressPicker(this);
  try {
    addressPicker.pickAddress();
  }
 catch (  Throwable e) {
    throw ExceptionUtil.rethrow(e);
  }
  final ServerSocketChannel serverSocketChannel=addressPicker.getServerSocketChannel();
  try {
    address=addressPicker.getPublicAddress();
    final Map<String,Object> memberAttributes=findMemberAttributes(config.getMemberAttributeConfig().asReadOnly());
    localMember=new MemberImpl(address,true,createMemberUuid(address),hazelcastInstance,memberAttributes,liteMember);
    loggingService.setThisMember(localMember);
    logger=loggingService.getLogger(Node.class.getName());
    hazelcastThreadGroup=new HazelcastThreadGroup(hazelcastInstance.getName(),logger,configClassLoader);
    this.nodeExtension=nodeContext.createNodeExtension(this);
    nodeExtension.beforeStart();
    serializationService=nodeExtension.createSerializationService();
    securityContext=config.getSecurityConfig().isEnabled() ? nodeExtension.getSecurityContext() : null;
    nodeEngine=new NodeEngineImpl(this);
    clientEngine=new ClientEngineImpl(this);
    connectionManager=nodeContext.createConnectionManager(this,serverSocketChannel);
    partitionService=new InternalPartitionServiceImpl(this);
    clusterService=new ClusterServiceImpl(this);
    textCommandService=new TextCommandServiceImpl(this);
    nodeExtension.printNodeInfo();
    multicastService=createMulticastService(addressPicker.getBindAddress(),this,config,logger);
    discoveryService=createDiscoveryService(config);
    joiner=nodeContext.createJoiner(this);
  }
 catch (  Throwable e) {
    try {
      serverSocketChannel.close();
    }
 catch (    Throwable ignored) {
    }
    throw ExceptionUtil.rethrow(e);
  }
}

Fixed version (ground truth):
public Node(HazelcastInstanceImpl hazelcastInstance,Config config,NodeContext nodeContext){
  this.hazelcastInstance=hazelcastInstance;
  this.config=config;
  this.liteMember=config.isLiteMember();
  this.configClassLoader=config.getClassLoader();
  this.groupProperties=new GroupProperties(config);
  this.buildInfo=BuildInfoProvider.getBuildInfo();
  String loggingType=groupProperties.getString(GroupProperty.LOGGING_TYPE);
  loggingService=new LoggingServiceImpl(config.getGroupConfig().getName(),loggingType,buildInfo);
  final AddressPicker addressPicker=nodeContext.createAddressPicker(this);
  try {
    addressPicker.pickAddress();
  }
 catch (  Throwable e) {
    throw ExceptionUtil.rethrow(e);
  }
  final ServerSocketChannel serverSocketChannel=addressPicker.getServerSocketChannel();
  try {
    address=addressPicker.getPublicAddress();
    final Map<String,Object> memberAttributes=findMemberAttributes(config.getMemberAttributeConfig().asReadOnly());
    localMember=new MemberImpl(address,true,createMemberUuid(address),hazelcastInstance,memberAttributes,liteMember);
    loggingService.setThisMember(localMember);
    logger=loggingService.getLogger(Node.class.getName());
    hazelcastThreadGroup=new HazelcastThreadGroup(hazelcastInstance.getName(),logger,configClassLoader);
    this.nodeExtension=nodeContext.createNodeExtension(this);
    nodeExtension.printNodeInfo();
    nodeExtension.beforeStart();
    serializationService=nodeExtension.createSerializationService();
    securityContext=config.getSecurityConfig().isEnabled() ? nodeExtension.getSecurityContext() : null;
    nodeEngine=new NodeEngineImpl(this);
    clientEngine=new ClientEngineImpl(this);
    connectionManager=nodeContext.createConnectionManager(this,serverSocketChannel);
    partitionService=new InternalPartitionServiceImpl(this);
    clusterService=new ClusterServiceImpl(this);
    textCommandService=new TextCommandServiceImpl(this);
    multicastService=createMulticastService(addressPicker.getBindAddress(),this,config,logger);
    discoveryService=createDiscoveryService(config);
    joiner=nodeContext.createJoiner(this);
  }
 catch (  Throwable e) {
    try {
      serverSocketChannel.close();
    }
 catch (    Throwable ignored) {
    }
    throw ExceptionUtil.rethrow(e);
  }
}