ConflictJS']JS: Finding and Understanding Conflicts Between Java']JavaScript Libraries

被引:29
|
作者
Patra, Jibesh [1 ]
Dixit, Pooja N. [1 ]
Pradel, Michael [1 ]
机构
[1] Tech Univ Darmstadt, Darmstadt, Germany
关键词
D O I
10.1145/3180155.3180184
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
It is a common practice for client-side web applications to build on various third-party JavaScript libraries. Due to the lack of namespaces in JavaScript, these libraries all share the same global namespace. As a result, one library may inadvertently modify or even delete the APIs of another library, causing unexpected behavior of library clients. Given the quickly increasing number of libraries, manually keeping track of such conflicts is practically impossible both for library developers and users. This paper presents ConflictJS, an automated and scalable approach to analyze libraries for conflicts. The key idea is to tackle the huge search space of possible conflicts in two phases. At first, a dynamic analysis of individual libraries identifies pairs of potentially conflicting libraries. Then, targeted test synthesis validates potential conflicts by creating a client application that suffers from a conflict. The overall approach is free of false positives, in the sense that it reports a problem only when such a client exists. We use ConflictJS to analyze and study conflicts among 951 real-world libraries. The results show that one out of four libraries is potentially conflicting and that 166 libraries are involved in at least one certain conflict. The detected conflicts cause crashes and other kinds of unexpected behavior. Our work helps library developers to prevent conflicts, library users to avoid combining conflicting libraries, and provides evidence that designing a language without explicit namespaces has undesirable effects.
引用
收藏
页码:741 / 751
页数:11
相关论文
共 50 条
  • [1] astrojs']js: Java']JavaScript Libraries for Astronomy
    Kapadia, Amit
    Smith, Arfon
    [J]. ASTRONOMICAL DATA ANALYSIS SOFTWARE AND SYSTEMS XXII, 2013, 475 : 299 - 302
  • [2] POSTER: Finding Java']JavaScript Name Conflicts on the Web
    Zhang, Mingxue
    Meng, Wei
    Wang, Yi
    [J]. PROCEEDINGS OF THE 2019 ACM SIGSAC CONFERENCE ON COMPUTER AND COMMUNICATIONS SECURITY (CCS'19), 2019, : 2609 - 2611
  • [3] Detecting and Understanding Java']JavaScript Global Identifier Conflicts on the Web
    Zhang, Mingxue
    Meng, Wei
    [J]. PROCEEDINGS OF THE 28TH ACM JOINT MEETING ON EUROPEAN SOFTWARE ENGINEERING CONFERENCE AND SYMPOSIUM ON THE FOUNDATIONS OF SOFTWARE ENGINEERING (ESEC/FSE '20), 2020, : 38 - 49
  • [4] Semantics-Driven Interoperability between Scala.js']js and Java']JavaScript
    Doeraene, Sebastien
    Schlatter, Tobias
    Stucki, Nicolas
    [J]. SCALA'16: PROCEEDINGS OF THE 2016 7TH ACM SIGPLAN SYMPOSIUM ON SCALA, 2016, : 85 - 94
  • [5] CHR.js']js: A CHR Implementation in Java']JavaScript
    Nogatz, Falco
    Fruhwirth, Thom
    Seipel, Dietmar
    [J]. RULES AND REASONING (RULEML+RR 2018), 2018, 11092 : 131 - 146
  • [6] JS']JSXGraph - Dynamic Mathematics with Java']JavaScript
    Gerhaeuser, Michael
    Valentin, Bianca
    Wassermann, Alfred
    [J]. INTERNATIONAL JOURNAL FOR TECHNOLOGY IN MATHEMATICS EDUCATION, 2010, 17 (04): : 211 - 215
  • [7] BUGSJS']JS: A Benchmark of Java']JavaScript Bugs
    Gyimesi, Peter
    Vancsics, Bela
    Stocco, Andrea
    Mazinanian, Davood
    Beszedes, Arpad
    Ferenc, Rudolf
    Mesbah, Ali
    [J]. 2019 IEEE 12TH CONFERENCE ON SOFTWARE TESTING, VALIDATION AND VERIFICATION (ICST 2019), 2019, : 90 - 101
  • [8] JS']JSExplain: A Double Debugger for Java']JavaScript
    Chargueraud, Arthur
    Schmitt, Alan
    Wood, Thomas
    [J]. COMPANION PROCEEDINGS OF THE WORLD WIDE WEB CONFERENCE 2018 (WWW 2018), 2018, : 691 - 699
  • [9] JS']JSOD: Java']JavaScript obfuscation detector
    AL-Taharwa, Ismail Adel
    Lee, Hahn-Ming
    Jeng, Albert B.
    Wu, Kuo-Ping
    Ho, Cheng-Seen
    Chen, Shyi-Ming
    [J]. SECURITY AND COMMUNICATION NETWORKS, 2015, 8 (06) : 1092 - 1107
  • [10] From bytecode to Java']JavaScript: the Js']Js_of_ocaml compiler
    Vouillon, Jerome
    Balat, Vincent
    [J]. SOFTWARE-PRACTICE & EXPERIENCE, 2014, 44 (08): : 951 - 972