Skip to main content
QUICK REVIEW

[論文レビュー] Fast and Precise On-the-fly Patch Validation for All

Lingchao Chen, Lingming Zhang|arXiv (Cornell University)|Jul 22, 2020
Software Testing and Debugging Techniques参考文献 54被引用数 4
ひとこと要約

本稿では、ユニフィード・オンザフライ・パッチ検証フレームワークであるUniAPRを提案する。このフレームワークは、JVMセッションを再利用し、パッチ実行間でJVMグローバル状態を正確にリセットすることで、バイトコードレベルおよびソースコードレベルの自動プログラム修復(APR)の両方を高速化する。先行研究とは異なり、UniAPRは状態汚染に起因する不正確さを排除しながら、最新のAPRツールよりも10倍以上の高速化を達成し、正しさを損なわない。

ABSTRACT

Generate-and-validate (G&V) automated program repair (APR) techniques have been extensively studied during the past decade. Meanwhile, such techniques can be extremely time-consuming due to manipulation of the program code to fabricate a large number of patches and also repeated executions of tests on patches to identify potential fixes. PraPR, a recent G&V APR technique, reduces these costs by modifying program code directly at the level of compiled bytecode, and further performing on-the-fly patching by allowing multiple patches to be tested within the same JVM session. However, PraPR is limited due to its pattern-based, bytecode-level nature and it is basically unsound/imprecise as it assumes that patch executions do not change global JVM state and affect later patch executions on the same JVM session. Inspired by the PraPR work, we propose a unified patch validation framework, named UniAPR, which aims to speed up the patch validation for both bytecode and source-code APR via on-the-fly patching; furthermore, UniAPR addresses the imprecise patch validation issue by resetting the JVM global state via runtime bytecode transformation. We have implemented UniAPR as a fully automated Maven Plugin. We have also performed the first study of on-the-fly patch validation for state-of-the-art source-code-level APR. Our experiments show the first empirical evidence that vanilla on-the-fly patch validation can be imprecise/unsound; in contrast, our UniAPR framework can speed up state-of-the-art APR by over an order of magnitude without incurring any imprecision in patch validation, enabling all existing APR techniques to explore a larger search space to fix more bugs in the near future. Furthermore, UniAPR directly enables hybrid source and bytecode APR to fix substantially more bugs than all state-of-the-art APR techniques (under the same time limit) in the near future.

研究の動機と目的

  • 自動プログラム修復(APR)における重要なパフォーマンスボトルネック、すなわちパッチ検証が実行時間の大部分を占める問題を解決すること。
  • 1つのJVMセッション内で複数のパッチを適用する際、副作用が生じないという仮定に基づく、既存のオンザフライパッチ検証技術の不正確さを克服すること。
  • オンザフライパッチ検証をバイトコードレベルのAPRにとどめず、ソースコードレベルのAPR技術にも一般化すること。
  • 多様なAPR技術を統合する1つの効率的な検証フレームワークとして、ハイブリッドAPRを可能にすること。
  • vanilla(素の)オンザフライ検証がJVM状態汚染のため不正確であることを実証的に示し、実行時状態リセットによる修正を提供すること。

提案手法

  • UniAPRは、JVMのHotSwapを活用して、1つのJVMセッション内でオンザフライパッチを適用し、コストの高いプロセス再起動を回避する。
  • パッチ実行間で内部JVM状態(例:静的フィールド、クラスローダー)をリセットするために、実行時バイトコード変換を採用する。これにより、副作用の漏れを防止する。
  • フレームワークはMavenプラグインとして実装されており、ソースレベルおよびバイトコードレベルの既存APRツールとのシームレスな統合を可能にする。
  • 任意の既存APR技術をプラグインとしてサポートし、多様なパッチ生成戦略における統一された検証を実現する。
  • テストベースの検証を採用し、状態リセット後に同じJVMセッション内で各パッチに対して開発者テストを実行する。
  • 各パッチの実行コンテキストを隔離することで、繰り返しパッチテストにおいても検証の正確性(soundness)を保証する。

実験結果

リサーチクエスチョン

  • RQ1オンザフライパッチ検証を、ソースコードおよびバイトコードレベルのAPRの両方において、高速かつ正確に実現できるか?
  • RQ2JVM状態汚染のため、vanilla(素の)オンザフライパッチ検証は不正確(unsound)であるか?
  • RQ3統一されたフレームワークにより、すべての既存APR技術、特にハイブリッドなソース・バイトコードアプローチを高速化できるか?
  • RQ4UniAPRは、最新のAPRツールのスケーラビリティおよびバグ修正カバレッジをどの程度向上できるか?
  • RQ5実行時バイトコード変換による状態リセットは、オンザフライ検証における副作用を効果的に排除できるか?

主な発見

  • 実証的証拠により、vanilla(素の)オンザフライパッチ検証はJVM状態汚染のため不正確かつ不正確(unsound)であることが示された。
  • UniAPRは、CapGen、SimFix、ACSといった最新のAPRツールにおいて、精度に損なわれることなく10倍以上のパッチ検証の高速化を達成した。
  • フレームワークにより、同じ時間制限内に、個別の最新ツールよりもはるかに多くのバグをソースコードおよびバイトコードレベルのハイブリッドAPRで修正できるようになった。
  • 実行時バイトコード変換によるJVM状態リセットは、パッチ実行の隔離を効果的に実現し、検証の正確性を保証した。
  • UniAPRは既存のAPRツールと完全に互換性があり、Mavenプラグインとして統合可能であり、広範な採用を可能にした。
  • 本研究は、状態隔離が適切に実装されていれば、オンザフライパッチ適用が効率的かつ正確に実現できることを、初めて実証的に検証した。

より良い研究を、今すぐ始めましょう

論文の読解から最終レビューまで、研究時間を劇的に削減しましょう。

クレジットカード登録不要

このレビューはAIが作成し、人間の編集者が確認しました。