JP7469999B2 - Search device, search method, and search program - Google Patents

Search device, search method, and search program Download PDF

Info

Publication number
JP7469999B2
JP7469999B2 JP2020151724A JP2020151724A JP7469999B2 JP 7469999 B2 JP7469999 B2 JP 7469999B2 JP 2020151724 A JP2020151724 A JP 2020151724A JP 2020151724 A JP2020151724 A JP 2020151724A JP 7469999 B2 JP7469999 B2 JP 7469999B2
Authority
JP
Japan
Prior art keywords
candidate
input
sorting
search
correction
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.)
Active
Application number
JP2020151724A
Other languages
Japanese (ja)
Other versions
JP2022045948A5 (en
JP2022045948A (en
Inventor
康勢 高井
正恭 加藤
岐勇 飯島
義勝 斎藤
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP2020151724A priority Critical patent/JP7469999B2/en
Publication of JP2022045948A publication Critical patent/JP2022045948A/en
Publication of JP2022045948A5 publication Critical patent/JP2022045948A5/ja
Application granted granted Critical
Publication of JP7469999B2 publication Critical patent/JP7469999B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Description

本発明は、情報を検索する検索装置、検索方法、および検索プログラムに関する。 The present invention relates to a search device, a search method, and a search program for searching information.

あるシステムで不具合が発生した際に、当該システムの他の部分や他のシステムで類似の不具合が発生しないか確認するという「類似見直し」が行われることがある。類似見直しにより、類似の不具合が発生する可能性がある場合には当該類似の不具合箇所は修正され、システムの品質向上が実現す。しかしながら、見直し対象となる不具合は多様なため、機械的な支援が難しく、人手による類似見直しが行われている。人手による類似見直しには膨大な工数がかかり、問題となっている。類似見直しを機械化する先行技術として、特許文献1がある。 When a malfunction occurs in a system, a "similarity review" is sometimes performed to check whether a similar malfunction occurs in other parts of the system or in other systems. If a similar review finds that there is a possibility of a similar malfunction occurring, the similar malfunction is corrected, improving the quality of the system. However, because the types of malfunctions that are subject to review are diverse, mechanical support is difficult, and so a similarity review is performed manually. Manual similarity reviews require a huge amount of work, which is problematic. Patent Document 1 is an example of prior art that mechanizes similarity reviews.

特許文献1は、脆弱なライブラリが適切に用いられていない箇所のみを検出する脆弱性監査装置を開示する。この脆弱性監査装置は、脆弱性に関する判定ルールであって、関数名と、該関数の引数であって不正な値が設定され得る引数の位置とが対応付けて予め定義される判定ルールを格納した記憶部から、前記判定ルールを読み込み、被監査プログラムの構文解析等を行い、前記構文解析が行われた被監査プログラムにおいて、値が外部から入力される変数を抽出し、処理フローに沿って追跡し、前記判定ルールに定義された関数及び該関数の引数の位置に、前記追跡された変数が使用されている場合に、該変数が比較演算子を含む条件式に用いられているか否か等を判定し、前記判定が否である場合に、警告メッセージを生成し、画面又はファイルに出力する。 Patent Document 1 discloses a vulnerability auditing device that detects only those places where a vulnerable library is not used appropriately. This vulnerability auditing device reads a vulnerability-related judgment rule from a storage unit that stores the judgment rule, which is a predefined judgment rule that associates a function name with the position of the argument of the function where an invalid value may be set, performs syntax analysis of the audited program, extracts variables whose values are input from outside in the audited program that has been subjected to the syntax analysis, tracks them along the processing flow, and, if the tracked variable is used in a function defined in the judgment rule and in the position of the argument of the function, judges whether the variable is used in a conditional expression including a comparison operator, and if the judgment is negative, generates a warning message and outputs it to a screen or file.

特開2011-150716号公報JP 2011-150716 A

特許文献1では、機械化可能な類似見直しが限定的である。また、データ依存や制御依存がある部分を特定できないため、類似の不具合が発生するか否かの判断に必要な箇所は、個別に人手で探し出さなければならない。さらに、類似見直し箇所が複数ある場合、当該技術を複数回実施する必要があり、類似見直し箇所は数百件に上ることもある。また、類似見直し箇所に限らず、任意の箇所を検索する場合についても同様である。 In Patent Document 1, the similarity review that can be mechanized is limited. In addition, because it is not possible to identify parts with data dependency or control dependency, parts necessary for determining whether a similar defect occurs must be individually located manually. Furthermore, if there are multiple similar review parts, the technology must be implemented multiple times, and the number of similar review parts may reach several hundred. The same is true when searching for any part, not just similar review parts.

本発明は、検索効率の向上を図ることを目的とする。 The present invention aims to improve search efficiency.

本願において開示される発明の一側面となる検索装置は、プロセッサと、前記プロセッサがアクセス可能な記憶デバイスと、を有する検索装置であって、前記プロセッサは、ソースコード内の修正候補箇所を検索するための候補条件に基づいて、前記ソースコードから前記修正候補箇所を検索する検索処理と、前記候補条件とのプログラム上の依存関係と、前記候補条件に一致した修正候補箇所または不一致な修正候補箇所に付与すべき属性と、の入力を受け付ける入力処理と、前記入力処理によって入力された依存関係に関する仕分条件に一致した修正候補箇所については、前記仕分条件に一致した修正候補箇所に付与すべき属性が入力されていれば当該属性を付与し、前記入力処理によって入力された依存関係に関する仕分条件に不一致な修正候補箇所については、前記仕分条件に不一致な修正候補箇所に付与すべき属性が入力されていれば当該属性を付与する仕分処理と、前記仕分処理による仕分結果を出力する出力処理と、を実行することを特徴とする。 A search device according to one aspect of the invention disclosed in this application is a search device having a processor and a storage device accessible to the processor, wherein the processor executes the following steps: a search process for searching for candidate locations for correction from source code based on candidate conditions for searching for candidate locations for correction within the source code; an input process for accepting input of programmatic dependencies with the candidate conditions and attributes to be assigned to candidate locations for correction that match the candidate conditions or candidate locations that do not match the candidate conditions; a sorting process for assigning an attribute to candidate locations for correction that match the sorting conditions input by the input process if the attribute has been input, and for candidate locations for correction that do not match the sorting conditions for dependency input by the input process if the attribute has been input to be assigned to candidate locations for correction that do not match the sorting conditions; and an output process for outputting the sorting results obtained by the sorting process.

本発明の代表的な実施の形態によれば、検索効率の向上を図ることができる。前述した以外の課題、構成及び効果は、以下の実施例の説明により明らかにされる。 According to a representative embodiment of the present invention, it is possible to improve search efficiency. Problems, configurations, and effects other than those described above will become clear from the explanation of the following examples.

図1は、ソースコード類似不具合箇所の一例を示す説明図である。FIG. 1 is an explanatory diagram showing an example of a source code similar defect location. 図2は、ソースコード類似不具合箇所検索支援例を示す説明図である。FIG. 2 is an explanatory diagram showing an example of a support system for searching for similar defect locations in source code. 図3は、検索装置のハードウェア構成例を示すブロック図である。FIG. 3 is a block diagram illustrating an example of a hardware configuration of the search device. 図4は、ソースコードの一例を示す説明図である。FIG. 4 is an explanatory diagram illustrating an example of source code. 図5は、検索装置に与えられる検索条件の一例を示す説明図である。FIG. 5 is an explanatory diagram showing an example of search conditions given to the search device. 図6は、実施例1にかかる検索装置による検索処理手順例を示すフローチャートである。FIG. 6 is a flowchart of an example of a search process procedure performed by the search device according to the first embodiment. 図7は、検索結果の例1を示す説明図である。FIG. 7 is an explanatory diagram showing a first example of a search result. 図8は、検索結果の例2を示す説明図である。FIG. 8 is an explanatory diagram showing a second example of the search results. 図9は、実施例2にかかる検索装置による検索処理手順例を示すフローチャートである。FIG. 9 is a flowchart of an example of a search process procedure performed by the search device according to the second embodiment. 図10は、候補条件の入力画面の一例を示す説明図である。FIG. 10 is an explanatory diagram showing an example of an input screen for candidate conditions. 図11は、仕分条件の入力画面の例1を示す説明図である。FIG. 11 is an explanatory diagram showing Example 1 of the sorting condition input screen. 図12は、仕分条件の入力画面の例2を示す説明図である。FIG. 12 is an explanatory diagram showing Example 2 of the sorting condition input screen.

<ソースコード類似不具合箇所>
図1は、ソースコード類似不具合箇所の一例を示す説明図である。ここでは、案件0のソースコードSC0を開発する開発者D0が、ソースコードSC0内の共通処理AAの不具合を発見し、類似見直し調査依頼100を作成した場合を例に挙げる。類似見直し調査依頼100は、たとえば、
「共通処理AAを第2引数が10で呼出すと不具合が発生します。
類似見直しのため、以下を確認してください。
1. 共通処理AAを使っていますか?(確認事項101)
2. 共通処理AAを第2引数が10で呼出すことがありますか?(確認事項102)」
といった内容であり、各開発者D1~Dnに展開される。このように各開発者D1~Dnが人手で類似不具合の見直し調査をすると、見直し工数が増大し、開発効率が低下する。したがって、ソースコード類似不具合箇所を効率的に検出する必要がある。
<Source code similar defects>
1 is an explanatory diagram showing an example of a similar defect location in source code. Here, a case is taken as an example in which a developer D0 developing source code SC0 of case 0 discovers a defect in common process AA in source code SC0 and creates a similarity review investigation request 100. The similarity review investigation request 100 may be, for example,
"When common process AA is called with a second argument of 10, a problem occurs.
For similar review, please check below.
1. Are you using common processing AA? (Check item 101)
2. Is there a case where common process AA is called with the second argument set to 10? (Confirmation item 102)
The content is distributed to each developer D1 to Dn. If each developer D1 to Dn were to manually review and investigate similar defects in this way, the review man-hours would increase and development efficiency would decrease. Therefore, it is necessary to efficiently detect similar source code defects.

<ソースコード類似不具合箇所検索支援例>
図2は、ソースコード類似不具合箇所検索支援例を示す説明図である。ソースコードSCiは、共通処理AAを含み、検索装置200によるソースコード類似不具合箇所検索支援の対象となるソースコードである。iは、1≦i≦nを満たす整数である。
<Example of support for searching for similar source code defects>
2 is an explanatory diagram showing an example of a source code similar defect location search support. A source code SCi includes a common process AA and is a source code that is a target of a source code similar defect location search support by the search device 200. i is an integer that satisfies 1≦i≦n.

検索装置200は、開発者Diから確認事項101,102のうち、確認事項101の共通処理AAを修正対象箇所の候補条件として受け付けて、ソースコードSCiから共通処理AAを含む行(以下、ヒット行と称す)を検索し(ステップS200)、検索結果R200を出力する。検索結果R200には、ヒット行の行番号#と、ヒット行の記述内容と、で特定される修正候補箇所が含まれる。 The search device 200 accepts common process AA of confirmation item 101 from developer Di as a candidate condition for the part to be corrected, searches for lines including common process AA (hereinafter referred to as hit lines) from source code SCi (step S200), and outputs search result R200. The search result R200 includes correction candidate parts identified by the line number # of the hit line and the description content of the hit line.

つぎに、検索装置200は、開発者Diから確認事項102の共通処理AAの第2引数が出現する行の直近の行を絞り込む第1仕分条件を受け付けて、候補箇所の検索結果R200の修正候補箇所を仕分けし(ステップS201)、第1仕分結果R201を出力する。第1仕分結果R201は、検索結果R200の修正候補箇所に当該直近の行を追加した仕分結果である。具体的には、たとえば、第1仕分結果R201の各ヒット行には、直近の行(下線を付した文字列)が含まれる。また、第1仕分結果R201には、検索結果R200に修正対象か否かを示す列「対象」が追加されたデータである。ここでは、いずれの行も「?」、すなわち、修正対象か修正対象外か区別がつかないため、さらに細分すべきであるということを意味する。 Next, the search device 200 accepts from the developer Di a first sorting condition for narrowing down the line closest to the line in which the second argument of the common process AA of the confirmation item 102 appears, sorts the candidate correction parts of the search result R200 of the candidate parts (step S201), and outputs the first sorting result R201. The first sorting result R201 is a sorting result in which the most recent line is added to the candidate correction parts of the search result R200. Specifically, for example, each hit line of the first sorting result R201 includes the most recent line (underlined character string). In addition, the first sorting result R201 is data in which the column "target" indicating whether or not the line is to be corrected is added to the search result R200. Here, all lines are marked with "?", meaning that it is not possible to distinguish whether they are to be corrected or not, and therefore further subdivision is required.

つぎに、検索装置200は、第1仕分結果R201において確認事項102の一部を充足しないヒット行に関する第2仕分条件を受け付けて、第1仕分結果R201の修正候補箇所を仕分けし(ステップS202)、第2仕分結果R202を出力する。第2仕分条件とは、たとえば、『第2引数に「10」以外の定数が入る行は対象外にする』、という仕分条件である。 Next, the search device 200 accepts a second sorting condition for hit lines in the first sorting result R201 that do not satisfy some of the confirmation items 102, sorts the correction candidate parts of the first sorting result R201 (step S202), and outputs the second sorting result R202. The second sorting condition is, for example, a sorting condition that "lines whose second argument contains a constant other than '10' are excluded from the target."

第2仕分結果R202では、行番号#1のヒット行およびその直前行により、行番号#1において、第2引数に「10」以外の定数「11」が入る。したがって、行番号#1の修正候補箇所は第2仕分条件を充足するため、対象は「×」(修正対象外を意味する)に設定される。一方、行番号#2や行番号#YYの修正候補箇所は第2仕分条件を充足しないため、対象は「?」(細分を意味する)に設定される。 In the second sorting result R202, the hit line in line number #1 and the line immediately preceding it cause the second argument in line number #1 to be filled with the constant "11" rather than "10". Therefore, the correction candidate part in line number #1 satisfies the second sorting condition, so the target is set to "X" (meaning not to be corrected). On the other hand, the correction candidate parts in line numbers #2 and #YY do not satisfy the second sorting condition, so the target is set to "?" (meaning subdivision).

つぎに、検索装置200は、第2仕分結果R202において確認事項102の一部を充足しないヒット行に関する第3仕分条件を受け付けて、第2仕分結果R202の修正候補箇所を仕分けし(ステップS203)、第3仕分結果R203を出力する。第3仕分条件とは、たとえば、『第2引数が「10」でない場合のみ実行されるような制御処理がある行は対象外にする』、という仕分条件である。 Next, the search device 200 accepts a third sorting condition for hit lines in the second sorting result R202 that do not satisfy some of the confirmation items 102, sorts the correction candidate parts of the second sorting result R202 (step S203), and outputs the third sorting result R203. The third sorting condition is, for example, a sorting condition that "lines that have a control process that is executed only when the second argument is not "10" are excluded from the target."

第3仕分結果R203は、行番号#YYのヒット行およびその直前行により、行番号#YYが、第2引数が「10」でない場合のみ実行されるような制御処理がある行となる。したがって、行番号#YYの修正候補箇所は第3仕分条件を充足するため、対象は「×」に設定される。一方、行番号#2の修正候補箇所は第2除外条件を充足しないため、対象は「?」のままである。 In the third sorting result R203, due to the hit line of line number #YY and the line immediately preceding it, line number #YY is a line with a control process that is executed only if the second argument is not "10". Therefore, the correction candidate part of line number #YY satisfies the third sorting condition, so the target is set to "X". On the other hand, the correction candidate part of line number #2 does not satisfy the second exclusion condition, so the target remains "?".

開発者Diは、第3仕分結果R203を参照して、行番号#2が、確認事項101,102に該当する行であるか否かを目視で判断する。行番号#2が、確認事項101,102に該当する行であると判断した場合、検索装置200は、開発者Diの操作により、第3仕分結果R203において行番号#2の対象を「?」から「〇」(修正対象を意味する)に変更する。 Developer Di refers to the third sorting result R203 and visually determines whether line number #2 is a line that corresponds to confirmation items 101 and 102. If it is determined that line number #2 is a line that corresponds to confirmation items 101 and 102, the search device 200, through the operation of developer Di, changes the target of line number #2 in the third sorting result R203 from "?" to "O" (indicating a target for correction).

このようにして、多様な不具合を対象にした、データ依存や制御依存も考慮した一括検索が可能な、類似見直しの機械的な検索が可能となる。これにより、類似見直しの工数を削減が可能となり、ソースコードSCiの類似不具合箇所を効率的に絞り込むことができる。以下、実施例1および実施例2で具体的に説明する。実施例1および実施例2では、類似見直し箇所に限らず、任意の箇所を検索する場合についても適用可能である。 In this way, a mechanical search for similar review is possible, which allows for a collective search for a variety of defects while also taking into account data dependency and control dependency. This makes it possible to reduce the man-hours required for similar review, and to efficiently narrow down similar defect locations in source code SCi. This will be described in detail below in Examples 1 and 2. Examples 1 and 2 are applicable to the case where any location is searched, not limited to similar review locations.

実施例1は、上述した候補条件と、候補条件から実行順に接続された1以上の仕分条件と、を含む検索条件があらかじめ設定されており、検索装置が当該検索条件を用いて検索する例である。 Example 1 is an example in which search conditions including the above-mentioned candidate conditions and one or more sorting conditions connected to the candidate conditions in the order of execution are set in advance, and the search device searches using the search conditions.

<検索装置200のハードウェア構成例>
図3は、検索装置200のハードウェア構成例を示すブロック図である。検索装置200300は、プロセッサ301と、記憶デバイス302と、入力デバイス303と、出力デバイス304と、通信インターフェース(通信IF)305と、を有する。プロセッサ301、記憶デバイス302、入力デバイス303、出力デバイス304、および通信IF305は、バス306により接続される。プロセッサ301は、検索装置200を制御する。記憶デバイス302は、プロセッサ301の作業エリアとなる。また、記憶デバイス302は、各種プログラムやデータを記憶する非一時的なまたは一時的な記録媒体である。記憶デバイス302としては、たとえば、ROM(Read Only Memory)、RAM(Random Access Memory)、HDD(Hard Disk Drive)、フラッシュメモリがある。入力デバイス303は、データを入力する。入力デバイス303としては、たとえば、キーボード、マウス、タッチパネル、テンキー、スキャナがある。出力デバイス304は、データを出力する。出力デバイス304としては、たとえば、ディスプレイ、プリンタ、スピーカがある。通信IF305は、ネットワークと接続し、データを送受信する。
<Example of Hardware Configuration of Search Device 200>
3 is a block diagram showing an example of a hardware configuration of the search device 200. The search device 200300 has a processor 301, a storage device 302, an input device 303, an output device 304, and a communication interface (communication IF) 305. The processor 301, the storage device 302, the input device 303, the output device 304, and the communication IF 305 are connected by a bus 306. The processor 301 controls the search device 200. The storage device 302 is a working area for the processor 301. The storage device 302 is a non-temporary or temporary recording medium that stores various programs and data. Examples of the storage device 302 include a ROM (Read Only Memory), a RAM (Random Access Memory), a HDD (Hard Disk Drive), and a flash memory. The input device 303 inputs data. The input device 303 may be, for example, a keyboard, a mouse, a touch panel, a numeric keypad, or a scanner. The output device 304 outputs data. The output device 304 may be, for example, a display, a printer, or a speaker. The communication IF 305 connects to a network and transmits and receives data.

<ソースコード>
図4は、ソースコードの一例を示す説明図である。図4のソースコードSCiは、説明の便宜上、図1よび図2で示したソースコードSCiとは異なる内容としている。
<Source code>
Fig. 4 is an explanatory diagram showing an example of source code. For the sake of convenience, the source code SCi in Fig. 4 has different contents from the source code SCi shown in Figs.

<検索条件>
図5は、検索装置200に与えられる検索条件の一例を示す説明図である。検索条件500は、候補条件501から始まり、仕分条件510A,510B,…(これらを区別しない場合は単に仕分条件510を表記)が0個以上続く構造である。候補条件501は、ソースコードSCiから修正対象となる箇所の候補を検索するための条件で、たとえば、「文字列“XXX”を含む文」や「関数func1を呼出している文」など、ソースコードSCi中から機械的に文(命令ともいう)を抽出できるような条件である。候補条件501で抽出した文を修正対象箇所と称す。
<Search conditions>
5 is an explanatory diagram showing an example of search conditions given to the search device 200. The search conditions 500 start with a candidate condition 501, followed by zero or more sorting conditions 510A, 510B, ... (when no distinction is made between these, the sorting condition 510 is simply written). The candidate condition 501 is a condition for searching for candidates for a portion to be corrected from the source code SCi, and is a condition that can mechanically extract a statement (also called a command) from the source code SCi, such as "a statement containing the character string "XXX"" or "a statement calling the function func1". The statement extracted by the candidate condition 501 is called the portion to be corrected.

一方、仕分条件510は、候補条件501に基づいて抽出した修正候補箇所を仕分けるための条件である。仕分条件510には、修正候補箇所の絞り込み、乃至は、その箇所の直前または/および直後の関連する部分を探す条件が含まれる。ここで、関連する箇所とは、データ依存関係や制御依存関係で関連する箇所である。 On the other hand, the sorting conditions 510 are conditions for sorting the correction candidate parts extracted based on the candidate conditions 501. The sorting conditions 510 include conditions for narrowing down the correction candidate parts, or for searching for related parts immediately before and/or after the part. Here, the related parts are parts related through data dependencies or control dependencies.

データ依存関係とは、ある文と、その文で値が更新される変数の値の算出に利用される他の変数の値が計算される文と、の関係である。すなわち、前の命令で用いられたデータを利用して後の命令を実行するような関係であり、それらの命令を入れ替えて実行すると結果が変わってしまう可能性がある。たとえば、「関数呼び出しにおける第1引数が“a”」は、データ依存関係を示す。 A data dependency is a relationship between a statement and a statement that calculates the value of another variable that is used to calculate the value of a variable whose value is updated in that statement. In other words, it is a relationship in which data used in a previous instruction is used to execute a later instruction, and there is a possibility that the results will change if those instructions are executed interchangeably. For example, "the first argument in a function call is "a"" shows a data dependency.

制御依存関係とは、ある文と、その文が実行されるか否かを左右する条件分岐文と、の関係である。すなわち、分岐命令の後続命令を実行するかどうかは分岐命令の実行が終了して分岐先アドレスが決まらないと確定しないというような分岐命令と後続命令との関係である。たとえば、「変数Yに関する条件分岐がある」は、データ依存関係を示す。 A control dependency is a relationship between a statement and a conditional branch statement that determines whether or not the statement is executed. In other words, it is a relationship between a branch instruction and a subsequent instruction, in which whether or not the instruction following the branch instruction is executed is not determined until execution of the branch instruction is completed and the branch destination address is determined. For example, "there is a conditional branch regarding variable Y" indicates a data dependency.

また、仕分条件510には、条件一致/条件不一致の場合それぞれに対する仕分結果502A~502D(これらを区別しない場合は単に仕分結果502)が関連付けられる。仕分結果502には、「修正対象」、「修正対象外」、「細分」の少なくとも3種類があり、仕分結果502が「細分」の場合は、さらに、別の仕分条件510が関連付けられる。 In addition, sorting results 502A-502D (simply sorting result 502 when no distinction is made between the cases where the conditions are met and where the conditions are not met) are associated with the sorting conditions 510. There are at least three types of sorting results 502: "subject to correction," "not subject to correction," and "subdivision," and when sorting result 502 is "subdivision," another sorting condition 510 is associated with it.

「修正対象」は、修正すべき修正候補箇所である。「修正対象外」は修正すべきでない修正候補箇所である。「細分」は、現時点では修正すべきか否かはかわからないため、さらに仕分条件を用いて細かく分析する必要があることをいう。 "To be corrected" refers to areas that should be corrected. "Not to be corrected" refers to areas that should not be corrected. "Subdivision" means that it is not known at this point whether or not something should be corrected, and further detailed analysis is required using classification criteria.

つまり、検索条件500は、候補条件501を唯一の根とし、仕分条件510が連なる木構造となる。たとえば、仕分条件510Aは、条件一致(実線矢印)の場合、仕分結果502が細分(仕分結果502A)であるため、さらに仕分条件510Bが関連付けられる。なお、仕分結果502に「個別調査」などの種類を設け、当該種類に分類された修正候補箇所については、検索装置200の使用後に、ユーザが手作業で修正対象または修正対象外に分類することを明確にするようにしてもよい。 In other words, the search conditions 500 have a tree structure in which the candidate conditions 501 are the only root and the sorting conditions 510 are linked. For example, when the conditions are met (solid arrow), the sorting result 502 is a subdivision (sorting result 502A), so sorting condition 510B is further associated with sorting condition 510A. Note that a type such as "individual investigation" may be set for the sorting result 502, and correction candidate parts classified into that type may be clearly classified by the user as to be corrected or not to be corrected manually after using the search device 200.

なお、CIDは、仕分結果502が確定した候補条件501または仕分条件510を特定する識別情報である。 The CID is identification information that identifies the candidate condition 501 or sorting condition 510 for which the sorting result 502 has been finalized.

<検索支援処理手順>
図6は、実施例1にかかる検索装置200による検索支援処理手順例を示すフローチャートである。なお、検索装置200には、ソースコードSCiおよび検索条件500が与えられている。検索装置200は、ソースコードSCiを解析する(ステップS601)。この解析により、構文要素、構文木、データ依存関係、制御依存関係、および関数呼出関係が得られる。本解析は、既存のコンパイラや静的解析ツールなどと同様の技術で実現できる。
<Search support processing procedure>
6 is a flowchart showing an example of a search support process procedure by the search device 200 according to the first embodiment. The source code SCi and the search condition 500 are provided to the search device 200. The search device 200 analyzes the source code SCi (step S601). This analysis can obtain syntax elements, syntax trees, data dependencies, control dependencies, and function call relationships. This analysis can be realized by the same technology as existing compilers and static analysis tools.

つぎに、検索装置200は、検索条件500の候補条件501でソースコードSCiを検索し、修正候補箇所を抽出する(ステップS602)。そして、検索装置200は、未選択の仕分条件510がなくなるまで未選択の仕分条件510を繰り返し選択する(ステップS603)。ここでは、例として、仕分条件510は、検索条件500の木構造を根から順に末端に向かって選択されるものとする。 Next, the search device 200 searches the source code SCi using the candidate conditions 501 of the search conditions 500, and extracts candidate correction portions (step S602). Then, the search device 200 repeatedly selects unselected sorting conditions 510 until there are no unselected sorting conditions 510 (step S603). Here, as an example, it is assumed that the sorting conditions 510 are selected in the tree structure of the search conditions 500 in order from the root to the ends.

検索装置200は、ステップS603で選択された仕分条件510に基づいて、修正候補箇所を検索する(ステップS604)。具体的には、たとえば、検索装置200は、仕分条件510の直近の親にあたる候補条件501、または、仕分条件510で得た修正候補箇所を検索する。たとえば、選択仕分け条件510が仕分条件510Aである場合、直近の親にあたる候補条件501が修正候補箇所として検索される。また、選択仕分条件510が仕分条件510Bである場合、仕分条件510Aで仕訳けた結果得られた仕分結果502A(細分)が修正候補箇所として検索される。 The search device 200 searches for potential correction locations based on the sorting conditions 510 selected in step S603 (step S604). Specifically, for example, the search device 200 searches for candidate conditions 501 that are the immediate parents of the sorting conditions 510, or potential correction locations obtained from the sorting conditions 510. For example, if the selected sorting conditions 510 are sorting conditions 510A, the immediate parent candidate conditions 501 are searched for as potential correction locations. Also, if the selected sorting conditions 510 are sorting conditions 510B, the sorting results 502A (subdivisions) obtained as a result of sorting using the sorting conditions 510A are searched for as potential correction locations.

検索装置200は、未選択の仕分条件510がなくなった場合、ステップS604の検索を終了して(ステップS605)、検索結果を出力する(ステップS606)。ここで、検索結果の具体例を説明する。 When there are no unselected sorting conditions 510, the search device 200 ends the search in step S604 (step S605) and outputs the search results (step S606). Here, a specific example of the search results will be described.

<検索結果例>
図7は、検索結果の例1を示す説明図である。図8は、検索結果の例2を示す説明図である。図7の検索結果700Aおよび図8の検索結果700B(これらを区別しない場合は単に検索結果700と表記)においては、少なくとも、修正対象となった修正候補箇所と、修正候補箇所のソースコードSCi上での位置を示す行番号702と、を含む。
<Example of search results>
Fig. 7 is an explanatory diagram showing a search result example 1. Fig. 8 is an explanatory diagram showing a search result example 2. A search result 700A in Fig. 7 and a search result 700B in Fig. 8 (when there is no need to distinguish between them, they are simply referred to as search result 700) include at least a correction candidate portion to be corrected and a line number 702 indicating the position of the correction candidate portion in the source code SCi.

具体的には、たとえば、検索結果700は、項番701と、行番号702と、修正候補箇所703と、属性704と、を含む。図7の検索結果700Aにおいて、項番701が「1」のエントリでは、候補条件501の関数func1について、ソースコードSCi内の行番号702が「3」の「func1(“a”,“b”)」が修正候補箇所703となる。「func1(“a”,“b”)」は、仕分条件510Aおよび仕分条件510Bを充足しているため、その属性704は、仕分結果502Cが示す「修正対象」となる。 Specifically, for example, search result 700 includes item number 701, line number 702, correction candidate location 703, and attribute 704. In search result 700A of FIG. 7, in the entry with item number 701 of "1", for function func1 of candidate condition 501, "func1("a", "b")" with line number 702 of "3" in source code SCi is the correction candidate location 703. Since "func1("a", "b")" satisfies sorting condition 510A and sorting condition 510B, its attribute 704 is the "subject to correction" indicated by sorting result 502C.

また、項番701が「2」のエントリでは、候補条件501の関数func1について、ソースコードSCi内の行番号702が「3」の「x=“c”」と、「14」の「func1(“x”,“b”)」とが、修正候補箇所703となる。「x=“c”」および「func1(“x”,“b”)」は、仕分条件510Bを充足しているが、仕分条件510Aを充足しない。したがって、属性704は、仕分結果502Dが示す「修正対象外」となる。 In addition, in the entry with item number 701 "2", for function func1 of candidate condition 501, "x="c"" with line number 702 in source code SCi of "3" and "func1("x", "b")" with line number 702 of "14" are candidate correction locations 703. "x="c"" and "func1("x", "b")" satisfy sorting condition 510B but do not satisfy sorting condition 510A. Therefore, attribute 704 is "not to be corrected" as indicated by sorting result 502D.

また、図8において、検索結果700Bでは、さらに、修正候補箇所703が、各仕分条件510において条件一致/条件不一致であることを示す一致条件705を有し、属性704に、仕分結果502が確定した候補条件501または仕分条件510を特定するCIDを有する。 In addition, in FIG. 8, in the search result 700B, the correction candidate portion 703 further has a matching condition 705 indicating whether the condition is matched/not matched in each sorting condition 510, and the attribute 704 has a CID that identifies the candidate condition 501 or sorting condition 510 for which the sorting result 502 has been confirmed.

たとえば、項番701が「1」のエントリでは、候補条件501の関数func1について、ソースコードSCi内の行番号702が「3」の「func1(“a”,“b”)」が修正候補箇所703となる。「func1(“a”,“b”)」は、一致条件715のCID00で特定される候補条件501を充足し(〇で表記)、一致条件715のCID01で特定される仕分条件510Aを充足し(〇で表記)、一致条件715のCID02で特定される仕分条件510BAを充足する(〇で表記)。したがって、その属性704は、仕分結果502Cが示す「修正対象」となる。 For example, in an entry with item number 701 of "1", for function func1 in candidate condition 501, "func1("a", "b")" with line number 702 of "3" in source code SCi is the correction candidate location 703. "func1("a", "b")" satisfies candidate condition 501 specified by CID00 of match condition 715 (indicated by a circle), satisfies sorting condition 510A specified by CID01 of match condition 715 (indicated by a circle), and satisfies sorting condition 510BA specified by CID02 of match condition 715 (indicated by a circle). Therefore, its attribute 704 becomes the "target for correction" indicated by sorting result 502C.

また、項番701が「2」のエントリでは、候補条件501の関数func1について、ソースコードSCi内の行番号702が「3」の「x=“c”」と、「14」の「func1(“x”,“b”)」とが、修正候補箇所703となる。「func1(“x”,“b”)」は一致条件715のCID00~CID01を充足する(〇で表記)が、「x=“c”」および「func1(“x”,“b”)」は一致条件715のCID02を充足していない。したがって、その属性704は、仕分結果502Dが示す「修正対象外」となる。 In the entry with item number 701 "2", for function func1 in candidate condition 501, "x="c"" in line number 702 "3" in source code SCi and "func1("x", "b")" in line number 702 "14" are candidate correction locations 703. "func1("x", "b")" satisfies CID00 to CID01 in matching condition 715 (indicated by a circle), but "x="c"" and "func1("x", "b")" do not satisfy CID02 in matching condition 715. Therefore, its attribute 704 is "not to be corrected" as indicated by classification result 502D.

このように、仕分結果502が確定した候補条件501または仕分条件510を検索結果700Bに含めることで、ユーザは、たとえば、正しく類似見直しできていることを確認するレビューに利用することができる。なお、検索結果700に一致条件705を含めるか否かは、事前に検索装置200に設定される。 In this way, by including the candidate conditions 501 or sorting conditions 510 for which the sorting results 502 have been finalized in the search results 700B, the user can use them, for example, in a review to confirm that the similarity review has been performed correctly. Note that whether or not to include the matching conditions 705 in the search results 700 is set in advance in the search device 200.

ここで、検索装置200が類似見直しを支援可能な理由を説明する。類似見直しでは、不具合の要因となった関数、データ型、変数、定数などはあらかじめ明らかになっており、また、不具合が発生する条件も明確になっている。そのため、類似見直しでは、類似見直しの対象とするシステムにおいて、検索装置200は、着目すべき関数、データ型、変数、定数などを利用している箇所すべてについて、不具合が発生する条件に合致するか確認する。 Here, we will explain why the search device 200 can support similarity review. In similarity review, the functions, data types, variables, constants, etc. that caused the malfunction are identified in advance, and the conditions under which the malfunction occurs are also clearly defined. Therefore, in similarity review, in the system that is the subject of similarity review, the search device 200 checks whether all the places that use the functions, data types, variables, constants, etc. of interest meet the conditions under which the malfunction occurs.

不具合の要因となった関数、データ型、変数、定数などの利用箇所において、不具合が発生する条件に合致しないためには、プログラムの実行時に、当該利用箇所の直前で、不具合が発生する状態になっていない必要がある。利用箇所における状態は、利用箇所直前で、データ依存や制御依存などの関係がある箇所(状態確定箇所と呼ぶ)で確定する。そのため、状態確定箇所において、不具合が発生する状態にならない工夫がなされていなければ不具合が発生する。言い換えると、類似見直しでは、利用箇所を特定し、状態確定箇所を特定し、状態確定箇所に妥当な工夫がなされているかの確認が行われる。 In order to ensure that the conditions for a bug to occur are not met at the point of use of the function, data type, variable, constant, etc. that caused the bug, the state in which the bug will occur must not have occurred immediately before the point of use when the program is executed. The state at the point of use is determined at a point (called the state determination point) immediately before the point of use where there is a relationship such as data dependency or control dependency. Therefore, a bug will occur if no effort is made to prevent the state at the state determination point from becoming a state in which the bug will occur. In other words, similarity review identifies the point of use, identifies the state determination point, and checks whether appropriate effort has been made at the state determination point.

検索装置200は、候補条件501により利用箇所を機械的に特定し、仕分条件510により状態確定箇所の特定と、状態確定箇所での妥当工夫の有無の機械的な判別と、を実行するため、類似見直しの検索が可能となる。 The search device 200 mechanically identifies the use location using the candidate conditions 501, and identifies the status determination location using the sorting conditions 510, and mechanically determines whether or not there is a valid innovation at the status determination location, making it possible to search for similar revisions.

つぎに、実施例2について説明する。実施例2にかかる検索装置200は、候補条件501および仕分条件510の入力を逐次おこなって検索結果および仕分結果を出力する例である。ユーザは、検索結果および仕分結果を参照して、つぎの仕分結果を検索装置200に入力することになる。実施例2では、実施例1との相違点を中心に説明するため、実施例1と同一内容については説明を省略する。 Next, Example 2 will be described. The search device 200 according to Example 2 is an example in which candidate conditions 501 and sorting conditions 510 are input sequentially, and search results and sorting results are output. The user refers to the search results and sorting results, and inputs the next sorting result to the search device 200. In Example 2, the differences from Example 1 will be mainly described, and therefore the same contents as in Example 1 will not be described.

一般に、不具合が発生する状態にならない工夫は多岐にわたるため、すべての類似見直しに対応した検索条件500を作ることは困難である。そこで、類似修正対象のシステムでの工夫の実態を考慮しながら検索条件500を作成可能とするため、検索条件の入力および表示や検索結果700の表示が必要となる。 In general, there are a wide variety of ways to prevent defects from occurring, so it is difficult to create search conditions 500 that correspond to all similarity reviews. Therefore, in order to be able to create search conditions 500 while taking into account the actual measures in the system to be similarly revised, it is necessary to input and display search conditions and display search results 700.

検索装置200は、ユーザ操作により候補条件501の入力を受け付けて、その検索結果700が表示されると、ユーザは新たな仕分け条件の入力を順次受け付ける都度、その検索結果700を表示する処理を、ユーザの仕分条件510の入力がなくなるまで継続する。 When the search device 200 accepts input of candidate conditions 501 through user operation and displays the search results 700, the process of displaying the search results 700 continues each time the user sequentially accepts input of new sorting conditions, until no more sorting conditions 510 are input by the user.

<検索処理手順>
図9は、実施例2にかかる検索装置200による検索処理手順例を示すフローチャートである。検索装置200は、ステップS601と同様、ソースコードを解析し(ステップS901)、ユーザ操作により候補条件501の入力を受け付ける(ステップS902)。ここで、候補条件501の入力例について説明する。
<Search processing procedure>
9 is a flowchart showing an example of a search process procedure by the search device 200 according to the second embodiment. The search device 200 analyzes the source code (step S901) in the same manner as in step S601, and receives input of candidate conditions 501 by a user operation (step S902). Here, an example of input of the candidate conditions 501 will be described.

図10は、候補条件501の入力画面の一例を示す説明図である。入力画面1000は、ソースコードSCi中から機械的に文を抽出する候補条件501の入力を受け付ける画面である。図10の例では、入力画面1000は、要素種別入力項目1001と、役割入力項目1002と、検索文字列入力欄1003と、を有する。 Figure 10 is an explanatory diagram showing an example of an input screen for candidate conditions 501. Input screen 1000 is a screen that accepts input of candidate conditions 501 that mechanically extract statements from source code SCi. In the example of Figure 10, input screen 1000 has an element type input field 1001, a role input field 1002, and a search string input field 1003.

要素種別入力項目1001は、検索対象となる構文要素の種類の選択をプルダウンで受け付ける項目である。検索対象となる構文要素の種類とは、たとえば、定数、関数、変数、クラス、型など、検索対象となるプログラミング言語の識別子になりえる要素である。 The element type input item 1001 is an item that accepts the selection of the type of syntax element to be searched for via a pull-down menu. The type of syntax element to be searched for is, for example, an element that can be an identifier of the programming language to be searched for, such as a constant, function, variable, class, or type.

役割入力項目1002は、構文要素の役割の選択をプルダウンで受け付ける項目である。構文要素の役割とは、変数の宣言、定義、初期化、更新、参照や、関数の宣言、定義、呼出など、各種構文要素のソースコードSCi上で割り当てられた働きである。 The role input item 1002 is an item that accepts the selection of the role of a syntax element via a pull-down menu. The role of a syntax element is the function assigned to various syntax elements in the source code SCi, such as declaring, defining, initializing, updating, and referencing variables, and declaring, defining, and calling functions.

検索文字列入力欄1003は、検索対象とする構文要素を絞り込む検索文字列の入力を受け付ける入力欄である。なお、検索文字列入力欄1003にだけ検索文字列を入力すると、ソースコードSCi内のコメント文もヒットしてしまう可能性があるため、要素種別や役割を選択することにより、コメント文からのヒット数の抑制が可能となる。 The search string input field 1003 is an input field that accepts input of a search string that narrows down the syntax elements to be searched. Note that if a search string is only entered into the search string input field 1003, there is a possibility that comments in the source code SCi will also be hit, so by selecting an element type or role, it is possible to reduce the number of hits from comments.

なお、入力画面1000は、要素種別入力項目1001と、役割入力項目1002と、検索文字列入力欄1003と、のうち、少なくとも1つあればよい。また、入力画面1000は、要素種別入力項目1001、役割入力項目1002および検索文字列入力欄1003以外に、検索文字列のマッチング方法(完全一致、前方一致、後方一致、正規表現など)などを選択する入力項目があってもよい。 The input screen 1000 may have at least one of the element type input field 1001, the role input field 1002, and the search string input field 1003. In addition to the element type input field 1001, the role input field 1002, and the search string input field 1003, the input screen 1000 may also have an input field for selecting a matching method for the search string (exact match, forward match, backward match, regular expression, etc.).

また、入力画面1000は、検索条件500の候補条件501や仕分条件510を区別できるように、任意の名称を付けられるような入力項目を有していてもよい。さらに、入力画面1000は、候補条件501のみで類似見直しが完了する場合を考慮したボタンなどを有してもよい。加えて、入力画面1000は、検索において型名などを利用可能な項目を有してもよいし、検索文字列をソースコードSCiに含まれる識別子名から選択可能な項目を有してもよい。 The input screen 1000 may also have an input field that can be given any name so that the candidate conditions 501 and sorting conditions 510 of the search conditions 500 can be distinguished. Furthermore, the input screen 1000 may have a button or the like that takes into consideration the case where similarity review is completed using only the candidate conditions 501. In addition, the input screen 1000 may have a field that allows the type name, etc. to be used in the search, and may have a field that allows the search string to be selected from the identifier names included in the source code SCi.

図9に戻り、検索装置200は、入力画面1000から入力された候補条件501でソースコードSCiを検索し、修正候補箇所703を抽出する(ステップS903)。そして、検索装置200は、ステップS903の検索結果700B1を出力する(ステップS904)。検索結果700B1は、たとえば、検索装置200の出力デバイス304の一例となるディスプレイまたは検索装置200と通信可能なコンピュータのディスプレイに表示される。図10の検索結果700B1では、ソースコードSCi内の「func1」がある行の行番号702および修正候補箇所703がヒット行として表示される。 Returning to FIG. 9, the search device 200 searches the source code SCi with the candidate condition 501 input from the input screen 1000, and extracts the correction candidate portion 703 (step S903). The search device 200 then outputs the search result 700B1 of step S903 (step S904). The search result 700B1 is displayed, for example, on a display that is an example of the output device 304 of the search device 200, or on a display of a computer that can communicate with the search device 200. In the search result 700B1 of FIG. 10, the line number 702 of the line containing "func1" in the source code SCi and the correction candidate portion 703 are displayed as hit lines.

つぎに、検索装置200は、ユーザから仕分条件510の入力がなくなるまで仕分条件510の入力を受け付ける(ステップS905)。 Next, the search device 200 accepts input of sorting conditions 510 from the user until no more sorting conditions 510 are input (step S905).

図11は、仕分条件510の入力画面の例1を示す説明図である。仕分条件510の入力画面1100は、修正候補箇所における特定の要素の有無を確認する場合に利用するための画面である。仕分条件510の入力画面1100は、上述した要素種別入力項目1001、役割入力項目1002および検索文字列入力欄1003のほか、着目対象選択項目1101と、検索方向選択項目1102と、範囲制限選択項目1103と、一致属性選択項目1104と、不一致属性選択項目1105と、を含む。 Figure 11 is an explanatory diagram showing Example 1 of the input screen for sorting conditions 510. The input screen 1100 for sorting conditions 510 is a screen used when checking whether or not a specific element is present in a correction candidate portion. In addition to the element type input field 1001, role input field 1002, and search string input field 1003 described above, the input screen 1100 for sorting conditions 510 also includes a focus target selection field 1101, a search direction selection field 1102, a range restriction selection field 1103, a matching attribute selection field 1104, and a non-matching attribute selection field 1105.

着目対象選択項目1101は、着目対象の選択をプルダウンで受け付ける項目である。仕分条件510に基づく仕分では、修正候補箇所703に含まれる文の少なくとも1つに着目し、その文または、その文の前後の文について、条件を満たすか否かの機械的な調査が実行される。この着目文(着目対象)を選択するための入力項目が、着目対象選択項目1101である。 The focus target selection item 1101 is an item that accepts the selection of the focus target via a pull-down menu. In sorting based on the sorting conditions 510, attention is paid to at least one of the sentences included in the correction candidate section 703, and a mechanical investigation is performed to determine whether or not the condition is met for that sentence or the sentences before and after that sentence. The input item for selecting this focus sentence (focus target) is the focus target selection item 1101.

着目対象選択項目1101により、ユーザは、検索条件500の木構造の中でより親の方にあるいずれかの候補条件501か仕分条件510を選択することが可能である。ただし、選択可能な仕分条件510は、条件一致した仕分結果502のみとする。 The focus selection item 1101 allows the user to select any candidate condition 501 or sorting condition 510 that is closer to the parent in the tree structure of the search conditions 500. However, the only sorting conditions 510 that can be selected are sorting results 502 that match the conditions.

検索方向選択項目1102は、検索方向の選択をプルダウンで受け付ける項目である。検索方向選択項目1102のプルダウンには、たとえば、「同一ステートメント/制御条件」、「前方」、「後方」がある。それぞれ、「同一ステートメント/制御条件」は、仕分条件510の検索先が着目対象であることを示す。「前方」は、仕分条件510の検索先が着目対象の前方の文であることを示す。 Search direction selection item 1102 is an item that accepts the selection of the search direction via a pull-down menu. The pull-down menu of search direction selection item 1102 includes, for example, "Same statement/control condition," "Forward," and "Backward." "Same statement/control condition" indicates that the search destination of sorting condition 510 is the target of interest. "Forward" indicates that the search destination of sorting condition 510 is the sentence ahead of the target of interest.

なお、「前方」の文は、着目対象から1つ前の文に限らず、あらかじめ設定された2以上の所定数前の文でもよい。「後方」は、仕分条件510の検索先が着目対象の後方の文であることを示す。なお、「後方」の文は、着目対象から1つ後の文に限らず、あらかじめ設定された2以上の所定数後の文でもよい。 Note that the "forward" sentence is not limited to the sentence immediately preceding the target of interest, but may be a predetermined number of sentences, two or more, that are set in advance. "Backward" indicates that the sorting condition 510 searches for a sentence that is later than the target of interest. Note that the "backward" sentence is not limited to the sentence immediately following the target of interest, but may be a predetermined number of sentences, two or more, that are set in advance.

範囲制限選択項目1103は、着目対象選択項目で選択された着目文に加え、もう一つの文に着目し、両文の間にある文に対する条件を指定したい場合に利用する項目である。したがって、検索方向が「同一ステートメント/制御条件」である場合は、無効となる項目である。範囲制限選択項目1103で着目する文を選択する際は、着目対象と同様に、ユーザは、検索条件500の木構造の中でより親の方にあるいずれかの候補条件501か仕分条件510を選択することができる。 The range restriction selection item 1103 is an item used when you want to focus on another sentence in addition to the sentence of interest selected in the focus target selection item, and specify conditions for the sentence between the two sentences. Therefore, if the search direction is "same statement/control condition", this item is invalid. When selecting a sentence to focus on in the range restriction selection item 1103, the user can select one of the candidate conditions 501 or sorting conditions 510 that are closer to the parent in the tree structure of the search conditions 500, just like the focus target.

一致属性選択項目1104は、一致属性を選択する項目である。一致属性とは、仕分条件で検索した場合に仕分条件に一致した仕分結果502に付与する属性である。不一致属性選択項目1105は、不一致属性を選択する項目である。不一致属性とは、仕分条件で検索した場合に仕分条件に一致しなかった仕分結果502に付与する属性である。 The match attribute selection item 1104 is an item for selecting a match attribute. A match attribute is an attribute that is assigned to a sorting result 502 that matches the sorting conditions when searched for by sorting conditions. The mismatch attribute selection item 1105 is an item for selecting a mismatch attribute. A mismatch attribute is an attribute that is assigned to a sorting result 502 that does not match the sorting conditions when searched for by sorting conditions.

一致属性選択項目1104および不一致属性選択項目1105において、「修正対象」は、修正候補箇所を修正すべきであることを検索結果に表示するための選択肢である。「修正対象外」は、修正候補箇所を修正候補箇所から外すべきであることを検索結果に表示するための選択肢である。「細分」は、現時点では修正候補箇所を修正すべきか否かわからないため、さらに仕分条件を用いて細かく分析する必要があるということを検索結果に表示するための選択肢である。「個別調査」は、検索結果を個別に目視で調査すべきであることを検索結果に表示するための選択肢である。 In the matching attribute selection item 1104 and the mismatching attribute selection item 1105, "Subject to correction" is an option for displaying in the search results that the correction candidate portion should be corrected. "Not subject to correction" is an option for displaying in the search results that the correction candidate portion should be excluded from the correction candidate portions. "Refine" is an option for displaying in the search results that it is not known at this point whether the correction candidate portion should be corrected or not, and therefore further detailed analysis is required using sorting criteria. "Individual investigation" is an option for displaying in the search results that the search results should be visually investigated individually.

図12は、仕分条件510の入力画面の例2を示す説明図である。図12の入力画面1200は、修正候補箇所の構文木をも考慮可能な画面である。入力画面1200では、たとえば、候補条件となる関数の第1引数名が何であるか検索している状態ではわからない場合に、当該関数の第1引数が、たとえば、前方に出現した場合に検索するための画面である。 Figure 12 is an explanatory diagram showing example 2 of an input screen for sorting conditions 510. The input screen 1200 in Figure 12 is a screen that can also take into account the syntax tree of the correction candidate portion. The input screen 1200 is a screen for searching, for example, when the name of the first argument of a function that is a candidate condition is unknown during the search, and the first argument of the function appears, for example, forward.

入力画面1200は、要素種別入力項目1001、役割入力項目1002、着目対象選択項目1101、検索方向選択項目1102、範囲制限選択項目1103、一致属性選択項目1104、および不一致属性選択項目1105のほか、第1構造選択項目1201、第2構造選択項目1202、第3構造選択項目1203、第1指定項目1204、第1詳細指定項目1205、第2指定項目1206、および第2詳細指定項目1207を有する。 The input screen 1200 has an element type input field 1001, a role input field 1002, a focus selection field 1101, a search direction selection field 1102, a range restriction selection field 1103, a matching attribute selection field 1104, and a non-matching attribute selection field 1105, as well as a first structure selection field 1201, a second structure selection field 1202, a third structure selection field 1203, a first specification field 1204, a first detailed specification field 1205, a second specification field 1206, and a second detailed specification field 1207.

第1構造選択項目1201~第3構造選択項目1203はそれぞれ、着目対象選択項目1101で選択された文の構文木のバリエーションを、構文木の根元から順に詳細になるような選択をプルダウンで受け付ける項目である。たとえば、着目対象の文が「a=1」、「b=func1()」、「b=func2(1,2)」、及び、「func2(2,func1())」を含む場合、変数を「Vn」、関数を「Fn」、定数を「Cn」で表すと、第1構造選択項目1201の選択肢は「V1=V2」、「V1=F1()」、および「指定なし」となる。 The first structure selection item 1201 to the third structure selection item 1203 are items that accept selections from a pull-down menu of variations of the syntax tree of the sentence selected in the focus target selection item 1101, in increasing detail starting from the root of the syntax tree. For example, if the focus target sentence contains "a=1", "b=func1()", "b=func2(1,2)", and "func2(2,func1())", and if variables are represented by "Vn", functions by "Fn", and constants by "Cn", the options for the first structure selection item 1201 are "V1=V2", "V1=F1()", and "Not specified".

この時、ユーザが第1構造選択項目1201で「V1=V2」を選択すると、第2構造選択項目1202が追加され、その選択肢は「V1=C1」、「V1=F1()」、および、「指定なし」となる。 At this time, if the user selects "V1 = V2" in the first structure selection item 1201, the second structure selection item 1202 is added, and the options are "V1 = C1", "V1 = F1()", and "Not specified".

ここで、ユーザが第2構造選択項目1202で「V1=F1()」を選択すると、第3構造選択項目1203が追加され、その選択肢は「V1=F1()」、「V1=F2(V2,V3)」、および、「指定なし」となる。 Here, if the user selects "V1=F1()" in the second structure selection item 1202, a third structure selection item 1203 is added, and its options become "V1=F1()", "V1=F2(V2, V3)", and "Not specified".

第1指定項目1204、第1詳細指定項目1205、第2指定項目1206、および第2詳細指定項目1207は、第1構造選択項目1201~第3構造選択項目1203で、「指定なし」以外の最後に選択された項目(図12の場合は、第2構造選択項目1202)に含まれる変数や関数に対応する。 The first specified item 1204, the first detailed specified item 1205, the second specified item 1206, and the second detailed specified item 1207 correspond to the variables and functions included in the last selected item other than "No specification" (in the case of Figure 12, the second structure selection item 1202) among the first structure selection item 1201 to the third structure selection item 1203.

たとえば、第1指定項目1204および第1詳細指定項目1205は、第2構造選択項目1202の「F1」に対応しており、第2指定項目1206および第2詳細指定項目1207は、第2構造選択項目1202の「V1」に対応する。 For example, the first specified item 1204 and the first detailed specified item 1205 correspond to "F1" of the second structure selection item 1202, and the second specified item 1206 and the second detailed specified item 1207 correspond to "V1" of the second structure selection item 1202.

第1指定項目1204および第2指定項目1206は、変数や関数などの条件として、検索文字列を直接指定するか、または、検索条件500の木構造の中でより親の方にあるいずれかの仕分条件510における構文要素を選択するか、の指定を受け付ける項目である。検索文字列を直接指定する場合は、ユーザは、第1詳細指定項目1205に、対象としたい任意の文字列を入力する。構文要素を選択する場合は、ユーザは、第1詳細指定項目1205に、第2指定項目1206で指定した仕分条件510に含まれる構文要素を指定する。 The first specification item 1204 and the second specification item 1206 are items that accept specification of whether to directly specify a search string as a condition such as a variable or function, or to select a syntax element in one of the sorting conditions 510 that is closer to the parent in the tree structure of the search conditions 500. When specifying a search string directly, the user inputs any string that the user wants to target in the first detailed specification item 1205. When selecting a syntax element, the user specifies in the first detailed specification item 1205 a syntax element included in the sorting condition 510 specified in the second specification item 1206.

たとえば、第1指定項目1204では検索文字列として「func1」を指定しており、第2指定項目1206では『仕分条件510の名称が「CID01」の構造選択における、「V1」という変数と同じ変数』を指定している。 For example, the first specified item 1204 specifies "func1" as the search string, and the second specified item 1206 specifies "the same variable as the variable "V1" in the structure selection for the sorting condition 510 named "CID01."

図9に戻り、検索装置200は、図11または図12のように入力画面1100,1200に入力された仕分条件510に基づいて、修正対象箇所を検索し(ステップS906)、検索結果を出力する(ステップS907)。ユーザは、検索結果を参照して、仕分をしたければ、再度仕分条件510を入力し(ステップS905)、仕分をしたくなければ、検索装置200は、一連の処理を終了する。 Returning to FIG. 9, the search device 200 searches for the parts to be corrected based on the sorting conditions 510 entered on the input screens 1100, 1200 as shown in FIG. 11 or 12 (step S906) and outputs the search results (step S907). The user refers to the search results, and if sorting is desired, the user re-enters the sorting conditions 510 (step S905), and if sorting is not desired, the search device 200 ends the series of processes.

このように、実施例2によれば、すべての類似見直しに対応した検索条件500を作るのではなく、修正対象での工夫の実態を考慮しながら検索条件500を逐次作成可能とする。したがって、このような段階的な検索の実行により、不具合が発生する可能性がある箇所を特定する検索条件を容易に作成することができる。 In this way, according to the second embodiment, instead of creating search conditions 500 that correspond to all similarity reviews, it is possible to create search conditions 500 one by one while taking into account the actual state of the innovations to be corrected. Therefore, by performing such a step-by-step search, it is possible to easily create search conditions that identify areas where defects may occur.

また、上述した検索装置200は、下記(1)~(10)のように構成することもできる。 The above-mentioned search device 200 can also be configured as follows (1) to (10).

(1)上述した検索装置は、プロセッサと、前記プロセッサがアクセス可能な記憶デバイスと、を有し、前記プロセッサは、ソースコード内の修正候補箇所を検索するための候補条件に基づいて、前記ソースコードから前記修正候補箇所を検索する検索処理と、前記候補条件とのプログラム上の依存関係に関する仕分条件に基づいて、前記検索処理によって検索された前記修正候補箇所を、仕分けの種類を示す複数の属性のいずれかに仕分ける仕分処理と、前記仕分処理による仕分結果を出力する出力処理と、を実行する。 (1) The above-mentioned search device has a processor and a storage device accessible to the processor, and the processor executes a search process that searches for candidate correction locations from the source code based on candidate conditions for searching for candidate correction locations in the source code, a sorting process that sorts the candidate correction locations found by the search process into one of a number of attributes indicating a sorting type based on sorting conditions related to program dependencies with the candidate conditions, and an output process that outputs the sorting results of the sorting process.

これにより、修正候補箇所の各々をどのように仕分けすべきか確認することができ、修正候補箇所の検索効率の向上を図ることができる。 This allows you to check how each of the correction candidates should be sorted, improving the efficiency of searching for correction candidates.

(2)上記(1)の検索装置において、前記候補条件と、前記候補条件から順次適用される前記依存関係が異なる一連の仕分条件と、により構成される検索条件にアクセス可能であり、前記仕分処理では、前記プロセッサは、前記前段の仕分条件による仕分結果にしたがった後段の仕分条件に基づいて、前記修正候補箇所を前記複数の属性のいずれかに仕分ける。 (2) In the search device of (1) above, search conditions consisting of the candidate conditions and a series of sorting conditions with different dependencies that are applied sequentially from the candidate conditions are accessible, and in the sorting process, the processor sorts the correction candidate parts into one of the multiple attributes based on a subsequent sorting condition that is in accordance with the sorting result of the previous sorting condition.

これにより、候補条件および複数の仕分け条件により1回の検索で修正候補箇所を効率的に絞り込むことができる。 This allows you to efficiently narrow down correction candidates with a single search using candidate conditions and multiple sorting conditions.

(3)上記(2)の検索装置において、前記複数の属性は、前記修正候補箇所が修正対象であることを示す第1属性、修正対象外であることを示す第2属性、または、前記修正候補箇所について個別調査が必要であることを示す第3属性のうち少なくとも1つを含み、前記仕分処理では、前記プロセッサは、前記仕分結果が前記第1属性、前記第2属性または前記第3属性となった修正候補箇所を仕分けしない。 (3) In the search device of (2) above, the multiple attributes include at least one of a first attribute indicating that the correction candidate portion is to be corrected, a second attribute indicating that it is not to be corrected, or a third attribute indicating that the correction candidate portion requires individual investigation, and in the sorting process, the processor does not sort the correction candidate portion for which the sorting result is the first attribute, the second attribute, or the third attribute.

これにより、修正候補箇所が第1属性であれば、ユーザは、当該修正候補箇所を修正すればよいことがわかる。また、修正候補箇所が第2属性であれば、ユーザは、当該修正候補箇所を修正対象外すればよいことがわかる。また、修正候補箇所が第2属性であれば、ユーザは、当該修正候補箇所の個別調査が必要であることがわかる。 As a result, if the correction candidate portion has the first attribute, the user knows that the correction candidate portion should be corrected. If the correction candidate portion has the second attribute, the user knows that the correction candidate portion should be excluded from correction. If the correction candidate portion has the second attribute, the user knows that the correction candidate portion needs to be individually investigated.

(4)上記(2)の検索装置において、前記複数の属性は、前記修正候補箇所について詳細な仕分けが必要であることを示す第4属性を含み、前記仕分処理では、前記プロセッサは、前記前段の仕分条件により前記第4属性を前記仕分結果とした場合の前記後段の仕分条件に基づいて、前記仕分結果が前記第4属性となった修正候補箇所を前記複数の属性のいずれかに仕分ける。 (4) In the search device of (2) above, the multiple attributes include a fourth attribute indicating that the correction candidate portion requires detailed sorting, and in the sorting process, the processor sorts the correction candidate portion for which the sorting result is the fourth attribute into one of the multiple attributes based on the sorting condition in the latter stage when the sorting result is the fourth attribute based on the sorting condition in the former stage.

これにより、修正候補箇所が第4属性であれば、ユーザは、新たな仕分け条件を入力して、その仕分結果を得ることができる。 As a result, if the correction candidate part is the fourth attribute, the user can input new sorting conditions and obtain the sorting results.

(5)上記(1)の検索装置において、前記ソースコードは、前記ソースコード内の文の位置情報を含み、前記出力処理では、前記プロセッサは、前記修正候補箇所の位置情報を含む前記仕分結果を出力する。 (5) In the search device of (1) above, the source code includes position information of sentences within the source code, and in the output process, the processor outputs the classification result including position information of the candidate correction locations.

これにより、ユーザは、修正候補箇所の位置がソースコードのどこに存在するかを把握することができる。 This allows the user to see where in the source code the suggested corrections are located.

(6)上記(1)の検索装置において、前記プロセッサは、前記候補条件とのプログラム上の依存関係と、前記候補条件に一致した修正候補箇所または不一致な修正候補箇所に付与すべき属性と、の入力を受け付ける入力処理を実行し、前記仕分処理では、前記プロセッサは、前記入力処理によって入力された依存関係に関する仕分条件に一致した修正候補箇所については、前記仕分条件に一致した修正候補箇所に付与すべき属性が入力されていれば当該属性を付与し、前記入力処理によって入力された依存関係に関する仕分条件に不一致な修正候補箇所については、前記仕分条件に不一致な修正候補箇所に付与すべき属性が入力されていれば当該属性を付与する。 (6) In the search device of (1) above, the processor executes an input process to accept input of program dependencies with the candidate conditions and attributes to be assigned to candidate correction parts that match the candidate conditions or candidate correction parts that do not match the candidate conditions, and in the sorting process, the processor assigns an attribute to candidate correction parts that match the sorting conditions related to dependencies input by the input process if the attribute has been input, and assigns an attribute to candidate correction parts that do not match the sorting conditions related to dependencies input by the input process if the attribute has been input.

これにより、候補条件に基づいて仕分された修正候補箇所に、事前に入力された属性を自動的に付与することができる。したがって、ユーザは、仕分された修正候補箇所をその後どのように扱うべきか容易に把握することができる。 This allows the attributes entered in advance to be automatically assigned to the correction candidate parts sorted based on the candidate conditions. This allows the user to easily understand how to handle the sorted correction candidate parts in the future.

(7)上記(1)の検索装置において、前記プロセッサは、前記候補条件とのプログラム上の依存関係と、前記仕分条件に一致した修正候補箇所または不一致な修正候補箇所に付与すべき属性と、の入力を受け付ける入力処理を実行し、前記仕分処理では、前記プロセッサは、前記入力処理によって入力された依存関係に関する仕分条件に一致した修正候補箇所については、前記仕分条件に一致した修正候補箇所に付与すべき属性が入力されていれば当該属性を付与し、前記入力処理によって入力された依存関係に関する仕分条件に不一致な修正候補箇所については、前記仕分条件に不一致な修正候補箇所に付与すべき属性が入力されていれば当該属性を付与する。 (7) In the search device of (1) above, the processor executes an input process to accept input of program dependencies with the candidate conditions and attributes to be assigned to candidate correction parts that match the sorting conditions or candidate correction parts that do not match the sorting conditions, and in the sorting process, the processor assigns an attribute to candidate correction parts that match the sorting conditions related to the dependencies input by the input process if the attribute has been input, and assigns an attribute to candidate correction parts that do not match the sorting conditions related to the dependencies input by the input process if the attribute has been input.

これにより、前段の仕分け条件に基づいて仕分された修正候補箇所に、事前に入力された属性を自動的に付与することができる。したがって、ユーザは、仕分された修正候補箇所をその後どのように扱うべきか容易に把握することができる。 This allows the attributes entered in advance to be automatically assigned to the correction candidate parts that have been sorted based on the previous sorting conditions. This allows the user to easily understand how to handle the sorted correction candidate parts in the future.

(8)上記(6)の検索装置において、前記入力処理では、前記プロセッサは、前記依存関係として、着目対象となる前記修正候補箇所と、前記着目対象からの前記ソースコード上の検索方向と、構文要素の種別と、の入力を受け付ける。 (8) In the search device of (6) above, in the input process, the processor accepts input of the modification candidate location of interest, the search direction in the source code from the location of interest, and the type of syntax element as the dependency relationship.

これにより、検索装置は、着目対象から離れた位置にある構文要素の行を修正対象箇所に含めることができる。 This allows the search device to include lines of syntax elements that are located away from the focus point in the section to be corrected.

(9)上記(6)の検索装置において、前記入力処理では、前記プロセッサは、前記依存関係として、着目対象となる前記修正候補箇所と、前記着目対象からの前記ソースコード上の検索方向と、検索文字列と、の入力を受け付ける。 (9) In the search device of (6) above, in the input process, the processor accepts input of the modification candidate location of interest, the search direction in the source code from the location of interest, and a search string as the dependency.

これにより、検索装置は、着目対象から離れた位置にある検索文字列の行を修正対象箇所に含めることができる。 This allows the search device to include lines of the search string that are located away from the focus area in the area to be corrected.

(10)上記(6)の検索装置において、前記入力処理では、前記プロセッサは、前記ソースコードの構文木に関する仕分条件の入力を受け付け、前記仕分処理では、前記プロセッサは、前記入力処理によって入力された依存関係および構文木に関する仕分条件に一致した修正候補箇所については、前記仕分条件に一致した修正候補箇所に付与すべき属性が入力されていれば当該属性を付与し、前記入力処理によって入力された依存関係および構文木に関する仕分条件に不一致な修正候補箇所については、前記仕分条件に不一致な修正候補箇所に付与すべき属性が入力されていれば当該属性を付与する。 (10) In the search device of (6) above, in the input process, the processor accepts input of sorting conditions related to the syntax tree of the source code, and in the sorting process, for candidate correction parts that match the sorting conditions related to the dependencies and syntax tree input by the input process, the processor assigns the attribute to the candidate correction parts that match the sorting conditions if the attribute has been input, and for candidate correction parts that do not match the sorting conditions related to the dependencies and syntax tree input by the input process, the processor assigns the attribute to the candidate correction parts that do not match the sorting conditions if the attribute has been input.

これにより、構文要素がどのような名称であるか具体的に特定できない場合であっても、構文木に該当する修正候補箇所を検索することができる。 This makes it possible to search for correction candidates that correspond to the syntax tree even if you cannot specifically identify the name of a syntax element.

なお、本発明は前述した実施例に限定されるものではなく、添付した特許請求の範囲の趣旨内における様々な変形例及び同等の構成が含まれる。たとえば、前述した実施例は本発明を分かりやすく説明するために詳細に説明したものであり、必ずしも説明したすべての構成を備えるものに本発明は限定されない。また、ある実施例の構成の一部を他の実施例の構成に置き換えてもよい。また、ある実施例の構成に他の実施例の構成を加えてもよい。また、各実施例の構成の一部について、他の構成の追加、削除、または置換をしてもよい。 The present invention is not limited to the above-described embodiments, but includes various modified examples and equivalent configurations within the spirit of the appended claims. For example, the above-described embodiments have been described in detail to clearly explain the present invention, and the present invention is not necessarily limited to having all of the configurations described. Furthermore, a portion of the configuration of one embodiment may be replaced with the configuration of another embodiment. Furthermore, the configuration of another embodiment may be added to the configuration of one embodiment. Furthermore, other configurations may be added, deleted, or replaced with part of the configuration of each embodiment.

また、前述した各構成、機能、処理部、処理手段等は、それらの一部又は全部を、たとえば集積回路で設計する等により、ハードウェアで実現してもよく、プロセッサがそれぞれの機能を実現するプログラムを解釈し実行することにより、ソフトウェアで実現してもよい。 Furthermore, each of the configurations, functions, processing units, processing means, etc. described above may be realized in part or in whole in hardware, for example by designing them as integrated circuits, or may be realized in software by a processor interpreting and executing a program that realizes each function.

各機能を実現するプログラム、テーブル、ファイル等の情報は、メモリ、ハードディスク、SSD(Solid State Drive)等の記憶装置、又は、IC(Integrated Circuit)カード、SDカード、DVD(Digital Versatile Disc)の記録媒体に格納することができる。 Information such as programs, tables, and files that realize each function can be stored in a storage device such as a memory, hard disk, or SSD (Solid State Drive), or in a recording medium such as an IC (Integrated Circuit) card, SD card, or DVD (Digital Versatile Disc).

また、制御線や情報線は説明上必要と考えられるものを示しており、実装上必要なすべての制御線や情報線を示しているとは限らない。実際には、ほとんどすべての構成が相互に接続されていると考えてよい。 In addition, the control lines and information lines shown are those considered necessary for explanation, and do not necessarily represent all control lines and information lines necessary for implementation. In reality, it is safe to assume that almost all components are interconnected.

SCi ソースコード
100 調査依頼
101,102 確認事項
200 検索装置
301 プロセッサ
302 記憶デバイス
303 入力デバイス
304 出力デバイス
500 検索条件
501 候補条件
502 仕分結果
510 仕分条件
1000,1100,1200 入力画面
SCi source code 100 Investigation request 101, 102 Confirmation item 200 Search device 301 Processor 302 Storage device 303 Input device 304 Output device 500 Search conditions 501 Candidate conditions 502 Sorting result 510 Sorting conditions 1000, 1100, 1200 Input screen

Claims (9)

プロセッサと、前記プロセッサがアクセス可能な記憶デバイスと、を有する検索装置であって、
前記プロセッサは、
ソースコード内の修正候補箇所を検索するための候補条件に基づいて、前記ソースコードから前記修正候補箇所を検索する検索処理と、
前記候補条件とのプログラム上の依存関係と、前記候補条件に一致した修正候補箇所または不一致な修正候補箇所に付与すべき属性と、の入力を受け付ける入力処理と、
前記入力処理によって入力された依存関係に関する仕分条件に一致した修正候補箇所については、前記仕分条件に一致した修正候補箇所に付与すべき属性が入力されていれば当該属性を付与し、前記入力処理によって入力された依存関係に関する仕分条件に不一致な修正候補箇所については、前記仕分条件に不一致な修正候補箇所に付与すべき属性が入力されていれば当該属性を付与する仕分処理と、
前記仕分処理による仕分結果を出力する出力処理と、
を実行することを特徴とする検索装置。
A search device having a processor and a storage device accessible to the processor,
The processor,
a search process for searching for candidate correction locations from the source code based on candidate conditions for searching for candidate correction locations in the source code;
an input process for receiving input of program dependencies with the candidate conditions and attributes to be assigned to candidate correction portions that match the candidate conditions or candidate correction portions that do not match the candidate conditions;
a sorting process for assigning an attribute to a correction candidate portion that matches a sorting condition related to a dependency relationship input by the input process if the attribute has been input, and for assigning an attribute to a correction candidate portion that does not match a sorting condition related to a dependency relationship input by the input process if the attribute has been input;
an output process for outputting a sorting result obtained by the sorting process;
A search device that executes the above.
請求項1に記載の検索装置であって、
前記入力処理では、前記プロセッサは、前記依存関係として、着目対象となる前記修正候補箇所と、前記着目対象からの前記ソースコード上の検索方向と、構文要素の種別と、の入力を受け付ける、
ことを特徴とする検索装置。
The search device according to claim 1,
In the input process, the processor receives, as the dependency relationship, an input of the correction candidate portion to be focused on, a search direction in the source code from the portion to be focused on, and a type of syntax element.
A search device comprising:
請求項1に記載の検索装置であって、
前記入力処理では、前記プロセッサは、前記依存関係として、着目対象となる前記修正候補箇所と、前記着目対象からの前記ソースコード上の検索方向と、検索文字列と、の入力を受け付ける、
ことを特徴とする検索装置。
The search device according to claim 1,
In the input process, the processor receives, as the dependency relationship, an input of the correction candidate portion to be focused on, a search direction in the source code from the portion to be focused on, and a search string.
A search device comprising:
請求項1に記載の検索装置であって、
前記入力処理では、前記プロセッサは、前記ソースコードの構文木に関する仕分条件の入力を受け付け、
前記仕分処理では、前記プロセッサは、前記入力処理によって入力された依存関係および構文木に関する仕分条件に一致した修正候補箇所については、前記仕分条件に一致した修正候補箇所に付与すべき属性が入力されていれば当該属性を付与し、前記入力処理によって入力された依存関係および構文木に関する仕分条件に不一致な修正候補箇所については、前記仕分条件に不一致な修正候補箇所に付与すべき属性が入力されていれば当該属性を付与する、
ことを特徴とする検索装置。
The search device according to claim 1,
In the input process, the processor receives an input of a classification condition regarding a syntax tree of the source code;
In the sorting process, the processor assigns an attribute to a correction candidate portion that matches the sorting conditions related to the dependency relationships and syntax trees input by the input process if the attribute has been input and assigns an attribute to a correction candidate portion that does not match the sorting conditions related to the dependency relationships and syntax trees input by the input process if the attribute has been input.
A search device comprising:
プロセッサと、前記プロセッサがアクセス可能な記憶デバイスと、を有する検索装置であって、A search device having a processor and a storage device accessible to the processor,
前記プロセッサは、The processor,
ソースコード内の修正候補箇所を検索するための候補条件に基づいて、前記ソースコードから前記修正候補箇所を検索する検索処理と、a search process for searching for candidate correction locations from the source code based on candidate conditions for searching for candidate correction locations in the source code;
前記候補条件とのプログラム上の依存関係と、前記依存関係に関する仕分条件に一致した修正候補箇所または不一致な修正候補箇所に付与すべき属性と、の入力を受け付ける入力処理と、an input process for receiving input of program dependencies with the candidate conditions and attributes to be assigned to correction candidate portions that match or do not match the sorting conditions related to the dependencies;
前記仕分条件に一致した修正候補箇所については、前記仕分条件に一致した修正候補箇所に付与すべき属性が入力されていれば当該属性を付与し、前記仕分条件に不一致な修正候補箇所については、前記仕分条件に不一致な修正候補箇所に付与すべき属性が入力されていれば当該属性を付与する仕分処理と、a sorting process for assigning an attribute to a correction candidate portion that matches the sorting condition if the attribute has been input, and for assigning an attribute to a correction candidate portion that does not match the sorting condition if the attribute has been input;
前記仕分処理による仕分結果を出力する出力処理と、an output process for outputting a sorting result obtained by the sorting process;
を実行することを特徴とする検索装置。A search device that executes the above.
プロセッサと、前記プロセッサがアクセス可能な記憶デバイスと、を有する検索装置が実行する検索方法であって、A search method executed by a search device having a processor and a storage device accessible by the processor, comprising:
前記検索方法は、The search method includes:
前記プロセッサが、The processor,
ソースコード内の修正候補箇所を検索するための候補条件に基づいて、前記ソースコードから前記修正候補箇所を検索する検索処理と、a search process for searching for candidate correction locations from the source code based on candidate conditions for searching for candidate correction locations in the source code;
前記候補条件とのプログラム上の依存関係と、前記候補条件に一致した修正候補箇所または不一致な修正候補箇所に付与すべき属性と、の入力を受け付ける入力処理と、an input process for receiving input of program dependencies with the candidate conditions and attributes to be assigned to candidate correction portions that match the candidate conditions or candidate correction portions that do not match the candidate conditions;
前記入力処理によって入力された依存関係に関する仕分条件に一致した修正候補箇所については、前記仕分条件に一致した修正候補箇所に付与すべき属性が入力されていれば当該属性を付与し、前記入力処理によって入力された依存関係に関する仕分条件に不一致な修正候補箇所については、前記仕分条件に不一致な修正候補箇所に付与すべき属性が入力されていれば当該属性を付与する仕分処理と、a sorting process for assigning an attribute to a correction candidate portion that matches a sorting condition related to a dependency relationship input by the input process if the attribute has been input, and for assigning an attribute to a correction candidate portion that does not match a sorting condition related to a dependency relationship input by the input process if the attribute has been input;
前記仕分処理による仕分結果を出力する出力処理と、an output process for outputting a sorting result obtained by the sorting process;
を実行することを特徴とする検索方法。A search method comprising:
プロセッサと、前記プロセッサがアクセス可能な記憶デバイスと、を有する検索装置が実行する検索方法であって、A search method executed by a search device having a processor and a storage device accessible by the processor, comprising:
前記検索方法は、The search method includes:
前記プロセッサが、The processor,
ソースコード内の修正候補箇所を検索するための候補条件に基づいて、前記ソースコードから前記修正候補箇所を検索する検索処理と、a search process for searching for candidate correction locations from the source code based on candidate conditions for searching for candidate correction locations in the source code;
前記候補条件とのプログラム上の依存関係と、前記依存関係に関する仕分条件に一致した修正候補箇所または不一致な修正候補箇所に付与すべき属性と、の入力を受け付ける入力処理と、an input process for receiving input of program dependencies with the candidate conditions and attributes to be assigned to correction candidate portions that match or do not match the sorting conditions related to the dependencies;
前記仕分条件に一致した修正候補箇所については、前記仕分条件に一致した修正候補箇所に付与すべき属性が入力されていれば当該属性を付与し、前記仕分条件に不一致な修正候補箇所については、前記仕分条件に不一致な修正候補箇所に付与すべき属性が入力されていれば当該属性を付与する仕分処理と、a sorting process for assigning an attribute to a correction candidate portion that matches the sorting condition if the attribute has been input, and for assigning an attribute to a correction candidate portion that does not match the sorting condition if the attribute has been input;
前記仕分処理による仕分結果を出力する出力処理と、an output process for outputting a sorting result obtained by the sorting process;
を実行することを特徴とする検索方法。A search method comprising:
プロセッサに、The processor:
ソースコード内の修正候補箇所を検索するための候補条件に基づいて、前記ソースコードから前記修正候補箇所を検索する検索処理と、a search process for searching for candidate correction locations from the source code based on candidate conditions for searching for candidate correction locations in the source code;
前記候補条件とのプログラム上の依存関係と、前記候補条件に一致した修正候補箇所または不一致な修正候補箇所に付与すべき属性と、の入力を受け付ける入力処理と、an input process for receiving input of program dependencies with the candidate conditions and attributes to be assigned to correction candidate portions that match the candidate conditions or correction candidate portions that do not match the candidate conditions;
前記入力処理によって入力された依存関係に関する仕分条件に一致した修正候補箇所については、前記仕分条件に一致した修正候補箇所に付与すべき属性が入力されていれば当該属性を付与し、前記入力処理によって入力された依存関係に関する仕分条件に不一致な修正候補箇所については、前記仕分条件に不一致な修正候補箇所に付与すべき属性が入力されていれば当該属性を付与する仕分処理と、a sorting process for assigning an attribute to a correction candidate portion that matches a sorting condition related to a dependency relationship input by the input process if the attribute has been input, and for assigning an attribute to a correction candidate portion that does not match a sorting condition related to a dependency relationship input by the input process if the attribute has been input;
前記仕分処理による仕分結果を出力する出力処理と、an output process for outputting a sorting result obtained by the sorting process;
を実行させることを特徴とする検索プログラム。A search program characterized by executing the above.
プロセッサに、The processor:
ソースコード内の修正候補箇所を検索するための候補条件に基づいて、前記ソースコードから前記修正候補箇所を検索する検索処理と、a search process for searching for candidate correction locations from the source code based on candidate conditions for searching for candidate correction locations in the source code;
前記候補条件とのプログラム上の依存関係と、前記依存関係に関する仕分条件に一致した修正候補箇所または不一致な修正候補箇所に付与すべき属性と、の入力を受け付ける入力処理と、an input process for receiving input of program dependencies with the candidate conditions and attributes to be assigned to correction candidate portions that match or do not match the sorting conditions related to the dependencies;
前記仕分条件に一致した修正候補箇所については、前記仕分条件に一致した修正候補箇所に付与すべき属性が入力されていれば当該属性を付与し、前記仕分条件に不一致な修正候補箇所については、前記仕分条件に不一致な修正候補箇所に付与すべき属性が入力されていれば当該属性を付与する仕分処理と、a sorting process for assigning an attribute to a correction candidate portion that matches the sorting condition if the attribute has been input, and for assigning an attribute to a correction candidate portion that does not match the sorting condition if the attribute has been input;
前記仕分処理による仕分結果を出力する出力処理と、an output process for outputting a sorting result obtained by the sorting process;
を実行させることを特徴とする検索プログラム。A search program characterized by executing the above.
JP2020151724A 2020-09-10 2020-09-10 Search device, search method, and search program Active JP7469999B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2020151724A JP7469999B2 (en) 2020-09-10 2020-09-10 Search device, search method, and search program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2020151724A JP7469999B2 (en) 2020-09-10 2020-09-10 Search device, search method, and search program

Publications (3)

Publication Number Publication Date
JP2022045948A JP2022045948A (en) 2022-03-23
JP2022045948A5 JP2022045948A5 (en) 2023-02-10
JP7469999B2 true JP7469999B2 (en) 2024-04-17

Family

ID=80779629

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2020151724A Active JP7469999B2 (en) 2020-09-10 2020-09-10 Search device, search method, and search program

Country Status (1)

Country Link
JP (1) JP7469999B2 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002222099A (en) 2000-11-27 2002-08-09 Fujitsu Ltd Program development support device, recording medium, and program
JP2015088191A (en) 2013-10-31 2015-05-07 タタ コンサルタンシー サービシズ リミテッドTATA Consultancy Services Limited System and method to facilitate user interface enabled review of static analysis warnings
JP2019168753A (en) 2018-03-22 2019-10-03 三菱電機株式会社 Source code analysis device and source code analysis program

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002222099A (en) 2000-11-27 2002-08-09 Fujitsu Ltd Program development support device, recording medium, and program
JP2015088191A (en) 2013-10-31 2015-05-07 タタ コンサルタンシー サービシズ リミテッドTATA Consultancy Services Limited System and method to facilitate user interface enabled review of static analysis warnings
JP2019168753A (en) 2018-03-22 2019-10-03 三菱電機株式会社 Source code analysis device and source code analysis program

Also Published As

Publication number Publication date
JP2022045948A (en) 2022-03-23

Similar Documents

Publication Publication Date Title
US9898280B2 (en) Automatic code review and code reviewer recommendation
US9286035B2 (en) Code remediation
JP5775829B2 (en) Software structure visualization program and system
JP6911059B2 (en) Query optimizer for CPU utilization and code refactoring
JP2007094753A (en) Logic extraction support device
US8364696B2 (en) Efficient incremental parsing of context sensitive programming languages
KR101554424B1 (en) Method and apparatus for auto generation of test case
US9311077B2 (en) Identification of code changes using language syntax and changeset data
JP7469999B2 (en) Search device, search method, and search program
JP6651974B2 (en) Information processing apparatus, compiling method and compiler program
JP2006277282A (en) Model evaluation analysis system and model evaluation analysis program
JP6993573B2 (en) Program analysis method, program analysis device and program analysis program
JP6748357B2 (en) Analysis device, analysis program, and analysis method
JP2019133534A (en) Merging method, merging device, and merging program
CN114356783A (en) Method and device for automatically generating unit test code, storage medium and equipment
JP5578625B2 (en) Program analysis apparatus, program analysis method, and program
JP2015133031A (en) Program analyzer and program analysis method
JP2007264863A (en) Analyzer used for business
JP5962350B2 (en) Program, information processing apparatus and test method
JP7515734B2 (en) Information processing device, program, and information processing method
JP4953896B2 (en) Program review support device
US20060122822A1 (en) Language grammar driven recognizer of similar code fragments and methods
WO2024082983A1 (en) Code recommendation method and apparatus, and related device
US9495133B1 (en) Template-based BIOS component creation
Gąsior ReSharper Essentials

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20230202

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20230202

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20240130

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20240130

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20240228

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: 20240402

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20240405

R150 Certificate of patent or registration of utility model

Ref document number: 7469999

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150