We use cookies to improve your experience with our site.

面向开发者特征和过程度量的多粒度开源社区异味预测

Community Smell Occurrence Prediction on Multi-Granularity by Developer-Oriented Features and Process Metrics

  • 摘要: 1、研究背景(context):
    开源软件开发是由开源社区组织的、具有社会化属性的活动。近期的研究表明开源软件质量和生产效率受技术和社交等多方面因素影响,与技术债务相对应的社交债务(Social Debt,指由于开源社区在沟通或合作方面的低内聚导致的额外开发成本)缺乏足够的关注和研究。开源社区异味(简称社区异味)是开源社区中不健康的组织结构,它可用于衡量社交债务。实证研究表明社区异味会显著影响代码重构等工作的效率,缺乏有效的代码重构会造成软件的质量下降、加速软件老化,进而导致软件失效。社区异味的相关工作主要面向开源社区的管理者展开,并试图用自上而下的方式来重构开源社区。然而,相对传统开发使用的、集中式和分层的组织形式而言,开源社区的参与者更为多样化,开源社区的运作方式更为平等。因此,仅从自上而下的视角出发不足以有效地预防和应对社区异味。
    2、目的(Objective):
    社区异味的发生源于开发活动,由开发者直接驱动。因此,本文考虑开发者个人的开发经验、情感特征和开发过程特征,并试图在开发者个人的层面预防社区异味的出现。研究不仅衡量上述特征和模型是否足以预测社区异味,而且分别从开发者个人和开发社区整体的视角理解这些因素对社区异味的影响,进而为研究人员和开发者提供对开源社区建构的新视角和实践的建议。
    3、方法(Method):
    本文使用开发经验、情感特征和开发过程特征建构了一个机器学习模型以预测开发者是否受到3种常见的社区异味影响。这些社区异味包括独狼效应、组织隔离和瓶颈效应。另外,模型还预测开发者是否在受到异味影响后退出开源社区。在开发者个人的预测粒度上,本文对效果良好的模型使用SHAP计算特征重要性及其显著程度,并分析特征值分布及其效应值的区别,以确定与异味发生最相关的特征,为结论的得出提供可量化的依据。在开源社区的粒度上,本文预报受异味影响的开发者数量,使其能够辅助开源社区维护者做出重构决策。
    4、结果(Result & Findings):
    在开发者个人的粒度下,本文使用项目内、时间敏感和跨项目三种模型性能验证方式,模型取得了F1值0.73到0.92的性能。在社区粒度下,本文对受异味影响开发者数目的预报模型获得了0.68的R2性能。根据SHAP特征重要性数值,经验特征和开发过程度量是社区异味预测中最重要的特征,情感特征也拥有均衡和中等的重要性。
    5、结论(Conclusions):
    在实践中,本文建议工作量较重的开发者主动加强与社区成员的沟通,并在沟通中使用直接和礼貌的方式,这些措施有助于建构健康的开源社区。本文也建议开源社区管理人员使用预报模型来指导开源组织的重构。

     

    Abstract: Community smells are sub-optimal developer community structures that hinder productivity. Prior studies performed smell prediction and provided refactoring guidelines from a top-down aspect to help community shepherds. Simultaneously, refactoring smells also requires bottom-up effort from every developer. However, supportive measures and guidelines for them are not available at a fine-grained level. Since recent work revealed developers' personalities and working states could influence community smells' emergence and variation, we build prediction models with experience, sentiment, and development process features of developers considering three smells including Organizational Silo, Lone Wolf, and Bottleneck, as well as two related classes including smelly developer and smelly quitter. We predict the five classes in the individual granularity, and we also generate forecasts for the number of smelly developers in the community granularity. The proposed models achieve F-measures ranging from 0.73 to 0.92 in individual-wide within-project, time-wise, and cross-project prediction, and mean R2 performance of 0.68 in community-wide Smelly Developer prediction. We also exploit SHAP (SHapley Additive exPlanations) to assess feature importance to explain our predictors. In conclusion, we suggest developers with heavy workload should foster more frequent communication in a straightforward and polite way to build healthier communities, and we recommend community shepherds to use the forecasting model for refactoring planning.

     

/

返回文章
返回