Laporkan Masalah

Metode Lokalisasi Bug Berbasis Struktur Repositori pada GitHub Open-Source

Khairul Ihsannudin, Arif Nurwidyantoro, M.Cs., Ph.D.

2026 | Skripsi | ILMU KOMPUTER

Proses lokalisasi bug (bug localization) merupakan aktivitas krusial dalam siklus hidup pemeliharaan perangkat lunak yang bertujuan untuk mengidentifikasi lokasi file atau fungsi yang harus diperbaiki berdasarkan deskripsi masalah dalam bahasa natural. Skala dan kompleksitas repositori modern yang besar menyulitkan Large Language Model (LLM) dalam menemukan lokasi bug secara tepat jika menggunakan pencarian leksikal biasa atau pembacaan keseluruhan source code secara langsung. Penelitian ini mengembangkan pendekatan lokalisasi bug berbasis struktur yang mengintegrasikan navigasi hierarkis (folder - file - fungsi) dengan ringkasan berbasis Abstract Syntax Tree (AST). Proses pra-pemrosesan berjalan secara bottom-up untuk membangun ringkasan dari tingkat fungsi hingga folder, sementara inferensi berjalan secara top-down melalui traversal rekursif terarah untuk mempersempit ruang pencarian secara presisi. Evaluasi dilakukan pada dataset benchmark SWE-bench Lite dengan total 300 kasus uji menggunakan model GPT-4o-mini, Nemotron-3 Nano 30B, dan Llama-3.1-8B. Hasil eksperimen menunjukkan bahwa Metode Usulan dengan Nemotron-3 Nano 30B mencapai akurasi Hit@1 file sebesar 50,67?n fungsi sebesar 25,45%. Dengan GPT-4o-mini, metode ini mencapai akurasi Hit@1 file sebesar 47,33?n fungsi sebesar 18,33%, melampaui akurasi lokalisasi fungsi dari baseline Agentless (17,67%) yang menggunakan model GPT-4o. Sementara itu, Llama-3.1-8B lokal mencapai akurasi Hit@1 file sebesar 22,33?n fungsi sebesar 6,45%. Penggunaan ringkasan hierarkis mampu mereduksi ukuran token repositori sebesar 53,83% serta menekan biaya operasional inferensi sebesar 74,22% dibandingkan baseline komersial.

Bug localization is a crucial activity in the software maintenance lifecycle, aiming to identify the files or functions that need to be modified based on natural language problem descriptions. The scale and complexity of modern large-scale repositories make it challenging for Large Language Models (LLMs) to accurately locate bugs using flat lexical searches like BM25 or by directly processing the entire raw source code. This research develops a structure-aware bug localization approach that integrates a complete three-level hierarchical navigation (folder - file - function) with minimal Abstract Syntax Tree (AST)-based summarization, extending and combining the Agentless and Meta-RAG frameworks. The preprocessing phase constructs summaries bottom-up from the function level to the folder level, while the inference phase proceeds top-down using a guided recursive traversal to narrow down the search space. The evaluation was conducted on the benchmark SWE-bench Lite dataset (300 instances) using GPT-4o-mini, Nemotron-3 Nano 30B, and Llama-3.1-8B. The experimental results show that the proposed method with Nemotron-3 Nano 30B achieves a Hit@1 file-level accuracy of 50.67% and a function-level accuracy of 25.45%. With GPT-4o-mini, it achieves a Hit@1 file-level accuracy of 47.33% and a function-level accuracy of 18.33%, outperforming the function-level localization accuracy of the Agentless baseline (17.67%) using the much larger GPT-4o. Meanwhile, the local Llama-3.1-8B model achieves a Hit@1 file-level accuracy of 22.33% and a function-level accuracy of 6.45%. The hierarchical summaries compress the repository token size by 53.83% and reduce operational inference costs by 74.22% compared to commercial baselines.

Kata Kunci : lokalisasi bug, navigasi hierarkis, large language model, ringkasan kode, reduksi biaya

  1. S1-2026-492819-abstract.pdf  
  2. S1-2026-492819-bibliography.pdf  
  3. S1-2026-492819-tableofcontent.pdf  
  4. S1-2026-492819-title.pdf