WO2024101091A1 - ソフトウェア生成支援システム、ソフトウェア生成支援方法およびコンピュータプログラム - Google Patents

ソフトウェア生成支援システム、ソフトウェア生成支援方法およびコンピュータプログラム Download PDF

Info

Publication number
WO2024101091A1
WO2024101091A1 PCT/JP2023/037578 JP2023037578W WO2024101091A1 WO 2024101091 A1 WO2024101091 A1 WO 2024101091A1 JP 2023037578 W JP2023037578 W JP 2023037578W WO 2024101091 A1 WO2024101091 A1 WO 2024101091A1
Authority
WO
WIPO (PCT)
Prior art keywords
bug
source code
processed
test
pattern
Prior art date
Application number
PCT/JP2023/037578
Other languages
English (en)
French (fr)
Inventor
和矢 安田
ファン,フエン・ティタン
信治 伊藤
Original Assignee
株式会社日立製作所
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 株式会社日立製作所 filed Critical 株式会社日立製作所
Publication of WO2024101091A1 publication Critical patent/WO2024101091A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software

Definitions

  • the present invention relates to a software generation support system, a software generation support method, and a computer program.
  • Patent Document 1 a method for identifying the location of a fault in a software program is known.
  • Patent Document 1 multiple tests are executed on the test target code of a software program, passing and failing tests from the multiple test executions are identified, and an aggregate score for each statement is determined based on two or more of: (1) passing and failing tests, (2) semantic similarity between a statement token included in the statement and a report token included in an error report, and (3) the time elapsed since the statement was changed. Based on the aggregate scores of the multiple statements, a specific statement from the multiple statements is identified as the fault location in the test target code.
  • Patent Document 1 if a characteristic error report (error message) is not obtained, it is difficult to accurately determine the location of the bug, and there is room for improvement in reliability. Furthermore, if the location of the bug cannot be accurately determined, the source code containing the bug cannot be corrected, and the efficiency of software generation decreases.
  • the present invention has been made in consideration of the above problems, and aims to provide a software generation support system, a software generation support method, and a computer program that can support the efficient generation of software.
  • a software generation support system is a software generation support system that includes a processor and a memory and supports the generation of software, in which the processor executes a step of extracting a bug pattern indicating a pattern in which bugs occur from a source code change history including a bug correction history for the existing source code and a test execution path of a test executed for the existing source code, and a bug location determination step of calculating a suspicion value for each instruction of the source code to be processed based on the source code to be processed and test execution information including the test execution path of a test executed for the source code to be processed, and determining the bug location indicating the cause of the bug by correcting the calculated suspicion value based on the bug pattern corresponding to the source code to be processed.
  • the suspicion value calculated for each instruction in the source code being processed can be modified based on the bug pattern corresponding to the code being processed, and the location of the bug can be determined.
  • FIG. 1 is a diagram showing the overall configuration of a software generation support system.
  • FIG. 2 is a logical configuration diagram of the software generation support system.
  • FIG. 3 shows an example of source code change history information.
  • FIG. 4 shows an example of a bug pattern.
  • FIG. 5 shows an example of source code.
  • FIG. 6 shows an example of a test case.
  • FIG. 7 shows an example of test execution information.
  • FIG. 8 shows an example of bug location information.
  • FIG. 9 shows an example of the modified source code.
  • FIG. 10 is a flowchart of a process for extracting a bug pattern.
  • FIG. 11 is a flowchart showing the bug position determination process.
  • FIG. 12 shows an example of bug location information according to the second embodiment.
  • the software generation support system 1 of this embodiment detects bugs contained in the source code to be processed and provides information on the detected bugs to users such as software engineers, thereby supporting the generation of software.
  • spectrum-based fault localization SBFL
  • SBFL spectrum-based fault localization
  • a suspicion value indicating the possibility that a program line (program statement, instruction) is the cause of a bug is calculated based on the execution path when a test case is applied to the source code to be processed.
  • SBFL it is estimated that a program statement executed in a failed test case is likely to be the cause of a bug, and a program statement executed in a successful test case is unlikely to be the cause of a bug. Therefore, in SBFL, the number of executions in failed test cases and the number of executions in successful test cases are detected for each program statement (each instruction), and a suspicion value indicating the possibility that a certain program statement is the cause of a bug is calculated. However, it is difficult to accurately determine the cause of a bug using SBFL alone.
  • the software generation support system 1 of this embodiment therefore uses past software assets to determine under what circumstances (success or failure of a test when a test case is applied to an instruction) a bug occurred.
  • the past software assets are the source code change history 311 (see FIG. 2).
  • the source code change history (change history of existing source code) includes a bug correction history for the existing source code and an execution path of tests executed for the existing source code.
  • the software generation support system 1 extracts bug patterns 312 (see FIG. 2) from the source code change history 311 (S1), and modifies the suspicion value calculated for each instruction based on the results of matching the extracted bug patterns with the test execution information 315 of the existing source code (see FIG. 2, S2) (S3).
  • the software generation support system 1 provides the user with the bug pattern used to determine the cause of the bug (S3), and can also suggest to the user corrected source code that has eliminated the bug in the source code being processed (S4).
  • a software generation support system 1 that supports the generation of software, comprising a processor 2 and a memory 3, wherein the processor executes a step 32 (S1) of extracting a bug pattern 312 indicating a pattern in which a bug occurs from a source code change history 311 including a bug correction history for an existing source code and a test execution path of a test executed for the existing source code, and a bug location determination step (34, S3) of calculating (341) a suspicion value for each instruction of the source code to be processed based on a source code to be processed 313 and test execution information 315 including a test execution path of a test executed for the source code to be processed 313, and correcting (342) the calculated suspicion value based on the bug pattern 312 corresponding to the source code to be processed to determine a bug location indicating the cause of the bug.
  • the bug location determination step (34, S3) executes a suspicion value calculation step (341, S31) of calculating the suspicion value for each instruction of the source code to be processed based on the source code to be processed 313 and the test execution information 315, and a suspicion value correction step (342, S32, S33) of correcting the calculated suspicion value based on the result of matching the source code included in the bug pattern with the source code to be processed and the result of matching the test execution information with the bug pattern.
  • the bug pattern 312 includes abstracted source code 3121 that is an abstraction of the existing source code, and a test execution path pattern 3122 that is a pattern of an execution path of a test executed for the existing source code, and the suspicion value calculation step (341, S31) calculates the suspicion value for each instruction of the source code 313 based on a comparison result between the test execution path 3113 for the source code to be processed and the test execution path pattern.
  • test execution path pattern 3122 includes the presence or absence of execution of each instruction of the abstracted source code in failed and successful tests.
  • the bug pattern 312 includes a bug position 3123 indicating a position where a bug is predicted to occur, and the suspicious value correction step (342, S32, S33) corrects the suspicious value 3163 corresponding to the bug position based on the result of comparing the source code and the test execution information with the bug pattern.
  • Figure 1 is an overall configuration diagram of a software generation support system 1.
  • an example is given of software being created in JAVA (registered trademark) language, but any type of programming language can be used.
  • the software generation support system 1 supports the automatic or semi-automatic generation of software.
  • the software generation support system 1 can be installed on a computer that includes, for example, a processor 2, a storage device 3 as a "memory,” a user interface (UI in the figure) device 4, a communication device 5, etc.
  • the communication device 5 of the software generation support system 1 is communicatively connected to at least one computer terminal 6 via the communication network CN.
  • a user such as a system engineer can use the software generation support service provided by the software generation support system 1 via the computer terminal 6 to find out the cause of a bug in the source code being created (the source code to be processed) and fix the bug.
  • the software generation support system 1 may be communicatively connected to a storage system 7, which is an example of an external device.
  • a user may store source code being created in the storage system 7.
  • the information storage unit 31 of the software generation support system 1 may also store the actual file in the storage system 2, which is an external device.
  • Other information processing devices such as a file server, may be used instead of the storage system 7.
  • the software generation support system 1 can be connected to a storage medium MM.
  • the storage medium MM is configured, for example, as a memory device, a hard disk device, an optical disk device, a magneto-optical disk device, a magnetic tape device, etc., and non-temporarily stores computer programs and data.
  • the storage medium MM can transfer computer programs and data to the storage device 3 of the software generation support system 1 for storage therein. Computer programs and data can also be transferred from the storage device 3 to the storage medium MM for storage therein.
  • the other computer By storing a computer program that realizes the functions of the software generation support system 1 in the storage medium MM, connecting the storage medium MM to another computer, and installing the computer program stored in the storage medium MM on the other computer, the other computer can be made to function as the software generation support system 1.
  • the communication network CN may be a public communication network such as the Internet, or a private communication network.
  • the communication network CN may be either a wireless communication network or a wired communication network, or may be a combination of a wireless communication network and a wired communication network.
  • the storage device 3 of the software generation support system 1 is a device that includes a main storage device and an auxiliary storage device.
  • the storage device 3 stores computer programs and data for implementing, for example, an information storage unit 31, a bug pattern extraction unit 32, a test execution unit 33, a bug location determination unit 34, and a source code correction unit 35.
  • the software generation support system 1 can execute a step (S1) of extracting bug patterns 312 from source code change history 311, which is an existing software asset, a test execution step (S2) of conducting a test using test cases 314 on source code 313 to be processed, and a bug location determination step (S3) of determining the location of the cause of the bug based on test execution information 315 of the source code to be processed and bug patterns 312. Furthermore, the software generation support system 1 can also execute a source code correction step (S4) of correcting the source code to be processed. Details of each step will be described later.
  • the functions of the software generation support system 1 are realized by the processor 2 executing a computer program stored in the storage device 3.
  • the processor 2 is not limited to a CPU (Central Processing Unit), but may also include a GPU (Graphics Processing Unit) or an ASIC (Application Specific Integrated Circuit), etc.
  • the information storage unit 31 stores information about the developed software assets.
  • the software assets include a change history 311 for existing source code. Details of the source code change history 311 will be described later in FIG. 3.
  • the bug pattern extraction unit 32 extracts bug patterns 312 that indicate the tendency of program statements in which bugs are likely to occur from the information stored in the source code change history 311. Details of the bug patterns 312 will be described later with reference to FIG. 4.
  • the test execution unit 33 has the function of applying multiple test cases to the source code to be processed and executing them.
  • the results of the test execution are output as test execution information 315 and stored in the information storage unit 31. Details of the test execution information 315 will be described later with reference to FIG. 7.
  • the bug location determination unit 34 determines the location of the cause of the bug in the source code 313 being processed, and outputs bug location information 316, which is the determination result.
  • the bug location information 316 is provided to the user and used to correct the source code.
  • the bug location determination unit 34 includes a suspicion value calculation unit 341 that calculates a suspicion value for each program statement (each instruction), and a suspicion value correction unit 342 that corrects the calculated suspicion value.
  • the processing content of the bug location determination unit 34 and the bug location information 316 will be described in further detail below.
  • the source code correction unit 35 has a function of correcting bugs in the source code to be processed using patch proposals that are generated automatically, semi-automatically, or manually. Information on the source code in which bugs have been corrected by the source code correction unit 35 is automatically added to the source code change history 311 as a new software asset.
  • the software generation support system 1 does not need to include all of the functions 31 to 35 described above.
  • the software generation support system 1 may include a bug pattern extraction unit 32.
  • the software generation support system 1 may include a bug pattern extraction unit 32 and a test execution unit 33.
  • the software generation support system 1 may include a bug pattern extraction unit 32, a test execution unit 33, and a bug location determination unit 34.
  • the software generation support system 1 may include a bug pattern extraction unit 32, a test execution unit 33, a bug location determination unit 34, and a source code correction unit 35.
  • the software generation support system 1 can also be realized by linking multiple computers.
  • the software generation support system 1 can be configured by connecting a computer that realizes the information storage unit 31, a computer that realizes the bug pattern extraction unit 32, a computer that realizes the test execution unit 33, a computer that realizes the bug location determination unit 34, and a computer that realizes the source code correction unit 35 so that they can communicate with each other.
  • the user interface device 4 is a device used by a system administrator who manages the software generation support system 1, or a user who uses the software generation support service provided by the software generation support system 1.
  • the user interface device 4 includes an information input device that inputs information to the software generation support system 1, and an information output device that provides information from the software generation support system 1 to the administrator or user (neither shown).
  • the information input device is, for example, a keyboard, a pointing device, a touch panel, or a voice instruction device.
  • the information output device is, for example, a monitor display, a printer, or a voice synthesis device.
  • AR Augmented Reality
  • VR Virtual Reality
  • FIG. 2 is a logical configuration diagram of the software generation support system.
  • information 311 to 317 stored in information storage unit 31 is shown.
  • functional units 32 to 35 that process information are shown.
  • the bug pattern extraction unit 32 acquires information (change history) about source code that was created and modified in the past from the source code change history 311, and generates a bug pattern 312 based on the acquired information.
  • the generated bug pattern 312 is stored in the information storage unit 31.
  • the source code change history 311 includes change history for multiple source codes.
  • the bug pattern 312 also includes multiple bug patterns, and can also be called a bug pattern group 312.
  • the test execution unit 33 obtains the source code 313 to be processed and the test cases 314 from the information storage unit 31.
  • the test execution unit 33 applies the test cases 314 to the source code 313 to be processed, executes the source code 312, and stores the execution result, that is, the test execution information 315, in the information storage unit 31.
  • the bug location determination unit 34 obtains the bug pattern 312 and test execution information 315 from the information storage unit 31, and determines the location of the cause of the bug using the suspicion calculation unit 341 and the suspicion value correction unit 342. The determination result is stored in the information storage unit 31 as bug location information 316.
  • the source code correction unit 35 obtains bug location information 316 and source code to be processed 313 from the information storage unit 31, removes bugs from the source code to be processed to generate corrected source code 317, and stores this in the information storage unit 31.
  • the corrected source code 317 and its change history become part of the source code change history 311.
  • FIG. 3 is an example of a source code change history 311.
  • the source code change history 311 has multiple histories 3110(1), 3110(2), etc.
  • Each history 3110 includes, for example, source code before modification 3111, source code after modification 3112, test execution path 3113, and test results 3114.
  • the test execution path 3113 is information indicating which program statements were executed for each test case.
  • the black circles in the figure represent the program statements that were executed.
  • FIG. 4 shows an example of a bug pattern 312.
  • the bug pattern 312 includes, for example, abstracted (generalized) source code 3121, a test execution path pattern 3122, a bug location 3123, a bug pattern ID 3123, and a weight 3124.
  • the abstracted source code 3121 is an abstraction of variables and the like of existing source code. This makes it possible to classify similar program statements.
  • the test execution path pattern 3122 is a grouping (aggregation) of the results of the test execution path 3113 of the existing source code that was the source of the bug pattern 312 into success tests and failure tests.
  • the test execution path pattern 3122 aggregates each test case to show the tendency of the execution path, such as whether the program statement is more often executed as a success test or a failure test, or whether it is more often executed as both a success test and a failure test.
  • a black circle is set in the "failure test" of test execution path pattern 3122.
  • a black circle is set in the "success test” of test execution path pattern 3122.
  • a black circle is set in both the "failure test” and the "success test” of test execution path pattern 3122.
  • Whether a test is executed more frequently as a failing test or a passing test may be decided by a simple majority vote, or it may be decided based on whether the number of times the test is executed is equal to or exceeds a predetermined threshold. For example, program statements that are executed in 60% or more of the failing tests in the source code change history 311 that is the source of the bug pattern 312 are classified as "failing tests" in the test execution path pattern 3122, and a black circle is set. 60% is an example, and a number greater than 60% or less than 60% may be used.
  • the bug location 3123 indicates that, according to the source code change history 311 that is the basis of the bug pattern 312, this is a program statement that is likely to be the cause of the bug.
  • the bug pattern ID 3123 is information for identifying the bug pattern 312 generated from the source code change history 311.
  • the weight 3124 is a weight value set for the bug pattern 312. The weight value may be determined based on the number of source code change histories 311 that are the source of the bug pattern 312. For example, if a bug pattern 312 is generated from three change histories 311, the weight value can be set to "3" or a value that can be calculated from "3". This is because the more source code change histories 311 a bug pattern 312 is created from, the more reliable it is considered to be when used to determine bugs.
  • Figure 5 shows an example of source code 313.
  • Figure 6 shows an example of test case 314.
  • FIG. 7 shows an example of test execution information 315.
  • Test execution information 315 includes, for example, program statements 3151 of the source code to be processed, a test execution path 3152, and test results 3153.
  • program statements 3151 of the source code to be processed includes, for example, program statements 3151 of the source code to be processed, a test execution path 3152, and test results 3153.
  • test execution path 3152 includes test results 3153.
  • test results 3153 includes, for example, program statements 3151 of the source code to be processed, a test execution path 3152, and test results 3153.
  • Figure 8 is an example of bug location information 316.
  • Bug location information 316 includes, for example, program statement 3161 of source code to be processed, test execution path pattern 3162, suspicion value 3163, and rank 3164.
  • Suspicion value 3163 is calculated by suspicion value calculation unit 341 of bug location determination unit 34.
  • suspicion value calculation unit 341 calculates the possibility that the statement is the cause of a bug based on the number of times it has been executed in a successful test, the number of times it has been executed in a failed test, and the like.
  • Rank 3164 indicates the order of likelihood that the statement is the cause of a bug.
  • Rank 3164 is determined in descending order of suspicion value 3163.
  • Figure 9 shows an example of modified source code.
  • FIG. 10 is a flowchart of the process (S1) of extracting bug patterns.
  • the bug pattern extraction unit 32 clusters pairs of pre-modification source code 3111 and post-modification source code 3112 contained in the source code change history 311, and determines "abstracted source code 3121", bug location 3123, and weight 3124 for each cluster (S11).
  • the bug pattern extraction unit 32 calculates the test execution path pattern 3122 by grouping the test execution paths 3113 into failing tests and passing tests for each cluster generated in step S11 (S12).
  • the bug pattern extraction unit 32 outputs the bug pattern 312 including the abstracted source code 3121 and the test execution path pattern 3122, and stores it in the information storage unit 31 (S13).
  • FIG. 11 is a flowchart showing the bug location determination process (S3).
  • the suspicion value calculation unit 341 of the bug location determination unit 34 refers to the test execution information 315, and calculates the suspicion value for each program statement (each instruction) based on the test execution path 3152 and the test result 3153 (S31).
  • the suspicious value correction unit 342 of the bug location determination unit 34 calculates test execution path patterns by grouping the test execution paths 3152 of the test execution information 315 into failed tests and successful tests (S32).
  • the suspicious value correction unit 342 detects a matching bug pattern from among the bug patterns 312 based on the contents of the source code (program statements) and the test execution path pattern, and corrects the suspicious value 3163 based on the detected bug pattern (S33). In other words, a bug pattern is detected in which the abstracted source code corresponds to the tested source code and the test execution path pattern also matches.
  • the suspicion value correction unit 342 determines the ranking 3164 in descending order of the corrected suspicion value, and outputs it as bug location information 316 (S34).
  • the software generation support system 1 of this embodiment can support the efficient generation of software.
  • the software generation support system 1 of this embodiment utilizes past software assets to extract tendencies in source code that are prone to bugs as bug patterns 312, and corrects the suspicion value based on the bug patterns 312 that correspond to the test execution information 315 of the source code 313 to be processed. Therefore, the software generation support system 1 of this embodiment can obtain more accurate suspicion values, and can identify the cause of the bug with greater precision and in a shorter time than when the software generation support system 1 of this embodiment is not used.
  • FIG. 12 shows an example of bug location information 316A related to this embodiment.
  • the bug location information 316A further includes a "matching bug pattern ID" 3165.
  • the matching bug pattern ID 3165 is identification information 3123 that identifies the bug pattern 312 that matches (corresponds to) the test execution information 315 of the source code to be processed.
  • the identification information of the matching bug pattern 312 is set to the program statement that is most likely to be the cause of the bug. This allows the user to confirm which bug pattern 312 was used to detect the cause of the bug.
  • the bug pattern ID 3165 only to the program statement with the highest rank 3164, the user can efficiently visually identify and correct the source code even when there are multiple cause points for the bug. It is also possible to display the IDs of the matching bug patterns not only to the program statement with the highest rank, but also to the program statement that is second or third most likely to be the cause of the bug.
  • the present invention is not limited to the above-described embodiment.
  • a person skilled in the art can make various additions and modifications within the scope of the present invention.
  • the above-described embodiment is not limited to the configuration example shown in the attached drawings.
  • the configuration and processing method of the embodiment can be modified as appropriate within the scope of achieving the object of the present invention.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Stored Programmes (AREA)

