Skip to main content

The Java Programmer’s Phrase Book

  • Conference paper
Software Language Engineering (SLE 2008)

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

Included in the following conference series:

  • 944 Accesses

Abstract

Method names in Java are natural language phrases describing behaviour, encoded to make them easy for machines to parse. Programmers rely on the meaning encoded in method names to understand code. We know little about the language used in this encoding, its rules and structure, leaving the programmer without guidance in expressing her intent. Yet the meaning of the method names — or phrases — is readily available in the body of the methods they name. By correlating names and implementations, we can figure out the meaning of the original phrases, and uncover the rules of the phrase language as well. In this paper, we present an automatically generated proof-of-concept phrase book for Java, based on a large software corpus. The phrase book captures both the grammatical structure and the meaning of method phrases as commonly used by Java programmers.

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

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Similar content being viewed by others

References

  1. Edwards, J.: Subtext: uncovering the simplicity of programming. In: [18], pp. 505–518

    Google Scholar 

  2. Frege, G.: On sense and reference. In: Geach, P., Black, M. (eds.) Translations from the Philosophical Writings of Gottlob Frege, pp. 56–78. Blackwell, Malden (1952)

    Google Scholar 

  3. Høst, E.W., Østvold, B.M.: The programmer’s lexicon, volume I: The verbs. In: SCAM 2007: Proceedings of the Seventh IEEE International Working Conference on Source Code Analysis and Manipulation, Washington, DC, USA, pp. 193–202. IEEE Computer Society, Los Alamitos (2007)

    Chapter  Google Scholar 

  4. Wittgenstein, L.: Philosophical Investigations. Prentice Hall, Englewood Cliffs (1973)

    MATH  Google Scholar 

  5. Cover, T.M., Thomas, J.A.: Elements of Information Theory, 2nd edn. Wiley Series in Telecommunications. Wiley, Chichester (2006)

    MATH  Google Scholar 

  6. Manning, C.D., Schuetze, H.: Foundations of Statistical Natural Language Processing. MIT Press, Cambridge (1999)

    Google Scholar 

  7. Fellbaum, C.: WordNet: An Electronic Lexical Database. MIT Press, Cambridge (1998)

    MATH  Google Scholar 

  8. Collberg, C., Myles, G., Stepp, M.: An empirical study of Java bytecode programs. Software Practice and Experience 37(6), 581–641 (2007)

    Article  Google Scholar 

  9. Baxter, G., Frean, M., Noble, J., Rickerby, M., Smith, H., Visser, M., Melton, H., Tempero, E.: Understanding the shape of Java software. In: Proceedings of the 21th Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA 2006, Portland, Oregon, USA, pp. 397–412. ACM, New York (2006)

    Google Scholar 

  10. Lawrie, D., Morrell, C., Feild, H., Binkley, D.: What’s in a name? A study of identifiers. In: Proceedings of the 14th International Conference on Program Comprehension (ICPC 2006), Athens, Greece, pp. 3–12. IEEE Computer Society, Los Alamitos (2006)

    Chapter  Google Scholar 

  11. Caprile, B., Tonella, P.: Nomen est omen: Analyzing the language of function identifiers. In: Proceedings of the Sixth Working Conference on Reverse Engineering (WCRE 1999), Atlanta, Georgia, USA, pp. 112–122. IEEE Computer Society, Los Alamitos (1999)

    Google Scholar 

  12. Antonial, G., Guéhéneuc, Y.G., Merlo, E., Tonella, P.: Mining the lexicon used by programmers during sofware [sic] evolution. In: Proceedings of the International Conference on Software Maintenance (ICSM), pp. 14–23 (2007)

    Google Scholar 

  13. Singer, J., Kirkham, C.: Exploiting the correspondence between micro patterns and class names. In: SCAM 2008: Proceedings of the Eight IEEE International Working Conference on Source Code Analysis and Manipulation, pp. 67–76. IEEE Computer Society, Los Alamitos (2008)

    Chapter  Google Scholar 

  14. Gil, J., Maman, I.: Micro patterns in Java code. In: [18], pp. 97–116

    Google Scholar 

  15. Pollock, L.L., Vijay-Shanker, K., Shepherd, D., Hill, E., Fry, Z.P., Maloor, K.: Introducing natural language program analysis, pp. 15–16. ACM, New York (2007)

    Google Scholar 

  16. Shepherd, D., Pollock, L.L., Vijay-Shanker, K.: Towards supporting on-demand virtual remodularization using program graphs. In: Filman, R.E. (ed.) AOSD, pp. 3–14. ACM, New York (2006)

    Chapter  Google Scholar 

  17. Ma, H., Amor, R., Tempero, E.D.: Indexing the Java API using source code. In: Australian Software Engineering Conference, pp. 451–460. IEEE Computer Society, Los Alamitos (2008)

    Google Scholar 

  18. OOPSLA 2005. Proceedings of the 20th Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA 2005, October 16-20, 2005, San Diego, CA, USA. ACM, New York (2005)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2009 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Høst, E.W., Østvold, B.M. (2009). The Java Programmer’s Phrase Book. In: Gašević, D., Lämmel, R., Van Wyk, E. (eds) Software Language Engineering. SLE 2008. Lecture Notes in Computer Science, vol 5452. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-00434-6_20

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-00434-6_20

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-00433-9

  • Online ISBN: 978-3-642-00434-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics