Skip to main content

Source Code-Based Recommendation Systems

  • Chapter
  • First Online:
Recommendation Systems in Software Engineering

Abstract

Although today’s software systems are composed of a diversity of software artifacts, source code remains the most up-to-date artifact and therefore the most reliable data source. It provides a rich and structured source of information upon which recommendation systems can rely to provide useful recommendations to software developers. Source code-based recommendation systems provide support for tasks such as how to use a given API or framework, provide hints on things missing from the code, suggest how to reuse or correct an existing code, or help novices learn a new project, programming paradigm, language, or style. This chapter highlights relevant decisions involved in developing source code-based recommendation systems. An in-depth presentation of a particular system we developed serves as a concrete illustration of some of the issues that can be encountered and of the development choices that need to be made when building such a system.

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 129.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 169.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 169.99
Price excludes VAT (USA)
  • Durable hardcover 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

Similar content being viewed by others

Notes

  1. 1.

    These tools range from source code querying tools like SOUL [26], over source code-based validation tools like IntensiVE [25] and eContracts [19], to source code mining and recommendation tools like Heal [5], Mendel [18], and MEnToR [20].

  2. 2.

    Many approaches exist that extract relevant information for developers from source code. For the purpose of this chapter, we analyzed a non-exhaustive selection of approaches that call themselves or that have been cited by others as “recommendation systems.” We further filtered this selection to those systems that rely explicitly on the source code to produce their recommendations, and privileged approaches published in well-known software engineering venues.

  3. 3.

    If something is used by a lot of people, it may be a sign that people like it, and thus that it deserves a good rating.

  4. 4.

    Protocols are tags used in Smalltalk to indicate the role of a method and can also be regarded as indicators of the interface that a method implements.

