Advertisement

IDEAL: An Open-Source Identifier Name Appraisal Tool

Assistant Professor at University of Hawai‘i at Mānoa
Sep. 29, 2021
Advertisement

More Related Content

Slideshows for you(20)

Similar to IDEAL: An Open-Source Identifier Name Appraisal Tool(20)

Advertisement
Advertisement

IDEAL: An Open-Source Identifier Name Appraisal Tool

  1. 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)
  2. 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
  3. GOAL Provide the community with an open- source, extensible tool for the detection of multiple types of naming violations in multiple programming languages 02
  4. 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
  5. 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
  6. IDEAL 05 Naming Violation Detection Detection Report Open- Source
  7. 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
  8. 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
  9. APPLICABILITY 08 Practitioners Researchers Educators
  10. THANKS! h t t p s : / / s c a n l . o r g
Advertisement