Skip to main content
Log in

Why do they ask? An exploratory study of crowd discussions about Android application programming interface in stack overflow

在 Stack Overflow 平台上关于安卓应用程序接口群体讨论的探索性研究

  • Published:
Journal of Central South University Aims and scope Submit manuscript

Abstract

Nowadays, more and more Android developers prefer to seek help from Q&A website like Stack Overflow, despite the rich official documentation. Several researches have studied the limitations of the official application programming interface (API) documentations and proposed approaches to improve them. However, few of them digged into the requirements of the third-party developers to study this. In this work, we gain insight into this question from multidimensional perspectives of API developers and API users by a kind of cross-validation. We propose a hybrid approach, which combines manual inspection on artifacts and online survey on corresponding developers, to explore the different focus between these two types of stakeholders. In our work, we manually inspect 1000 posts and receive 319 questionnaires in total. Through the mutual verification of the inspection and survey process, we found that the users are more concerned with the usage of API, while the official documentation mainly provides functional description. Furthermore, we identified 9 flaws of the official documentation and summarized 12 aspects (from the content to the representation) for promotion to improve the official API documentations.

摘要

如今尽管安卓的官方文档内容越来越丰富, 但是越来愈多的安卓开发人员更愿意在 Stack Overflow 等问答社区中寻求帮助, 而不是在安卓官方文档中寻找答案。对此, 一些研究者对官方文档 的局限性进行研究, 并提出改进方法, 但是他们很少有从第三方开发者的需求角度对这个问题进行研 究。本文采用一种交叉验证的方法从 API(应用程序接口)文档维护人员和第三方用户的多维视角研究 这个问题, 提出了一种结合人工检测和调查问卷的混合方法来探索不同利益相关者关注点的不同。在 人工检测过程中我们对 1000 个 Stack Overflow 中的帖子进行分析;在线调查问卷过程中共收到了319 份问卷结果。通过人工检测和调查问卷的相互验证, 我们发现第三方用户更关心如何使用API, 但是 官方文档更多的对 API 的功能进行描述, 缺少如何使用API 的示例。此外, 我们发现了官方文档的9 个缺陷, 并列举了 12 个可以提高API 文档的方式。

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. GENTLEMAN R C, LAREY V J, BATES D M, BOLSTAD B, DETTLING M, DUDOIT S, ELLIS B, GAUTIER L, GE Y, GENTRY J, HORNIK K, HOTHORN T, HUBER W, IACUS S, IRIZARRY R, LEISCH F, LI C, MAECHLER M, ROSSINI A J, SAWITZKI G, SMITH C, SMYTH G, TIERNEY L, YANG J Y H, ZHANG J. Bioconductor: Open software development for computational biology and bioinformatics [J]. Genome Biology, 2004, 5(10): R80.

    Article  Google Scholar 

  2. FORWARD, LETHBRIDGE T C. The relevance of software documentation, tools and technologies: A survey [C]// Proceedings of the 2002 ACM Symposium on Document Engineering. ACM, 2002: 26–33.

    Chapter  Google Scholar 

  3. ROEHM T, TIARKS R, KOSCHKE R, MAALEJ W. How do professional developers comprehend software? [C]// Proceedings of the 34th International Conference on Software Engineering. IEEE, 2012: 255–265.

    Google Scholar 

  4. DEKEL U, HERBSLEB J D. Improving API documentation usability with knowledge pushing [C]// Proceedings of the 31st International Conference on Software Engineering. IEEE Computer Society, 2009: 320–330.

    Google Scholar 

  5. ZHONG H, ZHANG L, XIE T, MEI H. Inferring resource specifications from natural language API documentation [C]// 24th IEEE ACM International Conference IEEE, 2009: 307–318.

    Google Scholar 

  6. CHEN C, ZHANG K. Who asked what: Integrating crowd sourced FAQ s into API documentation [C]// Proceedings of the 36th International Conference on Software Engineering. ACM, 2014: 456–459.

    Google Scholar 

  7. YIN G, WANG T, WANG H, FAN Q, ZHANG Y, YU Y, YANG C. OSSEAN: Mining crowd wisdom in open source communities [C]// Service-Oriented System Engineering (SOSE). IEEE, 2015: 367–371.

    Google Scholar 

  8. UDDIN G, ROBILLARD M P. How API documentation fails [J]. IEEE Software, 2015, 32(4): 68–75.

    Article  Google Scholar 

  9. API documentation [EB/OL]. [2017-6-4]. http://blog.ninlabs.com/2013/03/api-documentation/.

  10. BRANDT J, DONTCHEVA M, WESKAMP M, KLEMMER S R. Example centric programming: Integrating web search into the development environment [C]// Proceedings of the SIGCHI Conference on Human Factors in Computing Systems. ACM, 2010: 513–522.

    Google Scholar 

  11. HARTMANN B, DHILLON M, CHAN M K. Hypersource: Bridging the gap between source and code-related web sites [C]// Proceedings of the SIGCHI Conference on Human Factors in Computing Systems. ACM, 2011: 2207–2210.

    Google Scholar 

  12. STYLOS J, FAULRING A, YANG Z, MYERS B A. Improving API documentation using API usage information [C]// Visual Languages and Human-Centric Computing IEEE Symposium on. IEEE, 2009: 119–126.

    Google Scholar 

  13. STYLOS J, MYERS B A, YANG Z. Improving API documentation using usage information [C]// CHI’ 09 Extended Abstracts on Human Factors in Computing Systems. ACM, 2009: 4429–4434.

    Google Scholar 

  14. MCBURNEY P W, MCMILLAN C. An empirical study of the textual similarity between source code and source code summaries [J]. Empirical Software Engineering, 2016, 21(1): 17–42.

    Article  Google Scholar 

  15. JIANG J, YANG Y, HE J, BLANC X, ZHANG L. Who should comment on this pull request? Analyzing attributes for more accurate commenter recommendation in pull-based development [J]. Information and Software Technology, 2017, 84: 48–62.

    Article  Google Scholar 

  16. YANG D, HUSSAIN A, LOPES C V. From query to usable code: An analysis of stack overflow code snippets [C]// Proceedings of the 13th International Conference on Mining Software Repositories. ACM, 2016: 391–402.

    Google Scholar 

  17. YANG C, ZHANG X, ZENG L, FAN Q, WANG T, YU Y, YIN G, WANG H. RevRec: A two-layer reviewer recommendation algorithm in pull-based development model [J]. Journal of Central South University, 2018, 25(5): 1129–1143.

    Article  Google Scholar 

  18. XUAN Q, ZHANG Z Y, FU C, HU H X, FILKOV V. Social synchrony on complex networks [J]. IEEE Transactions on Cybernetics, 2018, 48(5): 1420–1431.

    Article  Google Scholar 

  19. BOSU A, CORLEY C S, HEATON D, CHATTERJI D, CARVER J C, KRAFT N A. Building reputation in StackOverFlow: An empirical investigation [C]// Proceedings of the 10th Working Conference on Mining Software Repositories. IEEE Press, 2013: 89–92.

    Google Scholar 

  20. KRKA I, BRUN Y, MEDVIDOVIC N. Automatic mining of specifications from invocation traces and method invariants [C]// Proceedings of the 22nd ACM SIGSOFT International Symposium on Foundations of Software Engineering. ACM, 2014: 178–189.

    Google Scholar 

  21. MONPERRUS M, EICHBERG M, TEKES E, MEZINI M. What should developers be aware of an empirical study on the directives of API documentation [J]. Empirical Software Engineering, 2012, 17(6): 703–737.

    Article  Google Scholar 

  22. SAIED M A, SAHRAOUI H, DUFOUR B. An observational study on API usage constraints and their documentation [C]// Software Analysis, Evolution and Reengineering (SPANER), 2015 IEEE 22nd International Conference IEEE, 2015: 33–42.

    Chapter  Google Scholar 

  23. CHE M. An approach to documenting and evolving architectural design decisions [C]// Software Engineering (ICSE), 2013, 35th International Conference IEEE, 2013: 1373–1376.

    Chapter  Google Scholar 

  24. SHAHIN M, LIANG P, LI Z. Do architectural design decisions improve the understanding of software architecture? two controlled experiments [C]// Proceedings of the 22nd International Conference on Program Comprehension. ACM, 2014: 3–13.

    Google Scholar 

  25. ZAPALOWSKI V, NUNES I, NUNES D J. Revealing the relationship between architectural elements and source code characteristics [C]// Proceedings of the 22nd International Conference on Program Comprehension. ACM, 2014: 14–25.

    Google Scholar 

  26. KIRCHMAYR W, MOSER M, NOCKE L, PICHLER J, TOBER R. Integration of static and dynamic code analysis for understanding legacy source code [C]// Software Maintenance and Evolution (ICSME), 2016 IEEE International Conference IEEE. 2016: 543–552.

    Chapter  Google Scholar 

  27. HEIJSTEK W, KUHNE T, CHAUDRON M R. Experimental analysis of textual and graphical representations for software architecture design [C]// Empirical Software Engineering and Measurement (ESEM), 2011 International Symposium IEEE. 2011: 167–176.

    Chapter  Google Scholar 

  28. ALLAMANIS M, BARR E T, BIRD C, SUTTON C. Suggesting accurate method and class names [C]// Proceedings of the 2015 10th Joint Meeting on Foundations of Software Engineering. ACM, 2015: 38–49.

    Google Scholar 

  29. ABID N J, DRAGAN N, COLLARD M L, MALETIC J I, Using stereotypes in the automatic generation of natural language summaries for C++ methods [C]// Software Maintenance and Evolution (ICSME), 2015 IEEE International Conference IEEE. 2015: 561–565.

    Chapter  Google Scholar 

  30. MORENO L, APONTE J, SRIDHARA G, MARCUS A, POLLOCK L, VIJAYSHANKER K. Automatic generation of natural language summaries for java classes [J]. Program Comprehension (ICSME), 2013 IEEE 21st International Conference IEEE. 2013: 23–32.

    Google Scholar 

  31. CORTES-COY L F, LINARES-VÁSQUEZ M, APONTE J, POSHYVANYK D. On automatically generating commit messages via summarization of source code changes [C]// Source Code Analysis and Manipulation (SCAM), 2014 IEEE 14th International Working Conference IEEE. 2014: 275–284.

    Chapter  Google Scholar 

  32. NASEHI S M, SILLITO J, MAURER F, BURNS C. What makes a good code example? A study of programming Q&A in StackOverFlow [C]// In Software Maintenance (ICSM), 2012 28th IEEE International Conference IEEE. 2012: 25–34.

    Google Scholar 

  33. CHATTERJEE P, NISHI M A, DAMEVSKI K, AUGUSTINE V, POLLOCK L, KRAFT N A. What information about code snippets is available in different software-related documents? an exploratory study [C]// Software Analysis, Evolution and Reengineering (SANER), 2017 IEEE 24th International Conference IEEE. 2017: 382–386.

    Chapter  Google Scholar 

  34. ABDALKAREEM R, SHIHAB E, RILLING J. What do developers use the crowd for? A study using StackOverflow [J]. IEEE Software, 2017, 34(2): 53–60.

    Article  Google Scholar 

  35. DUALA-EKOKO E, ROBILLARD M P. Asking and answering questions about unfamiliar API s: An exploratory study [C]// Proceedings of the 34th International Conference on Software Engineering. IEEE, 2012: 266–276.

    Google Scholar 

  36. RICHARDSON L. Beautiful soup [EB/OL]. https://www.crummy.com/software, 2017.

    Google Scholar 

  37. SurveyMonkey: The world's most popular free online survey tool [EB/OL]. [2017-6-4]. http://surveymonkey.com/.

  38. MA W, CHEN L, ZHANG X, ZHOU Y, XU B. How do developers fix cross-project correlated bugs? A case study on the GitHub scientific python ecosystem [C]// Proceedings of the 39th International Conference on Software Engineering. IEEE, 2017: 381–392.

    Google Scholar 

  39. BIRNHOLTZ J, MEROLA N A R, PAUL A. Is it weird to still be a virgin: Anonymous, locally targeted questions on facebook confession boards [C]// Proceedings of the 33rd Annual ACM Conference on Human Factors in Computing Systems. ACM, 2015: 2613–2622.

    Google Scholar 

  40. Stack exchange data dump [EB/OL]. https://archive.org/details/stackexchange.

  41. BACCHELLI A. Mining challenge 2013: Stack overflow [C]// The 10th Working Conference on Mining Software Repositories. 2013.

    Google Scholar 

  42. PARNIN C, TREUDE C, GRAMMEL L, STOREY M A. Crowd documentation: Exploring the coverage and the dynamics of API discussions on stack overflow [R]. Atlanta, USA: Georgia Institute of Technology, 2012.

    Google Scholar 

  43. KAVALER D, POSNETT D, GIBLER C, CHEN H, DEVANBU P T, FILKOV V. Using and asking: API s used in the android market and asked about in StackOverFlow [C]// International Conference on Social Informatics. Springer, Cham, 2013: 405–418.

    Google Scholar 

  44. LINARES-VASQUEZ M, BAVOTA G, di PENTA M, OLIVETO R, POSHY-ANYK D. How do API changes trigger StackOverflow discussions? A study on the Android SDK [C]// Proceedings of the 22nd International Conference on Program Comprehension. ACM, 2014: 83–94.

    Google Scholar 

  45. YIN R K. Case study research design and methods third edition [M]// Applied Social Research Methods Series. Sage Publications, 1989.

    Google Scholar 

  46. DIG D, JOHNSON R. How do API s evolve? A story of refactoring [J]. Journal of Software: Evolution and Process, 2006, 18(2): 83–107.

    Google Scholar 

  47. LI J, XIONG Y, LIU X, ZHANG L. How does web service API evolution affect clients? [C]// Web Services (ICWS), 2013 IEEE 20th International Conference. IEEE, 2013: 300–307.

    Chapter  Google Scholar 

  48. ROBILLARD P. What makes API s hard to learn? Answers from developers [J]. IEEE Software, 2009, 26(6): 27–34.

    Article  Google Scholar 

  49. ROBILLARD P, DELINE R. A field study of API learning obstacles [J]. Empirical Software Engineering, 2011, 16(6): 703–732.

    Article  Google Scholar 

  50. KIM J, LEE S, HWANG S W, KIM S. Enriching documents with examples: A corpus mining approach [J]. ACM Transactions on Information Systems (TOIS), 2013, 31(1): 1–27.

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Tao Wang  (王涛).

Additional information

Foundation item: Project(2018-YFB1004202) supported by the National Key R&D Program of China; Project(61702534) supported by the National Natural Science Foundation of China

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Fan, Q., Wang, T., Yang, C. et al. Why do they ask? An exploratory study of crowd discussions about Android application programming interface in stack overflow. J. Cent. South Univ. 26, 2432–2446 (2019). https://doi.org/10.1007/s11771-019-4185-5

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11771-019-4185-5

Key words

关键词

Navigation