arrow
Return

Fold2Vec: Towards a Statement-Based Representation of Code for Code Comprehension

delete2023-02-13
delete4
delete
OA
AI
F
Francesco Bertolotti *
W
Walter Cazzola
DOI:10.1145/3514232delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
We introduce a novel approach to source code representation to be used in combination with neural networks. Such a representation is designed to permit the production of a continuous vector for each code statement. In particular, we present how the representation is produced in the case of Java source code. We test our representation for three tasks: code summarization, statement separation, and code search. We compare with the state-of-the-art non-autoregressive and end-to-end models for these tasks. We conclude that all tasks benefit from the proposed representation to boost their performance in terms of F1-score, accuracy, and mean reciprocal rank, respectively. Moreover, we show how models trained on code summarization and models trained on statement separation can be combined to address methods with tangled responsibilities, meaning that these models can be used to detect code misconduct.
Keywords:
Big code
learning representations
method name suggestion
intent identification

Journal

A
ACM Transactions on Software Engineering and Methodology
IF:
6.2
Papers:
1.2K
Citations:
3.4K

Organization

U
University of Milan
Scholars:
5.1W
Papers: 3.9W
Citations: 5.0W