[go: up one dir, main page]

JP6121828B2 - Static analysis apparatus, static analysis method, and computer program - Google Patents

Static analysis apparatus, static analysis method, and computer program Download PDF

Info

Publication number
JP6121828B2
JP6121828B2 JP2013155787A JP2013155787A JP6121828B2 JP 6121828 B2 JP6121828 B2 JP 6121828B2 JP 2013155787 A JP2013155787 A JP 2013155787A JP 2013155787 A JP2013155787 A JP 2013155787A JP 6121828 B2 JP6121828 B2 JP 6121828B2
Authority
JP
Japan
Prior art keywords
information
warning
similar
priority
difference
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
JP2013155787A
Other languages
Japanese (ja)
Other versions
JP2015026276A (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.)
NEC Engineering Ltd
Original Assignee
NEC Engineering 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 NEC Engineering Ltd filed Critical NEC Engineering Ltd
Priority to JP2013155787A priority Critical patent/JP6121828B2/en
Publication of JP2015026276A publication Critical patent/JP2015026276A/en
Application granted granted Critical
Publication of JP6121828B2 publication Critical patent/JP6121828B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)
  • Stored Programmes (AREA)

Description

本発明は、ソースコードに対する静的解析を行う静的解析装置、静的解析方法、およびコンピュータ・プログラムに関する。   The present invention relates to a static analysis apparatus, a static analysis method, and a computer program for performing static analysis on source code.

ソフトウェア開発において、ソースコードに対する静的解析を行う静的解析装置が知られている。静的解析は、動作不良などの不具合を起こす可能性を減らす目的で行われる。静的解析装置は、不具合に繋がりやすいパターンを予め定義しておき、ソースコードを実際に実行することなく、ソースコード内から定義に合致する記述誤りのある箇所、または、記述誤りの可能性が高い箇所を特定して警告を出力する。ソフトウェアの開発者は、それらの警告のうち修正が必要と判断した警告を修正することを繰り返し、ソースコードの品質改善を行う。   In software development, a static analysis device that performs static analysis on a source code is known. Static analysis is performed in order to reduce the possibility of malfunctions such as malfunctions. The static analysis device predefines patterns that are likely to lead to defects, and there is a possibility of a description error or a description error that matches the definition from within the source code without actually executing the source code. Specify a high point and output a warning. The software developer repeatedly corrects those warnings that are determined to be necessary to improve the quality of the source code.

ここで、ソースコードでは、複数の箇所に類似する動作が記述されることが多い。そこで、ソフトウェア開発者は、関数単位、行単位などの様々な単位で、ソースコードの複製を行うことがある。もし、複製元の記述に誤りがあると、複製先にも同様の誤りが記述される。そのような場合、静的解析装置は、多数の同一の警告を出力してしまう。   Here, in the source code, operations similar to a plurality of locations are often described. Therefore, a software developer may copy source code in various units such as a function unit and a line unit. If there is an error in the description of the copy source, the same error is also described in the copy destination. In such a case, the static analyzer outputs a number of identical warnings.

さらに、静的解析装置により出力される警告は、ソースコードの規模が大きくなるにつれ増加していく傾向がある。また、これらの警告には、実際には、不具合に繋がる警告も不具合に繋がらない警告も含まれる。したがって、静的解析装置から出力されるすべての警告を確認することは、ソフトウェア開発者にとって困難になっている。このため、どの警告を修正すべきかを提示する技術が求められている。   Further, the warning output by the static analysis device tends to increase as the size of the source code increases. In addition, these warnings include warnings that actually lead to malfunctions and warnings that do not lead to malfunctions. Therefore, it is difficult for software developers to check all warnings output from the static analysis device. For this reason, a technique for presenting which warning should be corrected is required.

このような要求に対応する関連技術が、特許文献1に記載されている。特許文献1の関連技術は、対象のソースコードが、あらかじめ規定されたソースコードのコーディングルールに準拠しているかどうかを解析し、準拠していない違反箇所に関連する情報を、解析結果として出力する。このとき、この関連技術は、コーディングルールのルールIDごとに出力要否を設定しておき、出力要と設定されたルールIDに対応する違反箇所を出力する。   A related technique corresponding to such a request is described in Patent Document 1. The related technology of Patent Document 1 analyzes whether the target source code conforms to the coding rules of the source code defined in advance, and outputs information related to the non-compliant violation location as an analysis result. . At this time, this related technology sets whether or not output is required for each rule ID of the coding rule, and outputs a violation location corresponding to the rule ID set as output required.

また、他の関連技術が、特許文献2に記載されている。特許文献2に記載された関連技術は、初回記憶時のソースコードから前回記憶時までのソースコードについて、モジュール単位で変更の履歴を管理する。そして、この関連技術は、新たなソースコードに対して静的解析を行って検出した不具合箇所のうち、変更の累計回数がより多いモジュールで検出された不具合箇所から順に警告を出力する。   Another related technique is described in Patent Document 2. The related technology described in Patent Document 2 manages a history of changes in module units for source code from the initial storage time to the previous storage time. And this related technology outputs warnings in order from the defective part detected by the module having the larger total number of changes among the defective parts detected by performing static analysis on the new source code.

また、他の関連技術が、特許文献3に記載されている。特許文献3に記載された関連技術は、ソースコードの静的解析を行うことにより得られる警告箇所について、警告種別を表す警告IDと、警告箇所を含むソースコード行とを含むレコードからなる警告テーブルを生成する。そして、この関連技術は、警告IDおよびソースコード行の同一性に基づいて警告テーブルをソートし出力する。   Another related technique is described in Patent Document 3. The related technology described in Patent Document 3 is a warning table including a warning ID indicating a warning type and a record including a source code line including a warning point for a warning point obtained by performing static analysis of the source code. Is generated. This related technique sorts and outputs the warning table based on the warning ID and the identity of the source code line.

特開2010−198522号公報JP 2010-198522 A 特開2008−21244号公報JP 2008-21244 A 特開2012−248050号公報JP 2012-248050 A

上述した各関連技術は、ソースコードの静的解析時に出力する膨大な警告について、ある程度優先順位をつけて出力することができるものの、依然として以下のような課題がある。   Each of the related technologies described above can output a huge number of warnings output during static analysis of source code with some priority, but still has the following problems.

特許文献1に記載された関連技術は、ルールID毎に出力要否を選択できるが、実際には、同じルールIDの警告であっても、対応が必要な警告と対応が不要な警告とに区別できる場合が大いにある。このため、この関連技術は、対応が不要な警告のルールIDを出力否に設定すると、対応が必要な警告も出力できなくなってしまう。このように、この関連技術は、静的解析時に出力される警告に対する優先度付けの精度が十分でない。   The related technology described in Patent Document 1 can select whether or not output is required for each rule ID, but in fact, even for warnings with the same rule ID, warnings that need to be handled and warnings that do not need to be handled There are many cases where it can be distinguished. For this reason, in this related technology, if the rule ID of a warning that does not need to be set is set to output failure, a warning that needs to be handled cannot be output. Thus, this related technology does not have sufficient accuracy for prioritizing warnings output during static analysis.

また、特許文献2に記載された関連技術は、更新回数がより多いモジュールにおいて指摘された警告に対してより高い優先度付けを行う。しかし、この関連技術では、モジュールの単位の取り方によって更新回数が変わり、優先度も異なってくるため、モジュールの単位を適切に設定する必要がある。また、この関連技術は、モジュールを機能単位で設定した場合、機能単位ごとに優先度を付けることになる。ここで、ある機能において記述されたある関数が、別の機能において再利用のためコピーされ、コピー元およびコピー先で同一の警告が出力される場合について考える。このような場合、この関連技術は、これらの警告が複製された記述に起因する同一の警告であるにも関わらず、コピー元およびコピー先が異なるモジュールに含まれるため、異なる優先順位付けをする可能性が高い。このように、この関連技術は、出力される警告に対して精度よく優先度付けをすることができない。   In addition, the related technique described in Patent Document 2 gives higher priority to warnings pointed out in modules with a higher number of updates. However, in this related technique, the number of updates varies depending on how the unit of the module is taken, and the priority is also different. Therefore, it is necessary to set the module unit appropriately. In addition, in the related technology, when modules are set in units of functions, priorities are assigned to the units of functions. Here, consider a case where a function described in one function is copied for reuse in another function, and the same warning is output at the copy source and the copy destination. In such a case, this related technology prioritizes differently because the source and destination are contained in different modules, even though these warnings are the same warning due to the duplicated description. Probability is high. Thus, this related technology cannot prioritize the output warning with high accuracy.

また、特許文献3に記載された関連技術は、静的解析の結果を、警告種別およびソースコード行の同一性に基づいて並び替えて表示する。しかし、この関連技術は、実際には複製された記述に基づく同一の警告であっても、ソースコード行が若干異なるだけで、異なる警告として扱ってしまう場合がある。また、この関連技術は、ソースコードの行単位で同一性を判断し、モジュール単位などの他の単位で同一性を判断しないため、実際には同一とみなせる記述を同一であると判断できないことがある。その結果、この関連技術は、静的解析の結果を、精度よく優先度付けして提示することができない。   The related technique described in Patent Literature 3 displays the results of static analysis by rearranging the results based on the warning type and the identity of the source code lines. However, in this related technology, even the same warning based on the duplicated description may be treated as different warnings with only slightly different source code lines. In addition, since this related technology determines identity in line units of source code, and does not determine identity in other units such as module units, it may not be possible to determine that descriptions that can actually be considered identical are the same is there. As a result, this related technique cannot present the result of the static analysis with high priority.

本発明は、上述の課題を解決するためになされたもので、ソースコードに対する静的解析の結果を精度よく優先度付けして提示する技術を提供することを目的とする。   The present invention has been made in order to solve the above-described problems, and an object of the present invention is to provide a technique for accurately prioritizing and presenting the results of static analysis on a source code.