Abstract

ソフトウェアの効率的な生成を支援すること。ソフトウェアの生成を支援するシステム1は、既存ソースコードについてのバグの修正履歴と既存ソースコードについて実行されたテストのテスト実行経路とを含むソースコード変更履歴から、バグの発生するパターンを示すバグパターンを抽出するステップS1と、処理対象ソースコードと処理対象ソースコードについて実行されたテストのテスト実行経路を含むテスト実行情報とに基づいて、処理対象ソースコードの命令ごとに疑惑値を計算し、計算された疑惑値を処理対象ソースコードに対応するバグパターンに基づいて修正することによりバグの原因箇所を示すバグ位置を判定するバグ位置判定ステップS3を実行する。

Description

ソフトウェア生成支援システム、ソフトウェア生成支援方法およびコンピュータプログラム
 本発明は、ソフトウェア生成支援システム、ソフトウェア生成支援方法およびコンピュータプログラムに関する。
 特許文献1に記載のように、ソフトウェアプログラム内のフォールト位置を特定する方法は知られている。
 特許文献1では、ソフトウェアプログラムのテスト対象コードに対して複数のテストを実行し、複数のテスト実行のうちの合格テスト及び失敗テストを特定し、各ステートメントの集約スコアを、(1)合格テスト及び失敗テスト、(2)ステートメントに含まれるステートメントトークンとエラーレポートに含まれるレポートトークンとの間の意味類似度、(3)ステートメントが変更を受けたときから経過した時間、のうちの2つ以上に基づいて決定し、複数のステートメントの集約スコアに基づいて、複数のステートメントのうちの特定のステートメントを、テスト対象コード内のフォールト位置として特定する。
