• Home
  • Search
  • A Comparative Study on Method Comment and Inline Comment
  • Cite Icon19
  • https://doi.org/10.1145/3582570Copy DOI Icon

A Comparative Study on Method Comment and Inline Comment

Show More
  • Abstract
  • Literature Map
  • References
  • Citations
  • Similar Papers
Abstract

Code comments are one of the important documents to help developers review and comprehend source code. In recent studies, researchers have proposed many deep learning models to generate the method header comments (i.e., method comment), which have achieved encouraging results. The comments in the method, which is called inline comment, are also important for program comprehension. Unfortunately, they have not received enough attention in automatic generation when comparing with the method comments. In this paper, we compare and analyze the similarities and differences between the method comments and the inline comments. By applying the existing models of generating method comments to the inline comment generation, we find that these existing models perform worse on the task of inline comment generation. We then further explore the possible reasons and obtain a number of new observations. For example, we find that there are a lot of templates (i.e., comments with the same or similar structures) in the method comment dataset, which makes the models perform better. Some terms were thought to be important (e.g., API calls) in the comment generation by previous study does not significantly affect the quality of the generated comments, which seems counter-intuitive. Our findings may give some implications for building the approaches of method comment or inline comment generation in the future.

Similar Papers
  • Conference Article
  • Citations4

Towards a Taxonomy of Inline Code Comment Smells

  • Sep 01, 2021
  • Elgun Jabrayilzade +2
  • Book Chapter
  • Citations40

A Static Birthmark of Binary Executables Based on API Call Structure

  • Dec 09, 2007
  • Seokwoo Choi +3
  • Research Article
  • Citations148

Neural Network-based Detection of Self-Admitted Technical Debt

  • Jul 29, 2019
  • ACM Transactions on Software Engineering and Methodology
  • Xiaoxue Ren +5
  • Conference Article
  • Citations22

A Survey on Research of Code Comment

  • Jan 12, 2019
  • Bai Yang +2
  • Conference Article
  • Citations4

An Early Investigation on the Contribution of Class and Sequence Diagrams in Source Code Comprehension

  • Mar 01, 2013
  • G Scanniello +2
  • Conference Article
  • Citations29

Learning Semantic Features for Software Defect Prediction by Code Comments Embedding

  • Nov 01, 2018
  • Xuan Huo +3
  • Research Article

Hybrid Attention Approach for Source Code Comment Generation

  • Jul 14, 2025
  • Information Technology and Control
  • Yao Meng
  • Research Article
  • Citations78

A Look into Programmers’ Heads

  • Apr 01, 2020
  • IEEE Transactions on Software Engineering
  • Norman Peitek +8
  • Front Matter
  • Citations18

Area under the curve may hide poor generalisation to external datasets

  • Apr 01, 2022
  • ESMO Open
  • A Kleppe
  • PDF
  • Research Article
  • Citations3

Source Code Comprehension and Appropriation by Novice Programmers: Understanding Novice Programmers’ Perception about Source Code Reuse

  • Dec 20, 2019
  • Journal on Interactive Systems
  • Luana Müller +2
  • Research Article
  • Citations3

Multi-Intent Inline Code Comment Generation via Large Language Model

  • Mar 23, 2024
  • International Journal of Software Engineering and Knowledge Engineering
  • Xiaowei Zhang +4
  • Research Article
  • Citations2

APIASO: A Novel API Call Obfuscation Technique Based on Address Space Obscurity

  • Aug 08, 2023
  • Applied Sciences
  • Yang Li +5
  • Research Article
  • Citations53

CTIMD: Cyber threat intelligence enhanced malware detection using API call sequences with parameters

  • Oct 01, 2023
  • Computers & Security
  • Tieming Chen +3
  • Research Article
  • Citations32

CONSIT: a fully automated conditioned program slicer

  • Nov 26, 2003
  • Software: Practice and Experience
  • Chris Fox +3
  • Conference Article
  • Citations1

ASKDetector: An AST-Semantic and Key Features Fusion based Code Comment Mismatch Detector

  • Apr 15, 2024
  • Haiyang Yang +4
Cactus Communications logo

Copyright 2026 Cactus Communications. All rights reserved.