Keyword programming in Java

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.

[1]  Rastislav Bodík,et al.  Jungloid mining: helping to navigate the API jungle , 2005, PLDI '05.

[2]  Gerhard Fischer,et al.  Integrating active information delivery and reuse repository systems , 2000, SIGSOFT '00/FSE-8.

[3]  Said Ghoul,et al.  CLASSIFYING SOFTWARE FOR REUSABILITY , 2001 .

[4]  Kajal T. Claypool,et al.  Finding a needle in the haystack: a technique for ranking matches between components , 2005, CBSE'05.

[5]  Mikael Rittri,et al.  Retrieving Library Identifiers via Equational Matching of Types , 1990, CADE.

[6]  Kajal T. Claypool,et al.  XSnippet: mining For sample code , 2006, OOPSLA '06.

[7]  Jeannette M. Wing,et al.  Signature matching: a tool for using software libraries , 1995, TSEM.

[8]  Rosco Hill,et al.  Automatic method completion , 2004, Proceedings. 19th International Conference on Automated Software Engineering, 2004..

[9]  Eser Kandogan,et al.  Koala: capture, share, automate, personalize business processes on the web , 2007, CHI.

[10]  Gerhard Fischer,et al.  Supporting reuse by delivering task-relevant and personalized information , 2002, ICSE '02.

[11]  B. Cheng,et al.  Specification matching for software reuse: a foundation , 1995, SSR '95.

[12]  Jeannette M. Wing,et al.  Specification matching of software components , 1995, TSEM.

[13]  Rob Miller,et al.  Translating keyword commands into executable code , 2006, UIST.

[14]  Christiane Fellbaum,et al.  Book Reviews: WordNet: An Electronic Lexical Database , 1999, CL.