def main(): # set timer to measure Elapsed Time start_time = time.time() #initializing dataset dataset = DataSet() # Parsing documents dataset.create_document_space() # Printing to output the amount of documents in the document space print("JAVA FILES = ", dataset.get_source_code_list_lenght()) print("BUG REPORTS = ", dataset.get_bug_report_list_lenght()) # Compute all bug reports bug_locator = BugLocalization(dataset) bug_locator.run() # Calculating and printing metrics printing metrics metric = Metrics(dataset) metric.calculate() print("---top_n_rank_list ---") print(dataset.files_pos_ranked) ranks_file.close() # Elapsed Time e = int(time.time() - start_time) print('\nElapsed Time: {:02d}:{:02d}:{:02d}'.format( e // 3600, (e % 3600 // 60), e % 60))
def analyze(): b = Budget() b.add(i, t, d, e) b.report() m = Metrics(i, b, e, d, a) m.calculate() m.report() ana = Analysis(p, i, d, b, e, a, m) ana.do_all()
d.add_variable("cc3", 5000, 16) pymt = d.calculate() d.report() e = Expense() e.add("groceries", 1000) e.add("utilities", 500) e.add("household", 500) e.add("housing", 2000) e.add_yearly("property tax", 7000) e.add_yearly("insurance", 3600) e.add_yearly("maintenance", 2000) e.add_yearly("vacation", 6000) e.report() b = Budget() b.add(i, t, d, e) b.report() a = Assets() a.add("Cash", 30000, 2) a.add("Stocks", 80000, 8) a.add("Bonds", 0, 4) a.report() m = Metrics(i, b, e, d, a) m.calculate() m.report() ana = Analysis(p, i, d, b, e, a, m) ana.do_all()