Women tend to produce better computer code than men, but they are penalized if their gender is common knowledge, new research suggests.

Female coders who submitted proposed changes to publicly available and freely modifiable software through a platform called GitHub had their work accepted more often than men did, but that changed if other users knew the person behind the changes was a woman, the new study found.

“Our results show that women’s contributions tend to be accepted more often than men’s. However, when a woman’s gender is identifiable, they are rejected more often,” the researchers wrote. “Our results suggest that although women on GitHub may be more competent overall, bias against them exists nonetheless.”

Past studies of women and computer science have found differences between men and women’s behavior in collaborative online projects. For instance, a 2013 survey found that just over 10 percent of contributors to open-source code were women. (“Open-source” refers to software that is freely available and that anyone can modify or distribute.) A 2011 study found that Wikipedia’s editors skew overwhelmingly male.

These differences also show up in career advancement and cold hard cash. For instance, a 2005 study in the journal Economics of Education Review found that women in math and science careers are paid only 88 percent of what their male counterparts earn.

Is it gender bias?

But in those studies, the researchers couldn’t evaluate whether women’s lower levels of participation or success were due to gender bias or other differences between men and women. To get closer to answering that question, a team led by Josh Terrell, a computer scientist at California Polytechnic State University at San Luis Obispo, looked at one of the largest repositories of open-source code, a service called GitHub. Terrell and colleagues trawled through the profiles of more than 4 million GitHub users, then used a program to link the users’ Google Plus social media profiles with their GitHub accounts. About a third of those users specified a gender on Google Plus.

The team then analyzed how often the coders had their pull requests, or proposed changes to software code or documentation, approved or rejected. Overall, women made up a relatively small fraction of the coders: Women had made about 140,000 pull requests, compared with men’s nearly 3 million .

But the women’s requests seemed to fare a little better: About 79 percent of their pull requests were approved, compared with about 75 percent of men’s pull requests. The researchers evaluated the reasons for this discrepancy.

For instance, GitHub is a community made up of fairly prolific editors who may all know each other as well as more occasional or peripheral participants who may tweak the odd line of code here or there but are not central to the community. Insiders typically tend to get their code accepted more frequently.

So perhaps women have their code accepted because outsider women who see their code rejected end up quitting, and the remaining few women are likely to be insiders? However, the team found no evidence for this type of trend.

What’s more, women weren’t just getting their changes approved because they were playing it safe. They were making larger changes that affected more lines of code — a riskier proposition that is more likely to lead to errors in the software programs.

Also, the women dominated the men in every coding language, from Java to C++, refuting the notion that women are more likely to be found in less “hard-core” languages. In short, women’s code seemed to be more competent — at least as judged by the community of their peers, the study found.

The big reveal

However, the numbers changed when it came to women whose profiles identified them as female. While “insider” women did not seem to be penalized for their gender, outsider women saw their acceptance rate dip from 72 to 62 percent when their gender was identifiable from their user profile. Men with identifying details in their profiles also saw a drop in their approval rate, but the trend wasn’t nearly as strong.

The findings, which were not peer-reviewed, hint that sexism may play some role in women’s success rate, at least on GitHub, the researchers found.

Live Science

5 Reasons Women Trail Men in Science

6 Myths About Girls and Science

Busted! 6 Gender Myths in the Bedroom & Beyond