Nothing Special   »   [go: up one dir, main page]

skip to main content
article

Recommending reference API documentation

Published: 01 December 2015 Publication History

Abstract

Reference documentation is an important source of information on API usage. However, information useful to programmers can be buried in irrelevant text, or attached to a non-intuitive API element, making it difficult to discover. We propose to detect and recommend fragments of API documentation potentially important to a programmer who has already decided to use a certain API element. We categorize text fragments in API documentation based on whether they contain information that is indispensable, valuable, or neither. From the fragments that contain knowledge worthy of recommendation, we extract word patterns, and use these patterns to automatically find new fragments that contain similar knowledge in unseen documentation. We implemented our technique in a tool, Krec, that supports both information filtering and discovery. In an evaluation study with randomly-sampled method definitions from ten open source systems, we found that with a training set derived from about 1000 documentation units, we could issue recommendations with 90 % precision and 69 % recall. In a study involving ten independent assessors, indispensable knowledge items recommended for API types were judged useful 57 % of the time and potentially useful an additional 30 % of the time.

References

[1]
Arnout K, Meyer B (2003) Uncovering hidden contracts: the .NET example. Comput 36(11):48-55.
[2]
Austin C (2004) J2SE 5.0 in a nutshell. Sun developer network article. http://java.sun.com/developer/technicalArticles/releases/j2se15/.
[3]
Bloch J (2008) Effective Java, 2nd edn. Prentice Hall. http://java.sun.com/docs/books/effective/.
[4]
Brandt J, Guo PJ, Lewenstein J, Dontcheva M, Klemmer SR (2009) Two studies of opportunistic programming: interleaving web foraging, learning, and writing code. In: Proceedings of the 27th international conference on human factors in computing systems, pp 1589-1598.
[5]
Cohen J (1960) A coefficient of agreement for nominal scales. Educ Psychol Meas 20(1):37-46.
[6]
Cwalina K, Abrams B (2008) Framework Design Guidelines: convention, idioms, and patterns for reusable .NET libraries, 2nd edn. Addison-Wesley Professional.
[7]
Dekel U, Herbsleb JD (2009) Improving API documentation usability with knowledge pushing. In: Proceedings of the 31st international conference software engineering, pp 320-330.
[8]
Duala-Ekoko E, Robillard MP (2011) Using structure-based recommendations to facilitate discoverability in APIs. In: Proceedings of the 25th European conference on object-oriented programming, pp 79-104.
[9]
Duala-Ekoko E, Robillard MP (2012) Asking and answering questions about unfamiliar APIs: An exploratory study. In: Proceedings of the 34th IEEE/ACM international conference on software engineering, pp 266-276.
[10]
Fantechi A, Gnesi S, Lami G, Maccari A (2002) Application of linguistic techniques for use case analysis. In: Proceedings of the IEEE international joint conference on requirements engineering, pp 157-164.
[11]
Hariri N, Castro-Herrera C, Cleland-Huang J, Mobasher B (2014) Chapter 17: Recommendation systems in requirements discovery. In: Robillard MP, Maalej W, Walker RJ, Zimmermann T (eds) Recommendation systems in software engineering. Springer.
[12]
Henß S, Monperrus M, Mezini M (2012) Semi-automatically extracting FAQs to improve accessibility of software development knowledge. In: Proceedings of the 34th international conference software engineering, pp 793-803.
[13]
Javadoc (2001) Javadoc. http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html.
[14]
Jeong SY, Xie Y, Beaton J, Myers BA, Stylos J, Ehret R, Karstens J, Efeoglu A, Busse DK (2009) Improving documentation for eSOA APIs through user studies. In: Proceedings of the 2nd international symposium on end-user development, pp 86-105.
[15]
Jurafsky D, Martin JH (2008) Speech and language processing, 2nd edn. Prentice Hall.
[16]
Kawrykow D, Robillard MP (2009) Improving API usage through detection of redundant code. In: Proceedings of the 24th international conference on automated software engineering, pp 111-122.
[17]
Kim J, Lee S, won Hwang S, Kim S (2009) Adding examples into Java documents. In: Proceedings of the 2009 international conference on automated software engineering, pp 540-544.
[18]
Kof L (2007) Scenarios: identifying missing objects and actions by means of computational linguistics. In: RE, pp 121-130.
[19]
Landis JR, Koch GG (1977) The measurement of observer agreement for categorical data. Biom 33(1):159- 174.
[20]
Maalej W, Robillard MP (2013) Patterns of knowledge in API reference documentation. IEEE Trans Softw Eng 39(9):1264-1282.
[21]
Manning CD, Raghavan P, Schutze H (2008) Introduction to information retrieval. Cambridge University Press, Cambridge.
[22]
Monperrus M, Eichberg M, Tekes E, Mezini M (2011) What should developers be aware of? An empirical study on the directives of API documentation. Empir Softw Eng 17:703-737.
[23]
Neuendorf KA (2002) The content analysis guidebook. Sage.
[24]
Nykaza J, Messinger R, Boehme F, Norman CL, Mace M, Gordon M (2002) What programmers really want: results of a needs assessment for SDK documentation. In: Proceedings of the 20th annual international conference on computer documentation, pp 133-141.
[25]
Pagano D, Maalej W (2011) How do developers blog? An explorative study. In: Proceedings of the 8th working conference on mining software repositories, p 10.
[26]
Pandita R, Xiao X, Zhong H, Xie T, Oney S, Paradkar A (2012) Inferring method specifications from natural language API descriptions. In: Proceedings of the 34th IEEE/ACM international conference on software engineering, pp 815-825.
[27]
Panichella S, Aponte J, Di Penta M, Marcus A, Canfora G (2012) Mining source code descriptions from developer communications. In: Proceedings of the 20th IEEE international conference on program comprehension, pp 63-72.
[28]
Robillard MP (2009) What makes APIs hard to learn? Answers from developers. IEEE Softw 26(6):27-34.
[29]
Robillard MP, DeLine R (2011) A field study of API learning obstacles. Empir Softw Eng 16(6):703-732.
[30]
Shepherd D, Fry ZP, Hill E, Pollock L, Vijay-Shanker K (2007) Using natural language program analysis to locate and understand action-oriented concerns. In: Proceedings of the 6th international conference aspect-oriented software development, pp 212-224.
[31]
Stylos J, Myers BA (2008) The implications of method placement on API learnability. In: Proceedings of the 16th ACM SIGSOFT international symposium on the foundations of software engineering, pp 105-112.
[32]
Stylos J, Faulring A, Yang Z, Myers BA (2009) Improving API documentation using API usage information. In: Proceedings of the 2009 IEEE Symposium on visual languages and human-centric computing, pp 119-126.
[33]
Tan L, Yuan D, Krishna G, Zhou Y (2007) /*icomment: bugs or bad comments?*/. In: Proceedings of the 21st ACM SIGOPS symposium on operating systems principles, pp 145-158.
[34]
Xiao X, Paradkar A, Thummalapenta S, Xie T (2012) Automated extraction of security policies from natural-language software documents. In: Proceedings of the 20th ACM SIGSOFT international symposium on the foundations of software engineering.
[35]
Ye Y, Fischer G (2002) Supporting reuse by delivering task-relevant and personalized information. In: Proceedings of the 24th ACM/IEEE international conference on software engineering, pp 513-523.
[36]
Ying AT, Robillard MP (2014). In: Robillard MP, Maalej W, Walker RJ, Zimmermann T (eds) Developer profiles for recommendation systems. Springer, Recommendation systems in software engineering.
[37]
Zhong H, Zhang L, Xie T, Mei H (2009) Inferring resource specifications from natural language API documentation. In: Proceedings of the 2009 international conference on automated software engineering, pp 307-318.

