Vol.2017-SE-197 No.3
2017/11/9৘ใॲཧֶձ‫ڀݚ‬ใࠂ
IPSJ SIG Technical Report։ൃ࡞‫ۀ‬ͷϞχλϦϯάʹΑΔίʔυΫϩʔϯू໿ࢧԉ‫ڥ؀‬ͷߏஙপా ੟໵1,a)٢ా ଇ༟2

ቐ Ըಬ3Ҫ্ ࠀ࿠1֓ཁɿίʔυΫϩʔϯͱ͸ɼιʔείʔυதʹଘࡏ͢ΔಉҰɼ͋Δ͍͸ྨࣅͨ͠ίʔυยΛҙຯ͢Δɽ·ͨɼιʔείʔυதʹଘࡏ͢ΔίʔυΫϩʔϯͷू߹Λ୯Ұͷؔ਺ʹ·ͱΊΔ͜ͱΛίʔυΫϩʔϯͷू໿ͱ͍͏ɽຊ‫ڀݚ‬͸ɼEclipse ্ͰߦΘΕͨ։ൃ࡞‫ۀ‬Λ෼ੳ͢Δ͜ͱͰɼίʔυΫϩʔϯͷू໿Λࢧԉ͢Δ‫ڥ؀‬Λߏங͢Δɽ۩ମతʹ͸ɼ։ൃ࡞‫͔ۀ‬Βϝιουநग़ͷू໿ύλʔϯΛ‫͚ͭݟ‬ɼͦͷநग़͢ΔίʔυยͷίʔυΫϩʔϯΛ։ൃऀʹఏࣔ͠ɼಉ࣌ʹू໿Λ‫ݕ‬౼͢Δ͜ͱΛଅ͢ɽຊ‫ʹڥ؀‬ΑΓɼอकੑͷߴ͍ιʔείʔυ։ൃ͕‫ظ‬଴Ͱ͖ΔɽΩʔϫʔυɿίʔυΫϩʔϯɼίʔυΫϩʔϯͷू໿ɼϝιουநग़ɼϞχλϦϯά

Development of a Code Clone Refactoring Environment
by Monitoring Development TasksSeiya Numata1,a)Norihiro Yoshida2

1. ·͕͖͑

Eunjong Choi3

Katsuro Inoue1ར༻͢Δɽ‫ʹͰ·ࡏݱ‬ɼιʔείʔυ͔ΒίʔυΫϩʔϯΛࣗಈ‫ݕ‬ग़͢Δख๏͸਺ଟ͘ఏҊ͞Ε͍ͯΔ [8]ɽιϑτ΢ΣΞ։ൃʹ͔͔ΔίετΛ૿େ͍ͤͯ͞ΔཁҼɹίʔυΫϩʔϯʹର͢Δ։ൃίετΛ࡟‫͢ݮ‬Δํ๏ͷ

ͷ 1 ͭͱͯ͠ɼιʔείʔυதͷίʔυΫϩʔϯ͕‫͛ڍ‬

1 ͭͱͯ͠ɼίʔυΫϩʔϯͷϦϑΝΫλϦϯά͕‫͛ڍ‬ΒΒΕΔɽίʔυΫϩʔϯͱ͸ɼιʔείʔυதʹଘࡏ͢Δ

ΕΔ [7][9]ɽίʔυΫϩʔϯʹର͢ΔϦϑΝΫλϦϯάʹɼಉҰɼ͋Δ͍͸ྨࣅͨ͠෦෼Λ࣋ͭίʔυยΛҙຯ͠ɼओίʔυΫϩʔϯͷू໿͕͋ΔɽίʔυΫϩʔϯͷू໿ͱʹ‫ط‬ଘͷίʔυยͷίϐʔΞϯυϖʔετʹΑͬͯੜ੒͞͸ɼίʔυΫϩʔϯͷू߹Λ୯Ұͷؔ਺ʹ·ͱΊΔ͜ͱͰΕΔ [1][2][6]ɽྫ͑͹ɼ͋Δίʔυยʹ͕ܽؕ‫͔ͨͬͭݟ‬͋ΔɽίʔυΫϩʔϯͷू໿Λద੾ʹߦ͏͜ͱͰɼίʔυ৔߹ɼͦͷίʔυยͷίʔυΫϩʔϯʹ΋ಉ༷ͷ͕ܽؕ‫ؚ‬Ϋϩʔϯͷमਖ਼ʹ͔͔ΔίετΛ࡟‫͢ݮ‬Δ͜ͱ͕Ͱ͖Δɽ

·ΕΔՄೳੑ͕ߴ͍ [14]ɽͦ͜Ͱɼ։ൃऀ͸ίʔυΫϩʔɹ͜Ε·Ͱʹɼιʔείʔυத͔ΒϦϑΝΫλϦϯάର৅ϯʹ͕ܽؕ‫͔ͨͬͭݟ‬৔߹ɼಉҰΫϩʔϯηοτʢ‫ʹ͍ޓ‬ͷίʔυΫϩʔϯΛࣗಈநग़͢Δ͜ͱͰɼίʔυΫϩʔϯίʔυΫϩʔϯͱͳ͍ͬͯΔίʔυยͷू߹ʣ಺ʹ‫·ؚ‬ΕΛର৅ͱͨ͠ϦϑΝΫλϦϯάࢧԉΛߦ͏ख๏͕ఏҊ͞ΕΔશͯͷίʔυΫϩʔϯରͯ͠ಉ༷ͷमਖ਼Λ‫ݕ‬౼͢Δඞཁ͍ͯΔ [3][18][17]ɽϦϑΝΫλϦϯάࢧԉख๏ʹ͸ɼ༏Ε͕ͨ͋Δ͕ɼ͢΂ͯͷίʔυΫϩʔϯΛ։ൃऀ͕ख࡞‫ݟͰۀ‬ϦϑΝΫλϦϯάީิΛఏࣔͰ͖Δ͚ͩͰͳ͘ɼ։ൃऀͷ͚ͭͯ؅ཧ͢Δͷ͸ࠔ೉Ͱ͋ΔɽͦͷͨΊɼ։ൃऀ͸ίʔ࡞‫಺ۀ‬༰ʹԠͯ͡ద੾ͳ࣌‫ࢧʹظ‬ԉΛߦ͏͜ͱ͕‫ٻ‬ΊΒΕυΫϩʔϯ؅ཧ࡞‫ۀ‬ͷͨΊʹίʔυΫϩʔϯ‫ݕ‬ग़πʔϧΛΔɽͦͷཧ༝͸ɼ։ൃऀͷ࡞‫಺ۀ‬༰ʹؔ࿈ͨ͠ϦϑΝΫλ

123a)ϦϯάΛਪન͢Δͱɼ࡞‫಺ۀ‬༰ʹؔ͢Δ‫ه‬ԱΛࢀর͠ͳ͕େࡕେֶେֶ໊‫ݹ‬԰େֶಸྑઌ୺Պֶٕज़େֶӃେֶs-numata@ist.osaka-u.ac.jp

