Leveraging Class Hierarchy for Code Comprehension

Jiyang Zhang, Sheena Panthaplackel, Pengyu Nie, Junyi Jessy Li, Ray Mooney, Milos GligoricCAP @ NeurIPS 2020

Abstract

Object-oriented programming languages enable a hierarchical class structure, which provides rich contextual information to guide code comprehension and synthesis. In this work, we propose the novel task of generating comments for overriding methods to facilitate code comprehension. To address this task, we formulate a deep learning framework which (1) exploits context from the comments of overridden methods and class names; (2) learns to generate comments in overriding methods that are more specific than those in the overridden methods; and (3) ensures that the generated comments are compatible with comments of overridden methods.
BibTeX
@inproceedings{zhang2020leveraging,
  author = {Jiyang Zhang and Sheena Panthaplackel and Pengyu Nie and Junyi Jessy Li and Ray Mooney and Milos Gligoric},
  title = {{Leveraging Class Hierarchy for Code Comprehension}},
  booktitle = {CAP @ NeurIPS},
  year = {2020},
  url = {https://openreview.net/forum?id=WHjjpMNZFoD},
}

Loading related content...

Figure