Code changes constitute one of the most important features of software evolution. Studying them can provide insights into the nature of software development and also lead to practical solutions - recommendations and automations of popular changes for developers. In our work, we developed a tool called PythonChangeMiner that allows to discover code change patterns in the histories of Python projects. We validated the tool and then employed it to discover patterns in the dataset of 120 projects from four different domains of software engineering. We manually categorized patterns that occur in more than one project from the standpoint of their structure and content, and compared different domains and patterns in that regard. We conducted a survey of the authors of the discovered changes: 82.9% of them said that they can give the change a name and 57.9% expressed their desire to have the changes automated, indicating the ability of the tool to discover valuable patterns. Finally, we interviewed 9 members of a popular integrated development environment (IDE) development team to estimate the feasibility of automating the discovered changes. It was revealed that independence from the context and high precision made a pattern a better candidate for automation. The patterns received mainly positive reviews and several were ranked as very likely for automation.
翻译:代码变化是软件演变的最重要特点之一。 研究代码变化可以使人们深入了解软件开发的性质,并导致产生实用的解决办法―― 开发者流行变化的建议和自动化。 我们在工作中开发了一个名为PythonChangeMiner的工具,可以发现Python项目历史中的代码变化模式。 我们验证了该工具,然后用它来发现来自四个不同软件工程领域的120个项目数据集中的模式。 我们从结构与内容的角度对一个以上项目中出现的模式进行了人工分类,并比较了这方面的不同领域和模式。 我们对所发现的变化的作者进行了一次调查:82.9%的人说,他们可以给变化取一个名称,57.9%的人表示他们希望这些变化自动化,这表明工具能够发现有价值的模式。 最后,我们与一个广受欢迎的综合发展环境(IDE)开发团队的9名成员进行了面谈,以评估将所发现的变化自动化的可行性。我们发现,从上下文和高度精确性来看,使得一个模式更适合自动化。 收到的模式主要是积极的审查,一些成员被排在自动化的排名中排在非常可能的排名中。