特開特開2019-021303号公報
 特許文献1では、特徴的なエラーレポート(エラーメッセージ)が得られない場合、バグの位置を正確に判定するのが難しく、信頼性改善の余地がある。そしてバグの位置を正確に判定できなければ、バグを有するソースコードを修正することができず、ソフトウェアの生成効率が低下する。
 本発明は、上記課題に鑑みてなされたもので、ソフトウェアの効率的な生成を支援することができるようにしたソフトウェア生成支援システム、ソフトウェア生成支援方法およびコンピュータプログラムを提供することを目的とする。
 上記課題を解決するために、本発明の一つの観点にしたがうソフトウェア生成支援システムは、プロセッサとメモリを備え、ソフトウェアの生成を支援するソフトウェア生成支援システムであって、プロセッサは、既存ソースコードについてのバグの修正履歴と既存ソースコードについて実行されたテストのテスト実行経路とを含むソースコード変更履歴から、バグの発生するパターンを示すバグパターンを抽出するステップと、処理対象ソースコードと処理対象ソースコードについて実行されたテストのテスト実行経路を含むテスト実行情報とに基づいて、処理対象ソースコードの命令ごとに疑惑値を計算し、計算された疑惑値を処理対象ソースコードに対応するバグパターンに基づいて修正することによりバグの原因箇所を示すバグ位置を判定するバグ位置判定ステップを実行する。
 本発明によれば、処理対象ソースコードの命令毎に計算された疑惑値を、処理対象コードに対応するバグパターンに基づいて修正し、バグ位置を判定することができる。
図1は、ソフトウェア生成支援システムの全体構成図である。 図2は、ソフトウェア生成支援システムの論理構成図である。 図3は、ソースコード変更履歴情報の例である。 図4は、バグパターンの例を示す。 図5は、ソースコードの例を示す。 図6は、テストケースの例を示す。 図7は、テスト実行情報の例を示す。 図8は、バグ位置情報の例である。 図9は、修正されたソースコードの例を示す。 図10は、バグパターンを抽出する処理のフローチャートである。 図11は、バグ位置判定処理を示すフローチャートである。 図12は、第2実施例に係り、バグ位置情報の例を示す。
 以下、図面に基づいて、本発明の実施の形態を説明する。本実施形態のソフトウェア生成支援システム1は、処理対象ソースコードに含まれるバグを検出して、検出されたバグの情報をソフトウェアエンジニアなどのユーザへ提供することにより、ソフトウェアの生成を支援する。本実施例のソフトウェア生成支援システム1では、例えばSpectrum-based fault localization (SBFL)を改善し、バグの検出精度を向上させる。SBFLでは、処理対象ソースコードへテストケースを適用した際の実行経路に基づいて、プログラムの行(プログラム文、命令)がバグの原因箇所である可能性を示す疑惑値を計算する。SBFLでは、失敗したテストケースで実行された、プログラム文はバグの原因箇所である可能性が高く、成功したテストケースで実行されたプログラム文はバグの原因箇所である可能性が低いと推定する。そこで、SBFLでは、プログラム文ごと(命令ごと)に、失敗したテストケースでの実行回数と、成功したテストケースでの実行回数を検出し、或るプログラム文がバグの原因箇所である可能性を示す疑惑値を計算する。しかし、SBFLだけではバグの原因箇所を精度良く判定するのは難しい。
 そこで、本実施形態のソフトウェア生成支援システム1では、過去のソフトウェア資産を活用し、どんな状況(命令にテストケースを適用したときのテストの成否)でバグが発生したか判定する。過去のソフトウェア資産は、ソースコードの変更履歴311(図2参照)である。ソースコードの変更履歴(既存ソースコードの変更履歴)は、既存ソースコードについてのバグの修正履歴と、既存ソースコードについて実行されたテストの実行経路を含む。ソフトウェア生成支援システム1は、ソースコード変更履歴311からバグパターン312(図2参照)を抽出し(S1)、抽出されたバグパターンと既存ソースコードのテスト実行情報315(図2参照、S2)との照合結果に基づいて、命令毎に計算された疑惑値を修正する(S3)。
 さらに、ソフトウェア生成支援システム1は、バグの原因箇所を判定するのに使用されたバグパターンをユーザへ提供するとともに(S3)、処理対象ソースコードのバグを解消した修正済みソースコードをユーザへ提案することもできる(S4)。
 本実施形態では、以下の構成を有するシステム、方法またはコンピュータプログラムが開示される。
 (構成1)プロセッサ2とメモリ3を備え、ソフトウェアの生成を支援するソフトウェア生成支援システム1であって、前記プロセッサは、既存ソースコードについてのバグの修正履歴と前記既存ソースコードについて実行されたテストのテスト実行経路とを含むソースコード変更履歴311から、バグの発生するパターンを示すバグパターン312を抽出するステップ32(S1)と、処理対象ソースコード313と前記処理対象ソースコード313について実行されたテストのテスト実行経路を含むテスト実行情報315とに基づいて、前記処理対象ソースコードの命令ごとに疑惑値を計算し(341)、前記計算された疑惑値を前記処理対象ソースコードに対応する前記バグパターン312に基づいて修正(342)することによりバグの原因箇所を示すバグ位置を判定するバグ位置判定ステップ(34,S3)を実行する。
 (構成2)前記バグ位置判定ステップ(34,S3)は、前記処理対象ソースコード313と前記テスト実行情報315とに基づいて、前記処理対象ソースコードの命令ごとに前記疑惑値を計算する疑惑値計算ステップ(341,S31)と、前記バグパターンに含まれるソースコードと前記処理対象ソースコードとの照合結果、および前記テスト実行情報と前記バグパターンとの照合結果とに基づいて、前記計算された疑惑値を修正する疑惑値修正ステップ(342,S32,S33)を実行する構成1に記載のソフトウェア生成支援システム。
 (構成3)前記バグパターン312は、前記既存ソースコードを抽象化した抽象化ソースコード3121と、前記既存ソースコードについて実行されたテストの実行経路をパターン化したテスト実行経路パターン3122とを含んでおり、前記疑惑値計算ステップ(341,S31)は、前記処理対象ソースコードについての前記テスト実行経路3113と前記テスト実行経路パターンとの比較結果に基づいて、前記ソースコード313の命令ごとに前記疑惑値を計算する構成2に記載のソフトウェア生成支援システム。
 (構成4)前記テスト実行経路パターン3122は、失敗したテストと成功したテストとにおける、前記抽象化ソースコードの命令ごとの実行の有無を含む構成3に記載のソフトウェア生成支援システム。
 (構成5)前記バグパターン312は、バグが発生したと予測される位置を示すバグ位置3123を含んでおり、前記疑惑値修正ステップ(342,S32,S33)は、前記バグ位置に対応する疑惑値3163を、前記ソースコードおよび前記テスト実行情報と前記バグパターンとの照合結果に基づいて修正する構成3に記載のソフトウェア生成支援システム。
 (構成6)前記疑惑値修正ステップ(342,S32,S33)は、前記バグパターン312に設定された重み3124に基づいて、前記疑惑値3163を修正する構成5に記載のソフトウェア生成支援システム。
 (構成7)前記バグパターンの重み3124は、前記バグパターンの生成に関する既存ソースコードの数に応じて設定される構成6に記載のソフトウェア生成支援システム。
 (構成8)前記バグパターン312は、複数の前記既存ソースコードについてのバグの修正履歴と前記複数の既存ソースコードについて実行されたテストのテスト実行経路とを含むソースコード変更履歴311から生成される構成1に記載のソフトウェア生成支援システム。
 (構成9)前記バグ位置判定ステップ(34,S3)は、前記処理対象ソースコード313に対応するバグパターン312を特定するバグパターン特定情報3123を、前記バグ位置に対応付けて出力する構成1に記載のソフトウェア生成支援システム。
 (構成10)
 前記処理対象ソースコード313を、前記バグ位置判定ステップ(34,S3)により判定された前記バグ位置に基づいて修正するソースコード修正ステップ(35,S4)をさらに備える構成1に記載のソフトウェア生成支援システム。
 図1~図11を用いて、第1実施例を説明する。図1は、ソフトウェア生成支援システム1の全体構成図である。本実施例では、JAVA(登録商標)言語でソフトウェアを作成する場合を例に挙げるが、プログラム言語の種類は問わない。
 ソフトウェア生成支援システム1は、ソフトウェアの自動生成または半自動生成を支援する。ソフトウェア生成支援システム1は、例えば、プロセッサ2、「メモリ」としての記憶装置3、ユーザインターフェース(図中、UI)装置4、通信装置5などを備えるコンピュータ上に設けることができる。
 ソフトウェア生成支援システム1の通信装置5は、通信ネットワークCNを介して、少なくとも一つのコンピュータ端末6と通信可能に接続される。システムエンジニアなどのユーザは、コンピュータ端末6を介して、ソフトウェア生成支援システム1の提供するソフトウェア生成支援サービスを利用し、作成中のソースコード(処理対象ソースコード)のバグの原因箇所を知り、そのバグを修正することができる。
 ソフトウェア生成支援システム1は、外部装置の一例としてのストレージシステム7に通信可能に接続されてもよい。ユーザは、作成中のソースコードをストレージシステム7に記憶させることもできる。ソフトウェア生成支援システム1の有する情報記憶部31は、ファイルの実体を外部装置であるストレージシステム2に格納することもできる。ストレージシステム7に代えてファイルサーバなどの他の情報処理装置を用いてもよい。
 ソフトウェア生成支援システム1は、記憶媒体MMと接続可能である。記憶媒体MMは、例えば、メモリ装置、ハードディスク装置、光ディスク装置、光磁気ディスク装置、磁気テープ装置などのように構成され、コンピュータプログラムおよびデータを非一時的に記憶する。記憶媒体MMは、ソフトウェア生成支援システム1の記憶装置3へコンピュータプログラムおよびデータを転送して記憶させることができる。記憶装置3から記憶媒体MMにコンピュータプログラムおよびデータを転送して記憶させることもできる。ソフトウェア生成支援システム1の機能を実現するコンピュータプログラムを記憶媒体MMに格納し、記憶媒体MMを他のコンピュータに接続し、記憶媒体MMに格納されたコンピュータプログラムを他のコンピュータにインストールすることにより、他のコンピュータをソフトウェア生成支援システム1として機能させることができる。
 通信ネットワークCNは、インターネットのような公衆通信網でもよいし、専用通信網でもよい。通信ネットワークCNは、無線通信網、有線通信網のいずれでもよいし、無線通信網と有線通信網とが混在してもよい。
 ソフトウェア生成支援システム1の機能構成を説明する。ソフトウェア生成支援システム1の記憶装置3は、主記憶装置および補助記憶装置を含む装置である。記憶装置3には、例えば、情報記憶部31、バグパターン抽出部32、テスト実行部33、バグ位置判定部34、ソースコード修正部35を実現するためのコンピュータプログラムおよびデータが記憶されている。
 ソフトウェア生成支援システム1は、既存ソフトウェア資産であるソースコード変更履歴311からバグパターン312を抽出するステップ(S1)と、処理対象ソースコード313にテストケース314を用いたテストを実施するテスト実行ステップ(S2)と、処理対象ソースコードのテスト実行情報315とバグパターン312とに基づいてバグの原因箇所を判定するバグ位置判定ステップ(S3)を実行することができる。さらに、ソフトウェア生成支援システム1は、処理対象ソースコードを修正するソースコード修正ステップ(S4)を実行することもできる。各ステップの詳細は後述する。
 プロセッサ2が記憶装置3に記憶されたコンピュータプログラムを実行することにより、ソフトウェア生成支援システム1の機能が実現される。プロセッサ2は、CPU(Central Processing Unit)に限らず、GPU(Graphics Processing Unit)またはASIC(Application Specific Integrated Circuit)などを含んでもよい。
 情報記憶部31は、開発されたソフトウェア資産に関する情報が記憶される。ソフトウェア資産には、既存のソースコードについての変更履歴311が含まれる。ソースコード変更履歴311の詳細は図3で後述する。
 バグパターン抽出部32は、ソースコード変更履歴311に記憶された情報の中から、バグの発生しやすいプログラム文の傾向を示すバグパターン312を抽出する。バグパターン312の詳細は図4で後述する。
 テスト実行部33は、複数のテストケースを処理対象ソースコードに適用して実行させる機能を持つ。テストの実行結果は、テスト実行情報315として出力され、情報記憶部31に記憶される。テスト実行情報315の詳細は図7で後述する。
 バグ位置判定部34は、処理対象ソースコード313のバグの原因箇所を判定し、判定結果であるバグ位置情報316を出力する。バグ位置情報316は、ユーザに提供されてソースコードの修正に使用される。バグ位置判定部34は、プログラム文ごとに(命令ごとに)疑惑値を計算する疑惑値計算部341と、計算された疑惑値を修正する疑惑値修正部342を備える。バグ位置判定部34の処理内容とバグ位置情報316についてはさらに後述する。
 ソースコード修正部35は、自動的にまたは半自動的にあるいは手動で生成されるパッチ案を用いて、処理対象ソースコードのバグを修正する機能を持つ。ソースコード修正部35によりバグの修正されたソースコードの情報は、新たなソフトウェア資産としてソースコード変更履歴311に自動的に追加される。
 ソフトウェア生成支援システム1は、上述した各機能31~35の全てを備える必要はない。例えば、ソフトウェア生成支援システム1は、バグパターン抽出部32を備えてもよい。例えば、ソフトウェア生成支援システム1は、バグパターン抽出部32とテスト実行部33を備えてもよい。例えば、ソフトウェア生成支援システム1は、バグパターン抽出部32とテスト実行部33およびバグ位置判定部34を備えてもよい。ソフトウェア生成支援システム1は、バグパターン抽出部32、テスト実行部33、バグ位置判定部34、ソースコード修正部35を備えてもよい。
 ソフトウェア生成支援システム1は、複数のコンピュータを連携させて実現することもできる。例えば、情報記憶部31を実現するコンピュータと、バグパターン抽出部32を実現するコンピュータと、テスト実行部33を実現するコンピュータと、バグ位置判定部34を実現するコンピュータと、ソースコード修正部35を実現するコンピュータとを通信可能に接続して、ソフトウェア生成支援システム1を構成することもできる。
 ユーザインターフェース装置4は、ソフトウェア生成支援システム1を管理するシステム管理者、またはソフトウェア生成支援システム1の提供するソフトウェア生成支援サービスを使用するユーザにより使用される装置である。ユーザインターフェース装置4は、情報をソフトウェア生成支援システム1へ入力する情報入力装置と、ソフトウェア生成支援システム1から情報を管理者またはユーザへ提供する情報出力装置(いずれも不図示)を備える。
 情報入力装置は、例えば、キーボード、ポインティングデバイス、タッチパネル、音声指示装置などである。情報出力装置は、例えば、モニタディスプレイ、プリンタ、音声合成装置などである。ユーザインターフェース装置4として、AR(Augmented Reality)またはVR(Virtual Reality)などを用いることもできる。
 図2は、ソフトウェア生成支援システムの論理構成図である。図2の中央には、情報記憶部31に記憶される情報311~317が示されている。図2の左右には、情報を処理する機能部32~35が示されている。
 図2の上から下に向けて説明する。バグパターン抽出部32は、ソースコード変更履歴311から過去に作成されて修正されたソースコードについての情報(変更履歴)を取得し、取得した情報に基づいてバグパターン312を生成する。生成されたバグパターン312は、情報記憶部31に記憶される。ソースコード変更履歴311には、複数のソースコードについての変更履歴が含まれている。バグパターン312も複数のバグパターンを含んでおり、バグパターン群312と呼ぶこともできる。
 テスト実行部33は、情報記憶部31から処理対象ソースコード313およびテストケース314を取得する。テスト実行部33は、処理対象ソースコード313にテストケース314を適用してソースコード312を実行し、その実行結果であるテスト実行情報315を情報記憶部31に記憶する。
 バグ位置判定部34は、情報記憶部31からバグパターン312およびテスト実行情報315を取得し、疑惑計算部341と疑惑値修正部342を用いてバグの原因箇所を判定する。その判定結果はバグ位置情報316として情報記憶部31に記憶される。
 ソースコード修正部35は、情報記憶部31からバグ位置情報316と処理対象ソースコード313を取得し、処理対象ソースコードからバグを取り除いて修正後ソースコード317を生成し、情報記憶部31に記憶する。修正後ソースコード317およびその変更履歴は、ソースコード変更履歴311の一部となる。
 図3は、ソースコード変更履歴311の例である。ソースコード変更履歴311は、複数の履歴3110(1),3110(2)...を持つ。各履歴3110は、例えば、修正前のソースコード3111、修正後のソースコード3112、テスト実行経路3113、テスト結果3114を含む。テスト実行経路3113は、テストケースごとに、どのプログラム文が実行されたかを示す情報である。図中の黒丸は、実行されたプログラム文を表している。
 図4は、バグパターン312の例を示す。バグパターン312は、例えば、抽象化(一般化)されたソースコード3121、テスト実行経路パターン3122、バグ位置3123、バグパターンID3123、重み3124を含む。
 抽象化されたソースコード3121は、既存ソースコードの変数などを抽象化したものである。これにより、同種のプログラム文を分類することができる。テスト実行経路パターン3122は、バグパターン312の元となった既存ソースコードのテスト実行経路3113の結果を成功テストと失敗テストとにグループ化(集約)したものである。テスト実行経路パターン3122は、プログラム文が成功テストと失敗テストのどちらで実行されることが多いか、あるいは成功テストと失敗テストの両方で実行されることが多いかといった、実行経路の傾向について各テストケースを集約して示す。
 例えばバグパターン312の元となる既存ソースコードにおいて失敗テストでのみ実行されるプログラム文には、テスト実行経路パターン3122の「失敗テスト」に黒丸が設定される。例えばバグパターン312の元となる既存ソースコードにおいて成功テストでのみ実行されるプログラム文には、テスト実行経路パターン3122の「成功テスト」に黒丸が設定される。バグパターン312の元となる既存ソースコードにおいて失敗テストおよび成功テストの両方で実行されるプログラム文には、テスト実行経路パターン3122の「失敗テスト」および「成功テスト」の両方に黒丸が設定される。失敗テストと成功テストの両方で実行されるプログラム文では、失敗テストと成功テストのうちいずれか多い方を選択して黒丸を設定することもできる。
 失敗テストまたは成功テストのいずれで実行されることが多いかを、単純な多数決で決めてもよいし、テストの実行回数が所定の閾値以上であるか否かで決めてもよい。例えば、バグパターン312の元となるソースコード変更履歴311のうち60%以上の失敗テストで実行されるプログラム文には、テスト実行経路パターン3122の「失敗テスト」に分類され、黒丸が設定される。60%というのは例示であり、60%を越えた数値でもよいし、60%未満の数値でもよい。
 バグ位置3123は、バグパターン312の元となったソースコード変更履歴311によれば、バグの原因箇所である可能性が高いプログラム文であることを示す。
 バグパターンID3123は、ソースコード変更履歴311から生成されるバグパターン312を識別する情報である。重み3124は、バグパターン312に設定された重みの値である。重みの値は、バグパターン312の元となったソースコード変更履歴311の数に基づいて決定されてもよい。例えば、3つの変更履歴311からバグパターン312が生成される場合、重みの値に「3」または「3」から計算できる値を設定することができる。多くのソースコード変更履歴311から作成されるバグパターン312ほど、バグ判定に使用する際の信頼性が高いと考えられるためである。
 図5は、ソースコード313の例を示す。
 図6は、テストケース314の例を示す。
 図7は、テスト実行情報315の例を示す。テスト実行情報315は、例えば、処理対象ソースコードのプログラム文3151、テスト実行経路3152、テスト結果3153を含む。図中では、2,3個のテストケースを用いて処理対象ソースコードをテストする場合を示すが、実際にはより多くのテストケースを用いて処理対象ソースコードはテストされる。
 図8は、バグ位置情報316の例である。バグ位置情報316は、例えば、処理対象ソースコードのプログラム文3161、テスト実行経路パターン3162、疑惑値3163、順位3164を含む。疑惑値3163は、バグ位置判定部34の疑惑値計算部341により計算される。疑惑値計算部341は、プログラム文ごとに、成功テストで実行された回数、失敗テストで実行された回数などに基づいて、バグの原因箇所である可能性を疑惑値として計算する。順位3164は、バグの原因箇所である可能性の高い順番を示す。順位3164は、疑惑値3163の大きい順に決定される。
 図9は、修正されたソースコードの例を示す。
 図10は、バグパターンを抽出する処理(S1)のフローチャートである。バグパターン抽出部32は、ソースコード変更履歴311に含まれる修正前ソースコード3111と修正後ソースコード3112との組をクラスタリングし、クラスタごとに「抽象化されたソースコード3121」とバグ位置3123と重み3124を決定する(S11)。
 バグパターン抽出部32は、ステップS11で生成されたクラスタごとに、テスト実行経路3113を失敗テストと成功テストとにグループ化することにより、テスト実行経路パターン3122を算出する(S12)。
 そして、バグパターン抽出部32は、抽象化されたソースコード3121とテスト実行経路パターン3122を含むバグパターン312を出力し、情報記憶部31に記憶させる(S13)。
 図11は、バグ位置判定処理(S3)を示すフローチャートである。バグ位置判定部34の疑惑値計算部341は、テスト実行情報315を参照し、テスト実行経路3152とテスト結果3153とに基づいて、プログラム文ごとの(命令ごとの)疑惑値を計算する(S31)。
 バグ位置判定部34の疑惑値修正部342は、テスト実行情報315のテスト実行経路3152を失敗テストと成功テストとにグループ化することにより、テスト実行経路パターンを計算する(S32)。
 疑惑値修正部342は、ソースコードの内容(プログラム文)とテスト実行経路パターンとに基づいて、バグパターン312の中から一致するバグパターンを検出し、検出されたバグパターンに基づいて疑惑値3163を修正する(S33)。つまり、抽象化されたソースコードとテストされたソースコードとが対応しており、かつテスト実行経路パターンも一致するバグパターンが検出される。
 疑惑値修正部342は、修正された疑惑値の高い順に順位3164を決定し、バグ位置情報316として出力する(S34)。
 このように構成される本実施例によれば、バグの原因箇所を精度良く判定することができる。したがって、本実施例のソフトウェア生成支援システム1では、ソフトウェアの効率的な生成を支援することができる。
 本実施例に係るソフトウェア生成支援システム1では、過去のソフトウェア資産を活用して、バグの発生しやすいソースコードの傾向をバグパターン312として抽出し、処理対象ソースコード313のテスト実行情報315に対応するバグパターン312に基づいて疑惑値を修正する。したがって、本実施例のソフトウェア生成支援システム1では、より正確な疑惑値を得ることができ、本実施例のソフトウェア生成支援システム1を使用しない場合に比べて、バグの原因箇所を精度良く短時間で特定できる。
 図12を用いて第2実施例を説明する。本実施例では、第1実施例との差異を中心に述べる。図12は、本実施例に係るバグ位置情報316Aの例を示す。
 バグ位置情報316Aは、図8に示したバグ位置情報316に比べて、「一致するバグパターンのID」3165をさらに含む。一致するバグパターンのID3165は、処理対象ソースコードのテスト実行情報315に一致する(対応する)バグパターン312を特定する識別情報3123である。
 図12では、バグの原因箇所である可能性が最も高いプログラム文に、一致するバグパターン312の識別情報が設定される。これにより、ユーザは、バグの原因箇所がどのバグパターン312に基づいて検出されたのかを確認することができる。最も順位3164の高いプログラム文にだけバグパターンID3165を表示させることにより、ユーザは、バグの原因箇所が複数ある場合でも効率的に視認して、ソースコードを修正することができる。最も高い順位のプログラム文だけでなく、バグの原因箇所である可能性が2位または3位のプログラム文にも一致するバグパターンのIDを表示させてもよい。
 なお、本発明は、上述した実施形態に限定されない。当業者であれば、本発明の範囲内で、種々の追加や変更等を行うことができる。上述の実施形態において、添付図面に図示した構成例に限定されない。本発明の目的を達成する範囲内で、実施形態の構成や処理方法は適宜変更することが可能である。
 また、本発明の各構成要素は、任意に取捨選択することができ、取捨選択した構成を具備する発明も本発明に含まれる。さらに特許請求の範囲に記載された構成は、特許請求の範囲で明示している組合せ以外にも組み合わせることができる。
 1:ソフトウェア生成支援システム、6:コンピュータ端末、31:情報記憶部、32:バグパターン抽出部、33:テスト実行部、34:バグ位置判定部、35:ソースコード修正部、341:疑惑値計算部、342:疑惑値修正部
 

Claims (12)

  1.  プロセッサとメモリを備え、ソフトウェアの生成を支援するソフトウェア生成支援システムであって、
     前記プロセッサは、既存ソースコードについてのバグの修正履歴と前記既存ソースコードについて実行されたテストのテスト実行経路とを含むソースコード変更履歴から、バグの発生するパターンを示すバグパターンを抽出するステップと、
     処理対象ソースコードと前記処理対象ソースコードについて実行されたテストのテスト実行経路を含むテスト実行情報とに基づいて、前記処理対象ソースコードの命令ごとに疑惑値を計算し、前記計算された疑惑値を前記処理対象ソースコードに対応する前記バグパターンに基づいて修正することによりバグの原因箇所を示すバグ位置を判定するバグ位置判定ステップと
    を実行する
    ソフトウェア生成支援システム。
  2.  前記バグ位置判定ステップは、
      前記処理対象ソースコードと前記テスト実行情報とに基づいて、前記処理対象ソースコードの命令ごとに前記疑惑値を計算する疑惑値計算ステップと、
      前記バグパターンに含まれるソースコードと前記処理対象ソースコードとの照合結果、および前記テスト実行情報と前記バグパターンとの照合結果とに基づいて、前記計算された疑惑値を修正する疑惑値修正ステップと
    を実行する
    請求項1に記載のソフトウェア生成支援システム。
  3.  前記バグパターンは、前記既存ソースコードを抽象化した抽象化ソースコードと、前記既存ソースコードについて実行されたテストの実行経路をパターン化したテスト実行経路パターンとを含んでおり、
     前記疑惑値計算ステップは、前記処理対象ソースコードについての前記テスト実行経路と前記テスト実行経路パターンとの比較結果に基づいて、前記ソースコードの命令ごとに前記疑惑値を計算する
    請求項2に記載のソフトウェア生成支援システム。
  4.  前記テスト実行経路パターンは、失敗したテストと成功したテストとにおける、前記抽象化ソースコードの命令ごとの実行の有無を含む
    請求項3に記載のソフトウェア生成支援システム。
  5.  前記バグパターンは、バグが発生したと予測される位置を示すバグ位置を含んでおり、前記疑惑値修正ステップは、前記バグ位置に対応する疑惑値を、前記ソースコードおよび前記テスト実行情報と前記バグパターンとの照合結果に基づいて修正する
    請求項3に記載のソフトウェア生成支援システム。
  6.  前記疑惑値修正ステップは、前記バグパターンに設定された重みに基づいて、前記疑惑値を修正する
    請求項5に記載のソフトウェア生成支援システム。
  7.  前記バグパターンの重みは、前記バグパターンの生成に関する既存ソースコードの数に応じて設定される
    請求項6に記載のソフトウェア生成支援システム。
  8.  前記バグパターンは、複数の前記既存ソースコードについてのバグの修正履歴と前記複数の既存ソースコードについて実行されたテストのテスト実行経路とを含むソースコード変更履歴から生成される
    請求項1に記載のソフトウェア生成支援システム。
  9.  前記バグ位置判定ステップは、前記処理対象ソースコードに対応するバグパターンを特定するバグパターン特定情報を、前記バグ位置に対応付けて出力する
    請求項1に記載のソフトウェア生成支援システム。
  10.  前記処理対象ソースコードを、前記バグ位置判定ステップにより判定された前記バグ位置に基づいて修正するソースコード修正ステップをさらに備える
    請求項1に記載のソフトウェア生成支援システム。
  11.  コンピュータによりソフトウェアの生成を支援させるソフトウェア生成支援方法であって、
     既存ソースコードについてのバグの修正履歴と前記既存ソースコードについて実行されたテストのテスト実行経路とを含むソースコード変更履歴から、バグの発生するパターンを示すバグパターンを抽出するバグパターン抽出ステップと、
     処理対象ソースコードについて所定のテストケースを実行することにより前記処理対象ソースコードをテストするテスト実行ステップと、
     前記処理対象ソースコードと前記処理対象ソースコードについて実行されたテストのテスト実行経路を含むテスト実行情報とに基づいて、前記処理対象ソースコードの命令ごとに疑惑値を計算し、前記計算された疑惑値を前記処理対象ソースコードに対応する前記バグパターンに基づいて修正することによりバグの原因箇所を示すバグ位置を判定するバグ位置判定ステップと
    を前記コンピュータに実行させる
    ソフトウェア生成支援方法。
  12.  コンピュータをソフトウェアの生成を支援するソフトウェア生成支援システムとして機能させるコンピュータプログラムであって、
     既存ソースコードについてのバグの修正履歴と前記既存ソースコードについて実行されたテストのテスト実行経路とを含むソースコード変更履歴から、バグの発生するパターンを示すバグパターンを抽出するバグパターン抽出部と、
     処理対象ソースコードについて所定のテストケースを実行することにより前記処理対象ソースコードをテストするテスト実行部と、
     前記処理対象ソースコードと前記処理対象ソースコードについて実行されたテストのテスト実行経路を含むテスト実行情報とに基づいて、前記処理対象ソースコードの命令ごとに疑惑値を計算し、前記計算された疑惑値を前記処理対象ソースコードに対応する前記バグパターンに基づいて修正することによりバグの原因箇所を示すバグ位置を判定するバグ位置判定部と
    を前記コンピュータ上に実現させるコンピュータプログラム。
     
