Skip to main content

Recommending Typical Usage Examples for Component Retrieval in Reuse Repositories

  • Conference paper
High Confidence Software Reuse in Large Systems (ICSR 2008)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 5030))

Included in the following conference series:

Abstract

Programmers tend to reuse existing components to reduce development cost as well as improve productivity. While retrieving components from the reuse repository, developers often need to know how the components are used in different ways in order to judge which one is more appropriate. An efficient way guiding developers to know how the components are utilized is by leveraging the example code. However, usually the examples provided in handbooks and online documents are not adequate enough. To address this problem, we propose an approach recommending typical usage examples to developers by leveraging source code acquired from the Internet. For each component developers want to utilize, our method first retrieves relevant code downloaded from the Internet as candidate examples. The candidate examples are then clustered and we choose a typical one from each cluster. Finally, the selected ones are ranked and returned to the developers. We implemented our method with a prototype system and conducted an experimental study to evaluate its effectiveness. The experimental results demonstrate that our approach can provide examples to help developers know different usages of the component and thus has the potential to assist developers in reuse.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Mili, H., Mili, A., Yacoub, S., Addy, E.: Reuse-based software engineering: techniques, organization, and controls. Wiley-Interscience Press, Chichester (2001)

    Google Scholar 

  2. Mili, H., Mili, F., Mili, A.: Reusing software: issues and research directions. IEEE Transaction on Software Engineering 21(6), 528–562 (1995)

    Article  Google Scholar 

  3. SourceForge (2007), http://sourceforge.net/

  4. ComponentSource (2007), http://www.componentsource.com/

  5. Ye, Y., Fischer, G.: Supporting reuse by delivering task-relevant and personalized information. In: Proceedings of the 24th International Conference on Software Engineering, pp. 513–523 (2002)

    Google Scholar 

  6. Holmes, R., Murphy, G.: Using structural context to recommend source code examples. In: Proceedings of the 27th International Conference on Software Engineering, pp. 117–125 (2005)

    Google Scholar 

  7. Google Code Search (2007), http://www.google.cn/codesearch/

  8. Sahavechaphan, N., Claypool, K.: XSnippet: Mining for sample code. In: Proceedings of the 21st ACM SIGPLAN conference on Object-Oriented Programming Systems, Languages, and Applications (OOPSLA), pp. 413–430 (2006)

    Google Scholar 

  9. Hummel, O., Atkinson, C.: Using the web as a reuse repository. In: Proceedings of the 9th International Conference on Software Reuse, pp. 298–311 (2006)

    Google Scholar 

  10. Baeza-Yates, R., Ribeiro-Neto, B.: Modern information retrieval. Addison-Wesley/ACM Press (1999)

    Google Scholar 

  11. Drori, O.: Algorithm for documents ranking: Idea and simulation results. In: Proceedings of the 14th International Conference on Software Engineering and Knowledge Engineering, pp. 99–102 (2002)

    Google Scholar 

  12. Apache Lucene (2007), http://lucene.apache.org/java/docs/index.html

  13. Mili, R., Mili, A., Mittermeir, R.T.: A survey of software storage and retrieval. Annual of Software Engineering 5(2), 349–414 (1998)

    Article  Google Scholar 

  14. Frakes, W., Pole, T.: An empirical study of representation methods for reuseable software components. IEEE Transaction on Software Engineering 20(8), 617–630 (1994)

    Article  Google Scholar 

  15. Maarek, Y., Berry, D., Kaiser, G.: An information retrieval approach for automatically constructing software libraries. IEEE Transactions on Software Engineering 17(8), 800–813 (1991)

    Article  Google Scholar 

  16. Prieto-Diaz, R., Freeman, P.: Classifying software for reuse. IEEE Software 4(1), 6–16 (1987)

    Article  Google Scholar 

  17. Zaremski, A., Wing, J.M.: Specification matching of software components. ACM Transactions on Software Engineering and Methodology 6(4), 333–369 (1997)

    Article  Google Scholar 

  18. Podgurski, A., Pierce, L.: Retrieving reusable software by sampling behavior. ACM Transactions on Software Engineering and Methodology 2(3), 286–303 (1993)

    Article  Google Scholar 

  19. Hill, R., Rideout, J.: Automatic method completion. In: Proceedings of the 19th International Conference on Automated Software Engineering, pp. 228–235 (2004)

    Google Scholar 

  20. Mandelin, D., Xu, L., Bodk, R., Kimelman, D.: Jungloid mining: helping to navigate the API jungle. In: Proceedings of the 2005 ACM Conference on Programming Language Design and Implementation (PLDI), pp. 48–61 (2005)

    Google Scholar 

  21. Rosson, M.B., Carroll, J.M.: The reuse of uses in Smalltalk programming. ACM Transactions on Computer-Human Interaction 3(3), 219–253 (1996)

    Article  Google Scholar 

  22. Seacord, R., Hissam, S., Wallnau, K.: AGORA: A search engine for software components. IEEE Internet Computing 2(6), 62–70 (1998)

    Article  Google Scholar 

  23. Dong, X., Halevy, A., Madhavan, J., Nemes, E., Zhang, J.: Similarity search for web services. In: Proceedings of the 30th Very Large Data Bases (VLDB) Conference, pp. 372–383 (2004)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Hong Mei

Rights and permissions

Reprints and permissions

Copyright information

© 2008 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Li, Y., Zhang, L., Li, G., Xie, B., Sun, J. (2008). Recommending Typical Usage Examples for Component Retrieval in Reuse Repositories. In: Mei, H. (eds) High Confidence Software Reuse in Large Systems. ICSR 2008. Lecture Notes in Computer Science, vol 5030. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-68073-4_7

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-68073-4_7

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-68062-8

  • Online ISBN: 978-3-540-68073-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics