JP2017045354A - Software development support program, software development support apparatus, and software development support method - Google Patents

Software development support program, software development support apparatus, and software development support method Download PDF

Info

Publication number
JP2017045354A
JP2017045354A JP2015168700A JP2015168700A JP2017045354A JP 2017045354 A JP2017045354 A JP 2017045354A JP 2015168700 A JP2015168700 A JP 2015168700A JP 2015168700 A JP2015168700 A JP 2015168700A JP 2017045354 A JP2017045354 A JP 2017045354A
Authority
JP
Japan
Prior art keywords
node
call
source code
source
pair
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2015168700A
Other languages
Japanese (ja)
Other versions
JP6507940B2 (en
Inventor
憲二 大木
Kenji Oki
憲二 大木
晃治 山本
Koji Yamamoto
晃治 山本
貴英 松塚
Takahide Matsuzuka
貴英 松塚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2015168700A priority Critical patent/JP6507940B2/en
Publication of JP2017045354A publication Critical patent/JP2017045354A/en
Application granted granted Critical
Publication of JP6507940B2 publication Critical patent/JP6507940B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

PROBLEM TO BE SOLVED: To present modification candidate portions based on likelihood of changes being required to be made when a change portion due to a version change of customized reference source code is reflected on the reference source code.SOLUTION: A computer: retains calling source nodes which are among paired nodes in the call relation in an extracted difference, in a first set, the difference being extracted from a first call relation in which a calling source and a called destination of a function contained in a first source code are made paired nodes and a second call relation in which a calling source and a called destination of a function contained in a second source code are made paired nodes; retains, in a second set, a calling source node and a called destination node among paired nodes in the call relation in an extracted difference, the difference being extracted from the first call relation and a third call relation in which a calling source and a called destination of a function contained in third source code are made paired node; calculates a similarity of each pair of each node contained in the first set in the first call relation and each node contained in the second set in the third call relation; and outputs the nodes contained in the second set in the descending order of similarities.SELECTED DRAWING: Figure 6

Description

本明細書は、ソフトウェア開発支援プログラム、ソフトウェア開発支援装置、及びソフトウェア開発支援方法に関する。   The present specification relates to a software development support program, a software development support apparatus, and a software development support method.

ソフトウェア開発では、効率よく作業を行うために、様々なソフトウェア開発支援技術が利用されている。   In software development, various software development support technologies are used in order to work efficiently.

例えば、第1の技術として、機能を担当する実行プログラムとソースプログラムコード間の関係を自動抽出し、ソースプログラムコード変更による他機能への影響範囲を漏れなく且つ見やすい形で開発者に提示する技術がある(例えば、特許文献1)。   For example, as a first technique, a technique for automatically extracting the relationship between an execution program in charge of a function and source program code and presenting the range of influence on other functions due to the change of the source program code to the developer in an easy-to-read form (For example, Patent Document 1).

第2の技術として、プログラム中の類似箇所を特定する技術がある(例えば、特許文献2)。   As a second technique, there is a technique for specifying a similar part in a program (for example, Patent Document 2).

第3の技術として、ソースコードのバージョンアップ、特にソースコードの元ファイルから派生した2つの派生ファイルの一方に、もう一方のファイルの変更箇所を取り込んで新バージョンを作成する技術がある(例えば、特許文献3)。   As a third technique, there is a technique for creating a new version by upgrading the version of the source code, in particular, by incorporating the changed portion of the other file into one of the two derived files derived from the original file of the source code (for example, Patent Document 3).

特開2009−122754号公報JP 2009-122754 A 特開2009−199172号公報JP 2009-199172 A 特開平09−081371号公報JP 09-081371 A

近年、オープンソースソフトウェア(OSS)など外部で管理されているソースコードを利用してソフトウェア開発が行われることが増えている。この場合、OSSに対して独自のカスタマイズを施して、そのOSSを利用することになる。そのOSSのバージョンアップがされる場合、カスタマイズしたOSSにそのバージョンアップの内容を反映する必要がある。   In recent years, software development is increasingly performed using source code managed externally such as open source software (OSS). In this case, the OSS is used by customizing the OSS. When the version of the OSS is upgraded, it is necessary to reflect the contents of the version upgrade in the customized OSS.

ところが、ソースコード内の機能の呼出関係を考慮しないでカスタマイズしたOSSにそのバージョンアップの内容を反映しようと修正すると、修正漏れが発生するおそれがある。   However, if the modification is made to reflect the contents of the version upgrade in the customized OSS without considering the calling relationship of the functions in the source code, there is a possibility that omission of correction will occur.

このとき、第1の技術を用いることが考えられる。第1の技術では、指定された関数を呼び出している関数を順に探索することで、すべての経路上に存在する関数を色替えにより明示している。   At this time, it is conceivable to use the first technique. In the first technique, functions existing on all paths are specified by color change by sequentially searching for functions that call a specified function.

しかしながら、第1の技術では、指定された関数の影響範囲を一律に特定するだけなので、実際に修正すべき確度の高い箇所を把握することができない。また、第1の技術では、バージョン変更前後のソースコードの影響範囲は特定できても、カスタマイズしたOSSにそのバージョンアップの内容を反映する場合に修正候補箇所を検出することはできない。   However, in the first technique, the range of influence of the designated function is only specified uniformly, so it is not possible to grasp a place with high accuracy to be actually corrected. In the first technique, even if the influence range of the source code before and after the version change can be specified, the correction candidate part cannot be detected when the contents of the upgrade are reflected in the customized OSS.

本発明の一側面として、カスタマイズした基準ソースコードに対して、その基準ソースコードのバージョン変更による変更箇所を反映する場合に、変更すべき確度に基づいて修正候補箇所を提示する技術を提供する。   As one aspect of the present invention, there is provided a technique for presenting correction candidate locations based on the accuracy to be changed when reflecting a changed location of a customized reference source code due to a version change of the reference source code.

本発明の一側面に係るソフトウェア開発支援プログラムは、コンピュータに、次の処理を実行させる。コンピュータは、第1のソースコードと、第1のソースコードをカスタマイズした第2のソースコードと、第1のソースコードとバージョンが異なる第3のソースコードとを取得する。コンピュータは、第1のソースコードに含まれる機能の呼出元及び呼出先を対のノードとする第1の呼出関係と第2のソースコードに含まれる機能の呼出元及び呼出先を対のノードとする第2の呼出関係との差分のノード対を抽出する。コンピュータは、抽出したノード対のうち呼出元のノードを第1の集合に保持する。コンピュータは、第1の呼出関係と第3のソースコードに含まれる機能の呼出元及び呼出先を対のノードとする第3の呼出関係との差分のノード対を抽出する。コンピュータは、抽出したノード対の呼出元及び呼出先のノードを第2の集合に保持する。コンピュータは、所定のルールに基づいて、第1の呼出関係における第1の集合に含まれる各ノードと、第3の呼出関係における第2の集合に含まれる各ノードとを組み合わせたノード対のそれぞれの類似度を算出する。コンピュータは、第2の集合に含まれるノードを、類似度の高い順に、出力する。   A software development support program according to an aspect of the present invention causes a computer to execute the following processing. The computer obtains a first source code, a second source code obtained by customizing the first source code, and a third source code having a version different from that of the first source code. The computer has a first call relationship in which a caller and a callee of a function included in the first source code are a pair of nodes, and a caller and a callee of a function included in the second source code are a pair of nodes. The node pair of the difference with the second call relationship is extracted. The computer holds the caller node of the extracted node pair in the first set. The computer extracts a difference node pair between the first call relationship and the third call relationship having the call source and the call destination of the function included in the third source code as a pair node. The computer holds the caller and callee nodes of the extracted node pair in the second set. The computer, based on a predetermined rule, each node pair that combines each node included in the first set in the first call relationship and each node included in the second set in the third call relationship The similarity is calculated. The computer outputs the nodes included in the second set in descending order of similarity.

本明細書に記載の技術によれば、カスタマイズした基準ソースコードに対して、その基準ソースコードのバージョン変更による変更箇所を反映する場合に、変更すべき確度に基づいて修正候補箇所を提示することができる。   According to the technology described in this specification, when a changed reference source code is reflected in a customized reference source code, a correction candidate part is presented based on the accuracy to be changed. Can do.

メソッドの呼出関係について説明するための図である。It is a figure for demonstrating the calling relationship of a method. ソフトウェアの版更新に応じてカスタマイズしたソフトウェアの版を更新することについて説明するための図である。It is a figure for demonstrating updating the software version customized according to the software version update. ソースコードのカスタマイズ後に、ソースコードが更新されてメソッドの呼出元が変更されて修正漏れが発生してしまう場合について説明するための図である。It is a figure for demonstrating the case where after a source code is customized, the source code is updated, the method call source is changed, and a correction omission occurs. 図3において本来得られるべき結果のソースコードv2cを示す。FIG. 3 shows a source code v2c as a result to be originally obtained. 本実施形態における処理を説明するための図である。It is a figure for demonstrating the process in this embodiment. 本実施形態におけるソフトウェア開発支援装置の一例を示す。An example of the software development support apparatus in this embodiment is shown. 本実施形態における変更箇所検出装置の一例を示す。An example of the change location detection apparatus in this embodiment is shown. 本実施形態におけるソースコード取得部により取得されるソースコードv1,v1c,v2の一例を示す。An example of source code v1, v1c, v2 acquired by the source code acquisition unit in the present embodiment is shown. 本実施形態における呼出関係生成部により生成されるメソッドの呼出関係グラフの一例を示す。An example of a call relationship graph of a method generated by the call relationship generation unit in the present embodiment is shown. 本実施形態における置換元抽出部の処理を説明するための図である。It is a figure for demonstrating the process of the replacement origin extraction part in this embodiment. 本実施形態における置換先抽出部の処理を説明するための図である。It is a figure for demonstrating the process of the replacement destination extraction part in this embodiment. 本実施形態における類似度算出部の処理を説明するための図である。It is a figure for demonstrating the process of the similarity calculation part in this embodiment. 本実施形態における類似度情報の一例を示す。An example of the similarity information in this embodiment is shown. 本実施形態における出力結果部による出力例を示す。The output example by the output result part in this embodiment is shown. 本実施形態の他の例における出力結果部による出力例を示す。The example of an output by the output result part in the other example of this embodiment is shown. 本実施形態における全体の処理のフローチャートを示す。The flowchart of the whole process in this embodiment is shown. S3の処理の詳細フローチャートである。It is a detailed flowchart of the process of S3. S4の処理の詳細フローチャートである。It is a detailed flowchart of the process of S4. S5の処理の詳細フローチャートである。It is a detailed flowchart of the process of S5. S5−3の処理の詳細フローチャートである。It is a detailed flowchart of the process of S5-3. 本実施形態におけるプログラムを実行するコンピュータのハードウェア環境の構成ブロック図の一例である。It is an example of a configuration block diagram of a hardware environment of a computer that executes a program in the present embodiment.

図1は、メソッドの呼出関係について説明するための図である。ソースコード1を解析することにより、ソースコード1に含まれるメソッド名(2−1,2−2,2−3)をノード、メソッドから別のメソッドを呼び出す呼出関係(3−1,3−2)をエッジと捉えた有向グラフを得られることができる。   FIG. 1 is a diagram for explaining a method calling relationship. By analyzing the source code 1, the method name (2-1, 2-2, 2-3) included in the source code 1 is a node, and the call relationship (3-1, 3-2) is for calling another method ) Can be obtained as an edge.