PCT/JP2023/037578 2022-11-07 2023-10-17 ソフトウェア生成支援システム、ソフトウェア生成支援方法およびコンピュータプログラム WO2024101091A1 (ja)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2022178378A JP2024067944A (ja) 2022-11-07 2022-11-07 ソフトウェア生成支援システム、ソフトウェア生成支援方法およびコンピュータプログラム
JP2022-178378 2022-11-07

Publications (1)

Publication Number Publication Date
WO2024101091A1 true WO2024101091A1 (ja) 2024-05-16

Family

ID=91032824

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2023/037578 WO2024101091A1 (ja) 2022-11-07 2023-10-17 ソフトウェア生成支援システム、ソフトウェア生成支援方法およびコンピュータプログラム

Country Status (2)

Country Link
JP (1) JP2024067944A (ja)
WO (1) WO2024101091A1 (ja)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2022165926A (ja) * 2021-04-20 2022-11-01 富士通株式会社 半教師ありバグパターン修正

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2022165926A (ja) * 2021-04-20 2022-11-01 富士通株式会社 半教師ありバグパターン修正

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
ARAKI, YOSHIHITO ET AL.: "Automatic program modification method using API usage patterns", IPSJ SIG TECHNICAL REPORT. SOFTWARE ENGINEERING (SE), vol. 2021-SE-207, no. 3, 22 February 2021 (2021-02-22), pages 1 - 8, XP009555471, ISSN: 2188-8825 *
KUWAHARA, HIROAKI ET AL.: "Preliminary evaluation of pattern search in automatic program modification using API usage patterns", IPSJ SIG TECHNICAL REPORT. SOFTWARE ENGINEERING (SE), vol. 2022-SE-210, no. 29, 4 March 2022 (2022-03-04), pages 1 - 8, XP009555473, ISSN: 2188-8825 *

