ABSTRACT
When coding to a framework, developers often become stuck, unsure of which class to subclass, which objects to instantiate and which methods to call. Example code that demonstrates the use of the framework can help developers make progress on their task. In this paper, we describe an approach for locating relevant code in an example repository that is based on heuristically matching the structure of the code under development to the example code. Our tool improves on existing approaches in two ways. First, the structural context needed to query the repository is extracted automatically from the code, freeing the developer from learning a query language or from writing their code in a particular style. Second, the repository can be generated easily from existing applications. We demonstrate the utility of this approach by reporting on a case study involving two subjects completing four programming tasks within the Eclipse integrated development environment framework.
- I. D. Baxter, A. Yahin, L. M. D. Moura, M. Sant'Anna, and L. Bier. Clone detection using abstract syntax trees. In Proc. of Int'l Conf. on Soft. Maintenance, pages 368--377, 1998. Google ScholarDigital Library
- D. Cubranic and G. C. Murphy. Hipikat: Recommending pertinent software development artifacts. In Proc. of the 25th Int'l Conf. on Software Engineering, pages 408--418, 2003. Google ScholarDigital Library
- S. Henninger. Retrieving software objects in an example-based programming environment. In Proc. of the 14th Int'l ACM SIGIR Conf. on Research and Development in Information Retrieval, pages 251--260, 1991. Google ScholarDigital Library
- R. Hill and J. Rideout. Automatic method completion. In Proc. of the 19th IEEE Int'l Conf. on Automated Software Engineering, pages 228--235, 2004. Google ScholarDigital Library
- R. Holmes. Using structural context to recommend source code examples. Master's thesis, University of British Columbia, 2004.Google Scholar
- K. Inoue, R. Yokomori, H. Fujiwara, T. Yamamoto, M. Matsushita, and S. Kusumoto. Component rank: Relative significance rank for software component search. In Proc. of the 25th Int'l Conf. on Software Engineering, pages 14--24, 2003. Google ScholarDigital Library
- R. E. Johnson. Documenting frameworks using patterns. In Proc. of the Conf. on Object-Oriented Programming Systems, Languages, and Applications (OOPSLA), pages 63--72, 1992. Google ScholarDigital Library
- A. Michail. Data mining library reuse patterns using generalized association rules. In Proc. of the 22nd Int'l Conf. on Software Engineering, pages 167--176, 2000. Google ScholarDigital Library
- A. Michail. Code web: Data mining library reuse patterns. In Proc. of the 23rd Int'l Conf. on Software Engineering, pages 827--828. IEEE Computer Society, 2001. Google ScholarDigital Library
- L. R. Neal. A system for example-based programming. In Proc. of the SIGCHI Conf. on Human Factors in Computing Systems, pages 63--68. ACM Press, 1989. Google ScholarDigital Library
- E. Rissland. Examples and learning systems. In Adaptive Control of Ill-Defined Systems. Plenum, 1983.Google Scholar
- M. B. Rosson and J. M. Carroll. The reuse of uses in Smalltalk programming. ACM Transactions on Computer-Human Interaction, 3(3):219--253, 1996. Google ScholarDigital Library
- Y. Ye and G. Fischer. Supporting reuse by delivering task-relevant and personalized information. In Proc. of the 24th Int'l Conf. on Software Engineering, pages 513--523, 2002. Google ScholarDigital Library
- Y. Ye, G. Fischer, and B. Reeves. Integrating active information delivery and reuse repository systems. In Foundations of Software Engineering, pages 60--68, 2000. Google ScholarDigital Library
Index Terms
- Using structural context to recommend source code examples
Recommendations
Structurally Heterogeneous Source Code Examples from Unstructured Knowledge Sources
PEPM '15: Proceedings of the 2015 Workshop on Partial Evaluation and Program ManipulationSoftware developers rarely write code from scratch. With the existence of Wikipedia, discussion forums, books and blogs, it is hard to imagine a software developer not looking up these sites for sample code while building any non-trivial software ...
Detect Related Bugs from Source Code Using Bug Information
COMPSAC '10: Proceedings of the 2010 IEEE 34th Annual Computer Software and Applications ConferenceOpen source projects often maintain open bug repositories during development and maintenance, and the reporters often point out straightly or implicitly the reasons why bugs occur when they submit them. The comments about a bug are very valuable for ...
Eliciting design requirements for maintenance-oriented IDEs: a detailed study of corrective and perfective maintenance tasks
ICSE '05: Proceedings of the 27th international conference on Software engineeringRecently, several innovative tools have found their way into mainstream use in modern development environments. However, most of these tools have focused on creating and modifying code, despite evidence that most of programmers' time is spent ...
Comments