本発明の静的解析装置は、入力されたソースコードに対して静的解析を行うことにより、前記ソースコードにおける警告箇所の位置を表す警告位置情報と、警告の種別を識別する警告識別情報とを含む警告情報を生成する静的解析部と、前記ソースコードにおいて互いに類似する部分(類似部分)を抽出することにより、各類似部分について、該互いに類似する類似部分を他の互いに類似する類似部分から識別する類似識別情報と、該類似部分の範囲を表す範囲情報とを含む類似部分情報を生成する類似部分抽出部と、前記警告情報および前記類似部分情報を照合することにより、各警告情報に対して、該警告情報の示す警告箇所の位置を含む類似部分の類似識別情報を追加した連結警告情報を生成する情報連結部と、前記連結警告情報に対して、前記警告識別情報および前記類似識別情報に基づく優先度決定基準を用いて優先度を決定し、決定した優先度にしたがって前記連結警告情報を出力する優先度決定部と、を備える。   The static analysis device according to the present invention performs warning analysis on the input source code, thereby warning position information indicating a position of a warning portion in the source code, warning identification information for identifying a warning type, and By extracting a static analysis unit that generates warning information including a part similar to each other (similar part) in the source code, the similar part similar to each other is extracted from each similar part. Each warning information by collating the warning information and the similar part information with a similar part extracting unit that generates similar part information including the similar identification information identified from the range information indicating the range of the similar part. On the other hand, an information linking unit for generating linked warning information to which similar identification information of similar parts including the position of the warning location indicated by the warning information is added, and the linked warning information. Te, and a priority determination unit which outputs the connection warning information in accordance with determining the priority determined priority using the priority decision criteria based on the warning identification information and the similarity identification information.

また、本発明の静的解析方法は、入力されたソースコードに対して静的解析を行うことにより、前記ソースコードにおける警告箇所の位置を表す警告位置情報と、警告の種別を識別する警告識別情報とを含む警告情報を生成し、前記ソースコードにおいて互いに類似する部分(類似部分)を抽出することにより、各類似部分について、該互いに類似する類似部分を他の互いに類似する類似部分から識別する類似識別情報と、該類似部分の範囲を表す範囲情報とを含む類似部分情報を生成し、前記警告情報および前記類似部分情報を照合することにより、各警告情報に対して、該警告情報の示す警告箇所の位置を含む類似部分の類似識別情報を追加した連結警告情報を生成し、前記連結警告情報に対して、前記警告識別情報および前記類似識別情報に基づく優先度決定基準を用いて優先度を決定し、決定した優先度にしたがって前記連結警告情報を出力する。   Further, the static analysis method of the present invention performs warning analysis on the input source code, thereby warning position information indicating a position of a warning portion in the source code and warning identification for identifying a warning type. Warning information including information is generated, and similar parts (similar parts) are extracted from the source code, so that similar parts similar to each other are identified from other similar parts. By generating similar part information including similar identification information and range information indicating the range of the similar part, and collating the warning information and the similar part information, the warning information indicates each warning information. Generate linked warning information to which similar identification information of a similar part including the position of the warning part is added, and the warning identification information and the similar identification for the linked warning information It determines the priority by using the priority decision criteria based on the distribution, and outputs the connection alert information according to the determined priority.

また、本発明のコンピュータ・プログラムは、入力されたソースコードに対して静的解析を行うことにより、前記ソースコードにおける警告箇所の位置を表す警告位置情報と、警告の種別を識別する警告識別情報とを含む警告情報を生成する静的解析ステップと、前記ソースコードにおいて互いに類似する部分(類似部分)を抽出することにより、各類似部分について、該互いに類似する類似部分を他の互いに類似する類似部分から識別する類似識別情報と、該類似部分の範囲を表す範囲情報とを含む類似部分情報を生成する類似部分抽出ステップと、前記警告情報および前記類似部分情報を照合することにより、各警告情報に対して、該警告情報の示す警告箇所の位置を含む類似部分の類似識別情報を追加した連結警告情報を生成する情報連結ステップと、前記連結警告情報に対して、前記警告識別情報および前記類似識別情報に基づく優先度決定基準を用いて優先度を決定し、決定した優先度にしたがって前記連結警告情報を出力する優先度決定ステップと、をコンピュータ装置に実行させる。   Further, the computer program of the present invention performs static analysis on the input source code to thereby provide warning position information indicating the position of the warning portion in the source code and warning identification information for identifying the type of warning. A static analysis step for generating warning information including: and extracting similar parts (similar parts) from each other in the source code so that similar parts similar to each other are similar to each other Each warning information is obtained by collating the warning information and the similar part information with a similar part extraction step for generating similar part information including similar identification information identified from the part and range information indicating the range of the similar part. Information for generating linked warning information to which similar identification information of similar parts including the position of the warning location indicated by the warning information is added A priority for determining the priority using the priority determination criteria based on the warning identification information and the similar identification information, and outputting the connection warning information according to the determined priority. And causing the computer device to execute a degree determination step.

本発明は、ソースコードに対する静的解析の結果を、精度よく優先度付けして提示する技術を提供することができる。   The present invention can provide a technique for presenting the results of static analysis on the source code with prioritization with high accuracy.

本発明の第1の実施の形態としての静的解析装置の機能ブロック図である。It is a functional block diagram of a static analysis device as a 1st embodiment of the present invention. 本発明の第1の実施の形態としての静的解析装置のハードウェア構成の一例を示す図である。It is a figure which shows an example of the hardware constitutions of the static analysis apparatus as the 1st Embodiment of this invention. 本発明の第1の実施の形態としての静的解析装置の動作を説明するフローチャートである。It is a flowchart explaining operation | movement of the static analysis apparatus as the 1st Embodiment of this invention. 本発明の第1の実施の形態における警告情報の一例を示す図である。It is a figure which shows an example of the warning information in the 1st Embodiment of this invention. 本発明の第1の実施の形態における類似部分情報の一例を示す図である。It is a figure which shows an example of the similar part information in the 1st Embodiment of this invention. 本発明の第1の実施の形態における連結警告情報の一例を示す図である。It is a figure which shows an example of the connection warning information in the 1st Embodiment of this invention. 本発明の第1の実施の形態において優先度付けされた連結警告情報の一例を示す図である。It is a figure which shows an example of the connection warning information prioritized in the 1st Embodiment of this invention. 本発明の第2の実施の形態としての静的解析装置の機能ブロック図である。It is a functional block diagram of the static analysis apparatus as the 2nd Embodiment of this invention. 本発明の第2の実施の形態としての静的解析装置の動作を説明するフローチャートである。It is a flowchart explaining operation | movement of the static analysis apparatus as the 2nd Embodiment of this invention. 本発明の第2の実施の形態における差分情報の一例を示す図である。It is a figure which shows an example of the difference information in the 2nd Embodiment of this invention. 本発明の第2の実施の形態における連結警告情報の一例を示す図である。It is a figure which shows an example of the connection warning information in the 2nd Embodiment of this invention. 本発明の第2の実施の形態において優先度付けされた連結警告情報の一例を示す図である。It is a figure which shows an example of the connection warning information prioritized in the 2nd Embodiment of this invention.

以下、本発明の実施の形態について、図面を参照して詳細に説明する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.

(第1の実施の形態)
本発明の第1の実施の形態としての静的解析装置1の機能ブロック構成を図1に示す。
(First embodiment)
FIG. 1 shows a functional block configuration of a static analysis apparatus 1 as a first embodiment of the present invention.

図1において、静的解析装置1は、静的解析部11と、類似部分抽出部12と、情報連結部13と、優先度決定部14とを備える。   In FIG. 1, the static analysis device 1 includes a static analysis unit 11, a similar part extraction unit 12, an information connection unit 13, and a priority determination unit 14.

ここで、静的解析装置1は、図2に示すように、CPU(Central Processing Unit)1001と、RAM(Random Access Memory)1002と、ROM(Read Only Memory)1003と、ハードディスク等の記憶装置1004と、入力装置1005と、出力装置1006とを備えたコンピュータ装置によって構成可能である。この場合、静的解析部11は、入力装置1005と、ROM1003および記憶装置1004に記憶されたコンピュータ・プログラムおよび各種データをRAM1002に読み込んで実行するCPU1001とによって構成される。また、類似部分抽出部12および情報連結部13は、ROM1003および記憶装置1004に記憶されたコンピュータ・プログラムおよび各種データをRAM1002に読み込んで実行するCPU1001によって構成される。また、優先度決定部14は、出力装置1006と、ROM1003および記憶装置1004に記憶されたコンピュータ・プログラムおよび各種データをRAM1002に読み込んで実行するCPU1001とによって構成される。なお、静的解析装置1およびその各機能ブロックのハードウェア構成は、上述の構成に限定されない。   Here, as shown in FIG. 2, the static analysis device 1 includes a CPU (Central Processing Unit) 1001, a RAM (Random Access Memory) 1002, a ROM (Read Only Memory) 1003, and a storage device 1004 such as a hard disk. And a computer device including an input device 1005 and an output device 1006. In this case, the static analysis unit 11 includes an input device 1005 and a CPU 1001 that reads a computer program and various data stored in the ROM 1003 and the storage device 1004 into the RAM 1002 and executes them. The similar portion extraction unit 12 and the information connection unit 13 are configured by a CPU 1001 that reads a computer program and various data stored in the ROM 1003 and the storage device 1004 into the RAM 1002 and executes them. The priority determination unit 14 includes an output device 1006 and a CPU 1001 that reads a computer program and various data stored in the ROM 1003 and the storage device 1004 into the RAM 1002 and executes them. Note that the hardware configuration of the static analysis device 1 and each functional block thereof is not limited to the above-described configuration.

