৘ใॲཧֶձ‫ڀݚ‬ใࠂ
IPSJ SIG Technical ReportίʔυΫϩʔϯͷಈ࡞Λൺֱ͢ΔͨΊͷίʔυΫϩʔϯपลίʔυͷղੳϒϟϯωϝϑ Φυϑʔ1,a)ᚸು ༤‫و‬2,b)ҏୡ ߒయ1,c)ੴඌ ོ1,d)Ҫ্ ࠀ࿠1,e)֓ཁɿιϑτ΢ΣΞͷอकΛࠔ೉ʹ͢ΔཁҼͷҰͭͱͯ͠ίʔυΫϩʔϯ͕‫͛ڍ‬ΒΕΔɽίʔυΫϩʔϯͱ͸ɼιʔείʔυதʹɼ‫ͨ·ࣅྨʹ͍ޓ‬͸Ұகͨ͠෦෼Λ࣋ͭίʔυยͷ͜ͱͰ͋Δɽ֤ίʔυΫϩʔϯ͸ɼͨͱ͑‫ه‬ड़͕ಉҰͰ͋ͬͯ΋ͦΕΒͷपลͷίʔυʹґଘͯ͠ҟͳΔಈ࡞Λ͢ΔՄೳੑ͕͋Δɽ͠
͔͠ͳ͕Βɼ࣮ࡍʹͲͷఔ౓ίʔυΫϩʔϯ͕पลίʔυʹґଘ͍ͯ͠Δ͔͸Θ͔͍ͬͯͳ͍ɽຊ‫Ͱڀݚ‬͸ɼίʔυΫϩʔϯͱपลͷίʔυͱͷґଘؔ܎Λ໌Β͔ʹ͢ΔͨΊɼίʔυΫϩʔϯͷपลίʔυͷྔͱɼपลίʔυؒͷҧ͍ʹ͍ͭͯௐࠪΛߦͬͨɽͦͷ݁Ռɼଟ͘ͷίʔυΫϩʔϯʹपลίʔυ͕ଘࡏ͠ɼ
ଟ͘ͷίʔυΫϩʔϯؒͰपลίʔυ͕ҟͳΔ͜ͱΛ֬ೝͨ͠ɽ
ΩʔϫʔυɿίʔυΫϩʔϯɼιϑτ΢ΣΞอकɼपลίʔυ

1. ͸͡Ίʹ
ίʔυΫϩʔϯͱ͸ɼιʔείʔυͷதʹଘࡏ͢Δ‫͍ޓ‬ͳ͍ͬͯͯ΋ಉ͡ಈ࡞Λ͍ͯ͠Δ৔߹͕͋ΔɽͦͷͨΊɼίʔυΫϩʔϯͷΈΛ‫ͯݟ‬΋ɼίʔυΫϩʔϯͷಈ࡞Λਖ਼֬ʹཧղ͢Δ͜ͱ͸Ͱ͖ͳ͍ɽ

ʹྨࣅ·ͨ͸Ұகͨ͠ίʔυยͷ͜ͱͰ͋Δ [1]ɽίʔυΫͦ͜ͰɼίʔυΫϩʔϯͷಈ࡞Λൺֱ͢ΔͨΊɼίʔυϩʔϯ͸ओʹɼιʔείʔυͷίϐʔΞϯυϖʔετ΍ಉΫϩʔϯͷपลʹ͋Δίʔυʹண໨͢Δɽ֤ίʔυΫϩʔҰॲཧΛҙਤతʹ‫܁‬Γฦ͠ॻ͘͜ͱʹΑͬͯൃੜ͢ΔɽҰϯͷಈ࡞͸ɼपลͷίʔυʹӨ‫ڹ‬Λड͚ΔՄೳੑ͕͋ΔɽൠతʹίʔυΫϩʔϯͷଘࡏ͸ɼιϑτ΢ΣΞͷอकΛࠔ

Lingxao Β [3] ͸ίʔυΫϩʔϯؒͰίʔυΫϩʔϯपลͷ೉ʹ͢Δͱ‫ݴ‬ΘΕ͍ͯΔ [1]ɽྫ͑͹ɼ͋ΔίʔυΫϩʔϯίʔυ͕ҟͳΔ৔߹ɼίʔυΫϩʔϯʹજࡏతͳόά͕‫ؚ‬ʹόά͕͋Δ৔߹ɼͦͷίʔυยͷ͢΂ͯͷίʔυΫϩʔ·Ε͍ͯΔՄೳੑ͕ߴ͍ͱ͍ͯ͠Δɽ·ͨɼίʔυΫϩʔϯʹରͯ͠ɼಉ༷ͷόά͕ଘࡏ͢ΔՄೳੑ͕͋Δɽ

ϯͰͳ͍෦෼ΑΓɼίʔυΫϩʔϯͰ͋Δ෦෼ͷํ͕҆ఆҰํɼ͢΂ͯͷίʔυΫϩʔϯ͕༗֐ͱ͍͏Θ͚Ͱ͸ͳੑ͕ߴ͍ [4], [5] ͱ͞Ε͓ͯΓɼίʔυΫϩʔϯࣗମʹมߋ͍ [2]ɽ·ͨɼίʔυΫϩʔϯͷൃੜ‫ݪ‬ҼͱͳΔίϐʔΞϯ͕ͳ͔ͬͨͱͯ͠΋ɼपลͷίʔυʹΑΓίʔυΫϩʔϯυϖʔετͳͲ͸ϓϩάϥϚͷ࡞‫ۀ‬Λ‫ݮ‬Β͠ɼޮ཰ྑ͘ιࣗମͷಈ࡞͕มΘͬͯ͠·͏৔߹΋ߟ͑ΒΕΔɽ͔͠͠ɼ

ϑτ΢ΣΞΛ։ൃ͢Δͷʹ໾ʹཱͭ৔߹͕͋Δɽͦ͜Ͱɼ

࣮ࡍʹίʔυΫϩʔϯ͕ͦͷΑ͏ͳपลίʔυʹͲͷఔ౓ରॲ͢΂͖ίʔυΫϩʔϯΛܾΊΔͨΊʹ͸֤ίʔυΫґଘ͍ͯ͠Δ͔͸໌Β͔Ͱ͸ͳ͍ɽϩʔϯΛௐࠪ͢Δඞཁ͕͋Δɽຊ‫Ͱڀݚ‬͸ɼίʔυΫϩʔϯͷपลίʔυΛղੳ͠ɼίʔ͔͠͠ͳ͕ΒɼίʔυΫϩʔϯͷ‫ͨݟ‬໨͕ಉ͡Ͱ͋ͬ

υΫϩʔϯͷपลίʔυ΁ͷґଘੑΛௐࠪͨ͠ɽຊௐࠪͰ

ͯ΋ɼҟͳΔಈ࡞Λ͢Δ৔߹͕͋ΔɽҰํͰɼ‫ͨݟ‬໨͕ҟ͸ɼίʔυΫϩʔϯ಺ͷม਺ͷ஋ʹӨ‫ڹ‬Λ༩͑Δཁૉ΍ɼ੍‫ʹޚ‬Ө‫ڹ‬Λ༩͑ΔཁૉΛपลίʔυͱ‫ن‬ఆ͠ɼपลίʔυ

1

2

a)
b)
c)
d)
e)

େࡕେֶ େֶӃ৘ใՊֶ‫ڀݚ‬ՊGraduate School of Information Science and Technology, Osaka University, Suita, Osaka 565-0871, Japan‫۽‬ຊେֶ େֶӃࣗવՊֶ‫ڀݚ‬ՊGraduate School of Science and Technology, Kumamoto University, Kumamoto, Kumamoto 860-8555, Japanb-odkhuu@ist.osaka-u.ac.jp
y-manabe@cs.kumamoto-u.ac.jp
h-date@ist.osaka-u.ac.jp
ishio@ist.osaka-u.ac.jp
inoue@ist.osaka-u.ac.jp

c 2012 Information Processing Society of Japanͷྔ΍ɼίʔυΫϩʔϯؒͷҧ͍ʹ͍ͭͯௐࠪͨ͠ɽͦͷ݁Ռɼଟ͘ͷίʔυΫϩʔϯʹपลίʔυ͸ଘࡏ͠ɼίʔυΫϩʔϯؒͰपลίʔυ͕ҟͳΔ৔߹΋ଟ͘ଘࡏ͢Δ͜ͱΛ֬ೝͨ͠ɽ
Ҏ߱ɼ2 ষͰ͸എ‫ͯ͠ͱܠ‬ɼίʔυΫϩʔϯɼσʔλϑϩʔɼந৅ߏจ໦ʹ͍ͭͯઆ໌͢Δɽ3 ষͰ͸ɼίʔυΫϩʔϯͷपลίʔυ΁ͷґଘੑͷௐࠪʹ͍ͭͯɼͦͷํ๏1৘ใॲཧֶձ‫ڀݚ‬ใࠂ
IPSJ SIG Technical Reportͱ݁Ռʹ͍ͭͯड़΂Δɽ4 ষͰ͸ؔ࿈‫ڀݚ‬Λɼ5 ষͰ͸·ͱΊͱࠓ‫ޙ‬ͷ՝୊ʹ͍ͭͯड़΂ΔɽύϑΥʔϚϯεվળ ‫੍͍ؒ࣌͠ݫ‬໿Λ࣋ͭγεςϜʹ͓͍ͯɼίϯύΠϥ͕ΠϯϥΠϯల։Λఏ‫͍ͳ͍ͯ͠ڙ‬৔߹ʹɼ࠷దԽ͢ΔͨΊʹ‫܁‬Γฦ͠ॲཧΛ‫ه‬ड़͢Δ͜

2. എ‫ܠ‬ͱ͕͋Δɽ

2.1 ίʔυΫϩʔϯίʔυΫϩʔϯ (Code clone) ͱ͸ɼιʔείʔυதʹଘࡏ͢Δ‫ʹ͍ޓ‬Ұக·ͨ͸ྨࣅͨ͠෦෼Λ࣋ͭίʔυยΛࢦ‫ۮ‬વ ‫ۮ‬વʹɼϓϩάϥϚ͕ɼྨࣅͨ͠ίʔυΛॻ͍ͯ͠·͏৔߹͕͋Δɽ

2.1.2 ໰୊఺͢ [1]ɽҰൠతʹɼίʔυΫϩʔϯͷଘࡏ͸ιϑτ΢ΣΞͷ

ιϑτ΢ΣΞͷอकʹؔ͢Δ‫ڀݚ‬͸ଟ਺ͷϓϩάϥϜ͕อकΛࠔ೉ʹ͢Δͱ‫ݴ‬ΘΕ͍ͯΔɽྫ͑͹ɼίʔυΫϩʔ͔ͳΓͷྔͷίʔυΫϩʔϯΛ‫ؚ‬Ή͜ͱΛ͍ࣔͯ͠Δɽ͜

ϯͱͳ͍ͬͯΔίʔυยதʹܽؕʢόάʣ͕ଘࡏ͢Δ৔߹ɼͷΑ͏ͳίʔυΫϩʔϯ͸ҎԼͷ 2 ͭͷཧ༝ʹΑΓ༗֐ͱͦͷίʔυยͱҰக·ͨ͸ྨࣅͨ͠ଞͷίʔυΫϩʔϯʹ൑அ͞Ε͍ͯΔ [8], [9]ɽ͍ͭͯ΋ಉ༷ͷ͕ܽؕଘࡏ͢ΔՄೳੑ͕͋Δɽιϑτ΢Σ

( 1 ) ॏෳ͍ͯ͠Δෆඞཁͳίʔυ͸ιϑτ΢ΣΞͷอकͷΞͷεέʔϧ͕େ͖͘ɼίʔυΫϩʔϯͱͳΔίʔυย͕ίετΛ্͛Δɽ

ଟ͘ଘࡏ͢Δ৔߹ɼ͢΂ͯͷίʔυΫϩʔϯΛ೺Ѳ͠ɼͦ( 2 ) ίʔυΫϩʔϯʹର͢ΔҰ؏͍ͯ͠ͳ͍มߋ͕όάΛΕΒͷίʔυΫϩʔϯʹ‫·ؚ‬ΕΔόάΛमਖ਼͢Δͷ͸ࠔ೉

࡞ΔՄೳੑ͕͋ΓɼϓϩάϥϜͷෆਖ਼֬ͳಈ࡞ͷ‫ݪ‬ҼͰ͋ΔɽʹͳΓ͏Δɽ

ίʔυΫϩʔϯʹ͸ςΩετϕʔεɼτʔΫϯϕʔεͳू໿ͳͲίʔυΫϩʔϯΛআ‫͠ڈ‬ɼιϑτ΢ΣΞͷอक

Ͳൺֱ͢Δର৅ʹΑ༷ͬͯʑͳ‫ݕ‬ग़ख๏͕ଘࡏ͓ͯ͠ΓɼੑΛ޲্ͤ͞Δख๏͸਺ଟ͘ఏҊ͞Ε͍ͯΔ [10], [11]ɽू

‫ݕ‬ग़ख๏͝ͱʹίʔυΫϩʔϯʹ͍ͭͯͷఆ͕ٛҟͳΔɽ໿ͱ͸ɼιʔείʔυͷதʹ਺ଟ͘ଘࡏ͢Δಉ͡ॲཧΛߦ

Bellon Β [6] ͸ίʔυΫϩʔϯؒͷҧ͍ͷ౓߹͍ʹ‫͖ͮج‬ɼ͏ྨࣅͨ͠ίʔυยΛ 1 ͭͷϝιουʹ·ͱΊΔ͜ͱͰ͋ίʔυΫϩʔϯΛҎԼͷ 3 ͭͷఆٛʹ෼ྨ͍ͯ͠Δɽ

Δɽू໿ʹΑͬͯɼιʔείʔυͷྔΛ‫ݮ‬Β͠ɼΑΓΘ͔λΠϓ 1ۭന΍λϒͷ༗ແɼ‫ހׅ‬ͷҐஔͳͲͷίʔσΟΓ΍͍͢ίʔυʹ͢Δ͜ͱ͕Ͱ͖ΔɽҰํɼιϑτ΢ΣΞ

ϯάελΠϧΛআ͖ɼ‫׬‬શʹҰக͢ΔίʔυΫϩʔϯɽͷιʔείʔυͷྨࣅ͸‫ݻ‬༗ͷ΋ͷ΋͋Γɼू໿ɼআ‫ͳڈ‬

λΠϓ 2ม਺໊΍ؔ਺໊ͳͲͷϢʔβఆ໊ٛɼ·ͨม਺ͷ‫Ͳͳܕ‬ͷҰ෦ͷ༧໿‫ޠ‬ͷΈ͕ҟͳΔίʔυΫϩʔϯɽ
λΠϓ 3

λΠϓ 2 ʹ͓͚ΔมߋʹՃ͑ͯɼจͷૠೖ΍࡟আɼมߋ͕ߦΘΕͨίʔυΫϩʔϯɽͲ͸ৗʹ޷·͍͠Θ͚Ͱ͸ͳ͍ɽ͜Εʹ͸ҎԼͷ 3 ͭཧ༝͕͋Δɽ( 1 ) ϓϩάϥϛϯά‫ޠݴ‬ͷ‫ػ‬ೳෆ଍ɿίʔυΫϩʔϯ͕௕͍࣌ؒʹ͔͚ͯଟ͘ͷมߋʹΑͬͯมԽ͢Δ͜ͱ͕͋ຊ‫Ͱڀݚ‬͸λΠϓ 2 ͷίʔυΫϩʔϯΛ෼ੳର৅ͱ͢Δɽ

ΔɽͦͷΑ͏ͳίʔυ͸؆୯ʹ͸ू໿͞Εͳ͍ɽ‫ʹ͍ޓ‬Ұக·ͨ͸ྨࣅͨ͠ίʔυΫϩʔϯͷରΛΫϩʔϯ( 2 ) ύϑΥʔϚϯεؔ࿈ɿίʔυΫϩʔϯΛू໿ͨ͠ίʔϖΞ (Clone pair) ͱ‫ͼݺ‬ɼΫϩʔϯϖΞʹ͓͍ͯਪҠؔ܎υ͸ΑΓѱ͍ύϑΥʔϚϯεΛ‫ͤݟ‬Δ৔߹͕͋Δɽ͕੒ΓཱͭίʔυΫϩʔϯͷू߹ΛΫϩʔϯηοτ (Clone( 3 ) ιϑτ΢ΣΞ։ൃ༻ɿҰ෦ͷςετ༻ίʔυ͕ू໿͞set) ͱ‫Ϳݺ‬ɽ
2.1.1 ൃੜ‫ݪ‬ҼίʔυΫϩʔϯͷൃੜ‫ݪ‬Ҽͱͯ͠ҎԼͷ΋ͷ͕‫͛ڍ‬ΒΕΕΔ΂͖Ͱͳ͍৔߹͕͋ΔɽͦͷͨΊɼ͢΂ͯͷίʔυΫϩʔϯΛআ‫͖Ͱڈ‬ΔΘ͚Ͱ͸ͳ͘։ൃऀ͸ίʔυΫϩʔϯʹର͢Δू໿ͷՄ൱Λௐࠪ

Δ [7]ɽ

͢Δඞཁ͕͋Δɽ‫ط‬ଘίʔυͷίϐʔʹΑΔ࠶ར༻ ৽͍͠‫ػ‬ೳΛ࣮‫͢ݱ‬Δ

2.1.3 ‫ݕ‬ग़πʔϧࡍɼϓϩάϥϚ͸ࣅͨΑ͏ͳಈ࡞Λ͢Δ‫ط‬ଘίʔυΛίʔυΫϩʔϯ‫ݕ‬ग़ख๏ʹ͸ɼιʔείʔυͷࣈ۟ղੳίϐʔͯͦ͠ͷ··ɼ΋͘͠͸Ұ෦मਖ਼࣮ͯ͠‫͢ݱ‬Δ

ʹ‫ͮ͘ج‬ख๏ [12], [13], [14] ΍ɼಛ௃ϝτϦΫεʹ‫ͮ͘ج‬͜ͱ͕ଟ͍ɽ

ख๏ [15], [16] ͳͲ͕ଘࡏ͢Δɽιʔείʔυͷࣈ۟ղੳʹίʔσΟϯάελΠϧ ίʔσΟϯάελΠϧͰ͋ΔΤ

‫ͮ͘ج‬ख๏Ͱ͸ɼιʔείʔυதͰಉҰͷจࣈྻΛ‫͢ࡧݕ‬ϥʔग़ྗ΍ϢʔβΠϯλʔϑΣʔεදࣔͳͲͷελΠΔ͜ͱͰίʔυΫϩʔϯͷ‫ݕ‬ग़Λߦ͏ɽಛ௃ϝτϦΫεʹ

ϧΛอ࣋͢ΔͨΊʹɼίʔυยΛҙਤతʹίϐʔͯ͠‫ͮ͘ج‬ख๏Ͱ͸ɼΫϥε΍ؔ਺ɼϑΝΠϧͷΑ͏ͳϓϩάར༻͢ΔɽϥϜதͷ͋Δछͷ୯Ґ͝ͱʹಛ௃ϝτϦΫεΛఆٛɾࢉग़

ఆ‫ॲܕ‬ཧ ଟ਺ʹ‫܁‬Γฦ͠ॻ͘ॲཧ͸ɼఆ‫ܕ‬ͷΑ͏ʹͳΓɼϓϩάϥϚ͕ҙਤతʹίϐʔ͍ͯ͠ͳͯ͘΋ɼಉ͡Α͏ͳίʔυʹͳͬͯ͠·͏ɽσʔλߏ଄ͷҧ͍ ಉ͡‫ܕ‬Λ࣋ͭσʔλߏ଄ͷॲཧΛଞͷσʔλߏ଄ʹ࢖ͬͯ͠·͏ɽc 2012 Information Processing Society of Japan͠ɼͦΕΒͷϝτϦΫε஋͕ྨࣅͨ͠΋ͷΛίʔυΫϩʔϯͱͯ͠நग़͢Δɽຊ‫Ͱڀݚ‬͸ίʔυΫϩʔϯ‫ݕ‬ग़γεςϜͱͯ͠

CCFinder[17] Λ࢖༻͢ΔɽCCFinder ͸ࣈ۟ղੳϕʔεͷίʔυΫϩʔϯ‫ݕ‬ग़ख๏ͰλΠϓ 1ɼλΠϓ 2 ͷίʔυ

2৘ใॲཧֶձ‫ڀݚ‬ใࠂ
IPSJ SIG Technical ReportΫϩʔϯΛ‫ݕ‬ग़Ͱ͖ΔɽCCFinder ͷίʔυΫϩʔϯͷ‫ݕ‬ɹग़ॲཧ͸ɼࣈ۟ղੳɼม‫ॲ׵‬ཧɼ‫ݕ‬ग़ॲཧɼग़ྗ੔‫ॲܗ‬ཧϭ^ƚƌŝŶŐƐƚƌс͞ĂďĐ͖͟
Ϯ͙
ϯ͙
ϰƉƵďůŝĐǀŽŝĚDĞƚŚ;ŝŶƚ Ă͕ŝŶƚ ďͿ΂ϱŝŶƚ ǆ͕Ǉ͖ϲǆсĂнď͖ϳǇсǆнƐƚƌ͘ůĞŶŐƚŚ;Ϳ͖ϴ^ǇƐƚĞŵ͘ŽƵƚ͘ƉƌŝŶƚůŶ;ǇͿ͖ϵ΃͔ΒͳΔɽࣈ۟ղੳͰιʔείʔυΛτʔΫϯྻʹม‫׵‬͠ɼม‫ॲ׵‬ཧͰม਺໊΍ؔ਺໊౳ΛಉҰͷτʔΫϯʹม‫׵‬͢Δɽͦͷ‫ޙ‬ɼ‫ݕ‬ग़ॲཧͰᮢ஋Ҏ্ͷ௕͞ͷ‫ڞ‬௨τʔΫϯྻΛ୳ࡧ͠ɼ͢΂ͯͷίʔυΫϩʔϯͷରͷϦετΛग़ྗ
͢Δɽ

2.1.4 ϝτϦΫε
ίʔυΫϩʔϯͷੑ࣭ɼಛ௃Λද͢஋ͱ༷ͯ͠ʑͳϝτϦΫε͕ఆٛ͞Ε͍ͯΔ [17]ɽຊ‫Ͱڀݚ‬͸ɼͦͷதͰ΋

RNR ͱ͍͏ϝτϦΫεΛ༻͍ΔɽRNR ͱ͸Ϋϩʔϯηο

Ă

ǆ

Ɛƚƌ
Ǉ

;ĂͿ

ਤ1

ď

;ďͿ

σʔλϑϩʔਤͷྫɼ(a) ιʔείʔυɼ(b)(a) ͷม਺ y ʹର͢Δσʔλϑϩʔτʹ‫·ؚ‬ΕΔίʔυยͷඇ‫܁‬Γฦ͠౓Λද͢ϝτϦΫεͰ͋Γɼ஋͕௿͍Ϋϩʔϯηοτ͸։ൃऀʹͱͬͯ‫ڵ‬ຯ͕ͳɹ͍ΫϩʔϯηοτͰ͋Δ [18]ɽ

ϭƉƵďůŝĐŝŶƚ ŝŶĐy;ŝŶƚ ǆͿ΂Ϯ ƌĞƚƵƌŶǆнϭϬ͖ϯ΃

2.1.5 पลίʔυपลίʔυʹؔ࿈͢Δ֓೦ͱͯ͠ɼLingxiao Β [3] ͕ί;ĂͿϯςΩετͱ͍͏֓೦Λఆ͍ٛͯ͠ΔɽLingxiao Β͸ɼ͋Δίʔυย F ͷίϯςΩετͱͯ͠ɼͦͷίʔυย F ΛғDĞƚŚŽĚ
ĞĐůĂƌĂƌƚŝŽŶ

Ή࠷಺੍‫ޚ‬ϒϩοΫΛࢦ͍ͯ͠Δɽ࠷಺੍‫ޚ‬ϒϩοΫͱ͸ϓϩάϥϛϯά‫͚͓ʹޠݴ‬Δ੍‫ޚ‬ϑϩʔߏ଄ͱͳΔ΋ͷͰ
͋Δɽྫ͑͹ɼC ‫Ͱޠݴ‬͸ɼifɼswitchɼforɼwhileɼؔ਺

2.2 σʔλϑϩʔ

䝤䝻䝑䜽

ಟ㣭Ꮚ

એ‫͋ͰͲͳݴ‬Δɽ
ƉƵďůŝĐ

ᡠ䜚್
䛾ᆺ

ྡ๓

ŝŶƚ

ŝŶĐy

ᩥ ͗ZĞƚƵƌŶ^ƚĂƚĞŵĞŶƚ

ຊ‫Ͱڀݚ‬͸ίʔυΫϩʔϯʹ‫·ؚ‬ΕΔม਺ʹ͍ͭͯͷᘧσʔλϑϩʔΛऔΓѻ͏ͨΊɼIshio Β [19] ͷख๏Λ༻͍
Δɽม਺ؒͷσʔλϑϩʔؔ܎ʢҎ߱ɼσʔλϑϩʔؔ܎ǆͱ‫Ϳݺ‬ʣͱ͸୅ೖจͷࠨลࣜͱӈลࣜͷؒʹ੒Γཱͭؔ܎

ϭϬ

;ďͿ

Ͱ͋Δɽྫ͑͹ ”p = q; ” ͱ͍͏จͰ͋Ε͹ɼq ͔Β p ΁ͷσʔλϑϩʔ͕͋Δͱߟ͑Δɽ·ͨɼຊ‫Ͱڀݚ‬ѻ͏σʔλнਤ 2 Eclipse ͷ JDT ʹΑͬͯ࡞੒͞ΕΔ AST ͷΠϝʔδਤϑϩʔؔ܎͸ҎԼͷ 4 ͭͷϧʔϧʹै͏ɽ( 1 ) ͋Δม਺ p ͷ஋Λؔ਺‫ͼݺ‬ग़͠Ͱऔಘ͢Δ৔߹ɼؔ਺
‫ͼݺ‬ग़͠ͷҾ਺ʹม਺ q ͕͋Ε͹ɼq ͔Β p ΁ͷσʔϩʔ͕͋Δɽ·ͨɼม਺ str ͷ‫ͼݺ‬ग़͍ͯ͠Δؔ਺ length͸σʔλϑϩʔ্ʹग़‫͢ݱ‬Δؔ਺ʹͳΔɽ

λϑϩʔ͕͋Δͱߟ͑Δɽͦͷؔ਺‫ͼݺ‬ग़͠Λ pɼq ؒͷσʔλϑϩʔ্ʹग़‫͢ݱ‬Δؔ਺‫ͼݺ‬ग़͠ͱ͢Δɽ·

2.3 ந৅ߏจ໦

ͨɼ͋Δม਺ t ͔Β r ΁ͷσʔλϑϩʔ͕͋ͬͨ৔߹ɼ

ந৅ߏจ໦ʢASTɼAbstract Syntax Treeʣͱ͸ϓϩάϥ

ม਺ t ʹΑͬͯ‫ͼݺ‬ग़͞ΕΔؔ਺΋σʔλϑϩʔ্ʹϜͷจ๏ߏ଄Λ໦ͷ‫Ͱܗ‬දͨ͠΋ͷͰ͋ΔɽҎԼʹɼJavaग़‫͢ݱ‬Δؔ਺‫ͼݺ‬ग़͠ʹͳΔɽ

‫͚͓ʹޠݴ‬ΔɼEclipse ͷ JDT ʹΑͬͯ࡞੒͞ΕΔ AST( 2 ) ୅ೖจͷӈลࣜʹෳ਺ͷม਺͕ԋࢉࢠͰ݁߹͞Εͨ৔ͷྫΛ঺հ͢Δɽਤ 2(a) ͷίʔυยʹର͢ΔɼAST ͷߏ߹͋Δ͍͸ϝιουʹҾ਺ʹͳͬͨ৔߹ɼͦΕΒͷม଄͸ਤ 2(b) ͷΑ͏ʹͳΔɽਤ 2(b) Ͱ֤ࣔ͢‫ ؙ͕‬AST ͷ

਺͔Β୅ೖจͷࠨลࣜͷม਺΁ͷσʔλϑϩʔ͕͋Δ

1 ͭͷϊʔυΛද͢ɽ਌ϊʔυ͔Βࢠϊʔυ΁໼ҹ͕Ҿ͔ͱߟ͑ΔɽΕ͍ͯΔɽAST ͷҰ൪ऴ୺ͷϊʔυʢ༿ʣ͸จࣈྻɼϦς( 3 ) σʔλϑϩʔؔ܎͸੍‫ޚ‬ͷྲྀΕΛແࢹ͢ΔɽϥϧͳͲͷ৘ใΛอ࣋͠ɼͦΕΑΓ্ͷϊʔυ͕ࣜɼจɼ

( 4 ) ͋Δม਺ p ͱਪҠతʹσʔλϑϩʔؔ܎͕͋Δม਺ sϒϩοΫͳͲͦͷϊʔυ͕ࠜͱͳΔ෦෼໦͕ԿΛද͔͢Λ͕͋Ε͹ɼp ͱ q ͷؒʹσʔλϑϩʔ͕͋Δͱߟ͑Δɽ

ࣔ͢ɽྫ͑͹ɼx ͱ͍͏ϊʔυ͔Β਌ΛͨͲͬͯߦ͘ͱɼxਤ 1 ʹσʔλϑϩʔͷྫΛࣔ͢ɽਤ 1 ͷ (a) ͷϓϩάϥ

͕ x + 10 ͱ͍͏ࣜͷҰ෦Ͱ͋ΓɼincX ϝιουͷ “ϒϩοϜͷม਺ y ʹର͢Δσʔλϑϩʔ͸ਤ 1 ͷ (b) Α͏ʹͳΔɽ

Ϋ”ʹ‫·ؚ‬Ε͍ͯΔ͜ͱ͕Θ͔Δɽ

ਤ 1 Ͱ͸ɼม਺ y ͱ 4 ͭͷม਺ xɼstrɼaɼb ͸σʔλϑc 2012 Information Processing Society of Japan

3৘ใॲཧֶձ‫ڀݚ‬ใࠂ
IPSJ SIG Technical Report

3. ίʔυΫϩʔϯͷपลίʔυ΁ͷґଘੑௐࠪίʔυΫϩʔϯͷपลίʔυ΁ͷґଘੑΛௐࠪ͢ΔͨΊɼ࣮‫ݧ‬ΛߦͬͨɽҎԼɼͦͷํ๏ͱ݁Ռʹ͍ͭͯड़΂Δɽ

3.1 पลίʔυຊௐࠪͰ͸ɼҎԼͷ 2 छྨΛपลίʔυͱͨ͠ɽ( 1 ) ίʔυΫϩʔϯͷதʹଘࡏ͢Δม਺ͷσʔλϑϩʔʹग़‫͢ݱ‬ΔɼϑΟʔϧυม਺ɼҾ਺Λ࣋ͨͳ͍ϝιου‫ͼݺ‬ग़͠ɼίʔυΫϩʔϯΛ‫ؚ‬ΉϝιουͷԾҾ਺ɽҎ߱ɼ͜ΕΒΛ֎෦ཁૉͱ‫Ϳݺ‬ɽ·ͨɼίʔυΫϩʔϯͷதʹଘࡏ͢Δ͋Δม਺ͷσʔλϑϩʔʹग़‫͢ݱ‬Δ
֎෦ཁૉʹ͓͍ͯɼ֎෦ཁૉ͕ίʔυΫϩʔϯͷͦͷม਺͔Βࢀর͞Ε͍ͯΔͱ͢Δɽ

( 2 ) ίʔυΫϩʔϯΛ‫ؚ‬Ή੍‫ޚ‬ϒϩοΫͷ͏ͪɼ࠷΋಺ଆʹ͋ΔϒϩοΫɽҎ߱ɼ͜ΕΛ࠷಺੍‫ޚ‬ϒϩοΫͱ‫Ϳݺ‬ɽ