c 2017 Information Processing Society of JapanΒޮ཰తʹϦϑΝΫλϦϯάͰ͖Δ͔ΒͰ͋Δɽ·ͨɼςετ͕‫ྃ͠׬‬ɼผ࡞‫ۀ‬Λ։࢝ͨ͠ஈ֊ͰϦϑΝΫλϦϯά1Vol.2017-SE-197 No.3
2017/11/9৘ใॲཧֶձ‫ڀݚ‬ใࠂ
IPSJ SIG Technical Reportਪનͯ͠΋ɼมߋ࡞‫ؔ͢ʹۀ‬Δ‫ه‬Ա͕ᐆດʹͳ͓ͬͯΓɼ͔ͭมߋ಺༰ͷଥ౰ੑΛ֬ೝ͢ΔͨΊͷςετΛ΍Γ௚͢ඞ
ཁ͕͋ΔͨΊɼޮ཰తͳϦϑΝΫλϦϯάʹ͔͔Δίετ͕େ͖͘ͳͬͯ͠·͏ͱ͍͏໰୊఺΋‫͛ڍ‬ΒΕΔ [15][16]ɽ
͔͠͠ɼզʑͷ஌Δ‫ݶ‬Γɼࠓ·ͰఏҊ͞Εͨख๏Ͱ͸ɼ։ൃऀͷ࡞‫಺ۀ‬༰ΛߟྀͤͣʹɼίʔυΫϩʔϯͷϦϑΝΫλϦϯάࢧԉΛߦ͍ͬͯΔɽɹ͜ͷ໰୊Λղܾ͢ΔͨΊʹ͸ɼ։ൃऀͷ࡞‫಺ۀ‬༰ʹԠͯ͡ద੾ͳ࣌‫ʹظ‬ίʔυΫϩʔϯͷϦϑΝΫλϦϯάΛࢧԉ
͢Δ͜ͱ͕ඞཁͰ͋Δɽຊ‫Ͱڀݚ‬͸ɼϝιουநग़ϦϑΝΫλϦϯάʹண໨͠ɼ։ൃऀͷ࡞‫಺ۀ‬༰ʹԠͯ͡ɼద੾ͳ࣌‫ʹظ‬ίʔυΫϩʔϯͷϦϑΝΫλϦϯάΛࢧԉ͢Δ‫ڥ؀‬Λߏங͢Δɽ۩ମతʹ͸ɼ౷߹։ൃ‫ ڥ؀‬Eclipse ্Ͱͷ։ൃऀͷιʔείʔυͷฤू࡞‫ۀ‬ΛϞχλϦϯά͢Δɽͦ͠ਤ 1 ϝιουநग़ϦϑΝΫλϦϯάͷྫ [5]ͯɼϞχλϦϯάதʹ։ൃऀ͕ϝιουநग़ϦϑΝΫλϦϯά [7] Λߦͬͨ͜ͱΛ‫ݕ‬஌͢Δͱɼͦͷϝιουநग़Ϧ

2.2 ίʔυΫϩʔϯมߋ؅ཧγεςϜ Clone NotiﬁerϑΝΫλϦϯάΛߦͬͨίʔυยͷίʔυΫϩʔϯΛ։ൃ

Clone Notiﬁer ͸ɼ൛؅ཧγεςϜͷ 2 ͭͷόʔδϣϯऀʹఏࣔ͠ɼಉ࣌ʹू໿Λ‫ݕ‬౼͢Δ͜ͱΛଅ͢ɽ͜ΕʹΑؒͷίʔυΫϩʔϯͷมߋ৘ใΛಘΔ͜ͱ͕Ͱ͖ΔπʔϧΓɼ։ൃऀ͸ͦͷ৔ͰίʔυΫϩʔϯͷଘࡏΛ஌ΓɼఏࣔͰ͋Δ [15][16]ɽίʔυΫϩʔϯͷมߋ৘ใͱ͸ɼલͷόʔ͞ΕͨίʔυΫϩʔϯʹରͯ͠ू໿࡞‫ۀ‬Λ‫ݕ‬౼͢Δ͜ͱ͕δϣϯͰ͸ίʔυΫϩʔϯͰͳ͔ͬͨ΋ͷ͕ɼ৽͍͠όʔ

Ͱ͖Δɽຊ࿦จͰ͸ɼߏங͢Δࢧԉ‫ڥ؀‬ͷઆ໌Λߦ͍ɼߏδϣϯͰ͸ίʔυΫϩʔϯʹͳͬͨΓɼ‫ʹٯ‬ɼલͷόʔδϣங‫ڥ؀‬ͷར༻ྫΛ༻͍ͳ͕Βͦͷར༻γφϦΦΛઆ໌͢ΔɽϯͰ͸ίʔυΫϩʔϯͰ͋ͬͨ΋ͷ͕ɼ৽͍͠όʔδϣϯɹҎ߱ɼ2 ষͰ͸ɼຊ‫ؔʹڀݚ‬ΘΔίʔυΫϩʔϯ͓ΑͼͰ͸ίʔυΫϩʔϯͰ͸ແ͘ͳͬͨͱ͍ͬͨɼ2 ͭͷόʔϦϑΝΫλϦϯάͷؔ࿈‫͍ͯͭʹڀݚ‬આ໌͢Δɽ3 ষͰ͸ɼδϣϯؒͷίʔυΫϩʔϯ͕Ͳ͏มߋ͞Ε͔ͨʹؔ͢Δ৘ϝιουநग़ͷू໿ύλʔϯΛ‫ݕ‬ग़͠ɼͦͷίʔυΫϩʔใͰ͋Δɽ͜ͷίʔυΫϩʔϯͷมߋ৘ใΛಘΔ͜ͱʹΑϯΛ։ൃऀʹఏࣔ͢Δࢧԉ‫ڥ؀‬ΛఏҊ͢Δɽ4 ষͰ͸ɼຊΓɺ։ൃऀ͸ίʔυΫϩʔϯʹରͯ͠ಉ࣌मਖ਼Λ‫ݕ‬౼͢Δ‫ڥ؀‬ͷ࢖͍ํΛར༻ྫΛ༻͍ͯઆ໌͢Δɽ5 ষͰ͸ɼ·ͱ͜ͱ͕Ͱ͖ɼιϑτ΢ΣΞ։ൃͷอकੑΛߴΊΔ͜ͱ͕ͰΊͱࠓ‫ޙ‬ͷ՝୊ʹ͍ͭͯઆ໌͢Δɽ

͖Δɽ͔͠͠ɼClone Notiﬁer ͸൛؅ཧγεςϜΛհͯ͠ɼ

