<commit_before>/*
 * Copyright (C) 2011 <NAME> <<EMAIL>>
 * See LICENSE.txt for licensing information.
 */

package de.ailis.usb4java.topology;

import java.util.ArrayList;
import java.util.List;

import javax.usb.UsbConfiguration;
import javax.usb.UsbConst;
import javax.usb.UsbControlIrp;
import javax.usb.UsbDeviceDescriptor;
import javax.usb.UsbException;
import javax.usb.UsbHub;
import javax.usb.UsbPort;
import javax.usb.UsbStringDescriptor;
import javax.usb.event.UsbDeviceListener;
import javax.usb.util.DefaultUsbControlIrp;

import de.ailis.usb4java.descriptors.SimpleUsbDeviceDescriptor;
import de.ailis.usb4java.support.UsbDeviceListenerList;

/**
 * The virtual USB root hub.
 *
 * @author <NAME> (<EMAIL>)
 */
public final class VirtualRootHub implements UsbHub,
    UsbPorts<Usb4JavaPort, Usb4JavaDevice>
{
    /** The manufacturer string. */
    private static final String MANUFACTURER = "de.ailis.usb4java";

    /** The manufacturer string. */
    private static final String PRODUCT = "Virtual Root Hub";

    /** The serial number. */
    private static final String SERIAL_NUMBER = "0.1.0";

    /** The configurations. */
    private final List<UsbConfiguration> configurations =
            new ArrayList<UsbConfiguration>(1);

    /** The device descriptor. */
    private final UsbDeviceDescriptor descriptor =
        new SimpleUsbDeviceDescriptor(
            UsbConst.DESCRIPTOR_MIN_LENGTH_DEVICE,
            UsbConst.DESCRIPTOR_TYPE_DEVICE,
            (short) 0x101,
            UsbConst.HUB_CLASSCODE,
            (byte) 0,
            (byte) 0,
            (byte) 8,
            (short) 0xffff,
            (short) 0xffff,
            (byte) 0,
            (byte) 1,
            (byte) 2,
            (byte) 3,
            (byte) 1);

    /** The device listeners. */
    private final UsbDeviceListenerList listeners = new UsbDeviceListenerList();

    /** The hub ports. */
    private final Usb4JavaPorts ports = new Usb4JavaPorts(this);

    /**<commit_msg>Change identification of virtual root hub<commit_after>/*
 * Copyright (C) 2011 <NAME> <<EMAIL>>
 * See LICENSE.txt for licensing information.
 */

package de.ailis.usb4java.topology;

import java.util.ArrayList;
import java.util.List;

import javax.usb.UsbConfiguration;
import javax.usb.UsbConst;
import javax.usb.UsbControlIrp;
import javax.usb.UsbDeviceDescriptor;
import javax.usb.UsbException;
import javax.usb.UsbHub;
import javax.usb.UsbPort;
import javax.usb.UsbStringDescriptor;
import javax.usb.event.UsbDeviceListener;
import javax.usb.util.DefaultUsbControlIrp;

import de.ailis.usb4java.descriptors.SimpleUsbDeviceDescriptor;
import de.ailis.usb4java.support.UsbDeviceListenerList;

/**
 * The virtual USB root hub.
 *
 * @author <NAME> (<EMAIL>)
 */
public final class VirtualRootHub implements UsbHub,
    UsbPorts<Usb4JavaPort, Usb4JavaDevice>
{
    /** The manufacturer string. */
    private static final String MANUFACTURER = "usb4java";

    /** The manufacturer string. */
    private static final String PRODUCT = "virtual root hub";

    /** The serial number. */
    private static final String SERIAL_NUMBER = "1.0.0";

    /** The configurations. */
    private final List<UsbConfiguration> configurations =
            new ArrayList<UsbConfiguration>(1);

    /** The device descriptor. */
    private final UsbDeviceDescriptor descriptor =
        new SimpleUsbDeviceDescriptor(
            UsbConst.DESCRIPTOR_MIN_LENGTH_DEVICE,
            UsbConst.DESCRIPTOR_TYPE_DEVICE,
            (short) 0x101,
            UsbConst.HUB_CLASSCODE,
            (byte) 0,
            (byte) 0,
            (byte) 8,
            (short) 0xffff,
            (short) 0xffff,
            (byte) 0,
            (byte) 1,
            (byte) 2,
            (byte) 3,
            (byte) 1);

    /** The device listeners. */
    private final UsbDeviceListenerList listeners = new UsbDeviceListenerList();

    /** The hub ports. */
    private final Usb4JavaPorts ports = new Usb4JavaPorts(this);

    /**
{'fraction_non_alphanumeric': 0.10471204188481675, 'fraction_numerical': 0.014958863126402393, 'mean_word_length': 2.842911877394636, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7319296', 'n_tokens_mistral': 1249, 'n_tokens_neox': 1202, 'n_words': 297}