{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2025,10,22]],"date-time":"2025-10-22T20:35:12Z","timestamp":1761165312831,"version":"build-2065373602"},"reference-count":23,"publisher":"Sociedade Brasileira de Computa\u00e7\u00e3o - SBC","content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":[],"abstract":"<jats:p>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.<\/jats:p>","DOI":"10.5753\/sbbd.2025.247256","type":"proceedings-article","created":{"date-parts":[[2025,10,21]],"date-time":"2025-10-21T19:26:36Z","timestamp":1761074796000},"page":"399-412","source":"Crossref","is-referenced-by-count":0,"title":["Effectiveness of Small and Large Language Models for PL\/SQL Bad Smell Detection"],"prefix":"10.5753","author":[{"given":"Vinicius Ferreira de","family":"Sousa","sequence":"first","affiliation":[],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Cl\u00e1udio de Souza","family":"Baptista","sequence":"additional","affiliation":[],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-7883-5129","authenticated-orcid":false,"given":"Andr\u00e9 Luiz Firmino","family":"Alves","sequence":"additional","affiliation":[],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Hugo Feitosa de","family":"Figueir\u00eado","sequence":"additional","affiliation":[],"role":[{"role":"author","vocabulary":"crossref"}]}],"member":"3742","published-online":{"date-parts":[[2025,9,29]]},"reference":[{"key":"1","unstructured":"Abdin, M., et al. (2024). Phi-4 technical report. arXiv:2412.08905."},{"key":"2","doi-asserted-by":"crossref","unstructured":"Almeida, Y., et al. (2024). AICodeReview: Advancing code quality with AI-enhanced reviews. SoftwareX, 26(101677).","DOI":"10.1016\/j.softx.2024.101677"},{"key":"3","doi-asserted-by":"crossref","unstructured":"Almeida Filho, F. G. de, et al. (2019). Prevalence of bad smells in PL\/SQL projects. In 2019 IEEE\/ACM 27th International Conference on Program Comprehension (ICPC), pages 116\u2013121. IEEE.","DOI":"10.1109\/ICPC.2019.00025"},{"key":"4","unstructured":"Fang, C., et al. (2024). Large language models for code analysis: Do LLMs really do their job?. In 33rd USENIX Security Symposium (USENIX Security 24) (pp. 829\u2013846). USENIX Association."},{"key":"5","unstructured":"Google DeepMind (2024). Introducing Gemini 2.0: our new AI model for the agentic era. (11 December 2024). Retrieved April 17, 2025 from <a href=\"https:\/\/blog.google\/technology\/google-deepmind\/google-gemini-ai-update-december-2024\/\"target=\"_blank\">[link]<\/a>."},{"key":"6","doi-asserted-by":"crossref","unstructured":"Gopinath, K. (2023). Exploring the role of large language models in automated code review and software quality enhancement. International Journal of Innovative Research in Science, Engineering and Technology, 12(9):11428\u201311438.","DOI":"10.15680\/IJIRSET.2023.1209004"},{"key":"7","unstructured":"Haider, M. A., Mostofa, A. B., Mosaddek, S. S. B., Iqbal, A., and Ahmed, T. (2024). Prompting and fine-tuning large language models for automated code review comment generation. arXiv:2411.10129."},{"key":"8","unstructured":"Hassid, M., Remez, T., Gehring, J., Schwartz, R., and Adi, Y. (2024). The larger the better? Improved LLM code-generation via budget reallocation. arXiv:2404.00725."},{"key":"9","unstructured":"Holden, D. and Kahani, N. (2024). Code linting using language models. arXiv:2406.19508."},{"key":"10","unstructured":"Liu, H., Zhang, Y., Saikrishna, V., Tian, Q., and Zheng, K. (2024). Prompt learning for multi-label code smell detection: A promising approach. arXiv:2402.10398."},{"key":"11","doi-asserted-by":"crossref","unstructured":"Lucas, K., Gheyi, R., Soares, E., Ribeiro, M., and Machado, I. (2024). Evaluating large language models in detecting test smells. arXiv:2407.19261.","DOI":"10.5753\/sbes.2024.3642"},{"key":"12","doi-asserted-by":"crossref","unstructured":"Nascimento, D., Pires, C. E., and Massoni, T. (2013). PL\/SQL Advisor: uma ferramenta baseada em an\u00e1lise est\u00e1tica para sugerir melhorias para procedimentos armazenados. In Anais do IX Simp\u00f3sio Brasileiro de Sistemas de Informa\u00e7\u00e3o, pages 343\u2013354, Porto Alegre, RS, Brazil. SBC.","DOI":"10.5753\/sbsi.2013.5702"},{"key":"13","unstructured":"OpenAI (2024). GPT-4o mini: advancing cost-efficient intelligence. (18 July 2024). Retrieved April 17, 2025 from <a href=\"https:\/\/openai.com\/index\/gpt-4o-mini-advancing-cost-efficient-intelligence\/\"target=\"_blank\">[link]<\/a>."},{"key":"14","unstructured":"OpenAI. (2024). GPT-4o system card. arXiv:2410.21276."},{"key":"15","doi-asserted-by":"crossref","unstructured":"Opitz, J. (2024). A closer look at classification evaluation metrics and a critical reflection of common evaluation practice. Transactions of the Association for Computational Linguistics, 12:820\u2013836.","DOI":"10.1162\/tacl_a_00675"},{"key":"16","unstructured":"Russell, J., et al. (2003). PL\/SQL User\u2019s Guide and Reference, 10g Release 1 (10.1), chapter 1 Overview of PL\/SQL. Oracle Corporation, Redwood City, CA, USA."},{"key":"17","doi-asserted-by":"crossref","unstructured":"Sengamedu, S. and Zhao, H. (2022). Neural language models for code quality identification. In Proceedings of the 6th International Workshop on Machine Learning Techniques for Software Quality Evaluation, MaLTeSQuE 2022, pages 5\u201310, New York, NY, USA. Association for Computing Machinery.","DOI":"10.1145\/3549034.3561175"},{"key":"18","doi-asserted-by":"crossref","unstructured":"Sheikhaei, M. S., Tian, Y., Wang, S., and Xu, B. (2024). An empirical study on the effectiveness of large language models for SATD identification and classification. Empirical Software Engineering, 29(159).","DOI":"10.1007\/s10664-024-10548-3"},{"key":"19","doi-asserted-by":"crossref","unstructured":"Silva, L. L., Silva, J. R. da, Montandon, J. E., Andrade, M., and Valente, M. T. (2024). Detecting code smells using ChatGPT: Initial insights. In Proceedings of the 18th ACM\/IEEE International Symposium on Empirical Software Engineering and Measurement, ESEM '24, pages 400\u2013406, New York, NY, USA. Association for Computing Machinery.","DOI":"10.1145\/3674805.3690742"},{"key":"20","unstructured":"Sun, Z., et al. (2024). Enhancing code generation performance of smaller models by distilling the reasoning ability of LLMs. arXiv:2403.13271."},{"key":"21","doi-asserted-by":"crossref","unstructured":"Thomson, P. (2021). Static analysis: An introduction: The fundamental challenge of software engineering is one of complexity. Queue, 19(4), 29\u201341.","DOI":"10.1145\/3487019.3487021"},{"key":"22","doi-asserted-by":"crossref","unstructured":"Yadav, P. S., Rao, R. S., Mishra, A., and Gupta, M. (2024). Machine learning-based methods for code smell detection: A survey. Applied Sciences, 14(14):6149.","DOI":"10.3390\/app14146149"},{"key":"23","unstructured":"Zhang, Z., et al. (2024). Unifying the perspectives of NLP and software engineering: A survey on language models for code. arXiv:2311.07989."}],"event":{"name":"Simp\u00f3sio Brasileiro de Banco de Dados","number":"40","location":"Brasil","acronym":"SBBD 2025"},"container-title":["Anais do XL Simp\u00f3sio Brasileiro de Banco de Dados (SBBD 2025)"],"original-title":[],"link":[{"URL":"https:\/\/sol.sbc.org.br\/index.php\/sbbd\/article\/download\/37253\/37036","content-type":"application\/pdf","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/sol.sbc.org.br\/index.php\/sbbd\/article\/download\/37253\/37036","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,10,21]],"date-time":"2025-10-21T19:30:15Z","timestamp":1761075015000},"score":1,"resource":{"primary":{"URL":"https:\/\/sol.sbc.org.br\/index.php\/sbbd\/article\/view\/37253"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2025,9,29]]},"references-count":23,"URL":"https:\/\/doi.org\/10.5753\/sbbd.2025.247256","relation":{},"subject":[],"published":{"date-parts":[[2025,9,29]]}}}