Source Code Commit Reversion Detection for Accurate Metrics
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Static analysis of software source code struggles to accurately measure development effort due to inclusion of erroneous and reversed file operations, leading to noisy and misleading metrics.
Innovation Solution
A static analysis system that excludes partial and full reversions from source code metrics by analyzing file activity logs and generating metrics based on unreverted files, using a static analysis system with an analysis engine, metric engine, and file activity engine to identify and discount additions and deletions that do not represent lasting changes.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If all file operations are included in source code metrics, then the completeness of metrics is improved, but the accuracy and reliability of metrics deteriorates due to inclusion of erroneous and reversed operations
Solution Approach 1:
The patent extracts and removes reversion operations from the set of all file operations before computing metrics. The system identifies operations where a file is added and then deleted, or deleted and then added, within a specified time window, and excludes these from the final metrics calculation. This extraction of harmful elements resolves the contradiction by maintaining completeness of legitimate operations while removing erroneous reversions.
Solution Approach 2:
The patent introduces an intermediary processing layer between raw file operation logs and final metrics computation. This intermediary layer analyzes operation sequences, identifies reversions through pattern matching (add-delete or delete-add pairs), and filters them out before metrics are calculated. This mediator resolves the contradiction by selectively processing operations to maintain accuracy without losing legitimate data.
2Reliability
If reversion detection and filtering is implemented, then the reliability of metrics is improved, but the complexity of the analysis system increases
Solution Approach 1:
The patent segments the metric computation process into distinct modules: raw data collection, reversion detection, filtering, and final metrics calculation. The reversion detection itself is segmented into identifying add operations, identifying delete operations, and matching them as reversal pairs. This segmentation resolves the contradiction by organizing complexity into manageable, independent components that can be maintained and understood separately.
Solution Approach 2:
The patent performs reversion detection and filtering as a preliminary action before final metrics computation. By pre-identifying and marking reversion operations for exclusion, the system avoids the need for complex conditional logic during the actual metrics calculation phase. This preliminary processing resolves the contradiction by front-loading the complexity into a separate preparation stage.
3Measurement precision
If partial reversions with intervening modifications are handled, then the precision of metrics is improved, but the difficulty of detecting and measuring increases
Solution Approach 1:
The patent implements a dynamic approach to reversion detection that adapts to different scenarios. The system can detect simple reversions (direct add-delete pairs), partial reversions (with intervening modifications), and can be configured with adjustable time windows. This dynamic detection strategy resolves the contradiction by providing flexible measurement capabilities that handle increasing complexity of reversion patterns while maintaining precision.
Solution Approach 2:
The patent performs preliminary analysis to establish the baseline state of files before detecting reversions. By pre-processing the operation log to identify and mark intervening modifications, the system simplifies the subsequent detection of partial reversions. This preliminary action resolves the contradiction by preparing the data structure in advance, making the detection of complex patterns more straightforward.
Data Source
AI summary
Methods, systems, and apparatus, including computer programs encoded on computer storage media, for discounting source code contributions occurring in reverted commits. One of the methods includes identifying, in a time-ordered sequence of commits, one or more matching sequences of additions and deletions of the files which have the same file path, comprising. A value for a contribution metric is computed for a responsible developer entity including discounting portions of the metric resulting from additions and deletions in any of the identified matching sequence of additions and deletions for the files having the same file path.


