Kent State University
Stereocode: A Tool for Automatic Identification of Method Stereotypes
Abstract
dc:descriptionThe thesis presents the development and architecture of Stereocode, a software application to automatically determine the stereotypes of methods in object-oriented program source code. As input, Stereocode takes in srcML archives, a specialized XML format. The srcML format embeds abstract syntax information into the source code in the form of XML elements. This supports exploration of the source code along with the conducting of static program analysis. The srcML archive contains two srcML units and each unit translates to one source code file. The archive contains a unit for a header file (.hpp) where the class is defined and an implementation (.cpp) unit where most of the methods are defined. Stereocode relies on libsrcml to execute xpath expressions to collect information about the methods to stereotype. The tool labels all methods in the provided source code with the following different stereotypes: get, non-const get, predicate, property, void-accessor, set, command, non-void command, collaborator, factory, collaborational-predicate, collaborational-property, collaborational-void-accessor, collaborational-command, wrapper, stateless, and empty. The tool outputs a srcML archive that is annotated with the method stereotypes as an attribute in the function tag (e.g., < function stereotype=”get” > ). There is one output archive for each input archive. Also, a report file is generated with every method header, its input file, and the stereotype it is assigned. The tool is evaluated by examining an open-source system, HippoDraw, and comparing the accuracy of the stereotypes with the results of a research prototype from previous work on method stereotypes. Stereocode is run on 214 of HippoDraw’s files containing 2539 methods. The results show that Stereocode more accurately calculates the stereotype of the methods. This is due to the inclusion of class declaration information, attribute definitions, and additional static analysis.With the stereotypes of the methods in the labeled in the annotated archive the program methods can be easily documented with a comment that contains their stereotype. Class stereotypes can be more easily found using this tool, since finding method stereotypes are the first step in determining class stereotypes. The class and method stereotypes can then be used to describe the software system. The stereotypes are used in other tools to aid with program comprehension, for example, automatically generating natural language summaries for methods, finding code smells, categorizing commits, and improving feature location.
Degree
thesis:*- Name thesis:degree_name
- MS
- Level thesis:degree_level
- masters
- Discipline thesis:degree_discipline
- College of Arts and Sciences / Department of Computer Science
- Grantor dc:publisher
- Kent State University
- Year dc:date
- 2021
Author and committee
dc:creator, dc:contributor.*- Author dc:creator
-
- Doleh, Zane
- Advisor dc:contributor.advisor
-
- Maletic, Jonathan
Subjects
dc:subject × 2Rights
dc:rights- Statement dc:rights
-
- unrestricted
- This thesis or dissertation is protected by copyright: all rights reserved. It may not be copied or redistributed beyond the terms of applicable copyright laws.
- Language dc:language
- English
Identifiers
dc:identifier.*- Repository record dc:identifier
- http://rave.ohiolink.edu/etdc/view?acc_num=kent1636394189362288