
Context: Traditional file-level defect prediction methods struggle to precisely pinpoint the specific lines of code containing defects, limiting their practical value in code reviews. Furthermore, line-level defect prediction faces significant challenges in effectively leveraging the inherent complex semantic and structural information within code. Additionally, existing approaches often overlook the interdependencies between file-level and line-level labels, and perform poorly in scenarios with extreme data imbalance where defect lines are scarce. Objectives: This study aims to propose a novel line-level defect prediction method, LineCodeGSeq, designed to achieve precise defect localization and significantly reduce inspection costs. The objective is to overcome the limitations of current approaches by effectively integrating multimodal information — specifically code semantics, sequential context, and structural context — while balancing multi-granularity tasks through a unified training framework. Methods: First, it utilizes a pre-trained CodeBERT model to extract deep semantic feature representations for each line of code. Second, it employs a Bidirectional Gated Recurrent Unit (Bi-GRU) to capture sequential contextual information. Third, a Multi-Relational Gated Graph Neural Network (MR-GGNN) is introduced to model both control flow and data flow within the Program Dependence Graph (PDG), capturing structured contextual information. Finally, the model uses a Multi-Task Learning (MTL) framework with uncertainty-based adaptive weighting to jointly train file-level and line-level prediction tasks. Results: Experimental results demonstrate that LineCodeGSeq outperforms 5 state-of-the-art line-level prediction methods and 4 file-level baselines. The results demonstrate that in Within-Project Defect Prediction (WPDP) and Cross-Project Defect Prediction (CPDP) tasks, LineCodeGSeq improves Recall@Top20%LOC by 21%–130% and 15.8%–120%, respectively, while reducing Effort@Top20%Recall by 14%–57% and 5%–55.8%, respectively. Conclusion: LineCodeGSeq achieves superior defect localization efficiency and lower inspection costs by fusing semantic, sequential, and structural information. Furthermore, the end-to-end joint learning framework leverages the multi-granularity complementary enhancement between file-level and line-level supervision signals, providing a robust solution for fine-grained defect prediction in both within-project and cross-project scenarios.
Context: Code smells are suboptimal design and implementation choices in software development. Although they do not cause immediate program failures, they increase maintenance costs, reduce code readability, and are prone to accumulating hidden risks as the software evolves. To tackle these challenges, researchers are exploring better ways to detect code smells. Objective: The aim of this study is to propose a semantic robustness evaluation method for deep learning-based code smell detection models using adversarial attack methods, and to evaluate the models’ robustness in response to input perturbations. Methods: We conduct an evaluation across two programming languages (Java and C#), four code smells (Complex Method, Complex Conditional, Feature Envy, and Multifaceted Abstraction), and four model architectures (RNN-LSTM, CodeBERT, AutoEncoder, and Qwen3.5-9B). We apply four categories of adversarial attacks, including NLP-level, Semantic (AST-based variable synonym substitution), Structural (control-flow transformations), and Hybrid, at three adversarial ratios (10%, 30%, 50%). Adversarial training is then applied to the trainable models, while Adv-ICL is applied to the zero-shot LLM, to enhance model robustness. Results: Most models exhibit performance degradation under adversarial perturbations, with hybrid and structural attacks generally producing the largest effects. Adversarial training substantially restores detection performance on perturbed inputs for many trainable models, while Adv-ICL provides smaller improvements for Qwen on CM and CC. On clean data, F1 improves in many configurations, although the effects on AUC-ROC and minority-smell detection vary across models and smell types. Conclusion: The results demonstrate the broad but configuration-dependent effectiveness of adversarial training for code smell detection. Its benefits depend on the model architecture, smell type, programming language, and adversarial ratio, while severe class imbalance remains a major limitation for minority-smell detection.
Context Since the formulation of Sustainable Development Goals, the awareness surrounding mental health has increased exponentially. Still, when it comes to interventions regarding mental health, the software industry is a neglected community with no dedicated scales or datasets available. Objectives This study aims to develop and validate an exclusive framework, based on supervised learning, for predicting stress in software professionals of Pakistan. Methods This study used literature and 11 experts to create a stress gauging scale for software professionals of Pakistan. After running multiple statistical tests to prove its efficacy and reliability, the scale was mapped to a rule base. The mapping resulted in a dataset with 5 stress labels and 531,441 training examples. Four machine learning classifiers were then trained on this dataset, after addressing class imbalance through oversampling, to predict the stress levels in software professionals. Results The scale was successfully validated with an alpha value of 0.743. Random Forest was evaluated to be the most accurate stress predictor, with an accuracy of 95.19%. Conclusion SOS Framework can help companies gauge the mental health condition of their employees. Pakistan, being a highly ranked global provider of software services, needs to understand and provide decent work environment to software professionals to elevate their mental satisfaction and productivity.
Context Software Product Management (SPM) has become a strategically important capability for aligning software products with evolving customer needs, technological change, and business objectives. The increasing complexity of software ecosystems, continuous delivery practices, and portfolio-level decision-making has intensified the challenges of managing software products effectively. Understanding the conditions that enable successful SPM is therefore important for organizational competitiveness and long-term product sustainability. Objectives This study examines how SPM challenges identified in prior literature manifest in contemporary software organizations and identifies the preconditions required for effective SPM. It further develops an empirically grounded conceptual framework explaining how these preconditions collectively support SPM effectiveness. Methods This study employed a qualitative descriptive interview study approach. Data were collected through semi-structured interviews with senior practitioners from five software companies and analyzed using inductive thematic coding informed by prior SPM literature. The resulting themes were abstracted into enabling preconditions and synthesized into a conceptual framework of SPM. Results The findings identified preconditions for effective SPM across seven domains: product focus, product structure, technical management, organizational governance, process and resource management, time and scope management, and strategy. These preconditions were highly interrelated. Product structure and organizational governance emerged as foundational conditions supporting technical and process capabilities, while product focus and time and scope management reflected execution-level preconditions. Strategic factors influenced decision-making and alignment across all domains. Conclusion SPM effectiveness is shaped by the interaction of organizational, structural, technical, process, and strategic conditions. This highlights the need to move beyond challenge-centric views toward a systemic understanding of the factors that enable effective SPM. The resulting framework provides a foundation for studying SPM as an interconnected system and a structured basis for prioritizing governance, architectural, and decision-making improvements in dynamic software environments.