Skip to Main content Skip to Navigation
New interface
Conference papers

Suggesting Descriptive Method Names: An Exploratory Study of Two Machine Learning Approaches

Oleksandr Zaitsev 1, 2 Stéphane Ducasse 2 Alexandre Bergel 3 Mathieu Eveillard 1 
2 RMOD - Analyses and Languages Constructs for Object-Oriented Application Evolution
Inria Lille - Nord Europe, CRIStAL - Centre de Recherche en Informatique, Signal et Automatique de Lille - UMR 9189
Abstract : Programming is a form of communication between the person who is writing code and the one reading it. Nevertheless, very often developers neglect readability, and even well-written code becomes less understandable as software evolves. Together with the growing complexity of software systems, this creates an increasing need for automated tools for improving the readability of source code. In this work, we focus on method names and study how a descriptive name can be automatically generated from a method's body. We experiment with two approaches from the field of text summarization: One based on TF-IDF and the other on deep recurrent neural network. We collect a dataset of methods from 50 real world projects. We evaluate our approaches by comparing the generated names to the actual ones and report the result using Precision and Recall metrics. For TF-IDF, we get results as good as 28% precision and 45% recall; and for deep neural network, 46% precision and 32% recall.
Complete list of metadata

Cited literature [26 references]  Display  Hide  Download
Contributor : Lse Lse Connect in order to contact the contributor
Submitted on : Friday, October 9, 2020 - 10:27:59 AM
Last modification on : Tuesday, November 22, 2022 - 2:26:16 PM
Long-term archiving on: : Sunday, January 10, 2021 - 6:22:01 PM


Files produced by the author(s)


  • HAL Id : hal-02962334, version 1


Oleksandr Zaitsev, Stéphane Ducasse, Alexandre Bergel, Mathieu Eveillard. Suggesting Descriptive Method Names: An Exploratory Study of Two Machine Learning Approaches. QUATIC 2020 - 13th International Conference on the Quality of Information and Communications Technology, Sep 2020, Faro / Virtual, Portugal. ⟨hal-02962334⟩



Record views


Files downloads