静的解析部11は、入力されたソースコードに対して静的解析を行い、解析結果として警告情報を生成する。例えば、静的解析部11は、ソースコード内における不具合に繋がりやすいパターンを検出する公知の各種技術を採用可能である。また、ソースコードは、1つ以上の一群のファイルに記述されたものであってもよい。例えば、静的解析部11は、記憶装置1004におけるソースコードの格納場所を特定する情報を入力装置1005を介して取得することにより、ソースコードを取得してもよい。警告情報には、警告位置情報と、警告識別情報とが少なくとも含まれる。ここで、警告位置情報とは、ソースコードにおける警告箇所の位置を表す情報である。例えば、警告位置情報は、警告箇所が含まれるファイル名と、警告箇所の行番号とを含む情報であってもよい。また、警告識別情報とは、警告の種別を識別する情報である。   The static analysis unit 11 performs a static analysis on the input source code and generates warning information as an analysis result. For example, the static analysis unit 11 can employ various known techniques for detecting patterns that are likely to lead to defects in the source code. The source code may be described in one or more groups of files. For example, the static analysis unit 11 may acquire the source code by acquiring, via the input device 1005, information specifying the storage location of the source code in the storage device 1004. The warning information includes at least warning position information and warning identification information. Here, the warning position information is information indicating the position of the warning part in the source code. For example, the warning position information may be information including a file name including a warning part and a line number of the warning part. The warning identification information is information for identifying the type of warning.

類似部分抽出部12は、ソースコードにおいて互いに類似する部分(類似部分)を抽出する。例えば、類似部分抽出部12は、ソースコードにおける任意の範囲の部分について、所定の類似条件を満たす他の部分を抽出する。任意の範囲とは、例えば、数行から数十行などの範囲であってもよい。所定の類似条件とは、例えば、識別子や引数など一部だけが異なり残る部分が同一であることや、コメントや空白文字などプログラムの動作に影響しない箇所だけが異なり残る部分が同一であることなどであってもよい。その他、類似部分抽出部12は、テキストデータにおいて互いに類似する部分を抽出する公知の各種技術を採用してもよい。   The similar part extraction unit 12 extracts similar parts (similar parts) from each other in the source code. For example, the similar part extraction unit 12 extracts another part satisfying a predetermined similarity condition for an arbitrary range part in the source code. The arbitrary range may be a range from several lines to several tens of lines, for example. Predetermined similar conditions include, for example, the same part that remains different, such as identifiers and arguments, and the same part that remains different only in places that do not affect the operation of the program, such as comments and blank characters. It may be. In addition, the similar part extraction unit 12 may employ various known techniques for extracting similar parts from each other in the text data.

また、類似部分抽出部12は、抽出した各類似部分について、類似識別情報と、範囲情報とを含む類似部分情報を生成する。ここで、類似識別情報は、互いに類似する類似部分を、他の互いに類似する類似部分から識別するための情報である。つまり、類似識別情報は、互いに類似する類似部分のグループごとに、異なる値が付与される。範囲情報は、ソースコードにおける該当部分の範囲を表す。例えば、範囲情報は、その類似部分が含まれるファイル名と、開始行番号と、終了行番号とを含む情報であってもよい。   Further, the similar part extraction unit 12 generates similar part information including similar identification information and range information for each extracted similar part. Here, the similarity identification information is information for identifying similar parts that are similar to each other from other similar parts that are similar to each other. That is, the similarity identification information is assigned a different value for each group of similar parts that are similar to each other. The range information represents the range of the corresponding part in the source code. For example, the range information may be information including a file name including the similar part, a start line number, and an end line number.

情報連結部13は、静的解析部11により出力された警告情報および類似部分抽出部12により生成された類似部分情報を照合することにより、各警告情報に対して類似識別情報を追加した連結警告情報を生成する。具体的には、情報連結部13は、各警告情報に対して、その警告情報の示す警告箇所の位置を含む類似部分があればその類似識別情報を追加すればよい。   The information linking unit 13 collates the warning information output by the static analysis unit 11 and the similar part information generated by the similar part extraction unit 12, thereby adding similar identification information to each warning information. Generate information. Specifically, if there is a similar part including the position of the warning location indicated by the warning information, the information connecting unit 13 may add the similar identification information to each warning information.

優先度決定部14は、情報連結部13により生成された連結警告情報に対して、警告識別情報および類似識別情報に基づく優先度決定基準にしたがって優先度を付ける。そして、優先度決定部14は、決定した優先度にしたがって、連結警告情報を出力装置1006に出力する。   The priority determination unit 14 gives priority to the connection warning information generated by the information connection unit 13 according to a priority determination criterion based on the warning identification information and the similar identification information. Then, the priority determination unit 14 outputs connection warning information to the output device 1006 according to the determined priority.

例えば、優先度決定部14は、警告識別情報および類似識別情報の組み合わせが同一の警告情報の数をカウントし、カウント数が多い順により高い優先度をつけてもよい。また、その場合、優先度決定部14は、同一の優先度となった警告情報については、同一の類似識別情報のカウント数がより多い順により高い優先度をつけてもよい。その場合、優先度決定部14は、さらに同一の優先度となった警告情報については、同一の警告識別情報のカウント数がより多い順により高い優先度をつけてもよい。その他、優先度決定部14は、警告識別情報および類似識別情報に基づく基準であれば、その他の優先度決定基準により優先度付けを行ってもよい。   For example, the priority determination unit 14 may count the number of warning information having the same combination of warning identification information and similar identification information, and give a higher priority in descending order of the number of counts. In this case, the priority determination unit 14 may give higher priority to the warning information having the same priority in the descending order of the count number of the same similar identification information. In that case, the priority determination unit 14 may give higher priority to the warning information having the same priority in the descending order of the count number of the same warning identification information. In addition, as long as the priority determination unit 14 is a criterion based on the warning identification information and the similar identification information, the priority determination unit 14 may prioritize according to another priority determination criterion.

以上のように構成された静的解析装置1の動作について、図3を参照して説明する。   The operation of the static analysis apparatus 1 configured as described above will be described with reference to FIG.

まず、静的解析部11は、入力されたソースコードに対して静的解析を行い、警告位置情報と警告識別情報とからなる警告情報を生成する(ステップS1)。   First, the static analysis unit 11 performs static analysis on the input source code, and generates warning information including warning position information and warning identification information (step S1).

次に、類似部分抽出部12は、ソースコードにおいて、互いに類似する類似部分を抽出し、抽出した各類似部分について、類似識別情報と範囲情報とからなる類似部分情報を生成する(ステップS2)。   Next, the similar part extraction unit 12 extracts similar parts that are similar to each other in the source code, and generates similar part information including similar identification information and range information for each extracted similar part (step S2).

次に、情報連結部13は、ステップS1で生成された各警告情報に、ステップS2で生成された類似部分情報の類似識別情報を追加した連結警告情報を生成する(ステップS3)。具体的には、前述のように、情報連結部13は、各警告情報に、その警告情報の示す警告箇所の位置を含む類似部分の類似識別情報を追加すればよい。   Next, the information linking unit 13 generates linked warning information in which similar identification information of the similar partial information generated in step S2 is added to each warning information generated in step S1 (step S3). Specifically, as described above, the information connecting unit 13 may add similar identification information of a similar part including the position of the warning portion indicated by the warning information to each warning information.

次に、優先度決定部14は、ステップS3で生成された連結警告情報について、警告識別情報および類似識別情報に基づく優先度決定基準にしたがって優先度を付ける。そして、優先度決定部14は、決定した優先度にしたがって、連結警告情報を出力する(ステップS4)。   Next, the priority determination unit 14 gives priority to the connection warning information generated in step S3 according to a priority determination criterion based on the warning identification information and the similar identification information. And the priority determination part 14 outputs a connection warning information according to the determined priority (step S4).

以上で、静的解析装置1は動作を終了する。   Thus, the static analysis apparatus 1 ends the operation.

次に、静的解析装置1の動作を具体例で示す。   Next, the operation of the static analysis apparatus 1 will be shown as a specific example.

ここでは、静的解析部11は、不具合に繋がりやすい記述のパターンを記憶し、ソースコードにおいてパターンと合致する箇所を、ルール違反の可能性がある警告箇所として検出するものとする。   Here, it is assumed that the static analysis unit 11 stores a description pattern that is likely to cause a failure, and detects a location that matches the pattern in the source code as a warning location that may cause a rule violation.

まず、ステップS1において、静的解析部11は、入力されたソースコードのうち、記憶しているパターンに合致する警告箇所を検出し、警告情報を生成する。ここでは、図4に示す警告情報が生成されたものとする。図4において、各行が示す警告情報は、警告位置情報としてのファイル名および行番号と、警告識別情報としての警告IDとを含み、さらに、警告内容と、該当行ソースコード(該当行の記述内容)とを含んでいる。このように、静的解析部11によって生成される警告情報は、少なくとも警告位置情報および警告識別情報を含んでいれば、その他の情報を含んでいてもよい。以降、これらの警告情報を、警告テーブルとも記載する。   First, in step S1, the static analysis unit 11 detects a warning location that matches a stored pattern in the input source code, and generates warning information. Here, it is assumed that the warning information shown in FIG. 4 has been generated. In FIG. 4, the warning information indicated by each line includes a file name and line number as warning position information and a warning ID as warning identification information, and further includes warning contents and corresponding line source code (description contents of the corresponding line). ). Thus, the warning information generated by the static analysis unit 11 may include other information as long as it includes at least warning position information and warning identification information. Hereinafter, this warning information is also referred to as a warning table.

次に、ステップS2において、類似部分抽出部12は、入力されたソースコードにおいて互いに類似する類似部分を抽出する。この具体例では、類似部分抽出部12は、数行から数十行程度の範囲の部分に対して、例えば、識別子、引数など一部だけが異なっている他の部分や、コメントや空白文字などプログラムの動作に影響しない箇所だけが異なっている他の部分を、類似部分として抽出する。   Next, in step S2, the similar part extraction unit 12 extracts similar parts that are similar to each other in the input source code. In this specific example, the similar part extracting unit 12 is different from the part in the range of several lines to several tens of lines, for example, other parts such as identifiers and arguments, comments, blank characters, etc. Other parts that differ only in the parts that do not affect the operation of the program are extracted as similar parts.

