Semantics-Driven Learning for Microservice Annotations
Abstract:
Annotations are program metadata that generates code and configuration files, among others. Different frameworks provide annotations to facilitate the implementation of microservice applications while their absence can slow down the maintenance of microservices and their misuse can lead to potential bugs. In this paper, we propose a novel semantics-driven learning approach for capturing the relation between code fragments and annotations, leveraging a Recurrent Neural Network (RNN) and a K-Nearest-Neighbour (KNN) classifier. The approach locates similar pieces of code to increase the probability of suggesting annotations of unseen fragments. We utilise PyTorch and Sci-kit Learn to evaluate our approach with a set of Java code fragments, and we measure how similar two code fragments are by a number between zero (close) and one (distant). The results indicate that our semantics-driven learning framework achieves an average of 87% of correct recommendations of annotations when the code fragments have a distance of 0.4 against the expected annotations subset.
Año de publicación:
2022
Keywords:
- Static Analysis
- semantic analysis
- Microservice annotations
Fuente:


Tipo de documento:
Conference Object
Estado:
Acceso restringido
Áreas de conocimiento:
- Ingeniería de software
- Software
Áreas temáticas:
- Métodos informáticos especiales