Locating Requirements in an Industrial Video Game with Large Language Model Assistants
Abstract
This package accompanies the paper submitted to REFSQ 2027 (anonymised for double-blind review). The study asks three commercial LLM assistants, used through their web chats with default settings (Claude Sonnet 5.5, ChatGPT with GPT-6 and Microsoft Copilot with GPT-5), to locate 24 requirements in the C++ code of a commercial video game (about 146,000 lines in 390 files, 4,352 methods). Each assistant was queried with two strategies, one requirement per chat (one-by-one) and all 24 requirements in one chat (all-at-once), three times each (225 chats, run on 22-25 October 2026). The answers are compared with an oracle at line and method level, and with a BM25 baseline. Fragment-level metrics, which the paper does not report, are included here. What can be released and what not The source code of the game, the text of the requirements and the oracle are covered by an intellectual-property agreement with the game's developer and cannot be shared. Released Not released Prompt templates (requirement keywords replaced by placeholders) Source code of the game Cleaned answers of all 225 chats (line identifiers, confidence, time) Text of the requirements Cleaned answers of BM25 and of the local models of the pilot Oracle Per-requirement descriptors (number of keywords, oracle size and spread) Justifications written by the assistants (they may quote code) Metrics of every answer, entry-level precision, similarity between repetitions Results of all statistical tests reported in the paper The notebook that computes all statistical analyses, tables and figures All data files are plain text or CSV (UTF-8, comma-separated, header in the first row). The notebook notebooks/statistical_analysis.ipynb computes every statistical analysis, table and figure of the paper from the released CSV files only; it is included with its outputs, so the results can be read without running it. Structure README.md this file LICENSE MIT (notebook) and CC BY 4.0 (data) requirements.txt Python dependencies of the notebook (Python >= 3.12) notebooks/ statistical_analysis.ipynb all statistical analyses, tables and figures of the paper data/ prompts/ prompt templates of both strategies answers/ one_by_one/<Assistant>/R01_REP1.txt ... 72 answers per assistant (24 requirements x 3 repetitions) all_at_once/<Assistant>/R01_REP1.txt ... the 3 all-at-once answers per assistant, split per requirement bm25/BM25_k<k>/R01_REP1.txt ... baseline, k in {1, 3, 5, 10} (deterministic: one repetition) local_models/<model>/R01_REP1.txt ... pilot: open-weight models results/ requirement_descriptors.csv per-requirement descriptors metrics_per_answer.csv P, R and F1 of every answer at every granularity and confidence filter entry_precision.csv precision of every answer entry with its declared confidence repetition_jaccard.csv Jaccard similarity between the repetitions of each requirement all_at_once_split.csv completeness, length and time of each all-at-once answer preparation_summary.csv format compliance of the answers statistics/ tables produced by the notebook (see below) figures/ figures produced by the notebook (PDF) pilot/ metrics_local_models.csv metrics of every answer of the local models (same columns as metrics_per_answer.csv) local_models_calls.csv calls, statuses, tokens and seconds per model and requirement pilot_local_models.csv summary per model, as reported in the pilot section of the paper Reproducing the analysis python -m venv .venv .venv/bin/pip install -r requirements.txt # Windows: .venv\Scripts\pip install -r requirements.txt .venv/bin/python -m jupyter lab # Windows: .venv\Scripts\python -m jupyter lab Open notebooks/statistical_analysis.ipynb and run all cells. It reads only results/*.csv, writes the tables to results/statistics/ and the figures to results/figures/, and overwrites the released ones with identical values: all bootstrap procedures use a fixed seed. Results of the statistical analyses Unless stated otherwise, the analyses use all answer entries (confidence filter all), and each treatment is represented by one value per requirement: the mean of its three repetitions. Means are therefore macro-averages over the 24 requirements. Bootstrap confidence intervals are 95% percentile intervals over requirements (10,000 resamples; fixed seed). Paper File in results/statistics/ Content Table 1 rq1_descriptive.csv mean [95% CI] and median of every measure per treatment RQ1 text rq1_friedman.csv Friedman test per measure: chi2, df, p, kendall_W Table 2 rq1_pairwise_wilcoxon_holm.csv the six pairwise comparisons per measure (columns below) RQ1 text rq1_methods_proposed.csv methods proposed, methods correct and oracle units per requirement Fig. 1 ../figures/rq1_boxplot_f1.pdf drawn from the one-by-one and BM25 (k=5) rows of metrics_per_answer.csv Table 3 rq1_per_requirement.csv descriptors and method F1 of each treatment per requirement Sensitivity sensitivity_bm25_k.csv, sensitivity_confidence.csv BM25 with k in {1, 3, 5, 10}; filtering entries by confidence Table 4 rq2_strategy_wilcoxon.csv all-at-once vs. one-by-one per assistant (columns below) RQ2 text rq2_cost.csv minutes per repetition (mean, SD, min, max) and speed-up RQ2 text rq2_nothing_relevant.csv answers stating that nothing is relevant (.), per strategy RQ2 text rq2_position.csv Spearman correlation between the position of the requirement and the change in F1 RQ3 text rq3_stability.csv mean Jaccard [95% CI], also over non-empty pairs, and SD of line F1 Fig. 2 rq3_calibration.csv, ../figures/rq3_calibration.pdf precision of the entries per declared confidence, with 95% CI from a bootstrap of whole requirements (2,000 resamples) Package only rq1_ok_equals_method.csv share of answers whose fragment-ok F1 equals method F1 All key_numbers.csv the differences, intervals, p-values and effect sizes quoted in the text rq1_pairwise_wilcoxon_holm.csv and rq2_strategy_wilcoxon.csv: metric; the two treatments (A, B) or the assistant; their means; delta, the mean paired difference (A − B, or all-at-once − one-by-one), with its bootstrap interval delta_lo, delta_hi; the Wilcoxon signed-rank statistic W and two-sided p; p_holm, Holm-corrected within each measure (six pairs in RQ1, three assistants in RQ2); significant (p_holm < 0.05); the matched-pairs rank-biserial correlation r (positive: A, or all-at-once, is better) and its magnitude (negligible < 0.1 ≤ small < 0.3 ≤ medium < 0.5 ≤ large). Data formats Code identifiers. In the code file given to the assistants, every line was prefixed with Fxxx:LLyyyy:GLzzzzzz: file, line in the file and global line number. All answers refer to lines by their global identifier GLzzzzzz. Clean answer (data/answers/.../R01_REP1.txt): one entry per line, a separator and the time. GL038290-GL038346 | high GL036706 | medium --- time: 30s A single . means that the assistant stated that nothing in the code is relevant. NA marks a missing confidence or time (none occur in the chats). For all-at-once answers, the total time of the chat was divided equally among the 24 requirements; the analysis only compares totals per repetition. For the local models, the time is the sum of the calls of the requirement. metrics_per_answer.csv: one row per answer and confidence filter. Column Meaning source one_by_one, all_at_once or bm25 assistant Claude, GPT, Copilot or BM25_k<k> requirement, repetition R01-R24, 1-3 confidence entries used: high, high+medium or all (main setting) time_s, nothing_relevant time in seconds; the answer was a single . n_entries, n_lines_pred, n_lines_oracle entries and code lines predicted; oracle lines line_tp, line_P, line_R, line_F1 line level (primary measure) n_methods_pred, n_methods_oracle, method_tp, method_P, method_R, method_F1 method level: each line is mapped to the method that contains it (any C++ function, including member functions); lines outside methods form their own unit frag_{good,ok}{50,70}_{P,R,F1} fragment level, Bellon et al. criteria good = |A∩B|/|A∪B| and ok = max(|A∩B|/|A|, |A∩B|/|B|), threshold θ = 0.5 or 0.7 Blank, comment-only and preprocessor lines are excluded from answers and oracle. An answer without entries has P = R = 0. requirement_descriptors.csv: keywords, uppercase_keywords, oracle_lines, oracle_files, oracle_units (method-level units), statements_only (the oracle contains no whole method) and uppercase_in_oracle (share of uppercase keywords that appear in the identifiers of the oracle code). In the oracle, the developers denote a whole method by its header line. entry_precision.csv: one row per entry of the one-by-one and all-at-once answers: declared confidence, number of code lines, precision (share of its lines in the oracle) and hit (at least one). repetition_jaccard.csv: for each assistant, strategy and requirement, the Jaccard similarity between the line sets of each pair of repetitions, and whether either answer was empty (empty_a, empty_b).