図2は、ソフトウェアの版更新に応じてカスタマイズしたソフトウェアの版を更新することについて説明するための図である。なお、以下では、説明の便宜上、バージョンアップを例に説明するが、用語「バージョンアップ」を「バージョンダウン」に置き換えてもよい。   FIG. 2 is a diagram for explaining the updating of the customized software version in accordance with the software version update. In the following description, for the sake of convenience of explanation, an explanation will be given by taking the version upgrade as an example, but the term “version up” may be replaced with “version down”.

図2において、v1は、更新前のソースコースのバージョンを示す。v1cは、ソースコードv1のカスタマイズ後のソースコードのバージョンを示す。v2は、ソースコードv1の更新後のソースコードのバージョンを示す。v2cは、カスタマイズ後のソースコードv1cに、ソースコードv2へのバージョンアップを反映したバージョンを示す。   In FIG. 2, v1 indicates the version of the source course before update. v1c indicates the version of the source code after customization of the source code v1. v2 indicates the version of the source code after the update of the source code v1. v2c indicates a version reflecting the upgrade to the source code v2 in the customized source code v1c.

OSSなど外部で管理されているソースコードv1を利用する際に、機能の追加を行うなどソースコードv1の中身に手を加えたカスタム版ソースコースv1cを利用することがある(S101)。   When the source code v1 managed externally such as OSS is used, a custom version source course v1c obtained by modifying the contents of the source code v1 such as adding a function may be used (S101).

ソースコードv1の中身に手を加えた後でOSSが更新される(S102)と、カスタム版ソースコードv1cもOSSの更新に併せて更新される場合がある(S103)。   When the OSS is updated after modifying the contents of the source code v1 (S102), the custom version source code v1c may be updated along with the update of the OSS (S103).

この時、OSS利用者は、まず2つのファイル間の相違点を検出するdiffツール等を用いて、ソースコードv1とv2との相違点を検出することによりS102にて変更された箇所を調べる。OSS利用者は、S102で変更された箇所を、S103にてカスタム版のソースコードv1cに反映することが考えられる。例えばgit mergetoolを用いれば、この作業を自動的に行うことができる。   At this time, the OSS user first checks the location changed in S102 by detecting the difference between the source codes v1 and v2 using a diff tool or the like that detects the difference between the two files. It is conceivable that the OSS user reflects the portion changed in S102 in the custom version source code v1c in S103. For example, you can use git mergetool to do this automatically.

しかしながら、git mergetoolのような既存手法では、図3で説明するように、メソッドの呼出元が変わった場合に修正の漏れが発生してしまうことがある。   However, in the existing method such as git mergetool, as described with reference to FIG. 3, there is a case where omission of correction occurs when the method call source is changed.

図3は、ソースコードのカスタマイズ後に、ソースコードが更新されてメソッドの呼出元が変更されて修正漏れが発生してしまう場合について説明するための図である。   FIG. 3 is a diagram for explaining a case in which after the source code is customized, the source code is updated, the method call source is changed, and a correction omission occurs.

例えば、ソースコードv1について、クラスBに機能cを加えるカスタマイズを行い、そのカスタマイズしたメソッドB.cをクラスAのメソッドA.aから呼び出すように修正したとする(S101a)。   For example, it is assumed that the source code v1 is customized so that the function c is added to the class B, and the customized method B.c is modified to be called from the method A.a of the class A (S101a).

その後、ソースコードv1について、NewAという新クラスのメソッドをMainから呼び出すように更新されたとする(S102a)。このとき、Class AとClassBはv1のままであるとする。   Thereafter, it is assumed that the source code v1 is updated so that a method of a new class called NewA is called from Main (S102a). At this time, Class A and Class B remain v1.

git mergetoolを用いて、ソースコードv1とv2との相違点を検出することによりS102aにて変更された箇所を検出し、検出した変更箇所をソースコードv1cに反映する(S103a)。ここで、クラスAとクラスBとは、ソースコードv1cのままである。   By using git mergetool, the difference between the source codes v1 and v2 is detected to detect the portion changed in S102a, and the detected changed portion is reflected in the source code v1c (S103a). Here, the class A and the class B remain the source code v1c.

しかしながら、図4に示すように、本来、クラスNewAのメソッドaにメソッドB.cの機能を組み込まないといけないが、マージツールではそれを検出することが出来ない。   However, as shown in FIG. 4, the function of method B.c must be incorporated in method a of class NewA, but the merge tool cannot detect it.

図4は、図3において本来得られるべき結果のソースコードv2cを示す。ソースコースv1からv1cを作成する際に手を加えたメソッドA.aからメソッドB.cを呼び出す処理を、ソースコードv2からv2cを作成する際のクラスNewA.aに対して反映できるようにすることが望まれる。   FIG. 4 shows the source code v2c of the result to be originally obtained in FIG. It is desirable to be able to reflect the process of calling the method Bc from the method Aa that has been modified when creating the source course v1 to v1c to the class NewA.a when creating the source code v2 to v2c. .

このように、ソースコードの更新に伴ってカスタマイズしたソースコードの修正が必要となるファイル(クラスやメソッド)を適切に抽出することが望まれる。   As described above, it is desirable to appropriately extract files (classes and methods) that require modification of the customized source code as the source code is updated.

そこで、本実施形態では、カスタマイズした基準ソースコードに対して、その基準ソースコードのバージョン変更(バージョンのアップクレードまたはダウングレードを含む)の内容を反映する場合に、修正すべき確度に基づいて修正候補箇所を提示する技術を提供する。以下では、ソフトウェアのバージョン間の差分から修正が必要な箇所を検出し、より具体的には、差分を抽出する際にメソッドの呼出関係を利用する技術について説明する。   Therefore, in the present embodiment, when the contents of the version change (including version upgrade or downgrade) of the reference source code are reflected on the customized reference source code, the correction is made based on the accuracy to be corrected. Provide technology to present candidate locations. Hereinafter, a technique for detecting a portion that needs to be corrected from a difference between software versions and, more specifically, using a method call relationship when extracting the difference will be described.

図5は、本実施形態における処理を説明するための図である。まず、本実施形態におけるソフトウェア開発支援装置は、ソースコードの各版(v1,v1c,v2)におけるメソッドの呼出関係グラフを構築する。次に、図5(A)に示すように、ソフトウェア開発支援装置は、ソースコードv1とv1cとの呼出関係の比較から差のあるエッジの呼出元ノードを注意すべきノードとして印を付ける。   FIG. 5 is a diagram for explaining processing in the present embodiment. First, the software development support apparatus according to the present embodiment constructs a method call relationship graph in each version (v1, v1c, v2) of the source code. Next, as shown in FIG. 5A, the software development support apparatus marks the caller node of the edge having a difference from the comparison of the call relationship between the source codes v1 and v1c as a node to be noted.

次に、図5(B)に示すように、ソフトウェア開発支援装置は、ソースコードv1とv2との呼出関係を比較する。ソフトウェア開発支援装置は、以下の判断手法に基づいて、新たに追加されたエッジに含まれるノード(呼出元ノード、呼出先ノード)と上記印を付けたノードとの類似度を調べる。ソフトウェア開発支援装置は、類似度の高いノードを変更箇所候補として出力する。   Next, as shown in FIG. 5B, the software development support apparatus compares the calling relationship between the source codes v1 and v2. Based on the following determination method, the software development support apparatus checks the degree of similarity between the node (calling source node, calling destination node) included in the newly added edge and the node marked above. The software development support apparatus outputs a node having a high similarity as a change location candidate.

ここで、ソフトウェア開発支援装置は、以下を判断要素として類似度の高低を算出する。以下の判断要素が満たされるものが多いほど類似度が高いといえる。   Here, the software development support apparatus calculates the level of similarity using the following as determination factors. It can be said that the more the following criteria are satisfied, the higher the degree of similarity.

(I)着目している各ノード(新たに追加されたエッジに含まれる呼出元ノード・呼出先ノード、印したノード)(自身のノード)に対する、呼出元のノード同士及び呼出先のノード同士それぞれが、以下のいずれかを満たす。ここで、呼出元のノード同士、または呼出先のノード同士を「比較するノード同士」と称する。
・比較するノード同士が、同一ノードである。
・比較するノード同士が、同一のインタフェースを実装したメソッドである。
・比較するノード同士のメソッド名が同じである。
(I) For each node of interest (caller node / callee node included in newly added edge, marked node) (own node), caller nodes and callee nodes respectively Satisfies either of the following: Here, caller nodes or callee nodes are referred to as “compare nodes”.
The nodes to be compared are the same node.
-Nodes to be compared are methods that implement the same interface.
-The method names of the nodes to be compared are the same.

