Effectiveness of Small and Large Language Models for PL/SQL Bad Smell Detection - Sousa, Vinicius Ferreira de; Baptista, Cláudio de Souza; Alves, André Luiz Firmino; Figueirêdo, Hugo Feitosa de (Anais do Simpósio Brasileiro de Banco de Dados (SBBD); 2025: Anais do XL Simpósio Brasileiro de Bancos de Dados, 2025)
The quality of PL/SQL code is critical for enterprise systems built on Oracle Database, yet traditional quality-assurance methods struggle to uncover nuanced code smells and complex semantic flaws. This study evaluates the effectiveness of two large language models (GPT-4o, Gemini 2.0 Flash) and two small language models (GPT-4o mini, Phi-4) for detection of bad smells in PL/SQL code. Using a uniform prompt structure, each model was tasked with identifying bad smells in a curated dataset of PL/SQL snippets. Results show that effectiveness varied significantly across models and bad smell types. These findings offer practical insights to aid in selecting and leveraging language models for PL/SQL code analysis.