예제 #1
0
        private List <Coupling> AnalyzeLogicalComponentChangeCoupling(string mappingFile)
        {
            var couplingAnalyzer = new ChangeCouplingAnalyzer();
            var mapper           = new LogicalComponentMapper();

            mapper.ReadDefinitionFile(mappingFile, true);

            Func <string, string> classifier = localPath => { return(mapper.MapLocalPathToLogicalComponent(localPath)); };

            var classifiedCouplings = couplingAnalyzer.CalculateClassifiedChangeCouplings(_history, classifier);

            Csv.Write(Path.Combine(_outputPath, "classified_change_couplings.csv"), classifiedCouplings);

            return(classifiedCouplings);
        }
예제 #2
0
        public List <Coupling> AnalyzeChangeCoupling()
        {
            // Pair wise couplings
            var couplingAnalyzer = new ChangeCouplingAnalyzer();
            var couplings        = couplingAnalyzer.CalculateChangeCouplings(_history, _extendedDisplayFilter);
            var sortedCouplings  = couplings.OrderByDescending(coupling => coupling.Degree).ToList();

            Csv.Write(Path.Combine(_outputPath, "change_couplings.csv"), sortedCouplings);


            // TODO I removed this from the wiki
            // Same with classified folders (show this one if available)
            var mappingFile = Path.Combine(_outputPath, "logical_components.xml");

            if (File.Exists(mappingFile))
            {
                return(AnalyzeLogicalComponentChangeCoupling(mappingFile));
            }

            return(sortedCouplings);
        }
예제 #3
0
        public List <Coupling> AnalyzeChangeCoupling()
        {
            LoadHistory();

            // Pair wise couplings
            var couplingAnalyzer = new ChangeCouplingAnalyzer();
            var couplings        = couplingAnalyzer.CalculateChangeCouplings(_history, Project.Filter);
            var sortedCouplings  = couplings.OrderByDescending(coupling => coupling.Degree).ToList();

            Csv.Write(Path.Combine(Project.Cache, "change_couplings.csv"), sortedCouplings);

            // Same with classified folders (show this one if available)
            var mappingFile = Path.Combine(Project.Cache, "logical_components.xml");

            if (File.Exists(mappingFile))
            {
                return(AnalyzeLogicalComponentChangeCoupling(mappingFile));
            }

            return(sortedCouplings);
        }