3.2 ϦαʔνΫΤενϣϯ
ຊௐࠪͰ͸ҎԼͷϦαʔνΫΤενϣϯΛఆΊͨɽ

RQ1ɿ ֤ίʔυΫϩʔϯʹ͓͍ͯɼपลίʔυ͸ͲΕ͚ͩଟ͍͔

RQ2ɿ ֤ίʔυΫϩʔϯͷपลίʔυ͸ಉҰͷΫϩʔϯηοτͷதͰͲΕ͚ͩҰக͢Δ͔

3.3 ௐࠪํ๏
·ͣ CCFinder Λ༻͍ͯίʔυΫϩʔϯΛ‫ݕ‬ग़͢Δɽຊ
‫Ͱڀݚ‬͸ɼ‫ݕ‬ग़ͨ͠ίʔυΫϩʔϯͷ͏ͪɼ1 ͭͷϝιου಺ʹ‫·ؚ‬ΕΔ͜ͱͱίʔυΫϩʔϯ͸ඞͣม਺Λ‫ؚ‬Ή͜ͱͷ 2 ͭͷ৚݅Λຬͨͨ͠΋ͷͷΈΛ࢖༻͢ΔɽͳͥͳΒɼ͜ΕΒͷ৚݅Λຬͨ͞ͳ͍ίʔυΫϩʔϯ͸ຊௐࠪʹద͞ͳ͍ͨΊͰ͋ΔɽίʔυΫϩʔϯ͕ม਺Λ‫͍ͳ·ؚ‬৔߹ɼपลίʔυ͔ΒίʔυΫϩʔϯ΁ͷσʔλϑϩʔ͕ଘ
ࡏ͢Δ͜ͱ͸ͳ͍ɽ·ͨɼίʔυΫϩʔϯ͕ 2 ͭͷϝιουʹ·͕ͨΔͱ͖͸ɼ࠷಺੍‫ޚ‬ϒϩοΫΛಛఆͰ͖ͳ͍ɽ
࣍ʹɼ֤ίʔυΫϩʔϯʹ͍ͭͯɼίʔυΫϩʔϯ಺ͷม਺Λಛఆ͢Δɽಛఆ‫ޙ‬ɼಉҰͷΫϩʔϯηοτ಺ʹ͋Δ

র͍ͯ͠ΔಉҰ֎෦ཁૉͷ਺ͱɼ࠷಺੍‫ޚ‬ϒϩοΫͷ
छྨௐࠪର৅ͱͯ͠༻͍ͨϓϩδΣΫτ͸ SourceForge.netɼ

tigris.org ͔Βऔಘͨ͠ɼJava Ͱ‫ه‬ड़͞Ε͍ͯΔϓϩδΣΫ
τ 7 ‫͋Ͱݸ‬Δɽද 1 ʹ֤ϓϩδΣΫτͷόʔδϣϯͱιʔείʔυͷߦ਺ʢSCLNʣͱϑΝΠϧ਺Λࣔ͢ɽද 2 ʹ͸ίʔυΫϩʔϯʹؔ͢Δ৘ใͰ͋Δຊ‫ڀݚ‬ͷର৅ͱͳΔΫϩʔϯηοτ਺ʢTargeted Clone Set NumberɼTCSNʣɼίʔυΫϩʔϯ਺ʢTargeted Code Clone NumberɼTCCNʣͱର৅ͱͳΒͳ͍ίʔυΫϩʔϯ਺ʢNot Targeted CodeClone NumberɼNTCCNɼม਺Λ‫͍ͳ·ؚ‬ίʔυΫϩʔϯ
ͱ 1 ͭͷϝιουʹ‫׬‬શʹด͍ͯ͡ͳ͍ίʔυΫϩʔϯͷ਺ʣΛࣔ͢ɽ
Ҏ߱ɼपลίʔυͷಛఆํ๏ͱɼ֎෦ཁૉͷ਺͑ํɼίʔυΫϩʔϯ಺ͷม਺໊ͷҰக൑ఆͷํ๏ɼ֎෦ཁૉ΁ͷࢀরͷҰக൑ఆͷํ๏ʹ͍ͭͯड़΂Δɽ

3.3.1 ίʔυΫϩʔϯͷपลίʔυͷಛఆํ๏ຊ߲Ͱ͸ɼίʔυΫϩʔϯͷपลίʔυͰ͋Δɼ֎෦ཁૉͱ࠷಺੍‫ޚ‬ϒϩοΫͷಛఆํ๏ʹ͍ͭͯઆ໌͢Δɽ
֎෦ཁૉͷಛఆ
ίʔυΫϩʔϯʹଘࡏ͢Δ֤ม਺ͷσʔλϑϩʔ্ʹग़‫͢ݱ‬Δ֎෦ཁૉΛऔಘ͢ΔͨΊʹɼ·ͣίʔυΫϩʔϯʹଘࡏ͢Δ͢΂ͯͷม਺ͷϦετΛ࡞ΔɽͦͷϦετ͔Βม਺Λ 1 ͭͣͭऔΓग़ͯ͠ɼσʔλϑϩʔ্ʹग़‫͢ݱ‬Δ֎෦
ཁૉΛऔಘ͍ͯ͘͠ɽίʔυΫϩʔϯͷ 1 ͭͷม਺ͷσʔλϑϩʔΛऔಘ͢ΔॲཧΛ Algorithm1 ʹࣔ͢ɽ

Algorithm1 ͸Ҿ਺ͱͯ͠σʔλϑϩʔΛऔಘ͍ͨ͠ม਺x ΛͱΓ֎෦ཁૉͷϦετΛग़ྗ͢Δɽม਺ͱͯ݁͠ՌΛද 1ௐࠪର৅ϓϩδΣΫτͷόʔδϣϯͱιʔείʔυͷߦ਺ͱϑΝΠϧ਺ϓϩδΣΫτ໊

όʔδϣϯ

SCLN

ϑΝΠϧ਺ɹ

0.34

1090151318

DataCrow

3.9.17

68139

650

LaTeXDraw

3.0.0(a4)

35999

363

SweetHome3D

3.7

74352

212

jwebmail

1.0.1

11173

113

jEdit

4.3

103317502

muCommander

0.8.5

76739

1069

ArgoUMLίʔυΫϩʔϯʹ͍ͭͯɼͦΕΒͷม਺Λग़‫ʹॱݱ‬ରԠ෇
͚Δɽͦͯ͠ɼ֤ม਺ʹ͍ͭͯ஋ͷ‫࢖ʹࢉܭ‬ΘΕ͍ͯΔ֎෦ཁૉΛಛఆ͢Δɽ·ͨɼநग़֤ͨ͠ίʔυΫϩʔϯʹ͍ͭͯɼ࠷಺੍‫ޚ‬ϒϩοΫΛಛఆ͢Δɽ֤ϦαʔνΫΤενϣϯʹ౴͑ΔͨΊʹඞཁͳσʔλ͸ҎԼͷͱ͓ΓͰ͋Δɽ

RQ1 Ϋϩʔϯηοτ౰ͨΓͷ֎෦ཁૉͷ਺ͱ࠷಺ϒϩοΫͷछྨผͷස౓

RQ2 1 ͭͷΫϩʔϯηοτ಺ͷ֤ίʔυΫϩʔϯ͕ࢀc 2012 Information Processing Society of Japan

ද 2 ௐࠪର৅ϓϩδΣΫτ͔Β‫ݕ‬ग़ͨ͠ίʔυΫϩʔϯʹؔ࿈͢Δ৘ใ

ϓϩδΣΫτ໊

TCSN

TCCN

NTCCN

ArgoUML

2073

5276

1227

DataCrow

1337

5540

437

LaTeXDraw

1358

7506

1095

SweetHome3D

2017

8217

766

jwebmail

125

255

21

jEdit

1740

4714

574

muCommander

1496

3386

679

4

৘ใॲཧֶձ‫ڀݚ‬ใࠂ
IPSJ SIG Technical Report

Algorithm 1 ม਺ͷ֎෦ཁૉͷϦετΛऔಘ͢Δॲཧ

֨ೲ͢Δ Result ͱ͍͏Ϧετͱ࡞‫༻ۀ‬ͷελοΫ StackΛ༻ҙ͠ɼStack ʹॳ‫ظ‬஋ͱͯ͠ x ΛೖΕ͓ͯ͘ɽ͜ͷΞϧΰϦζϜͰ͸ x Λ‫ʹ఺ج‬ɼx ʹ஋Λ୅ೖ͢ΔจΛಛఆ͠ɼ

ϴϬϬ
ϲϬϬ

ZEZхсϬ͘ϱϱϬϬ⣼✚ й䠄ZEZфϬ͘ϱ㸧ϰϬϬ⣼✚ й䠄ZEZхсϬ͘ϱ㸧

ϯϬϬ
ϮϬϬ

΀ϲϵ͕ϳϮ΁

΀ϲϱ͕ϲϴ΁

΀ϲϭ͕ϲϰ΁

΀ϱϳ͕ϲϬ΁

΀ϱϯ͕ϱϲ΁

΀ϰϵ͕ϱϮ΁

΀ϰϱ͕ϰϴ΁

΀ϰϭ͕ϰϰ΁

΀ϯϳ͕ϰϬ΁

΀ϯϯ͕ϯϲ΁

΀Ϯϵ͕ϯϮ΁

΀Ϯϱ͕Ϯϴ΁

΀Ϯϭ͕Ϯϰ΁

΀ϭϳ͕ϮϬ΁

Ϭ΀ϭϯ͕ϭϲ΁

ϭϬϬ

΀ϱ͕ϴ΁

䞁
䝉
䝑
䝖
ᩘ

ϳϬϬ

΀ϵ͕ϭϮ΁

䜽䝻ϭϬϬ͘ϬϬйϵϬ͘ϬϬй
ϴϬ͘ϬϬй
ϳϬ͘ϬϬй
ϲϬ͘ϬϬй
ϱϬ͘ϬϬй
ϰϬ͘ϬϬй
ϯϬ͘ϬϬй
ϮϬ͘ϬϬй
ϭϬ͘ϬϬй
Ϭ͘ϬϬй

ZEZфϬ͘ϱ΀Ϭ͕ϰ΁

1: function getExternalElement(x:variable)
2:
Result = φ;3:
Stack = {x}; ɹ4:while Stack is not empty do
5:Stack ͷ຤ඌͷཁૉΛऔΓग़͠ v ͱ͢Δ6:
ม਺ v ͕ࠨลʹग़‫͢ݱ‬Δ୅ೖจ͢΂ͯΛಛఆ͢Δ
7:ಛఆͨ͠୅ೖจͷӈลʹग़‫͢ݱ‬Δม਺ɼҾ਺ͳ͠ͷϝιουͷू߹Λ C ͱ͢Δ
8:C ͔Β Result ʹଘࡏ͢Δ΋ͷΛআ‫͢ڈ‬Δ
9:Result ʹ C ͷཁૉΛ͢΂ͯ௥Ճ
10:
Stack ʹ C ͷཁૉΛ͢΂ͯ௥Ճ11:
end while ɹ
12:Result ͔ΒϩʔΧϧม਺Λআ‫͢ڈ‬Δ
13:
return Result
14: end functionϵϬϬ呎ೖྗ xɿσʔλϑϩʔΛऔಘ͍ͨ͠ม਺
ग़ྗ Resultɿೖྗม਺ͷσʔλϑϩʔʹग़‫͢ݱ‬Δ֎෦ཁૉͷϦετ䜽䝻䞊䞁䝉䝑䝖䛾እ㒊せ⣲䛾ᩘਤ 3

ArgoUML ʹ͓͚Δ֎෦ཁૉ͝ͱͷΫϩʔϯηοτͷ਺Δߦͱྻͷަ఺ʹνΣοΫʢྫͷ৔߹͸ʓʣΛೖΕ͍͖ͯɼ͢΂ͯͷม਺ͱ֎෦ཁૉͷ૊Έ߹Θͤʹ͍ͭͯνΣοΫ͕ೖΔ͔Λ֬ೝ͢Δɽશͯ֬ೝ͠ऴΘͬͨͷͪɼରԠؔ܎ʹ
͋Δෳ਺ͷม਺ʹରԠ͢Δߦʹ͍ͭͯɼ֤ྻͰ͍ͣΕ͔ͷߦʹ͍ͭͯʹ͔͠νΣοΫ͕ೖ͍ͬͯͳ͍ྻʹରԠ͢Δ֎෦ཁૉ͸ɼม਺͔Βͷࢀর͕Ұக͍ͯ͠ͳ͍֎෦ཁૉͱ͢
Δɽ͜ͷνΣοΫΛશͯͷରԠؔ܎ʹ͋Δม਺ͷ૊ʢද 3ͷ 2 ྻ໨ʹ͋ͨΔʣʹ͍ͭͯௐࠪ͠ɼม਺͔Βͷࢀর͕Ұͦͷӈลʹग़‫ͨ͠ݱ‬ม਺Λ‫ܦ‬༝ͯͨ͠ͲΓண͚Δϝιου

க͍ͯ͠ͳ͍ͱ࠷‫Ͱ·ޙ‬൑ఆ͞Εͳ͔ͬͨ෦෼Λม਺͔ΒͷԾҾ਺ͱϑΟʔϧυɼҾ਺ͳ͠ͷϝιου‫ͼݺ‬ग़͠Λ֎ͷࢀর͕Ұகͨ͠֎෦ཁૉͱ͢ΔɽҎ߱ɼ֎෦ཁૉ͸ม਺෦ཁૉͱͯ͠ྻ‫͢ڍ‬Δɽ

͔Βͷࢀর͕Ұக͍ͯ͠ͳ͍৔߹ɼΫϩʔϯηοτ಺Ͱͦ࠷಺੍‫ޚ‬ϒϩοΫͷಛఆͷ֎෦ཁૉ͸ࠩ෼͕͋Δͱ͍͏ɽιʔείʔυ্ͰίʔυΫϩʔϯͷ։࢝Ґஔ͔Βલʹଘࡏ͢Δ੍‫ޚ‬ϒϩοΫΛௐࠪ͠ɼ੍‫ޚ‬ϒϩοΫͷൣғ͕ίʔυΫϩʔϯͷ։࢝Ґஔ͔ΒऴྃҐஔ·ͰΛ‫׬‬શʹ‫ؚ‬Ή੍‫ޚ‬

3.4 ݁Ռ
ௐࠪର৅ͱͳΔ֤ϓϩδΣΫτͷιʔείʔυΛղੳ͠ϒϩοΫΛ࠷಺੍‫ޚ‬ϒϩοΫͱ͢Δɽ

ͨ݁ՌΛҎԼʹࣔ͢ɽ

3.3.2 ֎෦ཁૉͷ‫ࢉܭ਺ݸ‬3.4.1 RQ1ɿ֤ίʔυΫϩʔϯʹ͓͍ͯɼपลίʔυ͸ͲΕ͚ͩଟ͍͔

࢝ΊʹɼΫϩʔϯηοτ಺ͷ֤ίʔυΫϩʔϯͷม਺͔Βࢀর͞Ε͍ͯΔ֎෦ཁૉΛநग़͢Δɽ࣍ʹɼ֤֎෦ཁૉ

ίʔυΫϩʔϯʹ͓͍ͯɼपลίʔυ͸ͲΕ͙Β͍͋Δ

͔Β৘ใΛऔಘ͢ΔɽίʔυΫϩʔϯΛ‫ؚ‬ΉϝιουͷԾ͔Λௐ΂ΔͨΊʹɼ֤Ϋϩʔϯηοτʹ͓͚Δɼ֎෦ཁૉ

Ҿ਺͔Β͸  ԾҾ਺ɼ‫ܕ‬ɼग़‫ॱݱ‬ং ɼϑΟʔϧυม਺͔Βͷ਺ͱ࠷಺੍‫ޚ‬ϒϩοΫͷස౓ͱͦͷछྨผͷ಺༁Λௐࠪ͸  ϑΟʔϧυɼ‫ܕ‬ɼ໊લ ɼҾ਺Λ࣋ͨͳ͍ϝιου‫ݺ‬ͼग़͔͠Β͸  ϝιουɼ໭Γ஋ͷ‫ܕ‬ɼ໊લ  ΛऔΓग़͢ɽͨ͠ɽௐࠪର৅ͷ֤ϓϩδΣΫτʹ͍ͭͯ֎෦ཁૉͷ਺͝ͱ࠷‫ʹޙ‬ɼͦΕΒͷऔΓग़֤ͨ͠৘ใΛཁૉͱͯ࣋ͭ͠ू

ʹΫϩʔϯηοτͷ਺Λ਺͑ͨ݁Ռͷ͏ͪɼArgoUMLɼ߹Λ࡞੒͠ɼͦͷू߹ͷཁૉ਺͕֎෦ཁૉͷ‫ͳͱ਺ݸ‬Δɽ

jEditɼmuCommander Ͱͷ݁ՌΛͦΕͧΕਤ 3ɼਤ 4ɼਤ 5ू߹Λ࡞੒͢Δ͜ͱʹΑΓಉ͡σʔλΛ࣋ͭ֎෦ཁૉ͕ॏ

ʹࣔ͢ɽ͜ΕΒͷਤͰ͸ɼRNR ͕ 0.5 Ҏ্ͷΫϩʔϯηο

ෳ͢Δ͜ͱΛආ͚͍ͯΔɽ

τͷΈΛର৅ͱͨ݁͠Ռ΋͍ࣔͯ͠Δɽ͜Ε͸ɼࣗಈੜ੒

3.3.3 ม਺໊ͷҰகͷ൑ఆํ๏͞ΕͨίʔυΫϩʔϯ͕֎෦ཁૉͷ਺ʹӨ‫ڹ‬Λ༩͍͑ͯΔ

Ϋϩʔϯηοτ಺Ͱɼม਺໊͕Ұக͢Δ৚݅͸ରԠ͕͔͋‫ݟ‬ΔͨΊͰ͋ΔɽɹɹɹΔʢҎ߱ɼରԠؔ܎ͱ͍͏ʣม਺͕͢΂ͯಉ໊͡લͰ͋Γɼ
ද 3ͲͷΫϩʔϯϖΞʹ͓͍ͯ΋ͦͷ৚͕݅੒Γཱͭ͜ͱͰ
͋Δɽ

3.3.4 ֎෦ཁૉ΁ͷࢀরͷҰக൑ఆํ๏
֎෦ཁૉ΁ͷࢀরͷҰக൑ఆʹ͓͍ͯ͸ɼ֎෦ཁૉ͕ྻɼ
ྫΛද 3 ʹࣔ͢ɽ͋ΔίʔυΫϩʔϯ಺ͷม਺͕͋Δ֎෦

;ŝŶƚᆺͿ
௬ᘬᩘϭ䜽䝻䞊䞁䝨䜰䛾㻝䛴┠䛾ኚᩘ䜽䝻䞊䞁䝨䜰䛾㻞䛴┠䛾ኚᩘ;ŝŶƚᆺͿ
ŐĞƚy