References

  1. Ashok, B., Joy, J., Liang, H., Rajamani, S.K., Srinivasa, G., Vangala, V.: DebugAdvisor: A recommender system for debugging. In: Proceedings of the European Software Engineering Conference/ACM SIGSOFT International Symposium on Foundations of Software Engineering, pp. 373–382 (2009). doi: 10.1145/1595696.1595766

    Google Scholar 

  2. Avazpour, I., Pitakrat, T., Grunske, L., Grundy, J.: Dimensions and metrics for evaluating recommendation systems. In: Robillard, M., Maalej, W., Walker, R.J., Zimmermann, T. (eds.) Recommendation Systems in Software Engineering, Chap. 10. Springer, New York (2014)

    Google Scholar 

  3. Bruch, M., Monperrus, M., Mezini, M.: Learning from examples to improve code completion systems. In: Proceedings of the European Software Engineering Conference/ACM SIGSOFT International Symposium on Foundations of Software Engineering, pp. 213–222 (2009). doi: 10.1145/1595696.1595728

    Google Scholar 

  4. Bruch, M., Schäfer, T., Mezini, M.: FrUiT: IDE support for framework understanding. In: Proceedings of the Eclipse Technology eXchange, pp. 55–59 (2006). doi: 10.1145/1188835.1188847

    Google Scholar 

  5. Castro, S., De Roover, C., Kellens, A., Lozano, A., Mens, K., D’Hondt, T.: Diagnosing and correcting design inconsistencies in source code with logical abduction. Sci. Comput. Program. 76(12), 1113–1129 (2011). doi: 10.1016/j.scico.2010.09.001

    Article  Google Scholar 

  6. Cottrell, R., Walker, R.J., Denzinger, J.: Semi-automating small-scale source code reuse via structural correspondence. In: Proceedings of the ACM SIGSOFT International Symposium on Foundations of Software Engineering, pp. 214–225 (2008). doi: 10.1145/1453101.1453130

    Google Scholar 

  7. Čubranić, D., Murphy, G.C., Singer, J., Booth, K.S.: Hipikat: A project memory for software development. IEEE Trans. Software Eng. 31(6), 446–465 (2005). doi: 10.1109/TSE.2005.71

    Article  Google Scholar 

  8. Dagenais, B., Robillard, M.P.: Recommending adaptive changes for framework evolution. ACM Trans. Software Eng. Meth. 20(4), 19:1–19:35 (2011). doi: 10.1145/2000799.2000805

    Google Scholar 

  9. Duala-Ekoko, E., Robillard, M.P.: Using structure-based recommendations to facilitate discoverability in APIs. In: Proceedings of the European Conference on Object-Oriented Programming, pp. 79–104 (2011). doi: 10.1007/978-3-642-22655-7_5

    Google Scholar 

  10. Felfernig, A., Jeran, M., Ninaus, G., Reinfrank, F., Reitererand, S., Stettinger, M.: Basic approaches in recommendation systems. In: Robillard, M., Maalej, W., Walker, R.J., Zimmermann, T. (eds.) Recommendation Systems in Software Engineering, Chap. 2. Springer, New York (2014)

    Google Scholar 

  11. German, D.M., Čubranić, D., Storey, M.A.D.: A framework for describing and understanding mining tools in software development. In: Proceedings of the International Workshop on Mining Software Repositories, pp. 7:1–7:5 (2005). doi: 10.1145/1082983.1083160

    Google Scholar 

  12. Hill, E., Pollock, L., Vijay-Shanker, K.: Exploring the neighborhood with Dora to expedite software maintenance. In: Proceedings of the IEEE/ACM International Conference on Automated Software Engineering, pp. 14–23 (2007). doi: 10.1145/1321631.1321637

    Google Scholar 

  13. Holmes, R., Walker, R.J., Murphy, G.C.: Approximate structural context matching: An approach to recommend relevant examples. IEEE Trans. Software Eng. 32(12), 952–970 (2006). doi: 10.1109/TSE.2006.117

    Article  Google Scholar 

  14. Inozemtseva, L., Holmes, R., Walker, R.J.: Recommendation systems in-the-small. In: Robillard, M., Maalej, W., Walker, R.J., Zimmermann, T. (eds.) Recommendation Systems in Software Engineering, Chap. 4. Springer, New York (2014)

    Google Scholar 

  15. Kersten, M., Murphy, G.C.: Mylar: A degree-of-interest model for IDEs. In: Proceedings of the International Conference on Aspect-Oriented Software Deveopment, pp. 159–168 (2005). doi: 10.1145/1052898.1052912

    Google Scholar 

  16. Li, Z., Zhou, Y.: PR-Miner: Automatically extracting implicit programming rules and detecting violations in large software code. In: Proceedings of the European Software Engineering Conference/ACM SIGSOFT International Symposium on Foundations of Software Engineering, pp. 306–315 (2005). doi: 10.1145/1081706.1081755

    Google Scholar 

  17. Long, F., Wang, X., Cai, Y.: API hyperlinking via structural overlap. In: Proceedings of the European Software Engineering Conference/ACM SIGSOFT International Symposium on Foundations of Software Engineering, pp. 203–212 (2009). doi: 10.1145/1595696.1595727

    Google Scholar 

  18. Lozano, A., Kellens, A., Mens, K.: Mendel: Source code recommendation based on a genetic metaphor. In: Proceedings of the IEEE/ACM International Conference on Automated Software Engineering, pp. 384–387 (2011). doi: 10.1109/ASE.2011.6100078

    Google Scholar 

  19. Lozano, A., Kellens, A., Mens, K.: Usage contracts: Offering immediate feedback on violations of structural source-code regularities. Sci. Comput. Program. (2013). Under review

    Google Scholar 

  20. Lozano, A., Kellens, A., Mens, K., Arévalo, G.: MEntoR: Mining entities to rules. In: Proceedings of the Belgian–Netherlands Evolution Workshop (2010a)

    Google Scholar 

  21. Lozano, A., Kellens, A., Mens, K., Arévalo, G.: Mining source code for structural regularities. In: Proceedings of the Working Conference on Reverse Engineering, pp. 22–31 (2010b). doi: 10.1109/WCRE.2010.12

    Google Scholar 

  22. Mandelin, D., Xu, L., Bodík, R., Kimelman, D.: Jungloid mining: Helping to navigate the API jungle. In: Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 48–61 (2005). doi: 10.1145/1065010.1065018

    Google Scholar 

  23. McCarey, F., Ó Cinnéide, M., Kushmerick, N.: RASCAL: A recommender agent for agile reuse. Artif. Intell. Rev. 24(3–4), 253–276 (2005). doi: 10.1007/s10462-005-9012-8

    Google Scholar 

  24. Mens, K., Kellens, A., Krinke, J.: Pitfalls in aspect mining. In: Proceedings of the Working Conference on Reverse Engineering, pp. 113–122 (2008). doi: 10.1109/WCRE.2008.10

    Google Scholar 

  25. Mens, K., Kellens, A., Pluquet, F., Wuyts, R.: Co-evolving code and design with intensional views: A case study. Comput. Lang. Syst. Struct. 32(2–3), 140–156 (2006). doi: 10.1016/j.cl.2005.09.002

    MATH  Google Scholar 

  26. Mens, K., Michiels, I., Wuyts, R.: Supporting software development through declaratively codified programming patterns. Expert Syst. Appl. 23(4), 405–431 (2002). doi: 10.1016/S0957-4174(02)00076-3

    Article  Google Scholar 

  27. Mens, K., Tourwé, T.: Delving source code with formal concept analysis. Comput. Lang. Syst. Struct. 31(3–4), 183–197 (2005). doi: 10.1016/j.cl.2004.11.004

    Google Scholar 

  28. Menzies, T.: Data mining: A tutorial. In: Robillard, M., Maalej, W., Walker, R.J., Zimmermann, T. (eds.) Recommendation Systems in Software Engineering, Chap. 3. Springer, New York (2014)

    Google Scholar 

  29. Murphy-Hill, E., Murphy, G.C.: Recommendation delivery: Getting the user interface just right. In: Robillard, M., Maalej, W., Walker, R.J., Zimmermann, T. (eds.) Recommendation Systems in Software Engineering, Chap. 9. Springer, New York (2014)

    Google Scholar 

  30. Robillard, M.P.: Topology analysis of software dependencies. ACM Trans. Software Eng. Meth. 17(4), 18:1–18:36 (2008). doi: 10.1145/13487689.13487691

    Google Scholar 

  31. Robillard, M.P., Walker, R.J., Zimmermann, T.: Recommendation systems for software engineering. IEEE Software 27(4), 80–86 (2010). doi: 10.1109/MS.2009.161

    Article  Google Scholar 

  32. Said, A., Tikk, D., Cremonesi, P.: Benchmarking: A methodology for ensuring the relative quality of recommendation systems in software engineering. In: Robillard, M., Maalej, W., Walker, R.J., Zimmermann, T. (eds.) Recommendation Systems in Software Engineering, Chap. 11. Springer, New York (2014)

    Google Scholar 

  33. Sillito, J., Murphy, G.C., De Volder, K.: Asking and answering questions during a programming change task. IEEE Trans. Software Eng. 34(4), 434–451 (2008). doi: 10.1109/TSE.2008.26

    Article  Google Scholar 

  34. Tosun Mısırlı, A., Bener, A., Çağlayan, B., Çalıklı, G., Turhan, B.: Field studies: A methodology for construction and evaluation of recommendation systems in software engineering. In: Robillard, M., Maalej, W., Walker, R.J., Zimmermann, T. (eds.) Recommendation Systems in Software Engineering, Chap. 13. Springer, New York (2014)

    Google Scholar 

  35. Tourwé, T., Mens, K.: Mining aspectual views using formal concept analysis. In: Proceedings of the IEEE International Workshop on Source Code Analysis and Manipulation, pp. 97–106 (2004). doi: 10.1109/SCAM.2004.15

    Google Scholar 

  36. Walker, R.J., Holmes, R.: Simulation: A methodology to evaluate recommendation systems in software engineering. In: Robillard, M., Maalej, W., Walker, R.J., Zimmermann, T. (eds.) Recommendation Systems in Software Engineering, Chap. 12. Springer, New York (2014)

    Google Scholar 

  37. Xie, T., Pei, J.: MAPO: Mining API usages from open source repositories. In: Proceedings of the International Workshop on Mining Software Repositories, pp. 54–57 (2006). doi: 10.1145/1137983.1137997

    Google Scholar 

  38. Ye, Y., Fischer, G.: Reuse-conducive development environments. Automat. Software Eng. Int. J. 12(2), 199–235 (2005). doi: 10.1007/s10515-005-6206-x

    Article  Google Scholar 

  39. Zhang, C., Yang, J., Zhang, Y., Fan, J., Zhang, X., Zhao, J., Ou, P.: Automatic parameter recommendation for practical API usage. In: Proceedings of the ACM/IEEE International Conference on Software Engineering, pp. 826–836 (2012). doi: 10.1109/ICSE.2012.6227136

    Google Scholar 

  40. Zhong, H., Thummalapenta, S., Xie, T., Zhang, L., Wang, Q.: Mining API mapping for language migration. In: Proceedings of the ACM/IEEE International Conference on Software Engineering, vol. 1, pp. 195–204 (2010). doi: 10.1145/1806799.1806831

    Google Scholar 

  41. Zimmermann, T., Weißgerber, P., Diehl, S., Zeller, A.: Mining version histories to guide software changes. IEEE Trans. Software Eng. 31(6), 429–445 (2005). doi: 10.1109/TSE.2005.72

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Kim Mens .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2014 Springer-Verlag Berlin Heidelberg

About this chapter

Cite this chapter

Mens, K., Lozano, A. (2014). Source Code-Based Recommendation Systems. In: Robillard, M., Maalej, W., Walker, R., Zimmermann, T. (eds) Recommendation Systems in Software Engineering. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-45135-5_5

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-45135-5_5

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-45134-8

  • Online ISBN: 978-3-642-45135-5

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics