private static void RunSSTTransformationComparison(string oldContexts, string newContexts)
        {
            var oldIo = new PreprocessingIo(oldContexts, DirTmp, DirTmp);
            var newIo = new PreprocessingIo(newContexts, DirTmp, DirTmp);

            new SSTTransformationComparison(oldIo, newIo).Run();
        }
        public void Run()
        {
            var io      = new PreprocessingIo(@"F:\Contexts\", @"F:\Tmp\", @"F:\Tmp\");
            var zips    = io.FindRelativeZipPaths();
            var zipSlns = Sets.NewHashSetFrom(zips.Select(z => @"GH\" + z.Replace("-contexts.zip", "")));

            var jsonAll = File.ReadAllText(@"F:\R\index.json");
            var allSln  = jsonAll.ParseJsonTo <HashSet <string> >();

            var json           = File.ReadAllText(@"F:\R\ended-incl-fails.json");
            var endedInclFails = json.ParseJsonTo <HashSet <string> >();

            Console.WriteLine("== Found zips for the following {0} slns ==", zipSlns.Count);

            var sb = new StringBuilder();

            sb.Append("[");
            var first = true;

            foreach (var sln in allSln)
            {
                if (zipSlns.Contains(sln))
                {
                    if (!first)
                    {
                        sb.Append(',');
                    }
                    first = false;
                    sb.Append('"').Append(sln).Append('"');
                }
            }
            sb.Append("]");
            Console.WriteLine(sb.ToString());
        }
        private static void RunContextStatistics()
        {
            var io = new PreprocessingIo(DirContexts, DirTmp, DirTmp);
            var cf = new ContextFilter(GeneratedCode.Include, Duplication.Include);

            new ContextStatisticsRunner(io, cf, new ContextStatisticsLogger(), NumWorkers).Run();
        }
        public void BaseSetup()
        {
            RawDir    = MkDir("raw");
            MergedDir = MkDir("merged");
            FinalDir  = MkDir("final");

            Io = new PreprocessingIo(RawDir, MergedDir, FinalDir);
        }
Exemple #5
0
        public PreprocessingRunner(string dirIn, string dirTmp, string dirOut, int numWorkers = 1)
        {
            _numWorkers = numWorkers;
            Asserts.That(Directory.Exists(dirIn));
            Asserts.That(Directory.Exists(dirOut));

            Asserts.That(Directory.Exists(dirTmp));
            _dirLogs = dirTmp + @"Preprocessing-Logs\";
            var dirMerged = dirTmp + @"Preprocessing-Merged\";

            Asserts.Not(Directory.Exists(_dirLogs));
            Directory.CreateDirectory(_dirLogs);
            Asserts.Not(Directory.Exists(dirMerged));
            Directory.CreateDirectory(dirMerged);

            _loggers = new Dictionary <int, AppendingFileLogger>();


            _io = new PreprocessingIo(dirIn, dirMerged, dirOut);
        }
        private static void RunEditLocationAnalysis()
        {
            var io = new PreprocessingIo(DirEventsOut, DirTmp, DirTmp);

            new EditLocationAnalysisRunner(NumWorkers, io, new EditLocationAnalysisLogger()).Run();
        }
        private static void RunEmDebug()
        {
            var io = new PreprocessingIo(DirContexts, DirTmp, DirTmp);

            new EmDebug(io, new ContextStatisticsLogger(), NumWorkers).Run();
        }
        private static void RunInteractionStatistics()
        {
            var io = new PreprocessingIo(DirEventsOut, DirTmp, DirTmp);

            new InteractionStatisticsRunner(io, new InteractionStatisticsLogger(), NumWorkers).Run();
        }
        public void PathHasToExist_Final()
        {
            const string nonExisting = "C:\\does\\not\\exist\\";

            _sut = new PreprocessingIo(RawDir, MergedDir, nonExisting);
        }
        public void PathHasToExist_Raw()
        {
            const string nonExisting = "C:\\does\\not\\exist\\";

            _sut = new PreprocessingIo(nonExisting, MergedDir, FinalDir);
        }
 public void Setup()
 {
     _sut = new PreprocessingIo(RawDir, MergedDir, FinalDir);
 }