skip to main content
10.1145/1065010.1065018acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
Article

Jungloid mining: helping to navigate the API jungle

Published: 12 June 2005 Publication History

Abstract

Reuse of existing code from class libraries and frameworks is often difficult because APIs are complex and the client code required to use the APIs can be hard to write. We observed that a common scenario is that the programmer knows what type of object he needs, but does not know how to write the code to get the object.In order to help programmers write API client code more easily, we developed techniques for synthesizing jungloid code fragments automatically given a simple query that describes that desired code in terms of input and output types. A jungloid is simply a unary expression; jungloids are simple, enabling synthesis, but are also versatile, covering many coding problems, and composable, combining to form more complex code fragments. We synthesize jungloids using both API method signatures and jungloids mined from a corpus of sample client programs.We implemented a tool, prospector, based on these techniques. prospector is integrated with the Eclipse IDE code assistance feature, and it infers queries from context so there is no need for the programmer to write queries. We tested prospector on a set of real programming problems involving APIs; prospector found the desired solution for 18 of 20 problems. We also evaluated prospector in a user study, finding that programmers solved programming problems more quickly and with more reuse when using prospector than without prospector.

References

[1]
R. Alur, P. Černý, P. Madhusudan, and W. Nam. Synthesis of interface specifications for java classes.
[2]
G. Ammons, R. Bodík, and J. Larus. Mining specifications. ACM SIGPLAN Notices, 37(1):4--16, Jan. 2002.
[3]
J. Arthorne and C. Laffra. Official Eclipse 3.0 FAQs. Addison-Wesley Professional, 2004.
[4]
J. Ferrante, K. J. Ottenstein, and J. D. Warren. The program dependence graph and its use in optimization. ACM Trans. Program. Lang. Syst., 9(3):319--349, 1987.
[5]
S. Horwitz and T. Reps. The use of program dependence graphs in software engineering. In Proceedings of the 14th international conference on Software engineering, pages 392--411. ACM Press, 1992.
[6]
A. J. Ko, B. A. Myers, and H. H. Aung. Six learning barriers in end-user programming systems.
[7]
R. Komondoor and S. Horwitz. Effective, automatic procedure extraction. In Proceedings of the 11th IEEE International Workshop on Program Comprehension, page 33. IEEE Computer Society, 2003.
[8]
K. J. Lieberherr. Component enhancement: An adaptive reusability mechanism for groups of collaborating classes. In J. van Leeuwen, editor, Information Processing '92, 12th World Computer Congress, pages 179--185, Madrid, Spain, 1992. Elsevier.
[9]
K. J. Lieberherr, W. Hürsch, I. Silva-Lepe, and C. Xiao. Experience with a graph-based propagation pattern programming tool. In G. F. et al., editor, International Workshop on CASE, pages 114--119, Montréal, Canada, 1992. IEEE Computer Society.
[10]
M. Rittri. Retrieving library identifiers via equational matching of types, Jan. 24 1997.
[11]
D. W. Stringer-Calvert. Signature Matching for Ada Software Reuse. Master of engineering, Department of Computer Science, University of York, Mar. 1994.
[12]
R. E. Strom and S. Yemini. Typestate: A programming language concept for enhancing software reliability. IEEE Trans. Softw. Eng., 12(1):157--171, 1986.
[13]
J. van Baalen, P. Robinson, M. R. Lowry, and T. Pressburger. Explaining synthesized software. In Automated Software Engineering, pages 240--248, 1998.
[14]
M. Weiser. Program slicing. In Proceedings of the 5th international conference on Software engineering, pages 439--449. IEEE Press, 1981.
[15]
J. Whaley, M. C. Martin, and M. S. Lam. Automatic extraction of object-oriented component interfaces, July 11 2002.
[16]
Y. Ye and G. Fischer. Supporting reuse by delivering task-relevant and personalized information. In Proceedings of the 24th International Conference on Software Engineering (ICSE-02), pages 513--523, New York, May 19-25 2002. ACM Press.
[17]
D. M. Yellin and R. E. Strom. Protocol specifications and component adaptors. ACM Trans. Program. Lang. Syst., 19(2):292--333, 1997.
[18]
A. M. Zaremski and J. M. Wing. Signature matching: a tool for using software libraries, July 22 1996.
[19]
A. M. Zaremski and J. M. Wing. Specification matching of software components, Dec. 11 1997.

