TranS^3: A Transformer-based Framework for Unifying Code Summarization and Code Search

03/06/2020
by   Wenhua Wang, et al.
0

Code summarization and code search have been widely adopted in sofwaredevelopmentandmaintenance. However, fewstudieshave explored the efcacy of unifying them. In this paper, we propose TranS^3 , a transformer-based framework to integrate code summarization with code search. Specifcally, for code summarization,TranS^3 enables an actor-critic network, where in the actor network, we encode the collected code snippets via transformer- and tree-transformer-based encoder and decode the given code snippet to generate its comment. Meanwhile, we iteratively tune the actor network via the feedback from the critic network for enhancing the quality of the generated comments. Furthermore, we import the generated comments to code search for enhancing its accuracy. To evaluatetheefectivenessof TranS^3 , we conduct a set of experimental studies and case studies where the experimental results suggest that TranS^3 can signifcantly outperform multiple state-of-the-art approaches in both code summarization and code search and the study results further strengthen the efcacy of TranS^3 from the developers' points of view.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
03/28/2018

Actor-Critic based Training Framework for Abstractive Summarization

We present a training framework for neural abstractive summarization bas...
research
05/24/2023

Reinforcement Learning finetuned Vision-Code Transformer for UI-to-Code Generation

Automated HTML/CSS code generation from screenshots is an important yet ...
research
04/19/2021

Code Structure Guided Transformer for Source Code Summarization

Source code summarization aims at generating concise descriptions of giv...
research
07/09/2022

A Closer Look into Transformer-Based Code Intelligence Through Code Transformation: Challenges and Opportunities

Transformer-based models have demonstrated state-of-the-art performance ...
research
11/17/2018

Improving Automatic Source Code Summarization via Deep Reinforcement Learning

Code summarization provides a high level natural language description of...
research
09/01/2023

Laminar: A New Serverless Stream-based Framework with Semantic Code Search and Code Completion

This paper introduces Laminar, a novel serverless framework based on dis...
research
07/12/2022

Are We Building on the Rock? On the Importance of Data Preprocessing for Code Summarization

Code summarization, the task of generating useful comments given the cod...

Please sign up or login with your details

Forgot password? Click here to reset