教学文库网 - 权威文档分享云平台
您的当前位置:首页 > 精品文档 > 行业资料 >

On software maintenance process improvement based on code cl

来源:网络收集 时间:2026-05-17
导读: 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,Osa

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字,全部文档内容请下载后查看。喜欢就下载吧 ……

On software maintenance process improvement based on code cl.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.jiaowen.net/wendang/334836.html(转载请注明文章来源)
Copyright © 2020-2025 教文网 版权所有
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:78024566 邮箱:78024566@qq.com
苏ICP备19068818号-2
Top
× 游客快捷下载通道(下载后可以自由复制和排版)
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能出现无法下载或内容有问题,请联系客服协助您处理。
× 常见问题(客服时间:周一到周五 9:30-18:00)