そして、類似部分抽出部12は、抽出した各類似部分について、類似識別情報としての類似IDと、範囲情報とからなる類似部分情報を生成する。ここでは、図5に示す類似部分情報が生成されたものとする。図5において、各行が示す類似部分情報は、範囲情報としてのファイル名、開始行番号、および、終了行番号と、類似IDとを含む。また、互いに類似する類似部分のグループには、他の互いに類似する類似部分のグループから識別するための同一の類似IDが付与される。以降、これらの類似部分情報を、類似部分テーブルとも記載する。   And the similar part extraction part 12 produces | generates the similar part information which consists of the similar ID as similar identification information, and range information about each extracted similar part. Here, it is assumed that the similar partial information shown in FIG. 5 is generated. In FIG. 5, the similar partial information indicated by each line includes a file name, start line number, end line number, and similar ID as range information. In addition, the group of similar parts that are similar to each other is assigned the same similarity ID for identifying the group of similar parts that are similar to each other. Hereinafter, the similar part information is also referred to as a similar part table.

次に、ステップS3において、情報連結部13は、図4に示した警告テーブルと、図5に示した類似テーブルとを照合することにより、各警告情報に類似IDを追加して連結警告情報を生成する。   Next, in step S3, the information linking unit 13 compares the warning table shown in FIG. 4 with the similar table shown in FIG. Generate.

具体的には、情報連結部13は、各警告情報について、その警告位置情報を含む範囲情報を持つ類似部分情報を検索する。そして、そのような類似部分情報が検索された場合、情報連結部13は、該当する警告テーブルの行に、検索した類似部分情報の類似IDを追加すればよい。   Specifically, the information linking unit 13 searches for similar partial information having range information including the warning position information for each warning information. And when such similar part information is searched, the information connection part 13 should just add the similarity ID of the searched similar part information to the row | line | column of a corresponding warning table.

例えば、図4に示した警告テーブルの1行目の警告情報は、該当する警告箇所が「ファイル“A0001.c”の“111”行目」にあることを表している。また、この「“A0001.c”の“111”行目」は、図5に示した類似テーブルの1行目の類似部分情報の範囲である「ファイル“A0001.c”の開始行“110”行目から終了行“119”行目まで」に含まれている。そこで、情報連結部13は、図4の警告テーブルの1行目に、類似テーブルの1行目の類似IDである“001”を追加する。また、図4に示した警告テーブルの3行目の警告情報は、該当する警告箇所が「ファイル“A0001.c”の“238”行目」にあることを表している。また、この「“A0001.c”の“238”行目」を含む範囲の類似部分情報は、図5に示した類似テーブルに含まれていない。そこで、情報連結部13は、図4の警告テーブルの3行目に、類似IDを追加しない。そして、情報連結部13は、図4の警告テーブルの他の行についても、同様に処理を行っていく。このようにして、類似IDが追加された連結警告情報の一例を図6に示す。以降、これらの連結警告情報を、連結警告テーブルとも記載する。   For example, the warning information on the first line of the warning table shown in FIG. This indicates that it is in “111” line of c ”. In addition, this ““ A0001. “111” line of “c” is a range of the similar part information of the first line of the similar table shown in FIG. c ”from the start line“ 110 ”to the end line“ 119 ”. Therefore, the information linking unit 13 adds “001” that is the similarity ID of the first row of the similar table to the first row of the warning table of FIG. Further, the warning information on the third line of the warning table shown in FIG. 4 indicates that the corresponding warning location is “file“ A0001. This indicates that it is in “line 238” of c ”. In addition, this ““ A0001. The similar part information in the range including the “238th line” of c ”is not included in the similar table shown in FIG. Therefore, the information linking unit 13 does not add a similar ID to the third row of the warning table in FIG. And the information connection part 13 processes similarly about the other line of the warning table of FIG. An example of the connection warning information to which the similar ID is added in this way is shown in FIG. Hereinafter, the connection warning information is also referred to as a connection warning table.

次に、ステップS4において、優先度決定部14は、図6の連結警告テーブルの各行に対して、警告IDおよび類似IDに基づく優先度決定基準を用いて、優先度を付与する。   Next, in step S4, the priority determination unit 14 gives priority to each row of the linked warning table in FIG. 6 using a priority determination criterion based on the warning ID and the similar ID.

ここでは、優先度決定部14は、まず、警告IDおよび類似IDの組み合わせが同一の連結警告情報のカウント数が多い順に、より高い優先度を付与する。また、優先度決定部14は、警告IDおよび類似IDの組み合わせのカウント数が同一のものについては、同一の類似IDのカウント数の多い順に、より高い優先度を付与する。さらに、優先度決定部14は、類似IDのカウント数が同一のものについては、同一の警告IDのカウント数の多い順に、より高い優先度を付与する。   Here, the priority determination unit 14 first assigns higher priorities in descending order of the number of linked warning information having the same combination of warning ID and similar ID. Moreover, the priority determination part 14 gives a higher priority to the thing with the same count number of the same similar ID about the thing with the same count number of the combination of warning ID and similar ID. Furthermore, the priority determination part 14 gives a higher priority to the thing with the same count number of similar ID in order with many count numbers of the same warning ID.

例えば、図6において、警告IDが“ID505”であり、かつ、類似IDが“001”である連結警告情報のカウント数は、1、4、7行目の3つである。また、警告IDが“ID607”であり、かつ、類似IDが“002”である連結警告情報のカウント数は、2、6行目の2つである。それ以外の各連結警告情報は、類似IDおよび警告IDの組み合わせが同一のものが他にないため、カウント数は1つとなる。そこで、まず、優先度決定部14は、1、4、7行目に優先度1を付与し、2、6行目に優先度2を付与する。なお、ここでは、優先度の値が小さいほど、優先度が高いことを表すものとする。   For example, in FIG. 6, the count numbers of the linked warning information whose warning ID is “ID505” and whose similar ID is “001” are three in the first, fourth, and seventh lines. In addition, the count numbers of the linked warning information whose warning ID is “ID607” and whose similar ID is “002” are two in the second and sixth lines. Each of the other linked warning information has no other combination with the same combination of similar ID and warning ID, so the count number is one. Therefore, the priority determination unit 14 first assigns priority 1 to the first, fourth, and seventh lines, and assigns priority 2 to the second, sixth, and sixth lines. Here, the smaller the priority value, the higher the priority.

また、残りの3、5、8行目は、類似IDおよび警告IDの組み合わせのカウント数が1で同一である。そのため、優先度決定部14は、3、5、8行目について、類似IDのカウント数に基づいて優先度付けを行う。ここで、3、5、8行目の類似IDのうち、5行目の類似ID“001”が、1〜8行目におけるカウント数が4つで最も多い。したがって、優先度決定部14は、5行目に優先度3を付与する。   In the remaining third, fifth, and eighth lines, the number of counts of combinations of similar IDs and warning IDs is 1 and the same. Therefore, the priority determination unit 14 prioritizes the third, fifth, and eighth rows based on the number of similar ID counts. Here, among the similar IDs on the third, fifth, and eighth lines, the similar ID “001” on the fifth line has the largest count number of four on the first to eighth lines. Therefore, the priority determination unit 14 gives priority 3 to the fifth line.

そして、残りの3、8行目は、類似IDが追加されていないため、類似IDのカウント数が0で同一となる。そのため、優先度決定部14は、3、8行目について、警告IDのカウント数に基づいて優先度付けを行う。ここで、3、8行目の警告IDのうち、8行目の警告ID“ID505”が、1〜8行目におけるカウント数が4つで最も多い。したがって、優先度決定部14は、8行目に優先度4を付与する。そして、優先度決定部14は、残る3行目の警告情報に、優先度5を付与する。このようにして優先度が決定された連結警告情報を図7に示す。図7において、連結警告情報は、優先度の高い順に上から並べ替えられている。そして、優先度決定部14は、付与した優先度にしたがって、図7に示した順序で連結警告情報を出力してもよい。   And since the similar ID is not added to the remaining 3rd and 8th lines, the count number of the similar ID is 0 and becomes the same. Therefore, the priority determination unit 14 prioritizes the third and eighth lines based on the count number of warning IDs. Here, out of the warning IDs in the 3rd and 8th lines, the warning ID “ID505” in the 8th line has the largest count number of 4 in the 1st to 8th lines. Therefore, the priority determination unit 14 gives priority 4 to the eighth line. Then, the priority determination unit 14 gives priority 5 to the remaining third row of warning information. The connection warning information whose priority is determined in this way is shown in FIG. In FIG. 7, the connection warning information is rearranged from the top in descending order of priority. And the priority determination part 14 may output connection warning information in the order shown in FIG. 7 according to the provided priority.

以上で、静的解析装置1の具体的な動作の説明を終了する。   Above, description of the specific operation | movement of the static analyzer 1 is complete | finished.

次に、本発明の第1の実施の形態の効果について述べる。   Next, effects of the first exemplary embodiment of the present invention will be described.

本発明の第1の実施の形態としての静的解析装置は、ソースコードに対する静的解析の結果を精度よく優先度付けして提示することができる。   The static analysis apparatus according to the first embodiment of the present invention can present the results of static analysis for the source code with high priority.