2. ؔ࿈ٕज़ίʔυΫϩʔϯͷมߋ৘ใΛ෼ੳ͢ΔɽͦͷͨΊɼ࡞‫ۀ‬ͷ‫ޙ‬໭Γ͕ඞཁʹͳΔՄೳੑ͕ߴ͘ͳΔɽ

2.1 ίʔυΫϩʔϯ‫ݕ‬ग़πʔϧ CCFinderX‫Ͱ·ࡏݱ‬ɼؔ਺୯Ґ΍ߦ୯Ґ౳ɼ༷ʑͳཻ౓ʹ‫͍ͮج‬

2.3 ϝιουநग़ϦϑΝΫλϦϯά

ͯίʔυΫϩʔϯΛ‫ݕ‬ग़͢Δπʔϧ͕։ൃ͞Ε͖ͯͨ [8]ɽϦϑΝΫλϦϯάʹ͸༷ʑͳछྨ͕͋Δ [5]ɽຊ‫Ͱڀݚ‬

CCFinder ͸ͦͷதͰ΋ɼࣈ۟୯ҐͷίʔυΫϩʔϯΛ‫ݕ‬͸ͦͷ಺ɼϝιουநग़ϦϑΝΫλϦϯάʹண໨͢Δɽϝग़͢ΔπʔϧͰ͋ΓɼCCFinderX ͸ͦͷ CCFinder Λ֦ுιουநग़ϦϑΝΫλϦϯάͱ͸ɼͻͱ·ͱΊʹͰ͖Δͨ͠΋ͷͰ͋Δ [10]ɽࣈ۟୯Ґͷ‫ݕ‬ग़Ͱ͸ɼϓϩάϥϜͷίʔυยΛ৽ͨͳϝιουͱͯ͠ఆٛ͠ɼநग़͞Εͨίʔࣈ۟ղੳΛߦͬͨ‫ޙ‬ɼͦͷࣈ۟Λཁૉͱͨ͠‫ʹྻܥ‬ରͯ͠υยΛநग़ઌͷϝιου΁ͷ‫ͼݺ‬ग़͠จʹஔ͖‫͑׵‬ΔϦίʔυΫϩʔϯΛ‫ݕ‬ग़͢Δɽࣈ۟ղੳΛߦ͏͜ͱʹΑΓɼϑΝΫλϦϯάͰ͋Δɽຊ࿦จͰ͸ɼϝιουநग़ϦϑΝۭന΍ίϝϯτΛແࢹ͢Δ͜ͱ͕Ͱ͖Δɽ·ͨɼࣝผࢠ΍ΫλϦϯάͷ͜ͱΛ୯ʹϝιουநग़ͱ‫͢ͱͱ͜Ϳݺ‬Δɽఆ਺౳ͷಛఆͷछྨͷࣈ۟Λಛघͳ 1 ͭͷࣈ۟ʹ‫ݻ‬ఆ͢Δϝιουநग़ͷओͳ໨త͸ɼ௕͗͢Δϝιουͷ෼ׂ΍ɼ͜ͱͰɼม਺໊΍ؔ਺໊ͷมߋ͞Εͨίʔυย΋ίʔυΫෳ਺ͷ‫ػ‬ೳ͕࣮૷͞Εͨϝιουͷ෼ׂͰ͋Δɽϝιουϩʔϯͱͯ͠‫ݕ‬ग़͢Δ͜ͱ͕Ͱ͖ΔɽCCFinderX ͸͜ͷΛద੾ͳαΠζʹ෼ׂ͢Δ͜ͱͰՄಡੑΛ޲্ͤ͞Δ͜ͱํ๏ʹΑΓɼλΠϓ 1(ۭനͷ༗ແɼϨΠΞ΢τɼίϝϯτ͕Ͱ͖ɼ͞Βʹɼ‫ػ‬ೳ௥Ճ΍όάमਖ਼͕༰қʹͳΔͱ͍͏ͷ༗ແ౳ͷҧ͍Λআ͖‫׬‬શʹҰக͢Δ) ίʔυΫϩʔϯͱɼར఺͕‫͛ڍ‬ΒΕΔɽϝιουநग़͸ɼ։ൃऀ͕සൟʹߦ͏

λΠϓ 2(λΠϓ 1 ͷҧ͍ʹՃ͑ͯɼม਺໊౳ͷϢʔβʔఆϦϑΝΫλϦϯάͷ 1 ͭͰ͋Δ͜ͱ͕෼͔͍ͬͯΔ [11]ɽ໊ٛɼؔ਺ͷ‫ܕ‬౳͕ҟͳΔ) ίʔυΫϩʔϯΛ‫ݕ‬ग़ՄೳͰϝιουநग़ͷྫΛਤ 1 ʹࣔ͢ɽਤ 1 Ͱ͸ɼprintOwing ϝ͋ΔɽCCFinderX ͸ίʔυΫϩʔϯΛߴ଎Ͱ‫ݕ‬ग़͢Δ͜ιουͷ໌ࡉදࣔ෦෼ͷίʔυยΛɼ৽ͨʹ printDetailsͱ͕Ͱ͖ɼଟ͘ͷ‫ۀا‬΍‫͞༻࢖Ͱڀݚ‬Ε͍ͯΔɽͱ͍͏ϝιουͱͯ͠ఆٛ͠ɼϝιου‫ͼݺ‬ग़͍ͯ͠͠Δɽ

c 2017 Information Processing Society of Japan

2Vol.2017-SE-197 No.3
2017/11/9

৘ใॲཧֶձ‫ڀݚ‬ใࠂ
IPSJ SIG Technical Reportਤ 2ఏҊ͢Δ‫ڥ؀‬ͷ֓ཁ

2.4 ϦϑΝΫλϦϯάࢧԉπʔϧ WitchDoctor
WitchDoctor ͱ͸ɼखಈͰߦΘΕ͍ͯΔϦϑΝΫλϦϯ

ͯ΋ɼద੾ͳλΠϛϯάΛߟ͑ɼࣗಈԽͰ͖ΔΑ͏ʹ͠Α͏ͱߟ͍͑ͯΔɽάΛਐߦதʹ‫ݕ‬ग़͠ɼࣗಈͰϦϑΝΫλϦϯάΛ‫׬‬਱͢ΔπʔϧͰ͋Δ [4]ɽWitchDoctor ͸͢΂ͯͷΩʔೖྗΛ௥

3.2 Ωʔೖྗ௥੻͍ɼΩʔೖྗ͕‫͜ى‬ΔͨͼʹϓϩάϥϜߦࠩ෼Λऔಘ͢Δɽ։ൃ࡞‫ۀ‬ͷϞχλϦϯάΛߦ͏ͨΊʹɼຊ‫Ͱڥ؀‬͸ɼ։ͦͯ͠ɼࠩ෼ยͱ AST(ந৅ߏจ໦) ΛରԠ෇͚͠ɼࠩ෼ͷൃऀͷΩʔೖྗͷ௥੻Λߦ͏ɽϝιουநग़Λߦ͏ࡍʹඞ