Cited By

View all
  • (2024)Towards Type-Directed API Search for Mainstream LanguagesProceedings of the 9th ACM SIGPLAN International Workshop on Type-Driven Development10.1145/3678000.3678207(50-61)Online publication date: 28-Aug-2024
  • (2024)Equivalence by Canonicalization for Synthesis-Backed RefactoringProceedings of the ACM on Programming Languages10.1145/36564538:PLDI(1879-1904)Online publication date: 20-Jun-2024
  • (2024)API-Driven Program Synthesis for Testing Static Typing ImplementationsProceedings of the ACM on Programming Languages10.1145/36329048:POPL(1850-1881)Online publication date: 5-Jan-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
PLDI '05: Proceedings of the 2005 ACM SIGPLAN conference on Programming language design and implementation
June 2005
338 pages
ISBN:1595930566
DOI:10.1145/1065010
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 40, Issue 6
    Proceedings of the 2005 ACM SIGPLAN conference on Programming language design and implementation
    June 2005
    325 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/1064978
    Issue’s Table of Contents
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: 12 June 2005

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. mining
  2. program synthesis
  3. reuse

Qualifiers

  • Article

Conference

PLDI05
Sponsor:

Acceptance Rates

Overall Acceptance Rate 406 of 2,067 submissions, 20%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)26
  • Downloads (Last 6 weeks)4
Reflects downloads up to 10 Nov 2024

Other Metrics

Citations

Cited By

View all
  • (2024)Towards Type-Directed API Search for Mainstream LanguagesProceedings of the 9th ACM SIGPLAN International Workshop on Type-Driven Development10.1145/3678000.3678207(50-61)Online publication date: 28-Aug-2024
  • (2024)Equivalence by Canonicalization for Synthesis-Backed RefactoringProceedings of the ACM on Programming Languages10.1145/36564538:PLDI(1879-1904)Online publication date: 20-Jun-2024
  • (2024)API-Driven Program Synthesis for Testing Static Typing ImplementationsProceedings of the ACM on Programming Languages10.1145/36329048:POPL(1850-1881)Online publication date: 5-Jan-2024
  • (2023)How Practitioners Expect Code Completion?Proceedings of the 31st ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering10.1145/3611643.3616280(1294-1306)Online publication date: 30-Nov-2023
  • (2023)A Systematic Review of Automated Query Reformulations in Source Code SearchACM Transactions on Software Engineering and Methodology10.1145/360717932:6(1-79)Online publication date: 4-Jul-2023
  • (2023)Big Code Search: A BibliographyACM Computing Surveys10.1145/360490556:1(1-49)Online publication date: 26-Aug-2023
  • (2023)Mining relevant solutions for programming tasks from search engine resultsIET Software10.1049/sfw2.1212717:4(455-471)Online publication date: 14-Jun-2023
  • (2023)Fitting missing API puzzles with machine translation techniquesExpert Systems with Applications10.1016/j.eswa.2022.119477216(119477)Online publication date: Apr-2023
  • (2023)Automated variable renaming: are we there yet?Empirical Software Engineering10.1007/s10664-022-10274-828:2Online publication date: 14-Feb-2023
  • (2022)Exploring the Learnability of Program Synthesizers by Novice ProgrammersProceedings of the 35th Annual ACM Symposium on User Interface Software and Technology10.1145/3526113.3545659(1-15)Online publication date: 29-Oct-2022
  • Show More Cited By

View Options

Get Access

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