その理由は、静的解析部が、ソースコードに対する静的解析を行った結果として警告位置情報および警告識別情報を含む警告情報を生成し、類似部分抽出部が、ソースコードにおいて互いに類似する類似部分を抽出し、各類似部分について類似識別情報および範囲情報を含む類似部分情報を生成し、情報連結部が、各警告情報に、その警告箇所の位置を含む類似部分の類似識別情報を追加し、優先度決定部が、警告識別情報および類似識別情報に基づく優先度決定基準を用いて、警告情報に優先度付けを行い、優先度にしたがって出力するからである。   The reason is that the static analysis unit generates warning information including warning position information and warning identification information as a result of performing static analysis on the source code, and the similar part extraction unit is similar to each other in the source code. And generating similar part information including similar identification information and range information for each similar part, and the information linking unit adds similar identification information of the similar part including the position of the warning part to each warning information, This is because the priority determination unit prioritizes warning information using a priority determination criterion based on the warning identification information and the similar identification information, and outputs the priority information according to the priority.

これにより、本実施の形態は、静的解析によって得られた各警告箇所を、他の警告箇所との関わりに応じた優先順序で、ユーザに提示することができる。例えば、ソースコードにおいて、誤った記述を含む部分が複数の箇所に複製されている場合を考える。この場合、複製先で変数名等の若干の記述変更があったとしても、本実施の形態は、それらの複数の誤った記述についての各警告情報に、同一の警告識別情報および同一の類似識別情報を付与することになる。したがって、本実施の形態は、そのような一群の警告箇所の優先度を高くして出力することになる。その結果、本実施の形態は、複製された誤った記述に対する一群の警告を、より優先して確認すべきものとして提示することができ、ソフトウェア開発者の修正作業における負荷を軽減することができる。このように、本実施の形態を用いることにより、ソフトウェア開発者は、他の警告箇所との関係性の強い警告を容易に絞り込んで修正することができ、非常に効率がよい。   Thereby, this Embodiment can show each warning location obtained by static analysis to a user in the priority order according to the relation with other warning locations. For example, let us consider a case where a part including an incorrect description is duplicated in a plurality of places in the source code. In this case, even if there is a slight description change such as a variable name at the copy destination, the present embodiment uses the same warning identification information and the same similarity identification for each warning information for the plurality of erroneous descriptions. Information will be given. Therefore, in the present embodiment, the priority of such a group of warning points is increased and output. As a result, according to the present embodiment, it is possible to present a group of warnings for a duplicated erroneous description as things that should be confirmed with higher priority, and to reduce the burden on correction work of the software developer. In this way, by using this embodiment, the software developer can easily narrow down and correct warnings that are strongly related to other warning points, and is very efficient.

しかも、本実施の形態は、ソースコードにおいて抽出した任意の範囲の類似部分に基づいて優先度付けを行うため、ソースコードにおいて類似部分として抽出するための単位を事前に設定しておく必要がない。したがって、本実施の形態は、ソフトウェア開発者の事前設定作業を必要とせずに、静的解析の結果を精度よく優先度付けして提示することができる。   In addition, according to the present embodiment, since prioritization is performed based on a similar part in an arbitrary range extracted in the source code, it is not necessary to set a unit for extracting as a similar part in the source code in advance. . Therefore, according to the present embodiment, the results of static analysis can be accurately prioritized and presented without requiring a software developer's pre-setting work.

(第2の実施の形態)
次に、本発明の第2の実施の形態について図面を参照して詳細に説明する。なお、本実施の形態の説明において参照する各図面において、本発明の第1の実施の形態と同一の構成および同様に動作するステップには同一の符号を付して本実施の形態における詳細な説明を省略する。
(Second Embodiment)
Next, a second embodiment of the present invention will be described in detail with reference to the drawings. Note that, in each drawing referred to in the description of the present embodiment, the same reference numerals are given to the same configuration and steps that operate in the same manner as in the first embodiment of the present invention, and the detailed description in the present embodiment. Description is omitted.

まず、本発明の第2の実施の形態としての静的解析装置2の機能ブロック構成を図8に示す。図8において、静的解析装置2は、本発明の第1の実施の形態としての静的解析装置1に対して、情報連結部13に替えて情報連結部23と、優先度決定部14に替えて優先度決定部24とを備え、さらに、差分抽出部25を備える点が異なる。   First, FIG. 8 shows a functional block configuration of a static analysis device 2 as a second embodiment of the present invention. In FIG. 8, the static analysis device 2 is different from the static analysis device 1 according to the first embodiment of the present invention in the information connection unit 23 and the priority determination unit 14 instead of the information connection unit 13. Instead, it includes a priority determination unit 24, and further includes a difference extraction unit 25.

ここで、静的解析装置2は、図2を参照して説明した本発明の第1の実施の形態としての静的解析装置1と同様のハードウェア要素を備えるコンピュータ装置によって構成可能である。この場合、差分抽出部25は、入力装置1005と、ROM1003および記憶装置1004に記憶されたコンピュータ・プログラムおよび各種データをRAM1002に読み込んで実行するCPU1001とによって構成される。なお、静的解析装置2およびその各機能ブロックのハードウェア構成は、上述の構成に限定されない。   Here, the static analysis device 2 can be configured by a computer device including hardware elements similar to those of the static analysis device 1 according to the first embodiment of the present invention described with reference to FIG. In this case, the difference extraction unit 25 includes an input device 1005 and a CPU 1001 that reads a computer program and various data stored in the ROM 1003 and the storage device 1004 into the RAM 1002 and executes them. Note that the hardware configuration of the static analysis device 2 and each functional block thereof is not limited to the above-described configuration.

差分抽出部25は、対象のソースコードについて、以前のソースコードに対する差分を抽出し、抽出した差分の範囲を表す差分情報を生成する。例えば、差分情報は、ソースコードの差分該当部分を含むファイル名、開始行番号、および、終了行番号からなる情報であってもよい。また、例えば、差分抽出部25は、記憶装置1004における以前のソースコードの格納場所を特定する情報を、入力装置1005を介して取得することにより、以前のソースコードを取得してもよい。   The difference extraction unit 25 extracts a difference from the previous source code with respect to the target source code, and generates difference information indicating a range of the extracted difference. For example, the difference information may be information including a file name including a difference corresponding portion of the source code, a start line number, and an end line number. Further, for example, the difference extraction unit 25 may acquire the previous source code by acquiring the information specifying the storage location of the previous source code in the storage device 1004 via the input device 1005.

情報連結部23は、静的解析部11によって生成された警告情報に、類似識別情報および後述する差分有無情報を追加した連結警告情報を生成する。まず、情報連結部23は、本発明の第1の実施の形態における情報連結部13と同様に、各警告情報に類似識別情報を追加する。加えて、情報連結部23は、静的解析部11によって生成された警告情報および差分抽出部25によって生成された差分情報を照合することにより、各警告情報に対して、該警告情報の示す警告箇所の位置を含む差分の範囲があるか否かを判断する。そして、情報連結部23は、警告箇所の位置を含む差分の範囲がある警告情報に対して、「差分有り」を表す差分有無情報を追加すればよい。また、情報連結部23は、警告箇所の位置を含む差分の範囲がない警告情報に対して、「差分無し」を表す差分有無情報を追加すればよい。   The information linking unit 23 generates linked warning information in which similar identification information and difference presence / absence information described later are added to the warning information generated by the static analysis unit 11. First, the information connection part 23 adds similar identification information to each warning information similarly to the information connection part 13 in the 1st Embodiment of this invention. In addition, the information linking unit 23 collates the warning information generated by the static analysis unit 11 and the difference information generated by the difference extraction unit 25, so that each warning information is indicated by a warning indicated by the warning information. It is determined whether or not there is a difference range including the position of the location. And the information connection part 23 should just add the difference presence information showing "with difference" with respect to warning information with the range of the difference including the position of a warning location. Moreover, the information connection part 23 should just add the difference presence / absence information showing "no difference" with respect to warning information without the range of the difference including the position of a warning location.

優先度決定部24は、本発明の第1の実施の形態における優先度決定部14に対して、警告識別情報および類似識別情報に加えて、さらに差分有無情報に基づく優先度決定基準を用いる点が異なる。例えば、優先度決定部24は、警告識別情報および類似識別情報の組み合わせが一致する連結警告情報のグループにおいて全てが差分有りの場合、それらの連結警告情報に対して、全てが差分有りではないグループより高い優先度を設定してもよい。これは、そのような一群の連結警告情報の全てが差分有りの場合、新規の警告であるみなすことができ、優先して確認したほうがよいためである。また、警告識別情報および類似識別情報の組み合わせが一致する連結警告情報のグループに、差分有りと差分無しとが混在する場合、そのような一群の連結警告情報は、過去に対応不要であることが確認された警告であるとみなすことができるからである。   The priority determination unit 24 uses a priority determination criterion based on difference presence / absence information, in addition to the warning identification information and the similar identification information, for the priority determination unit 14 according to the first embodiment of the present invention. Is different. For example, when there is a difference in the group of linked warning information in which the combination of the warning identification information and the similar identification information matches, the priority determination unit 24 is a group in which all of the linked warning information does not have a difference. A higher priority may be set. This is because when all of such a group of linked warning information has a difference, it can be regarded as a new warning, and it is better to check with priority. In addition, when there is a difference and no difference in a group of linked warning information in which a combination of warning identification information and similar identification information matches, such a group of linked warning information may not need to be handled in the past. This is because it can be regarded as a confirmed warning.

また、優先度決定部24は、優先度決定基準の設定変更を表す情報を取得すると、設定変更された優先度決定基準を用いて優先度を更新してもよい。例えば、優先度決定部24は、一旦決定した優先度を用いて連結警告情報を出力した後、入力装置1005を介して、優先度決定基準の設定変更を表す情報を取得してもよい。例えば、優先度決定基準の設定変更を表す情報とは、差分有無情報を考慮するか否かの設定を変更する内容であってもよい。また、例えば、優先度決定基準の設定変更を表す情報とは、警告識別情報および類似識別情報の組み合わせが一致するカウント数が同一の場合に、同一の類似識別情報のカウント数と、同一の警告識別情報のカウント数とのどちらを優先的に比較するかを変更する内容であってもよい。   Moreover, the priority determination part 24 may update a priority using the priority determination criteria by which the setting was changed, if the information showing the setting change of a priority determination criterion is acquired. For example, the priority determination unit 24 may acquire information indicating a change in setting of the priority determination criterion via the input device 1005 after outputting the connection warning information using the priority determined once. For example, the information indicating the setting change of the priority determination criterion may be content for changing the setting as to whether or not the difference presence / absence information is considered. Further, for example, the information indicating the setting change of the priority determination criteria is the same number of counts of the same similar identification information and the same warning when the combination of the warning identification information and the similar identification information matches. The content may be changed to preferentially compare with the count number of the identification information.

以上のように構成された静的解析装置2の動作について、図9を参照して説明する。   The operation of the static analysis apparatus 2 configured as described above will be described with reference to FIG.

まず、静的解析装置2は、ステップS1〜S2まで、本発明の第1の実施の形態としての静的解析装置1と同様に動作することにより、静的解析の結果である警告情報と、類似部分情報とを生成する。   First, the static analysis device 2 operates in the same manner as the static analysis device 1 as the first embodiment of the present invention up to steps S1 to S2, so that warning information that is a result of the static analysis, Similar part information is generated.

次に、差分抽出部25は、以前のソースコードがあるか否かを判断する(ステップS13)。   Next, the difference extraction unit 25 determines whether there is a previous source code (step S13).

ここで、以前のソースコードがなければ、静的解析装置2は、図3に示したステップS3〜S4を実行して処理を終了する。   If there is no previous source code, the static analysis device 2 executes steps S3 to S4 shown in FIG. 3 and ends the process.

一方、以前のソースコードがあれば、差分抽出部25は、対象のソースコードについて、以前のソースコードからの差分を抽出し、その範囲を表す差分情報を生成する(ステップS14)。   On the other hand, if there is a previous source code, the difference extraction unit 25 extracts a difference from the previous source code for the target source code, and generates difference information indicating the range (step S14).

次に、情報連結部23は、ステップS1で生成された各警告情報に対して、類似識別情報と差分有無情報とを追加した連結警告情報を生成する(ステップS15)。具体的には、前述のように、情報連結部23は、各警告情報に、その警告箇所の位置を含む類似部分の類似識別情報を追加するとともに、その警告箇所の位置を含む差分の範囲があるか否かを表す差分有無情報を追加すればよい。   Next, the information linking unit 23 generates linked warning information in which similar identification information and difference presence / absence information are added to each warning information generated in step S1 (step S15). Specifically, as described above, the information linking unit 23 adds similar identification information of a similar part including the position of the warning part to each warning information, and the range of the difference including the position of the warning part is What is necessary is just to add the difference existence information showing whether there exists.

次に、優先度決定部24は、ステップS15で生成された各連結警告情報に対して、警告識別情報、類似識別情報、および、差分有無情報に基づく優先度決定基準を用いて、優先度を決定する。そして、優先度決定部24は、決定した優先度にしたがって、連結警告情報を出力する(ステップS16)。   Next, the priority determination unit 24 sets a priority for each connection warning information generated in step S15 using a priority determination criterion based on warning identification information, similar identification information, and difference presence / absence information. decide. And the priority determination part 24 outputs connection warning information according to the determined priority (step S16).

次に、優先度決定部24は、優先度決定基準の設定変更を表す情報が入力されたか否かを判断する(ステップS17)。   Next, the priority determination unit 24 determines whether or not information indicating setting change of the priority determination criterion is input (step S17).

ここで、設定変更を表す情報が入力されなければ、静的解析装置2は動作を終了する。   Here, if the information indicating the setting change is not input, the static analysis device 2 ends the operation.

一方、設定変更を表す情報が入力された場合、優先度決定部24は、ステップS16からの動作を繰り返す。   On the other hand, when information indicating a setting change is input, the priority determination unit 24 repeats the operation from step S16.

以上で、静的解析装置2の動作の説明を終了する。   Above, description of operation | movement of the static analyzer 2 is complete | finished.

次に、静的解析装置2の動作を具体例で示す。   Next, the operation of the static analysis device 2 will be shown as a specific example.

ここでは、本発明の第1の実施の形態における具体例と同様に、ステップS1において、静的解析部11によって図4に示した警告テーブルが生成され、ステップS2において、類似部分抽出部12によって図5に示した類似テーブルが生成されたものとする。   Here, similarly to the specific example in the first embodiment of the present invention, the warning table shown in FIG. 4 is generated by the static analysis unit 11 in step S1, and the similar part extraction unit 12 in step S2. Assume that the similar table shown in FIG. 5 is generated.

次に、ステップS13において、差分抽出部25は、以前のソースコードがあると判断したものとする。   Next, in step S13, it is assumed that the difference extraction unit 25 determines that there is a previous source code.

そこで、ステップS14において、差分抽出部25は、対象のソースコードの以前のソースコードに対する差分情報を生成する。ここでは、図10に示す差分情報が生成されたとする。この具体例では、差分情報は、その差分の範囲を含むファイル名と、開始行番号と、終了行番号とからなるものとする。以降、これらの差分情報を、差分テーブルとも記載する。   Therefore, in step S14, the difference extraction unit 25 generates difference information for the source code before the target source code. Here, it is assumed that the difference information shown in FIG. 10 is generated. In this specific example, the difference information includes a file name including the difference range, a start line number, and an end line number. Hereinafter, the difference information is also referred to as a difference table.

次に、ステップS15において、情報連結部23は、図4の警告テーブルと、図5の類似テーブルと、図10の差分テーブルとを照合することにより、警告情報に類似IDおよび差分有無情報を追加した連結警告情報を生成する。   Next, in step S15, the information linking unit 23 adds the similarity ID and the difference presence / absence information to the warning information by collating the warning table in FIG. 4, the similar table in FIG. 5, and the difference table in FIG. Generated concatenation warning information.

例えば、情報連結部23は、図4に示した警告テーブルの1行目の警告情報は、警告箇所が「ファイル“A0001.c”の“111”行目」にあることを表している。また、この「ファイル“A0001.c”の“111”行目」は、図10に示した差分テーブルに示された差分情報に含まれていない。そこで、情報連結部23は、図4の警告テーブルの1行目には、差分無しを表す差分有無情報を追加する。また、図4に示した警告テーブルの4行目の警告情報は、警告箇所が「ファイル“A0001.c”の“311”行目」にあることを表している。また、この「ファイル“A0001.c”の“311”行目」は、図10に示した差分テーブルの1行目の差分情報に含まれている。そこで、情報連結部23は、警告テーブルの4行目に、差分有りを表す差分有無情報を追加する。   For example, the information linking unit 23 indicates that the warning information on the first line of the warning table shown in FIG. This indicates that it is in “111” line of c ”. In addition, this “file“ A0001. The “111” line of c ”is not included in the difference information shown in the difference table shown in FIG. Therefore, the information linking unit 23 adds difference presence / absence information indicating no difference to the first row of the warning table of FIG. The warning information on the fourth line of the warning table shown in FIG. This indicates that it is in “311” line of c ”. In addition, this “file“ A0001. “311” line of c ”is included in the difference information of the first line of the difference table shown in FIG. Therefore, the information linking unit 23 adds difference presence / absence information indicating that there is a difference to the fourth row of the warning table.

このようにして差分有無情報および類似IDが追加された連結警告情報の一例を図11に示す。以降、これらの連結警告情報を、連結警告テーブルとも記載する。   An example of the connection warning information to which the difference presence / absence information and the similar ID are added in this way is shown in FIG. Hereinafter, the connection warning information is also referred to as a connection warning table.

次に、ステップS16において、優先度決定部24は、図11に示した連結警告テーブルの各行に対して、警告ID、類似IDおよび差分有無情報に基づく優先度決定基準を用いて、優先度を付与する。   Next, in step S16, the priority determination unit 24 sets the priority for each row of the linked warning table shown in FIG. 11 using the priority determination criterion based on the warning ID, the similar ID, and the difference presence / absence information. Give.

ここでは、優先度決定部24は、まず、警告IDおよび類似IDの組み合わせが同一の連結警告情報のグループで、全てが差分有りとなっているものを最も優先度の高いものとして設定する。   Here, the priority determination unit 24 first sets a group of linked warning information having the same combination of warning ID and similar ID, all having a difference as the highest priority.

具体的には、図11の連結警告テーブルにおいて、警告IDおよび類似IDの組み合わせが同一の連結警告情報のグループとしては、1、4、7行目からなるグループ1と、2、6行目からなるグループ2と、3行目からなるグループ3と、5行目からなるグループ4と、8行目からなるグループ5とがある。このうち、全てが差分有りとなっているものは、5行目からなるグループ4である。そこで、優先度決定部24は、5行目に、優先度1を付与する。   Specifically, in the linked warning table of FIG. 11, groups of linked warning information having the same combination of warning ID and similar ID are group 1 consisting of the first, fourth and seventh lines, and the second and sixth lines. There are a group 2 consisting of the third row, a group 3 consisting of the third row, a group 4 consisting of the fifth row, and a group 5 consisting of the eighth row. Of these, the group 4 with the difference is the group 4 consisting of the fifth row. Therefore, the priority determination unit 24 assigns priority 1 to the fifth line.

また、残りのグループでは、全てが差分有りとなっているものはない。そこで、優先度決定部24は、残りの連結警告情報について、本発明の第1の実施の形態の具体例における優先度決定部14と同様の基準で優先度を付与する。このようにして優先度が決定された連結警告情報を図12に示す。図12において、連結警告情報は、優先度の高い順に上から並べ替えられている。そして、優先度決定部24は、付与した優先度にしたがって、図12に示した順序で連結警告情報を出力してもよい。   Also, none of the remaining groups has a difference. Therefore, the priority determination unit 24 assigns priorities to the remaining connection warning information according to the same criteria as the priority determination unit 14 in the specific example of the first embodiment of the present invention. The connection warning information whose priority is determined in this way is shown in FIG. In FIG. 12, the connection warning information is rearranged from the top in descending order of priority. And the priority determination part 24 may output connection warning information in the order shown in FIG. 12 according to the provided priority.