AST ϊʔυΛऔಘ͢Δɽࠩ෼ͷ AST ϊʔυΛ஝ੵ͍ͯ͠ཁͳ৘ใ͸ɼ1 ߦҎ্ͷߦࠩ෼৘ใͰ͋Δɽͦ͜ͰɼΩʔ͖ɼ։ൃऀͷਐߦதͷૢ࡞͕ಛఆͷϦϑΝΫλϦϯάૢ࡞ೖྗΛ௥੻͠ɼ1 ߦҎ্ͷมߋΛ‫ݕ‬஌Ͱ͖ΔΑ͏ʹͨ͠ɽύλʔϯͱҰக͍ͯ͠Δ͔Ͳ͏͔Λ‫ݕ‬஌͢Δɽ࠷ऴతʹɼߦࠩ෼ΛऔΔࡍʹ͸ɼMyers ͷࠩ෼‫ݕ‬ग़ΞϧΰϦζϜΛదϦϑΝΫλϦϯάૢ࡞Λ‫ݕ‬஌͢Δͱɼਐߦதͷૢ࡞Λ‫ʹݩ‬༻ͨ͠ [12]ɽ

໭͠ɼࣗಈͰϦϑΝΫλϦϯάΛద༻͢Δɽຊ‫Ͱڀݚ‬͸ɼϝιουநग़ͷू໿ύλʔϯΛ‫ݕ‬ग़͢ΔࡍʹɼWitchDoctorͷख๏Λࢀߟʹͨ͠ɽ

3. ఏҊ͢Δ‫ڥ؀‬

3.3 ࠩ෼ϊʔυऔಘιʔείʔυʹରͯ͠ 1 ߦҎ্ͷมߋ͕͋ͬͨ৔߹ɼͦͷࠩ෼Λ AST ͷϊʔυͱϚοϐϯά͠ɼऔಘ͢ΔɽAST ͷߏஙʹ͸ Eclipse ͷ ASTParser[13] Λ࢖༻͢Δɽࠩ෼͸૊։ൃ࡞‫ۀ‬ͷϞχλϦϯάʹΑΓϝιουநग़ͷू໿ύ(delta type, ast node) ͷू߹͔Βߏ੒͞ΕΔɽdelta typeλʔϯΛ‫ݕ‬஌͠ɼͦͷநग़ͨ͠ίʔυยͷίʔυΫϩʔϯ

͕औΔ஋͸ Insert ͋Δ͍͸ Delete ͷ͍ͣΕ͔Ͱ͋ΔɽIn-Λ։ൃऀʹఏࣔ͢Δࢧԉ‫͍ͯͭʹڥ؀‬આ໌͢Δɽຊ‫ڥ؀‬ͷ

sert ͸ 1 ߦҎ্ͷߦ͕ૠೖͨ͜͠ͱΛද͠ɼDelete ͸ 1 ߦ֓ཁਤΛਤ 2 ʹࣔ͢ɽਤ 2 ʹࣔ͢௨Γɼຊ‫ڥ؀‬͸‫ػ‬ೳ 1ʙҎ্ͷߦ͕࡟আ͞Εͨ͜ͱΛද͢ɽASTParser Λར༻ͯ͠

6 Λ༗͍ͯ͠ΔɽͦΕͧΕͷ‫ػ‬ೳͷৄࡉ͸ɼ3.1 અ͔Β 3.6

࡞ͬͨ AST ͸ɼASTVisitor ΫϥεΛ࣮૷͢Δ͜ͱʹΑͬઅͰड़΂Δɽ

ͯͨͲΔ͜ͱ͕Ͱ͖ɼ͜ΕʹΑΓɼAST ͔ΒϊʔυΛऔಘ͢Δ͜ͱ͕Ͱ͖Δɽͦ͜Ͱɼdiﬀ ΞϧΰϦζϜʹΑͬͯ

3.1 ίʔυΫϩʔϯ‫ݕ‬ग़औಘͨ͠ߦࠩ෼ͱҰக͢Δ AST ͷϊʔυΛ AST ͔Βऔಘϝιουநग़ΛߦͬͨίʔυยͷίʔυΫϩʔϯΛ‫ݕ‬ग़͢Δɽast node ͸ͦͷऔಘͨ͠ AST ͷϊʔυͷ৘ใ͔Β͢ΔͨΊʹ CCFinderX Λར༻͢ΔɽCCFinderX ͸ɼଟ͘੒Γɼϊʔυͷ໊લɼϊʔυͷछྨɼϊʔυͷҐஔɼϊʔͷ‫ڀݚ‬΍‫͕͋੷࣮༻࢖Ͱۀا‬Γɼߴ଎ʹίʔυΫϩʔϯΛυͷத਎౳ͷ৘ใ͕‫·ؚ‬Ε͍ͯΔɽ͜͜Ͱϊʔυͷछྨͱߴ͍ਫ਼౓Ͱ‫ݕ‬ग़͢ΔͨΊɼຊ‫Ͱڀݚ‬΋ར༻͢Δ͜ͱʹ͠͸ɼMethodDeclaration(ϝιουએ‫ )ݴ‬΍ MethodInvoca-ͨɽϝιουநग़ΛߦͬͨίʔυยͷίʔυΫϩʔϯΛ‫ݕ‬tion(ϝιου‫ͼݺ‬ग़͠)ɼVariableDeclarationStatement(มग़͢ΔͨΊʹ͸ɼϝιουநग़͕ߦΘΕΔલͷιʔείʔ਺એ‫ݴ‬จ) ౳ͷ৘ใͷ͜ͱͰ͋Δɽ‫ޙ‬ͷϝιουநग़ͷू໿υʹରͯ͠ίʔυΫϩʔϯΛ‫ݕ‬ग़͢Δඞཁ͕͋Δɽͦ͜ύλʔϯͷর߹ͷઅͰઆ໌͢Δ͕ɼϝιουநग़ͷू໿ύͰɼຊ‫Ͱڥ؀‬͸ɼ࡞‫಺ۀ‬༰ͷϞχλϦϯάΛ։࢝͢ΔࡍʹλʔϯΛ‫ݕ‬ग़͢ΔͨΊʹ͸ɼ(Insert, MethodDeclaration)

CCFinderX ʹΑΔίʔυΫϩʔϯ‫ݕ‬ग़Λߦ͍ɼͦͷ‫ޙ‬͸ɼͱ (InsertɼMethodInvocation)ɼ(Deleteɼcode block) ͷ 3։ൃऀͷ޷͖ͳλΠϛϯάͰίʔυΫϩʔϯ‫ݕ‬ग़Λߦ͑Δͭͷ৘ใ͕ඞཁͰ͋ΔͨΊɼຊ‫Ͱڀݚ‬͸ɼ͜ͷ 3 छྨͷΑ͏ʹ͍ͯ͠Δɽࠓ‫ޙ‬͸ɼ͜ͷίʔυΫϩʔϯ‫ݕ‬ग़ʹର͠

