arrow
返回

Code stylometry vs formatting and minification

delete2024-09-06
delete0
delete
OA
AI
S
Stefano Balla *
M
Maurizio Gabbrielli
S
Stefano Zacchiroli
DOI:10.7717/peerj-cs.2142delete
delete原文链接
delete原文求助
delete分享
delete收藏
摘要

摘要

En 中文
The automatic identification of code authors based on their programming styles- known as authorship attribution or code stylometry-has become possible in recent years thanks to improvements in machine learning-based techniques for author recognition. Once feasible at scale, code stylometry can be used for well-intended or malevolent activities, including: identifying the most expert coworker on a piece of code (if authorship information goes missing); fingerprinting open source developers to pitch them unsolicited job offers; de-anonymizing developers of illegal software to pursue them. Depending on their respective goals, stakeholders have an interest in making code stylometry either more or less effective. To inform these decisions we investigate how the accuracy of code stylometry is impacted by two common software development activities: code formatting and code minification. We perform code stylometry on Python code from the Google Code Jam dataset (59 authors) using a code2vec-based author classifier on concrete syntax tree (CST) representations of input source files. We conduct the experiment using both CSTs and ASTs (abstract syntax trees). We compare the respective classification accuracies on: (1) the original dataset, (2) the dataset formatted with Black, and (3) the dataset minified with Python Minifier. Our results show that: (1) CST-based stylometry performs better than AST-based (51.00%-*68%), (2) code formatting makes a significant dent (15%) in code stylometry accuracy (68%-*53%), with minification subtracting a further 3% (68%-*50%). While the accuracy reduction is significant for both code formatting and minification, neither is enough to make developers non-recognizable via code stylometry.
Keyword:
Authorship attribution
Code stylometry
Code formatting
Minification
Source code
Syntax tree
Code2vec

期刊

PeerJ Computer Science 封面图
PeerJ Computer Science
IF:
2.5
论文数:
3.4K
被引数:
6.9K

机构

I
imt - institut mines-telecom
学者数:
7.4K
论文数: 6.4K
被引数: 5
U
University of Bologna
学者数:
4.5W
论文数: 3.8W
被引数: 4.1W
引用论文

引用论文

Superlinear threshold detectors in quantum cryptography
err2011-09-15
err0
errOAAI
errLars Lydersen; Nitin Jain; Christoffer Wittmann; Øystein Marøy; Johannes Skaar; Christoph Marquardt; Vadim Makarov; Gerd Leuchs
err分享
err收藏
The effects of napping on the risk of hypertension: a systematic review and meta‐analysis
err2016-11-27
err0
PREAI
errWisit Cheungpasitporn; Charat Thongprayoon; Narat Srivali; Priya Vijayvargiya; Carl A. Andersen; Wonngarm Kittanamongkolchai; Insara J. Jaffer Sathick; Sean M. Caples; Stephen B. Erickson
err分享
err收藏
Automated reaction path search calculations of spin-inversion mechanisms in the 6,4,2Nb + C2H4 reaction
err2019-05-01
err0
PREAI
errMasahiro Kawano; Shoichi Koido; Taiki Nakatomi; Yuya Watabe; Toshiyuki Takayanagi
err分享
err收藏
Regional Differences and Convergence of Urban Water Use Efficiency in the Yangtze River Economic Belt
err
IF0
err2023-04-27
err0
errOAAI
errYunbo Xiang; Wen Shao; Zhijun Dai; Yaxin Zhang; Shufang Ding
err分享
err收藏
err分享
err收藏
err
IF0
err
err0
errOAAI
err
err分享
err收藏
Do Multiple Venous Anastomoses Reduce Risk of Thrombosis in Free-Flap Transfer?
err2004-01-01
err0
PREAI
errAkihiro Ichinose; Hiroto Terashi; Minoru Nakahara; Isao Sugimoto; Kazunobu Hashikawa; Tadashi Nomura; Nobutaka Ogata; Satoshi Yokoo; Shinya Tahara
err分享
err收藏
Epitaxial Al/GaAs/Al tri-layers fabricated using a novel wafer-bonding technique
err2020-09-15
err0
errOAAI
errAnthony P. McFadden; Aranya Goswami; Michael Seas; Corey Rae H. McRae; Ruichen Zhao; David P. Pappas; Christopher J. Palmstrøm
err分享
err收藏
学者 查看更多内容