计算机科学
Python(编程语言)
程序设计语言
控制流程
工作流程
转化(遗传学)
精确性和召回率
源代码
模型转换
软件
软件进化
软件工程
人工智能
数据挖掘
机器学习
软件系统
数据库
软件建设
生物化学
化学
一致性(知识库)
基因
作者
Malinda Dilhara,Danny Dig,Ameya Ketkar
标识
DOI:10.1109/icse48619.2023.00091
摘要
Because of the naturalness of software and the rapid evolution of Machine Learning (ML) techniques, frequently repeated code change patterns (CPATs) occur often. They range from simple API migrations to changes involving several complex control structures such as for loops. While manually performing CPATs is tedious, the current state-of-the-art techniques for inferring transformation rules are not advanced enough to handle unseen variants of complex CPATs, resulting in a low recall rate. In this paper we present a novel, automated workflow that mines CPATs, infers the transformation rules, and then transplants them automatically to new target sites. We designed, implemented, evaluated and released this in a tool, PYEVOLVE. At its core is a novel data-flow, control-flow aware transformation rule inference engine. Our technique allows us to advance the state-of-the-art for transformation-by-example tools; without it, 70% of the code changes that PYEVOLVE transforms would not be possible to automate. Our thorough empirical evaluation of over 40,000 transformations shows 97% precision and 94% recall. By accepting 90% of CPATs generated by PYEVOLVE in famous open-source projects, developers confirmed its changes are useful.
科研通智能强力驱动
Strongly Powered by AbleSci AI