(II)着目しているノード同士(自身のノード同士)が以下のいずれかを満たす。
・着目しているノード同士が、同一のインタフェースを実装したメソッドである。
・着目しているノード同士のメソッド名が同じである。
(II) The nodes being focused on (one's own nodes) satisfy either of the following.
-Nodes of interest are methods that implement the same interface.
-The method names of the nodes being focused on are the same.

図6は、本実施形態におけるソフトウェア開発支援装置の一例を示す。ソフトウェア開発支援装置11は、取得部12、第1の抽出部13、第2の抽出部14、算出部15、出力制御部16を含む。
取得部12は、第1のソースコードと、第1のソースコードをカスタマイズした第2のソースコードと、第1のソースコードとバージョンが異なる第3のソースコードとを取得する。取得部12の一例として、ソースコード取得部22が挙げられる。
FIG. 6 shows an example of a software development support apparatus in the present embodiment. The software development support apparatus 11 includes an acquisition unit 12, a first extraction unit 13, a second extraction unit 14, a calculation unit 15, and an output control unit 16.
The acquisition unit 12 acquires a first source code, a second source code obtained by customizing the first source code, and a third source code having a version different from that of the first source code. An example of the acquisition unit 12 is a source code acquisition unit 22.

第1の抽出部13は、第1の呼出関係と第2の呼出関係との差分のノード対を抽出する。第1の呼出関係は、第1のソースコードに含まれる機能の呼出元及び呼出先を対のノードとする呼出関係である。第2の呼出関係は、第2のソースコードに含まれる機能の呼出元及び呼出先を対のノードとする呼出関係である。第1の抽出部13は、抽出した該ノード対のうち呼出元のノードを第1の集合に保持する。第1の抽出部13の一例として、置換元抽出部24が挙げられる。   The first extraction unit 13 extracts a node pair that is a difference between the first call relationship and the second call relationship. The first call relationship is a call relationship in which a call source and a call destination of a function included in the first source code are paired nodes. The second call relationship is a call relationship in which the call source and the call destination of the function included in the second source code are paired nodes. The first extraction unit 13 holds the caller node of the extracted node pair in the first set. An example of the first extraction unit 13 is a replacement source extraction unit 24.

第2の抽出部14は、第1の呼出関係と第3の呼出関係との差分のノード対を抽出する。第3の呼出関係は、第3のソースコードに含まれる機能の呼出元及び呼出先を対のノードとする呼出関係である。第2の抽出部14は、抽出したノード対の呼出元及び呼出先のノードを第2の集合に保持する。第2の抽出部14の一例として、置換先抽出部25が挙げられる。   The second extraction unit 14 extracts a node pair that is a difference between the first call relationship and the third call relationship. The third call relationship is a call relationship in which the call source and the call destination of the function included in the third source code are paired nodes. The second extraction unit 14 holds the caller and callee nodes of the extracted node pair in the second set. An example of the second extraction unit 14 is a replacement destination extraction unit 25.

算出部15は、所定のルールに基づいて、第1の呼出関係における第1の集合に含まれる各ノードと、第3の呼出関係における第2の集合に含まれる各ノードとを組み合わせたノード対のそれぞれの類似度を算出する。算出部15の一例として、類似度算出部26が挙げられる。   Based on a predetermined rule, the calculation unit 15 combines a node pair obtained by combining each node included in the first set in the first call relationship with each node included in the second set in the third call relationship. The similarity of each is calculated. An example of the calculation unit 15 is a similarity calculation unit 26.

出力制御部16は、第2の集合に含まれるノードを、類似度の高い順に、出力する。出力制御部16の一例として、結果出力部27が挙げられる。   The output control unit 16 outputs the nodes included in the second set in descending order of similarity. An example of the output control unit 16 is a result output unit 27.

このように構成することにより、カスタマイズした基準ソースコードに対して、その基準ソースコードのバージョン変更による変更箇所を反映する場合に、変更すべき確度に基づいて修正候補箇所を提示することができる。   By configuring in this way, when the changed reference source code that has been changed due to the version change of the reference source code is reflected, correction candidate locations can be presented based on the accuracy to be changed.

また、算出部15は、組み合わせたノード対毎に、組み合わせたノード対に含まれるノード同士、組み合わせたノード対の各ノードの呼出元のノード同士、及び組み合わせたノード対の各ノードの呼出先のノード同士を比較する。算出部15は、所定のルールに基づいて、比較したノード対のそれぞれに該類似度を付与し、該比較したノード対のそれぞれに付与された類似度の合計値を前記組み合わせたノード対の類似度とする。所定のルールには、比較したノード対のそれぞれが、同一ノードであるか否か、同一のインタフェースを実装したメソッドであるか否か、またはメソッド名が同一であるか否かに応じて類似度の値が規定されている。   In addition, for each node pair that has been combined, the calculation unit 15 includes, for each node included in the node pair that has been combined, the nodes that have called each node of the node pair that has been combined, and the call destinations of each node in the node pair that has been combined. Compare nodes. The calculation unit 15 assigns the similarity to each of the compared node pairs based on a predetermined rule, and the similarity of the node pair obtained by combining the total values of the similarities assigned to the compared node pairs. Degree. For a given rule, the degree of similarity depends on whether each of the compared node pairs is the same node, whether the methods implement the same interface, or whether the method names are the same. The value of is specified.

このように構成することにより、第1のソースコードを基準として、第2のソースコードと第3のソースコードとの類似性を判定することができる。   With this configuration, it is possible to determine the similarity between the second source code and the third source code with reference to the first source code.

出力部16は、第2の集合に含まれるノードを修正候補箇所として出力する。それと共に、出力部16は、第1の集合のうち、組み合わせたノード対に含まれる呼出元のノードであって、第1の呼出関係と第2の呼出関係との差分のノード対のうち呼出元のノードに対応する呼出先のノードを、修正候補箇所に対する修正反映対象として出力する。   The output unit 16 outputs the nodes included in the second set as correction candidate locations. At the same time, the output unit 16 is a caller node included in the combined node pair in the first set, and is called out of the difference node pairs between the first call relation and the second call relation. The callee node corresponding to the original node is output as a correction reflection target for the correction candidate location.

このように構成することにより、修正候補箇所に対する修正反映対象を出力することができる。   With this configuration, it is possible to output a correction reflection target for a correction candidate location.

図7は、本実施形態における変更箇所検出装置の一例を示す。変更箇所検出装置21は、入力インタフェース(I/F)28、出力I/F29と接続されている。入力I/F28は、キーボード等の入力装置である。出力I/F29は、ディスプレイ装置等の出力装置である。   FIG. 7 shows an example of a change location detection apparatus in the present embodiment. The change location detection device 21 is connected to an input interface (I / F) 28 and an output I / F 29. The input I / F 28 is an input device such as a keyboard. The output I / F 29 is an output device such as a display device.

変更箇所検出装置21は、記憶部(不図示)を含む。記憶部(不図示)は、v1呼出関係情報31、v1c呼出関係情報32、v2呼出関係情報33、v1−v1c変更内容34、v1−v2変更内容35、置換元情報36、置換先情報37、類似度情報38、閾値情報39を格納する。   The change location detection device 21 includes a storage unit (not shown). The storage unit (not shown) includes v1 call relation information 31, v1c call relation information 32, v2 call relation information 33, v1-v1c change contents 34, v1-v2 change contents 35, replacement source information 36, replacement destination information 37, Similarity information 38 and threshold information 39 are stored.

変更箇所検出装置21は、ソースコード取得部22、呼出関係生成部23、置換元抽出部24、置換先抽出部25、類似度算出部26、結果出力部27を含む。   The change location detection device 21 includes a source code acquisition unit 22, a call relationship generation unit 23, a replacement source extraction unit 24, a replacement destination extraction unit 25, a similarity calculation unit 26, and a result output unit 27.

ソースコード取得部22は、入力I/F28により入力されたソースコードv1,v1c,v2を取得する。   The source code acquisition unit 22 acquires the source codes v1, v1c, and v2 input by the input I / F 28.

呼出関係生成部23は、ソースコードv1,v1c,v2毎に、ソースコードからメソッドの呼出関係を構築し、v1呼出関係情報31、v1c呼出関係情報32、v2呼出関係情報33を生成する。   The call relationship generation unit 23 constructs a method call relationship from the source code for each of the source codes v1, v1c, and v2, and generates v1 call relationship information 31, v1c call relationship information 32, and v2 call relationship information 33.

置換元抽出部24は、元の版のソースコードv1の呼出関係(v1呼出関係情報31)とカスタマイズされた版のソースコードv1cの呼出関係(v1c呼出関係情報32)の差分をv1−v1c変更内容34として取得する。置換元抽出部24は、v1−v1c変更内容34に基づいて、変更のあったエッジの呼出元を注意箇所(置換元情報36)として記録する。   The replacement source extraction unit 24 changes v1-v1c by changing the difference between the call relationship (v1 call relationship information 31) of the original version of the source code v1 and the call relationship (v1c call relationship information 32) of the customized version of the source code v1c. Acquired as content 34. Based on the v1-v1c change content 34, the replacement source extraction unit 24 records the call source of the changed edge as a caution location (replacement source information 36).

置換先抽出部25は、元の版のソースコードv1の呼出関係(v1呼出関係情報31)と更新された版のソースコードv2の呼出関係との差分をv1−v2変更内容35として取得する。置換先抽出部25は、v1−v2変更内容35に基づいて、更新された版で追加されたメソッドを検出候補箇所(置換先情報37)として記録する。   The replacement destination extraction unit 25 acquires the difference between the calling relationship of the original version of the source code v1 (v1 calling relationship information 31) and the calling relationship of the updated version of the source code v2 as the v1-v2 change content 35. The replacement destination extraction unit 25 records the method added in the updated version based on the v1-v2 change content 35 as a detection candidate location (replacement destination information 37).

類似度算出部26は、置換元抽出部24と置換先抽出部25とにより得られたメソッドの類似度を算出する。   The similarity calculation unit 26 calculates the method similarity obtained by the replacement source extraction unit 24 and the replacement destination extraction unit 25.

結果出力部27は、事前に設定した閾値を越えた類似度を保持する置換先情報37が置換対象であることを通知する。さらに、結果出力部27は、類似度が高い順に置換候補を一覧化する。   The result output unit 27 notifies that the replacement destination information 37 that holds the similarity exceeding the preset threshold is the replacement target. Further, the result output unit 27 lists replacement candidates in descending order of similarity.

これにより、置換元抽出部24で呼出関係の差分の変化を捉えてマーキングしておくことで元のソースコードv1の更新時に変更が無くても注意すべき箇所として認識することができる。また、置換先抽出部25と類似度算出部26により置換元抽出部24で得た箇所を反映するかどうかを判別する事ができるようになる。   As a result, the replacement source extraction unit 24 captures and marks the change in the difference in the call relationship, so that it can be recognized as a point to be noted even if there is no change when the original source code v1 is updated. In addition, the replacement destination extraction unit 25 and the similarity calculation unit 26 can determine whether or not the location obtained by the replacement source extraction unit 24 is reflected.

図8は、本実施形態におけるソースコード取得部により取得されるソースコードv1,v1c,v2の一例を示す。ソースコード取得部22は、入力I/F28により入力された3つのバージョンのソースコードv1,v1c,v2を取得する。   FIG. 8 shows an example of the source codes v1, v1c, v2 acquired by the source code acquisition unit in the present embodiment. The source code acquisition unit 22 acquires three versions of source code v1, v1c, and v2 that are input through the input I / F 28.

図9は、本実施形態における呼出関係生成部により生成されるメソッドの呼出関係グラフの一例を示す。図9では、メソッドの呼出元から呼出先に向かって矢印が示されている。   FIG. 9 shows an example of a method call relationship graph generated by the call relationship generation unit in the present embodiment. In FIG. 9, arrows are shown from the method call source to the call destination.

呼出関係生成部23は、取得されたソースコード(v1,v1c,v2)毎に、メソッドの呼出関係グラフ(v1呼出関係情報31、v1c呼出関係情報32、v2呼出関係情報33)を構築する。   The call relationship generation unit 23 constructs a method call relationship graph (v1 call relationship information 31, v1c call relationship information 32, v2 call relationship information 33) for each acquired source code (v1, v1c, v2).

v1呼出関係情報31は、メソッド「Main.main()」からメソッド「A.a()」が呼び出され、メソッド「A.a()」からメソッド「B.b()」が呼び出されている関係情報を保持する。   The v1 call relation information 31 holds relation information where the method “A.a ()” is called from the method “Main.main ()” and the method “B.b ()” is called from the method “A.a ()”.

v1c呼出関係情報32は、メソッド「Main.main()」からメソッド「A.a()」が呼び出され、メソッド「A.a()」からメソッド「B.b()」及び「B.c()」が呼び出されている関係情報を保持する。   In the v1c calling relation information 32, the method “Aa ()” is called from the method “Main.main ()”, and the methods “Bb ()” and “Bc ()” are called from the method “Aa ()”. Holds relationship information.

v2呼出関係情報33は、メソッド「Main.main()」からメソッド「NewA.a()」が呼び出され、メソッド「NewA.a()」とメソッド「A.a()」のそれぞれからメソッド「B.b()」が呼び出されている関係情報を保持する。   In the v2 call relation information 33, the method “NewA.a ()” is called from the method “Main.main ()”, and the method “Bb ( ) "Is held and related information is retained.

なお、本実施形態の説明では分かりやすさのために呼出関係グラフを図として表現しているが、計算機が処理可能とするために、例えば以下のように呼出元、呼出先のペアのリストとして呼出関係グラフを保持してもよい。以下の例は、図9のv2呼出関係情報33を呼出元・呼出先のペアのリストとしたものである。
[<Main.main(), NewA.a()>,
<NewA.a(), B.b()>,
<A.a(), B.b()>]
In the description of the present embodiment, the call relation graph is represented as a diagram for easy understanding. However, in order to enable processing by the computer, for example, as a list of caller / callee pairs as follows: A call relationship graph may be maintained. In the following example, the v2 call relation information 33 in FIG. 9 is used as a list of caller / callee pairs.
[<Main.main (), NewA.a ()>,
<NewA.a (), Bb ()>,
<Aa (), Bb ()>]

図10は、本実施形態における置換元抽出部の処理を説明するための図である。置換元抽出部24は、生成された呼出関係(v1呼出関係情報31、v1c呼出関係情報32)に基づいて、ソースコードv1,v1cの呼出関係の比較を行い、内容に差のあるエッジの呼出元ノードを置換元情報36として保持する。   FIG. 10 is a diagram for explaining processing of the replacement source extraction unit in the present embodiment. Based on the generated call relationship (v1 call relationship information 31, v1c call relationship information 32), the replacement source extraction unit 24 compares the call relationships of the source codes v1 and v1c, and calls the edges having different contents. The original node is held as replacement source information 36.

図10の例では、置換元抽出部24は、v1呼出関係情報31と、v1c呼出関係情報32とを比較し、v1−v1c変更内容34として、追加された呼出関係:A.a -> B.c、削除された呼出関係:無し、を取得する。置換元抽出部24は、v1−v1c変更内容34から、内容に差のあるエッジ(A.a -> B.c)の呼出元ノードA.aを置換元情報36として保持する。   In the example of FIG. 10, the replacement source extraction unit 24 compares the v1 call relation information 31 with the v1c call relation information 32 and adds the call relation: Aa-> Bc, deletion as the v1-v1c change content 34. Called call relationship: None is acquired. The replacement source extraction unit 24 holds, as replacement source information 36, the call source node A.a of the edge (A.a-> B.c) having a difference in content from the v1-v1c change content 34.

図11は、本実施形態における置換先抽出部の処理を説明するための図である。置換先抽出部25は、v1呼出関係情報31、v2呼出関係情報33に基づいて、ソースコードv1,v2の呼出関係の比較を行い、新たに追加されたエッジに含まれるノードを置換先情報37として保持する。   FIG. 11 is a diagram for explaining processing of the replacement destination extraction unit in the present embodiment. The replacement destination extraction unit 25 compares the call relationship between the source codes v1 and v2 based on the v1 call relationship information 31 and the v2 call relationship information 33, and replaces the node included in the newly added edge with the replacement destination information 37. Hold as.

置換先抽出部25は、置換元抽出部24によるソースコードv1,v1cの呼出関係の比較と同様の手法で、ソースコードv1とv2の呼出関係の変更内容を得て、新たに追加されたエッジに含まれるノードを置換先情報として保持する。   The replacement destination extraction unit 25 obtains a change in the call relationship between the source codes v1 and v2 in the same manner as the comparison of the call relationship between the source codes v1 and v1c by the replacement source extraction unit 24, and newly adds an edge. Is stored as replacement destination information.

図11の例では、置換先抽出部25は、v1呼出関係情報31と、v2呼出関係情報33とを比較し、v1−v2変更内容35として、追加された呼出関係:Main.main -> NewA.a、NewA.a -> B.b、削除された呼出関係:Main.main -> A.aを取得する。   In the example of FIG. 11, the replacement destination extraction unit 25 compares the v1 call relation information 31 with the v2 call relation information 33, and adds the call relation: Main.main-> NewA as the v1-v2 change content 35. .a, NewA.a-> Bb, deleted call relation: Main.main-> Aa is acquired.

置換先抽出部25は、v1−v2変更内容35から、新たに追加されたエッジに含まれるノードMain.main、NewA.a、B.bを置換先情報37として保持する。   The replacement destination extraction unit 25 holds, as replacement destination information 37, nodes Main.main, NewA.a, and B.b included in the newly added edge from the v1-v2 change content 35.

図12は、本実施形態における類似度算出部の処理を説明するための図である。類似度算出部26は、v1呼出関係情報31における置換元情報36の各メソッドと、v2呼出関係情報33における置換先情報37の各メソッドとの類似度を算出し、図13に示すように類似度情報38として保持する。   FIG. 12 is a diagram for explaining the processing of the similarity calculation unit in the present embodiment. The similarity calculation unit 26 calculates the similarity between each method of the replacement source information 36 in the v1 call relation information 31 and each method of the replacement destination information 37 in the v2 call relation information 33, and the similarity as shown in FIG. 13. The degree information 38 is retained.

類似度は、(1)呼出元のノードの比較、(2)呼出先のノードの比較、(3)自身のノードの比較の3つの観点から、算出され、その総和とする。   The similarity is calculated from the three viewpoints of (1) comparison of caller nodes, (2) comparison of callee nodes, and (3) comparison of own nodes, and the sum is obtained.

ノードの比較内容は、以下の通りである。
(i)同一ノードである(上記(3)のみ実質発生しない)
(ii)同一のインタフェースを実装したメソッドである。
(iii)メソッド名が同じである。
The contents of node comparison are as follows.
(I) The same node (only (3) above does not occur substantially)
(Ii) A method that implements the same interface.
(Iii) The method name is the same.

比較内容の若い番号ほど類似度が高く、例えば、それぞれ3点、2点、1点と設定されているとする。   It is assumed that the lower the comparison content, the higher the degree of similarity. For example, 3 points, 2 points, and 1 point are set.

図12では、置換元情報36はメソッド「A.a」を含む。置換先情報37は、メソッド「Main.main」、「NewA.a」、「B.b」を含む。ここでは、v1呼出関係情報31における各ノード(A.a)と、v2呼出関係情報33における各ノード(Main.main、NewA.a、B.b)とが比較される。   In FIG. 12, the replacement source information 36 includes a method “A.a”. The replacement destination information 37 includes methods “Main.main”, “NewA.a”, and “B.b”. Here, each node (A.a) in the v1 call relation information 31 and each node (Main.main, NewA.a, B.b) in the v2 call relation information 33 are compared.

まずは、v1呼出関係情報31におけるノード(A.a)42とv2呼出関係情報33におけるノード(Main.main)44との比較について説明する。v1呼出関係情報31のノード(A.a)42に着目すると、ノード(A.a)42の呼出元ノードはノード(Main.main)41であり、呼出先ノードはノード(B.b)43であり、自身はノード(A.a)42である。   First, a comparison between the node (A.a) 42 in the v1 call relationship information 31 and the node (Main.main) 44 in the v2 call relationship information 33 will be described. If attention is paid to the node (Aa) 42 of the v1 call relation information 31, the call source node of the node (Aa) 42 is the node (Main.main) 41, the call destination node is the node (Bb) 43, and the node itself is a node. (Aa) 42.

一方、v2呼出関係情報33のノード(Main.main)44に着目すると、ノード(Main.main)44の呼出元ノードは存在せず、呼出先ノードはノード(NewA.a)45であり、自身はノード(Main.main)44である。   On the other hand, paying attention to the node (Main.main) 44 of the v2 call relation information 33, there is no caller node of the node (Main.main) 44, and the callee node is the node (NewA.a) 45, Is a node (Main.main) 44.

v1呼出関係情報31におけるノード(A.a)42とv2呼出関係情報33におけるノード(Main.main)44との呼出元ノードを比較する。ノード(A.a)42の呼出元ノードがノード(Main.main)41であるのに対して、ノード(Main.main)44の呼出元ノードは存在しないから、上記(i)(ii)(iii)に該当せず、加点はされない。   The call source nodes of the node (A.a) 42 in the v1 call relation information 31 and the node (Main.main) 44 in the v2 call relation information 33 are compared. Since the caller node of the node (Aa) 42 is the node (Main.main) 41, but there is no caller node of the node (Main.main) 44, the above (i) (ii) (iii) Does not fall under, and no points will be awarded.

呼出先ノードを比較すると、ノード(B.b)43とノード(NewA.a)45であり、上記(i)(ii)(iii)に該当せず、加点はされない。   Comparing the call destination nodes, they are the node (B.b) 43 and the node (NewA.a) 45, which do not correspond to the above (i), (ii) and (iii), and are not added.

自身のノードを比較すると、ノード(A.a)42とノード(Main.main)44であり、上記(i)(ii)(iii)に該当せず、加点はされない。   When comparing their own nodes, they are the node (A.a) 42 and the node (Main.main) 44, which do not correspond to the above (i), (ii) and (iii), and are not added.

次に、v1呼出関係情報31におけるノード(A.a)とv2呼出関係情報33におけるノード(NewA.a)との比較について説明する。上述の通り、v1呼出関係情報31のノード(A.a)42について、呼出元ノードは、ノード(Main.main)41、呼出先ノードは、ノード(B.b)43、自身のノードは、ノード(A.a)42である。   Next, a comparison between the node (A.a) in the v1 call relationship information 31 and the node (NewA.a) in the v2 call relationship information 33 will be described. As described above, regarding the node (Aa) 42 of the v1 call relation information 31, the call source node is the node (Main.main) 41, the call destination node is the node (Bb) 43, and its own node is the node (Aa). 42.

一方、v2呼出関係情報33のノード(NewA.a)45に着目すると、ノード(NewA.a)45の呼出元ノードはノード(Main.main)44であり、呼出先ノードはノード(B,b)47であり、自身はノード(NewA.a)45である。   On the other hand, paying attention to the node (NewA.a) 45 of the v2 call relation information 33, the caller node of the node (NewA.a) 45 is the node (Main.main) 44, and the callee node is the node (B, b). ) 47 and itself is a node (NewA.a) 45.

v1呼出関係情報31におけるノード(A.a)とv2呼出関係情報33におけるノード(Main.main)との呼出元ノードを比較すると、ノード(Main.main)41とノード(Main.main)44であり、同一ノードである(上記(i)に該当する)。この場合、3点加算される。   Comparing the call source nodes of the node (Aa) in the v1 call relationship information 31 and the node (Main.main) in the v2 call relationship information 33, the node (Main.main) 41 and the node (Main.main) 44 are obtained. They are the same node (corresponding to (i) above). In this case, three points are added.

呼出先ノードを比較すると、ノード(B.b)43とノード(B.b)47であり、同一ノードである(上記(i)に該当する)。この場合、3点加算される。   Comparing the call destination nodes, the node (B.b) 43 and the node (B.b) 47 are the same node (corresponding to the above (i)). In this case, three points are added.

自身のノードを比較すると、ノード(A.a)42とノード(NewA.a)45であり、同一のメソッド名である(上記(iii)に該当する)。この場合、1点加算される。   When comparing their own nodes, they are the node (A.a) 42 and the node (NewA.a) 45, which have the same method name (corresponding to the above (iii)). In this case, one point is added.

v1呼出関係情報31におけるノード(A.a)42とv2呼出関係情報33におけるノード(B.b)47との比較についても、同様に行う。   The comparison between the node (A.a) 42 in the v1 call relationship information 31 and the node (B.b) 47 in the v2 call relationship information 33 is performed in the same manner.

