Advanced search
Start date
Betweenand


Using natural language processing techniques for automated code refactoring

Full text
Author(s):
Alan Barzilay
Total Authors: 1
Document type: Master's Dissertation
Press: São Paulo.
Institution: Universidade de São Paulo (USP). Instituto de Matemática e Estatística (IME/SBI)
Defense date:
Examining board members:
Eduardo Martins Guerra; Mauricio Finavaro Aniche; Aline Marins Paes Carvalho
Advisor: Marcelo Finger
Abstract

Natural Language Processing techniques can be applied to text in general, not only to human language but also to artificial languages such as software code. Code refactoring is a fundamental software engineering technique used both as a quality assurance tool and an important step in code correction and functionality enhancement. In this work, we propose a novel code refactoring model. By utilizing source code as input to our model we obtain automated suggestions of function extraction code refactoring in order to achieve better readability and attain good practices in general. The proposed model consists of a neural network that receives a vectorial representation of the source code and outputs a representation of the suggested refactored code. This network was trained based on a list of repositories provided through a collaboration with TU Delft Holland. Based on this list we created the biggest existing function extraction refactoring dataset --- as of the time this thesis was presented --- being %60 bigger than the second biggest dataset of its type. Furthermore, our final model achieved a test accuracy of 0.7275. (AU)

FAPESP's process: 20/02679-4 - NLPCode: using natural language processing techniques for automated code refactoring
Grantee:Alan Barzilay
Support Opportunities: Scholarships in Brazil - Master