b72313618c426e4fc25416403c7985bd0619c02d,networkml/algorithms/base.py,BaseAlgorithm,parse_pcap_name,#Any#,80

Before Change


            pcap_match = pcap_re.match(base_pcap)
            if pcap_match:
                return pcap_match.group(1)
            return None
        // Not a Poseidon trace file, return basename as key.
        return base_pcap.split(".")[0]

    def publish_message(self, message, close=False):

After Change


        //// to the length of the network traffic capture. The flags aspect
        //// refers to an unknown characteristic.
        // TODO: tolerate tshark labels in the trace name, but do not parse them for now.
        pcap_key = None
        pcap_labels = None
        if base_pcap.startswith("trace_"):
            pcap_re = re.compile(r"^trace_([\da-f]+)_.+(client|server)-(.+).pcap$")
            pcap_match = pcap_re.match(base_pcap)
            if pcap_match:
                pcap_key = pcap_match.group(1)
                pcap_labels = pcap_match.group(3)
        else:
            // Not a Poseidon trace file, return basename as key.
            pcap_key = base_pcap.split(".")[0]
        return (pcap_key, pcap_labels)

    def publish_message(self, message, close=False):
        if self.common.use_rabbit:
            uid = os.getenv("id", "None")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: CyberReboot/NetworkML
Commit Name: b72313618c426e4fc25416403c7985bd0619c02d
Time: 2019-11-13
Author: josh@vandervecken.com
File Name: networkml/algorithms/base.py
Class Name: BaseAlgorithm
Method Name: parse_pcap_name


Project Name: CyberReboot/NetworkML
Commit Name: b72313618c426e4fc25416403c7985bd0619c02d
Time: 2019-11-13
Author: josh@vandervecken.com
File Name: networkml/algorithms/base.py
Class Name: BaseAlgorithm
Method Name: parse_pcap_name


Project Name: nltk/nltk
Commit Name: 4b21300999e11ba6f91952c05a936ccec0673e2e
Time: 2017-11-29
Author: lyyb46@gmail.com
File Name: nltk/tokenize/treebank.py
Class Name: TreebankWordTokenizer
Method Name: span_tokenize


Project Name: calico/basenji
Commit Name: 5ba781c281d60ad03d0c8088400a73802dd82d03
Time: 2018-05-11
Author: noreply@google.com
File Name: basenji/ops.py
Class Name:
Method Name: per_target_r2