def main(): print("Loading data. This may take some time.") records = [Record(project) for project in Project.available_projects()] show_rates_table(records) method_category_score(records) method_score_distributions(records) plt.show()
def main(): print('Loading data. This may take a while...') projects = [(p.name, Record(p.descartes), Record(p.gregor)) for p in Project.available_projects()] print('Execution time:') time_table(projects) plot_times(projects) print('Number of mutants created:') mutants_table(projects) plot_mutants(projects) plt.show()
def get_data(): for project in Project.available_projects(): record = Record(project) non_accessible_methods = set( method_id(m) for m in project.methods if 'ACCESSIBLE' not in m['classifications']) all_methods = set(method_id(m) for m in project.methods) def ratio(a_set): return len(a_set.intersection(non_accessible_methods)) / len(a_set) yield (project.name, ratio(record.pseudo_tested), ratio(record.methods_under_analysis), ratio(all_methods))
def main(): projects = list(Project.available_projects()) #Compute the scores print('Computing the scores. This may take a while...') scores = [get_both_scores(p) for p in projects] descartes_scores = [c[0].score for c in scores] gregor_scores = [c[1].score for c in scores] #Show the table render_table([p.name for p in projects], scores) #Show the correlation correlation = spearmanr(descartes_scores, gregor_scores) print(f'The Spearman correlation coefficient is {correlation.correlation} with a p-value of {correlation.pvalue}') #Show plot show_plot(descartes_scores, gregor_scores) bland_altman_plot(descartes_scores, gregor_scores) plt.show()
def main(): show_probabilities(Project.available_projects())