Learning from Mistakes: Understanding Ad-hoc Logs through Analyzing Accidental Commits
- URL: http://arxiv.org/abs/2501.09892v1
- Date: Fri, 17 Jan 2025 00:42:33 GMT
- Title: Learning from Mistakes: Understanding Ad-hoc Logs through Analyzing Accidental Commits
- Abstract summary: There is almost no existing literature that studies developers' practices in how they use "ad-hoc logs"<n>We study such developer logging practices by watching and analyzing live-streamed coding videos.<n>We collect 27 GB of accidental commits that removed 548,880 ad-hoc logs in JavaScript from GitHub Archive repositories.
- Score: 5.719609621039864
- License: http://creativecommons.org/licenses/by-nc-sa/4.0/
- Abstract: Developers often insert temporary "print" or "log" instructions into their code to help them better understand runtime behavior, usually when the code is not behaving as they expected. Despite the fact that such monitoring instructions, or "ad-hoc logs," are so commonly used by developers, there is almost no existing literature that studies developers' practices in how they use them. This paucity of knowledge of the use of these ephemeral logs may be largely due to the fact that they typically only exist in the developers' local environments and are removed before they commit their code to their revision control system. In this work, we overcome this challenge by observing that developers occasionally mistakenly forget to remove such instructions before committing, and then they remove them shortly later. Additionally, we further study such developer logging practices by watching and analyzing live-streamed coding videos. Through these empirical approaches, we study where, how, and why developers use ad-hoc logs to better understand their code and its execution. We collect 27 GB of accidental commits that removed 548,880 ad-hoc logs in JavaScript from GitHub Archive repositories to provide the first large-scale dataset and empirical studies on ad-hoc logging practices. Our results reveal several illuminating findings, including a particular propensity for developers to use ad-hoc logs in asynchronous and callback functions. Our findings provide both empirical evidence and a valuable dataset for researchers and tool developers seeking to enhance ad-hoc logging practices, and potentially deepen our understanding of developers' practices towards understanding of software's runtime behaviors.
Related papers
- (Im)Paired Programming: Coding Agents Improve Productivity but Harm Understanding [59.19634073105828]
We have 54 students create a website with one of two AI systems: an agent that edits user code.<n>We test understanding via comprehension questions and a task where users extend their code without agents.<n>Despite self-reported weaker understanding, users still prefer coding agents because they are quick and easy to use.
arXiv Detail & Related papers (2026-07-29T01:23:04Z) - Empirical Study on the Characteristics and Evolution of AI-usage in GitHub Repositories: Evidence from Code Comments [7.213400161126317]
We analyze 35,361 GitHub code comments that explicitly reference AI use and their associated code blocks.<n>We first open-code 500 unique comments and code blocks to derive a taxonomy of AI-assisted development activities.<n>We then annotate the full dataset using two LLM-based classifiers and aggregate predictions with Dawid-Skene expectation-maximization.
arXiv Detail & Related papers (2026-06-05T02:37:44Z) - Do AI Coding Agents Log Like Humans? An Empirical Study [7.650932309932137]
We conduct an empirical study of 4,550 agentic pull requests across 81 open-source repositories.<n>We find that agents change logging less often than humans in 58.4% of repositories, though they exhibit higher log density when they do.<n>We observe that humans perform 72.5% of post-generation log repairs, acting as "silent janitors" who fix logging and observability issues without explicit review feedback.
arXiv Detail & Related papers (2026-04-10T15:22:58Z) - Guidelines to Prompt Large Language Models for Code Generation: An Empirical Characterization [82.29178197694819]
We derive and evaluate development-specific prompt optimization guidelines.<n>We use an iterative, test-driven approach to automatically refine code generation prompts.<n>We conduct an assessment with 50 practitioners, who report their usage of the elicited prompt improvement patterns.
arXiv Detail & Related papers (2026-01-19T15:01:42Z) - CodeWatcher: IDE Telemetry Data Extraction Tool for Understanding Coding Interactions with LLMs [2.125886632946383]
textitCodeWatcher is a lightweight, unobtrusive client-server system designed to capture finegrained interaction events from within the Visual Studio Code editor.<n>textitCodeWatcher logs semantically meaningful events such as insertions made by CGTs, deletions, copypaste actions, and focus shifts.
arXiv Detail & Related papers (2025-10-13T15:39:08Z) - Automated Code Review Using Large Language Models at Ericsson: An Experience Report [3.82053496282075]
We describe our experience in using Large Language Models towards automating the code review process in Ericsson.<n>We then describe our preliminary experiments with experienced developers in evaluating our code review tool and the encouraging results.
arXiv Detail & Related papers (2025-07-25T09:50:48Z) - Prompting LLMs for Code Editing: Struggles and Remedies [39.02507244469977]
Large Language Models (LLMs) are rapidly transforming software engineering, with coding assistants embedded in an IDE becoming increasingly prevalent.
This paper addresses part of this gap through a multi-phased investigation of developer interactions with an LLM-powered code editing and transformation feature, Transform Code, in an IDE widely used at Google.
We analyze telemetry logs of the feature usage, revealing that frequent re-prompting can be an indicator of developer struggles with using Transform Code.
We propose and evaluate a tool, AutoPrompter, for automatically improving prompts by inferring missing information from the surrounding code context, leading to a 27% improvement in
arXiv Detail & Related papers (2025-04-28T18:59:28Z) - Do Developers Depend on Deprecated Library Versions? A Mining Study of Log4j [8.310157945755448]
We analyzed over 10,000 log entries from the Mining Software Repositories 2025 challenge dataset.
We examined the usage rates and trends for Log4j 1.x and Log4j-core 2.x.
arXiv Detail & Related papers (2025-04-04T04:49:36Z) - Explaining GitHub Actions Failures with Large Language Models: Challenges, Insights, and Limitations [37.17423965649917]
GitHub Actions (GA) has become the de facto tool that developers use to automate software, seamlessly building, testing, and deploying code.
This study explores the potential of large language models (LLMs) to generate correct, clear, concise, and actionable contextual descriptions (or summaries) for GA failures.
arXiv Detail & Related papers (2025-01-27T20:55:50Z) - LogLLM: Log-based Anomaly Detection Using Large Language Models [8.03646578793411]
We propose LogLLM, a log-based anomaly detection framework that leverages large language models (LLMs)
LogLLM employs BERT for extracting semantic vectors from log messages, while utilizing Llama, a transformer decoder-based model, for classifying log sequences.
Our framework is trained through a novel three-stage procedure designed to enhance performance and adaptability.
arXiv Detail & Related papers (2024-11-13T12:18:00Z) - Understanding Code Understandability Improvements in Code Reviews [79.16476505761582]
We analyzed 2,401 code review comments from Java open-source projects on GitHub.
83.9% of suggestions for improvement were accepted and integrated, with fewer than 1% later reverted.
arXiv Detail & Related papers (2024-10-29T12:21:23Z) - Codev-Bench: How Do LLMs Understand Developer-Centric Code Completion? [60.84912551069379]
We present the Code-Development Benchmark (Codev-Bench), a fine-grained, real-world, repository-level, and developer-centric evaluation framework.
Codev-Agent is an agent-based system that automates repository crawling, constructs execution environments, extracts dynamic calling chains from existing unit tests, and generates new test samples to avoid data leakage.
arXiv Detail & Related papers (2024-10-02T09:11:10Z) - Drop it All or Pick it Up? How Developers Responded to the Log4JShell Vulnerability [5.164262886682181]
We explore the prolific and possibly one of the cases of the Log4JShell, a vulnerability that has the highest severity rating ever.
Our study confirms that developers show a quick response taking from 5 to 6 days.
Instead of dropping everything, surprisingly developer activities tend to increase for all pending issues and PRs.
arXiv Detail & Related papers (2024-07-05T05:33:10Z) - Collaborative, Code-Proximal Dynamic Software Visualization within Code
Editors [55.57032418885258]
This paper introduces the design and proof-of-concept implementation for a software visualization approach that can be embedded into code editors.
Our contribution differs from related work in that we use dynamic analysis of a software system's runtime behavior.
Our visualization approach enhances common remote pair programming tools and is collaboratively usable by employing shared code cities.
arXiv Detail & Related papers (2023-08-30T06:35:40Z) - CONCORD: Clone-aware Contrastive Learning for Source Code [64.51161487524436]
Self-supervised pre-training has gained traction for learning generic code representations valuable for many downstream SE tasks.
We argue that it is also essential to factor in how developers code day-to-day for general-purpose representation learning.
In particular, we propose CONCORD, a self-supervised, contrastive learning strategy to place benign clones closer in the representation space while moving deviants further apart.
arXiv Detail & Related papers (2023-06-05T20:39:08Z) - Data-Driven Approach for Log Instruction Quality Assessment [59.04636530383049]
There are no widely adopted guidelines on how to write log instructions with good quality properties.
We identify two quality properties: 1) correct log level assignment assessing the correctness of the log level, and 2) sufficient linguistic structure assessing the minimal richness of the static text necessary for verbose event description.
Our approach correctly assesses log level assignments with an accuracy of 0.88, and the sufficient linguistic structure with an F1 score of 0.99, outperforming the baselines.
arXiv Detail & Related papers (2022-04-06T07:02:23Z) - Leveraging Code Clones and Natural Language Processing for Log Statement
Prediction [0.0]
This research aims to predict the log statements by utilizing source code clones and natural language processing (NLP)
Our work demonstrates the effectiveness of log-aware clone detection for automated log location and description prediction.
arXiv Detail & Related papers (2021-09-08T18:17:45Z) - Assessing Validity of Static Analysis Warnings using Ensemble Learning [4.05739885420409]
Static Analysis (SA) tools are used to identify potential weaknesses in code and fix them in advance, while the code is being developed.
These rules-based static analysis tools generally report a lot of false warnings along with the actual ones.
We propose a Machine Learning (ML)-based learning process that uses source codes, historic commit data, and classifier-ensembles to prioritize the True warnings.
arXiv Detail & Related papers (2021-04-21T19:39:20Z) - Self-Supervised Log Parsing [59.04636530383049]
Large-scale software systems generate massive volumes of semi-structured log records.
Existing approaches rely on log-specifics or manual rule extraction.
We propose NuLog that utilizes a self-supervised learning model and formulates the parsing task as masked language modeling.
arXiv Detail & Related papers (2020-03-17T19:25:25Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.