Developers often leave behind clues in their code, admitting where it falls short, known as Self-Admitted Technical Debt (SATD). In the world of Scientific Software (SSW), where innovation moves fast and collaboration is key, such debt is not just common but deeply impactful. As research relies on accurate and reproducible results, accumulating SATD can threaten the very foundations of scientific discovery. Yet, despite its significance, the relationship between SATD and SSW remains largely unexplored, leaving a crucial gap in understanding how to manage SATD in this critical domain. This study explores SATD in SSW repositories, comparing SATD in scientific versus general-purpose open-source software and evaluating transformer-based models for SATD identification. We analyzed SATD in 27 scientific and general-purpose repositories across multiple domains and languages. We fine-tuned and compared 10 transformer-based models (100M-7B parameters) on 67,066 labeled code comments. SSW contains 9.25x more Scientific Debt and 4.93x more SATD than general-purpose software due to complex computations, domain constraints, and evolving research needs. Furthermore, our best model outperforms existing ones. This study uncovers how SATD in SSW differs from general software, revealing its impact on quality and scientific validity. By recognizing these challenges, developers and researchers can adopt smarter strategies to manage debt and safeguard the integrity of scientific discovery.
翻译:开发人员常在代码中留下线索,承认其不足之处,这被称为自认技术债务(SATD)。在科学软件(SSW)领域,创新速度快且协作至关重要,此类债务不仅普遍存在,而且影响深远。由于研究依赖于准确且可复现的结果,SATD的积累可能威胁科学发现的基础。然而,尽管其重要性显著,SATD与SSW之间的关系在很大程度上仍未得到探索,导致在理解如何管理这一关键领域中的SATD方面存在重要空白。本研究探索了SSW代码库中的SATD,比较了科学软件与通用开源软件中的SATD,并评估了基于Transformer的模型在SATD识别中的应用。我们分析了跨多个领域和编程语言的27个科学及通用代码库中的SATD,并在67,066条标注的代码注释上对10个基于Transformer的模型(参数量100M-7B)进行了微调和比较。由于复杂的计算、领域限制以及不断演进的研究需求,SSW中的科学债务是通用软件的9.25倍,SATD是通用软件的4.93倍。此外,我们的最佳模型性能优于现有模型。本研究揭示了SSW中的SATD与通用软件的差异,阐明了其对软件质量和科学有效性的影响。通过认识这些挑战,开发人员和研究人员可以采取更智能的策略来管理债务,保障科学发现的完整性。