2013 · 223 citations · 15 references
ComputingComputer ScienceComputational LinguisticsNatural Language ProcessingSoftware EngineeringAbstract Syntax TreesLanguage ModelingLexical AnalysisSyntax AnalysisSemantic Information
Recent research has successfully applied the statistical n-gram language model to show that source code exhibits a good level of repetition. The n-gram model is shown to have good predictability in supporting code suggestion and completion. However, the state-of-the-art n-gram approach to capture source code regularities/patterns is based only on the lexical information in a local context of the code units. To improve predictability, we introduce SLAMC, a novel statistical semantic language model for source code. It incorporates semantic information into code tokens and models the regularities/patterns of such semantic annotations, called sememes, rather than their lexemes. It combines the local context in semantic n-grams with the global technical concerns/functionality into an n-gram topic model, together with pairwise associations of program elements. Based on SLAMC, we developed a new code suggestion method, which is empirically evaluated on several projects to have relatively 18-68% higher accuracy than the state-of-the-art approach.
15
Hanna Wallach · 2006 · 1.1K citations
On the naturalness of software
Abram Hindle, Earl T. Barr, Zhendong Su et al. · 2012 · 569 citations
Using task context to improve programmer productivity
Mik Kersten, Gail C. Murphy · 2006 · 447 citations
Using structural context to recommend source code examples
Reid Holmes, Gail C. Murphy · 2005 · 385 citations · Full text
Learning from examples to improve code completion systems
Marcel Bruch, Martin Monperrus, Mira Mezini · 2009 · 379 citations · Full text