なお、比較内容に応じた点数の妥当性はアプリケーションプログラムの領域によっても変わる可能性があり、変更しても良い。また、呼出元や呼出先が複数ある場合は、それぞれに対して算出し最も高いものを類似度とする。   Note that the validity of the score according to the comparison contents may change depending on the area of the application program, and may be changed. In addition, when there are a plurality of call sources and call destinations, the highest one is calculated as the similarity.

図13は、本実施形態における類似度情報の一例を示す。類似度情報38は、v1呼出関係情報31における置換元情報36の各ノードと、v2呼出関係情報33における置換先情報37の各ノードとの組合わせ毎に、呼出元ノード同士、呼出先ノード同士、自身のノード同士の比較結果に応じて算出された類似度を保持する。   FIG. 13 shows an example of similarity information in this embodiment. For each combination of each node of the replacement source information 36 in the v1 call relation information 31 and each node of the replacement destination information 37 in the v2 call relation information 33, the similarity information 38 is obtained by calling each other and between the call destination nodes. The degree of similarity calculated according to the comparison result between its own nodes is held.

v1呼出関係情報31におけるノード(A.a)42とv2呼出関係情報33におけるノード(Main.main)44について、図12で述べたように、呼出元ノード同士、呼出先ノード同士、自身のノード同士の比較結果、いずれも上記(i)(ii)(iii)に該当せず、0点である。したがって、この場合も合計値も0点となる。   As described with reference to FIG. 12, the node (Aa) 42 in the v1 call relation information 31 and the node (Main.main) 44 in the v2 call relation information 33 are as follows. As a result of comparison, none of them correspond to the above (i), (ii) and (iii) and are 0 points. Accordingly, in this case, the total value is also 0 points.

v1呼出関係情報31におけるノード(A.a)42とv2呼出関係情報33におけるノード(NewA.a)45については、図12で述べたとおりである。すなわち、呼出元ノード同士は同一ノードであり(3点加算)、呼出先ノード同士は同一ノードであり(3点加算)自身のノード同士は同一メソッド名である(1点加算)。その結果、合計値は7点となる。   The node (A.a) 42 in the v1 call relation information 31 and the node (NewA.a) 45 in the v2 call relation information 33 are as described in FIG. That is, the caller nodes are the same node (addition of 3 points), the callee nodes are the same node (addition of 3 points), and their own nodes have the same method name (addition of 1 point). As a result, the total value is 7 points.

v1呼出関係情報31におけるノード(A.a)42とv2呼出関係情報33におけるノード(B.b)47について、図12で述べたように、呼出元ノード同士、呼出先ノード同士、自身のノード同士の比較結果、いずれも上記(i)(ii)(iii)に該当せず、0点である。したがって、この場合も合計値も0点となる。   As for the node (Aa) 42 in the v1 call relation information 31 and the node (Bb) 47 in the v2 call relation information 33, as shown in FIG. 12, the comparison results between the caller nodes, the callee nodes, and their own nodes. , None of the above (i), (ii) and (iii), and 0 points. Accordingly, in this case, the total value is also 0 points.

結果出力部27は、類似度情報の合計値が予め設定された閾値以上であるペアのv2呼出関係情報33側のノードを修正候補箇所とする。閾値は、閾値情報39として予め登録されている。   The result output unit 27 sets a node on the v2 call relation information 33 side of a pair whose total value of similarity information is equal to or greater than a preset threshold value as a correction candidate location. The threshold is registered in advance as threshold information 39.

例えば、閾値として6が設定されている。この場合、類似度情報の合計値が閾値以上のペアは、ノード(A.a)とノード(NewA.a)であり、このうちv2呼出関係情報33側のノードはノード(NewA.a)である。したがって、ノード(NewA.a)が修正候補箇所となる。   For example, 6 is set as the threshold value. In this case, the pair whose similarity information total value is equal to or greater than the threshold is the node (A.a) and the node (NewA.a), and the node on the v2 call relation information 33 side is the node (NewA.a). Therefore, the node (NewA.a) is a candidate for correction.

また、図10に示すように、v1−v1c変更内容34のうち、閾値以上であるペアのv1側のノードが含まれる呼出先側のノード(B.c)が修正反映対象となる。   Also, as shown in FIG. 10, in the v1-v1c change contents 34, the call-destination side node (B.c) including the v1 side node of the pair that is equal to or greater than the threshold value is subject to correction reflection.

図14は、本実施形態における出力結果部による出力例を示す。図14(A)に示すように、結果出力部27は、上述で得られた修正候補箇所51aを出力する。また、図14(B)に示すように、結果出力部27は、上述で得られた修正候補箇所及び修正反映対象に基づいて、図14に示すように修正候補箇所に対して修正反映対象に関する修正が必要である旨を示す情報52aを出力する。なお、上記では、結果出力部27は、類似度情報の合計値が予め設定された閾値以上であるペアのv2呼出関係情報33側のノードを修正候補箇所としたが、類似度情報の合計値が最も高いペアのv2呼出関係情報33側のノードを修正候補箇所としてもよい。   FIG. 14 shows an output example by the output result unit in the present embodiment. As shown in FIG. 14A, the result output unit 27 outputs the correction candidate portion 51a obtained above. As shown in FIG. 14B, the result output unit 27 relates to the correction reflection target for the correction candidate portion as shown in FIG. 14 based on the correction candidate portion and the correction reflection target obtained above. Information 52a indicating that correction is necessary is output. In the above description, the result output unit 27 sets the node on the v2 call relation information 33 side of the pair whose total value of similarity information is equal to or greater than a preset threshold as a correction candidate location, but the total value of similarity information The node on the v2 call relation information 33 side of the pair with the highest value may be used as a candidate for correction.

図15は、本実施形態の他の例における出力結果部による出力例を示す。まず、出力結果部27は、類似度情報の合計値が予め設定された閾値以上であるペアのv2呼出関係情報33側の複数のノードを修正候補箇所とする。   FIG. 15 shows an output example by the output result unit in another example of the present embodiment. First, the output result unit 27 sets a plurality of nodes on the side of the v2 call relationship information 33 of the pair whose total value of similarity information is equal to or greater than a preset threshold as correction candidate locations.

それから、図15(A)に示すように、結果出力部27は、類似度の合計値の高い順に、その複数の修正候補箇所を並べて格納した置換候補リスト51bを出力する。置換候補リスト51bでは、類似度が閾値以上の修正候補箇所について、より類似度の合計値の高い修正候補箇所が、より優先順位が高くなるように登録されている。なお、設計仕様によっては、類似度情報の合計値を閾値で足切りしなくてもよい。   Then, as shown in FIG. 15A, the result output unit 27 outputs a replacement candidate list 51b in which the plurality of correction candidate portions are arranged and stored in descending order of the total value of the similarities. In the replacement candidate list 51b, correction candidate locations having a higher similarity score are registered so that the priority is higher for the correction candidate locations having a similarity equal to or higher than the threshold. Depending on the design specifications, the total value of the similarity information may not be cut off by the threshold value.

また、結果出力部27は、置換候補リスト51bに登録された各修正候補箇所に対応する修正反映対象を取得する。そして、結果出力部27は、修正候補箇所及び修正反映対象に基づいて、図15(B)に示すように修正候補箇所に対して修正反映対象に関する修正が必要である旨を示す情報52bを優先順位順に出力してもよい。   In addition, the result output unit 27 acquires a correction reflection target corresponding to each correction candidate location registered in the replacement candidate list 51b. Then, the result output unit 27 gives priority to the information 52b indicating that the correction candidate portion needs to be corrected with respect to the correction candidate portion as shown in FIG. 15B based on the correction candidate portion and the correction reflection target. You may output in order of order.

図16は、本実施形態における全体の処理のフローチャートを示す。ソースコード取得部22は、図8で説明したように、ソースコードv1,v1c,v2を取得する(S1)。   FIG. 16 shows a flowchart of overall processing in the present embodiment. As described with reference to FIG. 8, the source code acquisition unit 22 acquires the source codes v1, v1c, and v2 (S1).

呼出関係生成部23は、図9で説明したように、ソースコードv1,v1c,v2それぞれの呼出関係情報(v1呼出関係情報31、v1c呼出関係情報32、v2呼出関係情報33)を生成する(S2)。   As described with reference to FIG. 9, the call relationship generation unit 23 generates call relationship information (v1 call relationship information 31, v1c call relationship information 32, v2 call relationship information 33) of the source codes v1, v1c, and v2 ( S2).

置換元抽出部24は、図10で説明したように、v1呼出関係情報31と、v1c呼出関係情報32との比較から、置換元情報36を抽出する(S3)。S3の詳細については、図17で説明する。   As described with reference to FIG. 10, the replacement source extraction unit 24 extracts the replacement source information 36 from the comparison between the v1 call relationship information 31 and the v1c call relationship information 32 (S3). Details of S3 will be described with reference to FIG.

置換先抽出部25は、図11で説明したように、v1呼出関係情報31とv2呼出関係情報33との比較から置換先情報を抽出する(S4)。S4の詳細については、図18で説明する。   As described with reference to FIG. 11, the replacement destination extraction unit 25 extracts replacement destination information from the comparison between the v1 call relationship information 31 and the v2 call relationship information 33 (S4). Details of S4 will be described with reference to FIG.

類似度算出部26は、図12で説明したように、v1呼出関係情報31における置換元情報の各メソッドと、v2呼出関係情報33における置換先情報の各メソッドとの類似度を算出する(S5)。S5の詳細については、図19、図20で説明する。   As described with reference to FIG. 12, the similarity calculation unit 26 calculates the similarity between each method of the replacement source information in the v1 call relationship information 31 and each method of the replacement destination information in the v2 call relationship information 33 (S5). ). Details of S5 will be described with reference to FIGS.

結果出力部27は、図15(A)で説明したように、類似度が閾値以上のすべての置換先情報のメソッドを類似度の高い順に配置した置換候補リスト51bを出力する(S6)。さらに、結果出力部27は、置換候補リスト51bに登録された各修正候補箇所に対応する修正反映対象を取得する。そして、結果出力部27は、修正候補箇所及び修正反映対象に基づいて、図15(B)に示すように修正候補箇所に対して修正反映対象に関する修正が必要である旨を示す情報52bを優先順位順に出力してもよい。   As described with reference to FIG. 15A, the result output unit 27 outputs a replacement candidate list 51b in which all methods of replacement destination information having a similarity equal to or greater than a threshold are arranged in descending order of similarity (S6). Further, the result output unit 27 acquires the correction reflection target corresponding to each correction candidate location registered in the replacement candidate list 51b. Then, the result output unit 27 gives priority to the information 52b indicating that the correction candidate portion needs to be corrected with respect to the correction candidate portion as shown in FIG. 15B based on the correction candidate portion and the correction reflection target. You may output in order of order.

なお、上記S6では、図15のケースについて出力する場合を例に説明したが、図14のケースについて出力してもよい。   In S6, the case of outputting the case of FIG. 15 has been described as an example, but the case of FIG. 14 may be output.

図17は、S3の処理の詳細フローチャートである。置換元抽出部24は、v1呼出関係情報31とv1c呼出関係情報32とを取得する(S3−1、S3−2)。置換元抽出部24は、v1呼出関係情報31とv1c呼出関係情報32とを比較する(S3−3)。   FIG. 17 is a detailed flowchart of the process of S3. The replacement source extraction unit 24 acquires the v1 call relationship information 31 and the v1c call relationship information 32 (S3-1, S3-2). The replacement source extraction unit 24 compares the v1 call relationship information 31 and the v1c call relationship information 32 (S3-3).

置換先抽出部25は、v1呼出関係情報31とv1c呼出関係情報32との差分のエッジがあるか否かを判定する(S3−4)。v1呼出関係情報31とv1c呼出関係情報32との差分のエッジがない場合(S3−4で「NO」)、本フローは終了する。   The replacement destination extraction unit 25 determines whether there is a difference edge between the v1 call relationship information 31 and the v1c call relationship information 32 (S3-4). If there is no difference edge between the v1 call relationship information 31 and the v1c call relationship information 32 (“NO” in S3-4), this flow ends.

v1呼出関係情報31とv1c呼出関係情報32との差分のエッジがある場合(S3−4で「YES」)、置換元抽出部24は、その差分エッジをv1−v1c変更内容34として抽出する(S3−5)。   If there is a difference edge between the v1 call relationship information 31 and the v1c call relationship information 32 (“YES” in S3-4), the replacement source extraction unit 24 extracts the difference edge as the v1-v1c change content 34 ( S3-5).

置換元抽出部24は、抽出した差分エッジの起点側のノードを置換元情報36として記憶部に格納する(S3−6)。   The replacement source extraction unit 24 stores the extracted node on the origin side of the difference edge as replacement source information 36 in the storage unit (S3-6).

図18は、S4の処理の詳細フローチャートである。置換先抽出部25は、v1呼出関係情報31とv2呼出関係情報33とを取得する(S4−1、S4−2)。   FIG. 18 is a detailed flowchart of the process of S4. The replacement destination extraction unit 25 acquires the v1 call relationship information 31 and the v2 call relationship information 33 (S4-1, S4-2).

置換先抽出部25は、v1呼出関係情報31とv2呼出関係情報33を比較する(S4−3)。v1呼出関係情報31とv2呼出関係情報33との差分のエッジがある場合、置換先抽出部25は、差分エッジをv1−v2変更内容35として抽出する(S4−4)。   The replacement destination extraction unit 25 compares the v1 call relationship information 31 with the v2 call relationship information 33 (S4-3). When there is a difference edge between the v1 call relation information 31 and the v2 call relation information 33, the replacement destination extraction unit 25 extracts the difference edge as the v1-v2 change content 35 (S4-4).

置換先抽出部25は、v1−v2変更内容35において、v2呼出関係情報33にのみ存在するエッジがあるか否かを判定する(S4−5)。v1−v2変更内容35において、v2呼出関係情報33にのみ存在するエッジがない場合(S4−5で「NO」)、本フローは終了する。   The replacement destination extraction unit 25 determines whether there is an edge that exists only in the v2 call relation information 33 in the v1-v2 change content 35 (S4-5). In the v1-v2 change content 35, when there is no edge that exists only in the v2 call relation information 33 ("NO" in S4-5), this flow ends.

v1−v2変更内容35において、v2呼出関係情報33にのみ存在するエッジがある場合(S4−5で「YES」)、置換先抽出部25は、そのv2呼出関係情報33にのみ存在するエッジの起点・終点双方のノードを置換先情報37として格納する(S4−6)。   In the v1-v2 change content 35, when there is an edge that exists only in the v2 call relation information 33 ("YES" in S4-5), the replacement destination extraction unit 25 selects an edge that exists only in the v2 call relation information 33. Both the start and end nodes are stored as replacement destination information 37 (S4-6).

図19は、S5の処理の詳細フローチャートである。類似度算出部26は、置換元情報36と置換先情報37を取得する(S5−1)。類似度算出部26は、置換元情報36に含まれるノードと、置換先情報37に含まれるノードとの直積集合を求める(S5−2)。   FIG. 19 is a detailed flowchart of the process of S5. The similarity calculation unit 26 acquires replacement source information 36 and replacement destination information 37 (S5-1). The similarity calculation unit 26 obtains a Cartesian product set of the node included in the replacement source information 36 and the node included in the replacement destination information 37 (S5-2).

類似度算出部26は、直積集合の全組について、類似度の算出処理を行い(S5−3)、類似度を類似度情報38として記憶部に格納する(S5−4)。   The similarity calculation unit 26 performs similarity calculation processing for all the sets of Cartesian product sets (S5-3), and stores the similarity in the storage unit as similarity information 38 (S5-4).

図20は、S5−3の処理の詳細フローチャートである。類似度算出部26は、類似度を0で初期化する(S5−3−1)。   FIG. 20 is a detailed flowchart of the process of S5-3. The similarity calculation unit 26 initializes the similarity with 0 (S5-3-1).

類似度算出部26は、1組の集合に含まれる2要素それぞれの呼出元のノード(A)を取得する(S5−3−2)。類似度算出部26は、その2要素それぞれの呼出先のノード(B)を取得する(S5−3−3)。   The similarity calculation unit 26 acquires the caller node (A) of each of the two elements included in one set (S5-3-2). The similarity calculation unit 26 acquires a call destination node (B) of each of the two elements (S5-3-3).

類似度算出部26は、2要素間、呼出元のノード(A)間、呼出先のノード(B)間のそれぞれについて、ノードが同一か、インタフェースが同一か、メソッドが同一かの判定を行う(S5−3−4、S5−3−6、S5−3−8)。   The similarity calculation unit 26 determines whether the node is the same, the interface is the same, or the method is the same between the two elements, the caller node (A), and the callee node (B). (S5-3-4, S5-3-6, S5-3-8).

比較する2つのノードが同一である場合、類似度算出部26は、類似度に3を加算する(S5−3−5)。比較する2つのノードのインタフェースが同一である場合、類似度算出部26は、類似度に2を加算する(S5−3−7)。比較する2つのノードのメソッド名が同一である場合、類似度算出部26は、類似度に1を加算する(S5−3−5)。   When the two nodes to be compared are the same, the similarity calculation unit 26 adds 3 to the similarity (S5-3-5). When the interfaces of the two nodes to be compared are the same, the similarity calculation unit 26 adds 2 to the similarity (S5-3-7). When the method names of the two nodes to be compared are the same, the similarity calculation unit 26 adds 1 to the similarity (S5-3-5).

