@@ -42,6 +42,7 @@ def _create_size_impact_plot():
4242
4343 # Set title and axes labels
4444 plt .xlabel ("Repo Size (No. of files)" )
45+ plt .xlabel ("Repo Size (No. of files)" )
4546 plt .ylabel ("Percentage of TDD" )
4647 plt .title ("Repo size and TDD percentage" )
4748 _save_plot (plt , "Size Impact" )
@@ -54,8 +55,8 @@ def _create_box_plot():
5455
5556 # Initialize arrays to store percentages for each repo
5657 before = []
57- during = []
5858 after = []
59+ during = []
5960
6061 # Iterate through each repo and append the before, during and after percentages to each array
6162 for repo in repo_data :
@@ -65,11 +66,12 @@ def _create_box_plot():
6566
6667 # Append the percentage data to each array
6768 before .append ((int (repo ['Test Before' ]) / total_test_count ) * 100 )
68- during .append ((int (repo ['Test During' ]) / total_test_count ) * 100 )
6969 after .append ((int (repo ['Test After' ]) / total_test_count ) * 100 )
70+ during .append ((int (repo ['Test During' ]) / total_test_count ) * 100 )
7071
7172 # Plot the box plots
7273 boxplt = plt .boxplot ([before , after , during ], patch_artist = True , tick_labels = ["Before" , "After" , "During" ], flierprops = dict (markerfacecolor = 'coral' ))
74+ boxplt = plt .boxplot ([before , after , during ], patch_artist = True , tick_labels = ["Before" , "After" , "During" ], flierprops = dict (markerfacecolor = 'coral' ))
7375
7476 colors = ['palegreen' , 'lightblue' , 'lightskyblue' ]
7577 for patch , color in zip (boxplt ['boxes' ], colors ):
@@ -88,6 +90,7 @@ def _create_avg_commit_size_plot():
8890 # Initialize variables to store averages for each repo
8991 before_avg = 0
9092 after_avg = 0
93+ after_avg = 0
9194 during_avg = 0
9295
9396 # Iterate through each repo and update the before, during and after averages
@@ -99,9 +102,9 @@ def _create_avg_commit_size_plot():
99102 # Plot the bar chart
100103 colors = ['palegreen' , 'lightblue' , 'lightskyblue' ]
101104 plt .bar (["Before" , "After" , "During" ], [before_avg , after_avg , during_avg ], align = 'center' , color = colors )
105+ plt .bar (["Before" , "After" , "During" ], [before_avg , after_avg , during_avg ], align = 'center' , color = colors )
102106
103107 # Set title and axes labels
104- plt .xlabel ("Commit relation between tests and implementation" )
105108 plt .ylabel ("Average Commit Size (No. of files)" )
106109 plt .title ("Average commit size when tests are created \n before, after and during implementation" )
107110 _save_plot (plt , "Average Commit Size" )
0 commit comments