Skip to content

Commit b98e016

Browse files
committed
Add descriptive statistics
1 parent 9f35699 commit b98e016

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

analysis/extended-version/code-clones.sql

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,13 @@ FROM (
6363

6464
=> sotorrent-extension.2018_09_23.MostRecentPostBlockVersionNormalized
6565

66+
67+
# count distinct code blocks
68+
SELECT COUNT(DISTINCT(ContentNormalizedHash))
69+
FROM `sotorrent-extension.2018_09_23.MostRecentPostBlockVersionNormalized`
70+
WHERE PostBlockTypeId = 2;
71+
# 43,942,960
72+
6673

6774
# count clones
6875
SELECT
@@ -79,6 +86,11 @@ GROUP BY
7986

8087
=> sotorrent-extension.2018_09_23.MostRecentPostBlockVersionNormalizedClones
8188

89+
# count distinct code blocks present in at least two threads
90+
SELECT COUNT(DISTINCT(ContentNormalizedHash))
91+
FROM `sotorrent-extension.2018_09_23.MostRecentPostBlockVersionNormalizedClones`
92+
WHERE PostBlockTypeId = 2 AND ThreadCount > 1;
93+
# 909,323
8294

8395
# copy clones without content (for export)
8496
SELECT

0 commit comments

Comments
 (0)