Program: 167791
Project: 167791
Buggy source:
public static ServiceController<SocketBinding> installBindingService(OperationContext context,ModelNode config,String name) throws UnknownHostException, OperationFailedException {
  final ServiceTarget serviceTarget=context.getServiceTarget();
  final ModelNode intfNode=AbstractSocketBindingResourceDefinition.INTERFACE.resolveModelAttribute(context,config);
  final String intf=intfNode.isDefined() ? intfNode.asString() : null;
  final int port=AbstractSocketBindingResourceDefinition.PORT.resolveModelAttribute(context,config).asInt();
  final boolean fixedPort=AbstractSocketBindingResourceDefinition.FIXED_PORT.resolveModelAttribute(context,config).asBoolean();
  final ModelNode mcastNode=AbstractSocketBindingResourceDefinition.MULTICAST_ADDRESS.resolveModelAttribute(context,config);
  final String mcastAddr=mcastNode.isDefined() ? mcastNode.asString() : null;
  final int mcastPort=AbstractSocketBindingResourceDefinition.MULTICAST_PORT.resolveModelAttribute(context,config).asInt(0);
  final InetAddress mcastInet=mcastAddr == null ? null : InetAddress.getByName(mcastAddr);
  final ModelNode mappingsNode=config.get(CLIENT_MAPPINGS);
  final List<ClientMapping> clientMappings=mappingsNode.isDefined() ? parseClientMappings(mappingsNode) : null;
  final SocketBindingService service=new SocketBindingService(name,port,fixedPort,mcastInet,mcastPort,clientMappings);
  final ServiceBuilder<SocketBinding> builder=serviceTarget.addService(SocketBinding.JBOSS_BINDING_NAME.append(name),service);
  if (intf != null) {
    builder.addDependency(NetworkInterfaceService.JBOSS_NETWORK_INTERFACE.append(intf),NetworkInterfaceBinding.class,service.getInterfaceBinding());
  }
  return builder.addDependency(SocketBindingManager.SOCKET_BINDING_MANAGER,SocketBindingManager.class,service.getSocketBindings()).setInitialMode(Mode.ON_DEMAND).install();
}

Fixed version (ground truth):
public static ServiceController<SocketBinding> installBindingService(OperationContext context,ModelNode config,String name,final ServiceVerificationHandler verificationHandler) throws UnknownHostException, OperationFailedException {
  final ServiceTarget serviceTarget=context.getServiceTarget();
  final ModelNode intfNode=AbstractSocketBindingResourceDefinition.INTERFACE.resolveModelAttribute(context,config);
  final String intf=intfNode.isDefined() ? intfNode.asString() : null;
  final int port=AbstractSocketBindingResourceDefinition.PORT.resolveModelAttribute(context,config).asInt();
  final boolean fixedPort=AbstractSocketBindingResourceDefinition.FIXED_PORT.resolveModelAttribute(context,config).asBoolean();
  final ModelNode mcastNode=AbstractSocketBindingResourceDefinition.MULTICAST_ADDRESS.resolveModelAttribute(context,config);
  final String mcastAddr=mcastNode.isDefined() ? mcastNode.asString() : null;
  final int mcastPort=AbstractSocketBindingResourceDefinition.MULTICAST_PORT.resolveModelAttribute(context,config).asInt(0);
  final InetAddress mcastInet=mcastAddr == null ? null : InetAddress.getByName(mcastAddr);
  final ModelNode mappingsNode=config.get(CLIENT_MAPPINGS);
  final List<ClientMapping> clientMappings=mappingsNode.isDefined() ? parseClientMappings(mappingsNode) : null;
  final SocketBindingService service=new SocketBindingService(name,port,fixedPort,mcastInet,mcastPort,clientMappings);
  final ServiceBuilder<SocketBinding> builder=serviceTarget.addService(SocketBinding.JBOSS_BINDING_NAME.append(name),service);
  if (intf != null) {
    builder.addDependency(NetworkInterfaceService.JBOSS_NETWORK_INTERFACE.append(intf),NetworkInterfaceBinding.class,service.getInterfaceBinding());
  }
  if (verificationHandler != null) {
    builder.addListener(verificationHandler);
  }
  return builder.addDependency(SocketBindingManager.SOCKET_BINDING_MANAGER,SocketBindingManager.class,service.getSocketBindings()).setInitialMode(Mode.ON_DEMAND).install();
}