Language detection in 'Analytics -> Repository'

Hello,

Generic question, since I could not find anything in the documentation: how is the percentage of each language computed? Is it based on an analysis of file, or just by extension?

The chart shows way too much C and not enough C++ in our case…

Thanks,

Clément