Write a Blog >>
ICSE 2021
Mon 17 May - Sat 5 June 2021

Misleading method names in software projects can confuse developers, which may lead to software defects and affect code understandability. In this paper, we present DEEPNAME, a context-based, deep learning approach to detect method name inconsistencies and suggest a proper name for a method. The key departure point is the philosophy of “Show Me Your Friends, I’ll Tell You Who You Are”. Unlike the state-of-the-art approaches, in addition to the method’s body, we also consider the interactions of the current method under study with the other ones including the caller and callee methods, and the sibling methods in the same enclosing class. The sequences of sub-tokens in the program entities’ names in the contexts are extracted and used as the input for an RNN-based encoder-decoder to produce the representations for the current method. We modify that RNN model to integrate the copy mechanism and our newly developed component, called non-copy mechanism, to emphasize on the possibility of a certain sub-token not copied to follow the current sub-token in the currently generated method name. We conducted several experiments to evaluate DEEPNAME on large datasets with +14M methods. For consistency checking, DEEPNAME improves the state-of-the-art approach by 2.1%, 19.6%, and 11.9% relatively in recall, precision, and F-score, respectively. For name suggestion, DEEPNAME improves relatively over the state-of-the-art approaches in precision (1.8%–30.5%), recall (8.8%–46.1%), and F-score (5.2%–38.2%). To assess DEEPNAME’s usefulness, we detected inconsistent methods and suggested new names in active projects. Among 50 pull requests, 12 were merged into the main branch. In total, in 30/50 cases, the team members agree that our suggested names are more meaningful than the current names.

Conference Day
Tue 25 May

Displayed time zone: Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna change

19:35 - 20:55
1.5.5. Developers: Naming Methods and VariablesTechnical Track / Journal-First Papers at Blended Sessions Room 5 +12h
Chair(s): José Miguel RojasUniversity of Leicester, UK
19:35
20m
Paper
How Developers Choose NamesJournal-First
Journal-First Papers
Dror FeitelsonHebrew University, Ayelet MizrahiHebrew University, Nofar NoyHebrew University, Aviad Ben ShabatHebrew University, Or EliyahuHebrew University, Roy ShefferHebrew University
Link to publication DOI Pre-print Media Attached
19:55
20m
Paper
IdBench: Evaluating Semantic Representations of Identifier Names in Source CodeTechnical Track
Technical Track
Yaza WainakhTU Darmstadt, Moiz RaufUniversity of Stuttgart, Michael PradelUniversity of Stuttgart
Pre-print Media Attached
20:15
20m
Paper
A Context-based Automated Approach for Method Name Consistency Checking and SuggestionTechnical Track
Technical Track
Yi LiNew Jersey Institute of Technology, Shaohua WangNew Jersey Institute of Technology, Tien N. NguyenUniversity of Texas at Dallas
Pre-print Media Attached
20:35
20m
Paper
On the Naming of Methods: A Survey of Professional DevelopersArtifact ReusableTechnical TrackArtifact Available
Technical Track
Reem S. AlsuhaibaniKent State University, Christian D. NewmanRochester Institute of Technology, Michael J. DeckerBowling Green State University, Michael L. CollardThe University of Akron, Jonathan I. MaleticKent State University
Pre-print Media Attached

Conference Day
Wed 26 May

Displayed time zone: Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna change

07:35 - 08:55
1.5.5. Developers: Naming Methods and VariablesTechnical Track / Journal-First Papers at Blended Sessions Room 5
07:35
20m
Paper
How Developers Choose NamesJournal-First
Journal-First Papers
Dror FeitelsonHebrew University, Ayelet MizrahiHebrew University, Nofar NoyHebrew University, Aviad Ben ShabatHebrew University, Or EliyahuHebrew University, Roy ShefferHebrew University
Link to publication DOI Pre-print Media Attached
07:55
20m
Paper
IdBench: Evaluating Semantic Representations of Identifier Names in Source CodeTechnical Track
Technical Track
Yaza WainakhTU Darmstadt, Moiz RaufUniversity of Stuttgart, Michael PradelUniversity of Stuttgart
Pre-print Media Attached
08:15
20m
Paper
A Context-based Automated Approach for Method Name Consistency Checking and SuggestionTechnical Track
Technical Track
Yi LiNew Jersey Institute of Technology, Shaohua WangNew Jersey Institute of Technology, Tien N. NguyenUniversity of Texas at Dallas
Pre-print Media Attached
08:35
20m
Paper
On the Naming of Methods: A Survey of Professional DevelopersArtifact ReusableTechnical TrackArtifact Available
Technical Track
Reem S. AlsuhaibaniKent State University, Christian D. NewmanRochester Institute of Technology, Michael J. DeckerBowling Green State University, Michael L. CollardThe University of Akron, Jonathan I. MaleticKent State University
Pre-print Media Attached