Requirement Document For Implementation of Bug Report-Based Test Input Extraction and Test Case Gene...
Requirement Document For Implementation of Bug Report-Based Test Input Extraction and Test Case Gene...
Introduction
This document provides a detailed plan for implementing a novel approach to enhance test
input extraction and test case generation. Inspired by the BRMINER technique, the goal is to
leverage Large Language Models (LLMs) for the same task. The workflow involves replicating
BRMINER results and then transitioning to an LLM-based approach.
Existing Approach
BRMINER Overview
1. Purpose: BRMINER extracts relevant test inputs from bug reports and utilizes them to
generate automated test cases using EvoSuite.
2. Methodology:
○ Parses bug reports for structured and unstructured data.
○ Uses regular expressions and Java code parsing to extract literals and potential
test inputs.
○ Inputs are fed into EvoSuite to generate test cases, evaluated using the
Defects4J dataset.
3. Performance: Achieves 68.68% relevant input extraction using regular expressions and
detects 45 previously undetected bugs.
Limitations
New Approach
Objective
Develop a more adaptable and context-aware system by leveraging a fine-tuned LLM to:
1. Extract test inputs directly from structured and unstructured data in bug reports.
2. Generate precise and relevant test cases using the same dataset.
3. Enhance coverage and bug detection capabilities compared to BRMINER.
Implementation Plan
1. Collect Data:
○ Bug reports (structured and unstructured formats).
○ Source code with and without bugs (Defects4J dataset).
○ Test cases and corresponding bug fixes.
2. Preprocess Data:
○ Normalize bug reports into a uniform format (remove noise, segment text).
○ Annotate inputs and outputs to train the LLM on extraction tasks.
3. Output:
○ A clean, structured dataset ready for LLM training.
Deliverables
1. For BRMINER:
○ EvoSuite for test case generation.
○ Java parsers and regex for data extraction.
2. For LLM Development:
○ Open-source LLMs (LLAMA).
○ Machine learning frameworks (PyTorch, TensorFlow).
○ Tools for fine-tuning and evaluation.
Timeline
Evaluation Metrics