<commit_before>package net.floodlightcontroller.topology;

import net.floodlightcontroller.core.web.serializers.DPIDSerializer;
import net.floodlightcontroller.core.web.serializers.UShortSerializer;

import org.codehaus.jackson.annotate.JsonProperty;
import org.codehaus.jackson.map.annotate.JsonSerialize;
import org.openflow.util.HexString;

/**
 * A NodePortTuple is similar to a SwitchPortTuple
 * but it only stores IDs instead of references
 * to the actual objects.
 * @author srini
 */
public class NodePortTuple {
    protected long nodeId; // switch DPID
    protected short portId; // switch port id

    /**
     * A copy constructor for NodePortTuple.
     *
     * @param other the object to copy the state from.
     */
    public NodePortTuple(NodePortTuple other) {
	this.nodeId = other.nodeId;
	this.portId = other.portId;
    }

    /**
     * Creates a NodePortTuple
     * @param nodeId The DPID of the switch
     * @param portId The port of the switch
     */
    public NodePortTuple(long nodeId, short portId) {
        this.nodeId = nodeId;
        this.portId = portId;
    }

    public NodePortTuple(long nodeId, int portId) {
        this.nodeId = nodeId;
        this.portId = (short) portId;
    }

    @JsonProperty("switch")
    @JsonSerialize(using=DPIDSerializer.class)
    public long getNodeId() {
        return nodeId;<commit_msg>Remove NodePortTuple copy constructor added by ONOS<commit_after>package net.floodlightcontroller.topology;

import net.floodlightcontroller.core.web.serializers.DPIDSerializer;
import net.floodlightcontroller.core.web.serializers.UShortSerializer;

import org.codehaus.jackson.annotate.JsonProperty;
import org.codehaus.jackson.map.annotate.JsonSerialize;
import org.openflow.util.HexString;

/**
 * A NodePortTuple is similar to a SwitchPortTuple
 * but it only stores IDs instead of references
 * to the actual objects.
 * @author srini
 */
public class NodePortTuple {
    protected long nodeId; // switch DPID
    protected short portId; // switch port id

    /**
     * Creates a NodePortTuple
     * @param nodeId The DPID of the switch
     * @param portId The port of the switch
     */
    public NodePortTuple(long nodeId, short portId) {
        this.nodeId = nodeId;
        this.portId = portId;
    }

    public NodePortTuple(long nodeId, int portId) {
        this.nodeId = nodeId;
        this.portId = (short) portId;
    }

    @JsonProperty("switch")
    @JsonSerialize(using=DPIDSerializer.class)
    public long getNodeId() {
        return nodeId;
{'fraction_non_alphanumeric': 0.08693941778127459, 'fraction_numerical': 0.0, 'mean_word_length': 3.2242524916943522, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4154120', 'n_tokens_mistral': 773, 'n_tokens_neox': 750, 'n_words': 206}