Presentation Open Access

A Large-scale Study on API Misuses in the Wild

Li, Xia; Jiang, Jiajun; Benton, Samuel; Xiong, Yingfei; Zhang, Lingming


Citation Style Language JSON Export

{
  "publisher": "Zenodo", 
  "DOI": "10.5281/zenodo.4661089", 
  "author": [
    {
      "family": "Li, Xia"
    }, 
    {
      "family": "Jiang, Jiajun"
    }, 
    {
      "family": "Benton, Samuel"
    }, 
    {
      "family": "Xiong, Yingfei"
    }, 
    {
      "family": "Zhang, Lingming"
    }
  ], 
  "issued": {
    "date-parts": [
      [
        2021, 
        4, 
        12
      ]
    ]
  }, 
  "abstract": "<p>API misuses are prevalent and extremely harmful.<br>\nDespite various techniques have been proposed for API-misuse<br>\ndetection, it is not even clear how different types of API misuses<br>\ndistribute and whether existing techniques have covered all major<br>\ntypes of API misuses. Therefore, in this paper, we conduct the<br>\nfirst large-scale empirical study on API misuses based on 528,546<br>\nhistorical bug-fixing commits from GitHub (from 2011 to 2018).<br>\nBy leveraging a state-of-the-art fine-grained AST differencing<br>\ntool, GumTree, we extract more than one million bug-fixing<br>\nedit operations, 51.7% of which are API misuses. We further<br>\nsystematically classify API misuses into nine different categories<br>\naccording to the edit operations and context. We also extract<br>\nvarious frequent API-misuse patterns based on the categories<br>\nand corresponding operations, which can be complementary to<br>\nexisting API-misuse detection tools. Our study reveals various<br>\npractical guidelines regarding the importance of different types<br>\nof API misuses. Furthermore, based on our dataset, we perform<br>\na user study to manually analyze the usage constraints of 10<br>\npatterns to explore whether the mined patterns can guide the<br>\ndesign of future API-misuse detection tools. Specifically, we find<br>\nthat 7,541 potential misuses still exist in latest Apache projects<br>\nand 149 of them have been reported to developers. To date, 57<br>\nhave already been confirmed and fixed (with 15 rejected misuses<br>\ncorrespondingly). The results indicate the importance of studying<br>\nhistorical API misuses and the promising future of employing our<br>\nmined patterns for detecting unknown API misuses.<br>\n&nbsp;</p>", 
  "title": "A Large-scale Study on API Misuses in the Wild", 
  "type": "speech", 
  "id": "4661089"
}
20
6
views
downloads
All versions This version
Views 2020
Downloads 66
Data volume 1.5 GB1.5 GB
Unique views 1717
Unique downloads 55

Share

Cite as