检索规则说明:AND代表“并且”;OR代表“或者”;NOT代表“不包含”;(注意必须大写,运算符两边需空一格)
检 索 范 例 :范例一: (K=图书馆学 OR K=情报学) AND A=范并思 范例二:J=计算机应用与软件 AND (U=C++ OR U=Basic) NOT M=Visual
作 者:张志浩 杨春花[1] ZHANG Zhihao;YANG Chunhua(School of Computer Science and Technology,Qilu University of Technology(Shandong Academy of Sciences),Jinan 250353,China)
机构地区:[1]齐鲁工业大学(山东省科学院)计算机科学与技术学院,济南250353
出 处:《智能计算机与应用》2019年第3期146-150,共5页Intelligent Computer and Applications
基 金:国家自然科学基金(61502259)
摘 要:内联函数(Inline method)和替换算法(Substitute algorithm)是2种在代码重构中常用的重构手法,本文提出一种基于代码变更块和抽象语法树的重构模式识别算法,首先筛选出变更前后2个文件的代码变更块,找到可能属于这2种重构模式的代码变更块,再建立抽象语法树对这些变更块中的代码进行准确的语法分析,对其是否属于此2种模式进行判定。该算法在4个开源项目上进行了实验验证,表明了其具有较高的准确率。Inline method and Substitute algorithm are two kinds of refactoring methods which are used in code refactoring frequently.This paper proposes a refactoring pattern recognition algorithm based on hunk and abstract syntax tree.First filter out all the hunks of the two files,find the specific hunks that may contain these two kinds of refactoring patterns,then establish an abstract syntax tree to analyze the code in this hunks more accurately and verdict whether it matches these two refactoring patterns.The algorithm has been experimentally verified on four open source projects,indicating that it has a high accuracy.
关 键 词:重构模式 抽象语法树 代码变更块 内联函数 替换算法
分 类 号:TP311.5[自动化与计算机技术—计算机软件与理论]
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在链接到云南高校图书馆文献保障联盟下载...
云南高校图书馆联盟文献共享服务平台 版权所有©
您的IP:216.73.216.222