paper-with-me

Papers

Commit2Vec: Learning Distributed Representations of Code Changes

2019-11-18 · Rocìo Cabrera Lozoya, Arnaud Baumann, Antonino Sabetta, Michele Bezzi

Deep learning methods, which have found successful applications in fields like image classification and natural language processing, have recently been applied to source code analysis too, due to the enormous amount of freely available source code (e.g., from open-source software repositories). In this work, we elaborate upon a state-of-the-art approach to the representation of source code that uses information about its syntactic structure, and we adapt it to represent source changes (i.e., commits). We use this representation to classify security-relevant commits. Because our method uses transfer learning (that is, we train a network on a "pretext task" for which abundant labeled data is available, and then we use such network for the target task of commit classification, for which fewer labeled instances are available), we studied the impact of pre-training the network using two different pretext tasks versus a randomly initialized model. Our results indicate that representations that leverage the structural information obtained through code syntax outperform token-based representations. Furthermore, the performance metrics obtained when pre-training on a loosely related pretext task with a very large dataset ($>10^6$ samples) were surpassed when pretraining on a smaller dataset ($>10^4$ samples) but for a pretext task that is more closely related to the target task.

📄 PDF Abstract BibTeX arXiv:1911.07605

Code (0)

등록된 구현이 없습니다.

Tasks

General Classificationimage-classificationImage ClassificationTransfer Learning

Similar Papers 제목 키워드 기반

Just-In-Time Software Defect Prediction via Bi-modal Change Representation Learning

2024-10-15 · Yuze Jiang, Beijun Shen, Xiaodong Gu

For predicting software defects at an early stage, researchers have proposed just-in-time defect prediction (JIT-DP) to identify potential defects in code commits. The prevailing approaches train models to represent code…

Representation Learning

Unsupervised Learning of General-Purpose Embeddings for Code Changes

2021-06-03 · Mikhail Pravilov, Egor Bogomolov, Yaroslav Golubev, Timofey Bryksin

Applying machine learning to tasks that operate with code changes requires their numerical representation. In this work, we propose an approach for obtaining such representations during pre-training and evaluate them on …

CommitBART: A Large Pre-trained Model for GitHub Commits

2022-08-17 · Shangqing Liu, Yanzhou Li, Xiaofei Xie, Yang Liu

GitHub commits, which record the code changes with natural language messages for description, play a critical role for software developers to comprehend the software evolution. To promote the development of the open-sour…

Contrastive LearningDecoderDenoising

CCRep: Learning Code Change Representations via Pre-Trained Code Model and Query Back

2023-02-08 · Zhongxin Liu, Zhijie Tang, Xin Xia, Xiaohu Yang

Representing code changes as numeric feature vectors, i.e., code change representations, is usually an essential step to automate many software engineering tasks related to code changes, e.g., commit message generation a…

Representation Learning

AgentPack: A Dataset of Code Changes, Co-Authored by Agents and Humans

2025-09-26 · Yangtian Zi, Zixuan Wu, Aleksander Boruch-Gruszecki, Jonathan Bell 외 arxiv

Fine-tuning large language models for code editing has typically relied on mining commits and pull requests. The working hypothesis has been that commit messages describe human intent in natural language, and patches to …