Treffer: Detecting code smells using artificial intelligence : a prototype ; Koodihajujen havaitseminen käyttäen tekoälyä : prototyyppi

Title:
Detecting code smells using artificial intelligence : a prototype ; Koodihajujen havaitseminen käyttäen tekoälyä : prototyyppi
Contributors:
Lappeenrannan-Lahden teknillinen yliopisto LUT, Lappeenranta-Lahti University of Technology LUT
Publication Year:
2020
Collection:
LUTPub (LUT University / LUT yliopisto)
Document Type:
Dissertation master thesis
File Description:
fulltext
Language:
English
Rights:
fi=Kaikki oikeudet pidätetään.|en=All rights reserved.|
Accession Number:
edsbas.DFEB2290
Database:
BASE

Weitere Informationen

Artificial intelligence is one of the major subtleties of our time. Artificial intelligence is utilized in improving the quality of software projects and in applications themselves. Code smells are characteristics in the source code that indicate there is a deeper problem, and they are a long-term nuisance for developers. Code smells make it hard to maintain, reuse, and expand software. You can refactor your source code to get rid of code smells, but first you need to find code smells. In this thesis, I made a prototype for detecting code smells as well as presented its design and development. The prototype was implemented in the Python programming language, using machine learning, neural networks, and deep learning. Training and testing data were taken from the MLCQ code smell dataset, and non-smelly samples were collected from GitHub’s open source Java repositories. The prototype was able to detect “long method” and “feature envy” code smells successfully, although only a relatively small amount of data was collected and used for the training of the prototype. ; Tekoäly on yksi aikamme merkittävistä hienouksista. Tekoälyä hyödynnetään ohjelmistoprojektien laadun parantamisessa ja myös itse sovelluksissa. Koodihajut ovat piirteitä lähdekoodissa, jotka indikoivat syvempää ongelmaa, ja ne ovat koodaajien pitkäaikainen riesa. Koodihajut vaikeuttavat ohjelmien ketterää ylläpidettävyyttä, uudelleenkäyttöä ja laajennettavuutta. Lähdekoodia refaktoroimalla voi päästä koodihajuista eroon, mutta ensiksi koodihajut täytyy löytää. Tutkimuksessa tehtiin prototyyppi koodihajujen havaitsemiseen sekä esiteltiin sen suunnittelu ja kehitys. Prototyyppi toteutettiin Python-ohjelmointikielellä, käyttäen koneoppimista, neuroverkkoja ja syväoppimista. Opetus- ja testidata otettiin MLCQ-koodihajuaineistosta, sekä lisäksi dataa kerättiin GitHubin avoimen lähdekoodin Java-kielen ohjelmavarastoista. Prototyyppi onnistui havaitsemaan onnistuneesti ”long method” ja ”feature envy” koodihajuja, vaikka dataa kerättiin ja käytettiin vain ...