Using structural context to recommend source code examples

被引:0
|
作者
Holmes, R [1 ]
Murphy, GC [1 ]
机构
[1] Univ British Columbia, Dept Comp Sci, Vancouver, BC V6T 1Z4, Canada
关键词
recommender; examples; software structure; development environment framework;
D O I
暂无
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
When coding to a framework, developers often become stuck, unsure of which class to subclass, which objects to instantiate and which methods to call. Example code that demonstrates the use of the framework can help developers make progress on their task. In this paper, we describe an approach for locating relevant code in an example repository that is based on heuristically matching the structure of the code under development to the example code. Our tool improves on existing approaches in two ways. First, the structural context needed to query the repository is extracted automatically from the code, freeing the developer from learning a query language or from writing their code in a particular style. Second, the repository can be generated easily from existing applications. We demonstrate the utility of this approach by reporting on a case study involving two subjects completing four programming tasks within the Eclipse integrated development environment framework.
引用
收藏
页码:117 / 125
页数:9
相关论文
共 50 条
  • [41] Learning to Recommend Method Names with Global Context
    Liu, Fang
    Li, Ge
    Fu, Zhiyi
    Lu, Shuai
    Hao, Yiyang
    Jin, Zhi
    arXiv, 2022,
  • [42] Systematic adaptation of dynamically generated source code via domain-specific examples
    Song, Myoungkyu
    Tilevich, Eli
    IET SOFTWARE, 2018, 12 (02) : 112 - 119
  • [43] Three-dimensional reconstruction and visualization of geological materials with IDL - examples and source code
    Marschallinger, R
    COMPUTERS & GEOSCIENCES, 2001, 27 (04) : 419 - 426
  • [44] Proactivity and context-awareness: future of recommend
    Gallego-Vico, Daniel
    Fumero-Reveron, Antonio
    Huecas-Fernandez-Toribio, Gabriel
    PROFESIONAL DE LA INFORMACION, 2013, 22 (01): : 19 - 25
  • [45] Learning from Code Repositories to Recommend Model Classes
    Capuano, Thibaut
    Sahraoui, Houari
    Frenay, Benoit
    Vanderose, Benoit
    JOURNAL OF OBJECT TECHNOLOGY, 2022, 21 (03):
  • [46] Learning to Recommend Method Names with Global Context
    Liu, Fang
    Li, Ge
    Fu, Zhiyi
    Lu, Shuai
    Hao, Yiyang
    Jin, Zhi
    2022 ACM/IEEE 44TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE 2022), 2022, : 1294 - 1306
  • [47] Function Call Graph Context Encoding for Neural Source Code Summarization
    Bansal, Aakash
    Eberhart, Zachary
    Karas, Zachary
    Huang, Yu
    Mcmillan, Collin
    IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2023, 49 (09) : 4268 - 4281
  • [48] Preserving Use Case Flows in Source Code: Approach, Context, and Challenges
    Bystricky, Michal
    Vranic, Valentino
    COMPUTER SCIENCE AND INFORMATION SYSTEMS, 2017, 14 (02) : 423 - 445
  • [49] Learning to Recommend Method Names with Global Context
    MoE , Key Lab of High Confidence Software Technology, Beijing, China
    不详
    Proc Int Conf Software Eng, 1600, (1294-1306):
  • [50] An experimental investigation on the effects of context on source code identifiers splitting and expansion
    Guerrouj, Latifa
    Di Penta, Massimiliano
    Gueheneuc, Yann-Gael
    Antoniol, Giuliano
    EMPIRICAL SOFTWARE ENGINEERING, 2014, 19 (06) : 1706 - 1753