Presentation Open Access

A Large-scale Study on API Misuses in the Wild

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


MARC21 XML Export

<?xml version='1.0' encoding='UTF-8'?>
<record xmlns="http://www.loc.gov/MARC21/slim">
  <leader>00000nam##2200000uu#4500</leader>
  <datafield tag="942" ind1=" " ind2=" ">
    <subfield code="a">2021-04-12</subfield>
  </datafield>
  <controlfield tag="005">20210412002719.0</controlfield>
  <controlfield tag="001">4661089</controlfield>
  <datafield tag="700" ind1=" " ind2=" ">
    <subfield code="u">Tianjin University</subfield>
    <subfield code="a">Jiang, Jiajun</subfield>
  </datafield>
  <datafield tag="700" ind1=" " ind2=" ">
    <subfield code="u">The University of Texas at Dallas</subfield>
    <subfield code="a">Benton, Samuel</subfield>
  </datafield>
  <datafield tag="700" ind1=" " ind2=" ">
    <subfield code="u">Peking University</subfield>
    <subfield code="a">Xiong, Yingfei</subfield>
  </datafield>
  <datafield tag="700" ind1=" " ind2=" ">
    <subfield code="u">University of Illinois at Urbana-Champaign</subfield>
    <subfield code="a">Zhang, Lingming</subfield>
  </datafield>
  <datafield tag="856" ind1="4" ind2=" ">
    <subfield code="s">251192271</subfield>
    <subfield code="z">md5:0f2c3f0a55c6ce5c8363efc1c3a964ed</subfield>
    <subfield code="u">https://zenodo.org/record/4661089/files/A Large-scale Study on API Misuses in the Wild.mp4</subfield>
  </datafield>
  <datafield tag="542" ind1=" " ind2=" ">
    <subfield code="l">open</subfield>
  </datafield>
  <datafield tag="260" ind1=" " ind2=" ">
    <subfield code="c">2021-04-12</subfield>
  </datafield>
  <datafield tag="909" ind1="C" ind2="O">
    <subfield code="p">openaire</subfield>
    <subfield code="o">oai:zenodo.org:4661089</subfield>
  </datafield>
  <datafield tag="100" ind1=" " ind2=" ">
    <subfield code="u">Kennesaw State University</subfield>
    <subfield code="a">Li, Xia</subfield>
  </datafield>
  <datafield tag="245" ind1=" " ind2=" ">
    <subfield code="a">A Large-scale Study on API Misuses in the Wild</subfield>
  </datafield>
  <datafield tag="540" ind1=" " ind2=" ">
    <subfield code="u">https://creativecommons.org/licenses/by/4.0/legalcode</subfield>
    <subfield code="a">Creative Commons Attribution 4.0 International</subfield>
  </datafield>
  <datafield tag="650" ind1="1" ind2="7">
    <subfield code="a">cc-by</subfield>
    <subfield code="2">opendefinition.org</subfield>
  </datafield>
  <datafield tag="520" ind1=" " ind2=" ">
    <subfield code="a">&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;</subfield>
  </datafield>
  <datafield tag="773" ind1=" " ind2=" ">
    <subfield code="n">doi</subfield>
    <subfield code="i">isVersionOf</subfield>
    <subfield code="a">10.5281/zenodo.4661088</subfield>
  </datafield>
  <datafield tag="024" ind1=" " ind2=" ">
    <subfield code="a">10.5281/zenodo.4661089</subfield>
    <subfield code="2">doi</subfield>
  </datafield>
  <datafield tag="980" ind1=" " ind2=" ">
    <subfield code="a">presentation</subfield>
  </datafield>
</record>
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