図21は、本実施形態におけるプログラムを実行するコンピュータのハードウェア環境の構成ブロック図の一例である。コンピュータ60は、ソフトウェア開発支援装置11,変更箇所検出装置21として機能する。コンピュータ60は、CPU62、ROM63、RAM66、通信I/F64、記憶装置67、出力I/F61、入力I/F65、読取装置68、バス69、出力装置71、入力装置72によって構成されている。   FIG. 21 is an example of a configuration block diagram of a hardware environment of a computer that executes a program according to the present embodiment. The computer 60 functions as the software development support device 11 and the change location detection device 21. The computer 60 includes a CPU 62, a ROM 63, a RAM 66, a communication I / F 64, a storage device 67, an output I / F 61, an input I / F 65, a reading device 68, a bus 69, an output device 71, and an input device 72.

ここで、CPUは、中央演算装置を示す。ROMは、リードオンリメモリを示す。RAMは、ランダムアクセスメモリを示す。I/Fは、インタフェースを示す。バス69には、CPU62、ROM63、RAM66、通信I/F64、記憶装置67、出力I/F61、入力I/F65、及び読取装置68が接続されている。読取装置68は、可搬型記録媒体を読み出す装置である。出力装置71は、出力I/F61に接続されている。入力装置72は、入力I/F65に接続されている。   Here, CPU indicates a central processing unit. ROM indicates a read-only memory. RAM indicates random access memory. I / F indicates an interface. A CPU 62, ROM 63, RAM 66, communication I / F 64, storage device 67, output I / F 61, input I / F 65, and reading device 68 are connected to the bus 69. The reading device 68 is a device that reads a portable recording medium. The output device 71 is connected to the output I / F 61. The input device 72 is connected to the input I / F 65.

記憶装置67としては、ハードディスク、フラッシュメモリ、磁気ディスクなど様々な形式の記憶装置を使用することができる。記憶装置67またはROM63には、CPU62を取得部12、第1の抽出部13、第2の抽出部14、算出部15、出力制御部16として機能させる本実施形態に係るプログラムが格納されている。より具体的には、記憶装置67またはROM63には、ソースコード取得部22、呼出関係生成部23、置換元抽出部24、置換先抽出部25、類似度算出部26、結果出力部27として機能させる本実施形態に係るプログラムが格納されている。また、記憶装置67には、修正候補箇所51a、置換候補リスト51b、修正候補箇所に対して修正反映対象に関する修正が必要である旨を示す情報52a,52bが格納されてもよい。   As the storage device 67, various types of storage devices such as a hard disk, a flash memory, and a magnetic disk can be used. The storage device 67 or the ROM 63 stores a program according to the present embodiment that causes the CPU 62 to function as the acquisition unit 12, the first extraction unit 13, the second extraction unit 14, the calculation unit 15, and the output control unit 16. . More specifically, the storage device 67 or the ROM 63 functions as the source code acquisition unit 22, the call relationship generation unit 23, the replacement source extraction unit 24, the replacement destination extraction unit 25, the similarity calculation unit 26, and the result output unit 27. A program according to the present embodiment is stored. In addition, the storage device 67 may store the correction candidate location 51a, the replacement candidate list 51b, and information 52a and 52b indicating that the correction candidate location needs to be corrected regarding the correction reflection target.

RAM66には、情報が一時的に記憶される。RAM66は、v1呼出関係情報31、v1c呼出関係情報32、v2呼出関係情報33、v1−v1c変更内容34、v1−v2変更内容35、置換元情報36、置換先情報37、類似度情報38、閾値情報39を格納する。   Information is temporarily stored in the RAM 66. The RAM 66 stores v1 call relation information 31, v1c call relation information 32, v2 call relation information 33, v1-v1c change contents 34, v1-v2 change contents 35, replacement source information 36, replacement destination information 37, similarity information 38, Threshold information 39 is stored.

CPU62は、記憶装置67またはROM63から本実施形態に係るプログラムを読み出し、当該プログラムを実行する。   The CPU 62 reads out the program according to the present embodiment from the storage device 67 or the ROM 63 and executes the program.

通信I/F64は、ネットワークと接続して他の装置と通信するためのポート等のインタフェースである。   The communication I / F 64 is an interface such as a port for connecting to a network and communicating with other devices.

上記実施形態で説明した処理を実現するプログラムは、プログラム提供者側から通信ネットワーク70、および通信I/F64を介して、例えば記憶装置67に格納されてもよい。また、上記実施形態で説明した処理を実現するプログラムは、市販され、流通している可搬型記憶媒体に格納されていてもよい。この場合、この可搬型記憶媒体は読取装置68にセットされて、CPU62によってそのプログラムが読み出されて、実行されてもよい。可搬型記憶媒体としてはCD−ROM、フレキシブルディスク、光ディスク、光磁気ディスク、ICカード、USBメモリ装置、半導体メモリカードなど様々な形式の記憶媒体を使用することができる。このような記憶媒体に格納されたプログラムが読取装置68によって読み取られる。   The program for realizing the processing described in the above embodiment may be stored in, for example, the storage device 67 from the program provider side via the communication network 70 and the communication I / F 64. Moreover, the program which implement | achieves the process demonstrated by the said embodiment may be stored in the portable storage medium marketed and distribute | circulated. In this case, the portable storage medium may be set in the reading device 68 and the program read by the CPU 62 and executed. As a portable storage medium, various types of storage media such as a CD-ROM, a flexible disk, an optical disk, a magneto-optical disk, an IC card, a USB memory device, and a semiconductor memory card can be used. The program stored in such a storage medium is read by the reading device 68.

入力装置72には、キーボード、マウス、電子カメラ、ウェブカメラ、マイク、スキャナ、センサ、タブレット、タッチパネルなどを用いることが可能である。また、出力装置71には、ディスプレイ、プリンタ、スピーカなどを用いることが可能である。   As the input device 72, a keyboard, a mouse, an electronic camera, a web camera, a microphone, a scanner, a sensor, a tablet, a touch panel, or the like can be used. The output device 71 can be a display, a printer, a speaker, or the like.

ネットワーク70は、インターネット、LAN、WAN、専用線、有線、無線等の通信網であってよい。   The network 70 may be a communication network such as the Internet, a LAN, a WAN, a dedicated line, a wired line, and a wireless line.

本実施形態によれば、更新追従時に修正が必要となるファイル(クラスやメソッド)の抽出を広範囲に行えるようになる。   According to the present embodiment, files (classes and methods) that need to be corrected at the time of update tracking can be extracted over a wide range.

なお、本発明は、以上に述べた実施の形態に限定されるものではなく、本発明の要旨を逸脱しない範囲内で種々の構成または実施形態を取ることができる。   The present invention is not limited to the above-described embodiment, and various configurations or embodiments can be taken without departing from the gist of the present invention.

11 ソフトウェア開発支援装置
12 取得部
13 第1の抽出部
14 第2の抽出部
15 算出部
16 出力制御部
21 変更箇所検出装置
22 ソースコード取得部
23 呼出関係生成部
24 置換元抽出
25 置換先抽出部
26 類似度算出部
27 結果出力部
28 入力I/F
29 出力I/F
31 v1呼出関係情報
32 v1c呼出関係情報
33 v2呼出関係情報
34 v1−v1c変更内容
35 v1−v2変更内容
36 置換元情報
37 置換先情報
38 類似度情報
39 閾値情報
DESCRIPTION OF SYMBOLS 11 Software development support apparatus 12 Acquisition part 13 1st extraction part 14 2nd extraction part 15 Calculation part 16 Output control part 21 Change location detection apparatus 22 Source code acquisition part 23 Call relation generation part 24 Replacement source extraction 25 Replacement destination extraction Part 26 similarity calculation part 27 result output part 28 input I / F
29 Output I / F
31 v1 call relation information 32 v1c call relation information 33 v2 call relation information 34 v1-v1c change contents 35 v1-v2 change contents 36 Replacement source information 37 Replacement destination information 38 Similarity information 39 Threshold information

Claims (5)

