Uppsats
Temporal Bias in LLM-Generated JavaScript: : A Benchmarking Study of Outdated Pattern Usage
Kandidat-uppsats
Mittuniversitetet/Institutionen för kommunikation, kvalitetsteknik och informationssystem (2023-)
Publicerad: 2026
Språk: Engelska
Nyckelord
klicka för att sökaSammanfattning
The use of Large Language Models (LLM) has becomecommon among software developers. Studies show thatLLM-generated code often contain vulnerabilities, some ofwhich are due to legacy code patterns. A cause for this istemporal bias, which is further divided into cutoff bias anddistribution bias, both of which compel the LLM to generateoutdated code. Previous work to assess the occurrence ofobsolete code patterns has largely been focused on Pythoncode, and there is a gap in the research on the quality ofLLM-generated JavaScript code, which this study aims to fill.An automated tool, the Abstract Syntax Tree basedDeprecation Detector for Large Language Model generatedJavaScript code (AST-DD-LLM-JS) was created and used toquery LLM for JavaScript code snippets, which it scored tocalculate an average modernity score for GPT-5.4, ClaudeSonnet 4.6, GPT-5.4 Nano, and Claude Haiku 4.5. A datasetof 44 deprecated or legacy code patterns was collected toproduce the rules of the tool and to formulate LLM prompts.The results indicate that the tested LLMs generatedeprecated or legacy code on average 10% of the time whenprompted for a code example. When adding a recencyconstraint, the occurrence of outdated patterns fell to 3%.Neither the difference between models nor between codegenerated with or without the recency constraint wasstatistically significant. The study shows that simple codingsolutions generated by current LLMs still contain outdatedcode to a significant degree, and that even careful promptingfails to completely remove it
Information
- Författare
- Danielsson, Tobias, Broberg, Carl
- Lärosäte / institution
- Mittuniversitetet/Institutionen för kommunikation, kvalitetsteknik och informationssystem (2023-)
- Publiceringsdatum
- 2026
- Uppsatstyp
- Kandidat-uppsats
- Språk
- Engelska
Utforska vidare
Liknande uppsatser
Uppsatser med liknande ämnen och nyckelord.
Master-uppsats, Uppsala universitet/Institutionen för informatik och media
Hasnat, Nafees
Publicerad: 2025
Kandidat-uppsats, Mittuniversitetet/Institutionen för kommunikation, kvalitetsteknik och informationssystem (2023-)
Meander, Lina, Alshaka, Wala
Publicerad: 2026
Kandidat-uppsats, Mittuniversitetet/Institutionen för kommunikation, kvalitetsteknik och informationssystem (2023-)
Eriksson, Ottilia, Nordin, Carl
Publicerad: 2025
Kandidat-uppsats, Institutionen för tillämpad informationsteknologi
Carl Backman, Viktor Svanström
Publicerad: 2026-07-03
Kandidat-uppsats, Linköpings universitet/Institutionen för datavetenskap
Stenberg, Viktor, Kudsy, Rojeh
Publicerad: 2026
Kandidat-uppsats, Linnéuniversitetet/Institutionen för datavetenskap och medieteknik (DM)
Sanssi, Beatriz, Prichard-Lybeck, Sabrina
Publicerad: 2026