Aspect-Based API Review Classification: How Far Can Pre-Trained Transformer Model Go?
Authors:
- 1 March 2022
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- p. 385-395
Abstract
APIs (Application Programming Interfaces) are reusable software libraries and are building blocks for modern rapid software development. Previous research shows that programmers frequently share and search for reviews of APIs on the mainstream software question and answer (Q&A) platforms like Stack Overflow, which motivates researchers to design tasks and approaches related to process API reviews automatically. Among these tasks, classifying API reviews into different aspects (e.g., performance or security), which is called the aspect-based API review classification, is of great importance. The current state-of-the-art (SOTA) solution to this task is based on the traditional machine learning algorithm. Inspired by the great success achieved by pre-trained models on many software engineering tasks, this study fine-tunes six pre-trained models for the aspect-based API review classification task and compares them with the current SOTA solution on an API review benchmark collected by Uddin et al. The investigated models include four models (BERT, RoBERTa, ALBERT and XLNet) that are pre-trained on natural languages, BERTOverflow that is pre-trained on text corpus extracted from posts on Stack Overflow, and CosSensBERT that is designed for handling imbalanced data. The results show that all the six fine-tuned models outperform the traditional machine learning-based tool. More specifically, the improvement on the F1-score ranges from 21.0% to 30.2%. We also find that BERTOverflow, a model pre-trained on the corpus from Stack Overflow, does not show better performance than BERT. The result also suggests that CosSensBERT also does not exhibit better performance than BERT in terms of F1, but it is still worthy of being considered as it achieves better performance on MCC and AUC.Keywords
All Related Versions
Funding Information
- Ministry of Education, Singapore (MOE2019-T2-1-193)
- Natural Sciences and Engineering Research Council of Canada
- University of Calgary
- Alberta Innovates
This publication has 30 references indexed in Scilit:
- Classifying stack overflow posts on API issues2018
- Automatic summarization of API reviews2017
- Predicting semantically linkable knowledge in developer online forums via convolutional neural network2016
- Augmenting API documentation with insights from stack overflow2016
- How API Documentation FailsIEEE Software, 2015
- What are mobile developers asking about? A large scale study using stack overflowEmpirical Software Engineering, 2015
- Extracting problematic API features from forum discussions2013
- Obstacles in Using Frameworks and APIs: An Exploratory Study of Programmers' Newsgroup Discussions2011
- Using AUC and accuracy in evaluating learning algorithmsIEEE Transactions on Knowledge and Data Engineering, 2005
- A Simple Generalisation of the Area Under the ROC Curve for Multiple Class Classification ProblemsMachine Learning, 2001