Modern programming languages, such as Python, have introduced a variety of constructs and syntactical elements to make software development more efficient and concise. Examples include lambda functions, comprehension collections, or mechanisms to facilitate the passing of arguments to a function. While many such constructs may, in principle, be beneficial for developers, recent studies have shown that certain programming constructs may affect program understanding and even induce more fixes than other changes. This paper studies the effect of different Python argument-passing mechanisms to investigate their relationship with code proneness to be fixed. Specifically, we study the fix-proneness with regard to function definitions and invocations. This is done by analyzing the evolutionary history of 200 Python projects, for a total of about 1.9M function definitions and 9.8M call site changes. While there are varying effects for what concerns parameter declaration mechanisms, we found evidence that keyword-based argument passing is less defect-prone than positional argument passing, and this is not affected by size-related confounding factors.
The relationship between different python argument-passing mechanisms and fixes: An empirical study
Di Penta M.;Antoniol G.
2027-01-01
Abstract
Modern programming languages, such as Python, have introduced a variety of constructs and syntactical elements to make software development more efficient and concise. Examples include lambda functions, comprehension collections, or mechanisms to facilitate the passing of arguments to a function. While many such constructs may, in principle, be beneficial for developers, recent studies have shown that certain programming constructs may affect program understanding and even induce more fixes than other changes. This paper studies the effect of different Python argument-passing mechanisms to investigate their relationship with code proneness to be fixed. Specifically, we study the fix-proneness with regard to function definitions and invocations. This is done by analyzing the evolutionary history of 200 Python projects, for a total of about 1.9M function definitions and 9.8M call site changes. While there are varying effects for what concerns parameter declaration mechanisms, we found evidence that keyword-based argument passing is less defect-prone than positional argument passing, and this is not affected by size-related confounding factors.I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.