このように、優先度決定部24は、(a)警告IDおよび類似IDが同一のグループにおける差分有無情報の構成、(b)警告IDおよび類似IDが同一のカウント数、(c)類似IDが同一のカウント数、(d)警告IDが同一のカウント数の順に優先度決定基準として用いている。   Thus, the priority determination unit 24 (a) Configuration of difference presence / absence information in a group having the same warning ID and similar ID, (b) Count number having the same warning ID and similar ID, and (c) Similar ID. The same count number and (d) warning IDs are used as priority determination criteria in the order of the same count number.

さらに、ここで、ステップS17において、入力装置1005を介して、優先度決定基準を、差分有無情報を考慮せずに比較するよう設定変更する情報が入力されたとする。   Further, here, in step S17, it is assumed that information for changing the setting so as to compare the priority determination criteria without considering the difference presence / absence information is input via the input device 1005.

そこで、優先度決定部24は、上述の(b)、(c)、(d)の順に優先度決定基準として用いて、ステップS16を再度実行する。これにより、優先度決定部24は、本発明の第1の実施の形態の具体例で示した図7のような優先度を決定し、出力する。   Therefore, the priority determination unit 24 executes Step S16 again using the priority determination criteria in the order of (b), (c), and (d) described above. Thereby, the priority determination part 24 determines and outputs a priority like FIG. 7 shown in the specific example of the 1st Embodiment of this invention.

以上で、静的解析装置2の具体的な動作の説明を終了する。   Above, description of the specific operation | movement of the static analyzer 2 is complete | finished.

次に、本発明の第2の実施の形態の効果について述べる。   Next, the effect of the second exemplary embodiment of the present invention will be described.

本発明の第2の実施の形態としての静的解析装置は、ソースコードに対する静的解析の結果をさらに精度よく優先度付けして提示することができる。   The static analysis apparatus according to the second embodiment of the present invention can present the results of the static analysis for the source code with higher accuracy priorities.

その理由は、静的解析部が警告情報を生成し、類似部分抽出部が類似部分情報を生成することに加えて、差分抽出部が、対象のソースコードについて以前のソースコードからの差分の範囲を抽出して差分情報を生成し、情報連結部が、各警告情報に、類似識別情報を追加することに加えて、その警告位置情報を含む差分の範囲があるか否かを表す差分有無情報を追加し、優先度決定部が、警告識別情報、類似識別情報、および、差分有無情報に基づく優先度決定基準を用いて、警告情報に優先度付けを行い、優先度にしたがって出力するからである。   The reason is that the static analysis unit generates warning information, the similar part extraction unit generates similar part information, and the difference extraction unit determines the range of differences from the previous source code for the target source code. Difference information is generated by extracting information, and the information linking unit adds difference identification information to each warning information, and also indicates whether there is a difference range including the warning position information. The priority determination unit prioritizes warning information using priority determination criteria based on warning identification information, similar identification information, and difference presence / absence information, and outputs the priority according to the priority. is there.

これにより、本実施の形態は、静的解析によって得られた各警告箇所について、他の警告箇所との関わりに応じた優先度を付与する際に、差分有無情報を考慮する。例えば、警告識別情報および類似識別情報が一致する連結警告情報のグループが全て差分有りである場合、それらの警告は、新規の警告である可能性が高く、優先度が高いと考えられる。一方、そのようなグループにおいて差分有りと差分無しとが混在する場合、それらの警告は、以前に指摘され対応不要であることが確認された警告である可能性が高く、優先度が低いと考えられる。このように、本実施の形態は、差分有無情報を考慮することにより、他の警告箇所との関係性の強い警告を優先して提示しながらも、さらに、以前から指摘を受けている警告に関連する警告よりも、以前には指摘をされていない新規に発生した警告を優先してユーザに提示することができる。   Thereby, this Embodiment considers difference presence / absence information, when giving the priority according to relation with another warning location about each warning location obtained by the static analysis. For example, when all of the linked warning information groups having the same warning identification information and similar identification information have a difference, these warnings are likely to be new warnings and are considered to have high priority. On the other hand, if there is a difference and no difference in such a group, these warnings are likely to be warnings that have been pointed out previously and confirmed to be unnecessary, and are considered low priority. It is done. In this way, the present embodiment gives priority to warnings that are strongly related to other warning points by considering the difference presence / absence information. A newly generated warning that has not been pointed out before can be presented to the user in preference to the related warning.

なお、上述した本発明の各実施の形態において、静的解析装置の各機能ブロックが、記憶装置またはROMに記憶されたコンピュータ・プログラムを実行するCPUによって実現される例を中心に説明したが、各機能ブロックの一部、全部、または、それらの組み合わせが専用のハードウェアにより実現されていてもよい。   In each of the embodiments of the present invention described above, each functional block of the static analysis device has been described mainly with an example realized by a CPU that executes a computer program stored in a storage device or ROM. Part, all, or a combination of each functional block may be realized by dedicated hardware.

また、上述した本発明の各実施の形態において、静的解析装置の機能ブロックは、複数の装置に分散されて実現されてもよい。   In each embodiment of the present invention described above, the functional blocks of the static analysis device may be realized by being distributed to a plurality of devices.

また、上述した本発明の各実施の形態において、各フローチャートを参照して説明した静的解析装置の動作を、本発明のコンピュータ・プログラムとしてコンピュータ装置の記憶装置(記憶媒体)に格納しておき、係るコンピュータ・プログラムを当該CPUが読み出して実行するようにしてもよい。そして、このような場合において、本発明は、係るコンピュータ・プログラムのコードあるいは記憶媒体によって構成される。   In each embodiment of the present invention described above, the operation of the static analysis device described with reference to each flowchart is stored in a storage device (storage medium) of the computer device as a computer program of the present invention. The CPU may read and execute the computer program. In such a case, the present invention is constituted by the code of the computer program or a storage medium.

また、上述した各実施の形態は、適宜組み合わせて実施されることが可能である。   Moreover, each embodiment mentioned above can be implemented in combination as appropriate.

また、本発明は、上述した各実施の形態に限定されず、様々な態様で実施されることが可能である。   The present invention is not limited to the above-described embodiments, and can be implemented in various modes.

1、2 静的解析装置
11 静的解析部
12 類似部分抽出部
13、23 情報連結部
14、24 優先度決定部
25 差分抽出部
1001 CPU
1002 RAM
1003 ROM
1004 記憶装置
1005 入力装置
1006 出力装置
DESCRIPTION OF SYMBOLS 1, 2 Static analysis apparatus 11 Static analysis part 12 Similar part extraction part 13, 23 Information connection part 14, 24 Priority determination part 25 Difference extraction part 1001 CPU
1002 RAM
1003 ROM
1004 Storage device 1005 Input device 1006 Output device

Claims (9)

