IDEAL: An Open-Source Identifier Name Appraisal Tool
Sep. 29, 2021•0 likes
0 likes
Be the first to like this
Show More
•107 views
views
Total views
0
On Slideshare
0
From embeds
0
Number of embeds
0
Download to read offline
Report
Software
Presented at: The 37th International Conference on Software Maintenance and Evolution (ICSME '21)
Date of Conference: September 27 - October 1, 2021
Conference Location: Virtual Conference
IDEAL: An Open-Source Identifier Name Appraisal Tool
IDEAL
An Open-Source Identifier Name Appraisal Tool
Anthony Peruma, Venera Arnaoudova, Christian D. Newman
37th Internatio nal Conference on Software Maintenance and Evolution (ICSME ‘21)
IDENTIFIER NAMES
Identifiers are crucial to program comprehension
On average, around 70% of characters in the code
are identifier names
Well-constructed identifier names can improve
comprehension activities by an estimated 19%
Limited support for developers in crafting high-
quality identifier names
Linguistic anti-patterns represent deviations from
well-established lexical naming practices in code
01
GOAL
Provide the community with an open-
source, extensible tool for the detection
of multiple types of naming violations in
multiple programming languages
02
19 DETECTED NAMING VIOLATIONS
◸ “Get” more than accessor
◸ “Is” returns more than a Boolean
◸ “Set” method returns
◸ Expecting but not getting single
instance
◸ Not implemented condition
◸ Validation method does not confirm
◸ “Get” method does not return
◸ Says one but contains many
◸ Says many but contains one
◸ Attribute name and type are
opposite
◸ Name contains only special
characters
◸ Not answered question
◸ Transform method does not return
◸ Expecting but not getting a collection
◸ Method name and return type are
opposite
◸ Method signature and comment are
opposite
◸ Name suggests Boolean but type
does not
◸ Attribute signature and comment are
opposite
◸ Redundant use of “test” in method
name
03
Redundant use of “test” in method name
Validation method does not confirm
“Set” method returns
Attribute name and type are opposite
SAMPLE NAMING VIOLATIONS
04
FEATURES
19 linguistic anti-patterns (with support
for adding new anti-patterns)
Analyzes methods, attributes, method
variables, and method parameters
Utilizes NLTK, WordNet and Stanford
tagger, and srcML
Supports Java and C# Supports project-specific customizations
Provides fine-grain feedback
Source code publicly available
06
EVALUATION
◸ Average precision: 75.27%
◸ Manual Evaluation:
◹ 2,019 instances from 2 C#
and 2 Java open-source
systems
◸ Compared further 294 instances
against an existing tool
◸ We did not perform any project-
level customizations to the tool
◹ This results in false positives
when developers utilize
custom data types
07