Ocassionally Secure: A Comparative Analysis of Code Generation Assistants

Ran Elgedawy, Porter Dosch, John Sadik, Senjuti Dutta, Anuj Gautam +6 more
2/1/2024
cs.CRcs.AI

No confident code implementation found for this paper.

Abstract

$ $Large Language Models (LLMs) are being increasingly utilized in various applications, with code generations being a notable example. While previous research has shown that LLMs have the capability to generate both secure and insecure code, the literature does not take into account what factors help generate secure and effective code. Therefore in this paper we focus on identifying and understanding the conditions and contexts in which LLMs can be effectively and safely deployed in real-world scenarios to generate quality code. We conducted a comparative analysis of four advanced LLMs--GPT-3.5 and GPT-4 using ChatGPT and Bard and Gemini from Google--using 9 separate tasks to assess each model's code generation capabilities. We contextualized our study to represent the typical use cases of a real-life developer employing LLMs for everyday tasks as work. Additionally, we place an emphasis on security awareness which is represented through the use of two distinct versions of our developer persona. In total, we collected 61 code outputs and analyzed them across several aspects: functionality, security, performance, complexity, and reliability. These insights are crucial for understanding the models' capabilities and limitations, guiding future development and practical applications in the field of automated code generation.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{elgedawy2024ocassionally,
  title  = {Ocassionally Secure: A Comparative Analysis of Code Generation Assistants},
  author = {Ran Elgedawy and Porter Dosch and John Sadik and Senjuti Dutta and Anuj Gautam and Konstantinos Georgiou and Farzin Gholamrezae and Fujiao Ji and Kyungchan Lim and Qian Liu and Scott Ruoti},
  year   = {2024},
  eprint = {2402.00689},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2402.00689v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2402.00689.svg)](https://codeofpaper.com/paper/2402.00689)

Discussion