AST ϊʔυͷΈΛऔಘͯ͠ɼAST ϊʔυϦετͱͯ͠อc 2017 Information Processing Society of Japan

3

Vol.2017-SE-197 No.3
2017/11/9

৘ใॲཧֶձ‫ڀݚ‬ใࠂ
IPSJ SIG Technical Reportଘ͢ΔΑ͏ʹ͢Δɽ

3.4 ϝιουநग़ͷू໿ύλʔϯর߹ࠩ෼ϊʔυΛऔಘ͢Δͱɼ஝ੵͨࠩ͠෼ϊʔυ͕ϝιουநग़ͷू໿ύλʔϯͱҰக͢Δ͔Λর߹͢Δɽຊ‫Ͱڥ؀‬͸ɼҎԼΛຬͨࠩ͢෼ϊʔυ͕‫ݕ‬ग़͞Εͨ࣌ɼϝιουநग़͕ߦΘΕͨͱ൑அ͢Δɽ

(Delete, code block)∧(Insert, M ethodDeclaration)∧(Insert, M ethodInvocation)
whereposition(code block) = position(M ethodInvocation)∧ name(M ethodDeclaration)= name(M ethodInvocation)ɹ͋Δίʔυย͕࡟আ͞Εɼ৽͍͠ϝιου͕એ‫͞ݴ‬Εɼͦͯ͠ίʔυย͕࡟আ͞ΕͨҐஔʹ৽͍͠ϝιουͷ‫ͼݺ‬ग़͠จ͕௥Ճ͞Εͨࡍʹϝιουநग़͕ߦΘΕͨͱ൑அ͢Δɽ্ࣜΛ‫ͯݟ‬ΈΔͱɼ1 ߦ໨͕ίʔυย͕࡟আ͞Εͨ͜ͱΛද͠ɼ2 ߦ໨͕৽͍͠ϝιουએ‫ߦ͕ݴ‬ΘΕͨ͜ͱΛ
ද͠ɼ3 ߦ໨͕৽͘͠ϝιου‫ͼݺ‬ग़͠จ͕ૠೖ͞Εͨ͜ਤ 3ίʔυΫϩʔϯͷྫͱΛද͢ɽ͔͠͠ɼͦΕ͚ͩͰ͸ϝιουநग़͕ߦΘΕͨͱ൑அ͢Δ͜ͱ͸Ͱ͖ͳ͍ͨΊɼ͞Βʹ৚݅Λઃ͚ɼ4 ߦ໨͸࡟আ͞ΕͨίʔυยͷҐஔͱϝιου‫ͼݺ‬ग़͠จ͕ૠೖ͞ΕͨҐஔ͕ಉ͡Ͱ͋Δ͔൑ఆΛߦ͍ɼ5 ߦ໨͸৽͘͠એ‫͞ݴ‬Εͨϝιου໊ͱɼ৽͘͠ૠೖ͞Εͨϝιου‫ͼݺ‬ग़͠จͷϝιου໊͕ಉ͡Ͱ͋Δ͔൑ఆΛߦ͏ɽҎ্ɼ5ͭͷ৚͕݅ຬͨ͞Εͨ࣌ɼຊ‫Ͱڀݚ‬͸ϝιουநग़ͷू໿ύλʔϯͱͯ͠‫ݕ‬ग़͞ΕΔɽ

3.5 ίʔυΫϩʔϯর߹ϝιουநग़ͷू໿ύλʔϯ͕‫ݕ‬ग़͞ΕΔͱɼ࣍ʹɼϝιουநग़Ͱநग़͞ΕͨίʔυยͷίʔυΫϩʔϯΛ‫ݕ‬ग़͢Δඞཁ͕͋Δɽͦ͜Ͱɼ3.1 અͰ‫ݕ‬ग़ͨ͠ίʔυΫϩʔϯ͔Βϝιουநग़͞ΕͨίʔυยͷίʔυΫϩʔϯʹҰਤ 4ϝιουநग़க͢Δ΋ͷΛর߹ͯ͠୳͢ɽCCFinderX ͷίʔυΫϩʔϯͷग़ྗϑΝΠϧ͸ɼΫϩʔϯηοτ IDɼίʔυΫϩʔϯ͕ଐ͢ΔϑΝΠϧɼίʔυΫϩʔϯͷҐஔ৘ใ͔Β੒Δɽ

CCFinderX ͷग़ྗϑΝΠϧͷ৘ใʹ‫͍ͯͮج‬ɼ·ͣ͸ɼϝιουநग़ʹΑΓநग़͞ΕͨίʔυยͷҐஔ৘ใͱɼίʔυΫϩʔϯͷҐஔ৘ใ͕Ұக͢ΔίʔυΫϩʔϯΛ୳͢ɽ͕Ͱ͖Δɽ͞Βʹɼ։ൃऀ͕ίʔυΫϩʔϯҰཡ͔ΒίʔυΫϩʔϯΛબ୒͢ΔͱɼͦͷίʔυΫϩʔϯ͕‫·ؚ‬ΕΔϑΝΠϧΛ։͖ɼͦͷίʔυΫϩʔϯ෦෼ΛϋΠϥΠτ͠ɼࢹ֮తʹ΋ίʔυΫϩʔϯΛ೺Ѳ͠΍͘͢ͳ͍ͬͯΔɽ

4. ར༻γφϦΦͦͯ͠ɼͦΕΛຬͨ͢ίʔυΫϩʔϯ͕ଐ͢ΔΫϩʔϯηοτͷίʔυΫϩʔϯΛ͢΂ͯ‫ݕ‬ग़͢ΔɽຊষͰ͸ਤ 3 ʹ͋ΒΘ͢ίʔυΫϩʔϯͷྫΛ༻͍ͯɼ࣮ࡍʹຊ‫ߏͰڀݚ‬ஙͨ͠‫ڥ؀‬ͷར༻γφϦΦΛઆ໌͢Δɽ

3.6 ίʔυΫϩʔϯఏࣔ
3.5 અͰ‫ݕ‬ग़ͨ͠ίʔυΫϩʔϯҰཡΛ։ൃऀʹରͯ͠ఏࣔ͢Δɽ։ൃऀ͸ Eclipse ͷ View Λ༻͍ͯɼϝιουநग़͕ߦΘΕͨɼίʔυยͷίʔυΫϩʔϯҰཡΛ‫ݟ‬Δ͜ͱ

ਤ 3 ͷιʔείʔυ͸ɼϢʔβʔ ID Λઃఆ͢Δࡍɼ͢Ͱʹొ࿥͞Ε͍ͯΔϢʔβʔ ID Ͱ͸ͳ͘ɼ4 จࣈҎ্ 15 จࣈҎԼͱ͍͏੍‫͕͋ݶ‬Γɼ͞ΒʹύεϫʔυΛઃఆ͢ΔࡍɼΞϧϑΝϕοτͱ਺ࣈΛ྆ํඞͣ‫ؚ‬Έɼ4 จࣈҎ্ 15 จࣈҎԼͰ͋Δͱ͍͏੍‫͕͋ݶ‬ΔγεςϜΛ૝ఆ͍ͯ͠Δɽͦ

c 2017 Information Processing Society of Japan

4Vol.2017-SE-197 No.3
2017/11/9

৘ใॲཧֶձ‫ڀݚ‬ใࠂ
IPSJ SIG Technical Reportਤ 5ಉ࣌ू໿ީิͷίʔυΫϩʔϯΕͧΕͷೝূ͸ɼ14 ߦ໨ʙ32 ߦ໨ͷ checkUserID ϝιουͱɼ35 ߦ໨ʙ53 ߦ໨ͷ checkPass ϝιουʹΑͬͯߦΘΕ͍ͯΔɽ͜ΕΒ 2 ͭͷϝιου͸ɼͦΕͧΕॏෳϢʔβʔ ID ͷ֬ೝͱϑΥʔϚοτͷ֬ೝ͸ผॲཧͰ͋Δ͕ɼ

18 ߦ໨ʙ27 ߦ໨ͱ 42 ߦ໨ʙ52 ߦ໨ͷ௕͞ʹؔ͢Δ੍‫ݶ‬Λ֬ೝ͢Δॲཧ͸ίʔυΫϩʔϯͱͳ͍ͬͯΔɽɹ։ൃऀ͸ਤ 3 ͷιʔείʔυʹରͯ͠ɼฤू࡞‫ۀ‬Λߦ͏ɽ͔͜͜Βͷ։ൃऀͷฤू࡞‫ۀ‬Λຊ‫͕ڥ؀‬ϞχλϦϯά͢ΔɽϞχλϦϯάͷࡍɼຊ‫ڥ؀‬͸ɼΩʔೖྗΛ௥͍ɼιʔείʔυ͔Βߦࠩ෼Λऔಘͯ͠ɼϝιουநग़ͷू໿ύλʔϯʹؔ܎͢Δ AST ϊʔυΛ୳͢ɽͦͯ͠ɼ։ൃऀ͕
ਤ 3 ͷιʔείʔυʹରͯ͠ਤ 4 ͷΑ͏ʹɼ42 ߦ໨ʙ52 ߦ໨ͷ௕͞ʹؔ͢Δ੍‫ݶ‬Λ֬ೝ͢Δॲཧ෦෼Λ checkLengthϝιουͱͯ͠நग़͢Δɽ։ൃऀ͸ͦͷࡍɼ(1) ਤ 3 ͷ 42

ਤ 6ίʔυΫϩʔϯ෦෼ͷϋΠϥΠτදࣔ

ߦ໨ʙ52 ߦ໨ͷίʔυยͷ࡟আɼ(2) ৽͍͠ checkLengthϝιουͷએ‫ݴ‬ɼ(3)42 ߦ໨ʹ৽͍͠ checkLength ϝιουͷ‫ͼݺ‬ग़͠จͷૠೖɼͱ͍͏ 3 ͭͷૢ࡞ΛॱෆಉͰߦ͍ͬͯΔ͸ͣͰ͋Δɽຊ‫ڥ؀‬͸ɼͦͷૢ࡞ྻΛ௥͍ɼ֤ૢ࡞Λ (delta type, ast node) ͷ૊ͱͯ͠஝ੵ͠ɼ3 ͭͷૢ࡞ྻ͕‫ݕ‬஌͞Εͨࡍʹɼϝιουநग़ͷू໿ύλʔϯͱͯ͠‫ݕ‬ग़͢Δɽͦͯ͠ɼຊ‫ڥ؀‬͸ϝιουநग़͕ߦΘΕͨ͜ͱΛ‫ݕ‬ग़͢Δͱɼʠϝιουநग़Λ‫ݕ‬ग़͠·ͨ͠ɽʡͱ͍͏ϝοηʔδμΠΞϩάΛදࣔ͠ɼ։ൃऀʹ௨஌͢Δɽɹ࣍ʹɼຊ‫ڥ؀‬͸ɼϝιουநग़Ͱநग़͞ΕͨίʔυยͷίʔυΫϩʔϯΛ‫ݕ‬ग़͠ɼਤ 5 ͷΑ͏ʹ Eclipse ͷ View ‫ػ‬ೳΛ༻͍ͯɼಉ࣌ू໿ީิͷίʔυΫϩʔϯΛ։ൃऀʹରͯ͠ఏࣔ͢Δɽಉ࣌ू໿ީิͷίʔυΫϩʔϯΛఏࣔ͢ΔView Ͱ͸ɼࠨ൒෼ͰɼϓϩδΣΫτʹ‫·ؚ‬ΕΔϑΝΠϧϦετΛදࣔ͠ɼӈ൒෼Ͱ࣮ࡍʹ‫ݕ‬ग़͞ΕͨίʔυΫϩʔϯΛදࣔ͢ΔɽϑΝΠϧϦετ͸ҎԼͷ 2 छྨʹ෼ྨ͞ΕΔɽ

Modiﬁed File Listमਖ਼͕Ճ͑ΒΕͨϑΝΠϧ͕‫·ؚ‬ΕΔɽ

Group File ListϓϩδΣΫτ಺ͷ͢΂ͯͷϑΝΠϧ͕‫·ؚ‬ΕΔɽຊ‫Ͱڥ؀‬͸ 2 ͭͷཧ༝͔ΒϑΝΠϧϦετΛ 2 छྨʹ෼
͚ͨɽ·ͣ 1 ͭ໨ͷཧ༝ͱͯ͠͸ɼCCFinderX ͷ‫ݕ‬ग़଎౓ʹ‫ى‬Ҽ͢ΔɽCCFInderX ͸ɼೖྗͱͯ͠ϓϩδΣΫτ

c 2017 Information Processing Society of JapanΛ༩͑ɼͦͷϓϩδΣΫτશମͷιʔείʔυ಺ͷίʔυΫϩʔϯΛ‫ݕ‬ग़͢ΔΑΓ΋ɼϑΝΠϧϦετΛ࡞ΓɼͦͷϑΝΠϧϦετ಺ɼϑΝΠϧϦετؒͰίʔυΫϩʔϯΛ‫ݕ‬ग़͢Δํ͕ɼΑΓߴ଎ʹίʔυΫϩʔϯΛ‫ݕ‬ग़͢Δ͜ͱ͕Ͱ͖ΔɽͦͷͨΊɼϑΝΠϧϦετΛ 2 छྨ࡞Δ͜ͱʹΑΓɼಉ࣌ू໿ީิͷίʔυΫϩʔϯΛΑΓߴ଎ʹ‫ݕ‬ग़͢Δ͜ͱ͕Ͱ͖Δɽ·ͨɼ2 ͭ໨ͷཧ༝ͱͯ͠͸ɼಉ࣌ʹू໿͞ΕΔ΂͖ίʔυΫϩʔϯʹରͯ͠༏ઌॱҐΛ༩͑ΔͨΊͰ͋Δɽຊ‫Ͱڥ؀‬͸ɼϑΝΠϧ಺ɼϑΝΠϧؒͷίʔυΫϩʔϯΛ‫ݕ‬ग़͢Δ͜ͱ͕Ͱ͖Δɽ͔͠͠ɼίʔυΫϩʔϯͷू໿ʹ͓͍ͯɼϑΝΠϧؒΛ·͙ͨίʔυΫϩʔϯΑΓ΋ɼϑΝΠϧ಺ʹଘࡏ͢ΔίʔυΫϩʔϯͷํ͕༏ઌॱҐ͕ߴ͍ͱߟ͑ΒΕΔɽΑͬͯɼҎ্ͷ 2 ͭͷཧ༝͔Β 2छྨͷϑΝΠϧϦετΛ༻ҙͨ͠ɽɹӈ൒෼ͷ࣮ࡍʹ‫ݕ‬ग़ͨ͠ίʔυΫϩʔϯ৘ใͷ‫ํݟ‬Λઆ໌͢Δɽ·ͣɼΫϩʔϯηοτ ID ͸ಉ͡Ϋϩʔϯηοτʹ‫·ؚ‬ΕΔίʔυΫϩʔϯʹҰҙʹ༩͑ΒΕΔ΋ͷͰ͋ΔɽΫϩʔϯ৘ใ͸ϐϦΦυͷલͷ਺ࣈ͕ࠨ൒෼ͷϑΝΠϧϦετʹରԠ͢Δ਺ࣈͰɼϑΝΠϧ໊Λࣔ͠ɼϐϦΦυͷ‫ޙ‬ͷ਺ࣈ͸ɼͦΕͧΕίʔυΫϩʔϯͷ։࢝ΦϑηοτͱɼऴྃΦϑηοτΛ͍ࣔͯ͠Δɽͦͯ͠ɼߦ৘ใ͸ίʔυΫϩʔϯ෦෼ͷߦͷ։࢝ҐஔͱऴྃҐஔΛ͍ࣔͯ͠Δɽ

5

Vol.2017-SE-197 No.3
2017/11/9

৘ใॲཧֶձ‫ڀݚ‬ใࠂ
IPSJ SIG Technical Reportઌʹ΋ड़΂ͨΑ͏ʹɼίʔυΫϩʔϯͷ‫ݕ‬ग़݁Ռ͸ 2 छྨࢀߟจ‫ݙ‬ʹ෼͚ͯදࣔ͢ΔΑ͏ʹ͓ͯ͠Γɼ্ͷ ModiﬁedFileClone[1]͕मਖ਼͞ΕͨϑΝΠϧ಺ͷίʔυΫϩʔϯΛදࣔ͠ɼԼͷ

BetweenGroupClone ͸मਖ਼͞ΕͨϑΝΠϧͱͦΕҎ֎ͷ

[2]ϑΝΠϧΛ·͙ͨίʔυΫϩʔϯΛදࣔ͢Δɽɹ࠷‫ʹޙ‬ɼਤ 5 ͷ View ͔Β։ൃऀ͕ 1 ͭͷίʔυΫϩʔϯΛબ୒͢ΔͱɼͦͷϑΝΠϧΛ։͖ਤ 6 ͷΑ͏ʹɼͦͷ

[3]ίʔυΫϩʔϯ෦෼Λ྘৭ʹϋΠϥΠτͯ͠දࣔ͢Δɽ͜ΕʹΑΓɼ։ൃऀ͸ɼίʔυΫϩʔϯ෦෼ΛΑΓ෼͔Γ΍[4]֬͘͢ೝ͢Δ͜ͱ͕Ͱ͖ɼಉ࣌ʹू໿͢Δ͔‫ݕ‬౼͢Δ͜ͱ
͕Ͱ͖Δͱߟ͑ΒΕΔɽɹҎ্͕ɼຊ‫ڥ؀‬ͷར༻γφϦΦͰ͋Δɽຊ‫ʹڥ؀‬Αͬͯɼ

[5]
[6]

։ൃऀ͸ϝιουநग़Λҙࣝͤͣߦͬͯ΋ɼϝιουநग़Λߦͬͨ͜ͱΛͦͷ৔Ͱೝࣝ͢Δ͜ͱ͕Ͱ͖ɼͦͷϝιουநग़ΛߦͬͨίʔυยͷίʔυΫϩʔϯ΋ͦͷ৔Ͱ஌Δ[7]͜ͱ͕Ͱ͖ΔͨΊɼ࡞‫ۀ‬ͷ‫ޙ‬໭Γ౳ແ͘ɼద੾ͳ࣌‫ूʹظ‬໿ͷࢧԉΛߦ͏͜ͱ͕Ͱ͖Δͱߟ͑Β͑Δɽ

5. ·ͱΊͱࠓ‫ޙ‬ͷ՝୊

[8]

[9]

ຊ‫Ͱڀݚ‬͸ɼ։ൃऀͷ࡞‫಺ۀ‬༰ΛϞχλϦϯά͠ɼίʔυΫϩʔϯͷू໿Λࢧԉ͢Δ‫ڥ؀‬Λߏஙͨ͠ɽ۩ମతʹ[10]͸ɼ։ൃऀͷιʔείʔυͷฤू࡞‫͔ۀ‬Βɼϝιουநग़ͷू໿ύλʔϯΛ‫ݕ‬஌ͯ͠ɼͦͷநग़ͨ͠ίʔυยͷίʔυΫϩʔϯΛ։ൃऀʹఏࣔ͢Δͱ͍͏ࢧԉ಺༰Ͱ͋Δɽར

[11]༻γφϦΦʹࣔ͢௨Γɼຊ‫ڥ؀‬͸ɼϝιουநग़ͷू໿ύλʔϯΛ‫ݕ‬஌ͯ͠ɼͦͷநग़ͨ͠ίʔυยͷίʔυΫϩʔ[12]ϯΛఏࣔ͢Δ͜ͱ͕Ͱ͖ͨɽɹࠓ‫ޙ‬ͷ՝୊ͱͯ͠͸ɼ·ͣ 1 ͭ໨ʹɼదԠͰ͖ΔϦϑΝ[13]ΫλϦϯάͷύλʔϯΛ૿΍͢͜ͱ͕‫͛ڍ‬ΒΕΔɽ‫ࡏݱ‬ɼ‫ݕ‬ग़͢ΔϦϑΝΫλϦϯάͷύλʔϯ͸ϝιουநग़ͷू

