# Graph-Driven Exploration of Issue Handling Schemes in Software Projects
## 4 Exploring and Assessing Issue Handling Processes
### IHM Analysis Algorithms
#### 4.3.2 Aggregation of State and Path Features (Algorithm 2)  
The issue paths derived by Algorithm 1 can be aggregated considering their unique state sequences. This is provided by Algorithm 2, which tracks state transitions and relevant timing features in all paths. It also determines the IHM graph structure, state statistics, and path-related features, such as issue coverage, structural properties/profiles, timing statistics, etc. Algorithm 2 inspects the sets \(\text{P}_{\text{i}}\), \(\text{T(P_{\text{i}})}\), \(\text{S}_{\text{i}}\), and \(\text{(T(S_{\text{i}}))}\) for all \(\text{I}_{\text{i}}\) in IS (provided by Algorithm 1) and includes the following actions:The creation of a set of unique paths (PU) and relevant aggregated statistics (handled issues, timing features (e.g., Q1, Q2, Q3 quartiles), comment global statistics (over diverse path types), etc. ); - The creation of a global set of states (SG) and relevant statistics (handled issues, unique issues, processing timing, etc. ); - The creation of an IHM graph with nodes relevant to set SG and edges derived by tracing the PU set. Algorithm 2 constructs state graph G by subsequently tracing all paths P generated by Algorithm 1. For each state in the path, it creates a list of unique settings and updates relevant vertices of the generated graph G (lines 6-16). For each state in the considered path, we check for its existence in the created graph G; in the positive case, we update data of the relevant graph vertex in the analyzed path. A single path Pi in P relates to a single issue. In line 11, we use the special function _getVertices_(), which when applied to graph G provides all vertices of the currently constructed graph G. Combining paths with the same state sequence (lines 19-20), we generate aggregated statistics, including issue flow (the number of covered issues), timing, and other features. In the opposite case, a new vertex is added (lines 35-39). Next, we check for the existence of an edge between the subsequent path states S(i) and S(i + 1) in the created graph G. In the positive case, it updates the issue flow for this edge (_E.count_), and in the opposite case, a new edge is created (lines 24-32). Having traced all states in the analyzed path of the considered issue, we check whether it is compatible (the same structure) with any previously analyzed paths. In the positive case, we update the statistics of the identified compatible paths. In the opposite case, we create a new unique path for the further analysis (lines 42-47). Algorithm 2 creates sets of unique paths (UP)--lines 39-44. States appearing in the path are mapped as vertices of the graph (V)--line 37. Each vertex comprises two counters: (i) _count_ (line 38)--the number of setting the corresponding state by all passing it issues; and (ii) _countunique_ (line 37)--the number of unique appearances of the considered state (equivalent to the number of issue paths in which it appears). The directed edges (E) of graph (G) define transitions between states (lines 21-32). Algorithm 2 is supported by the procedure _paintGraph_, which includes graph visualization (line 51). It ensures the capability of generating restricted graphs, e.g., with filtered-out states or edges corresponding to the issue flow below a specified threshold (e.g., 1%). The procedure _generate_state_features_ provides the set of all identified states and relevant statistical features, including the issue count and count unique numbers, timing statistics (minimal, maximal, average and quartiles Q1, Q2, Q3), and other profile values. Similarly, the procedure _generate_path_features_ provides statistics of paths, including the number of issues processed by the considered path, timing features similar to in case of states but related to passing all states in the path), and other features (e.g., related to comments--discussed farther on). ```
input: List of paths ([P]) with relevant statistics.