From report abstract:
"The results offer support for the claim that happy developers are indeed better problem solvers in terms of their analytical abilities. The following contributions are made by this study: (1) providing a better understanding of the impact of affective states on the creativity and analytical problem-solving capacities of developers, (2) introducing and validating psychological measurements, theories, and concepts of affective states, creativity, and analytical-problem-solving skills in empirical software engineering, and (3) raising the need for studying the human factors of software engineering by employing a multidisciplinary viewpoint."
Graziotin D, Wang X, Abrahamsson P. (2014) Happy software developers solve problems better: psychological measurements in empirical software engineering. PeerJ 2:e289 http://dx.doi.org/10.7717/peer..."
Link to Original Source