A Comparison of Source Code Representation Methods to Predict Vulnerability Inducing Code Changes

Rusen Halepmollası, Khadija Hanifi, Ramin F. Fouladi, Ayse Tosun

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

1 Citation (Scopus)

Abstract

Vulnerability prediction is a data-driven process that utilizes previous vulnerability records and their associated fixes in software development projects. Vulnerability records are rarely observed compared to other defects, even in large projects, and are usually not directly linked to the related code changes in the bug tracking system. Thus, preparing a vulnerability dataset and building a predicting model is quite challenging. There exist many studies proposing software metrics-based or embedding/token-based approaches to predict software vulnerabilities over code changes. In this study, we aim to compare the performance of two different approaches in predicting code changes that induce vulnerabilities. While the first approach is based on an aggregation of software metrics, the second approach is based on embedding representation of the source code using an Abstract Syntax Tree and skip-gram techniques. We employed Deep Learning and popular Machine Learning algorithms to predict vulnerability-inducing code changes. We report our empirical analysis over code changes on the publicly available SmartSHARK dataset that we extended by adding real vulnerability data. Software metrics-based code representation method shows a better classification performance than embedding-based code representation method in terms of recall, precision and F1-Score.

Original languageEnglish
Title of host publicationProceedings of the 18th International Conference on Evaluation of Novel Approaches to Software Engineering, ENASE 2023
EditorsHermann Kaindl, Hermann Kaindl, Hermann Kaindl, Mike Mannion, Leszek Maciaszek, Leszek Maciaszek
PublisherScience and Technology Publications, Lda
Pages469-478
Number of pages10
ISBN (Electronic)9789897586477
DOIs
Publication statusPublished - 2023
Event18th International Conference on Evaluation of Novel Approaches to Software Engineering, ENASE 2023 - Prague, Czech Republic
Duration: 24 Apr 202325 Apr 2023

Publication series

NameInternational Conference on Evaluation of Novel Approaches to Software Engineering, ENASE - Proceedings
Volume2023-April
ISSN (Electronic)2184-4895

Conference

Conference18th International Conference on Evaluation of Novel Approaches to Software Engineering, ENASE 2023
Country/TerritoryCzech Republic
CityPrague
Period24/04/2325/04/23

Bibliographical note

Publisher Copyright:
Copyright © 2023 by SCITEPRESS - Science and Technology Publications, Lda. Under CC license (CC BY-NC-ND 4.0)

Funding

This work was funded by The Scientific and Technological Research Council of Turkey, under 1515 Frontier R&D Laboratories Support Program with project no: 5169902.

FundersFunder number
Türkiye Bilimsel ve Teknolojik Araştırma Kurumu5169902

    Keywords

    • Abstract Syntax Tree
    • Embeddings
    • Software Metrics
    • Software Vulnerabilities

    Fingerprint

    Dive into the research topics of 'A Comparison of Source Code Representation Methods to Predict Vulnerability Inducing Code Changes'. Together they form a unique fingerprint.

    Cite this