Write a Blog >>
ASE 2020
Mon 21 - Fri 25 September 2020 Melbourne, Australia
Wed 23 Sep 2020 01:10 - 01:30 at Koala - Recommender Systems for Software Engineering Chair(s): Shaowei Wang

API misuses cause significant problem in software development. Existing methods detect API misuses against frequent API usage patterns mined from codebase. They make a naive assumption that API usage that deviates from the most-frequent API usage is a misuse. However, there is a big knowledge gap between API usage patterns and API usage caveats in terms of comprehensiveness, explainability and best practices. In this work, we propose a novel approach that detects API misuses directly against the API caveat knowledge, rather than API usage patterns. We develop open information extraction methods to construct a novel API-constraint knowledge graph from API reference documentation. This knowledge graph explicitly models two types of API-constraint relations (call-order and condition-checking) and enriches return and throw relations with return conditions and exception triggers. It empowers the detection of three types of frequent API misuses - missing calls, missing condition checking and missing exception handling, while existing detectors mostly focus on only missing calls. As a proof-of-concept, we apply our approach to Java SDK API Specification. Our evaluation confirms the high accuracy of the extracted API-constraint relations. Our knowledge-driven API misuse detector achieves 0.60 (68/113) precision and 0.28 (68/239) recall for detecting Java API misuses in the API misuse benchmark MuBench. This performance is significantly higher than that of existing pattern-based API misused detectors. A pilot user study with 12 developers shows that our knowledge-driven API misuse detection is very promising in helping developers avoid API misuses and debug the bugs caused by API misuses.

Wed 23 Sep

Displayed time zone: (UTC) Coordinated Universal Time change

01:10 - 02:10
Recommender Systems for Software EngineeringResearch Papers / Tool Demonstrations at Koala
Chair(s): Shaowei Wang Mississippi State University
API-Misuse Detection Driven by Fine-Grained API-Constraint Knowledge Graph
Research Papers
Xiaoxue Ren Zhejiang University, Xinyuan Ye Australian National University, Zhenchang Xing Australian National University, Australia, Xin Xia Monash University, Xiwei (Sherry) Xu Data61 at CSIRO, Australia, Liming Zhu Data61 at CSIRO, Australia / UNSW, Australia, JianLing Sun Zhejiang University
Multi-task Learning based Pre-trained Language Model for Code Completion
Research Papers
Fang Liu Peking University, Ge Li Peking University, Yunfei Zhao Peking University, Zhi Jin Peking University
HomoTR: Online Test Recommendation System Based on Homologous Code Matching
Tool Demonstrations
Chenqian Zhu Nanjing University, Weisong Sun State Key Laboratory for Novel Software Technology, Nanjing University, Qin LIU , Yangyang Yuan Nanjing University, Chunrong Fang Nanjing University, China, Yong Huang State Key Laboratory for Novel Software Technology, Nanjing University