Unraveling Code Clone Dynamics in Deep Learning Frameworks
Assi, Maram, Hassan, Safwat, Zou, Ying
–arXiv.org Artificial Intelligence
Deep Learning (DL) frameworks play a critical role in advancing artificial intelligence, and their rapid growth underscores the need for a comprehensive understanding of software quality and maintainability. DL frameworks, like other systems, are prone to code clones. Code clones refer to identical or highly similar source code fragments within the same project or even across different projects. Code cloning can have positive and negative implications for software development, influencing maintenance, readability, and bug propagation. In this paper, we aim to address the knowledge gap concerning the evolutionary dimension of code clones in DL frameworks and the extent of code reuse across these frameworks. We empirically analyze code clones in nine popular DL frameworks, i.e., TensorFlow, Paddle, PyTorch, Aesara, Ray, MXNet, Keras, Jax and BentoML, to investigate (1) the characteristics of the long-term code cloning evolution over releases in each framework, (2) the short-term, i.e., within-release, code cloning patterns and their influence on the long-term trends, and (3) the file-level code clones within the DL frameworks. Our findings reveal that DL frameworks adopt four distinct cloning trends and that these trends present some common and distinct characteristics. For instance, bug-fixing activities persistently happen in clones irrespective of the clone evolutionary trend but occur more in the "Serpentine" trend. Moreover, the within release level investigation demonstrates that short-term code cloning practices impact long-term cloning trends. The cross-framework code clone investigation reveals the presence of functional and architectural adaptation file-level cross-framework code clones across the nine studied frameworks. We provide insights that foster robust clone practices and collaborative maintenance in the development of DL frameworks.
arXiv.org Artificial Intelligence
Apr-25-2024
- Country:
- North America
- United States
- Washington > King County
- Seattle (0.04)
- Texas > Travis County
- Austin (0.04)
- New York > New York County
- New York City (0.05)
- Washington > King County
- Canada > Ontario
- United States
- Europe
- United Kingdom > England
- Oxfordshire > Oxford (0.04)
- Netherlands > North Holland
- Amsterdam (0.04)
- Germany > Saxony
- Leipzig (0.04)
- United Kingdom > England
- Asia
- China (0.04)
- South Korea > Seoul
- Seoul (0.04)
- Singapore > Central Region
- Singapore (0.04)
- Africa > South Africa
- Western Cape > Cape Town (0.04)
- North America
- Genre:
- Research Report
- New Finding (1.00)
- Experimental Study (1.00)
- Research Report
- Technology: