IDEAS home Printed from https://ideas.repec.org/a/gam/jmathe/v12y2024i7p1012-d1365754.html
   My bibliography  Save this article

Commit-Level Software Change Intent Classification Using a Pre-Trained Transformer-Based Code Model

Author

Listed:
  • Tjaša Heričko

    (Faculty of Electrical Engineering and Computer Science, University of Maribor, Koroška cesta 46, 2000 Maribor, Slovenia)

  • Boštjan Šumak

    (Faculty of Electrical Engineering and Computer Science, University of Maribor, Koroška cesta 46, 2000 Maribor, Slovenia)

  • Sašo Karakatič

    (Faculty of Electrical Engineering and Computer Science, University of Maribor, Koroška cesta 46, 2000 Maribor, Slovenia)

Abstract

Software evolution is driven by changes made during software development and maintenance. While source control systems effectively manage these changes at the commit level, the intent behind them are often inadequately documented, making understanding their rationale challenging. Existing commit intent classification approaches, largely reliant on commit messages, only partially capture the underlying intent, predominantly due to the messages’ inadequate content and neglect of the semantic nuances in code changes. This paper presents a novel method for extracting semantic features from commits based on modifications in the source code, where each commit is represented by one or more fine-grained conjoint code changes, e.g., file-level or hunk-level changes. To address the unstructured nature of code, the method leverages a pre-trained transformer-based code model, further trained through task-adaptive pre-training and fine-tuning on the downstream task of intent classification. This fine-tuned task-adapted pre-trained code model is then utilized to embed fine-grained conjoint changes in a commit, which are aggregated into a unified commit-level vector representation. The proposed method was evaluated using two BERT-based code models, i.e., CodeBERT and GraphCodeBERT, and various aggregation techniques on data from open-source Java software projects. The results show that the proposed method can be used to effectively extract commit embeddings as features for commit intent classification and outperform current state-of-the-art methods of code commit representation for intent categorization in terms of software maintenance activities undertaken by commits.

Suggested Citation

  • Tjaša Heričko & Boštjan Šumak & Sašo Karakatič, 2024. "Commit-Level Software Change Intent Classification Using a Pre-Trained Transformer-Based Code Model," Mathematics, MDPI, vol. 12(7), pages 1-38, March.
  • Handle: RePEc:gam:jmathe:v:12:y:2024:i:7:p:1012-:d:1365754
    as

    Download full text from publisher

    File URL: https://www.mdpi.com/2227-7390/12/7/1012/pdf
    Download Restriction: no

    File URL: https://www.mdpi.com/2227-7390/12/7/1012/
    Download Restriction: no
    ---><---

    References listed on IDEAS

    as
    1. Peng Zeng & Guanjun Lin & Jun Zhang & Ying Zhang, 2023. "Intelligent detection of vulnerable functions in software through neural embedding‐based code analysis," International Journal of Network Management, John Wiley & Sons, vol. 33(3), May.
    Full references (including those not matched with items on IDEAS)

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.

      Corrections

      All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:gam:jmathe:v:12:y:2024:i:7:p:1012-:d:1365754. See general information about how to correct material in RePEc.

      If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

      If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

      If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

      For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: MDPI Indexing Manager (email available below). General contact details of provider: https://www.mdpi.com .

      Please note that corrections may take a couple of weeks to filter through the various RePEc services.

      IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.