The success of software projects has been widely studied in both academia and industry. One of the key reasons behind it is software defectiveness. This dissertation starts from surveying many studies that have addressed this problem. We observe that many structural, process, managerial, and technical factors can influence the occurrence of software defects. Among them, we identify 67 factors, related to the structure and organizational processes used in a company, and use them to study the problem on 22 real projects carried out in a company. We gathered data on the whole software process from code repositories, project leaders, and team members. We interacted with more than 130 people to collect data starting from requirements elicitation to the delivery of the final, production code. The analysis conjugate the state of the art in academia with a real context and a business oriented perspective. The obtained results are interesting and provide significant suggestions to help any company rethink the software development and management process in the future.