On software maintenance process improvement based on code cl
On software maintenance process improvement based on code clone analysis
Yoshiki Higo1,Yasushi Ueda1,Toshihro Kamiya2,
Shinji Kusumoto1and Katsuro Inoue1
1Graduate School of Information Science and Technology,Osaka University,
Toyonaka,Osaka560-8531,Japan
Phone:+81-6-6850-6571,Fax:+81-6-6850-6574
{y-higo,y-ueda,kusumoto,inoue}@ist.osaka-u.ac.jp
2PRESTO,Japan Science and Technology Corp.
Current Address:Graduate School of Information Science and Technology,Osaka
University,
Toyonaka,Osaka560-8531,Japan
Phone:+81-6-6850-6571,Fax:+81-6-6850-6574
kamiya@ist.osaka-u.ac.jp
Abstract.Maintaining software systems is getting more complex and
di?cult task.Code clone is one of the factors that make software mainte-
nance more di?cult.A code clone is a code portion in source?les that is
identical or similar to another.If some faults are found in a code clone,it
is necessary to correct the faults in its all code clones.We have developed
a maintenance support environment,Gemini,which provides the user
with the useful functions to analyze the code clones and modify them.
However,through case studies,several problems were reported.That is,
the clones provided by Gemini were not appropriate to merge into one
module.In this paper,we intend to extend the functionality of Gemini
to cope with the problems.Finally,we apply the extended Gemini to
several software and evaluate the applicability of the new functions.
1Introduction
As the size and the complexity of software increase,it becomes important to develop high-quality software cost-e?ectively within a speci?ed period.Software process improvement is one of the promising method to attain it.
Recently,it is pointed out that maintenance phase is the most expensive one in the entire software development process.Many research studies have reported that large software companies spent a lot of cost to maintaining the existing systems.Maintenance of software system is de?ned as modi?cation of a soft-ware product after delivery to correct faults,to improve performance or other attributes,or to adapt the products to a modi?ed environment[20].
Code clone is one of the factors that make software maintenance more di?-cult[8].A code clone is a code portion in source?les that is identical or similar to another.Clones are introduced because of various reasons such as reusing code
by‘copy-and-paste’and so on.Code clones make the source?les very hard to modify consistently.For example,when a fault is found in one clone,it must be carefully modi?ed all the clones.So,e?ective code clone detection will support the improvement of software maintenance process.In order to detect the code clones e?ectively,various clone detection methods have been proposed.
We have developed a maintenance support environment,Gemini,which pro-vides the user with the useful functions to analyze the code clones and modify them[22].CCFinder[13]is one of the components of Gemini and used to detect code clones.Gemini primarily provides two diagrams:scatter plot and metrics graph.The scatter plot graphically shows the locations of code clones among source codes.The metrics graph shows metric value of each clone and has a feature to identify the distinctive code 6b03bcecf8c75fbfc77db227ing the diagrams,we expected that maintenance process can be improved.
We have delivered Gemini to several software companies and evaluated it through case studies.In the case studies,we have received several practical prob-lems.First one has been appeared in applying Gemini to refactoring activities[8]. Usually,code clones are merged into one module(procedure,function,macro etc). The clones detected by Gemini were not appropriate to be merged,since it de-tects the maximal code clones that often include excessive tokens that should be omitted in merging the clones into one routine.Second is one how to identify the modi?ed code portions as clone.As described above,code clone is intro-duced copy-and-paste programming.But,in most case,the copied-and-pasted code portion is not used as it 6b03bcecf8c75fbfc77db227ually,some statements are inserted to the code portion or deleted from it.The practitioners in the company want to ex-tract such modi?ed code clones(called gapped clone)but Gemini cannot?nd them.
In this paper,we intend to solve the above issues to extend the functionality of Gemini.For the former issue,we have added the new function to extract the part of code clone which is easy to merge one module.For the latter issue,we propose a method to show all the candidates of gapped code clones.As spaces are limited,we mainly explain the?rst topics.Finally,we apply Gemini to several software and evaluate the applicability of the proposed method.
2Code Clone Analysis
2.1De?nitions on code clone
A clone relation is de?ned as an equivalence relation(i.e.,re?exive,transitive, and symmetric relation)on code portions[13].A clone relation holds between two code portions if(and only if)they are the same sequences.(Sequences are sometimes original character strings,strings without white spaces,sequences of token type,and transformed token sequences.)For a given clone relation,a pair of code portions is called clone pair if the clone relation holds between the portions.An equivalence class of clone relation is called clone class.That is,a clone class is a maximal set of code portions in which a clone relation holds between any pair of code portions.
Source files
(a)Architecture
(b)Code Clone Shaper
Fig.1.Overview of Gemini
A code portion in a clone class of a program is called a code clone or simply
a clone.
2.2Maintenance support environment:Gemini
In[21],we have developed a maintenance support environment based on code clone analysi …… 此处隐藏:21585字,全部文档内容请下载后查看。喜欢就下载吧 ……
相关推荐:
- [行业资料]创设有效语境 改善英语教学
- [行业资料]微商推广引流的44种方法
- [行业资料]医疗机构输血科血库基本标准
- [行业资料]锂离子电池项目可行性研究报告(2015年
- [行业资料]申请执行人长沙市开福区人口和计划生育
- [行业资料]倾听草木的呼吸(初中阅读)
- [行业资料]长沙新环境厂房租赁合同书
- [行业资料]2022年经济师《金融专业知识与实务(中
- [行业资料]浦东新区2009学年度第二学期期末考试七
- [行业资料]企业劳动用工协议书
- [行业资料]最新苏科版七年级数学上册第二章有理数
- [行业资料]12星座与英语词汇学习
- [行业资料]2008年高考化学科经验
- [行业资料]镇政府2015年工作总结及2016年政府工作
- [行业资料]梧州市产业园区规划及招商引资报告
- [行业资料]大体积砼承台施工作业指导书
- [行业资料]学生干部在创建和谐校园中的作1
- [行业资料]小学语文教师实习个人总结
- [行业资料]2014完美最新奖金制度
- [行业资料]2016年一建建筑实务-重要知识点地质
- 【最新】人教版小学语文三年级上册:第
- 中国中小企业年鉴(地区数据)
- 动物与人类生活的关系 ppt
- 选修3 专题3 胚胎工程知识点
- 遥感技术基础复习题
- 公司员工职业生涯规划实施方案
- 辽宁省建筑施工企业安全生产许可证管理
- 15秋福师《中外幼儿教育史》在线作业二
- 2015-2020年中国网络视频行业深度调研
- 数学八年级下华东师大版21.1算术平均数
- 苏教版一年级语文下册《小松树和大松树
- 油画论文:摄影对当下油画艺术的影响
- 西方自由主义影响下的新闻自由——从17
- 基于支持向量机的商业银行信用风险评估
- 机械设计基础复习题答案(修改)(1)
- 语文:高考作文素材:材料引用及论点论
- 月份工程进度款结算单62+56
- 2018-2023年中国互联网基金行业现状研
- 人教版 PEP 五年级下册Unit1Lesson1 th
- 2014学年第二学期四年级数学期末教学质




