Skip to main content
Erschienen in: Empirical Software Engineering 6/2015

01.12.2015

Recommending reference API documentation

verfasst von: Martin P. Robillard, Yam B. Chhetri

Erschienen in: Empirical Software Engineering | Ausgabe 6/2015

Einloggen

Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.

search-config
loading …

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.

Sie haben noch keine Lizenz? Dann Informieren Sie sich jetzt über unsere Produkte:

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Fußnoten
1
All quoted examples are taken from the reference documentation of the Java 6 SE APIs (http://​docs.​oracle.​com/​javase/​6/​docs/​api/​).
 
2
The coding guide is available on our project web page http://​swevo.​cs.​mcgill.​ca/​apireco/​
 
3
http://docs.oracle.com/javase/6/docs/api/
 
4
http://wordnet.princeton.edu/
 
5
https://sites.google.com/site/naturallanguagetoolkit/Home
 
6
The complete list can be found on our project web page (see footnote 2).
 
Literatur
Zurück zum Zitat Arnout K, Meyer B (2003) Uncovering hidden contracts: The .NET example. Comput 36 (11):48–55CrossRef Arnout K, Meyer B (2003) Uncovering hidden contracts: The .NET example. Comput 36 (11):48–55CrossRef
Zurück zum Zitat 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 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
Zurück zum Zitat Cohen J (1960) A coefficient of agreement for nominal scales. Educ Psychol Meas 20 (1):37–46CrossRef Cohen J (1960) A coefficient of agreement for nominal scales. Educ Psychol Meas 20 (1):37–46CrossRef
Zurück zum Zitat Cwalina K, Abrams B (2008) Framework Design Guidelines: convention, idioms, and patterns for reusable .NET libraries, 2nd edn. Addison-Wesley Professional Cwalina K, Abrams B (2008) Framework Design Guidelines: convention, idioms, and patterns for reusable .NET libraries, 2nd edn. Addison-Wesley Professional
Zurück zum Zitat Dekel U, Herbsleb JD (2009) Improving API documentation usability with knowledge pushing. In: Proceedings of the 31st international conference software engineering, pp 320–330 Dekel U, Herbsleb JD (2009) Improving API documentation usability with knowledge pushing. In: Proceedings of the 31st international conference software engineering, pp 320–330
Zurück zum Zitat 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 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
Zurück zum Zitat 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 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
Zurück zum Zitat 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 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
Zurück zum Zitat Hariri N, Castro-Herrera C, Cleland-Huang J, Mobasher B (2014) Chapter 17: Recommendation systems in requirements discovery. In: Robillard MP, Maalej W, Walker R J, Zimmermann T (eds) Recommendation systems in software engineering. Springer Hariri N, Castro-Herrera C, Cleland-Huang J, Mobasher B (2014) Chapter 17: Recommendation systems in requirements discovery. In: Robillard MP, Maalej W, Walker R J, Zimmermann T (eds) Recommendation systems in software engineering. Springer
Zurück zum Zitat 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 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
Zurück zum Zitat 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 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
Zurück zum Zitat Jurafsky D, Martin JH (2008) Speech and language processing, 2nd edn. Prentice Hall Jurafsky D, Martin JH (2008) Speech and language processing, 2nd edn. Prentice Hall
Zurück zum Zitat 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 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
Zurück zum Zitat 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 987 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 987
Zurück zum Zitat Kof L (2007) Scenarios: identifying missing objects and actions by means of computational linguistics. In: RE, pp 121–130 Kof L (2007) Scenarios: identifying missing objects and actions by means of computational linguistics. In: RE, pp 121–130
Zurück zum Zitat Maalej W, Robillard M P (2013) Patterns of knowledge in API reference documentation. IEEE Trans Softw Eng 39 (9):1264–1282CrossRef Maalej W, Robillard M P (2013) Patterns of knowledge in API reference documentation. IEEE Trans Softw Eng 39 (9):1264–1282CrossRef
Zurück zum Zitat Manning C D, Raghavan P, Schu̇tze H (2008) Introduction to information retrieval. Cambridge University Press Manning C D, Raghavan P, Schu̇tze H (2008) Introduction to information retrieval. Cambridge University Press
Zurück zum Zitat Neuendorf KA (2002) The content analysis guidebook. Sage Neuendorf KA (2002) The content analysis guidebook. Sage
Zurück zum Zitat 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 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
Zurück zum Zitat 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 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
Zurück zum Zitat 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 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
Zurück zum Zitat 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 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
Zurück zum Zitat Robillard M P (2009) What makes APIs hard to learn? Answers from developers. IEEE Softw 26 (6):27–34CrossRef Robillard M P (2009) What makes APIs hard to learn? Answers from developers. IEEE Softw 26 (6):27–34CrossRef
Zurück zum Zitat Robillard M P, DeLine R (2011) A field study of API learning obstacles. Empir Softw Eng 16 (6):703–732CrossRef Robillard M P, DeLine R (2011) A field study of API learning obstacles. Empir Softw Eng 16 (6):703–732CrossRef
Zurück zum Zitat 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 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
Zurück zum Zitat 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 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
Zurück zum Zitat 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 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
Zurück zum Zitat 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 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
Zurück zum Zitat 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 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
Zurück zum Zitat 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 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
Zurück zum Zitat Ying A T, Robillard M P (2014). In: Robillard MP, Maalej W, Walker R J, Zimmermann T (eds) Developer profiles for recommendation systems. Springer, Recommendation systems in software engineering Ying A T, Robillard M P (2014). In: Robillard MP, Maalej W, Walker R J, Zimmermann T (eds) Developer profiles for recommendation systems. Springer, Recommendation systems in software engineering
Zurück zum Zitat 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 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
Metadaten
Titel
Recommending reference API documentation
verfasst von
Martin P. Robillard
Yam B. Chhetri
Publikationsdatum
01.12.2015
Verlag
Springer US
Erschienen in
Empirical Software Engineering / Ausgabe 6/2015
Print ISSN: 1382-3256
Elektronische ISSN: 1573-7616
DOI
https://doi.org/10.1007/s10664-014-9323-y

Weitere Artikel der Ausgabe 6/2015

Empirical Software Engineering 6/2015 Zur Ausgabe

Premium Partner