# Graph-Driven Exploration of Issue Handling Schemes in Software Projects
## 4 Exploring and Assessing Issue Handling Processes
### IHM Analysis Algorithms
#### 4.3.3 Supplementary Algorithms (A3)  
The set of identified paths provided by Algorithm 2 can be quite large:, reaching several dozen or hundreds, and sometimes exceeding one thousand. Therefore, to facilitate their analysis, we must introduce some classifications related to state and other features. This is useful in identifying issue processing deficiencies and to compare good and bad practices in the investigated projects. The developed supplementary algorithms are used to derive specific path features:  
* Deriving paths with loops (PL) within the PU set and relevant statistics: the number of handled issues, timing features, path structure (A3_L);
* Deriving specified path classes in the PU set and relevant statistics (A3_P);
* Deriving commenting features (A3_C). Supplementary algorithms facilitate the identification of anomalies and the evaluation of issue handling processes. They are based on the results from Algorithms 1 and 2. Algorithm 3 identifies state looping in paths. It provides lists of detected loops. Moreover, we distinguish single-state or multiple-state loop categories. Single-state loops comprise the repetition of the same state. Single-state loops usually result from deficiencies in reporting processes. In Algorithm 3, state loops of this category are identified within lines 6-10 of the FOR code loop. State loops of the second category are identified within lines 13-20 of the WHILE code loop. Searching for all possible state loops is ensured by the FOR code loop (lines 4-20), which iterates on the parameter LL, running from 1 to the half-length of the analyzed path (maximal possible loop length). The WHILE code loop checks for successive state subsequences in the path showing repetitions. As an illustration, Algorithm 3 applied to an excerpt of the state path [O,O,R_F,C,RE,R_F,C,RE,R_F,C] provides two loops: [(O:1) and [C;RE_R_F,C:4]]. The first one is a single-state loop comprising state O, while the second one is a four-state loop with the starting state C.  
```
input: Path (P) represented as a list of statuses for given issue, output: List of found loops ([AL])
1 function find_loop(P):
2 AL = new empty List
3 S = P.getStatuses()
4 FOR LL = 1 to (length of list)/2 DO
5 IF (LL == 1) THEN
6 FOR I=1 to len(S) - 1 DO
7 IF (S[I] == S[index + 1] THEN
8 AL.add(new A(list[i], 1))
9 ENDIF
10 ENDFOR
11 ELSE:
12 I = 0
13 WHILE (I + 2 * LL < len(S)) DO
14 L = new list as sublist of S with beginning in S[I] and end in S[I + LL]
15 LTC = new list as sublist of S with beginning in S[I + LL] and end in list[(I + 2)*(LL - 1)]
16 IF (L equals LTC) THEN
17 AL.add(new A(L, LL))
18 ENDIF
19 I += 1
20 ENDWHILE
21 ENDIF
22 ENDFOR
23 return AL
24 endfunction
```  
**Algorithm 3**Identification of loops in issue handling paths (A3_L)  
Having analyzed issue handling paths for many projects, we observed a multitude of path structures involving diverse combinations of states. It is therefore reasonable to distinguish path classes according to various criteria: the range of issue flow, timing, and structural features. For this purpose, we can define several profiles and path classes that are targeted at the analyzed problems. The classification process can be supported by regular expressions that define appropriate properties of searched paths, e.g., comprising a specified subsequence of states (algorithm A3_P). Some illustrations are given in Section 5. Comments registered during issue processing show problems in issue resolution, deficiencies in issue description, misunderstandings of project stakeholders, etc. An interesting aspect is tracing the timing, frequency, and information features of comments. In the performed comment analysis, we use a previously developed classifier [22] which distinguishes four comment classes: question, response, information, and issue fixing confirmation. For each issue, the introduced algorithm A3_C derives the number of generatedcomments, text size, category, structure of issue sequences, correlations with handling states, and timing features.