Cross-language Code Coupling Detection: A Preliminary Study on Android Applications

被引:2
|
作者
Shen, Bo [1 ,2 ]
Zhang, Wei [1 ,2 ]
Yu, Ailun [1 ,2 ]
Wei, Zhao [3 ]
Liang, Guangtai [3 ]
Zhao, Haiyan [1 ,2 ]
Jin, Zhi [1 ,2 ]
机构
[1] Peking Univ, Key Lab High Confidence Software Technol, MoE, Beijing, Peoples R China
[2] Peking Univ, Dept Comp Sci & Technol, Beijing, Peoples R China
[3] Huawei Technol Co Ltd, Beijing, Peoples R China
基金
中国国家自然科学基金;
关键词
cross-language code coupling; multi-lingual software development; framework-based software development; software maintenance and evolution; CHANGE IMPACT ANALYSIS; SOFTWARE;
D O I
10.1109/ICSME52107.2021.00040
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Framework-based multi-lingual software is increasingly prevalent, but it also brings negative effects and extra burden on software maintenance and evolution, because of the introduced cross-language code coupling, which are usually mixed with framework-specific conventions. Researchers have proposed various approaches to code coupling detection, but there is still a lack of necessary support for cross-language coupling detection in framework-based software development. In this paper, we present a preliminary study about cross-language coupling detection in software development based on the Android application framework. We investigate the characteristics of multi-lingual changes in the top-100 starred open-source Android repositories on GitHub, and find that multi-lingual commits are non-trivial: their code changes are more scattered, and more inclined to introduce bugs than other commits. To mitigate the side-effect of multi-lingual development, we propose Grace, a Graph-based cross-language co-change suggestion approach for Android application development. Grace (a) designs a language-agnostic graph to represent code elements from different languages, and (b) employs an entity-based collaborative filtering algorithm to detect and rank candidates of cross-language code couplings, from the graph representation of the latest version as well as the historical multi-lingual commits of a repository. To evaluate the effectiveness of Grace, we apply it to the two tasks of cross-language co-change suggestion and inconsistency checking. Results show that Grace (a) can effectively suggest cross-language co-changed files and types, and (b) can also find existing and potential bugs or code smells caused by inconsistent co-changes.
引用
收藏
页码:378 / 389
页数:12
相关论文
共 50 条
  • [1] Cross-Language Code Similarity and Applications in Clone Detection and Code Search
    Mathew, George Varghese
    [J]. ProQuest Dissertations and Theses Global, 2022,
  • [2] Towards the Detection of Cross-Language Source Code Reuse
    Flores, Enrique
    Barron-Cedeno, Alberto
    Rosso, Paolo
    Moreno, Lidia
    [J]. NATURAL LANGUAGE PROCESSING AND INFORMATION SYSTEMS, 2011, 6716 : 250 - 253
  • [3] Cross-Language Android Permission Specification
    Li, Chaoran
    Chen, Xiao
    Sun, Ruoxi
    Xue, Minhui
    Wen, Sheng
    Ahmed, Muhammad Ejaz
    Camtepe, Seyit
    Xiang, Yang
    [J]. PROCEEDINGS OF THE 30TH ACM JOINT MEETING EUROPEAN SOFTWARE ENGINEERING CONFERENCE AND SYMPOSIUM ON THE FOUNDATIONS OF SOFTWARE ENGINEERING, ESEC/FSE 2022, 2022, : 772 - 783
  • [4] A Cross-language Dementia Classifier: a Preliminary Study
    Bertini, Flavio
    Allevi, Davide
    Lutero, Gianluca
    Calza, Laura
    Montesi, Danilo
    [J]. 2022 IEEE INTERNATIONAL CONFERENCE ON METROLOGY FOR EXTENDED REALITY, ARTIFICIAL INTELLIGENCE AND NEURAL ENGINEERING (METROXRAINE), 2022, : 438 - 443
  • [5] Dynamic stacking ensemble for cross-language code smell detection
    Aljamaan, Hamoud
    [J]. PEERJ COMPUTER SCIENCE, 2024, 10
  • [6] Dynamic stacking ensemble for cross-language code smell detection
    Aljamaan, Hamoud
    [J]. PeerJ Computer Science, 2024, 10
  • [7] Cross-Language Interoperability of Heterogeneous Code
    Stratikopoulos, Athanasios
    Blanaru, Florin
    Fumero, Juan
    Xekalaki, Maria
    Papadakis, Orion
    Kotselidis, Christos
    [J]. COMPANION PROCEEDINGS OF THE 7TH INTERNATIONAL CONFERENCE ON THE ART, SCIENCE, AND ENGINEERING OF PROGRAMMING, PROGRAMMING 2023, 2023, : 17 - 21
  • [8] Flowchart-Based Cross-Language Source Code Similarity Detection
    Zhang, Feng
    Li, Guofan
    Liu, Cong
    Song, Qian
    [J]. SCIENTIFIC PROGRAMMING, 2020, 2020
  • [9] C4: Contrastive Cross-Language Code Clone Detection
    Tao, Chenning
    Zhan, Qi
    Hu, Xing
    Xia, Xin
    [J]. 30TH IEEE/ACM INTERNATIONAL CONFERENCE ON PROGRAM COMPREHENSION (ICPC 2022), 2022, : 413 - 424
  • [10] TCCCD: Triplet-Based Cross-Language Code Clone Detection
    Fang, Yong
    Zhou, Fangzheng
    Xu, Yijia
    Liu, Zhonglin
    [J]. APPLIED SCIENCES-BASEL, 2023, 13 (21):