Cited By

View all
  • (2024)An Empirical Study of API Misuses of Data-Centric LibrariesProceedings of the 18th ACM/IEEE International Symposium on Empirical Software Engineering and Measurement10.1145/3674805.3686685(245-256)Online publication date: 24-Oct-2024
  • (2023)Do CONTRIBUTING Files Provide Information about OSS Newcomers’ Onboarding Barriers?Proceedings of the 31st ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering10.1145/3611643.3616288(16-28)Online publication date: 30-Nov-2023
  • (2023)Automated Summarization of Stack Overflow PostsProceedings of the 45th International Conference on Software Engineering10.1109/ICSE48619.2023.00158(1853-1865)Online publication date: 14-May-2023
  • Show More Cited By
  1. Recommending reference API documentation

    Recommendations

    Comments

    Please enable JavaScript to view thecomments powered by Disqus.

    Information & Contributors

    Information

    Published In

    cover image Empirical Software Engineering
    Empirical Software Engineering  Volume 20, Issue 6
    December 2015
    491 pages

    Publisher

    Kluwer Academic Publishers

    United States

    Publication History

    Published: 01 December 2015

    Author Tags

    1. API documentation
    2. Application programming interfaces
    3. Natural language processing
    4. Recommendation systems
    5. Text classification

    Qualifiers

    • Article

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)0
    • Downloads (Last 6 weeks)0
    Reflects downloads up to 28 Nov 2024

    Other Metrics

    Citations

    Cited By

    View all
    • (2024)An Empirical Study of API Misuses of Data-Centric LibrariesProceedings of the 18th ACM/IEEE International Symposium on Empirical Software Engineering and Measurement10.1145/3674805.3686685(245-256)Online publication date: 24-Oct-2024
    • (2023)Do CONTRIBUTING Files Provide Information about OSS Newcomers’ Onboarding Barriers?Proceedings of the 31st ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering10.1145/3611643.3616288(16-28)Online publication date: 30-Nov-2023
    • (2023)Automated Summarization of Stack Overflow PostsProceedings of the 45th International Conference on Software Engineering10.1109/ICSE48619.2023.00158(1853-1865)Online publication date: 14-May-2023
    • (2023)A decade of code comment quality assessmentJournal of Systems and Software10.1016/j.jss.2022.111515195:COnline publication date: 1-Jan-2023
    • (2023)Leveraging Stack Overflow to detect relevant tutorial fragments of APIsEmpirical Software Engineering10.1007/s10664-022-10235-128:1Online publication date: 1-Jan-2023
    • (2023)Automatic recognizing relevant fragments of APIs using API referencesAutomated Software Engineering10.1007/s10515-023-00401-031:1Online publication date: 19-Nov-2023
    • (2022)Retrieving API Knowledge from Tutorials and Stack Overflow Based on Natural Language QueriesACM Transactions on Software Engineering and Methodology10.1145/356579932:5(1-36)Online publication date: 7-Oct-2022
    • (2021)A Systematic Review of API Evolution LiteratureACM Computing Surveys10.1145/347013354:8(1-36)Online publication date: 4-Oct-2021
    • (2021)Discovering API Directives from API Specifications with Text ClassificationJournal of Computer Science and Technology10.1007/s11390-021-0235-136:4(922-943)Online publication date: 1-Jul-2021
    • (2021)Generating API tags for tutorial fragments from Stack OverflowEmpirical Software Engineering10.1007/s10664-021-09962-826:4Online publication date: 1-Jul-2021
    • Show More Cited By

    View Options

    View options

    Login options

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media