Presentation Open Access

A Large-scale Study on API Misuses in the Wild

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


DataCite XML Export

<?xml version='1.0' encoding='utf-8'?>
<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://datacite.org/schema/kernel-4" xsi:schemaLocation="http://datacite.org/schema/kernel-4 http://schema.datacite.org/meta/kernel-4.1/metadata.xsd">
  <identifier identifierType="DOI">10.5281/zenodo.4661089</identifier>
  <creators>
    <creator>
      <creatorName>Li, Xia</creatorName>
      <givenName>Xia</givenName>
      <familyName>Li</familyName>
      <affiliation>Kennesaw State University</affiliation>
    </creator>
    <creator>
      <creatorName>Jiang, Jiajun</creatorName>
      <givenName>Jiajun</givenName>
      <familyName>Jiang</familyName>
      <affiliation>Tianjin University</affiliation>
    </creator>
    <creator>
      <creatorName>Benton, Samuel</creatorName>
      <givenName>Samuel</givenName>
      <familyName>Benton</familyName>
      <affiliation>The University of Texas at Dallas</affiliation>
    </creator>
    <creator>
      <creatorName>Xiong, Yingfei</creatorName>
      <givenName>Yingfei</givenName>
      <familyName>Xiong</familyName>
      <affiliation>Peking University</affiliation>
    </creator>
    <creator>
      <creatorName>Zhang, Lingming</creatorName>
      <givenName>Lingming</givenName>
      <familyName>Zhang</familyName>
      <affiliation>University of Illinois at Urbana-Champaign</affiliation>
    </creator>
  </creators>
  <titles>
    <title>A Large-scale Study on API Misuses in the Wild</title>
  </titles>
  <publisher>Zenodo</publisher>
  <publicationYear>2021</publicationYear>
  <dates>
    <date dateType="Issued">2021-04-12</date>
  </dates>
  <resourceType resourceTypeGeneral="Text">Presentation</resourceType>
  <alternateIdentifiers>
    <alternateIdentifier alternateIdentifierType="url">https://zenodo.org/record/4661089</alternateIdentifier>
  </alternateIdentifiers>
  <relatedIdentifiers>
    <relatedIdentifier relatedIdentifierType="DOI" relationType="IsVersionOf">10.5281/zenodo.4661088</relatedIdentifier>
  </relatedIdentifiers>
  <rightsList>
    <rights rightsURI="https://creativecommons.org/licenses/by/4.0/legalcode">Creative Commons Attribution 4.0 International</rights>
    <rights rightsURI="info:eu-repo/semantics/openAccess">Open Access</rights>
  </rightsList>
  <descriptions>
    <description descriptionType="Abstract">&lt;p&gt;API misuses are prevalent and extremely harmful.&lt;br&gt;
Despite various techniques have been proposed for API-misuse&lt;br&gt;
detection, it is not even clear how different types of API misuses&lt;br&gt;
distribute and whether existing techniques have covered all major&lt;br&gt;
types of API misuses. Therefore, in this paper, we conduct the&lt;br&gt;
first large-scale empirical study on API misuses based on 528,546&lt;br&gt;
historical bug-fixing commits from GitHub (from 2011 to 2018).&lt;br&gt;
By leveraging a state-of-the-art fine-grained AST differencing&lt;br&gt;
tool, GumTree, we extract more than one million bug-fixing&lt;br&gt;
edit operations, 51.7% of which are API misuses. We further&lt;br&gt;
systematically classify API misuses into nine different categories&lt;br&gt;
according to the edit operations and context. We also extract&lt;br&gt;
various frequent API-misuse patterns based on the categories&lt;br&gt;
and corresponding operations, which can be complementary to&lt;br&gt;
existing API-misuse detection tools. Our study reveals various&lt;br&gt;
practical guidelines regarding the importance of different types&lt;br&gt;
of API misuses. Furthermore, based on our dataset, we perform&lt;br&gt;
a user study to manually analyze the usage constraints of 10&lt;br&gt;
patterns to explore whether the mined patterns can guide the&lt;br&gt;
design of future API-misuse detection tools. Specifically, we find&lt;br&gt;
that 7,541 potential misuses still exist in latest Apache projects&lt;br&gt;
and 149 of them have been reported to developers. To date, 57&lt;br&gt;
have already been confirmed and fixed (with 15 rejected misuses&lt;br&gt;
correspondingly). The results indicate the importance of studying&lt;br&gt;
historical API misuses and the promising future of employing our&lt;br&gt;
mined patterns for detecting unknown API misuses.&lt;br&gt;
&amp;nbsp;&lt;/p&gt;</description>
  </descriptions>
</resource>
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