A study of the uniqueness of source code
The DOI matches its Crossref record; 3 of the 3 references it cites were found in a registry or an index.
Abstract
This paper presents the results of the first study of the uniqueness of source code. We define the uniqueness of a unit of source code with respect to the entire body of written software, which we approximate with a corpus of 420 million lines of source code. Our high-level methodology consists of examining a collection of 6,000 software projects and measuring the degree to which each project can be ‘assembled ’ solely from portions of this corpus, thus providing a precise measure of ‘uniqueness ’ that we call syntactic redundancy. We parameterized our study over a variety of variables, the most important of which being the level of granularity at which we view source code. Our suite of experiments together consumed approximately four months of CPU time, providing quantitative answers to the following questions: at what levels of granularity is software unique, and at a given level of granularity, how unique is software? While we believe these questions to be of intrinsic interest, we discuss possible applications to genetic programming and developer productivity tools.
Overview
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Integrity signals
Registry
Cites
Statistics
Verification
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Citations
Cites
Determining sample size for research activities
Krejcie, R. V., & Morgan, D. W. (1970) · Educational and Psychological Measurement · doi:10.1177/001316447003000308 · Cited by 18,930
Schleimer, S., S, W. D., & Aiken, A. (2003) · Proceedings of the 2003 ACM SIGMOD International Conference on Management of Data · doi:10.1145/872757.872770 · Cited by 1,099 · cited 2×
“Schleimer et al. s MOSS [19] uses a form of document .ngerprinting to scalably characterize likely-plagiarized software.”
MethodDECKARD: Scalable and Accurate Tree-Based Detection of Code Clones
Jiang, L., Misherghi, G., Su, Z., & Glondu, S. (2007) · 29th International Conference on Software Engineering (ICSE'07) · doi:10.1109/icse.2007.30 · Cited by 1,039
Self-citation
Cited by
Large language models for software engineering: survey and open problems
Fan, A., Gokkaya, B., Harman, M., Lyubarskiy, M., Sengupta, S., Yoo, S., & Zhang, J. M. (2023) · 2023 IEEE/ACM International Conference on Software Engineering: Future of Software Engineering (ICSE-FoSE) · doi:10.1109/icse-fose59343.2023.00008 · Cited by 650
“In a larger repository (sourceforge), Gabel and Su [46] found that a programmer would have to write more than six lines of code in order to create a novel code fragment.”
BackgroundDeep learning code fragments for code clone detection
White, M., Tufano, M., Vendome, C., & Poshyvanyk, D. (2016) · Proceedings of the 31st IEEE/ACM International Conference on Automated Software Engineering · doi:10.1145/2970276.2970326 · Cited by 558
On the naturalness of software
Hindle, A., Barr, E. T., Su, Z., Gabel, M., & Dévanbu, P. (2012) · doi:10.5555/2337223.2337322 · Cited by 541
Self-citationLarge Language Models for Software Engineering: Survey and Open Problems
Fan, A., Gokkaya, B., Harman, M., Lyubarskiy, M., Sengupta, S., Yoo, S., & Zhang, J. M. (2023) · arXiv · doi:10.48550/arxiv.2310.03533 · Cited by 523
On the naturalness of software
Hindle, A., Barr, E. T., Su, Z., Gabel, M., & Devanbu, P. (2012) · 2012 34th International Conference on Software Engineering (ICSE) · doi:10.1109/icse.2012.6227135 · Cited by 425
“In the 1980s, a fundamental shift to corpus-based, statistically rigorous methods occurred.”
BackgroundSelf-citationLearning natural coding conventions
Allamanis, M., Barr, E. T., Bird, C., & Sutton, C. (2014) · Proceedings of the 22nd ACM SIGSOFT International Symposium on Foundations of Software Engineering · doi:10.1145/2635868.2635883 · Cited by 376
An Empirical Study on Learning Bug-Fixing Patches in the Wild via Neural Machine Translation
Tufano, M., Watson, C., Bavota, G., Penta, M. D., White, M., & Poshyvanyk, D. (2019) · ACM Transactions on Software Engineering and Methodology · doi:10.1145/3340544 · Cited by 370
Context-aware patch generation for better automated program repair
Wen, M., Chen, J., Wu, R., Hao, D., & Cheung, S.-C. (2018) · Proceedings of the 40th International Conference on Software Engineering · doi:10.1145/3180155.3180233 · Cited by 328
Mining source code repositories at massive scale using language modeling
Allamanis, M., & Sutton, C. (2013) · 2013 10th Working Conference on Mining Software Repositories (MSR) · doi:10.1109/msr.2013.6624029 · Cited by 313
On the naturalness of software
Hindle, A., Barr, E. T., Gabel, M., Su, Z., & Devanbu, P. (2016) · Communications of the ACM · doi:10.1145/2902362 · Cited by 307
Self-citationDeepSim: deep learning code functional similarity
Zhao, G., & Huang, J. (2018) · Proceedings of the 2018 26th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering · doi:10.1145/3236024.3236068 · Cited by 261
Boa: A language and infrastructure for analyzing ultra-large-scale software repositories
Dyer, R., Nguyen, H. A., Rajan, H., & Nguyen, T. N. (2013) · 2013 35th International Conference on Software Engineering (ICSE) · doi:10.1109/icse.2013.6606588 · Cited by 255
Tu, Z., Su, Z., & Devanbu, P. (2014) · Proceedings of the 22nd ACM SIGSOFT International Symposium on Foundations of Software Engineering · doi:10.1145/2635868.2635875 · Cited by 238
Self-citationThe plastic surgery hypothesis
Barr, E. T., Brun, Y., Devanbu, P., Harman, M., & Sarro, F. (2014) · Proceedings of the 22nd ACM SIGSOFT International Symposium on Foundations of Software Engineering · doi:10.1145/2635868.2635898 · Cited by 215
“As a community, we have learned that several lines of code are required for a change to be unique [11] and that a surprising number of changes are redundant, in the sense that they repeat changes already made [25,29].”
BackgroundInfluentialA statistical semantic language model for source code
Nguyen, T. T., Nguyen, A. T., Nguyen, H. A., & Nguyen, T. N. (2013) · Proceedings of the 2013 9th Joint Meeting on Foundations of Software Engineering · doi:10.1145/2491411.2491458 · Cited by 208
“Previous research has shown that source code in programming languages exhibits a good level of repetition [5, 8].”
BackgroundLearning to mine aligned code and natural language pairs from stack overflow
Yin, P., Deng, B., Chen, E., Vasilescu, B., & Neubig, G. (2018) · Proceedings of the 15th International Conference on Mining Software Repositories · doi:10.1145/3196398.3196408 · Cited by 218
“First, it is highly repetitive [8, 10], therefore”
Repairing Programs with Semantic Code Search (T)
Ke, Y., Stolee, K. T., Goues, C. L., & Brun, Y. (2015) · 2015 30th IEEE/ACM International Conference on Automated Software Engineering (ASE) · doi:10.1109/ase.2015.60 · Cited by 192
“A study of 6,000 software projects (over 420 million lines of code) found that large portions of most software projects are syntactically redundant [24].”
InfluentialBig code != big vocabulary: open-vocabulary models for source code
Karampatsis, R.-M., Babii, H., Robbes, R., Sutton, C., & Janes, A. (2020) · Proceedings of the ACM/IEEE 42nd International Conference on Software Engineering · doi:10.1145/3377811.3380342 · Cited by 182
“Seminal studieshave laid the groundwork for the use of language models on source code: Gabel and Su show that software is very repetitive [33], which motivates the use of statistical modelling for code.”
MethodSorting and Transforming Program Repair Ingredients via Deep Learning Code Similarities
White, M., Tufano, M., Martinez, M., Monperrus, M., & Poshyvanyk, D. (2019) · 2019 IEEE 26th International Conference on Software Analysis, Evolution and Reengineering (SANER) · doi:10.1109/saner.2019.8668043 · Cited by 163
(2014) · doi:10.1145/2635868.2635901 · Cited by 159
A Survey of Machine Learning for Big Code and Naturalness
Allamanis, M., Barr, E. T., Devanbu, P., & Sutton, C. (2019) · ACM Computing Surveys · doi:10.1145/3212695 · Cited by 150
On automatically detecting similar Android apps
Linares-Vasquez, M., Holtzhauer, A., & Poshyvanyk, D. (2016) · 2016 IEEE 24th International Conference on Program Comprehension (ICPC) · doi:10.1109/icpc.2016.7503721 · Cited by 43
“ments; (iii) applications may be highly-similar to one another in terms of low-level implementations of some functions even if they do not perform the same high-level functionality [21], and (iv) market-specific search engines identify similar apps by relying on textual descriptions only.”
BackgroundAre Large Language Models Memorizing Bug Benchmarks?
Ramos, D., Mamede, C., Jain, K., Canelas, P., Gamboa, C., & Goues, C. L. (2024) · arXiv · doi:10.48550/arxiv.2411.13323 · Cited by 16
New Initiative: The Naturalness of Software
Devanbu, P. (2015) · 2015 IEEE/ACM 37th IEEE International Conference on Software Engineering · doi:10.1109/icse.2015.190 · Cited by 9
Entropy Guided Spectrum Based Bug Localization Using Statistical Language Model
Chakraborty, S., Li, Y., Irvine, M., Saha, R., & Ray, B. (2018) · arXiv · doi:10.48550/arxiv.1802.06947 · Cited by 7
“Real-world software that are developed by regular programmers tend to be highly repetitive and predictable [22].”
Metadata
- Authors
- Gabel, M., & Su, Z.
- Venue
- Proceedings of the eighteenth ACM SIGSOFT international symposium on Foundations of software engineering
- Publisher
- ACM
- Published
- 2010-11-07
- Pages
- 147-156
- OpenAlex
- W2143960295
- Cited by
- 215
- References
- 3
- FWCI
- 8.32
- Type
- conference paper
- Language
- en
- Open access
- closed
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review
Data sources
Bibliographic data: Semantic Scholar, OpenAlex, Crossref.
Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).
Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.