Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's interesting that they only analyze the abstract syntax tree and ignore formatting. I would suspect that brace placement, tabs vs spaces, etc. would provide a useful fingerprint as well.


They used both:

> We used a combination of lexical features (e.g., variable name choices), layout features (e.g., spacing), and syntactic features (i.e., grammatical structure of source code)

The AST stuff is super interesting. The other signals are somewhat superficial. But comparing ASTs? That is deep.


One would think that, but with AST's generated from 'normal' text (not code), they're actually quite noisy, and lexical and syntactic features have been more useful[1]. In traditional authorship attribution, AST's are a about decade-old technology. But then, this is code, so for all I know, very different.

PS: 1] shows that using AST's does does not get you THAT much of entropy gain compared to other features.

1: http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=6234420


As they said, it's only the beginning...


Auto-formatters will make that less useful.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: