Optimizing the code smell classification performance of pretrained language models using the triple loss method
Is this your thesis?
This record came from a bulk archive import. If it’s yours, link it to your profile.
Abstract (EN)
The aim of this thesis is to create a bad code or smelly code detection system by analyzing the code changes made by developers and the outputs of code smell detection tools with deep learning systems. By using deep learning techniques, it is aimed to take semantic meaning into account in bad code detection and to increase accuracy and performance. Towards this goal, a study has been conducted to improve the performance of the pre-trained language models used in deep learning by using the triple loss technique to improve the performance of bad code classification. Today, the growing and diversifying amount of code has created difficulties in code analysis and code management. However, repositories such as GitHub, which contain large amounts of open source code on the Internet, offer significant opportunities in code analysis. Code embedding stores the semantic meaning of code in vector form. While existing code embedding methods have been successfully used in source code analysis for various software engineering tasks, additional work is needed to achieve the performance and functionality of static code analysis tools. Furthermore, to improve the performance of systems using code embedding models, there is a need to standardize the preprocessing methods used to refine embeddings, as in the field of image processing. This thesis presents the development of a model for classifying collected smelly codes and the application of contrastive learning to code embeddings to improve the performance of this model. For code classification tasks such as code odor detection, a triple loss-based network is used to strengthen the intra-class similarity and increase the distance between different classes. An experimental dataset was created by collecting code from open-source project repositories on GitHub. In the study, the widely used, pre-trained BERT, CodeBERT and GraphCodeBERT language models are improved with code embeddings and benchmark learning, and the effect of this improvement on classification is evaluated. The results show that the direct use of the embeddings generated by the pre-trained models yields an accuracy rate between 80-89%. This accuracy was improved by 7-19% with the use of contrastive learning. These results show that contrastive learning can offer advantages for pre-trained code embeddings approaches as a pre-processing step. Consequently, the incorporation of contrastive learning techniques into the code placement vector generation process can provide opportunities for performance improvement in code analysis.
Author
Ertuğrul İslamoğlu
Institution
How to Cite
Ertuğrul İslamoğlu (Master Thesis). Optimizing the code smell classification performance of pretrained language models using the triple loss method, 2024, Fatih Sultan Mehmet Foundation University .
Keywords
License
Tüm Hakları Saklıdır
This work is shared under the specified license terms.
More theses from Fatih Sultan Mehmet Foundation University
- Iman (Faith), Islam and kufr conceptions in Turkish divans (In 15-16th century)(2024)
- The effect of using Quizlet in teaching vocabulary to those learning Turkish as a foreign language(2023)
- Abdurrahman Zahidi-i Konev'is poetic dictionary of Tevfiyye(2023)
- The effect of parental mentalization on parental stress: Co-parenting as a moderator(2023)
- Compositional analysis of the miniatures of the Falnâme work recorded in TSMK H. 1703(2025)
- Sultanate and the people of Harameyn: Analysis and transliteration of the notebook of the last Harameyn translator, Hacı Ferid Effendi(2023)