コンピュータに、
第1のソースコードと、該第1のソースコードをカスタマイズした第2のソースコードと、該第1のソースコードとバージョンが異なる第3のソースコードとを取得し、
前記第1のソースコードに含まれる機能の呼出元及び呼出先を対のノードとする第1の呼出関係と前記第2のソースコードに含まれる機能の呼出元及び呼出先を対のノードとする第2の呼出関係との差分のノード対を抽出し、抽出した該ノード対のうち呼出元のノードを第1の集合に保持し、
前記第1の呼出関係と前記第3のソースコードに含まれる機能の呼出元及び呼出先を対のノードとする第3の呼出関係との差分のノード対を抽出し、抽出した該ノード対の呼出元及び呼出先のノードを第2の集合に保持し、
所定のルールに基づいて、前記第1の呼出関係における前記第1の集合に含まれる各ノードと、前記第3の呼出関係における前記第2の集合に含まれる各ノードとを組み合わせたノード対のそれぞれの類似度を算出し、
前記第2の集合に含まれるノードを、前記類似度の高い順に、出力する
処理を実行させるソフトウェア開発支援プログラム。
On the computer,
Obtaining a first source code, a second source code obtained by customizing the first source code, and a third source code having a version different from that of the first source code;
A first call relationship in which a function call source and a call destination included in the first source code are paired nodes and a function call source and a call destination included in the second source code are set as a pair node. A node pair that is different from the second call relationship is extracted, and the caller node of the extracted node pairs is held in the first set;
A node pair of a difference between the first call relationship and a third call relationship having a call source and a call destination of a function included in the third source code as a pair node is extracted, and the extracted node pair Keep the caller and callee nodes in the second set;
Based on a predetermined rule, a node pair that combines each node included in the first set in the first call relationship and each node included in the second set in the third call relationship Calculate each similarity,
A software development support program for executing a process of outputting nodes included in the second set in descending order of similarity.
前記類似度の算出において、前記組み合わせたノード対毎に、該組み合わせたノード対に含まれるノード同士、該組み合わせたノード対の各ノードの呼出元のノード同士、及び該組み合わせたノード対の各ノードの呼出先のノード同士を比較し、比較したノード対のそれぞれが、同一ノードであるか否か、同一のインタフェースを実装したメソッドであるか否か、またはメソッド名が同一であるか否かに応じて類似度の値が規定されている前記所定のルールに基づいて、比較したノード対のそれぞれに該類似度を付与し、該比較したノード対のそれぞれに付与された類似度の合計値を前記組み合わせたノード対の類似度とする
ことを特徴とする請求項1に記載のソフトウェア開発支援プログラム。
In the calculation of the similarity, for each combined node pair, the nodes included in the combined node pair, the caller nodes of each node of the combined node pair, and each node of the combined node pair Call destination nodes of each other, and whether each of the compared node pairs is the same node, whether the methods implement the same interface, or whether the method names are the same The similarity is assigned to each of the compared node pairs based on the predetermined rule in which the value of the similarity is defined, and the total value of the similarities assigned to each of the compared node pairs is calculated. The software development support program according to claim 1, wherein the similarity of the combined node pair is used.
前記出力において、前記第2の集合に含まれるノードを修正候補箇所として出力すると共に、前記第1の集合のうち、前記組み合わせたノード対に含まれる呼出元のノードであって、前記第1の呼出関係と前記第2の呼出関係との差分のノード対のうち該呼出元のノードに対応する呼出先のノードを、前記修正候補箇所に対する修正反映対象として出力する
ことを特徴とする請求項1または2に記載のソフトウェア開発支援プログラム。
In the output, the node included in the second set is output as a correction candidate portion, and the caller node included in the combined node pair in the first set, 2. The call destination node corresponding to the call source node in the difference node pair between the call relationship and the second call relationship is output as a correction reflection target for the correction candidate portion. Or the software development support program described in 2.
第1のソースコードと、該第1のソースコードをカスタマイズした第2のソースコードと、該第1のソースコードとバージョンが異なる第3のソースコードとを取得する取得部と、
前記第1のソースコードに含まれる機能の呼出元及び呼出先を対のノードとする第1の呼出関係と前記第2のソースコードに含まれる機能の呼出元及び呼出先を対のノードとする第2の呼出関係との差分のノード対を抽出し、抽出した該ノード対のうち呼出元のノードを第1の集合に保持する第1の抽出部と、
前記第1の呼出関係と前記第3のソースコードに含まれる機能の呼出元及び呼出先を対のノードとする第3の呼出関係との差分のノード対を抽出し、抽出した該ノード対の呼出元及び呼出先のノードを第2の集合に保持する第2の抽出部と、
所定のルールに基づいて、前記第1の呼出関係における前記第1の集合に含まれる各ノードと、前記第3の呼出関係における前記第2の集合に含まれる各ノードとを組み合わせたノード対のそれぞれの類似度を算出する算出部と、
前記第2の集合に含まれるノードを、前記類似度の高い順に、出力する出力制御部と、
を備えることを特徴とするソフトウェア開発支援装置。
An obtaining unit for obtaining a first source code, a second source code obtained by customizing the first source code, and a third source code having a version different from that of the first source code;
A first call relationship in which a function call source and a call destination included in the first source code are paired nodes and a function call source and a call destination included in the second source code are set as a pair node. A first extraction unit that extracts a node pair that is different from the second call relationship and holds the caller node of the extracted node pair in a first set;
A node pair of a difference between the first call relationship and a third call relationship having a call source and a call destination of a function included in the third source code as a pair node is extracted, and the extracted node pair A second extractor that holds the caller and callee nodes in a second set;
Based on a predetermined rule, a node pair that combines each node included in the first set in the first call relationship and each node included in the second set in the third call relationship A calculation unit for calculating each similarity,
An output control unit for outputting the nodes included in the second set in descending order of the similarity;
A software development support apparatus comprising:
コンピュータが、
第1のソースコードと、該第1のソースコードをカスタマイズした第2のソースコードと、該第1のソースコードとバージョンが異なる第3のソースコードとを取得し、
前記第1のソースコードに含まれる機能の呼出元及び呼出先を対のノードとする第1の呼出関係と前記第2のソースコードに含まれる機能の呼出元及び呼出先を対のノードとする第2の呼出関係との差分のノード対を抽出し、抽出した該ノード対のうち呼出元のノードを第1の集合に保持し、
前記第1の呼出関係と前記第3のソースコードに含まれる機能の呼出元及び呼出先を対のノードとする第3の呼出関係との差分のノード対を抽出し、抽出した該ノード対の呼出元及び呼出先のノードを第2の集合に保持し、
所定のルールに基づいて、前記第1の呼出関係における前記第1の集合に含まれる各ノードと、前記第3の呼出関係における前記第2の集合に含まれる各ノードとを組み合わせたノード対のそれぞれの類似度を算出し、
前記第2の集合に含まれるノードを、前記類似度の高い順に、出力する
処理を実行するソフトウェア開発支援方法。
Computer
Obtaining a first source code, a second source code obtained by customizing the first source code, and a third source code having a version different from that of the first source code;
A first call relationship in which a function call source and a call destination included in the first source code are paired nodes and a function call source and a call destination included in the second source code are set as a pair node. A node pair that is different from the second call relationship is extracted, and the caller node of the extracted node pairs is held in the first set;
A node pair of a difference between the first call relationship and a third call relationship having a call source and a call destination of a function included in the third source code as a pair node is extracted, and the extracted node pair Keep the caller and callee nodes in the second set;
Based on a predetermined rule, a node pair that combines each node included in the first set in the first call relationship and each node included in the second set in the third call relationship Calculate each similarity,
A software development support method for executing a process of outputting nodes included in the second set in descending order of the similarity.
JP2015168700A 2015-08-28 2015-08-28 Software development support program, software development support device, and software development support method Active JP6507940B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015168700A JP6507940B2 (en) 2015-08-28 2015-08-28 Software development support program, software development support device, and software development support method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015168700A JP6507940B2 (en) 2015-08-28 2015-08-28 Software development support program, software development support device, and software development support method

Publications (2)

Publication Number Publication Date
JP2017045354A true JP2017045354A (en) 2017-03-02
JP6507940B2 JP6507940B2 (en) 2019-05-08

Family

ID=58212076

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015168700A Active JP6507940B2 (en) 2015-08-28 2015-08-28 Software development support program, software development support device, and software development support method

Country Status (1)

Country Link
JP (1) JP6507940B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020038586A (en) * 2018-09-06 2020-03-12 日本電気株式会社 Determination device, determination method, and determination program
CN112099838A (en) * 2019-06-17 2020-12-18 腾讯科技(深圳)有限公司 Method, device and storage medium for determining version difference

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060130047A1 (en) * 2004-11-30 2006-06-15 Microsoft Corporation System and apparatus for software versioning
JP2012230512A (en) * 2011-04-26 2012-11-22 Hitachi Ltd System for displaying correspondence table between change frequency in each function in source code and complexity
WO2013088461A1 (en) * 2011-12-12 2013-06-20 株式会社 日立製作所 Software analysis program and software analysis system
JP2015076025A (en) * 2013-10-11 2015-04-20 株式会社日立製作所 Program upgrade assistance method and program upgrade assistance system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060130047A1 (en) * 2004-11-30 2006-06-15 Microsoft Corporation System and apparatus for software versioning
JP2012230512A (en) * 2011-04-26 2012-11-22 Hitachi Ltd System for displaying correspondence table between change frequency in each function in source code and complexity
WO2013088461A1 (en) * 2011-12-12 2013-06-20 株式会社 日立製作所 Software analysis program and software analysis system
JP2015076025A (en) * 2013-10-11 2015-04-20 株式会社日立製作所 Program upgrade assistance method and program upgrade assistance system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
SUNGHUM KIM ET AL.: "When Functions Change Their Names: Automatic Detection of Origin Relationship", 12TH WORKING CONFERENCE ON REVERSE ENGINEERING (WCRE'05), JPN6019002979, 11 November 2005 (2005-11-11), US, pages pages:1-10 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020038586A (en) * 2018-09-06 2020-03-12 日本電気株式会社 Determination device, determination method, and determination program
JP7230378B2 (en) 2018-09-06 2023-03-01 日本電気株式会社 Determination device, determination method and determination program
CN112099838A (en) * 2019-06-17 2020-12-18 腾讯科技(深圳)有限公司 Method, device and storage medium for determining version difference
CN112099838B (en) * 2019-06-17 2023-08-15 腾讯科技(深圳)有限公司 Method, device and storage medium for determining version difference

Also Published As

Publication number Publication date
JP6507940B2 (en) 2019-05-08

Similar Documents

Publication Publication Date Title
JP5970617B2 (en) Development support system
US20170068676A1 (en) Layer Identification and Dependency Analysis for Management of Images
JP6996629B2 (en) Verification automation equipment, verification automation methods, and programs
JP2014191641A (en) Installation program and installation method
US10977031B2 (en) Method for a software development system
TWI711969B (en) Computational accelerator system, method and non-transitory machine-readable medium for facilitating change management of works in a model-based system engineering (mbse) system
US10229267B2 (en) Method and device for virus identification, nonvolatile storage medium, and device
US9298451B2 (en) Non-transitory computer-readable recording medium storing application development support program and application development support system that automatically support platform version
JP6507940B2 (en) Software development support program, software development support device, and software development support method
JPWO2019026248A1 (en) Program development support apparatus, program development support method, and program development support program
JP2020060919A (en) System migration support device, system migration support method and program
US9335990B2 (en) Method, a system, and a non-transitory computer-readable medium for supporting application development
JP2014130546A (en) File management program, file management device and file management method
JP6989014B2 (en) System configuration derivation device, method and program
JP2015075876A (en) Design support device, design support method and program
JP2014182462A (en) Information processor, information processing method, and information processing program
JP2017151594A (en) Supporting device, supporting method, and program
US20220206934A1 (en) Test apparatus, test method and program
JP5758262B2 (en) Similar document visualization apparatus, similar document visualization method, and program
JP2020160854A (en) Code management system, and code management method
WO2022254729A1 (en) Analyzing device, analyzing method, and analyzing program
CN117648198B (en) Application adaptation method, device, equipment and storage medium
CN115309785B (en) File rule engine library generation method, file information detection method, device and equipment
JP2013142971A (en) Device and method for processing program
JP6574156B2 (en) Terminal device, event generation method, and event generation method program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180514

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20190131

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20190205

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20190207

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20190305

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20190318

R150 Certificate of patent or registration of utility model

Ref document number: 6507940

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150