Also Published As

Publication number Publication date
JP2024067944A (ja) 2024-05-17

Similar Documents

Publication Publication Date Title
JP5325981B2 (ja) 管理サーバ及び管理システム
CN1825278B (zh) 源代码静态分析模拟器的自定义api建模
US10365961B2 (en) Information handling system pre-boot fault management
WO2013140608A1 (ja) イベントの根本原因の解析を支援する方法及びシステム
JP5692414B2 (ja) 検知装置、検知プログラムおよび検知方法
US10866872B1 (en) Auto-recovery for software systems
JPWO2014162595A1 (ja) 管理システム及び管理プログラム
US11120124B2 (en) Method for detecting a deviation of a security state of a computing device from a desired security state
US20210279161A1 (en) Event management system and method
CN111949551A (zh) 应用程序测试方法、装置、设备及存储介质
JP7168833B2 (ja) メモリ故障処理の方法、装置、電子機器及び記憶媒体
US20160196200A1 (en) Test selection method and test selection apparatus
Di Martino et al. Analysis and diagnosis of SLA violations in a production SaaS cloud
CN111897686A (zh) 服务器集群硬盘故障处理方法、装置、电子设备及存储介质
JP6712207B2 (ja) セキュリティ対策装置
CN111538985A (zh) Android应用运行环境检测方法及其装置
WO2024101091A1 (ja) ソフトウェア生成支援システム、ソフトウェア生成支援方法およびコンピュータプログラム
US20210011717A1 (en) Verified Stack Trace Generation And Accelerated Stack-Based Analysis With Shadow Stacks
CN110865829A (zh) 数据库升级方法、系统、设备及存储介质
US12001271B2 (en) Network monitoring apparatus, method, and program
JP5679347B2 (ja) 障害検知装置、障害検知方法、及びプログラム
JP5978804B2 (ja) システムを管理するためのプログラム、方法及び情報処理装置
JP7296426B2 (ja) 情報システムを管理する管理システム及び管理方法
US11762727B2 (en) Information processing apparatus and method of monitoring operation
CN112732481A (zh) 一种处理器的异常修复方法及装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23888443

Country of ref document: EP

Kind code of ref document: A1