Keyword programming in Java


DOI: 10.1007/s10515-008-0041-9

Cite this article as:
Little, G. & Miller, R.C. Autom Softw Eng (2009) 16: 37. doi:10.1007/s10515-008-0041-9


Keyword programming is a novel technique for reducing the need to remember details of programming language syntax and APIs, by translating a small number of unordered keywords provided by the user into a valid expression. In a sense, the keywords act as a query that searches the space of expressions that are valid in the given context. Prior work has demonstrated the feasibility and merit of this approach in limited domains. This paper explores the potential for employing this technique in much larger domains, specifically general-purpose programming languages like Java. We present an algorithm for translating keywords into Java method call expressions. When tested on keywords extracted from existing method calls in Java code, the algorithm can accurately reconstruct over 90% of the original expressions. We tested the algorithm on keywords provided by users in a web-based study. The results suggest that users can obtain correct Java code using keyword queries as accurately as they can write the correct Java code themselves. We implemented the algorithm in an Eclipse plug-in as an extension to the autocomplete mechanism and deployed it in a preliminary field study of several users, with mixed results. One interesting result of this work is that most of the information in Java method call expressions lies in the keywords, and details of punctuation and even parameter ordering can often be inferred automatically.


Java Autocomplete Code assistants 

Copyright information

© Springer Science+Business Media, LLC 2008

Authors and Affiliations

  1. 1.MIT CSAILCambridgeUSA

Personalised recommendations