Learning Code Context Information to Predict Comment Locations

被引:18
|
作者
Huang, Yuan [1 ,2 ]
Hu, Xinyu [1 ,2 ]
Jia, Nan [3 ]
Chen, Xiangping [4 ,5 ]
Xiong, Yingfei [6 ,7 ]
Zheng, Zibin [1 ,2 ]
机构
[1] Sun Yat Sen Univ, Natl Engn Res Ctr Digital Life, Guangzhou 510006, Peoples R China
[2] Sun Yat Sen Univ, Sch Data & Comp Sci, Guangzhou 510006, Peoples R China
[3] Hebei GEO Univ, Sch Management Sci & Engn, Shijiazhuang 050031, Hebei, Peoples R China
[4] Sun Yat Sen Univ, Guangdong Key Lab Big Data Anal & Simulat Publ Op, Guangzhou 510006, Peoples R China
[5] Sun Yat Sen Univ, Sch Commun & Design, Guangzhou 510006, Peoples R China
[6] Peking Univ, Sch Elect Engn & Comp Sci, Beijing 100871, Peoples R China
[7] Peking Univ, Minist Educ, Key Lab High Confidence Software Technol, Beijing 100871, Peoples R China
基金
中国博士后科学基金; 中国国家自然科学基金; 国家重点研发计划;
关键词
Feature extraction; Software; Semantics; Programming; Predictive models; Syntactics; Buildings; Code context information; code features extraction; comment location; comment quality; commenting decision;
D O I
10.1109/TR.2019.2931725
中图分类号
TP3 [计算技术、计算机技术];
学科分类号
0812 ;
摘要
Code commenting is a common programming practice of practical importance to help developers review and comprehend source code. In our developer survey, commenting has become an important, yet often-neglected activity when programming. Moreover, there is a lack of formal and automatic way in current practice to remind developers where to comment in the source code. To provide informative guidance on commenting during development, we propose a novel method CommentSuggester to recommend developers regarding appropriate commenting locations in the source code. Because commenting is closely related to the context information of source code, we identify this important factor to determine comment positions and extract it as structural context features, syntactic context features, and semantic context features. Subsequently, machine learning techniques are applied to identify possible commenting locations in the source code. We evaluated CommentSuggester using large datasets from dozens of open-source software systems in GitHub. The encouraging experimental results and user study demonstrated the feasibility and effectiveness of our commenting suggestion method.
引用
收藏
页码:88 / 105
页数:18
相关论文
共 50 条
  • [31] INTEGRATING BUILDING AND CONTEXT INFORMATION FOR AUTOMATED ZONING CODE CHECKING: A REVIEW
    Altintas, Yelin Demir
    Ilal, M. Emre
    JOURNAL OF INFORMATION TECHNOLOGY IN CONSTRUCTION, 2022, 27 : 548 - 570
  • [32] Use of Code Structural Features for Machine Learning to Predict Effective Optimizations
    Kawarabatake, Yuki
    Agung, Mulya
    Komatsu, Kazuhiko
    Egawa, Ryusuke
    Takizawa, Hiroyuki
    2018 IEEE INTERNATIONAL PARALLEL AND DISTRIBUTED PROCESSING SYMPOSIUM WORKSHOPS (IPDPSW 2018), 2018, : 1049 - 1055
  • [33] Applying Deep Learning Model to Predict Diagnosis Code of Medical Records
    Masud, Jakir Hossain Bhuiyan
    Kuo, Chen-Cheng
    Yeh, Chih-Yang
    Yang, Hsuan-Chia
    Lin, Ming-Chin
    DIAGNOSTICS, 2023, 13 (13)
  • [34] USAGE OF MACHINE LEARNING TO PREDICT MARKET ATTRACTIVENESS IN THE CONTEXT OF INTERNATIONALIZATION
    Falco, Briam Daniel
    Neubert, Michael
    van der Krogt, Augustinus
    PROCEEDINGS OF THE 8TH INTERNATIONAL CONFERENCE INNOVATION MANAGEMENT, ENTREPRENEURSHIP AND SUSTAINABILITY (IMES 2020), 2020, : 140 - 152
  • [35] Boosting Just-In-Time Code Comment Updating Via Programming Context and Refactor
    Mi, Xiangbo
    Zhang, Jingxuan
    Tang, Yixuan
    Ju, Yue
    Lan, Jinpeng
    INTERNATIONAL JOURNAL OF SOFTWARE ENGINEERING AND KNOWLEDGE ENGINEERING, 2023, 33 (10) : 1619 - 1649
  • [36] DeepCommenter: A Deep Code Comment Generation Tool with Hybrid Lexical and Syntactical Information
    Li, Boao
    Yan, Meng
    Xia, Xin
    Hu, Xing
    Li, Ge
    Lo, David
    PROCEEDINGS OF THE 28TH ACM JOINT MEETING ON EUROPEAN SOFTWARE ENGINEERING CONFERENCE AND SYMPOSIUM ON THE FOUNDATIONS OF SOFTWARE ENGINEERING (ESEC/FSE '20), 2020, : 1571 - 1575
  • [37] Context-based transfer learning for low resource code summarization
    Guo, Yi
    Chai, Yu
    Zhang, Lehuan
    Li, Hui
    Luo, Mengzhi
    Guo, Shikai
    SOFTWARE-PRACTICE & EXPERIENCE, 2024, 54 (03): : 465 - 482
  • [38] A Unit Testing Framework for Context Variant Code in a Mobile Learning App
    Schimanke, Florian
    Mertens, Robert
    Hill, Leonard
    2017 IEEE INTERNATIONAL SYMPOSIUM ON MULTIMEDIA (ISM), 2017, : 577 - 582
  • [39] Revisiting Information Retrieval and Deep Learning Approaches for Code Summarization
    Zhu, Tingwei
    Li, Zhong
    Pan, Minxue
    Shi, Chaoxuan
    Zhang, Tian
    Pei, Yu
    Li, Xuandong
    2023 IEEE/ACM 45TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING: COMPANION PROCEEDINGS, ICSE-COMPANION, 2023, : 328 - 329
  • [40] A spatial code for temporal information is necessary for efficient sensory learning
    Bagur, Sophie
    Bourg, Jacques
    Kempf, Alexandre
    Tarpin, Thibault
    Bergaoui, Khalil
    Guo, Yin
    Ceballo, Sebastian
    Schwenkgrub, Joanna
    Verdier, Antonin
    Puel, Jean Luc
    Bourien, Jerome
    Bathellier, Brice
    SCIENCE ADVANCES, 2025, 11 (02):