[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ skip to main content
10.1145/1062455.1062491acmconferencesArticle/Chapter ViewAbstractPublication PagesicseConference Proceedingsconference-collections
Article

Using structural context to recommend source code examples

Published: 15 May 2005 Publication History

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.

References

[1]
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.
[2]
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.
[3]
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.
[4]
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.
[5]
R. Holmes. Using structural context to recommend source code examples. Master's thesis, University of British Columbia, 2004.
[6]
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.
[7]
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.
[8]
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.
[9]
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.
[10]
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.
[11]
E. Rissland. Examples and learning systems. In Adaptive Control of Ill-Defined Systems. Plenum, 1983.
[12]
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.
[13]
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.
[14]
Y. Ye, G. Fischer, and B. Reeves. Integrating active information delivery and reuse repository systems. In Foundations of Software Engineering, pages 60--68, 2000.

Cited By

View all
  • (2024)Significant Productivity Gains through Programming with Large Language ModelsProceedings of the ACM on Human-Computer Interaction10.1145/36611458:EICS(1-29)Online publication date: 17-Jun-2024
  • (2024)SolaSim: Clone Detection for Solana Smart Contracts via Program RepresentationProceedings of the 32nd IEEE/ACM International Conference on Program Comprehension10.1145/3643916.3644406(258-269)Online publication date: 15-Apr-2024
  • (2024)Revisiting file context for source code summarizationAutomated Software Engineering10.1007/s10515-024-00460-x31:2Online publication date: 27-Jul-2024
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Conferences
ICSE '05: Proceedings of the 27th international conference on Software engineering
May 2005
754 pages
ISBN:1581139632
DOI:10.1145/1062455
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 15 May 2005

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. development environment framework
  2. examples
  3. recommender
  4. software structure

Qualifiers

  • Article

Conference

ICSE05
Sponsor:

Acceptance Rates

Overall Acceptance Rate 276 of 1,856 submissions, 15%

Upcoming Conference

ICSE 2025

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)35
  • Downloads (Last 6 weeks)2
Reflects downloads up to 17 Jan 2025

Other Metrics

Citations

Cited By

View all
  • (2024)Significant Productivity Gains through Programming with Large Language ModelsProceedings of the ACM on Human-Computer Interaction10.1145/36611458:EICS(1-29)Online publication date: 17-Jun-2024
  • (2024)SolaSim: Clone Detection for Solana Smart Contracts via Program RepresentationProceedings of the 32nd IEEE/ACM International Conference on Program Comprehension10.1145/3643916.3644406(258-269)Online publication date: 15-Apr-2024
  • (2024)Revisiting file context for source code summarizationAutomated Software Engineering10.1007/s10515-024-00460-x31:2Online publication date: 27-Jul-2024
  • (2023)Big Code Search: A BibliographyACM Computing Surveys10.1145/360490556:1(1-49)Online publication date: 26-Aug-2023
  • (2023)Code Search: A Survey of Techniques for Finding CodeACM Computing Surveys10.1145/356597155:11(1-31)Online publication date: 9-Feb-2023
  • (2023)Many-objective Grammar-guided Genetic Programming with Code Similarity Measurement for Program Synthesis2023 IEEE Latin American Conference on Computational Intelligence (LA-CCI)10.1109/LA-CCI58595.2023.10409432(1-6)Online publication date: 29-Oct-2023
  • (2023)Designing Adaptive Developer-Chatbot Interactions: Context Integration, Experimental Studies, and Levels of AutomationProceedings of the 45th International Conference on Software Engineering: Companion Proceedings10.1109/ICSE-Companion58688.2023.00064(235-239)Online publication date: 14-May-2023
  • (2023)ASTSDL: predicting the functionality of incomplete programming code via an AST-sequence-based deep learning modelScience China Information Sciences10.1007/s11432-021-3665-167:1Online publication date: 27-Dec-2023
  • (2023)Context-aware API recommendation using tensor factorizationScience China Information Sciences10.1007/s11432-021-3529-966:2Online publication date: 12-Jan-2023
  • (2023)An empirical study on API usages from code search engine and local libraryEmpirical Software Engineering10.1007/s10664-023-10304-z28:3Online publication date: 13-Apr-2023
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media