发明名称 CODE RECOMMENDATION
摘要 The disclosure generally relates to code recommendation. In one embodiment, code snippets may be extracted using an invocation-centered code slicing process and then grouped according to the method usages. For each method usage, a representative code snippet may be selected and stored in the knowledge base in association with metadata. In operation, the programming context may be obtained and used to query the knowledge base to retrieve one or more code snippets for recommendation. In one embodiment, the recommended code snippets may be ranked to improve the utility and user friendliness, and the metadata may be used to provide variation points and possibly other auxiliary information to improve the operation efficiency and user experience.
申请公布号 US2015378692(A1) 申请公布日期 2015.12.31
申请号 US201414488104 申请日期 2014.09.16
申请人 Microsoft Corporation 发明人 Dang Yingnong;Zhong Chenglin;Wu Qian;Yin Han;Schwarz Niko;Zhang Dongmei
分类号 G06F9/44 主分类号 G06F9/44
代理机构 代理人
主权项 1. A system implemented at least in part by a computer comprising: a context determining unit configured to determine a programming context for a code segment at least in part based on data dependency with a method invocation in the code segment; a snippet retrieving unit configured to retrieve candidate code snippets from a knowledge base at least in part based on the determined programming context; and a recommending unit configured to present at least some of the retrieved candidate code snippets as code recommendations.
地址 Redmond WA US