[14]໿ύλʔϯ͚ͩͰ͋Δ͕ɼίʔυΫϩʔϯͷ࡟‫ʹݮ‬ద༻ՄೳͳϦϑΝΫλϦϯάύλʔϯ͸ଞʹ΋ͨ͘͞Μߟ͑ΒΕΔɽྫ͑͹ɼϝιουͷҠಈɼϝιουͷҾ্͖͛ɼϝ[15]ιουͷύϥϝʔλԽɼςϯϓϨʔτϝιουͷ‫ܗ‬੒ɼ਌Ϋϥεͷநग़౳͕‫͛ڍ‬ΒΕΔɽࠓ‫ޙ‬͸ɼ͜ΕΒͷϦϑΝΫλϦϯάύλʔϯʹ΋ద༻Ͱ͖Δ͜ͱΛ໨ࢦ͢ɽࠓ‫ޙ‬ͷ՝

[16]୊ͱͯ͠ɼ2 ͭ໨ʹຊ‫ڥ؀‬ͷධՁ࣮‫͛ڍ͕ݧ‬ΒΕΔɽධՁ࣮‫ͯ͠ͱݧ‬͸ 2 छྨߟ͓͑ͯΓɼ1 ͭ໨͸࣮ࡍʹຊ‫ڥ؀‬Λ࢖༻ͯ͠΋Β͍ɼϑΟʔυόοΫΛड͚Δ࣮‫ݧ‬Λࠓ‫ͬߦޙ‬[17]͍ͯ͜͏ͱߟ͍͑ͯΔɽ2 ͭ໨͸ɼ࣮ࡍʹա‫ߦʹڈ‬ΘΕͨϦϑΝΫλϦϯάࣄྫΛऔಘͯ͠ɼͦΕΒͷϦϑΝΫλϦϯάࣄྫʹରͯ͠ɼຊ‫͕ڥ؀‬ϦϑΝΫλϦϯάૢ࡞Λ‫ݕ‬஌͠ɼͦͷίʔυΫϩʔϯΛ‫ݕ‬ग़͢Δ͜ͱ͕Ͱ͖Δ͔ධՁ͍ͯ͜͠͏ͱߟ͍͑ͯΔɽँࣙ

[18]Baker, B. S.: Finding clones with dup: Analysis of anexperiment, IEEE Trans. Softw. Eng., Vol. 33, No. 9,
pp. 608–621 (2007).
Baxter, I. D., Yahin, A., Moura, L., Anna, M. S. andBier, L.: Clone detection using abstract syntax trees,
Proc. of ICSM, pp. 368–377 (1998).
Choi, E., Yoshida, N., Ishio, T., Inoue, K. and Sano, T.:Extracting Code Clones for Refactoring Using Combinations of Clone Metrics, Proc. of IWSC, pp. 7–13 (2011).
Foster, S. R., Griswold, W. G. and Leaner, S.: WitchDoctor: IDE support for real-time auto-completion ofrefactorings, Proc. of ICSE, pp. 222–232 (2012).
Fowler, M.: ϦϑΝΫλϦϯά-ϓϩάϥϛϯάͷମ࣭վળςΫχοΫɼϐΞιϯɾΤσϡέʔγϣϯ (2009).
ං‫ޙ‬๕थɼೇຊਅೋɼҪ্ࠀ࿠ɿίʔυΫϩʔϯ‫ݕ‬ग़ͱͦͷؔ࿈ٕज़ɼిࢠ৘ใ௨৴ֶձ࿦จࢽɼVol. J91-D, No. 6,pp. 1465–1481 (2008).
ං‫ޙ‬๕थɼ٢ాଇ༟ɿίʔυΫϩʔϯΛର৅ͱͨ͠ϦϑΝΫλϦϯάɼίϯϐϡʔλιϑτ΢ΣΞɼVol. 28, No. 4,pp. 43–56 (2011).
Ҫ্ࠀ࿠ɼਆ୩೥༸ɼೇຊਅೋɿίʔυΫϩʔϯ‫ݕ‬ग़๏ɼίϯϐϡʔλιϑτ΢ΣΞɼVol. 18, No. 5, pp. 47–54(2001).
ਆ୩೥༸ɼං‫ޙ‬๕थɼ٢ాଇ༟ɿίʔυΫϩʔϯ‫ݕ‬ग़ٕज़ͷల։ɼίϯϐϡʔλιϑτ΢ΣΞɼVol. 28, No. 3, pp.
29–42 (2011).
Kamiya, T., Kusumoto, S. and Inoue, K.: CCFinder: amultilinguistic token-based code clone detection system
for large scale source code, IEEE Trans. Softw. Eng.,
Vol. 28, No. 7, pp. 654–670 (2002).
Murphy-Hill, E., Parnin, C. and Andrew, P. B.: How
we refactor, and how we know it, Proc. of ICPC, pp.
199–206 (2013).
Myers, E. W.: An O (ND) diﬀerence algorithm and its
variations., Algorithmica, pp. 251–266 (1986).
Program Creek: Use JDT ASTParser to parse Single
Java ﬁles., http://www.programcreek.com/2011/11/usejdt-astparser-to-parse-java-ﬁle/.
Roy, C. K., Zibran, M. F. and Koschke, R.: The visionof software clone management: Past, present, and future (keynote paper), Proc. of CSMR-WCRE, pp. 18–33(2014).
ࢁத༟थɼቐɹԸಬɼ٢ాଇ༟ɼҪ্ࠀ࿠ɼࠤ໺‫ݐ‬थɿίʔυΫϩʔϯมߋ؅ཧγεςϜͷ։ൃͱ࣮ϓϩδΣΫ
τ΁ͷద༻ɼ৘ใॲཧֶձ࿦จࢽɼVol. 54, No. 2, pp.
883–893 (2013).
Yamanaka, Y., Choi, E., Yoshida, N., Inoue, K. andSano, T.: Applying Clone Change Notiﬁcation System
into an Industrial Development Process, Proc. of ICPC,pp. 199–206 (2013).
٢ాଇ༟ɼං‫ޙ‬๕थɼਆ୩೥༸ɼೇຊਅೋɼҪ্ࠀ࿠ɿίʔυΫϩʔϯؒͷґଘؔ܎ʹ‫ͮ͘ج‬ϦϑΝΫλϦϯάࢧԉɼ৘ใॲཧֶձ࿦จࢽɼVol. 48, No. 3, pp. 1241–1442(2007).
Yoshida, N., Higo, Y., Kamiya, T., Kusumoto, S. and Inoue, K.: On Refactoring Support Based on Code Clone
Dependency Relation, Proc. of METRICS, pp. 16:1–16:10 (2005).

ຊ ‫ ڀ ݚ‬͸ JSPS Պ ‫ ݚ‬අ 25220003ɼ16K16034ɼ

15H06344 ͷॿ੒Λड͚ͨ΋ͷͰ͢ɽc 2017 Information Processing Society of Japan6