On the diversity and frequency of code related to mathematical formulas in real-world Java projects

11/26/2020
by   Oliver Moseler, et al.
0

In this paper, the term formula code refers to fragments of source code that implement a mathematical formula. We present empirical studies that analyze the diversity and frequency of formula code in open-source-software projects. In an exploratory study, we investigated what kinds of formulas are implemented in real-world Java projects and derived syntactical patterns and constraints. We refined these patterns for sum and product formulas to automatically detect formula code in software archives and to reconstruct the implemented formula in mathematical notation. In a quantitative study of a large sample of engineered Java projects on GitHub we analyzed the frequency of formula code and estimated that one of 700 lines of code in this sample implements a sum or product formula. For a sample of scientific-computing projects, we found that one of 100 lines of code implements a sum or product formula. To assess the need for tool support, we investigated the helpfulness of comments for program understanding in a sample of formula-code fragments and performed an online survey. Our findings provide first insights into the characteristics of formula code, that can motivate further studies on the role of formula code in software projects and the design of formula-related tools.

READ FULL TEXT

page 19

page 24

research
02/12/2020

A Study of Potential Code Borrowing and License Violations in Java Projects on GitHub

With an ever-increasing amount of open source software, the popularity o...
research
06/12/2018

Evaluating Maintainability Prejudices with a Large-Scale Study of Open-Source Projects

Exaggeration or context changes can render maintainability experience in...
research
07/09/2021

On the Nature of Code Cloning in Open-Source Java Projects

Code cloning plays a very important role in open-source software enginee...
research
03/10/2018

Learning Quick Fixes from Code Repositories

Code analyzers such as ErrorProne and FindBugs detect code patterns symp...
research
09/03/2023

Who Made This Copy? An Empirical Analysis of Code Clone Authorship

Code clones are code snippets that are identical or similar to other sni...
research
01/18/2018

Challenges of the Dynamic Detection of Functionally Similar Code Fragments

Classic clone detection approaches are hardly capable of finding redunda...
research
01/20/2022

Evaluating the Performance of Clone Detection Tools in Detecting Cloned Co-change Candidates

Co-change candidates are the group of code fragments that require a chan...

Please sign up or login with your details

Forgot password? Click here to reset