Mid Sweden University

miun.sePublications
Change search
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf
Temporal Bias in LLM-Generated JavaScript:: A Benchmarking Study of Outdated Pattern Usage
Mid Sweden University, Faculty of Science, Technology and Media, Department of Communication, Quality Management, and Information Systems (2023-).
Mid Sweden University, Faculty of Science, Technology and Media, Department of Communication, Quality Management, and Information Systems (2023-).
2026 (English)Independent thesis Basic level (degree of Bachelor), 10 credits / 15 HE creditsStudent thesis
Abstract [en]

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

Place, publisher, year, edition, pages
2026. , p. 16
Keywords [en]
Software Engineering, JavaScript, temporal bias, distribution bias.
National Category
Software Engineering
Identifiers
URN: urn:nbn:se:miun:diva-57817OAI: oai:DiVA.org:miun-57817DiVA, id: diva2:2078740
Subject / course
Computer Engineering DT1
Educational program
Software Engineering TPVBG 180 higher education credits
Supervisors
Examiners
Available from: 2026-06-24 Created: 2026-06-24 Last updated: 2026-06-24Bibliographically approved

Open Access in DiVA

fulltext(1869 kB)36 downloads
File information
File name FULLTEXT01.pdfFile size 1869 kBChecksum SHA-512
b29e303e327727f0bcc30fc01e4ff8f83bea868ae38e592cecfe1810a08fe9dd8ba14c28df154f85ad215c08bc0c0ada88f9abae667a4bae8d354a8e7cfa980f
Type fulltextMimetype application/pdf

By organisation
Department of Communication, Quality Management, and Information Systems (2023-)
Software Engineering

Search outside of DiVA

GoogleGoogle Scholar
The number of downloads is the sum of all downloads of full texts. It may include eg previous versions that are now no longer available

urn-nbn

Altmetric score

urn-nbn
Total: 23 hits
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf