Learning to Represent Patches

08/31/2023
by   Xunzhu Tang, et al.
0

Patch representation is crucial in automating various software engineering tasks, like determining patch accuracy or summarizing code changes. While recent research has employed deep learning for patch representation, focusing on token sequences or Abstract Syntax Trees (ASTs), they often miss the change's semantic intent and the context of modified lines. To bridge this gap, we introduce a novel method, Patcherizer. It delves into the intentions of context and structure, merging the surrounding code context with two innovative representations. These capture the intention in code changes and the intention in AST structural modifications pre and post-patch. This holistic representation aptly captures a patch's underlying intentions. Patcherizer employs graph convolutional neural networks for structural intention graph representation and transformers for intention sequence representation. We evaluated Patcherizer's embeddings' versatility in three areas: (1) Patch description generation, (2) Patch accuracy prediction, and (3) Patch intention identification. Our experiments demonstrate the representation's efficacy across all tasks, outperforming state-of-the-art methods. For example, in patch description generation, Patcherizer excels, showing an average boost of 19.39 in BLEU, 8.71

READ FULL TEXT

page 1

page 2

page 3

page 4

research
03/12/2020

CC2Vec: Distributed Representations of Code Changes

Existing work on software patches often use features specific to a singl...
research
02/08/2023

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

Representing code changes as numeric feature vectors, i.e., code change ...
research
02/16/2019

PatchNet: A Tool for Deep Patch Classification

This work proposes PatchNet, an automated tool based on hierarchical dee...
research
06/04/2021

History Encoding Representation Design for Human Intention Inference

In this extended abstract, we investigate the design of learning represe...
research
08/29/2023

Multilevel Semantic Embedding of Software Patches: A Fine-to-Coarse Grained Approach Towards Security Patch Detection

The growth of open-source software has increased the risk of hidden vuln...
research
07/18/2023

FlexiAST: Flexibility is What AST Needs

The objective of this work is to give patch-size flexibility to Audio Sp...
research
07/19/2022

Enhancing Security Patch Identification by Capturing Structures in Commits

With the rapid increasing number of open source software (OSS), the majo...

Please sign up or login with your details

Forgot password? Click here to reset