XSnippet: mining For sample code
The DOI matches its Crossref record; 11 of the 11 references it cites were found in a registry or an index.
Abstract
It is common practice for software developers to use examples to guide development efforts. This largely unwritten, yet standard, practice of "develop by example" is often supported by examples bundled with library or framework packages, provided in textbooks, and made available for download on both official and unofficial web sites. However, the vast number of examples that are embedded in the billions of lines of already developed library and framework code are largely untapped. We have developed XSnippet, a context-sensitive code assistant framework that allows developers to query a sample repository for code snippets that are relevant to the programming task at hand. In particular, our work makes three primary contributions. First, a range of queries is provided to allow developers to switch between a context-independent retrieval of code snippets to various degrees of context-sensitive retrieval for object instantiation queries. Second, a novel graph-based code mining algorithm is provided to support the range of queries and enable mining within and across method boundaries. Third, an innovative context-sensitive ranking heuristic is provided that has been experimentally proven to provide better ranking for best-fit code snippets than context-independent heuristics such as shortest path and frequency. Our experimental evaluation has shown that XSnippet has significant potential to assist developers, and provides better coverage of tasks and better rankings for best-fit snippets than other code assistant systems.
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
Component-Based Software Engineering: Putting the Pieces Together
Heineman, G. T., & Councill, W. T. (2001) · Medical Entomology and Zoology · Cited by 897
Classifying Software for Reusability
Prieto-Díaz, R., & Freeman, P. (1987) · IEEE Software · doi:10.1109/ms.1987.229789 · Cited by 785
Jungloid mining: helping to navigate the API jungle
Mandelin, D., Xu, L., Bodík, R., & Kimelman, D. (2005) · ACM SIGPLAN Notices · doi:10.1145/1064978.1065018 · Cited by 388
Using structural context to recommend source code examples
Holmes, R., & Murphy, G. C. (2005) · Proceedings of the 27th international conference on Software engineering - ICSE '05 · doi:10.1145/1062455.1062491 · Cited by 379 · cited 12×
“Strathcona [8] uses different structural context descriptions (parents, invocations, and types) encapsulated in a class (code under development) to create a set of heuristics.”
BackgroundMethodInfluentialHow reuse influences productivity in object-oriented systems
Basili, V. R., Briand, L. C., & Melo, W. L. (1996) · Communications of the ACM · doi:10.1145/236156.236184 · Cited by 271 · cited 1×
“Today’s programmer relies on frameworks and libraries, such as C++ libraries, Java packages, Eclipse packages, and in-house libraries [4, 1, 6, 10, 13, 8],”
BackgroundJungloid mining: helping to navigate the API jungle
Mandelin, D., Xu, L., Bodík, R., & Kimelman, D. (2005) · Proceedings of the 2005 ACM SIGPLAN conference on Programming language design and implementation · doi:10.1145/1065010.1065018 · Cited by 261
Supporting reuse by delivering task-relevant and personalized information
Ye, Y., & Fischer, G. (2002) · Proceedings of the 24th international conference on Software engineering - ICSE '02 · doi:10.1145/581339.581402 · Cited by 235 · cited 1×
“These approaches include keyword-based [12], faceted [14], signature matching [21], specification matching [22, 9], test cases [5], comment matching [20, 19] and name matching [17].”
MethodResearch directions in software composition
Nierstrasz, O., & Meijler, T. D. (1995) · ACM Computing Surveys · doi:10.1145/210376.210389 · Cited by 138 · cited 1×
“Today’s programmer relies on frameworks and libraries, such as C++ libraries, Java packages, Eclipse packages, and in-house libraries [4, 1, 6, 10, 13, 8],”
BackgroundHILL, R., & Rideout, J. R. (2004) · Automated Software Engineering · doi:10.1109/ase.2004.19 · Cited by 66
Integrating active information delivery and reuse repository systems
Ye, Y., Fischer, G., & Reeves, B. N. (2000) · ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE) · doi:10.1145/355045.355053 · Cited by 56 · cited 1×
“These approaches include keyword-based [12], faceted [14], signature matching [21], specification matching [22, 9], test cases [5], comment matching [20, 19] and name matching [17].”
MethodAlgorithm for documents ranking
Drori, O. (2002) · Proceedings/Proceedings of the ... International Conference on Software Engineering and Knowledge Engineering · doi:10.1145/568760.568779 · Cited by 7 · cited 1×
“On average, a user can only be expected to scan the first ten or so code snippets returned by any search or mining process [3].”
Background
Cited by
(2009) · doi:10.1145/1518701.1518944 · Cited by 447
MAPO: Mining and Recommending API Usage Patterns
Zhong, H., Xie, T., Zhang, L., Pei, J., & Mei, H. (2009) · Lecture Notes in Computer Science · doi:10.1007/978-3-642-03013-0_15 · Cited by 410
Parseweb: a programmer assistant for reusing open source code on the web
Thummalapenta, S., & Xie, T. (2007) · Proceedings of the twenty-second IEEE/ACM international conference on Automated software engineering · doi:10.1145/1321631.1321663 · Cited by 391
Learning from examples to improve code completion systems
Bruch, M., Monperrus, M., & Mezini, M. (2009) · Proceedings of the 7th joint meeting of the European software engineering conference and the ACM SIGSOFT symposium on The foundations of software engineering · doi:10.1145/1595696.1595728 · Cited by 378
Example-centric programming: integrating web search into the development environment
Brandt, J., Dontcheva, M., Weskamp, M., & Klemmer, S. R. (2010) · Proceedings of the SIGCHI Conference on Human Factors in Computing Systems · doi:10.1145/1753326.1753402 · Cited by 324
“This work has addressed the availability of example code problem by mining code repositories [25, 28] or synthesizing example code from API specifications [21].”
Method
Metadata
- Authors
- Sahavechaphan, N., & Claypool, K.
- Venue
- Proceedings of the 21st annual ACM SIGPLAN conference on Object-oriented programming systems, languages, and applications
- Publisher
- ACM
- Published
- 2006-10-16
- Pages
- 413-430
- OpenAlex
- W2056139220
- Cited by
- 222
- References
- 11
- FWCI
- 10.52
- 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.