入力されたソースコードに対して静的解析を行うことにより、前記ソースコードにおける警告箇所の位置を表す警告位置情報と、警告の種別を識別する警告識別情報とを含む警告情報を生成する静的解析部と、
前記ソースコードにおいて互いに類似する部分(類似部分)を抽出することにより、各類似部分について、該互いに類似する類似部分を他の互いに類似する類似部分から識別する類似識別情報と、該類似部分の範囲を表す範囲情報とを含む類似部分情報を生成する類似部分抽出部と、
前記警告情報および前記類似部分情報を照合することにより、各警告情報に対して、該警告情報の示す警告箇所の位置を含む類似部分の類似識別情報を追加した連結警告情報を生成する情報連結部と、
前記連結警告情報に対して、前記警告識別情報および前記類似識別情報に基づく優先度決定基準を用いて優先度を決定し、決定した優先度にしたがって前記連結警告情報を出力する優先度決定部と、
を備えた静的解析装置。
Static information that generates warning information including warning position information indicating a position of a warning portion in the source code and warning identification information for identifying a warning type by performing static analysis on the input source code An analysis unit;
Similar identification information for identifying similar parts that are similar to each other from other similar parts by extracting similar parts (similar parts) in the source code and the range of the similar parts A similar part extraction unit that generates similar part information including range information representing
An information linking unit that generates linked warning information in which similar identification information of a similar part including a position of a warning part indicated by the warning information is added to each warning information by collating the warning information and the similar part information When,
A priority determination unit that determines priority for the connection warning information using a priority determination criterion based on the warning identification information and the similarity identification information, and outputs the connection warning information according to the determined priority; ,
Static analysis device with
前記ソースコードについて、以前のソースコードに対する差分を抽出し、抽出した差分の範囲を表す差分情報を生成する差分抽出部をさらに備え、
前記情報連結部は、前記警告情報および前記差分情報を照合することにより、各警告情報に対して、該警告情報の示す警告箇所の位置を含む差分の範囲があるか否かを表す差分有無情報を、前記類似識別情報に加えてさらに追加した前記連結警告情報を生成し、
前記優先度決定部は、前記警告識別情報および前記類似識別情報に加えて、前記差分有無情報に基づく前記優先度決定基準を用いて前記優先度を決定することを特徴とする請求項1に記載の静的解析装置。
The source code further includes a difference extraction unit that extracts a difference with respect to the previous source code and generates difference information indicating a range of the extracted difference,
The information linking unit collates the warning information and the difference information, thereby indicating whether or not there is a difference range including the position of the warning portion indicated by the warning information for each warning information. Is generated in addition to the similar identification information, and the connection warning information is generated,
The said priority determination part determines the said priority using the said priority determination criteria based on the said difference presence / absence information in addition to the said warning identification information and the said similar identification information. Static analysis device.
前記優先度決定部は、前記優先度決定基準の設定変更を表す情報を取得すると、設定変更した前記優先度決定基準を用いて前記優先度を更新することを特徴とする請求項1または請求項2に記載の静的解析装置。   The priority determination unit, when acquiring information indicating a setting change of the priority determination criterion, updates the priority using the priority determination criterion changed in setting. 2. The static analysis apparatus according to 2. 入力されたソースコードに対して静的解析を行うことにより、前記ソースコードにおける警告箇所の位置を表す警告位置情報と、警告の種別を識別する警告識別情報とを含む警告情報を生成し、
前記ソースコードにおいて互いに類似する部分(類似部分)を抽出することにより、各類似部分について、該互いに類似する類似部分を他の互いに類似する類似部分から識別する類似識別情報と、該類似部分の範囲を表す範囲情報とを含む類似部分情報を生成し、
前記警告情報および前記類似部分情報を照合することにより、各警告情報に対して、該警告情報の示す警告箇所の位置を含む類似部分の類似識別情報を追加した連結警告情報を生成し、
前記連結警告情報に対して、前記警告識別情報および前記類似識別情報に基づく優先度決定基準を用いて優先度を決定し、決定した優先度にしたがって前記連結警告情報を出力する、静的解析方法。
By performing static analysis on the input source code, warning information including warning position information indicating the position of the warning portion in the source code and warning identification information for identifying the type of warning is generated,
Similar identification information for identifying similar parts that are similar to each other from other similar parts by extracting similar parts (similar parts) in the source code and the range of the similar parts And similar partial information including range information representing
By collating the warning information and the similar part information, for each warning information, generate linked warning information in which similar identification information of a similar part including the position of the warning part indicated by the warning information is added,
A static analysis method for determining a priority for the connection warning information using a priority determination criterion based on the warning identification information and the similar identification information, and outputting the connection warning information according to the determined priority .
前記ソースコードについて、以前のソースコードに対する差分を抽出し、抽出した差分の範囲を表す差分情報を生成し、
前記警告情報および前記差分情報を照合することにより、各警告情報に対して、該警告情報の示す警告箇所の位置を含む差分の範囲があるか否かを表す差分有無情報を、前記類似識別情報に加えてさらに追加した前記連結警告情報を生成し、
前記警告識別情報および前記類似識別情報に加えて、前記差分有無情報に基づく前記優先度決定基準を用いて前記優先度を決定することを特徴とする請求項4に記載の静的解析方法。
For the source code, extract the difference with respect to the previous source code, generate difference information indicating the range of the extracted difference,
By comparing the warning information and the difference information, difference presence / absence information indicating whether or not there is a range of differences including the position of the warning portion indicated by the warning information for each warning information is obtained by using the similarity identification information. In addition to the above, the added link warning information is generated,
The static analysis method according to claim 4, wherein the priority is determined using the priority determination criterion based on the difference presence / absence information in addition to the warning identification information and the similarity identification information.
前記優先度決定基準の設定変更を表す情報を取得すると、設定変更した前記優先度決定基準を用いて前記優先度を更新することを特徴とする請求項4または請求項5に記載の静的解析方法。   The static analysis according to claim 4 or 5, wherein when the information indicating the setting change of the priority determination criterion is acquired, the priority is updated by using the priority determination criterion whose setting has been changed. Method. 入力されたソースコードに対して静的解析を行うことにより、前記ソースコードにおける警告箇所の位置を表す警告位置情報と、警告の種別を識別する警告識別情報とを含む警告情報を生成する静的解析ステップと、
前記ソースコードにおいて互いに類似する部分(類似部分)を抽出することにより、各類似部分について、該互いに類似する類似部分を他の互いに類似する類似部分から識別する類似識別情報と、該類似部分の範囲を表す範囲情報とを含む類似部分情報を生成する類似部分抽出ステップと、
前記警告情報および前記類似部分情報を照合することにより、各警告情報に対して、該警告情報の示す警告箇所の位置を含む類似部分の類似識別情報を追加した連結警告情報を生成する情報連結ステップと、
前記連結警告情報に対して、前記警告識別情報および前記類似識別情報に基づく優先度決定基準を用いて優先度を決定し、決定した優先度にしたがって前記連結警告情報を出力する優先度決定ステップと、
をコンピュータ装置に実行させるコンピュータ・プログラム。
Static information that generates warning information including warning position information indicating a position of a warning portion in the source code and warning identification information for identifying a warning type by performing static analysis on the input source code An analysis step;
Similar identification information for identifying similar parts that are similar to each other from other similar parts by extracting similar parts (similar parts) in the source code and the range of the similar parts A similar part extraction step for generating similar part information including range information representing
An information linking step for generating linked warning information in which similar identification information of a similar part including the position of the warning location indicated by the warning information is added to each warning information by collating the warning information and the similar part information When,
A priority determining step of determining a priority for the connection warning information using a priority determination criterion based on the warning identification information and the similar identification information, and outputting the connection warning information according to the determined priority; ,
Is a computer program that causes a computer device to execute.
前記ソースコードについて、以前のソースコードに対する差分を抽出し、抽出した差分の範囲を表す差分情報を生成する差分抽出ステップをさらに前記コンピュータ装置に実行させ、
前記情報連結ステップにおいて、前記警告情報および前記差分情報を照合することにより、各警告情報に対して、該警告情報の示す警告箇所の位置を含む差分の範囲があるか否かを表す差分有無情報を、前記類似識別情報に加えてさらに追加した前記連結警告情報を生成し、
前記優先度決定ステップにおいて、前記警告識別情報および前記類似識別情報に加えて、前記差分有無情報に基づく前記優先度決定基準を用いて前記優先度を決定することを特徴とする請求項7に記載のコンピュータ・プログラム。
For the source code, extract a difference with respect to the previous source code, and further cause the computer device to execute a difference extraction step for generating difference information indicating a range of the extracted difference,
In the information linking step, by comparing the warning information and the difference information, difference presence / absence information indicating whether or not there is a difference range including the position of the warning portion indicated by the warning information for each warning information Is generated in addition to the similar identification information, and the connection warning information is generated,
8. The priority determination step according to claim 7, wherein the priority is determined using the priority determination criterion based on the difference presence / absence information in addition to the warning identification information and the similarity identification information. Computer program.
前記優先度決定基準の設定変更を表す情報の取得に応じて、設定変更した前記優先度決定基準を用いて前記優先度決定ステップを前記コンピュータ装置に実行させることを特徴とする請求項7または請求項8に記載のコンピュータ・プログラム。   8. The computer apparatus according to claim 7, wherein the computer apparatus is configured to execute the priority determination step by using the priority determination criterion whose setting has been changed in response to acquisition of information indicating a setting change of the priority determination criterion. Item 9. The computer program according to Item 8.
JP2013155787A 2013-07-26 2013-07-26 Static analysis apparatus, static analysis method, and computer program Active JP6121828B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013155787A JP6121828B2 (en) 2013-07-26 2013-07-26 Static analysis apparatus, static analysis method, and computer program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013155787A JP6121828B2 (en) 2013-07-26 2013-07-26 Static analysis apparatus, static analysis method, and computer program

Publications (2)

Publication Number Publication Date
JP2015026276A JP2015026276A (en) 2015-02-05
JP6121828B2 true JP6121828B2 (en) 2017-04-26

Family

ID=52490871

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013155787A Active JP6121828B2 (en) 2013-07-26 2013-07-26 Static analysis apparatus, static analysis method, and computer program

Country Status (1)

Country Link
JP (1) JP6121828B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6665576B2 (en) * 2016-02-23 2020-03-13 日本電気株式会社 Support device, support method, and program
EP3285171B1 (en) * 2016-08-11 2021-11-24 Tata Consultancy Services Limited System and method for cause point analysis for effective handling of static analysis alarms
WO2020021588A1 (en) 2018-07-23 2020-01-30 三菱電機株式会社 Scoring device, scoring program and scoring method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5125938B2 (en) * 2008-09-24 2013-01-23 富士通株式会社 Bug detection support program, similar syntax identification information list output program, bug detection support device, and bug detection support method
JP5665128B2 (en) * 2011-05-30 2015-02-04 日本電気通信システム株式会社 Static analysis support device, static analysis support method, and program

Also Published As

Publication number Publication date
JP2015026276A (en) 2015-02-05

Similar Documents

Publication Publication Date Title
US10489591B2 (en) Detection system and method thereof
US11397667B2 (en) Software test case sequencing
JP2017041171A (en) Test scenario generation support device and test scenario generation support method
CN109325042B (en) Processing template acquisition method, form processing method, device, equipment and medium
CN112256635A (en) Method and device for identifying file type
JP6121828B2 (en) Static analysis apparatus, static analysis method, and computer program
US20180165174A1 (en) Message analysis apparatus, message analysis method, and storage medium
US20200042422A1 (en) Log analysis method, system, and storage medium
JP2018163574A (en) Log management apparatus and log management program
JP6722565B2 (en) Similar document extracting device, similar document extracting method, and similar document extracting program
JP2015170207A (en) configuration information management program, configuration information management method, and configuration information management device
US10346450B2 (en) Automatic datacenter state summarization
CN110244954B (en) Compiling method and equipment for application program
JP2022061689A (en) Validity confirmation method, validity confirmation system, and program
JP2017068293A (en) Test db data generation method and device
JP2013077124A (en) Software test case generation device
CN113778450A (en) Processing method, device and equipment for dependency conflict and storage medium
US8667008B2 (en) Search request control apparatus and search request control method
JP4886404B2 (en) Source code modification prioritization system and prioritization method
US10055341B2 (en) To-be-stubbed target determining apparatus, to-be-stubbed target determining method and non-transitory recording medium storing to-be-stubbed target determining program
CN108197498A (en) Obtain the method and device of data
JP6344185B2 (en) Evaluation result output program, evaluation result output method, and information processing apparatus
JP2018018197A (en) Source code evaluation program
JP2021039488A (en) Dictionary creation device and dictionary creation method
JP6665576B2 (en) Support device, support method, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20160616

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20170228

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20170330

R150 Certificate of patent or registration of utility model

Ref document number: 6121828

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350