Unit Under Test Identification Using Natural Language Processing Techniques

Bibliographic Details
Title: Unit Under Test Identification Using Natural Language Processing Techniques
Authors: Madeja Matej, Porubän Jaroslav
Source: Open Computer Science, Vol 11, Iss 1, Pp 22-32 (2020)
Publisher Information: De Gruyter, 2020.
Publication Year: 2020
Collection: LCC:Electronic computers. Computer science
Subject Terms: natural language processing, unit under test, program comprehension, automated identification, software maintenance, Electronic computers. Computer science, QA75.5-76.95
More Details: Unit under test identification (UUT) is often difficult due to test smells, such as testing multiple UUTs in one test. Because the tests best reflect the current product specification they can be used to comprehend parts of the production code and the relationships between them. Because there is a similar vocabulary between the test and UUT, five NLP techniques were used on the source code of 5 popular Github projects in this paper. The collected results were compared with the manually identified UUTs. The tf-idf model achieved the best accuracy of 22% for a right UUT and 57% with a tolerance up to fifth place of manual identification. These results were obtained after preprocessing input documents with java keywords removal and word split. The tf-idf model achieved the best model training time and the index search takes within 1s per request, so it could be used in an Integrated Development Environment (IDE) as a support tool in the future. At the same time, it has been found that, for document preprocessing, word splitting improves accuracy best and removing java keywords has just a small improvement for tf-idf model results. Removing comments only slightly worsens the accuracy of Natural Language Processing (NLP) models. The best speed provided the word splitting with average 0.3s preprocessing time per all documents in a project.
Document Type: article
File Description: electronic resource
Language: English
ISSN: 2299-1093
Relation: https://doaj.org/toc/2299-1093
DOI: 10.1515/comp-2020-0150
Access URL: https://doaj.org/article/10afe9488f1d4871ae6d06f1d1a35858
Accession Number: edsdoj.10afe9488f1d4871ae6d06f1d1a35858
Database: Directory of Open Access Journals
More Details
ISSN:22991093
DOI:10.1515/comp-2020-0150
Published in:Open Computer Science
Language:English