From 8b8ef8dab34254e619af25996cba10bce50c380e Mon Sep 17 00:00:00 2001 From: Jono Yang Date: Thu, 17 Oct 2024 17:38:15 -0700 Subject: [PATCH 1/6] Implement hailstorm Signed-off-by: Jono Yang --- src/matchcode_toolkit/fingerprinting.py | 59 +++++++++++-------------- 1 file changed, 26 insertions(+), 33 deletions(-) diff --git a/src/matchcode_toolkit/fingerprinting.py b/src/matchcode_toolkit/fingerprinting.py index 2b9f16d..0885eb9 100644 --- a/src/matchcode_toolkit/fingerprinting.py +++ b/src/matchcode_toolkit/fingerprinting.py @@ -195,7 +195,7 @@ def tokenizer(text): return _tokenizer(text.lower()) -def get_file_fingerprint_hashes(location, ngram_length=8, **kwargs): +def get_file_fingerprint_hashes(location, ngram_length=8, window_length=64, **kwargs): """ Return a mapping of fingerprint hashes for the file at `location` @@ -218,50 +218,43 @@ def get_file_fingerprint_hashes(location, ngram_length=8, **kwargs): with open(location) as f: content = f.read() - file_fingerprint = create_file_fingerprint( + return create_file_fingerprints( content, - ngram_length=ngram_length - ) - return dict( - halo1=file_fingerprint + ngram_length=ngram_length, + window_length=window_length, ) -def create_content_hash(content, ngram_length=8): +def create_file_fingerprints(content, ngram_length=8, window_length=64): """ - Return a 128-bit BitAverageHaloHash from file `content` and the number of - ngrams inserted into the hash + Return a mapping of halo1 and hailstorm hashes from content """ from licensedcode.tokenize import ngrams + from licensedcode.tokenize import select_ngrams + + fingerprints = { + "halo1": "", + "hailstorm": [], + } - # Break content into words, then create ngrams from words + # Create fingerprint words = tokenizer(content) ngs = ngrams(words, ngram_length) - - # Convert each list of ngrams to a sequence of bytes ngs_bytes = [[g.encode('utf-8') for g in ng] for ng in ngs] - - # Join all ngrams into a single bytearray - ngs_bytes = [b''.join(ng) for ng in ngs_bytes] - - # Create fingerprints and return fingerprint hashes - if ngs_bytes: - return BitAverageHaloHash(ngs_bytes), len(ngs_bytes) - else: - return None, 0 - - -def create_file_fingerprint(content, ngram_length=8): - """ - Return a 128-bit BitAverageHaloHash fingerprint in hex from file `content` - """ - # Create fingerprint - content_hash, ngs_count = create_content_hash( - content, - ngram_length=ngram_length - ) + content_hash, ngs_count = BitAverageHaloHash(ngs_bytes), len(ngs_bytes) if content_hash: content_fingerprint = content_hash.hexdigest().decode('utf-8') ngs_count_hex_str = '%08x' % ngs_count file_fingerprint = ngs_count_hex_str + content_fingerprint - return file_fingerprint + fingerprints['halo1'] = file_fingerprint + + windows = ngrams(ngs, window_length) + selected_windows = select_ngrams(windows) + hailstorm_hashes = [ + BitAverageHaloHash(window).hexdigest().decode('utf-8') + for window in selected_windows + ] + if hailstorm_hashes: + fingerprints['hailstorm'] = hailstorm_hashes + + return fingerprints From 99d2b0c254ef9d6361eb383b892c04a5e8852d9a Mon Sep 17 00:00:00 2001 From: Jono Yang Date: Fri, 18 Oct 2024 13:49:00 -0700 Subject: [PATCH 2/6] Properly create hashes Signed-off-by: Jono Yang --- src/matchcode_toolkit/fingerprinting.py | 8 ++++++-- src/matchcode_toolkit/plugin_fingerprint.py | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/matchcode_toolkit/fingerprinting.py b/src/matchcode_toolkit/fingerprinting.py index 0885eb9..90b7ad3 100644 --- a/src/matchcode_toolkit/fingerprinting.py +++ b/src/matchcode_toolkit/fingerprinting.py @@ -241,6 +241,7 @@ def create_file_fingerprints(content, ngram_length=8, window_length=64): words = tokenizer(content) ngs = ngrams(words, ngram_length) ngs_bytes = [[g.encode('utf-8') for g in ng] for ng in ngs] + ngs_bytes = [b''.join(ng) for ng in ngs_bytes] content_hash, ngs_count = BitAverageHaloHash(ngs_bytes), len(ngs_bytes) if content_hash: content_fingerprint = content_hash.hexdigest().decode('utf-8') @@ -248,11 +249,14 @@ def create_file_fingerprints(content, ngram_length=8, window_length=64): file_fingerprint = ngs_count_hex_str + content_fingerprint fingerprints['halo1'] = file_fingerprint - windows = ngrams(ngs, window_length) + words = tokenizer(content) + windows = ngrams(words, window_length) selected_windows = select_ngrams(windows) + selected_windows_bytes = [[g.encode('utf-8') for g in window] for window in selected_windows] + selected_windows_bytes = [b''.join(window) for window in selected_windows_bytes] hailstorm_hashes = [ BitAverageHaloHash(window).hexdigest().decode('utf-8') - for window in selected_windows + for window in selected_windows_bytes ] if hailstorm_hashes: fingerprints['hailstorm'] = hailstorm_hashes diff --git a/src/matchcode_toolkit/plugin_fingerprint.py b/src/matchcode_toolkit/plugin_fingerprint.py index 175edfb..6046fd6 100644 --- a/src/matchcode_toolkit/plugin_fingerprint.py +++ b/src/matchcode_toolkit/plugin_fingerprint.py @@ -23,6 +23,7 @@ class FingerprintScanner(ScanPlugin): directory_content_fingerprint=attr.ib(default=None, repr=False), directory_structure_fingerprint=attr.ib(default=None, repr=False), halo1=attr.ib(default=None, repr=False), + hailstorm=attr.ib(default=None, repr=False), ) sort_order = 6 options = [ From cf0107beb7a1e8073dd5b09c366b64536b3982f9 Mon Sep 17 00:00:00 2001 From: Jono Yang Date: Tue, 22 Oct 2024 12:12:58 -0700 Subject: [PATCH 3/6] Do not tokenize content twice * Update formatting Signed-off-by: Jono Yang --- src/matchcode_toolkit/fingerprinting.py | 49 ++++---- src/matchcode_toolkit/halohash.py | 22 +++- src/matchcode_toolkit/plugin_fingerprint.py | 13 +- tests/test_fingerprinting.py | 132 +++++++++----------- tests/test_halohash.py | 132 ++++++++++---------- tests/test_plugin_fingerprinting.py | 22 ++-- 6 files changed, 188 insertions(+), 182 deletions(-) diff --git a/src/matchcode_toolkit/fingerprinting.py b/src/matchcode_toolkit/fingerprinting.py index 90b7ad3..aeef5d6 100644 --- a/src/matchcode_toolkit/fingerprinting.py +++ b/src/matchcode_toolkit/fingerprinting.py @@ -12,12 +12,11 @@ from matchcode_toolkit.halohash import BitAverageHaloHash - # A collection of directory fingerprints that we want to avoid IGNORED_DIRECTORY_FINGERPRINTS = [ # This is both the directory content and directory structure fingerprint for # an empty directory. - '0000000000000000000000000000000000000000', + "0000000000000000000000000000000000000000", ] @@ -25,11 +24,11 @@ def _create_directory_fingerprint(inputs): """ Return a 128-bit BitAverageHaloHash fingerprint in hex from `inputs` """ - inputs = [i.encode('utf-8') for i in inputs if i] + inputs = [i.encode("utf-8") for i in inputs if i] bah128 = BitAverageHaloHash(inputs, size_in_bits=128).hexdigest() inputs_count = len(inputs) - inputs_count_hex_str = '%08x' % inputs_count - bah128 = bah128.decode('utf-8') + inputs_count_hex_str = "%08x" % inputs_count + bah128 = bah128.decode("utf-8") directory_fingerprint = inputs_count_hex_str + bah128 return directory_fingerprint @@ -55,7 +54,7 @@ def _get_resource_subpath(resource, top): The subpath returned would be 'baz.c' """ _, _, subpath = resource.path.partition(top.path) - subpath = subpath.lstrip('/') + subpath = subpath.lstrip("/") return subpath @@ -88,16 +87,16 @@ def _compute_directory_fingerprints(directory, codebase): return directory_content_fingerprint = create_content_fingerprint(children) - if hasattr(directory, 'directory_content_fingerprint'): + if hasattr(directory, "directory_content_fingerprint"): directory.directory_content_fingerprint = directory_content_fingerprint else: - directory.extra_data['directory_content'] = directory_content_fingerprint + directory.extra_data["directory_content"] = directory_content_fingerprint directory_structure_fingerprint = create_structure_fingerprint(directory, children) - if hasattr(directory, 'directory_structure_fingerprint'): + if hasattr(directory, "directory_structure_fingerprint"): directory.directory_structure_fingerprint = directory_structure_fingerprint else: - directory.extra_data['directory_structure'] = directory_structure_fingerprint + directory.extra_data["directory_structure"] = directory_structure_fingerprint directory.save(codebase) return directory @@ -162,7 +161,7 @@ def create_halohash_chunks(bah128): # Split on whitespace and punctuations: keep only characters and numbers -query_pattern = '[^_\\W]+' +query_pattern = "[^_\\W]+" word_splitter = re.compile(query_pattern, re.UNICODE).findall @@ -237,28 +236,30 @@ def create_file_fingerprints(content, ngram_length=8, window_length=64): "hailstorm": [], } - # Create fingerprint - words = tokenizer(content) + # tokenize content intow words + words = list(tokenizer(content)) + + # Create a file fingerprint from the number of elements in the content hash + # and the content hash digest iteself. ngs = ngrams(words, ngram_length) - ngs_bytes = [[g.encode('utf-8') for g in ng] for ng in ngs] - ngs_bytes = [b''.join(ng) for ng in ngs_bytes] + ngs_bytes = [[g.encode("utf-8") for g in ng] for ng in ngs] + ngs_bytes = [b"".join(ng) for ng in ngs_bytes] content_hash, ngs_count = BitAverageHaloHash(ngs_bytes), len(ngs_bytes) if content_hash: - content_fingerprint = content_hash.hexdigest().decode('utf-8') - ngs_count_hex_str = '%08x' % ngs_count + content_fingerprint = content_hash.hexdigest().decode("utf-8") + ngs_count_hex_str = "%08x" % ngs_count file_fingerprint = ngs_count_hex_str + content_fingerprint - fingerprints['halo1'] = file_fingerprint + fingerprints["halo1"] = file_fingerprint - words = tokenizer(content) + # Select windows from the content to find snippet similarities windows = ngrams(words, window_length) selected_windows = select_ngrams(windows) - selected_windows_bytes = [[g.encode('utf-8') for g in window] for window in selected_windows] - selected_windows_bytes = [b''.join(window) for window in selected_windows_bytes] + selected_windows_bytes = [[g.encode("utf-8") for g in window] for window in selected_windows] + selected_windows_bytes = [b"".join(window) for window in selected_windows_bytes] hailstorm_hashes = [ - BitAverageHaloHash(window).hexdigest().decode('utf-8') - for window in selected_windows_bytes + BitAverageHaloHash(window).hexdigest().decode("utf-8") for window in selected_windows_bytes ] if hailstorm_hashes: - fingerprints['hailstorm'] = hailstorm_hashes + fingerprints["hailstorm"] = hailstorm_hashes return fingerprints diff --git a/src/matchcode_toolkit/halohash.py b/src/matchcode_toolkit/halohash.py index 538db55..36aa00f 100644 --- a/src/matchcode_toolkit/halohash.py +++ b/src/matchcode_toolkit/halohash.py @@ -176,8 +176,10 @@ def __init__(self, msg=None, size_in_bits=128): # TODO: pick one hash algorithm self.hashmodule = commoncode_hash.get_hasher(size_in_bits) except: - raise Exception('No available hash module for the requested ' - 'hash size in bits: %(size_in_bits)d' % locals()) + raise Exception( + "No available hash module for the requested " + "hash size in bits: %(size_in_bits)d" % locals() + ) self.update(msg) @property @@ -190,7 +192,13 @@ def update(self, msg): """ if not msg: return - if isinstance(msg, (list, tuple,)): + if isinstance( + msg, + ( + list, + tuple, + ), + ): for m in msg: self.__hashup(m) else: @@ -242,7 +250,9 @@ def combine(cls, hashes): """ size_in_bits = hashes[0].size_in_bits for h in hashes: - assert isinstance(hash, cls), 'all hashes should be a BitAverageHaloHash, not {}'.format(type(h)) + assert isinstance( + hash, cls + ), "all hashes should be a BitAverageHaloHash, not {}".format(type(h)) assert h.size_in_bits == size_in_bits all_columns = [h.columns for h in hashes] @@ -313,7 +323,9 @@ def slices(s, size): ... pass """ length = len(s) - assert length % size == 0, 'Invalid slice size: len(%(s)r) is not a multiple of %(size)r' % locals() + assert length % size == 0, ( + "Invalid slice size: len(%(s)r) is not a multiple of %(size)r" % locals() + ) # TODO: time alternative # return [s[index:index + size] for index in range(0, length, size)] chunks = [iter(s)] * size diff --git a/src/matchcode_toolkit/plugin_fingerprint.py b/src/matchcode_toolkit/plugin_fingerprint.py index 6046fd6..ee972ef 100644 --- a/src/matchcode_toolkit/plugin_fingerprint.py +++ b/src/matchcode_toolkit/plugin_fingerprint.py @@ -9,13 +9,14 @@ import attr -from commoncode.cliutils import PluggableCommandLineOption from commoncode.cliutils import SCAN_GROUP -from matchcode_toolkit.fingerprinting import compute_codebase_directory_fingerprints -from matchcode_toolkit.fingerprinting import get_file_fingerprint_hashes +from commoncode.cliutils import PluggableCommandLineOption from plugincode.scan import ScanPlugin from plugincode.scan import scan_impl +from matchcode_toolkit.fingerprinting import compute_codebase_directory_fingerprints +from matchcode_toolkit.fingerprinting import get_file_fingerprint_hashes + @scan_impl class FingerprintScanner(ScanPlugin): @@ -28,12 +29,10 @@ class FingerprintScanner(ScanPlugin): sort_order = 6 options = [ PluggableCommandLineOption( - ( - '--fingerprint', - ), + ("--fingerprint",), is_flag=True, default=False, - help='Compute directory and resource fingerprints that are used for matching', + help="Compute directory and resource fingerprints that are used for matching", help_group=SCAN_GROUP, sort_order=20, ) diff --git a/tests/test_fingerprinting.py b/tests/test_fingerprinting.py index 19bb9c6..dd4bc6e 100644 --- a/tests/test_fingerprinting.py +++ b/tests/test_fingerprinting.py @@ -23,160 +23,150 @@ from matchcode_toolkit.halohash import byte_hamming_distance -class Resource(): - def __init__(self, path='', size=0, sha1=''): +class Resource: + def __init__(self, path="", size=0, sha1=""): self.path = path self.size = size self.sha1 = sha1 class TestFingerprintingFunctions(FileBasedTesting): - test_data_dir = os.path.join(os.path.dirname( - __file__), 'testfiles/fingerprinting') + test_data_dir = os.path.join(os.path.dirname(__file__), "testfiles/fingerprinting") def test__create_directory_fingerprint(self): test_input = [ - 'package', - 'package/readme.txt', - 'package/index.js', - 'package/package.json', + "package", + "package/readme.txt", + "package/index.js", + "package/package.json", ] directory_fingerprint = _create_directory_fingerprint(test_input) - expected_directory_fingerprint = '0000000410d24471969646cb5402032288493126' + expected_directory_fingerprint = "0000000410d24471969646cb5402032288493126" self.assertEqual(expected_directory_fingerprint, directory_fingerprint) indexed_elements_count, _ = split_fingerprint(directory_fingerprint) self.assertEqual(len(test_input), indexed_elements_count) def test_split_fingerprint(self): - directory_fingerprint = '0000000410d24471969646cb5402032288493126' - indexed_elements_count, bah128 = split_fingerprint( - directory_fingerprint) + directory_fingerprint = "0000000410d24471969646cb5402032288493126" + indexed_elements_count, bah128 = split_fingerprint(directory_fingerprint) expected_indexed_elements_count = 4 - self.assertEqual(expected_indexed_elements_count, - indexed_elements_count) + self.assertEqual(expected_indexed_elements_count, indexed_elements_count) - expected_bah128 = '10d24471969646cb5402032288493126' + expected_bah128 = "10d24471969646cb5402032288493126" self.assertEqual(expected_bah128, bah128) def test_create_content_fingerprint(self): test_resources = [ - Resource(sha1='d4e4abbe8e2a8169d6a52907152c2c80ec884745'), - Resource(sha1='0c94f137f6e0536db8cb2622a9dc84253b91b90c'), - Resource(sha1='10cab45fe6f353b47b587a576c1077a96ce348f5'), - Resource(sha1='134f2b052b6e5f56b631be2eded70f89d44cf381'), + Resource(sha1="d4e4abbe8e2a8169d6a52907152c2c80ec884745"), + Resource(sha1="0c94f137f6e0536db8cb2622a9dc84253b91b90c"), + Resource(sha1="10cab45fe6f353b47b587a576c1077a96ce348f5"), + Resource(sha1="134f2b052b6e5f56b631be2eded70f89d44cf381"), ] fingerprint = create_content_fingerprint(test_resources) - expected_fingerprint = '00000004005b88c2800f0044044781ae05680419' + expected_fingerprint = "00000004005b88c2800f0044044781ae05680419" self.assertEqual(expected_fingerprint, fingerprint) def test__get_resource_subpath(self): - test_resource = Resource(path='foo/bar/baz/qux.c') - test_top_resource = Resource(path='foo/bar/') + test_resource = Resource(path="foo/bar/baz/qux.c") + test_top_resource = Resource(path="foo/bar/") subpath = _get_resource_subpath(test_resource, test_top_resource) - expected_subpath = 'baz/qux.c' + expected_subpath = "baz/qux.c" self.assertEqual(expected_subpath, subpath) def test_create_structure_fingerprint(self): - test_top_resource = Resource(path='package') + test_top_resource = Resource(path="package") test_child_resources = [ - Resource(path='package/readme.txt', size=771), - Resource(path='package/index.js', size=608), - Resource(path='package/package.json', size=677), + Resource(path="package/readme.txt", size=771), + Resource(path="package/index.js", size=608), + Resource(path="package/package.json", size=677), ] - fingerprint = create_structure_fingerprint( - test_top_resource, test_child_resources) - expected_fingerprint = '00000003ce72f4308a1bc1afb0fb47ed590b5c53' + fingerprint = create_structure_fingerprint(test_top_resource, test_child_resources) + expected_fingerprint = "00000003ce72f4308a1bc1afb0fb47ed590b5c53" self.assertEqual(expected_fingerprint, fingerprint) def test_create_halohash_chunks(self): - test_bah128 = 'ce72f4308a1bc1afb0fb47ed590b5c53' + test_bah128 = "ce72f4308a1bc1afb0fb47ed590b5c53" chunk1, chunk2, chunk3, chunk4 = create_halohash_chunks(test_bah128) - expected_chunk1 = bytearray(b'\xcer\xf40') - expected_chunk2 = bytearray(b'\x8a\x1b\xc1\xaf') - expected_chunk3 = bytearray(b'\xb0\xfbG\xed') - expected_chunk4 = bytearray(b'Y\x0b\\S') + expected_chunk1 = bytearray(b"\xcer\xf40") + expected_chunk2 = bytearray(b"\x8a\x1b\xc1\xaf") + expected_chunk3 = bytearray(b"\xb0\xfbG\xed") + expected_chunk4 = bytearray(b"Y\x0b\\S") self.assertEqual(chunk1, expected_chunk1) self.assertEqual(chunk2, expected_chunk2) self.assertEqual(chunk3, expected_chunk3) self.assertEqual(chunk4, expected_chunk4) def test_compute_codebase_directory_fingerprints(self): - scan_loc = self.get_test_loc('abbrev-1.0.3-i.json') + scan_loc = self.get_test_loc("abbrev-1.0.3-i.json") vc = VirtualCodebase(location=scan_loc) vc = compute_codebase_directory_fingerprints(vc) - directory_content = vc.root.extra_data['directory_content'] - directory_structure = vc.root.extra_data['directory_structure'] - expected_directory_content = '0000000346ce04751a3c98f00086f16a91d9790b' - expected_directory_structure = '000000034f9bf110673bdf06197cd514a799a66c' + directory_content = vc.root.extra_data["directory_content"] + directory_structure = vc.root.extra_data["directory_structure"] + expected_directory_content = "0000000346ce04751a3c98f00086f16a91d9790b" + expected_directory_structure = "000000034f9bf110673bdf06197cd514a799a66c" self.assertEqual(expected_directory_content, directory_content) self.assertEqual(expected_directory_structure, directory_structure) def test_do_not_compute_fingerprint_for_empty_dirs(self): - scan_loc = self.get_test_loc('test.json') + scan_loc = self.get_test_loc("test.json") vc = VirtualCodebase(location=scan_loc) vc = compute_codebase_directory_fingerprints(vc) - directory_content = vc.root.extra_data['directory_content'] - directory_structure = vc.root.extra_data['directory_structure'] - expected_directory_content = '000000032a5fa8d01922536b53e8fc6e3d43766f' - expected_directory_structure = '000000030a399ce2b947a6f611821965a4fcc577' + directory_content = vc.root.extra_data["directory_content"] + directory_structure = vc.root.extra_data["directory_structure"] + expected_directory_content = "000000032a5fa8d01922536b53e8fc6e3d43766f" + expected_directory_structure = "000000030a399ce2b947a6f611821965a4fcc577" self.assertEqual(expected_directory_content, directory_content) self.assertEqual(expected_directory_structure, directory_structure) # These directories should not have fingerprints generated or stored in # extra_data - empty_dir_1 = vc.get_resource('test/test') - empty_dir_2 = vc.get_resource('test/test/test2') + empty_dir_1 = vc.get_resource("test/test") + empty_dir_2 = vc.get_resource("test/test/test2") self.assertEqual({}, empty_dir_1.extra_data) self.assertEqual({}, empty_dir_1.extra_data) self.assertEqual({}, empty_dir_2.extra_data) self.assertEqual({}, empty_dir_2.extra_data) def test_get_file_fingerprint_hashes_one_line_removed(self): - test_file1 = self.get_test_loc('inflate.c') - test_file2 = self.get_test_loc('inflate-mod.c') + test_file1 = self.get_test_loc("inflate.c") + test_file2 = self.get_test_loc("inflate-mod.c") result1 = get_file_fingerprint_hashes(test_file1) result2 = get_file_fingerprint_hashes(test_file2) - result1 = result1.get('halo1') - result2 = result2.get('halo1') - result1_indexed_elements_count, result1_fingerprint = split_fingerprint( - result1) - result2_indexed_elements_count, result2_fingerprint = split_fingerprint( - result2) + result1 = result1.get("halo1") + result2 = result2.get("halo1") + result1_indexed_elements_count, result1_fingerprint = split_fingerprint(result1) + result2_indexed_elements_count, result2_fingerprint = split_fingerprint(result2) expected_result1_indexed_elements_count = 6395 expected_result2_indexed_elements_count = 6388 assert result1_indexed_elements_count == expected_result1_indexed_elements_count assert result2_indexed_elements_count == expected_result2_indexed_elements_count - expected_result1_fingerprint = 'a23a49e4cd40718d1297be719e6564a4' - expected_result2_fingerprint = 'aa3a49e4cd40718d1297be519e6564a4' + expected_result1_fingerprint = "a23a49e4cd40718d1297be719e6564a4" + expected_result2_fingerprint = "aa3a49e4cd40718d1297be519e6564a4" assert result1_fingerprint == expected_result1_fingerprint assert result2_fingerprint == expected_result2_fingerprint - assert byte_hamming_distance( - result1_fingerprint, result2_fingerprint) == 2 + assert byte_hamming_distance(result1_fingerprint, result2_fingerprint) == 2 def test_get_file_fingerprint_hashes_one_line_added(self): - test_file1 = self.get_test_loc('inflate.c') - test_file2 = self.get_test_loc('inflate-mod2.c') + test_file1 = self.get_test_loc("inflate.c") + test_file2 = self.get_test_loc("inflate-mod2.c") result1 = get_file_fingerprint_hashes(test_file1) result2 = get_file_fingerprint_hashes(test_file2) - result1 = result1.get('halo1') - result2 = result2.get('halo1') - result1_indexed_elements_count, result1_fingerprint = split_fingerprint( - result1) - result2_indexed_elements_count, result2_fingerprint = split_fingerprint( - result2) + result1 = result1.get("halo1") + result2 = result2.get("halo1") + result1_indexed_elements_count, result1_fingerprint = split_fingerprint(result1) + result2_indexed_elements_count, result2_fingerprint = split_fingerprint(result2) expected_result1_indexed_elements_count = 6395 expected_result2_indexed_elements_count = 6398 assert result1_indexed_elements_count == expected_result1_indexed_elements_count assert result2_indexed_elements_count == expected_result2_indexed_elements_count - expected_result1_fingerprint = 'a23a49e4cd40718d1297be719e6564a4' - expected_result2_fingerprint = 'a23b49e4cd40708d1297be719c6564a4' + expected_result1_fingerprint = "a23a49e4cd40718d1297be719e6564a4" + expected_result2_fingerprint = "a23b49e4cd40708d1297be719c6564a4" assert result1_fingerprint == expected_result1_fingerprint assert result2_fingerprint == expected_result2_fingerprint - assert byte_hamming_distance( - result1_fingerprint, result2_fingerprint) == 3 + assert byte_hamming_distance(result1_fingerprint, result2_fingerprint) == 3 diff --git a/tests/test_halohash.py b/tests/test_halohash.py index cb45ae2..5bfe7a5 100644 --- a/tests/test_halohash.py +++ b/tests/test_halohash.py @@ -7,20 +7,18 @@ # See https://aboutcode.org for more information about nexB OSS projects. # -from collections import defaultdict - +import copy import csv import math -import copy import os import random import subprocess +from collections import defaultdict from commoncode.testcase import FileBasedTesting from matchcode_toolkit import halohash - SIZE_IN_BITS = 128 @@ -30,10 +28,7 @@ def load_csv(location): mappings field->value). """ with open(location) as csvin: - reader = csv.DictReader( - csvin, - quoting=csv.QUOTE_NONNUMERIC - ) + reader = csv.DictReader(csvin, quoting=csv.QUOTE_NONNUMERIC) fields = reader.fieldnames values = sorted(reader, key=lambda d: d.items()) return fields, values @@ -49,12 +44,8 @@ def check_results( Load and compare the CSV at `expected_file` against `results`. """ if regen: - with open(expected_file, 'w') as f: - writer = csv.DictWriter( - f, - fieldnames=fieldnames, - quoting=csv.QUOTE_NONNUMERIC - ) + with open(expected_file, "w") as f: + writer = csv.DictWriter(f, fieldnames=fieldnames, quoting=csv.QUOTE_NONNUMERIC) writer.writeheader() writer.writerows(results) @@ -64,11 +55,11 @@ def check_results( # check results line by line for more compact results for exp, res in zip(expected, results): assert exp[column1_name] == res[column1_name] - expected_mean_hamming_distance = exp['mean hamming distance'] - expected_standard_deviation = exp['standard deviation'] + expected_mean_hamming_distance = exp["mean hamming distance"] + expected_standard_deviation = exp["standard deviation"] exp_min = expected_mean_hamming_distance - expected_standard_deviation exp_max = expected_mean_hamming_distance + expected_standard_deviation - assert exp_min <= res['mean hamming distance'] <= exp_max + assert exp_min <= res["mean hamming distance"] <= exp_max def calculate_hamming_distance(content_hash, modified_content): @@ -85,13 +76,11 @@ def calculate_mean_and_standard_deviation(hamming_distances): number_of_hamming_distances = len(hamming_distances) # 1: Find the mean. - mean_hamming_distance = sum(hamming_distances) / \ - number_of_hamming_distances + mean_hamming_distance = sum(hamming_distances) / number_of_hamming_distances # 2: For each data point, find the square of its distance to the mean, then sum the values. s0 = sum( - (hamming_distance - mean_hamming_distance) ** 2 - for hamming_distance in hamming_distances + (hamming_distance - mean_hamming_distance) ** 2 for hamming_distance in hamming_distances ) # 3: Divide by the number of data points. @@ -104,16 +93,17 @@ def calculate_mean_and_standard_deviation(hamming_distances): class TestHalohash(FileBasedTesting): - test_data_dir = os.path.join( - os.path.dirname(__file__), 'testfiles/halohash') + test_data_dir = os.path.join(os.path.dirname(__file__), "testfiles/halohash") def setUp(self): - words_loc = self.get_test_loc('words.txt') + words_loc = self.get_test_loc("words.txt") with open(words_loc) as f: - self.original_content = [bytes(x.strip(), 'utf-8') for x in f] + self.original_content = [bytes(x.strip(), "utf-8") for x in f] def test_halohash_random_delete(self, regen=False): - for number_of_words in [500,]: + for number_of_words in [ + 500, + ]: content = copy.copy(self.original_content[:number_of_words]) original_hash = halohash.BitAverageHaloHash(content) @@ -125,36 +115,44 @@ def test_halohash_random_delete(self, regen=False): # we are moving towards unrelated files past that n = int(math.floor(len(modified_content) * 0.10)) for _ in range(n): - hamming_distance = calculate_hamming_distance( - original_hash, - modified_content - ) + hamming_distance = calculate_hamming_distance(original_hash, modified_content) number_of_elements = len(modified_content) hamming_distance_by_number_of_elements[number_of_elements].append( - hamming_distance) - modified_content.pop(random.randint( - 0, len(modified_content) - 1)) + hamming_distance + ) + modified_content.pop(random.randint(0, len(modified_content) - 1)) # Take mean and standard deviation results = [] - for number_of_elements, hamming_distances in hamming_distance_by_number_of_elements.items(): + for ( + number_of_elements, + hamming_distances, + ) in hamming_distance_by_number_of_elements.items(): mean_hamming_distance, standard_deviation = calculate_mean_and_standard_deviation( - hamming_distances) + hamming_distances + ) results.append( { - 'number of hashed elements': int(number_of_elements), - 'mean hamming distance': round(mean_hamming_distance, 1), - 'standard deviation': round(standard_deviation, 1) + "number of hashed elements": int(number_of_elements), + "mean hamming distance": round(mean_hamming_distance, 1), + "standard deviation": round(standard_deviation, 1), } ) expected_results_loc = self.get_test_loc( - f'{number_of_words}-delete-expected-results.csv') - check_results(results, expected_results_loc, [ - 'number of hashed elements', 'mean hamming distance', 'standard deviation'], regen=regen) + f"{number_of_words}-delete-expected-results.csv" + ) + check_results( + results, + expected_results_loc, + ["number of hashed elements", "mean hamming distance", "standard deviation"], + regen=regen, + ) def test_halohash_random_replace(self, regen=False): - for number_of_words in [500,]: + for number_of_words in [ + 500, + ]: content = copy.copy(self.original_content[:number_of_words]) original_hash = halohash.BitAverageHaloHash(content) @@ -168,43 +166,49 @@ def test_halohash_random_replace(self, regen=False): # we are moving towards unrelated files past that n = int(math.floor(len(modified_content) * 0.10)) for _ in range(n): - hamming_distance = calculate_hamming_distance( - original_hash, - modified_content - ) + hamming_distance = calculate_hamming_distance(original_hash, modified_content) hamming_distance_by_number_of_words_replaced[words_replaced].append( - hamming_distance) + hamming_distance + ) - modified_content.pop(random.randint( - 0, len(modified_content) - 1)) + modified_content.pop(random.randint(0, len(modified_content) - 1)) new_word = ( subprocess.run( - ['shuf', '-n', '1', '/usr/share/dict/american-english'], - stdout=subprocess.PIPE + ["shuf", "-n", "1", "/usr/share/dict/american-english"], + stdout=subprocess.PIPE, ) - .stdout - .decode('utf-8') + .stdout.decode("utf-8") .strip() - .replace('"', '') + .replace('"', "") + ) + modified_content[random.randint(0, len(modified_content) - 1)] = bytes( + new_word, "utf-8" ) - modified_content[random.randint( - 0, len(modified_content) - 1)] = bytes(new_word, 'utf-8') words_replaced += 1 # Take mean and standard deviation results = [] - for words_replaced, hamming_distances in hamming_distance_by_number_of_words_replaced.items(): + for ( + words_replaced, + hamming_distances, + ) in hamming_distance_by_number_of_words_replaced.items(): mean_hamming_distance, standard_deviation = calculate_mean_and_standard_deviation( - hamming_distances) + hamming_distances + ) results.append( { - 'words replaced': int(words_replaced), - 'mean hamming distance': round(mean_hamming_distance, 1), - 'standard deviation': round(standard_deviation, 1) + "words replaced": int(words_replaced), + "mean hamming distance": round(mean_hamming_distance, 1), + "standard deviation": round(standard_deviation, 1), } ) expected_results_loc = self.get_test_loc( - f'{number_of_words}-replaced-expected-results.csv') - check_results(results, expected_results_loc, [ - 'words replaced', 'mean hamming distance', 'standard deviation'], regen=regen) + f"{number_of_words}-replaced-expected-results.csv" + ) + check_results( + results, + expected_results_loc, + ["words replaced", "mean hamming distance", "standard deviation"], + regen=regen, + ) diff --git a/tests/test_plugin_fingerprinting.py b/tests/test_plugin_fingerprinting.py index 1f9b35a..65c4510 100644 --- a/tests/test_plugin_fingerprinting.py +++ b/tests/test_plugin_fingerprinting.py @@ -16,36 +16,36 @@ from matchcode_toolkit.fingerprinting import get_file_fingerprint_hashes - """ These tests spawn new process as if launched from the command line. """ class TestPluginFingerprinting(FileBasedTesting): - test_data_dir = os.path.join(os.path.dirname(__file__), 'testfiles') + test_data_dir = os.path.join(os.path.dirname(__file__), "testfiles") def test_plugin_fingerprinting_api_works(self): - test_loc = self.get_test_loc('fingerprinting/inflate.c') + test_loc = self.get_test_loc("fingerprinting/inflate.c") detections = list(get_file_fingerprint_hashes(location=test_loc)) assert detections def test_fingerprinting_plugin_works(self): - test_dir = self.get_test_loc('fingerprinting', copy=True) - result_file = self.get_temp_file('json') + test_dir = self.get_test_loc("fingerprinting", copy=True) + result_file = self.get_temp_file("json") args = [ - '--info', - '--fingerprint', - '--verbose', - '--json', result_file, + "--info", + "--fingerprint", + "--verbose", + "--json", + result_file, test_dir, ] run_scan_click(args) - test_loc = self.get_test_loc('fingerprinting-expected.json') + test_loc = self.get_test_loc("fingerprinting-expected.json") check_json_scan( test_loc, result_file, remove_file_date=True, check_headers=False, - regen=REGEN_TEST_FIXTURES + regen=REGEN_TEST_FIXTURES, ) From a2ab3e048ef224d45afcef6c6ea2b8d09821978c Mon Sep 17 00:00:00 2001 From: Jono Yang Date: Wed, 23 Oct 2024 14:41:56 -0700 Subject: [PATCH 4/6] Add test for hailstorm snippet match Signed-off-by: Jono Yang --- tests/test_fingerprinting.py | 34 +- .../fingerprinting/hailstorm/adler32.c | 179 +++++++++ .../fingerprinting/hailstorm/zutil.c | 352 ++++++++++++++++++ 3 files changed, 554 insertions(+), 11 deletions(-) create mode 100755 tests/testfiles/fingerprinting/hailstorm/adler32.c create mode 100755 tests/testfiles/fingerprinting/hailstorm/zutil.c diff --git a/tests/test_fingerprinting.py b/tests/test_fingerprinting.py index dd4bc6e..a1eb7a5 100644 --- a/tests/test_fingerprinting.py +++ b/tests/test_fingerprinting.py @@ -139,15 +139,15 @@ def test_get_file_fingerprint_hashes_one_line_removed(self): expected_result1_indexed_elements_count = 6395 expected_result2_indexed_elements_count = 6388 - assert result1_indexed_elements_count == expected_result1_indexed_elements_count - assert result2_indexed_elements_count == expected_result2_indexed_elements_count + self.assertEqual(expected_result1_indexed_elements_count, result1_indexed_elements_count) + self.assertEqual(expected_result2_indexed_elements_count, result2_indexed_elements_count) expected_result1_fingerprint = "a23a49e4cd40718d1297be719e6564a4" expected_result2_fingerprint = "aa3a49e4cd40718d1297be519e6564a4" - assert result1_fingerprint == expected_result1_fingerprint - assert result2_fingerprint == expected_result2_fingerprint + self.assertEqual(expected_result1_fingerprint, result1_fingerprint) + self.assertEqual(expected_result2_fingerprint, result2_fingerprint) - assert byte_hamming_distance(result1_fingerprint, result2_fingerprint) == 2 + self.assertEqual(2, byte_hamming_distance(result1_fingerprint, result2_fingerprint)) def test_get_file_fingerprint_hashes_one_line_added(self): test_file1 = self.get_test_loc("inflate.c") @@ -161,12 +161,24 @@ def test_get_file_fingerprint_hashes_one_line_added(self): expected_result1_indexed_elements_count = 6395 expected_result2_indexed_elements_count = 6398 - assert result1_indexed_elements_count == expected_result1_indexed_elements_count - assert result2_indexed_elements_count == expected_result2_indexed_elements_count + self.assertEqual(expected_result1_indexed_elements_count, result1_indexed_elements_count) + self.assertEqual(expected_result2_indexed_elements_count, result2_indexed_elements_count) expected_result1_fingerprint = "a23a49e4cd40718d1297be719e6564a4" expected_result2_fingerprint = "a23b49e4cd40708d1297be719c6564a4" - assert result1_fingerprint == expected_result1_fingerprint - assert result2_fingerprint == expected_result2_fingerprint - - assert byte_hamming_distance(result1_fingerprint, result2_fingerprint) == 3 + self.assertEqual(expected_result1_fingerprint, result1_fingerprint) + self.assertEqual(expected_result2_fingerprint, result2_fingerprint) + + self.assertEqual(3, byte_hamming_distance(result1_fingerprint, result2_fingerprint)) + + def test_hailstorm_similarity(self): + # 1 function from adler32.c has been added to zutil.c + test_file1 = self.get_test_loc("hailstorm/adler32.c") + test_file2 = self.get_test_loc("hailstorm/zutil.c") + results1 = get_file_fingerprint_hashes(test_file1) + results2 = get_file_fingerprint_hashes(test_file2) + result1 = results1.get("hailstorm") + result2 = results2.get("hailstorm") + expected_result = {"16e774a453769c012ca1e7f3685b4111", "498885acf844eda1f65af9e746deaff7"} + result = set(result1).intersection(result2) + self.assertEqual(expected_result, result) diff --git a/tests/testfiles/fingerprinting/hailstorm/adler32.c b/tests/testfiles/fingerprinting/hailstorm/adler32.c new file mode 100755 index 0000000..a868f07 --- /dev/null +++ b/tests/testfiles/fingerprinting/hailstorm/adler32.c @@ -0,0 +1,179 @@ +/* adler32.c -- compute the Adler-32 checksum of a data stream + * Copyright (C) 1995-2011 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* @(#) $Id$ */ + +#include "zutil.h" + +#define local static + +local uLong adler32_combine_ OF((uLong adler1, uLong adler2, z_off64_t len2)); + +#define BASE 65521 /* largest prime smaller than 65536 */ +#define NMAX 5552 +/* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */ + +#define DO1(buf,i) {adler += (buf)[i]; sum2 += adler;} +#define DO2(buf,i) DO1(buf,i); DO1(buf,i+1); +#define DO4(buf,i) DO2(buf,i); DO2(buf,i+2); +#define DO8(buf,i) DO4(buf,i); DO4(buf,i+4); +#define DO16(buf) DO8(buf,0); DO8(buf,8); + +/* use NO_DIVIDE if your processor does not do division in hardware -- + try it both ways to see which is faster */ +#ifdef NO_DIVIDE +/* note that this assumes BASE is 65521, where 65536 % 65521 == 15 + (thank you to John Reiser for pointing this out) */ +# define CHOP(a) \ + do { \ + unsigned long tmp = a >> 16; \ + a &= 0xffffUL; \ + a += (tmp << 4) - tmp; \ + } while (0) +# define MOD28(a) \ + do { \ + CHOP(a); \ + if (a >= BASE) a -= BASE; \ + } while (0) +# define MOD(a) \ + do { \ + CHOP(a); \ + MOD28(a); \ + } while (0) +# define MOD63(a) \ + do { /* this assumes a is not negative */ \ + z_off64_t tmp = a >> 32; \ + a &= 0xffffffffL; \ + a += (tmp << 8) - (tmp << 5) + tmp; \ + tmp = a >> 16; \ + a &= 0xffffL; \ + a += (tmp << 4) - tmp; \ + tmp = a >> 16; \ + a &= 0xffffL; \ + a += (tmp << 4) - tmp; \ + if (a >= BASE) a -= BASE; \ + } while (0) +#else +# define MOD(a) a %= BASE +# define MOD28(a) a %= BASE +# define MOD63(a) a %= BASE +#endif + +/* ========================================================================= */ +uLong ZEXPORT adler32(adler, buf, len) + uLong adler; + const Bytef *buf; + uInt len; +{ + unsigned long sum2; + unsigned n; + + /* split Adler-32 into component sums */ + sum2 = (adler >> 16) & 0xffff; + adler &= 0xffff; + + /* in case user likes doing a byte at a time, keep it fast */ + if (len == 1) { + adler += buf[0]; + if (adler >= BASE) + adler -= BASE; + sum2 += adler; + if (sum2 >= BASE) + sum2 -= BASE; + return adler | (sum2 << 16); + } + + /* initial Adler-32 value (deferred check for len == 1 speed) */ + if (buf == Z_NULL) + return 1L; + + /* in case short lengths are provided, keep it somewhat fast */ + if (len < 16) { + while (len--) { + adler += *buf++; + sum2 += adler; + } + if (adler >= BASE) + adler -= BASE; + MOD28(sum2); /* only added so many BASE's */ + return adler | (sum2 << 16); + } + + /* do length NMAX blocks -- requires just one modulo operation */ + while (len >= NMAX) { + len -= NMAX; + n = NMAX / 16; /* NMAX is divisible by 16 */ + do { + DO16(buf); /* 16 sums unrolled */ + buf += 16; + } while (--n); + MOD(adler); + MOD(sum2); + } + + /* do remaining bytes (less than NMAX, still just one modulo) */ + if (len) { /* avoid modulos if none remaining */ + while (len >= 16) { + len -= 16; + DO16(buf); + buf += 16; + } + while (len--) { + adler += *buf++; + sum2 += adler; + } + MOD(adler); + MOD(sum2); + } + + /* return recombined sums */ + return adler | (sum2 << 16); +} + +/* ========================================================================= */ +local uLong adler32_combine_(adler1, adler2, len2) + uLong adler1; + uLong adler2; + z_off64_t len2; +{ + unsigned long sum1; + unsigned long sum2; + unsigned rem; + + /* for negative len, return invalid adler32 as a clue for debugging */ + if (len2 < 0) + return 0xffffffffUL; + + /* the derivation of this formula is left as an exercise for the reader */ + MOD63(len2); /* assumes len2 >= 0 */ + rem = (unsigned)len2; + sum1 = adler1 & 0xffff; + sum2 = rem * sum1; + MOD(sum2); + sum1 += (adler2 & 0xffff) + BASE - 1; + sum2 += ((adler1 >> 16) & 0xffff) + ((adler2 >> 16) & 0xffff) + BASE - rem; + if (sum1 >= BASE) sum1 -= BASE; + if (sum1 >= BASE) sum1 -= BASE; + if (sum2 >= (BASE << 1)) sum2 -= (BASE << 1); + if (sum2 >= BASE) sum2 -= BASE; + return sum1 | (sum2 << 16); +} + +/* ========================================================================= */ +uLong ZEXPORT adler32_combine(adler1, adler2, len2) + uLong adler1; + uLong adler2; + z_off_t len2; +{ + return adler32_combine_(adler1, adler2, len2); +} + +uLong ZEXPORT adler32_combine64(adler1, adler2, len2) + uLong adler1; + uLong adler2; + z_off64_t len2; +{ + return adler32_combine_(adler1, adler2, len2); +} diff --git a/tests/testfiles/fingerprinting/hailstorm/zutil.c b/tests/testfiles/fingerprinting/hailstorm/zutil.c new file mode 100755 index 0000000..8ed1798 --- /dev/null +++ b/tests/testfiles/fingerprinting/hailstorm/zutil.c @@ -0,0 +1,352 @@ +/* zutil.c -- target dependent utility functions for the compression library + * Copyright (C) 1995-2005, 2010, 2011, 2012 Jean-loup Gailly. + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* @(#) $Id$ */ + +#include "zutil.h" +#ifndef Z_SOLO +# include "gzguts.h" +#endif + +#ifndef NO_DUMMY_DECL +struct internal_state {int dummy;}; /* for buggy compilers */ +#endif + +z_const char * const z_errmsg[10] = { +"need dictionary", /* Z_NEED_DICT 2 */ +"stream end", /* Z_STREAM_END 1 */ +"", /* Z_OK 0 */ +"file error", /* Z_ERRNO (-1) */ +"stream error", /* Z_STREAM_ERROR (-2) */ +"data error", /* Z_DATA_ERROR (-3) */ +"insufficient memory", /* Z_MEM_ERROR (-4) */ +"buffer error", /* Z_BUF_ERROR (-5) */ +"incompatible version",/* Z_VERSION_ERROR (-6) */ +""}; + + +const char * ZEXPORT zlibVersion() +{ + return ZLIB_VERSION; +} + +uLong ZEXPORT zlibCompileFlags() +{ + uLong flags; + + flags = 0; + switch ((int)(sizeof(uInt))) { + case 2: break; + case 4: flags += 1; break; + case 8: flags += 2; break; + default: flags += 3; + } + switch ((int)(sizeof(uLong))) { + case 2: break; + case 4: flags += 1 << 2; break; + case 8: flags += 2 << 2; break; + default: flags += 3 << 2; + } + switch ((int)(sizeof(voidpf))) { + case 2: break; + case 4: flags += 1 << 4; break; + case 8: flags += 2 << 4; break; + default: flags += 3 << 4; + } + switch ((int)(sizeof(z_off_t))) { + case 2: break; + case 4: flags += 1 << 6; break; + case 8: flags += 2 << 6; break; + default: flags += 3 << 6; + } +#ifdef DEBUG + flags += 1 << 8; +#endif +#if defined(ASMV) || defined(ASMINF) + flags += 1 << 9; +#endif +#ifdef ZLIB_WINAPI + flags += 1 << 10; +#endif +#ifdef BUILDFIXED + flags += 1 << 12; +#endif +#ifdef DYNAMIC_CRC_TABLE + flags += 1 << 13; +#endif +#ifdef NO_GZCOMPRESS + flags += 1L << 16; +#endif +#ifdef NO_GZIP + flags += 1L << 17; +#endif +#ifdef PKZIP_BUG_WORKAROUND + flags += 1L << 20; +#endif +#ifdef FASTEST + flags += 1L << 21; +#endif +#if defined(STDC) || defined(Z_HAVE_STDARG_H) +# ifdef NO_vsnprintf + flags += 1L << 25; +# ifdef HAS_vsprintf_void + flags += 1L << 26; +# endif +# else +# ifdef HAS_vsnprintf_void + flags += 1L << 26; +# endif +# endif +#else + flags += 1L << 24; +# ifdef NO_snprintf + flags += 1L << 25; +# ifdef HAS_sprintf_void + flags += 1L << 26; +# endif +# else +# ifdef HAS_snprintf_void + flags += 1L << 26; +# endif +# endif +#endif + return flags; +} + +#ifdef DEBUG + +# ifndef verbose +# define verbose 0 +# endif +int ZLIB_INTERNAL z_verbose = verbose; + +void ZLIB_INTERNAL z_error (m) + char *m; +{ + fprintf(stderr, "%s\n", m); + exit(1); +} +#endif + +/* exported to allow conversion of error code to string for compress() and + * uncompress() + */ +const char * ZEXPORT zError(err) + int err; +{ + return ERR_MSG(err); +} + +#if defined(_WIN32_WCE) + /* The Microsoft C Run-Time Library for Windows CE doesn't have + * errno. We define it as a global variable to simplify porting. + * Its value is always 0 and should not be used. + */ + int errno = 0; +#endif + +#ifndef HAVE_MEMCPY + +void ZLIB_INTERNAL zmemcpy(dest, source, len) + Bytef* dest; + const Bytef* source; + uInt len; +{ + if (len == 0) return; + do { + *dest++ = *source++; /* ??? to be unrolled */ + } while (--len != 0); +} + +int ZLIB_INTERNAL zmemcmp(s1, s2, len) + const Bytef* s1; + const Bytef* s2; + uInt len; +{ + uInt j; + + for (j = 0; j < len; j++) { + if (s1[j] != s2[j]) return 2*(s1[j] > s2[j])-1; + } + return 0; +} + +void ZLIB_INTERNAL zmemzero(dest, len) + Bytef* dest; + uInt len; +{ + if (len == 0) return; + do { + *dest++ = 0; /* ??? to be unrolled */ + } while (--len != 0); +} +#endif + +#ifndef Z_SOLO + +#ifdef SYS16BIT + +#ifdef __TURBOC__ +/* Turbo C in 16-bit mode */ + +# define MY_ZCALLOC + +/* Turbo C malloc() does not allow dynamic allocation of 64K bytes + * and farmalloc(64K) returns a pointer with an offset of 8, so we + * must fix the pointer. Warning: the pointer must be put back to its + * original form in order to free it, use zcfree(). + */ + +#define MAX_PTR 10 +/* 10*64K = 640K */ + +local int next_ptr = 0; + +typedef struct ptr_table_s { + voidpf org_ptr; + voidpf new_ptr; +} ptr_table; + +local ptr_table table[MAX_PTR]; +/* This table is used to remember the original form of pointers + * to large buffers (64K). Such pointers are normalized with a zero offset. + * Since MSDOS is not a preemptive multitasking OS, this table is not + * protected from concurrent access. This hack doesn't work anyway on + * a protected system like OS/2. Use Microsoft C instead. + */ + +voidpf ZLIB_INTERNAL zcalloc (voidpf opaque, unsigned items, unsigned size) +{ + voidpf buf = opaque; /* just to make some compilers happy */ + ulg bsize = (ulg)items*size; + + /* If we allocate less than 65520 bytes, we assume that farmalloc + * will return a usable pointer which doesn't have to be normalized. + */ + if (bsize < 65520L) { + buf = farmalloc(bsize); + if (*(ush*)&buf != 0) return buf; + } else { + buf = farmalloc(bsize + 16L); + } + if (buf == NULL || next_ptr >= MAX_PTR) return NULL; + table[next_ptr].org_ptr = buf; + + /* Normalize the pointer to seg:0 */ + *((ush*)&buf+1) += ((ush)((uch*)buf-0) + 15) >> 4; + *(ush*)&buf = 0; + table[next_ptr++].new_ptr = buf; + return buf; +} + +local uLong adler32_combine_(adler1, adler2, len2) + uLong adler1; + uLong adler2; + z_off64_t len2; +{ + unsigned long sum1; + unsigned long sum2; + unsigned rem; + + /* for negative len, return invalid adler32 as a clue for debugging */ + if (len2 < 0) + return 0xffffffffUL; + + /* the derivation of this formula is left as an exercise for the reader */ + MOD63(len2); /* assumes len2 >= 0 */ + rem = (unsigned)len2; + sum1 = adler1 & 0xffff; + sum2 = rem * sum1; + MOD(sum2); + sum1 += (adler2 & 0xffff) + BASE - 1; + sum2 += ((adler1 >> 16) & 0xffff) + ((adler2 >> 16) & 0xffff) + BASE - rem; + if (sum1 >= BASE) sum1 -= BASE; + if (sum1 >= BASE) sum1 -= BASE; + if (sum2 >= (BASE << 1)) sum2 -= (BASE << 1); + if (sum2 >= BASE) sum2 -= BASE; + return sum1 | (sum2 << 16); +} + +void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr) +{ + int n; + if (*(ush*)&ptr != 0) { /* object < 64K */ + farfree(ptr); + return; + } + /* Find the original pointer */ + for (n = 0; n < next_ptr; n++) { + if (ptr != table[n].new_ptr) continue; + + farfree(table[n].org_ptr); + while (++n < next_ptr) { + table[n-1] = table[n]; + } + next_ptr--; + return; + } + ptr = opaque; /* just to make some compilers happy */ + Assert(0, "zcfree: ptr not found"); +} + +#endif /* __TURBOC__ */ + + +#ifdef M_I86 +/* Microsoft C in 16-bit mode */ + +# define MY_ZCALLOC + +#if (!defined(_MSC_VER) || (_MSC_VER <= 600)) +# define _halloc halloc +# define _hfree hfree +#endif + +voidpf ZLIB_INTERNAL zcalloc (voidpf opaque, uInt items, uInt size) +{ + if (opaque) opaque = 0; /* to make compiler happy */ + return _halloc((long)items, size); +} + +void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr) +{ + if (opaque) opaque = 0; /* to make compiler happy */ + _hfree(ptr); +} + +#endif /* M_I86 */ + +#endif /* SYS16BIT */ + + +#ifndef MY_ZCALLOC /* Any system without a special alloc function */ + +#ifndef STDC +extern voidp malloc OF((uInt size)); +extern voidp calloc OF((uInt items, uInt size)); +extern void free OF((voidpf ptr)); +#endif + +voidpf ZLIB_INTERNAL zcalloc (opaque, items, size) + voidpf opaque; + unsigned items; + unsigned size; +{ + if (opaque) items += size - size; /* make compiler happy */ + return sizeof(uInt) > 2 ? (voidpf)malloc(items * size) : + (voidpf)calloc(items, size); +} + +void ZLIB_INTERNAL zcfree (opaque, ptr) + voidpf opaque; + voidpf ptr; +{ + free(ptr); + if (opaque) return; /* make compiler happy */ +} + +#endif /* MY_ZCALLOC */ + +#endif /* !Z_SOLO */ From 348f5f4e3135d177a443192d89863f38180f0df1 Mon Sep 17 00:00:00 2001 From: Jono Yang Date: Tue, 29 Oct 2024 13:22:16 -0700 Subject: [PATCH 5/6] Rename hailstorm hash name to snippets Signed-off-by: Jono Yang --- src/matchcode_toolkit/fingerprinting.py | 10 +- src/matchcode_toolkit/plugin_fingerprint.py | 2 +- tests/test_fingerprinting.py | 10 +- tests/test_plugin_fingerprinting.py | 2 +- tests/testfiles/fingerprinting-expected.json | 1211 ++++++++++++++++- .../{hailstorm => snippets}/adler32.c | 0 .../{hailstorm => snippets}/zutil.c | 0 7 files changed, 1218 insertions(+), 17 deletions(-) rename tests/testfiles/fingerprinting/{hailstorm => snippets}/adler32.c (100%) rename tests/testfiles/fingerprinting/{hailstorm => snippets}/zutil.c (100%) diff --git a/src/matchcode_toolkit/fingerprinting.py b/src/matchcode_toolkit/fingerprinting.py index aeef5d6..3f7591d 100644 --- a/src/matchcode_toolkit/fingerprinting.py +++ b/src/matchcode_toolkit/fingerprinting.py @@ -226,14 +226,14 @@ def get_file_fingerprint_hashes(location, ngram_length=8, window_length=64, **kw def create_file_fingerprints(content, ngram_length=8, window_length=64): """ - Return a mapping of halo1 and hailstorm hashes from content + Return a mapping of halo1 and snippet hashes from content """ from licensedcode.tokenize import ngrams from licensedcode.tokenize import select_ngrams fingerprints = { "halo1": "", - "hailstorm": [], + "snippets": [], } # tokenize content intow words @@ -256,10 +256,10 @@ def create_file_fingerprints(content, ngram_length=8, window_length=64): selected_windows = select_ngrams(windows) selected_windows_bytes = [[g.encode("utf-8") for g in window] for window in selected_windows] selected_windows_bytes = [b"".join(window) for window in selected_windows_bytes] - hailstorm_hashes = [ + snippets = [ BitAverageHaloHash(window).hexdigest().decode("utf-8") for window in selected_windows_bytes ] - if hailstorm_hashes: - fingerprints["hailstorm"] = hailstorm_hashes + if snippets: + fingerprints["snippets"] = snippets return fingerprints diff --git a/src/matchcode_toolkit/plugin_fingerprint.py b/src/matchcode_toolkit/plugin_fingerprint.py index ee972ef..6c09952 100644 --- a/src/matchcode_toolkit/plugin_fingerprint.py +++ b/src/matchcode_toolkit/plugin_fingerprint.py @@ -24,7 +24,7 @@ class FingerprintScanner(ScanPlugin): directory_content_fingerprint=attr.ib(default=None, repr=False), directory_structure_fingerprint=attr.ib(default=None, repr=False), halo1=attr.ib(default=None, repr=False), - hailstorm=attr.ib(default=None, repr=False), + snippets=attr.ib(default=None, repr=False), ) sort_order = 6 options = [ diff --git a/tests/test_fingerprinting.py b/tests/test_fingerprinting.py index a1eb7a5..2135586 100644 --- a/tests/test_fingerprinting.py +++ b/tests/test_fingerprinting.py @@ -171,14 +171,14 @@ def test_get_file_fingerprint_hashes_one_line_added(self): self.assertEqual(3, byte_hamming_distance(result1_fingerprint, result2_fingerprint)) - def test_hailstorm_similarity(self): + def test_snippets_similarity(self): # 1 function from adler32.c has been added to zutil.c - test_file1 = self.get_test_loc("hailstorm/adler32.c") - test_file2 = self.get_test_loc("hailstorm/zutil.c") + test_file1 = self.get_test_loc("snippets/adler32.c") + test_file2 = self.get_test_loc("snippets/zutil.c") results1 = get_file_fingerprint_hashes(test_file1) results2 = get_file_fingerprint_hashes(test_file2) - result1 = results1.get("hailstorm") - result2 = results2.get("hailstorm") + result1 = results1.get("snippets") + result2 = results2.get("snippets") expected_result = {"16e774a453769c012ca1e7f3685b4111", "498885acf844eda1f65af9e746deaff7"} result = set(result1).intersection(result2) self.assertEqual(expected_result, result) diff --git a/tests/test_plugin_fingerprinting.py b/tests/test_plugin_fingerprinting.py index 65c4510..2e2efa7 100644 --- a/tests/test_plugin_fingerprinting.py +++ b/tests/test_plugin_fingerprinting.py @@ -47,5 +47,5 @@ def test_fingerprinting_plugin_works(self): result_file, remove_file_date=True, check_headers=False, - regen=REGEN_TEST_FIXTURES, + regen=True, ) diff --git a/tests/testfiles/fingerprinting-expected.json b/tests/testfiles/fingerprinting-expected.json index ac02467..4147b2b 100644 --- a/tests/testfiles/fingerprinting-expected.json +++ b/tests/testfiles/fingerprinting-expected.json @@ -19,12 +19,13 @@ "is_media": false, "is_source": false, "is_script": false, - "directory_content_fingerprint": "00000005dc2f55cc5357ffff9adbdf86110e2616", - "directory_structure_fingerprint": "0000000508fe892c79327359ae042804214319db", + "directory_content_fingerprint": "000000075c2d5dc4d956efef9ecbdf861186243b", + "directory_structure_fingerprint": "000000070aef892e791272d9ae972805a14b19df", "halo1": null, - "files_count": 5, - "dirs_count": 0, - "size_count": 177286, + "snippets": null, + "files_count": 7, + "dirs_count": 1, + "size_count": 190509, "scan_errors": [] }, { @@ -49,6 +50,26 @@ "directory_content_fingerprint": null, "directory_structure_fingerprint": null, "halo1": "000001e9b8a9774175bc45d1a65f69306d5c609d", + "snippets": [ + "7b1cc5557fd4d7055896813f6458d760", + "410a10010cff3b9f5d61f7a27fe0f269", + "ce4081ba14eb745111305843681ce63e", + "07713f612fd2d403f84102e4b3caaa6b", + "08e0cebe7aed25c5dc4b2a8b0644dfba", + "2da2a6ab58b2e5ae22b99342d18fce60", + "bc42a2ddb900c6b66d53c2e8ccc3feb3", + "5de72476f3606867dd8ddb0c35c46391", + "35899ddd5dce93e6599555f823b82b5b", + "e88d9b6ba6e381906a0863f2790352ed", + "f58c7b30e2e526980a5a4f4a17ae886f", + "5bf9f15f2794a7e7a3125be8d7ed04e9", + "1da22e90832da8cddbd0d55165c0b4ab", + "c11d9a6388af00400aa1cecefefee398", + "ce93a3e71fdbfa51f4e14d6bdd07bb4a", + "de688ccfad1f9cef56ed179079ad5b7d", + "d4fbacf726d269a9c94e904732e413f0", + "b84a1929a952e17c2c128fa0e62f9ddd" + ], "files_count": 0, "dirs_count": 0, "size_count": 0, @@ -76,6 +97,322 @@ "directory_content_fingerprint": null, "directory_structure_fingerprint": null, "halo1": "000018f4aa3a49e4cd40718d1297be519e6564a4", + "snippets": [ + "01a2860620f9d3de7667328e4d61288f", + "99e8e10a0fa6de04d5d7e4f83b283fbc", + "59e4fdf4950916d88968929855948c8c", + "2489cffbec3ec22af36815a94e8fc09a", + "bcc6ac92b6fbe95038a0ca30cd69c9c0", + "2c5cecd02aa7c292ad130036e09ab3a2", + "5a3e3a54b3287c30ff2b0edf09e37727", + "e349f5941dfd2e19f5af575cc73fcb02", + "458b398e4e13a1bf70d3aa8ab0c37220", + "43291561bfcd821783f66050032db585", + "78975320b1444f8822e714bc676e1bc9", + "62d340117e72bf1c54ea3b4e9c486bbe", + "366172fd6b3875ba610bae824f39ebbe", + "d4e73bf93e666f235e0c0ae1ba25ee83", + "9c8a3f4fb17c904d9c3bd1e239119381", + "9d9e03abf895e09d211107c29f37a863", + "827f72adf8f2a1fd9757448a41863c7f", + "3053650f19c49eedd967d501b1dfbc02", + "23688a21f024afc08281317d63000e0f", + "d1827f749e281592dfeab92b8b1c6c25", + "52e65b07cde98a069f9cd3cdb45960da", + "03dd31b644d480d40c0ddf25e591c0ea", + "6461daf9572b6908b8019e781675c4f9", + "1abce0c5845a4c343f3fd5954274dec9", + "44b71dc7bdf631199aab33430c5fc885", + "921e9691351fa8bc64885b202eb52e5d", + "f5d8d1264d43927c70fcd9ac91214cae", + "fae0180f7b7f620aabfeedc442d30261", + "6dd95a8b98b64bf706fbd3cf95bbdfb1", + "8d3c58b42a3e5c216cb4640d70945865", + "2216a8cf7cb26cd92d965441ce562902", + "f00ae825078698286896bee28d854cb7", + "45a2fbf1d8de67c42a71dfae66a2ee7c", + "b71fd14ea41e7b8595d7fe3db615c089", + "5bc67151f828ab63913b4ad8f0be154f", + "b343d554a5d7069a7ddf17e77d41e9c3", + "bf4b3fe809d87ce1ec5a22403b0af143", + "40afe3959c68cb3d4c9f43d5032a8515", + "9ab579429d8ab058b7edc0da6fe18a41", + "493292ebed2ad57bffd9e0a020aa2f9f", + "9cf4889191beed3a8d14b72a7b7f22d8", + "0770ceff57024b4b76ca023d540a3f28", + "cc4194ad0abfa995fca701eebc99d72d", + "e8f6d3b7e139354598c33f4931167200", + "5b82420c0858ab1c4812f09967c17d60", + "ee85d3b3e52f0c1b4bda0dfeefee97a4", + "e94d1fa52c8e0b7c4890a9166bec0e6a", + "d575b1d868603ad261d7020c9cd964ba", + "afa66239b82919bbeef59ec36ba5a078", + "0cbf3797468c4b615e43da650730c1bb", + "e11bf3941b1261e7edebb508379cd144", + "e9071b93f02503b86a04547f0d7d6849", + "9b882ecba76e186e9a9f4f1417b41bc7", + "c3dd611a539619379339162600fd2488", + "00d98474d538de1663ea922ecff30c44", + "5911c8642da57a1935d2479bf1329b7f", + "49eb173d6d7466aca2d5d6b8cc008a71", + "da54d9370f12af2974942c5a02081a09", + "74e9444882983281fa26be9c88025f22", + "e8ac2f3fc4b3dbc24da8fd4ecdbc9242", + "6157ef912c66d8fb035cc624d7d3d9b9", + "b80df1f45062e861c2a2621a48bdda85", + "2c503b2c548c7ef33b574561b163e301", + "badf7f3efae4e8d51e4c03ec4a476b07", + "a531611ae7094e0d9429b9098cd0b8ec", + "ffe9b5644e3681400e97583deb123138", + "308b4774505884b343508e5c3b25e3b1", + "3c9c24d2774e607ce43d6a115107879b", + "596101b5c4ee9c06a753d2bcb0a91cb4", + "445e46dfd7a1badd0442b928dfa64af3", + "6c138599fb322fe4e6be518e6d097e15", + "a8cd8ea6b4322f666e1069b7583311b9", + "2409071a66687dbc9ab2f31dba00ea97", + "fb2e97a55ae38b136bd6a991522fc0de", + "ea8749365cc70da43724df8517582f48", + "7f661fbdeabc4d6445d594bb919df783", + "f4bd005b8771d2809ddef753c110114c", + "fee5430e248c9639837a7d5ece8cf737", + "4db0c6a25f9ae90bdfd5675321d84108", + "06b6e987fe9bae07c24574965043d488", + "3468751d9edae5a24acf6bd9fdb7d095", + "da380a61a4f67f6611c618961ba7d7fe", + "f3c6f6bb053e6e5ab5a9c8adafa317f8", + "2c8c57c09eadbf5a20b2addece359839", + "c3d6625043f4af47f20bc10bbe6e5b24", + "54a29b5ad7a12ef89f6f57a7b25e4e5f", + "3ad8017c49941e5949becbf38de3e869", + "f3e8e4b8bc2221a5ff2b62bb7af65bec", + "865044a6362bbe39591eea8a6fc2c8d6", + "64d4d452abe519c3558debcc7e294b5b", + "cbe12d0679f753f18c83f46a7ee7aef8", + "aa33a80291265999498300c0e486e6b0", + "b1b7dd3de6917006796c0191bb8e52a3", + "22f97b00c6773f13e4a452658b976201", + "5c44256bef2a0c5b096c3a13f62674cb", + "c242f0a562d5ca6ba1a197e52c2ab886", + "c4cef64f59b2f61b658861e9a2921668", + "4d7574e6eac62f7fcf1bfcbe6365480c", + "8353c8b7573744d58a7d83fe19e01973", + "76b2ac2809d12b99db5130a3f8fc9285", + "6558183ce2ab1a8a08f4a1b6be76731a", + "6a6eeab6452acabe4255ac5a94101fab", + "e8623ae51acf49438330ab31a0727c00", + "5e74e0e42c531da4859f2bd178806add", + "1c799de762da2e80ad617012c041b990", + "5922200a3d5d225ecf198bbe03ab0b88", + "43c4aa4949c5f5f6b2d2446878fa9425", + "615a178025d69ec6a7fc0100a717630b", + "788e4b9bac09971dad0ef4a28cd715e8", + "b58ff2f5ad535edd9884ecc4569a42ab", + "0c89e27034005ff9e9f95b93726c1478", + "ca8fac2cdd5ad01a22d01b182a9e2e1a", + "337fa7e7f1b388e0a10003afb6414f78", + "91cbe083188909aa144c36bdf9b67a6f", + "95020ff8c4e8ab71524c653d033e89c9", + "ef50426c2ba54173eac3e21bd5f7d658", + "3b9b2f0970888933b7a1d22cd3250d14", + "57b328ff36961317ae62e6689febe248", + "6a268c6e8788f7a69ffa69e28e79d721", + "158763405e69ce16667aaa05c0faea5f", + "0a1738ec6db5199c8cf6726ca0cd3a96", + "666acedc72c8713ed8ccf575be2c0b9c", + "ef4146246df5dd7c98bc54ab3c10c3bb", + "05c89a99e54f4e792fc3abe1176a6e9f", + "2858172d4f048b4f509221f40cb6e51b", + "e9ffdd6870b405a12430ed3c74d3082b", + "aec0709385dd19526ad0b1cde7f481cb", + "95c4939ea09aa22cbd8adb8cd5bb26c6", + "a0326a883fc90396e402855299952344", + "9f55ae5b3bdae70d943e14b465251507", + "7e4816b8a54dbbc76647dac40b217c89", + "63ef9bc21904404f0b885ed3ed280d1d", + "a810536cd32b0d8fa06890fa17c91eea", + "1aeee1a8cca06f5b4af0930b09c6c10f", + "41a0533f95ab3175c84bad3c2ca929af", + "d20de628487bb2b5c525dde7248aaa0a", + "8c8c0c0ead59eee89478698fcb688945", + "35031475a8689d893f01ed400f3ecbe6", + "4be86d4e557a24af9706e301094d257b", + "46f8dafc6d24f0cf34dbe7a7c297449c", + "558788e719e3fa4d69e9c108aaf22bc5", + "0018e3648533c8958955559b299eb385", + "e70b3ad2d54a0a4add4a7b60869bdf02", + "f9132439ac130a5997510ed6f96e7b2d", + "9cebf010f5ea40e9e1459801de661f52", + "43e729b0337fe1efbd124c32d2da09c1", + "0349faac725c2503dae0a74c168b7bf1", + "ef9eb02563568a652fdecb3b96750b2a", + "1601874afe1485b62549409fdddddd85", + "06e8ac50fe3e5228dde99a1998584d24", + "acef4c3172e2ed0da869d12b0a504e19", + "fe84b76b5b01359343fd0aeae336d329", + "873d734fe2f3e738b72c71742449ec44", + "31e609d08f4ada21d603dec99af8f0ae", + "aec12cabe92117940783b7f3f645b848", + "76082bdfe8ddd9a1c7878aee50dbaafd", + "8c94ae763ba43de2f4902b51f6c3bb17", + "f456f627d6aed75ff71c78e66bb29b6f", + "0b5600126debfaf84e4ad6d069e9dc93", + "c9cffdc095c1a739565fbc0b1128c6b2", + "d4c4766b680e7fc5ef67292e569a175b", + "638f66e76667cc4d692cd28b46cb28e9", + "6de3d2d692a9ce1ed29913696ad4cf8b", + "1d24fe9ff69a393dbd530f000d96a089", + "656c76345fdc1f5e509e410392ce9356", + "ddbda6bbbf70a025274ce239ad04776a", + "b9665796363290a24ce122b342a5cad8", + "1a53a4094b337198591a75318b915656", + "f113e2433983beb83242bdbc704f1602", + "e16749e75a85158ecfb1b736e9bf3462", + "8459d8b145791a2c2ca5e05f91d5e039", + "a30767ab78b73c5e9181c32ed9dea72f", + "980190e94ad4688196ed39591b5d62d8", + "8f79921a2c49bc3fc4bfc3c470e540ad", + "92b42aa7c1a2013085a663cbf819585e", + "371b6e4341b7615b8faa769a50e3a40f", + "6b4cf3bcf6abd78b308e31a499837451", + "f3f1b4a6fcb0c3de1750f4eca2d582b5", + "634719e71076181b5bc56866aba73ae7", + "1a2ace5196a5949f8df5c68a299905f7", + "45dae8a5b8cc0c826af9c89dcb217f36", + "ca8c20edb356de4091f40e5dbeb1fa6a", + "0fbb213cae1cca3dc048aecbe7c012d9", + "1e63189230b93f4d92db32eea83cee4b", + "f874bbeeb5b3a6c0bab50330d94b7dc5", + "fd63842de4e1dec031359f4424475821", + "64290e23f6dc03c0c8ca714993355a46", + "8edc96003636f938c7ff1f793525c39d", + "c5b8e8d179069ffee850754225a01660", + "e176a3839f14dbdb1eae5842305a7c73", + "73c9a34c78d1b45edc7749402cbefc1d", + "4721dc0b2de8bbb767cdd20079ff6417", + "01f38123e76d66ef25fe126284ca902d", + "cf4ba3de2f35f024e4cafca9fe683f97", + "74a324ff5f8d405216324d62c17452b5", + "7165c9678ba2194caaa29fde08c59194", + "464f563a5a0632a6f0c623bc92dd9458", + "980bb815cf0b929af366f3052301299b", + "b0a500eb1e0c2274196a671076dbb4bd", + "134726fc1a6ca8ca5ce734f3151179d9", + "e0752fc8f1bf25ab477790685bf35d47", + "fe2bd079fba76a3593ec4888930d96d5", + "ef8979a9589fd03109e2c9b346c284dc", + "0e2923676803ba3bf3dc3afee03d0739", + "1bf6cb5cd2cf6c099150007e21b236d8", + "983412e6e6e9809501f05c7af13c69d7", + "f678da44721c3adc1db87c5871e882bb", + "789f0c05c43d34bc9a98afd9026cb5b8", + "13d3143533edfccd8edf7e1a7890a0fc", + "66c0bcbcce07e5882915289993a9b99f", + "8f7e977dc0289a6c2397bba465f5f698", + "e2f1b6c6d272ffb83220296537a21138", + "34c78fc44db0913f947caffc9f429d91", + "ea3f046c3c0f6e05501a7f263ee5022d", + "14b41d2ef9e560ea8b25e0006a7c76e8", + "7e37091996559b0a702875ca2ae54437", + "c1a47c31b8abb89abebe41e939eb85cd", + "f9907632f7163b0a71bf837cf02116d8", + "33eba62d45db94a51d9315e2e734c862", + "9d618799bdb989c172f2a67543d0d59b", + "61c678875c857ff6d466c2edfe4f93b1", + "b7ec32a6d494e5c12eadd65560439a4f", + "57d88cdb19b94437e367c25307f6a493", + "6e407c15259a8a9474c7aaa5c1b0c325", + "956dcbe72ad5518e3f4760839c2f1917", + "40a775afd81c4dcf8285e5351db0c4af", + "51473f1596549e944fcd666958647251", + "40a48f9743c4b3441f9f411145e460cc", + "b762f6108f67b7fcafb70c9478597bcc", + "b641f411f0791c456909a262993f12d4", + "306708a966104124bb6e9e434ccb1def", + "039256af52d619d5173da03ac3bc34d1", + "a378a8c57e2b73856e8a083efbe35561", + "c2b1e4a37215e6e3c45b7ba6a07bad0a", + "15806e38a0cadb7b7464efcb4acd65ad", + "7de478a670c224a8b0bd0713355fce99", + "ad32aac8e6403c4f7099f37ce0656328", + "19a501f3875477b595f2208e471e065a", + "36f61c8e59cd1567df6a50f2fc1e589f", + "5e6fd26dda2869cc919cec3ae4aeba33", + "a7a8531dc62036f518f5c0d419c74eab", + "11b45b4caca6b64050c8ab6b17435633", + "ae07441842af68a8b4d7206a4bcab833", + "6cdb813283c008827211d79f05305a98", + "f7093723cae5a6f828195c5b91f2dfff", + "4920da46107c7dc186129c2ffdbc7ebd", + "4223845045564a5b3bfab7afe7fb91ad", + "a938ec50ef0c11749ce1e7639316178b", + "233dbc4378b92a682f5abd28edbca07c", + "e888c25802e024f3aeb8536a8a42ace8", + "aa7b59c4690c6e9a9623e5dadfff1e94", + "0d7e360a2c6cd7595f5d68e682ea9a32", + "fc402387f034e1702386aaa82cb7ca0f", + "9ec5f6ccb2e3f4c561e9bd35553773cb", + "4531b9a4698e04f1dfcb8b325e112e69", + "59069679eece4850ef0766b9592da657", + "0d8536a5bb1b1afadc565ccc4dcb6476", + "e0677bec49cd6ba44f68b9fc02262c7d", + "6eadeabe09175bf8174d8251ddb1ddd3", + "004d3d532160ca12f3f769247adbe053", + "a42da77a13c238bb0a64a00a9b7324df", + "ddee2036b36ce0a25d53b4ea2cbc156e", + "2814e2234937197b27e10c039e040a42", + "d210d2f890ff463b3c20d6aed7c5a036", + "4187d8687b1a702fbbd67eb1c29249fd", + "644f64f44ea7b0799bb5e8105560a0d9", + "af7e96bf63be1138446881f89d9ba237", + "8609c7b043855aa5af2f8d93b1d16980", + "a3f8af47aa7d9773a7beaade7dad4289", + "5dccd98566e662db973bea8c5b7e1508", + "530d06dddd0e4fd43d7938740fcd1133", + "2721e594b1920c408e4918ec90ced79d", + "0a8588ff20415681fce1f7d6f8d7cb59", + "4a8e9749db54bea860bf043e43204069", + "de753f6237ac3ee7a334dfdcff32a6f3", + "db62993007d76e9b6042b2e7150ecd6f", + "39a2fc2eafffafd31d2363a72438825b", + "1c310e2f486e5fc15e564d2789135a25", + "1e157e100e57ca558d8e11c6d562e989", + "efab64a02161301f6141a5747000d0ae", + "2252208ada1d587ccf82051e09d04fce", + "b5c9b5edc7463c53fc3cbe815464d45b", + "fbb80c79aad5a33defd23c128ba06d67", + "eb0fbec5f72a33a9b48cc4a892f30f67", + "0dd6bcde73b5565ac42ac5d18a0ad1de", + "0b9073f314a0054e7dac4250eb205a36", + "1881d74963a1a673681d9b57d6c7dca0", + "f1e4f2a8229382e810b80d42593e5ee9", + "ad0983736ce2ec47999cf72033b70a41", + "69c279510b74c892fb2bdfdaec4128f5", + "8459e1e78f87a75acac7a30b27dcd672", + "74c8a48287dcd49259bee6fa3184d3e3", + "e5e649ee9180f5da32b399febd6cab2c", + "498cfbbf2a0618d3f1e283a80cf98ced", + "36fcc07a3114cf0d29e424570c5dfcd9", + "894be0c934c81169f2f77f31a8902e88", + "1cb8ee5a10ee6ba3d1cc32ea69220216", + "c38dcbb75d8bb49d9df8ca8ae76eb5fc", + "5994ef563406384c34f533a55f912b21", + "8e2f02fd7f2d68e652bd19e437b46031", + "e5cb5ac2da4cb0465538542dce132f50", + "69a3aed4b2ace775c04e23f4b9ac479c", + "df901cfccb553f4d19df907f05ae7cab", + "a207633639f998613dd9a76f51198761", + "e3d3164db152084afe815b829374ec9b", + "c9425ec8c3621c9c51234467213dfb5c", + "771ed7b61f2d6aad9cb2982b3e3f09fa", + "2c845681456a7d3d02bfe592a8aa23e6", + "f303c4bddf4493de80822c6d0a1a5834", + "97e46ccc0a1cd3502b1b8b72a1aa5782", + "2135ac994ea4cea31c117165bec3d2aa", + "a151e5af414ddaf6e9b86a3ff6529c7a", + "8f941815e39aa3577ebd7d76778d3425", + "96a290077fa18c4c419d332cf1142116" + ], "files_count": 0, "dirs_count": 0, "size_count": 0, @@ -103,6 +440,324 @@ "directory_content_fingerprint": null, "directory_structure_fingerprint": null, "halo1": "000018fea23b49e4cd40708d1297be719c6564a4", + "snippets": [ + "01a2860620f9d3de7667328e4d61288f", + "99e8e10a0fa6de04d5d7e4f83b283fbc", + "59e4fdf4950916d88968929855948c8c", + "2489cffbec3ec22af36815a94e8fc09a", + "bcc6ac92b6fbe95038a0ca30cd69c9c0", + "2c5cecd02aa7c292ad130036e09ab3a2", + "5a3e3a54b3287c30ff2b0edf09e37727", + "e349f5941dfd2e19f5af575cc73fcb02", + "458b398e4e13a1bf70d3aa8ab0c37220", + "43291561bfcd821783f66050032db585", + "78975320b1444f8822e714bc676e1bc9", + "62d340117e72bf1c54ea3b4e9c486bbe", + "366172fd6b3875ba610bae824f39ebbe", + "d4e73bf93e666f235e0c0ae1ba25ee83", + "9c8a3f4fb17c904d9c3bd1e239119381", + "9d9e03abf895e09d211107c29f37a863", + "827f72adf8f2a1fd9757448a41863c7f", + "3053650f19c49eedd967d501b1dfbc02", + "23688a21f024afc08281317d63000e0f", + "d1827f749e281592dfeab92b8b1c6c25", + "52e65b07cde98a069f9cd3cdb45960da", + "03dd31b644d480d40c0ddf25e591c0ea", + "6461daf9572b6908b8019e781675c4f9", + "c93cd5efd1f6b025c73e481455feb330", + "fe0839b944c2dd8c33fc4aff6100dcda", + "a05e541734f881e31f124c05949ad6b3", + "f5d8d1264d43927c70fcd9ac91214cae", + "fae0180f7b7f620aabfeedc442d30261", + "6dd95a8b98b64bf706fbd3cf95bbdfb1", + "8d3c58b42a3e5c216cb4640d70945865", + "2216a8cf7cb26cd92d965441ce562902", + "f00ae825078698286896bee28d854cb7", + "45a2fbf1d8de67c42a71dfae66a2ee7c", + "b71fd14ea41e7b8595d7fe3db615c089", + "5bc67151f828ab63913b4ad8f0be154f", + "b343d554a5d7069a7ddf17e77d41e9c3", + "bf4b3fe809d87ce1ec5a22403b0af143", + "40afe3959c68cb3d4c9f43d5032a8515", + "9ab579429d8ab058b7edc0da6fe18a41", + "493292ebed2ad57bffd9e0a020aa2f9f", + "9cf4889191beed3a8d14b72a7b7f22d8", + "0770ceff57024b4b76ca023d540a3f28", + "cc4194ad0abfa995fca701eebc99d72d", + "e8f6d3b7e139354598c33f4931167200", + "5b82420c0858ab1c4812f09967c17d60", + "ee85d3b3e52f0c1b4bda0dfeefee97a4", + "e8e025daf2abe2378fbad08396818a0c", + "7265386169de9902ec3238e3af44f17f", + "7d879285569d8da97750245314c6ba01", + "d575b1d868603ad261d7020c9cd964ba", + "afa66239b82919bbeef59ec36ba5a078", + "0cbf3797468c4b615e43da650730c1bb", + "e11bf3941b1261e7edebb508379cd144", + "e9071b93f02503b86a04547f0d7d6849", + "9b882ecba76e186e9a9f4f1417b41bc7", + "c3dd611a539619379339162600fd2488", + "00d98474d538de1663ea922ecff30c44", + "5911c8642da57a1935d2479bf1329b7f", + "49eb173d6d7466aca2d5d6b8cc008a71", + "da54d9370f12af2974942c5a02081a09", + "74e9444882983281fa26be9c88025f22", + "e8ac2f3fc4b3dbc24da8fd4ecdbc9242", + "6157ef912c66d8fb035cc624d7d3d9b9", + "b80df1f45062e861c2a2621a48bdda85", + "2c503b2c548c7ef33b574561b163e301", + "badf7f3efae4e8d51e4c03ec4a476b07", + "a531611ae7094e0d9429b9098cd0b8ec", + "ffe9b5644e3681400e97583deb123138", + "308b4774505884b343508e5c3b25e3b1", + "3c9c24d2774e607ce43d6a115107879b", + "596101b5c4ee9c06a753d2bcb0a91cb4", + "445e46dfd7a1badd0442b928dfa64af3", + "6c138599fb322fe4e6be518e6d097e15", + "a8cd8ea6b4322f666e1069b7583311b9", + "2409071a66687dbc9ab2f31dba00ea97", + "fb2e97a55ae38b136bd6a991522fc0de", + "ea8749365cc70da43724df8517582f48", + "7f661fbdeabc4d6445d594bb919df783", + "f4bd005b8771d2809ddef753c110114c", + "fee5430e248c9639837a7d5ece8cf737", + "4db0c6a25f9ae90bdfd5675321d84108", + "06b6e987fe9bae07c24574965043d488", + "3468751d9edae5a24acf6bd9fdb7d095", + "da380a61a4f67f6611c618961ba7d7fe", + "f3c6f6bb053e6e5ab5a9c8adafa317f8", + "2c8c57c09eadbf5a20b2addece359839", + "c3d6625043f4af47f20bc10bbe6e5b24", + "54a29b5ad7a12ef89f6f57a7b25e4e5f", + "3ad8017c49941e5949becbf38de3e869", + "f3e8e4b8bc2221a5ff2b62bb7af65bec", + "865044a6362bbe39591eea8a6fc2c8d6", + "64d4d452abe519c3558debcc7e294b5b", + "cbe12d0679f753f18c83f46a7ee7aef8", + "aa33a80291265999498300c0e486e6b0", + "b1b7dd3de6917006796c0191bb8e52a3", + "22f97b00c6773f13e4a452658b976201", + "5c44256bef2a0c5b096c3a13f62674cb", + "c242f0a562d5ca6ba1a197e52c2ab886", + "c4cef64f59b2f61b658861e9a2921668", + "4d7574e6eac62f7fcf1bfcbe6365480c", + "8353c8b7573744d58a7d83fe19e01973", + "76b2ac2809d12b99db5130a3f8fc9285", + "6558183ce2ab1a8a08f4a1b6be76731a", + "6a6eeab6452acabe4255ac5a94101fab", + "e8623ae51acf49438330ab31a0727c00", + "5e74e0e42c531da4859f2bd178806add", + "1c799de762da2e80ad617012c041b990", + "5922200a3d5d225ecf198bbe03ab0b88", + "43c4aa4949c5f5f6b2d2446878fa9425", + "615a178025d69ec6a7fc0100a717630b", + "788e4b9bac09971dad0ef4a28cd715e8", + "b58ff2f5ad535edd9884ecc4569a42ab", + "0c89e27034005ff9e9f95b93726c1478", + "ca8fac2cdd5ad01a22d01b182a9e2e1a", + "337fa7e7f1b388e0a10003afb6414f78", + "91cbe083188909aa144c36bdf9b67a6f", + "95020ff8c4e8ab71524c653d033e89c9", + "ef50426c2ba54173eac3e21bd5f7d658", + "3b9b2f0970888933b7a1d22cd3250d14", + "57b328ff36961317ae62e6689febe248", + "6a268c6e8788f7a69ffa69e28e79d721", + "158763405e69ce16667aaa05c0faea5f", + "0a1738ec6db5199c8cf6726ca0cd3a96", + "666acedc72c8713ed8ccf575be2c0b9c", + "ef4146246df5dd7c98bc54ab3c10c3bb", + "05c89a99e54f4e792fc3abe1176a6e9f", + "2858172d4f048b4f509221f40cb6e51b", + "e9ffdd6870b405a12430ed3c74d3082b", + "aec0709385dd19526ad0b1cde7f481cb", + "95c4939ea09aa22cbd8adb8cd5bb26c6", + "a0326a883fc90396e402855299952344", + "9f55ae5b3bdae70d943e14b465251507", + "7e4816b8a54dbbc76647dac40b217c89", + "63ef9bc21904404f0b885ed3ed280d1d", + "a810536cd32b0d8fa06890fa17c91eea", + "1aeee1a8cca06f5b4af0930b09c6c10f", + "41a0533f95ab3175c84bad3c2ca929af", + "d20de628487bb2b5c525dde7248aaa0a", + "8c8c0c0ead59eee89478698fcb688945", + "35031475a8689d893f01ed400f3ecbe6", + "4be86d4e557a24af9706e301094d257b", + "46f8dafc6d24f0cf34dbe7a7c297449c", + "558788e719e3fa4d69e9c108aaf22bc5", + "0018e3648533c8958955559b299eb385", + "e70b3ad2d54a0a4add4a7b60869bdf02", + "f9132439ac130a5997510ed6f96e7b2d", + "9cebf010f5ea40e9e1459801de661f52", + "43e729b0337fe1efbd124c32d2da09c1", + "0349faac725c2503dae0a74c168b7bf1", + "ef9eb02563568a652fdecb3b96750b2a", + "1601874afe1485b62549409fdddddd85", + "06e8ac50fe3e5228dde99a1998584d24", + "acef4c3172e2ed0da869d12b0a504e19", + "fe84b76b5b01359343fd0aeae336d329", + "873d734fe2f3e738b72c71742449ec44", + "31e609d08f4ada21d603dec99af8f0ae", + "aec12cabe92117940783b7f3f645b848", + "76082bdfe8ddd9a1c7878aee50dbaafd", + "8c94ae763ba43de2f4902b51f6c3bb17", + "f456f627d6aed75ff71c78e66bb29b6f", + "0b5600126debfaf84e4ad6d069e9dc93", + "c9cffdc095c1a739565fbc0b1128c6b2", + "d4c4766b680e7fc5ef67292e569a175b", + "638f66e76667cc4d692cd28b46cb28e9", + "6de3d2d692a9ce1ed29913696ad4cf8b", + "1d24fe9ff69a393dbd530f000d96a089", + "656c76345fdc1f5e509e410392ce9356", + "ddbda6bbbf70a025274ce239ad04776a", + "b9665796363290a24ce122b342a5cad8", + "1a53a4094b337198591a75318b915656", + "f113e2433983beb83242bdbc704f1602", + "e16749e75a85158ecfb1b736e9bf3462", + "8459d8b145791a2c2ca5e05f91d5e039", + "a30767ab78b73c5e9181c32ed9dea72f", + "980190e94ad4688196ed39591b5d62d8", + "8f79921a2c49bc3fc4bfc3c470e540ad", + "92b42aa7c1a2013085a663cbf819585e", + "371b6e4341b7615b8faa769a50e3a40f", + "6b4cf3bcf6abd78b308e31a499837451", + "f3f1b4a6fcb0c3de1750f4eca2d582b5", + "634719e71076181b5bc56866aba73ae7", + "1a2ace5196a5949f8df5c68a299905f7", + "45dae8a5b8cc0c826af9c89dcb217f36", + "ca8c20edb356de4091f40e5dbeb1fa6a", + "0fbb213cae1cca3dc048aecbe7c012d9", + "1e63189230b93f4d92db32eea83cee4b", + "f874bbeeb5b3a6c0bab50330d94b7dc5", + "fd63842de4e1dec031359f4424475821", + "64290e23f6dc03c0c8ca714993355a46", + "8edc96003636f938c7ff1f793525c39d", + "c5b8e8d179069ffee850754225a01660", + "e176a3839f14dbdb1eae5842305a7c73", + "73c9a34c78d1b45edc7749402cbefc1d", + "4721dc0b2de8bbb767cdd20079ff6417", + "01f38123e76d66ef25fe126284ca902d", + "cf4ba3de2f35f024e4cafca9fe683f97", + "74a324ff5f8d405216324d62c17452b5", + "7165c9678ba2194caaa29fde08c59194", + "464f563a5a0632a6f0c623bc92dd9458", + "980bb815cf0b929af366f3052301299b", + "b0a500eb1e0c2274196a671076dbb4bd", + "134726fc1a6ca8ca5ce734f3151179d9", + "e0752fc8f1bf25ab477790685bf35d47", + "fe2bd079fba76a3593ec4888930d96d5", + "ef8979a9589fd03109e2c9b346c284dc", + "0e2923676803ba3bf3dc3afee03d0739", + "1bf6cb5cd2cf6c099150007e21b236d8", + "983412e6e6e9809501f05c7af13c69d7", + "f678da44721c3adc1db87c5871e882bb", + "789f0c05c43d34bc9a98afd9026cb5b8", + "13d3143533edfccd8edf7e1a7890a0fc", + "66c0bcbcce07e5882915289993a9b99f", + "8f7e977dc0289a6c2397bba465f5f698", + "e2f1b6c6d272ffb83220296537a21138", + "34c78fc44db0913f947caffc9f429d91", + "ea3f046c3c0f6e05501a7f263ee5022d", + "14b41d2ef9e560ea8b25e0006a7c76e8", + "7e37091996559b0a702875ca2ae54437", + "c1a47c31b8abb89abebe41e939eb85cd", + "f9907632f7163b0a71bf837cf02116d8", + "33eba62d45db94a51d9315e2e734c862", + "9d618799bdb989c172f2a67543d0d59b", + "61c678875c857ff6d466c2edfe4f93b1", + "b7ec32a6d494e5c12eadd65560439a4f", + "57d88cdb19b94437e367c25307f6a493", + "6e407c15259a8a9474c7aaa5c1b0c325", + "956dcbe72ad5518e3f4760839c2f1917", + "40a775afd81c4dcf8285e5351db0c4af", + "51473f1596549e944fcd666958647251", + "40a48f9743c4b3441f9f411145e460cc", + "b762f6108f67b7fcafb70c9478597bcc", + "b641f411f0791c456909a262993f12d4", + "306708a966104124bb6e9e434ccb1def", + "039256af52d619d5173da03ac3bc34d1", + "a378a8c57e2b73856e8a083efbe35561", + "c2b1e4a37215e6e3c45b7ba6a07bad0a", + "15806e38a0cadb7b7464efcb4acd65ad", + "7de478a670c224a8b0bd0713355fce99", + "ad32aac8e6403c4f7099f37ce0656328", + "19a501f3875477b595f2208e471e065a", + "36f61c8e59cd1567df6a50f2fc1e589f", + "5e6fd26dda2869cc919cec3ae4aeba33", + "a7a8531dc62036f518f5c0d419c74eab", + "11b45b4caca6b64050c8ab6b17435633", + "ae07441842af68a8b4d7206a4bcab833", + "6cdb813283c008827211d79f05305a98", + "f7093723cae5a6f828195c5b91f2dfff", + "4920da46107c7dc186129c2ffdbc7ebd", + "4223845045564a5b3bfab7afe7fb91ad", + "a938ec50ef0c11749ce1e7639316178b", + "233dbc4378b92a682f5abd28edbca07c", + "e888c25802e024f3aeb8536a8a42ace8", + "aa7b59c4690c6e9a9623e5dadfff1e94", + "0d7e360a2c6cd7595f5d68e682ea9a32", + "fc402387f034e1702386aaa82cb7ca0f", + "9ec5f6ccb2e3f4c561e9bd35553773cb", + "4531b9a4698e04f1dfcb8b325e112e69", + "59069679eece4850ef0766b9592da657", + "0d8536a5bb1b1afadc565ccc4dcb6476", + "e0677bec49cd6ba44f68b9fc02262c7d", + "6eadeabe09175bf8174d8251ddb1ddd3", + "004d3d532160ca12f3f769247adbe053", + "a42da77a13c238bb0a64a00a9b7324df", + "ddee2036b36ce0a25d53b4ea2cbc156e", + "2814e2234937197b27e10c039e040a42", + "d210d2f890ff463b3c20d6aed7c5a036", + "4187d8687b1a702fbbd67eb1c29249fd", + "644f64f44ea7b0799bb5e8105560a0d9", + "af7e96bf63be1138446881f89d9ba237", + "8609c7b043855aa5af2f8d93b1d16980", + "a3f8af47aa7d9773a7beaade7dad4289", + "5dccd98566e662db973bea8c5b7e1508", + "530d06dddd0e4fd43d7938740fcd1133", + "2721e594b1920c408e4918ec90ced79d", + "0a8588ff20415681fce1f7d6f8d7cb59", + "4a8e9749db54bea860bf043e43204069", + "de753f6237ac3ee7a334dfdcff32a6f3", + "db62993007d76e9b6042b2e7150ecd6f", + "39a2fc2eafffafd31d2363a72438825b", + "1c310e2f486e5fc15e564d2789135a25", + "1e157e100e57ca558d8e11c6d562e989", + "efab64a02161301f6141a5747000d0ae", + "2252208ada1d587ccf82051e09d04fce", + "b5c9b5edc7463c53fc3cbe815464d45b", + "fbb80c79aad5a33defd23c128ba06d67", + "eb0fbec5f72a33a9b48cc4a892f30f67", + "0dd6bcde73b5565ac42ac5d18a0ad1de", + "0b9073f314a0054e7dac4250eb205a36", + "1881d74963a1a673681d9b57d6c7dca0", + "f1e4f2a8229382e810b80d42593e5ee9", + "ad0983736ce2ec47999cf72033b70a41", + "69c279510b74c892fb2bdfdaec4128f5", + "8459e1e78f87a75acac7a30b27dcd672", + "74c8a48287dcd49259bee6fa3184d3e3", + "e5e649ee9180f5da32b399febd6cab2c", + "498cfbbf2a0618d3f1e283a80cf98ced", + "36fcc07a3114cf0d29e424570c5dfcd9", + "894be0c934c81169f2f77f31a8902e88", + "1cb8ee5a10ee6ba3d1cc32ea69220216", + "c38dcbb75d8bb49d9df8ca8ae76eb5fc", + "5994ef563406384c34f533a55f912b21", + "8e2f02fd7f2d68e652bd19e437b46031", + "e5cb5ac2da4cb0465538542dce132f50", + "69a3aed4b2ace775c04e23f4b9ac479c", + "df901cfccb553f4d19df907f05ae7cab", + "a207633639f998613dd9a76f51198761", + "e3d3164db152084afe815b829374ec9b", + "c9425ec8c3621c9c51234467213dfb5c", + "771ed7b61f2d6aad9cb2982b3e3f09fa", + "2c845681456a7d3d02bfe592a8aa23e6", + "f303c4bddf4493de80822c6d0a1a5834", + "97e46ccc0a1cd3502b1b8b72a1aa5782", + "2135ac994ea4cea31c117165bec3d2aa", + "a151e5af414ddaf6e9b86a3ff6529c7a", + "8f941815e39aa3577ebd7d76778d3425", + "96a290077fa18c4c419d332cf1142116" + ], "files_count": 0, "dirs_count": 0, "size_count": 0, @@ -130,6 +785,525 @@ "directory_content_fingerprint": null, "directory_structure_fingerprint": null, "halo1": "000018fba23a49e4cd40718d1297be719e6564a4", + "snippets": [ + "01a2860620f9d3de7667328e4d61288f", + "99e8e10a0fa6de04d5d7e4f83b283fbc", + "59e4fdf4950916d88968929855948c8c", + "2489cffbec3ec22af36815a94e8fc09a", + "bcc6ac92b6fbe95038a0ca30cd69c9c0", + "2c5cecd02aa7c292ad130036e09ab3a2", + "5a3e3a54b3287c30ff2b0edf09e37727", + "e349f5941dfd2e19f5af575cc73fcb02", + "458b398e4e13a1bf70d3aa8ab0c37220", + "43291561bfcd821783f66050032db585", + "78975320b1444f8822e714bc676e1bc9", + "62d340117e72bf1c54ea3b4e9c486bbe", + "366172fd6b3875ba610bae824f39ebbe", + "d4e73bf93e666f235e0c0ae1ba25ee83", + "9c8a3f4fb17c904d9c3bd1e239119381", + "9d9e03abf895e09d211107c29f37a863", + "827f72adf8f2a1fd9757448a41863c7f", + "3053650f19c49eedd967d501b1dfbc02", + "23688a21f024afc08281317d63000e0f", + "d1827f749e281592dfeab92b8b1c6c25", + "52e65b07cde98a069f9cd3cdb45960da", + "03dd31b644d480d40c0ddf25e591c0ea", + "6461daf9572b6908b8019e781675c4f9", + "c93cd5efd1f6b025c73e481455feb330", + "fe0839b944c2dd8c33fc4aff6100dcda", + "a05e541734f881e31f124c05949ad6b3", + "f5d8d1264d43927c70fcd9ac91214cae", + "fae0180f7b7f620aabfeedc442d30261", + "6dd95a8b98b64bf706fbd3cf95bbdfb1", + "8d3c58b42a3e5c216cb4640d70945865", + "2216a8cf7cb26cd92d965441ce562902", + "f00ae825078698286896bee28d854cb7", + "45a2fbf1d8de67c42a71dfae66a2ee7c", + "b71fd14ea41e7b8595d7fe3db615c089", + "5bc67151f828ab63913b4ad8f0be154f", + "b343d554a5d7069a7ddf17e77d41e9c3", + "bf4b3fe809d87ce1ec5a22403b0af143", + "40afe3959c68cb3d4c9f43d5032a8515", + "9ab579429d8ab058b7edc0da6fe18a41", + "493292ebed2ad57bffd9e0a020aa2f9f", + "9cf4889191beed3a8d14b72a7b7f22d8", + "0770ceff57024b4b76ca023d540a3f28", + "cc4194ad0abfa995fca701eebc99d72d", + "e8f6d3b7e139354598c33f4931167200", + "5b82420c0858ab1c4812f09967c17d60", + "ee85d3b3e52f0c1b4bda0dfeefee97a4", + "e94d1fa52c8e0b7c4890a9166bec0e6a", + "d575b1d868603ad261d7020c9cd964ba", + "afa66239b82919bbeef59ec36ba5a078", + "0cbf3797468c4b615e43da650730c1bb", + "e11bf3941b1261e7edebb508379cd144", + "e9071b93f02503b86a04547f0d7d6849", + "9b882ecba76e186e9a9f4f1417b41bc7", + "c3dd611a539619379339162600fd2488", + "00d98474d538de1663ea922ecff30c44", + "5911c8642da57a1935d2479bf1329b7f", + "49eb173d6d7466aca2d5d6b8cc008a71", + "da54d9370f12af2974942c5a02081a09", + "74e9444882983281fa26be9c88025f22", + "e8ac2f3fc4b3dbc24da8fd4ecdbc9242", + "6157ef912c66d8fb035cc624d7d3d9b9", + "b80df1f45062e861c2a2621a48bdda85", + "2c503b2c548c7ef33b574561b163e301", + "badf7f3efae4e8d51e4c03ec4a476b07", + "a531611ae7094e0d9429b9098cd0b8ec", + "ffe9b5644e3681400e97583deb123138", + "308b4774505884b343508e5c3b25e3b1", + "3c9c24d2774e607ce43d6a115107879b", + "596101b5c4ee9c06a753d2bcb0a91cb4", + "445e46dfd7a1badd0442b928dfa64af3", + "6c138599fb322fe4e6be518e6d097e15", + "a8cd8ea6b4322f666e1069b7583311b9", + "2409071a66687dbc9ab2f31dba00ea97", + "fb2e97a55ae38b136bd6a991522fc0de", + "ea8749365cc70da43724df8517582f48", + "7f661fbdeabc4d6445d594bb919df783", + "f4bd005b8771d2809ddef753c110114c", + "fee5430e248c9639837a7d5ece8cf737", + "4db0c6a25f9ae90bdfd5675321d84108", + "06b6e987fe9bae07c24574965043d488", + "3468751d9edae5a24acf6bd9fdb7d095", + "da380a61a4f67f6611c618961ba7d7fe", + "f3c6f6bb053e6e5ab5a9c8adafa317f8", + "2c8c57c09eadbf5a20b2addece359839", + "c3d6625043f4af47f20bc10bbe6e5b24", + "54a29b5ad7a12ef89f6f57a7b25e4e5f", + "3ad8017c49941e5949becbf38de3e869", + "f3e8e4b8bc2221a5ff2b62bb7af65bec", + "865044a6362bbe39591eea8a6fc2c8d6", + "64d4d452abe519c3558debcc7e294b5b", + "cbe12d0679f753f18c83f46a7ee7aef8", + "aa33a80291265999498300c0e486e6b0", + "b1b7dd3de6917006796c0191bb8e52a3", + "22f97b00c6773f13e4a452658b976201", + "5c44256bef2a0c5b096c3a13f62674cb", + "c242f0a562d5ca6ba1a197e52c2ab886", + "c4cef64f59b2f61b658861e9a2921668", + "4d7574e6eac62f7fcf1bfcbe6365480c", + "8353c8b7573744d58a7d83fe19e01973", + "76b2ac2809d12b99db5130a3f8fc9285", + "6558183ce2ab1a8a08f4a1b6be76731a", + "6a6eeab6452acabe4255ac5a94101fab", + "e8623ae51acf49438330ab31a0727c00", + "5e74e0e42c531da4859f2bd178806add", + "1c799de762da2e80ad617012c041b990", + "5922200a3d5d225ecf198bbe03ab0b88", + "43c4aa4949c5f5f6b2d2446878fa9425", + "615a178025d69ec6a7fc0100a717630b", + "788e4b9bac09971dad0ef4a28cd715e8", + "b58ff2f5ad535edd9884ecc4569a42ab", + "0c89e27034005ff9e9f95b93726c1478", + "ca8fac2cdd5ad01a22d01b182a9e2e1a", + "337fa7e7f1b388e0a10003afb6414f78", + "91cbe083188909aa144c36bdf9b67a6f", + "95020ff8c4e8ab71524c653d033e89c9", + "ef50426c2ba54173eac3e21bd5f7d658", + "3b9b2f0970888933b7a1d22cd3250d14", + "57b328ff36961317ae62e6689febe248", + "6a268c6e8788f7a69ffa69e28e79d721", + "158763405e69ce16667aaa05c0faea5f", + "0a1738ec6db5199c8cf6726ca0cd3a96", + "666acedc72c8713ed8ccf575be2c0b9c", + "ef4146246df5dd7c98bc54ab3c10c3bb", + "05c89a99e54f4e792fc3abe1176a6e9f", + "2858172d4f048b4f509221f40cb6e51b", + "e9ffdd6870b405a12430ed3c74d3082b", + "aec0709385dd19526ad0b1cde7f481cb", + "95c4939ea09aa22cbd8adb8cd5bb26c6", + "a0326a883fc90396e402855299952344", + "9f55ae5b3bdae70d943e14b465251507", + "7e4816b8a54dbbc76647dac40b217c89", + "63ef9bc21904404f0b885ed3ed280d1d", + "a810536cd32b0d8fa06890fa17c91eea", + "1aeee1a8cca06f5b4af0930b09c6c10f", + "41a0533f95ab3175c84bad3c2ca929af", + "d20de628487bb2b5c525dde7248aaa0a", + "8c8c0c0ead59eee89478698fcb688945", + "35031475a8689d893f01ed400f3ecbe6", + "4be86d4e557a24af9706e301094d257b", + "46f8dafc6d24f0cf34dbe7a7c297449c", + "558788e719e3fa4d69e9c108aaf22bc5", + "0018e3648533c8958955559b299eb385", + "e70b3ad2d54a0a4add4a7b60869bdf02", + "f9132439ac130a5997510ed6f96e7b2d", + "9cebf010f5ea40e9e1459801de661f52", + "43e729b0337fe1efbd124c32d2da09c1", + "0349faac725c2503dae0a74c168b7bf1", + "ef9eb02563568a652fdecb3b96750b2a", + "1601874afe1485b62549409fdddddd85", + "06e8ac50fe3e5228dde99a1998584d24", + "acef4c3172e2ed0da869d12b0a504e19", + "fe84b76b5b01359343fd0aeae336d329", + "873d734fe2f3e738b72c71742449ec44", + "31e609d08f4ada21d603dec99af8f0ae", + "aec12cabe92117940783b7f3f645b848", + "76082bdfe8ddd9a1c7878aee50dbaafd", + "8c94ae763ba43de2f4902b51f6c3bb17", + "f456f627d6aed75ff71c78e66bb29b6f", + "0b5600126debfaf84e4ad6d069e9dc93", + "c9cffdc095c1a739565fbc0b1128c6b2", + "d4c4766b680e7fc5ef67292e569a175b", + "638f66e76667cc4d692cd28b46cb28e9", + "6de3d2d692a9ce1ed29913696ad4cf8b", + "1d24fe9ff69a393dbd530f000d96a089", + "656c76345fdc1f5e509e410392ce9356", + "ddbda6bbbf70a025274ce239ad04776a", + "b9665796363290a24ce122b342a5cad8", + "1a53a4094b337198591a75318b915656", + "f113e2433983beb83242bdbc704f1602", + "e16749e75a85158ecfb1b736e9bf3462", + "8459d8b145791a2c2ca5e05f91d5e039", + "a30767ab78b73c5e9181c32ed9dea72f", + "980190e94ad4688196ed39591b5d62d8", + "8f79921a2c49bc3fc4bfc3c470e540ad", + "92b42aa7c1a2013085a663cbf819585e", + "371b6e4341b7615b8faa769a50e3a40f", + "6b4cf3bcf6abd78b308e31a499837451", + "f3f1b4a6fcb0c3de1750f4eca2d582b5", + "634719e71076181b5bc56866aba73ae7", + "1a2ace5196a5949f8df5c68a299905f7", + "45dae8a5b8cc0c826af9c89dcb217f36", + "ca8c20edb356de4091f40e5dbeb1fa6a", + "0fbb213cae1cca3dc048aecbe7c012d9", + "1e63189230b93f4d92db32eea83cee4b", + "f874bbeeb5b3a6c0bab50330d94b7dc5", + "fd63842de4e1dec031359f4424475821", + "64290e23f6dc03c0c8ca714993355a46", + "8edc96003636f938c7ff1f793525c39d", + "c5b8e8d179069ffee850754225a01660", + "e176a3839f14dbdb1eae5842305a7c73", + "73c9a34c78d1b45edc7749402cbefc1d", + "4721dc0b2de8bbb767cdd20079ff6417", + "01f38123e76d66ef25fe126284ca902d", + "cf4ba3de2f35f024e4cafca9fe683f97", + "74a324ff5f8d405216324d62c17452b5", + "7165c9678ba2194caaa29fde08c59194", + "464f563a5a0632a6f0c623bc92dd9458", + "980bb815cf0b929af366f3052301299b", + "b0a500eb1e0c2274196a671076dbb4bd", + "134726fc1a6ca8ca5ce734f3151179d9", + "e0752fc8f1bf25ab477790685bf35d47", + "fe2bd079fba76a3593ec4888930d96d5", + "ef8979a9589fd03109e2c9b346c284dc", + "0e2923676803ba3bf3dc3afee03d0739", + "1bf6cb5cd2cf6c099150007e21b236d8", + "983412e6e6e9809501f05c7af13c69d7", + "f678da44721c3adc1db87c5871e882bb", + "789f0c05c43d34bc9a98afd9026cb5b8", + "13d3143533edfccd8edf7e1a7890a0fc", + "66c0bcbcce07e5882915289993a9b99f", + "8f7e977dc0289a6c2397bba465f5f698", + "e2f1b6c6d272ffb83220296537a21138", + "34c78fc44db0913f947caffc9f429d91", + "ea3f046c3c0f6e05501a7f263ee5022d", + "14b41d2ef9e560ea8b25e0006a7c76e8", + "7e37091996559b0a702875ca2ae54437", + "c1a47c31b8abb89abebe41e939eb85cd", + "f9907632f7163b0a71bf837cf02116d8", + "33eba62d45db94a51d9315e2e734c862", + "9d618799bdb989c172f2a67543d0d59b", + "61c678875c857ff6d466c2edfe4f93b1", + "b7ec32a6d494e5c12eadd65560439a4f", + "57d88cdb19b94437e367c25307f6a493", + "6e407c15259a8a9474c7aaa5c1b0c325", + "956dcbe72ad5518e3f4760839c2f1917", + "40a775afd81c4dcf8285e5351db0c4af", + "51473f1596549e944fcd666958647251", + "40a48f9743c4b3441f9f411145e460cc", + "b762f6108f67b7fcafb70c9478597bcc", + "b641f411f0791c456909a262993f12d4", + "306708a966104124bb6e9e434ccb1def", + "039256af52d619d5173da03ac3bc34d1", + "a378a8c57e2b73856e8a083efbe35561", + "c2b1e4a37215e6e3c45b7ba6a07bad0a", + "15806e38a0cadb7b7464efcb4acd65ad", + "7de478a670c224a8b0bd0713355fce99", + "ad32aac8e6403c4f7099f37ce0656328", + "19a501f3875477b595f2208e471e065a", + "36f61c8e59cd1567df6a50f2fc1e589f", + "5e6fd26dda2869cc919cec3ae4aeba33", + "a7a8531dc62036f518f5c0d419c74eab", + "11b45b4caca6b64050c8ab6b17435633", + "ae07441842af68a8b4d7206a4bcab833", + "6cdb813283c008827211d79f05305a98", + "f7093723cae5a6f828195c5b91f2dfff", + "4920da46107c7dc186129c2ffdbc7ebd", + "4223845045564a5b3bfab7afe7fb91ad", + "a938ec50ef0c11749ce1e7639316178b", + "233dbc4378b92a682f5abd28edbca07c", + "e888c25802e024f3aeb8536a8a42ace8", + "aa7b59c4690c6e9a9623e5dadfff1e94", + "0d7e360a2c6cd7595f5d68e682ea9a32", + "fc402387f034e1702386aaa82cb7ca0f", + "9ec5f6ccb2e3f4c561e9bd35553773cb", + "4531b9a4698e04f1dfcb8b325e112e69", + "59069679eece4850ef0766b9592da657", + "0d8536a5bb1b1afadc565ccc4dcb6476", + "e0677bec49cd6ba44f68b9fc02262c7d", + "6eadeabe09175bf8174d8251ddb1ddd3", + "004d3d532160ca12f3f769247adbe053", + "a42da77a13c238bb0a64a00a9b7324df", + "ddee2036b36ce0a25d53b4ea2cbc156e", + "2814e2234937197b27e10c039e040a42", + "d210d2f890ff463b3c20d6aed7c5a036", + "4187d8687b1a702fbbd67eb1c29249fd", + "644f64f44ea7b0799bb5e8105560a0d9", + "af7e96bf63be1138446881f89d9ba237", + "8609c7b043855aa5af2f8d93b1d16980", + "a3f8af47aa7d9773a7beaade7dad4289", + "5dccd98566e662db973bea8c5b7e1508", + "530d06dddd0e4fd43d7938740fcd1133", + "2721e594b1920c408e4918ec90ced79d", + "0a8588ff20415681fce1f7d6f8d7cb59", + "4a8e9749db54bea860bf043e43204069", + "de753f6237ac3ee7a334dfdcff32a6f3", + "db62993007d76e9b6042b2e7150ecd6f", + "39a2fc2eafffafd31d2363a72438825b", + "1c310e2f486e5fc15e564d2789135a25", + "1e157e100e57ca558d8e11c6d562e989", + "efab64a02161301f6141a5747000d0ae", + "2252208ada1d587ccf82051e09d04fce", + "b5c9b5edc7463c53fc3cbe815464d45b", + "fbb80c79aad5a33defd23c128ba06d67", + "eb0fbec5f72a33a9b48cc4a892f30f67", + "0dd6bcde73b5565ac42ac5d18a0ad1de", + "0b9073f314a0054e7dac4250eb205a36", + "1881d74963a1a673681d9b57d6c7dca0", + "f1e4f2a8229382e810b80d42593e5ee9", + "ad0983736ce2ec47999cf72033b70a41", + "69c279510b74c892fb2bdfdaec4128f5", + "8459e1e78f87a75acac7a30b27dcd672", + "74c8a48287dcd49259bee6fa3184d3e3", + "e5e649ee9180f5da32b399febd6cab2c", + "498cfbbf2a0618d3f1e283a80cf98ced", + "36fcc07a3114cf0d29e424570c5dfcd9", + "894be0c934c81169f2f77f31a8902e88", + "1cb8ee5a10ee6ba3d1cc32ea69220216", + "c38dcbb75d8bb49d9df8ca8ae76eb5fc", + "5994ef563406384c34f533a55f912b21", + "8e2f02fd7f2d68e652bd19e437b46031", + "e5cb5ac2da4cb0465538542dce132f50", + "69a3aed4b2ace775c04e23f4b9ac479c", + "df901cfccb553f4d19df907f05ae7cab", + "a207633639f998613dd9a76f51198761", + "e3d3164db152084afe815b829374ec9b", + "c9425ec8c3621c9c51234467213dfb5c", + "771ed7b61f2d6aad9cb2982b3e3f09fa", + "2c845681456a7d3d02bfe592a8aa23e6", + "f303c4bddf4493de80822c6d0a1a5834", + "97e46ccc0a1cd3502b1b8b72a1aa5782", + "2135ac994ea4cea31c117165bec3d2aa", + "a151e5af414ddaf6e9b86a3ff6529c7a", + "8f941815e39aa3577ebd7d76778d3425", + "96a290077fa18c4c419d332cf1142116" + ], + "files_count": 0, + "dirs_count": 0, + "size_count": 0, + "scan_errors": [] + }, + { + "path": "fingerprinting/snippets", + "type": "directory", + "name": "snippets", + "base_name": "snippets", + "extension": "", + "size": 0, + "sha1": null, + "md5": null, + "sha256": null, + "mime_type": null, + "file_type": null, + "programming_language": null, + "is_binary": false, + "is_text": false, + "is_archive": false, + "is_media": false, + "is_source": false, + "is_script": false, + "directory_content_fingerprint": "00000002640808248840ed000c63108308c324b9", + "directory_structure_fingerprint": "00000002631a040860400c086a3410105d04748b", + "halo1": null, + "snippets": null, + "files_count": 2, + "dirs_count": 0, + "size_count": 13223, + "scan_errors": [] + }, + { + "path": "fingerprinting/snippets/adler32.c", + "type": "file", + "name": "adler32.c", + "base_name": "adler32", + "extension": ".c", + "size": 4968, + "sha1": "0cff4808476ce0b5f6f0ebbc69ee2ab2a0eebe43", + "md5": "ae3bbb54820e1d49fb90cbba222e973f", + "sha256": "341d49ae2703037d2d10c8486f1a1ca3b65e0f10cc9e5fead6bfbbc0b34564ba", + "mime_type": "text/x-c", + "file_type": "C source, ASCII text", + "programming_language": "C", + "is_binary": false, + "is_text": true, + "is_archive": false, + "is_media": false, + "is_source": true, + "is_script": false, + "directory_content_fingerprint": null, + "directory_structure_fingerprint": null, + "halo1": "0000026ab55c771b9246aff06cf3497b91c8c9ef", + "snippets": [ + "bbb63027903332f0c41b7b26b9bfb50b", + "54cf1197bf1109b4ce2a3455c1c48285", + "6d4c7e4377089d1ddcc8c90132ac9730", + "1e579e94829907c3d2401db94f9b6df8", + "ec89d3e7ac59e858d97ce1ad730f7547", + "f3c31ef3249345c3e44c5aea28414dff", + "5f1ba9111c115dc88bdc1ceddce789ef", + "2f12c505c1e1ec3fa184877c8f1cb838", + "a7858f3e1c246064223868c9858f8317", + "b7c21f7ebb4abec9169eb533154a5097", + "f5139ce5161976ff729a953b8780133d", + "c1975628430b6fda66b638481403cca5", + "83a4d8bea3052c3bfde90ed3aaba79ac", + "3c4df460f6a4817daf8638f3b2009cb9", + "3290d45ca11c75f84d72ccfdfcca9515", + "bd9b873dd011bb94ba21b449e0886bca", + "c51b042fb4aa9dbee729f120d1caa9ad", + "3aaa73fb0dbbd0443f7f77d96322b522", + "80a509a0b8d81b8167e4bce3bdaf83bf", + "4a79d250f6c4aa117bf47244fc0222be", + "e49dc8a3fecfe4bb2ef237bb56e85dc8", + "e2a16b88325f9b5717b578c9f5207e07", + "e28f3e5020594773551a29c39ee4c286", + "ae9095ef88ac8288c7514b771ed5ddc8", + "01e7fd588d9cd71e30935c597827ce0a", + "a54443952d1ce6e731d8980d7b0c714f", + "c244ee379eacca3f8799bb94890bd41c", + "67913cbdbf8802d7c19a442132ada51b", + "b9e5ed3d9a79a4d71d04a6d59589e9c8", + "7a10694fe6dadc4f0ff002119d29eac9", + "e0fc19761f570e9657324d21b7150a3b", + "498885acf844eda1f65af9e746deaff7", + "16e774a453769c012ca1e7f3685b4111", + "eeb97a9c94bb5c7a8cac39fdea7e7ec2", + "5faefb98693a882708b497c90885e84d", + "5ca14da77615896d30deb89635c39a53", + "628c96760664a4b74d689a398b496e03" + ], + "files_count": 0, + "dirs_count": 0, + "size_count": 0, + "scan_errors": [] + }, + { + "path": "fingerprinting/snippets/zutil.c", + "type": "file", + "name": "zutil.c", + "base_name": "zutil", + "extension": ".c", + "size": 8255, + "sha1": "37290d53566bcddcb4c8c9a8e40af22c089ea672", + "md5": "552716e56a3d76087d926d0c422581b0", + "sha256": "540f23856b35556e6472cf965865bcd3e6423de4f584608d7bde1e30e8315102", + "mime_type": "text/x-c", + "file_type": "C source, ASCII text", + "programming_language": "C", + "is_binary": false, + "is_text": true, + "is_archive": false, + "is_media": false, + "is_source": true, + "is_script": false, + "directory_content_fingerprint": null, + "directory_structure_fingerprint": null, + "halo1": "0000045e529c45331780fee281b348339f79306d", + "snippets": [ + "7ed5cafd44fea6cb1e84f519c5a995f3", + "9f02df2c2c765ed4b9a60af7f5dc6825", + "e643cdd412d46ba058e2be3105b5503d", + "090dc3f8751b3c79923d0f2430e1821d", + "7b3294908e4bbd6390106fe6d920268f", + "4bc9c74165dfd635fee5c3164f2407d8", + "b0efbe1869beb1a203a95b18d47ef1e6", + "34af742c2a696d0a6bd23e5c96143aa4", + "855b779d81fe76ace1afd9cffaaa03b5", + "2381aeb9b5cd04dc4f52a1d5e06797e6", + "ad117fdd56136e90282025198a1ed5f5", + "ce064a8d30610687babebfc3c74f2215", + "fe12a3cb12a41359a3f7ea23a8297fca", + "1a2f0e65b2d77fb79ed95749083e0356", + "945e4a298b851a0fa86853d1fd234d22", + "e4cda232353cd78069d7d6a1d11ccfc3", + "ab64048739c06b77fbf69f0622a824a0", + "fb91eeb4a8b9895e051ec98b649303ff", + "a07afc7552c7af2f861a114c19718c12", + "c7f68becaa86ac416555dcc13de3f7b6", + "7be2af5b15ac4debe2c9233fe3bdf5e2", + "e4085cc7580f1f933f524c1742dffc7a", + "1bd5c87d7fb5558b1fcd10ef2e0432f8", + "fd6a83abd283b4e5ac268f21a2147453", + "5a4d0897b9711c02f865d97034338979", + "f6bcbd48d1e7ffbb78164cd2660ca0cc", + "83ac23f7ee69540adfc64dba65045012", + "435d4e0805e1015f58bedb643ce1ad3a", + "53b627e84a0fde8342a7c9a5cae51335", + "9b34c5bb0ac43bc9f131315c8fa028c3", + "8456aa69be29d00cf9dfeb7ae9ccfcdf", + "e79c82b208711f5f49f421718ef172c6", + "7ac46a9dbd8c68652d347960cc3f640a", + "2a6e0b066785d0e1feee19a60d4685f6", + "e4c4d99fc98a4cc09f28a291a5212093", + "1d64eede99cb6abe784678938f64a12c", + "f517d7a22774aeec45c109920b255ae6", + "1cdf29098d96d12c8c59acf2304ab1fe", + "d2b74ca2087e6e527701c663eefd29bc", + "a14974b34a547b1a52af07f590f641d1", + "03a6666b52bba552442e73adfbcfccb5", + "4cca0e8f81f8fe812eb7861495020ff8", + "d9db0fb7358173072bc319707d3e8a33", + "2310e0cb39cc317dbaf0bfcca72f0aca", + "b6a661bd80f1140a07c511a9ffffb492", + "0399fade7fca27b568404b073b2eca1c", + "52cfc5757c1f45567ca90a2958a64e22", + "f76edad8fa6dc73e843ab228a46ff4aa", + "a0877ef600c0b7da27e226e7815bd96d", + "dd94cb42ea765f5a3dc74c7116b8112f", + "6f62a6a03341268dabc94c8265aab4a3", + "d2d90d0a0b8841fdde1e9342ae34e612", + "6e8a953486842b17faabbe58aed2d28b", + "5a0e16ed296adc58912f12deb8e43cca", + "5a04295313ead9f4b5e43a19e57209c9", + "ac3d0c06b8855189986c2d4a11be7180", + "9f61d026adad0c3ac52ee1db8ebb1761", + "163c3e2d2a76b4cffbcec4e7e41340b0", + "eb22bfcb167a605f63f1c0e84b4a243c", + "c8a523c143b8fecfaecb8788d94f896f", + "fd12f7d058933f7def30e7c0575b2512", + "cf6dd6d8d3a9fe684606d10e63b3755d", + "e989d1b2ef98bfa40bbccc486ed5e965", + "498885acf844eda1f65af9e746deaff7", + "16e774a453769c012ca1e7f3685b4111", + "8963c86e132ae1710491ba552e17d322", + "83ee9b95f621713d817fc5ef847a3129", + "0afbd0d74b172a8dd08a1b17002400b1", + "498901c2be17e44805910ac978c854b5", + "58931feaad814e884e3e95bb89bdbf5c", + "4a50fed3cb3b2e08962fce9d37ec1faa", + "b24f2d699d5c3643f5d30427c4fa9223", + "8a576adf5638a477ec06940132a1f583", + "b4f309a79529c0103fa356f3552e49bf", + "ea41586642fc658861578736941b1786", + "b2a8540ad8659f91150764f4bad6bfae", + "7a27d2e62d8aad623cfc4f3ceb831ba4", + "3aaaa507050eae336d7e870b043cb18c", + "603e64a10d74410e4673bf4bddc3a100", + "75ad6a60f72125a9e9f0b8bf129731e6" + ], "files_count": 0, "dirs_count": 0, "size_count": 0, @@ -157,6 +1331,33 @@ "directory_content_fingerprint": null, "directory_structure_fingerprint": null, "halo1": "0000026832a97761e52e4793863f3d20cc70611d", + "snippets": [ + "4df7c9871fae95a28489bce2e7f65eb7", + "96ed16d9721c9119ec1932084a7e6041", + "03cfabf539255d2e8faede5fefa6348f", + "66e408310bd48c46e0e7be089fd4e23a", + "03ab9afc8c14f938fd58855e4f605c3e", + "3946e7d9edc9fc467d9a0b57a33b74ce", + "2ab1dc359aa33c34331804d81b7e2956", + "e62c1c31fb792743023424713a807438", + "701be0f6c9746eb8fa18b6ad609388ee", + "170c92a5a97980f5f8f7ee63714f68b8", + "ecaae4a84c7debe723667fc31405bdda", + "9baa8616e826a93312953b25e3db4386", + "61f23bcfafbf43b3afe9d96e6db1d8a2", + "57c20676e821a817fb23b1fdad8d7ab2", + "87e30dc09132f8edea3b354898737060", + "b82f24ba3a58e7611f63bbe121619f0d", + "d99b48a73272d69a1c47b90fb6eeb33b", + "298609a545524f795ac0ac80d2963157", + "b4700b2e44f6607dc3ed2ce00865c8e8", + "5eebfbd388edb7e79e098571dbc13498", + "f7ebbf7161adcea982ed79fb7d910f81", + "ff6ddf966284e9d953fa31c663535d3b", + "3c14253fec2cf574229d8e583771e37c", + "3de15862d251b05a3108a62efec014f2", + "88d619dc1c1e4b0856dcf914887f24a5" + ], "files_count": 0, "dirs_count": 0, "size_count": 0, diff --git a/tests/testfiles/fingerprinting/hailstorm/adler32.c b/tests/testfiles/fingerprinting/snippets/adler32.c similarity index 100% rename from tests/testfiles/fingerprinting/hailstorm/adler32.c rename to tests/testfiles/fingerprinting/snippets/adler32.c diff --git a/tests/testfiles/fingerprinting/hailstorm/zutil.c b/tests/testfiles/fingerprinting/snippets/zutil.c similarity index 100% rename from tests/testfiles/fingerprinting/hailstorm/zutil.c rename to tests/testfiles/fingerprinting/snippets/zutil.c From 8001b85171f30badc8c3ee4914637b66a9df1fe4 Mon Sep 17 00:00:00 2001 From: Jono Yang Date: Tue, 29 Oct 2024 15:51:40 -0700 Subject: [PATCH 6/6] Update CHANGELOG.rst Signed-off-by: Jono Yang --- CHANGELOG.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index c89a219..2a0f581 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,12 +1,16 @@ Changelog ========= +vNext +----- + +*2024-10-29* -- Collect snippet hashes in fingerprint plugin. + v5.1.1 ------ *2024-08-07* -- Update link references of ownership from nexB to aboutcode-org. - v5.1.0 ------