Published May 8, 2026 | Version v3

From Commits to Cognition: A Mixed-Methods Framework for Inferring Developer Mental Models from Repository Artifacts

Description

Understanding how software developers think remains a fundamental challenge in empirical software engineering. While previous research has examined developer behavior through surveys, interviews, and controlled experiments, few studies have attempted to reverse-engineer cognitive patterns directly from repository artifacts. This paper presents a pilot study combining Mining Software Repositories (MSR), Reflexive Thematic Analysis, and Autoethnography to infer developer mental models from commits, code structure, documentation, and project organization. Through a longitudinal self-study analyzing 40 repositories and 2,799 commits over approximately three years (2022–2025), we identify four dimensions of developer cognition: cognitive, affective, conative, and reflective. The resulting Developer Mental Model Framework (DMMF) provides a replicable protocol for developer self-analysis and offers preliminary insights into the relationship between software artifacts and their creators’ thought processes. We present quantitative analyses of commit patterns, BERT-based sentiment classification, and temporal clustering of refactor sequences alongside qualitative themes from reflexive analysis. As a single-subject exploratory study, our primary contribution is methodological: demonstrating the feasibility of inferring cognitive patterns from repository artifacts. We discuss limitations, validity threats, and directions for multi-subject validation.

Files

From-Commits-to-Cognition-Anderson.pdf

Files (432.3 kB)

Name Size Download all
md5:ef9f214011d9e609bc18565bbab6ccda
432.3 kB Preview Download

Additional details