# metrics calculated by javaNCSS if DataReqs.checkJavaNCSSReqsSatisfied(sys.argv[1] + "/" + sys.argv[2]): log.info("Parsing javancss metrics ...") ncssDbLoc = dbLoc + ".ncssmetrics" JavaNCSSMetricsExtractor.parseMetrics(ncssDbLoc, methDict) # file change frequency metrics, provided by either CVS or SVN if DataReqs.checkVCSMetricsReqsSatisfied(sys.argv[1] + "/" + sys.argv[2]): log.info("Parsing change frequency metric ...") vcsDbLoc = dbLoc + ".vcs" MetricsExtractor.parseVCSMetrics(vcsDbLoc, fileDict) # conditional stats cDb = dbLoc + ".conditionals" if DataReqs.checkConditionalsReqsSatisfied(dbLoc): log.info("Parsing conditionals info") CtrlStructGrepReader.parse(cDb, mtdSrcDict, mtdpfDict, CtrlStructGrepReader.COND) #loop stats lDb = dbLoc + ".loops" if DataReqs.checkLoopsReqsSatisfied(dbLoc): log.info("Parsing loops info") CtrlStructGrepReader.parse(lDb, mtdSrcDict, mtdpfDict, CtrlStructGrepReader.LOOP) # Postamble common.famix.cdifWriter.generatePostamble() outputHandle.close()
log.info("Entering famix Level 4+") # metrics calculated by pmccabe, to be replacing the less robust cccc metrics DataReqs.checkPmcmetricReqsSatisfied(sys.argv[1] + "/" + sys.argv[2]) log.info("Parsing pmccabe metrics ...") pmcDbLoc = dbLoc + ".pmcmetrics" snavTableReader.parsePmcmetrics(pmcDbLoc,invokeableEntityDict) # transform methodsource dictionary into something useable for ctrlstruct info methodsPerFileDict = MethodsPerFileDictionary.MethodsPerFileDictionary(methodSourceDict) # conditional stats cDb = dbLoc + ".conditionals" if DataReqs.checkConditionalsReqsSatisfied(dbLoc): log.info("Parsing conditionals info") CtrlStructGrepReader.parse(cDb, methodSourceDict, methodsPerFileDict, CtrlStructGrepReader.COND) # loop stats lDb = dbLoc + ".loops" if DataReqs.checkLoopsReqsSatisfied(dbLoc): log.info("Parsing loops info") CtrlStructGrepReader.parse(lDb, methodSourceDict, methodsPerFileDict, CtrlStructGrepReader.LOOP) # file change frequency metrics, provided by either CVS or SVN if DataReqs.checkVCSMetricsReqsSatisfied(sys.argv[1] + "/" + sys.argv[2]): log.info("Parsing change frequency metric ...") vcsDbLoc = dbLoc + ".vcs" MetricsExtractor.parseVCSMetrics(vcsDbLoc,fileDict) # Postamble common.famix.cdifWriter.generatePostamble()
# famix level 4+ # metrics calculated by javaNCSS if DataReqs.checkJavaNCSSReqsSatisfied(sys.argv[1] + "/" + sys.argv[2]): log.info("Parsing javancss metrics ...") ncssDbLoc = dbLoc + ".ncssmetrics" JavaNCSSMetricsExtractor.parseMetrics(ncssDbLoc,methDict) # file change frequency metrics, provided by either CVS or SVN if DataReqs.checkVCSMetricsReqsSatisfied(sys.argv[1] + "/" + sys.argv[2]): log.info("Parsing change frequency metric ...") vcsDbLoc = dbLoc + ".vcs" MetricsExtractor.parseVCSMetrics(vcsDbLoc,fileDict) # conditional stats cDb = dbLoc + ".conditionals" if DataReqs.checkConditionalsReqsSatisfied(dbLoc): log.info("Parsing conditionals info") CtrlStructGrepReader.parse(cDb, mtdSrcDict, mtdpfDict, CtrlStructGrepReader.COND) #loop stats lDb = dbLoc + ".loops" if DataReqs.checkLoopsReqsSatisfied(dbLoc): log.info("Parsing loops info") CtrlStructGrepReader.parse(lDb, mtdSrcDict, mtdpfDict, CtrlStructGrepReader.LOOP) # Postamble common.famix.cdifWriter.generatePostamble() outputHandle.close()
log.info("Entering famix Level 4+") # metrics calculated by pmccabe, to be replacing the less robust cccc metrics DataReqs.checkPmcmetricReqsSatisfied(sys.argv[1] + "/" + sys.argv[2]) log.info("Parsing pmccabe metrics ...") pmcDbLoc = dbLoc + ".pmcmetrics" snavTableReader.parsePmcmetrics(pmcDbLoc, invokeableEntityDict) # transform methodsource dictionary into something useable for ctrlstruct info methodsPerFileDict = MethodsPerFileDictionary.MethodsPerFileDictionary( methodSourceDict) # conditional stats cDb = dbLoc + ".conditionals" if DataReqs.checkConditionalsReqsSatisfied(dbLoc): log.info("Parsing conditionals info") CtrlStructGrepReader.parse(cDb, methodSourceDict, methodsPerFileDict, CtrlStructGrepReader.COND) # loop stats lDb = dbLoc + ".loops" if DataReqs.checkLoopsReqsSatisfied(dbLoc): log.info("Parsing loops info") CtrlStructGrepReader.parse(lDb, methodSourceDict, methodsPerFileDict, CtrlStructGrepReader.LOOP) # file change frequency metrics, provided by either CVS or SVN if DataReqs.checkVCSMetricsReqsSatisfied(sys.argv[1] + "/" + sys.argv[2]): log.info("Parsing change frequency metric ...") vcsDbLoc = dbLoc + ".vcs" MetricsExtractor.parseVCSMetrics(vcsDbLoc, fileDict) # Postamble