A Large-Scale Study On Repetitiveness, Containment, and Composability of Routines in Open-Source Projects

被引:0
|
作者
Anh Tuan Nguyen [1 ]
Hoan Anh Nguyen [1 ]
Nguyen, Tien N. [1 ]
机构
[1] Iowa State Univ, ECpE Dept, Ames, IA 50011 USA
关键词
Repetitiveness; Containment; Composability; Code Reuse; SOFTWARE;
D O I
10.1145/2901739.2901759
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
Source code in software systems has been shown to have a good degree of repetitiveness at the lexical, syntactical, and API usage levels. This paper presents a large-scale study on the repetitiveness, containment, and composability of source code at the semantic level. We collected a large dataset consisting of 9,224 Java projects with 2.79M class files, 17.54M methods with 187M SLOCs. For each method in a project, we build the program dependency graph (PDG) to represent a routine, and compare PDGs with one another as well as the subgraphs within them. We found that within a project, 12.1% of the routines are repeated, and most of them repeat from 2-7 times. As entirety, the routines are quite project-specific with only 3.3% of them exactly repeating in 1-4 other projects with at most 8 times. We also found that 26.1% and 7.27% of the routines are contained in other routine(s), i.e., implemented as part of other routine( s) elsewhere within a project and in other projects, respectively. Except for trivial routines, their repetitiveness and containment is independent of their complexity. Defining a subroutine via a per-variable slicing subgraph in a PDG, we found that 14.3% of all routines have all of their subroutines repeated. A high percentage of subroutines in a routine can be found/reused elsewhere. We collected 8,764,971 unique subroutines (with 323,564 unique JDK subroutines) as basic units for code searching/synthesis. We also provide practical implications of our findings to automated tools.
引用
收藏
页码:362 / 373
页数:12
相关论文
共 50 条
  • [1] Evaluating Maintainability Prejudices with a Large-Scale Study of Open-Source Projects
    Roehm, Tobias
    Veihelmann, Daniel
    Wagner, Stefan
    Juergens, Elmar
    SOFTWARE QUALITY: THE COMPLEXITY AND CHALLENGES OF SOFTWARE ENGINEERING AND SOFTWARE QUALITY IN THE CLOUD, 2019, 338 : 151 - 171
  • [2] VisRepo: A Visual Retrieval Tool for Large-Scale Open-Source Projects
    Yue, Xiaoqi
    Liu, Chao
    Zhang, Neng
    Hu, Haibo
    Zhang, Xiaohong
    PROCEEDINGS OF THE 15TH ASIA-PACIFIC SYMPOSIUM ON INTERNETWARE, INTERNETWARE 2024, 2024, : 499 - 502
  • [3] A Large-Scale Study of MPI Usage in Open-Source HPC Applications
    Laguna, Ignacio
    Marshall, Ryan
    Mohror, Kathryn
    Ruefenacht, Martin
    Skjellum, Anthony
    Sultana, Nawrin
    PROCEEDINGS OF SC19: THE INTERNATIONAL CONFERENCE FOR HIGH PERFORMANCE COMPUTING, NETWORKING, STORAGE AND ANALYSIS, 2019,
  • [4] A large-scale study of architectural evolution in open-source software systems
    Behnamghader, Pooyan
    Duc Minh Le
    Garcia, Joshua
    Link, Daniel
    Shahbazian, Arman
    Medvidovic, Nenad
    EMPIRICAL SOFTWARE ENGINEERING, 2017, 22 (03) : 1146 - 1193
  • [5] A large-scale study of architectural evolution in open-source software systems
    Pooyan Behnamghader
    Duc Minh Le
    Joshua Garcia
    Daniel Link
    Arman Shahbazian
    Nenad Medvidovic
    Empirical Software Engineering, 2017, 22 : 1146 - 1193
  • [6] Test Automation in Open-Source Android Apps: A Large-Scale Empirical Study
    Lin, Jun-Wei
    Salehnamadi, Navid
    Malek, Sam
    2020 35TH IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING (ASE 2020), 2020, : 1078 - 1089
  • [7] Code Coverage and Postrelease Defects: A Large-Scale Study on Open Source Projects
    Kochhar, Pavneet Singh
    Lo, David
    Lawall, Julia
    Nagappan, Nachiappan
    IEEE TRANSACTIONS ON RELIABILITY, 2017, 66 (04) : 1213 - 1228
  • [8] MapQuant: Open-source software for large-scale protein quantification
    Leptos, KC
    Sarracino, DA
    Jaffe, JD
    Krastins, B
    Church, GM
    PROTEOMICS, 2006, 6 (06) : 1770 - 1782
  • [9] A Large-Scale Open-Source Acoustic Simulator for Speaker Recognition
    Ferras, Marc
    Madikeri, Srikanth
    Motlicek, Petr
    Dey, Subhadeep
    Bourlard, Herve
    IEEE SIGNAL PROCESSING LETTERS, 2016, 23 (04) : 527 - 531
  • [10] Software evolution in open source projects - a large-scale investigation
    Koch, Stefan
    JOURNAL OF SOFTWARE MAINTENANCE AND EVOLUTION-RESEARCH AND PRACTICE, 2007, 19 (06): : 361 - 382