;ŝŶƚᆺͿ
/Ŷŝƚ䜽䝻䞊䞁䛾[[䕿;ŝŶƚᆺͿ ;^ƚƌŝŶŐᆺͿ௬ᘬᩘϮ ௬ᘬᩘϭ㽢㽢;ŝŶƚᆺͿ ;ĚŽƵďůĞᆺͿ ;䜽䝷䝇ᆺͿ&ŝĞůĚϭ
&ŝĞůĚϭ
&ŝĞůĚϯ

㽢

㽢

㽢

䕿

㽢

䜽䝻䞊䞁䛾[
[

䕿

㽢

㽢

㽢

㽢

㽢

㽢

䕿

䜽䝻䞊䞁䛾\
\

䕿

䕿

㽢

䕿

㽢

䕿

㽢

㽢

䜽䝻䞊䞁䛾\
\

䕿

㽢

䕿

㽢

䕿

㽢

㽢

㽢

ᕪศ

ᕪศ

ᕪศ ᕪศ

͙͙

ίʔυΫϩʔϯ಺ͷม਺͕ߦʹରԠ͢ΔදΛߟ͑Δɽදͷ֎෦ཁૉҰக൑ఆͷͨΊͷද

ᕪศ

ᕪศ ᕪศ

ཁૉΛ௚઀ɼ΋͘͠͸ਪҠతʹࢀর͢Δͱ͖ɼͦͷରԠ͢c 2012 Information Processing Society of Japan

5৘ใॲཧֶձ‫ڀݚ‬ใࠂ
IPSJ SIG Technical ReportϭϬϬ͘ϬϬйϲϬϬϱϬϬϴϬ͘ϬϬй

ZEZфϬ͘ϱ䞁䝉䝑䝖ᩘϳϬ͘ϬϬй

ϰϬϬ

ZEZхсϬ͘ϱϯϬϬ⣼✚ й;ZEZфϬ͘ϱͿϲϬ͘ϬϬй
ϱϬ͘ϬϬй
ϰϬ͘ϬϬй⣼✚ й;ZEZхсϬ͘ϱͿϮϬϬϯϬ͘ϬϬй
ϮϬ͘ϬϬй

ϭϬϬϭϬ͘ϬϬй΀Ϭ͕ϰ΁΀ϱ͕ϴ΁΀ϵ͕ϭϮ΁
΀ϭϯ͕ϭϲ΁
΀ϭϳ͕ϮϬ΁
΀Ϯϭ͕Ϯϰ΁
΀Ϯϱ͕Ϯϴ΁
΀Ϯϵ͕ϯϮ΁
΀ϯϯ͕ϯϲ΁
΀ϯϳ͕ϰϬ΁
΀ϰϭ͕ϰϰ΁
΀ϰϱ͕ϰϴ΁
΀ϰϵ͕ϱϮ΁
΀ϱϯ͕ϱϲ΁
΀ϱϳ͕ϲϬ΁
΀ϲϭ͕ϲϰ΁
΀ϲϱ͕ϲϴ΁
΀ϲϵ͕ϳϮ΁
΀ϳϯ͕ϳϲ΁
΀ϳϳ͕ϴϬ΁
΀ϴϭ͕ϴϰ΁
΀ϴϱ͕ϴϴ΁
΀ϴϵ͕ϵϮ΁
΀ϵϯ͕ϵϲ΁
΀ϵϳ͕ϭϬϬ΁
΀ϭϬϭ͕ϭϬϰ΁

Ϭ

Ϭ͘ϬϬй

ϯϬϬ

ϭϬϬ͘ϬϬйϵϬ͘ϬϬй

䜽
䝻 ϮϱϬ

ᕪศ䛺䛧
ᕪศ䛒䜚

ϳϬ͘ϬϬй

䞁 ϮϬϬ
䝉
䝑 ϭϱϬ
䝖
ϭϬϬ
䛾
ᩘ ϱϬ

⣼✚ й䠄ᕪศ䛒䜚䠅ϲϬ͘ϬϬй

呎

呎

䜽
䝻

ϯϱϬ

ϵϬ͘ϬϬй⣼✚ й䠄ᕪศ䛺䛧䠅ϱϬ͘ϬϬй
ϰϬ͘ϬϬй
ϯϬ͘ϬϬй
ϮϬ͘ϬϬй
ϭϬ͘ϬϬй

Ϭ䜽䝻䞊䞁䝉䝑䝖䛾እ㒊せ⣲䛾ᩘϴϬ͘ϬϬй

Ϭ͘ϬϬй䜽䝻䞊䞁䝉䝑䝖䛾እ㒊せ⣲䛾ᩘ

ਤ 4 jEdit ʹ͓͚Δ֎෦ཁૉ͝ͱͷΫϩʔϯηοτͷ਺ਤ 6

ArgoUML ʹ͓͚Δ֎෦ཁૉͷ਺ʹର͢Δ RNR ͕ 0.5 Ҏ্ͷΫϩʔϯηοτͷ‫ͦͱ਺ݸ‬ͷࠩ෼ͷ༗ແʹΑΔ಺༁ϰϱϬϭϬϬ͘ϬϬйϰϬϬϵϬ͘ϬϬй

ϯϱϬϴϬ͘ϬϬй

ZEZфϬ͘ϱ䜽 ϯϬϬ䝻ϳϬ͘ϬϬй

ZEZхсϬ͘ϱ

䞁 ϮϬϬ
䝉 ϭϱϬ
䝑
ϭϬϬ
䝖
ᩘ ϱϬ

⣼✚ й䠄ZEZфϬ͘ϱ㸧ϲϬ͘ϬϬйϮϬϬ䜽䝻ϱϬ͘ϬϬй
ϰϬ͘ϬϬй

䞁
䝉 ϭϬϬ
䝑
ϱϬ
䝖
ᩘ

ϯϬ͘ϬϬй
ϮϬ͘ϬϬй
ϭϬ͘ϬϬйϬϮϱϬ呎⣼✚ й䠄ZEZхсϬ͘ϱ㸧

呎

ϮϱϬ

ϭϱϬ

ϵϬ͘ϬϬйᕪศ䛺䛧ᕪศ䛒䜚⣼✚ й䠄ᕪศ䛒䜚䠅⣼✚ й䠄ᕪศ䛺䛧䠅ϴϬ͘ϬϬй
ϳϬ͘ϬϬй
ϲϬ͘ϬϬй
ϱϬ͘ϬϬй
ϰϬ͘ϬϬй
ϯϬ͘ϬϬй
ϮϬ͘ϬϬй
ϭϬ͘ϬϬй

Ϭ

Ϭ͘ϬϬй

Ϭ͘ϬϬй

䜽䝻䞊䞁䝉䝑䝖䛾እ㒊せ⣲䛾ᩘ䜽䝻䞊䞁䝉䝑䝖䛾እ㒊せ⣲䛾ᩘਤ 5ϭϬϬ͘ϬϬйϯϬϬ

muCommander ʹ͓͚Δ֎෦ཁૉ͝ͱͷΫϩʔϯηοτͷ਺ਤ 7

jEdit ʹ͓͚Δ֎෦ཁૉͷ਺ʹର͢Δ RNR ͕ 0.5 Ҏ্ͷΫϩʔϯηοτͷ‫ͦͱ਺ݸ‬ͷࠩ෼ͷ༗ແʹΑΔ಺༁

ਤ 3ʙਤ 5 ͰΘ͔Δ͜ͱͱͯ͠ɼ֤ϓϩδΣΫτʹ͓͍ϭϲϬϭϬϬ͘ϬϬйͯɼ֎෦ཁૉ͕ 12 ‫ݸ‬ҎԼͱͳΔΫϩʔϯηοτ͸શମͷϭϰϬϵϬ͘ϬϬй

্ͷ৔߹ʹ͓͍ͯ΋ಉ༷Ͱ͋ͬͨɽͦͷͨΊɼࣗಈੜ੒͞
Ε͔ͨʹؔ܎ͳ͘ɼΫϩʔϯηοτ͸ଟ͘ͷ৔߹ 12 ‫ݸ‬ҎԼͷ֎෦ཁૉΛ࣋ͭͱ͍͑Δɽ呎

70% Ҏ্Λ઎Ί͍ͯͨɽ·ͨɼ͜ͷ܏޲͸ RNR ͕ 0.5 Ҏ

䜽 ϭϮϬ
䝻
ϭϬϬ

䞁 ϴϬ
䝉
䝑 ϲϬ
䝖 ϰϬ
ᩘ

ϴϬ͘ϬϬй
ᕪศ䛺䛧ϳϬ͘ϬϬй

ᕪศ䛒䜚ϲϬ͘ϬϬй⣼✚ й䠄ᕪศ䛒䜚䠅⣼✚ й䠄ᕪศ䛺䛧䠅಺ϒϩοΫͷछྨผͷස౓Λද 4 ʹࣔ͢ɽද 4 ͔ΒɼଟϯϬ͘ϬϬй
ϭϬ͘ϬϬй

΀Ϭ͕Ϯ΁
΀ϯ͕ϰ΁
΀ϱ͕ϲ΁
΀ϳ͕ϴ΁
΀ϵ͕ϭϬ΁
΀ϭϭ͕ϭϮ΁
΀ϭϯ͕ϭϰ΁
΀ϭϱ͕ϭϲ΁
΀ϭϳ͕ϭϴ΁
΀ϭϵ͕ϮϬ΁
΀Ϯϭ͕ϮϮ΁
΀Ϯϯ͕Ϯϰ΁
΀Ϯϱ͕Ϯϲ΁
΀Ϯϳ͕Ϯϴ΁
΀Ϯϵ͕ϯϬ΁
΀ϯϭ͕ϯϮ΁
΀ϯϯ͕ϯϰ΁
΀ϯϱ͕ϯϲ΁
΀ϯϳ͕ϯϴ΁
΀ϯϵ͕ϰϬ΁
΀ϰϭ͕ϰϮ΁
΀ϰϯ͕ϰϰ΁
΀ϰϱ͕ϰϲ΁
΀ϰϳ͕ϰϴ΁
΀ϰϵ͕ϱϬ΁
΀ϱϭ͕䡚Ϳ

ௐࠪର৅ͷϓϩδΣΫτʹ͓͚Δ֤ίʔυΫϩʔϯͷ࠷ϰϬ͘ϬϬй
ϮϬ͘ϬϬй

ϮϬϬϱϬ͘ϬϬй

Ϭ͘ϬϬй䜽䝻䞊䞁䝉䝑䝖䛾እ㒊せ⣲䛾ᩘ͘ͷ৔߹ɼେ൒ͷ࠷಺ϒϩοΫ͸ϝιουͱͳ͍ͬͯΔɽ͜Ε͸ɼίʔυΫϩʔϯ͕ϝιου಺ʹด͡Δ੍‫ޚ‬ϒϩοΫ಺ʹͳ͍৔߹͕ଟ͍͜ͱΛ͍ࣔͯ͠Δɽ͔͠͠ɼίʔυ

ਤ 8 muCommander ʹ͓͚Δ֎෦ཁૉͷ਺ʹର͢Δ RNR ͕ 0.5
Ҏ্ͷΫϩʔϯηοτͷ‫ͦͱ਺ݸ‬ͷࠩ෼ͷ༗ແʹΑΔ಺༁Ϋϩʔϯ͕ϝιου಺ͷ੍‫ޚ‬ϒϩοΫ಺ʹ͋Δ৔߹ʹ͸ɼ

3.4.2 RQ2ɿ֤ίʔυΫϩʔϯͷपลίʔυ͸ɼಉҰͷif ΍ switch Ͱߏ੒͞ΕΔ੍‫ޚ‬ϒϩοΫ͕࠷಺੍‫ޚ‬ϒϩοΫϩʔϯηοτͷதͰͲΕ͚ͩҰக͢Δ͔

ΫͱͳΔ͜ͱ͕ଟ͔ͬͨɽҎ্ͷ݁Ռ͔Β RQ1 ΁ͷ౴͑

RQ2 ʹ౴͑ΔͨΊɼௐࠪର৅ͷ֤ϓϩδΣΫτʹ͍ͭ͸ʮΫϩʔϯηοτ͸ଟ͘ͷ৔߹ɼগ਺ͷ֎෦ཁૉΛ࣋ͪɼ

ͯɼRNR ͕ 0.5 Ҏ্ͷΫϩʔϯηοτͷ͏ͪɼ֎෦ཁૉ

·ͨɼif ΍ switch ʹΑΔ࠷಺੍‫ޚ‬ϒϩοΫΛ࣋ͭ͜ͱ͕͋

ʹࠩ෼͕͋Δ৔߹ͱͳ͍৔߹͕ͦΕͧΕ͍ͭ͋͘Δ͔ɼ·ΔʯͱͳΔɽ

ͨɼࠩ෼͕͋Δ৔߹ม਺໊ʹҧ͍͕͋Δ͔Λௐ΂ͨɽ֎෦ཁૉͷ਺͝ͱͷ֎෦ཁૉʹࠩ෼ͷ͋ΔΫϩʔϯηο

ද 4 ࠷಺ϒϩοΫͷछྨͱස౓
ϓϩδΣΫτ໊ϝιου
ifswitch forτͷ਺ͱࠩ෼ͷͳ͍Ϋϩʔϯηοτͷ਺Λௐ΂ͨ݁Ռͷ͏
while

ͪɼArgoUMLɼjEditɼmuCommander ʹ͍ͭͯͷ݁ՌΛ

ArgoUML

3989

1012

225

13

37

DataCrow

4860

527

92

6

55

ͦΕͧΕਤ 6ɼਤ 7ɼਤ 8 ʹࣔ͢ɽ͜ΕΒͷਤ͔Β‫ڞ‬௨͠

jEdit

2822

596

97

76

1123

jwebmail

197

37

19

0

2

LaTeXDraw

6745

354

18

15

374

֎෦ཁૉͷ͏ͪɼࠩ෼ͱͳΔ΋ͷ͕઎ΊΔׂ߹͝ͱͷΫ

muCommander

2432

710

48

18

178

ϩʔϯηοτͷ਺ΛɼRNR ͕ 0.5 ະຬɼRNR ͕ 0.5 Ҏ্͔SweetHome3D

3510

4661

30

1

15

ͭม਺໊͕ಉ͡Ͱͳ͍৔߹ɼRNR ͕ 0.5 Ҏ্͔ͭม਺໊͕

c 2012 Information Processing Society of Japanͯɼ֎෦ཁૉ͕গ਺Ͱ͋Δͱ͖ɼΫϩʔϯηοτͷ֎෦ཁૉʹࠩ෼͕ͳ͍৔߹͕ଟ͘ͳ͍ͬͯΔɽ

6

৘ใॲཧֶձ‫ڀݚ‬ใࠂ
IPSJ SIG Technical Report
ϳϬϬ

呎

ϱϬϬ

䞁
䝉
䝑
䝖
䛾
ᩘ

ϰϬϬ

τ΋ଘࡏ͢ΔʯͱͳΔɽ

ZEZфϬ͘ϱ䜽 ϲϬϬ
䝻

ZEZхсϬ͘ϱΘኚᩘྡ䛜ྠ䛨䛷䛺䛔
ZEZхсϬ͘ϱΘ䛩䜉䛶䛾ኚᩘྡ䛜ྠ䛨

3.5 ߟ࡯

ϯϬϬ

RQ1 ͱ RQ2 ʹର͢Δ౴͔͑Βɼଟ͘ͷΫϩʔϯηοτϮϬϬʹ֎෦ཁૉ͕ଘࡏ͠ɼͦΕΒʹࠩ෼͕͋Δ͜ͱ͕ଟ͍ͱ͍

ϭϬϬ
Ϭ
Ϭ

Ϭ͘ϭ

Ϭ͘Ϯ

Ϭ͘ϯ

Ϭ͘ϰ

Ϭ͘ϱ

Ϭ͘ϲ

Ϭ͘ϳ

Ϭ͘ϴ

Ϭ͘ϵ

ϭ

እ㒊せ⣲䛾ᕪศ䛻䛺䜛๭ྜਤ 9

ArgoUML ʹ͓͚Δࠩ෼ͱͳΔ֎෦ཁૉ͕֎෦ཁૉશମʹ઎͏͜ͱ͕Θ͔ͬͨɽ·ͨɼ࠷಺੍‫ޚ‬ϒϩοΫΛ࣋ͭίʔυΫϩʔϯ΋͋ΓɼΫϩʔϯηοτ಺ͰͦΕΒͷ࠷಺੍‫ޚ‬ϒϩοΫ͕౷Ұ͞Ε͍ͯͳ͍ࣄྫ΋͋ͬͨɽ͜ͷ͜ͱ͔ΒɼΊΔׂ߹͝ͱͷΫϩʔϯηοτͷ‫ͱ਺ݸ‬ɼRNR ͱม਺໊ͷҰίʔυΫϩʔϯ͸ଟ͘ͷ৔߹ɼͦͷपลίʔυʹґଘͯ͠கʹΑΔ಺༁

͓ΓɼΫϩʔϯηοτ಺Ͱ͋ͬͯ΋पลίʔυ͕ҟͳΔͱ
͍͑Δɽ

ϲϬϬ

·ͨɼRQ2 ͷ݁ՌΑΓɼ֎෦ཁૉ͕͢΂ͯࠩ෼ʹͳΔ

ZEZфϬ͘ϱ

呎

䜽 ϱϬϬ
䝻

ZEZхсϬ͘ϱΘኚᩘྡ䛜ྠ䛨䛷䛺䛔ϰϬϬΫϩʔϯηοτͰ͋ͬͨͱͯ͠΋ɼͦͷΫϩʔϯηοτʹ

ZEZхсϬ͘ϱΘ䛩䜉䛶䛾ኚᩘྡ䛜ྠ䛨

䞁 ϯϬϬ
䝉
䝑 ϮϬϬ
䝖 ϭϬϬ
ᩘ

‫·ؚ‬ΕΔશͯͷίʔυΫϩʔϯͷม਺໊͕ಉ͡Ͱ͋Δ৔߹
͕͋ͬͨɽ͜ΕΒͷίʔυΫϩʔϯʹ͸։ൃऀ͕‫࣌ͨݟ‬ɼίʔυͷจ໘͕ྨࣅ͍ͯ͠ΔͨΊɼಉ͡ॲཧΛߦ͍ͬͯΔ

Ϭ
Ϭ

Ϭ͘ϭ

Ϭ͘Ϯ

Ϭ͘ϯ

Ϭ͘ϰ

Ϭ͘ϱ

Ϭ͘ϲ

Ϭ͘ϳ

Ϭ͘ϴ

Ϭ͘ϵ

ϭ

እ㒊せ⣲䛾ᕪศ䛻䛺䜛๭ྜਤ 10ͱ൑அ͞Ε΍͘͢ɼ‫ͨͬޡ‬ཧղΛҾ͖‫͢͜ى‬Մೳੑ͕͋ΔɽҎ্ͷ͜ͱ͔ΒɼίʔυΫϩʔϯΛਖ਼֬ʹཧղ͢ΔͨΊ

jEdit ʹ͓͚Δࠩ෼ͱͳΔ֎෦ཁૉ͕֎෦ཁૉશମʹ઎ΊΔʹɼίʔυΫϩʔϯͷपลίʔυΛௐࠪ͢ΔͨΊͷπʔϧׂ߹͝ͱͷΫϩʔϯηοτͷ‫ͱ਺ݸ‬ɼRNR ͱม਺໊ͷҰக͕ඞཁͰ͸ͳ͍͔ͱߟ͑ΔɽʹΑΔ಺༁

3.6 ଥ౰ੑ

ϯϱϬຊௐࠪͰ͸̓ͭͷΦʔϓϯιʔειϑτ΢ΣΞΛ࣮‫ݧ‬ର

ZEZфϬ͘ϱ

呎

䜽 ϯϬϬ
䝻 ϮϱϬ

䞁 ϮϬϬ
䝉 ϭϱϬ
䝑 ϭϬϬ
䝖
ᩘ ϱϬ

ZEZхсϬ͘ϱΘኚᩘྡ䛜ྠ䛨䛷䛺䛔৅ͱͯ͠ར༻͠ɼίʔυΫϩʔϯͷपลίʔυ΁ͷґଘੑ

ZEZхсϬ͘ϱΘ䛩䜉䛶䛾ኚᩘྡ䛜ྠ䛨Λௐࠪͨ͠ɽΦʔϓϯιʔειϑτ΢ΣΞશମ͔Βߟ͑Δͱɼ࢖༻ͨ͠ιϑτ΢ΣΞͷ਺͸খ͍ͨ͞Ίɼຊௐ͔ࠪΒಘΒΕͨ݁ՌΛҰൠԽ͢Δͷ͸೉͍͠ɽ͔͠͠ͳ͕Βɼ࢖

Ϭ
Ϭ

ਤ 11

Ϭ͘ϭ

Ϭ͘Ϯ

Ϭ͘ϯ

Ϭ͘ϰ

Ϭ͘ϱ

Ϭ͘ϲ

Ϭ͘ϳ

እ㒊せ⣲䛾ᕪศ䛻䛺䜛๭ྜ

Ϭ͘ϴ

Ϭ͘ϵ

ϭ

muCommander ʹ͓͚Δࠩ෼ͱͳΔ֎෦ཁૉ͕֎෦ཁૉશ

༻ͨ͠ιϑτ΢ΣΞ͢΂ͯͰಉ༷ͷ܏޲Λ֬ೝͰ͖͓ͯ
Γɼଞͷιϑτ΢ΣΞͰ΋ྨࣅͨ͠܏޲Λ‫ݟ‬Δ͜ͱ͕Ͱ͖
ΔͷͰ͸ͳ͍͔ͱߟ͑Δɽମʹ઎ΊΔׂ߹͝ͱͷΫϩʔϯηοτͷ‫ͱ਺ݸ‬ɼRNR ͱม਺໊ͷҰகʹΑΔ಺༁

4. ؔ࿈‫ڀݚ‬

ಉ͡Ͱ͋Δ৔߹ʹ෼͚ͨ݁Ռʹ͍ͭͯɼArgoUMLɼjEditɼຊ‫ͱڀݚ‬ಉ༷ʹίʔυΫϩʔϯͷपลίʔυʹண໨ͨ͠

muCommander ʹ͍ͭͯͷ݁ՌΛͦΕͧΕਤ 9ɼਤ 10ɼ‫ ͯ͠ͱڀݚ‬Jiang Β [3] ͷ‫͕͋ڀݚ‬ΔɽJiang Β͸ɼίʔυ

ਤ 11 ʹࣔ͢ɽ͜ΕΒͷਤͰ͸ɼ‫ڞ‬௨ͯ͠ɼࠩ෼͕઎ΊΔΫϩʔϯಉ࢜ͷपลίʔυΛൺֱ͠ɼෆҰக͕ੜͨ͡৔߹ɼ

ׂ߹͕ 0 ͷ৔߹ͱɼ0.9 ΑΓେ͖̍͘ҎԼͰ͋Δ৔߹ʹΫόάͷՄೳੑ͕͋Δͱओு͍ͯ͠Δɽ·ͨɼपลίʔυͷϩʔϯηοτ͕ूத͍ͯ͠Δɽ·ͨɼׂ߹͕ 0.9 ΑΓେ͖ෆҰகͷ෼ྨͳͲΛఆ͍ٛͯ͠ΔɽJiang Β͸पลίʔυ͍৔߹Ͱ͋ͬͯ΋ɼม਺͕ಉ͡Ͱ͋Δ৔߹΍ɼׂ߹͕ 0 ͷͱͯ͠ɼίʔυΫϩʔϯ‫ؚ‬ΉΛ࠷಺੍‫ޚ‬ϒϩοΫΛࢦఆ͠৔߹Ͱ΋ม਺໊͕ಉ͡Ͱͳ͍ͱ͍͏৔߹͕͋ͬͨɽ
֤ϓϩδΣΫτʹ͓͚Δ࠷಺ϒϩοΫ͕ҟͳΔΫϩʔϯ

ද 5

ද 5 Ͱ͸ɼ࠷಺੍‫ޚ‬ϒϩοΫ͕ҟͳΔΫϩʔϯηοτ͕

6ʙ25% ଘࡏͨ͜͠ͱΛ͓ࣔͯ͠ΓɼͲͷϓϩδΣΫτʹ
͓͍ͯ΋ɼ࠷಺ϒϩοΫ͕ҟͳΔΫϩʔϯηοτ͕‫·ؚ‬Ε͍ͯΔͱ͍͑ΔɽҎ্ͷ݁Ռ͔ΒɼRQ2 ʹର͢Δ౴͑͸ʮ֎෦ཁૉ͕Ұக֤ϓϩδΣΫτʹର͢Δ࠷಺ϒϩοΫ͕ҟͳΔΫϩʔϯηοτ਺ηοτͷ਺ͱɼશମʹ઎ΊΔׂ߹Λද 5 ʹࣔ͢ɽϓϩδΣΫτ໊શମҟͳΔύʔηϯτ (%)

ArgoUML

1360

130

9

DataCrow

1137

79

7

jEdit

1242

112

9

jwebmail

113

7

6

LaTeXDraw

967

244

25

͢Δ৔߹͕ଟ͍͕ɼ΄ͱΜͲҟͳΔ৔߹΋ಉ༷ʹଟ͍ɽ·

muCommander

943

40

4

ͨɼ࠷಺ϒϩοΫʹ͍ͭͯ͸ɼҟͳ͍ͬͯΔΫϩʔϯηο

SweetHome3D

1569

169

11

c 2012 Information Processing Society of Japan

7৘ใॲཧֶձ‫ڀݚ‬ใࠂ
IPSJ SIG Technical Report͍ͯΔɽͦΕʹରͯ͠ɼຊ‫Ͱڀݚ‬͸ɼपลίʔυͱͯ͠࠷಺੍‫ޚ‬ϒϩοΫʹՃ͑ɼίʔυΫϩʔϯ಺ʹଘࡏ͢Δม਺ͷσʔλϑϩʔʹग़‫͢ݱ‬Δ֎෦ཁૉ΋ࢦఆ͍ͯ͠Δɽ

[7]

Jiang Β͸ίʔυΫϩʔϯͷपลίʔυͷෆҰகΛར༻ͯ͠ɼόά͕͋Γͦ͏ͳͱ͜ΖΛಛఆ͠ɼϑΟϧλϦϯά
Λ͔͚ɼ݁ՌΛ։ൃऀʹఏ‫͍ͯ͠ڙ‬ΔɽͦΕʹର͠ɼຊ‫ݚ‬[8]‫Ͱڀ‬͸ɼιϑτ΢ΣΞʹଘࡏ͢Δ֤ίʔυΫϩʔϯͷपลίʔυΛղੳ͠ɼ֤पลίʔυͷҧ͍΍ɼपลίʔυ͔Β[9]ίʔυΫϩʔϯ΁༩͑ΔӨ‫ڹ‬Λௐ͍ࠪͯ͠Δɽ

Xing Β [20] ͸ίʔυΫϩʔϯΛ‫ݕ‬ग़͠ɼΫϩʔϯηο

[10]τ಺ͷબ୒͞ΕͨίʔυΫϩʔϯಉ࢜ͷϓϩάϥϜґଘάϥϑΛൺֱ͢Δ͜ͱͰίʔυΫϩʔϯͱͦͷपΓͷίʔυͷσʔλϑϩʔͱ੍‫ޚ‬ϑϩʔͷࠩΛಛఆ͢Δख๏ΛఏҊ͍ͯ͠ΔɽͦΕʹର͠ɼຊ‫ڀݚ‬͸ίʔυΫϩʔϯͷσʔλϑ[11]ϩʔͷࠩͱͯ͠ɼσʔλϑϩʔͦͷ΋ͷͷࠩͰ͸ͳͯ͘ɼσʔλϑϩʔͷ‫ͳͱݩ‬Δ֎෦ཁૉΛൺֱ͍ͯ͠Δɽ[12]

5. ·ͱΊͱࠓ‫ޙ‬ͷ՝୊ຊ‫Ͱڀݚ‬͸ɼίʔυΫϩʔϯͷपลίʔυ΁ͷґଘੑΛ

[13]ௐࠪͨ͠ɽ࣮‫ݧ‬ର৅ͱͯ͠ 7 ͭͷΦʔϓϯιʔειϑτ΢ΣΞΛ༻͍ͯௐࠪͨ݁͠ՌɼίʔυΫϩʔϯʹ͸पลίʔυ͕ଘࡏ͢Δ͜ͱ͕ଟ͘ɼίʔυΫϩʔϯؒͰपล[14]ίʔυ͕ҟͳΔ৔߹΋ଟ͘ଘࡏ͍ͯͨ͠ɽ·ͨɼ֎෦ཁૉ
͕͢΂ͯࠩ෼ʹͳΔΫϩʔϯηοτͰ͋ͬͨͱͯ͠΋ɼͦͷΫϩʔϯηοτʹ‫·ؚ‬ΕΔશͯͷίʔυΫϩʔϯͷม਺

[15]໊͕ಉ͡Ͱ͋Δ৔߹͕͋ͬͨɽ
ࠓ‫ޙ‬ͷ՝୊ͱͯ͠ɼίʔυΫϩʔϯͷपลίʔυΛௐࠪ͢ΔͨΊͷπʔϧΛߏங͠ɼ࣮ࡍͷιϑτ΢ΣΞ։ൃ΁ద༻ͯ͠ධՁ͢Δ͜ͱ͕‫͛ڍ‬ΒΕΔɽँࣙ ຊ‫ڀݚ‬͸Պ‫ݚ‬අʢ՝୊൪߸:23680001ɼ24700029ʣ
ͷॿ੒Λड͚ͨ΋ͷͰ͋Δɽ

[16]

[17]

ࢀߟจ‫ݙ‬
[1]

[2]

[3]

[4]

[5]
[6]

ං‫ޙ‬๕थɼೇຊਅೋɼҪ্ࠀ࿠ɿίʔυΫϩʔϯ‫ݕ‬ग़ͱͦͷؔ࿈ٕज़ɼిࢠ৘ใ௨৴ֶձ࿦จࢽɼVol. J91-D, No. 6,
pp. 1465–1481 (2008).
Kapser, C. J. and Godfrey, M. W.: ʠCloning consideredharmfulʡconsidered harmful: patterns of cloning in softwareɼEmpirical Software Engineering, Vol. 13, No. 6,
pp. 645–692 (2008).
Jiang, L., Su, Z. and Chiu, E.: Context-based detectionof clone-related bugs, Proceedings of the the 6th joint
meeting of the European software engineering conference and the ACM SIGSOFT symposium on The foundations of software engineering.
Krinke, J.: Is cloned code older than non-cloned code?,
IWSC ’11 Proceedings of the 5th International Workshop on Software Clones.
Harder, J. and Gode, N.: Cloned code: stable code,
Journal of Software: Evolution and Process (2012).
Bellon, S., Koschke, R., Antoniola, G., Krinke, J. andMerlo, E.: Comparison and Evaluation of Clone De-

c 2012 Information Processing Society of Japan


[18]

[19]

[20]

tection Tools, IEEE Transaction Software Engineering,Vol. 33, No. 9, pp. 577–591 (2007).
Baxter, I., Yahin, A., Moura, L., Anna, M. S. and Bier,
L.: Clone detection using abstract syntax trees, Proceedings of International Conference on Software Maintenance ’98, pp. 368–377 (1998).
Roy, C. and Cordy, J.: A survey on software clone detection research, Technical report, Queen’s University atKingston (2007).
Koschke, R.: Survey of research on software clones,
Duplication, Redundancy, and Similarity in Software,
Dagstuhl Seminar Proceedings (2007).
Jarzabek, S. and Li, S.: Eliminating redundancies witha ʡcomposition with adaptationʡ meta-programming
techniqueɼEuropean Software Engineering Conference
and Foundations of Software Engineering, pp. 96–105(2003).
Rajapakse, D. and Jarzabek, S.: Using server pages tounify clones in web applications: A trade-oﬀ analysis,
International Conference on Software Engineering, pp.
116–126 (2007).
Prechelt, L., Malpohl, G. and Philippsen., M.: Finding
plagiarisms among a set of programs with JPlag, Journal of Universal Computer Science, Vol. 8, No. 11, pp.
1016–1038 (2002).
Li, Z., Lu, S., Myagmar, S. and Zhou, Y.: CP-Miner:
Finding copy-paste and related bugs in large-scale software code, IEEE Transaction Software Engineering,Vol. 32, No. 3, pp. 176–192 (2006).
Basit, H. and Jarzabek, S.: Detecting higher-level similarity patterns in programs, Proceedings of ACM SIGSOFT Symposium on the Foundations of Software Engineering, pp. 156–165 (2005).
Mayrand, J., Leblanc, C. and Merlo, E.: Experimenton the automatic detection of function clones in a software system using metrics, Proceedings of International
Conference on Software Maintenance ’96, pp. 244–253(1996).
Kontogiannisa, K., DeMori, R., Merlo, E., Galler, M. and
M.Bernstein: Experiment on the automatic detection offunction clones in a software system using metrics, Automated Software Engineering, Vol. 3, pp. 77–108 (1996).
Kamiya, T., Kusumoto, S. and Inoue, K.: CCFinder: A
multilinguistic token-based code clone detection system
for large scale source code, IEEE Transaction Software
Engineering, Vol. 28, No. 1, pp. 654–670 (2002).
Higo, Y., Kamiya, T., Kusumoto, S. and Inoue, K.:
Method and Implementation for Investigating CodeClones in a Soft-ware System, Information and Software
Technology, Vol. 49, No. 9-10, pp. 985–998 (2007).
Ishio, T., Etsuda, S. and Inoue, K.: A Lightweight
Visualization of Interprocedural Data-Flow Paths for
Source Code Reading, Proceedings of the 20th International Conference on Program Comprehension, pp.
37–46 (2012).
Xing, Z., Xue, Y. and Jarzabek, S.: CloneDiﬀerentiator:
Analyzing clones by diﬀerentiation, ASE ’11 Proceedings of the 2011 26th IEEE/ACM International Conference on Automated Software Engineering, pp. 576–
579 (2011).

8