public CodeFile(string path, string code, CodeDir directParent) { Path = path; Code = code; method0(Code); DirectParent = directParent; }
private void method_2(CodeDir codeDir_0) { foreach (CodeDir codeDir in codeDir_0.Directories) { CodeDir codeDir; this.method_2(codeDir); } IEnumerable <CodeDir> arg_59_0 = codeDir_0.Directories; if (Analysis.func_0 == null) { Analysis.func_0 = new Func <CodeDir, bool>(Analysis.smethod_5); } CodeDir[] array = arg_59_0.Where(Analysis.func_0).ToArray <CodeDir>(); for (int i = 0; i < array.Length; i++) { CodeDir codeDir = array[i]; codeDir_0.Directories.Remove(codeDir); codeDir_0.ItemCollection.Remove(codeDir); } IEnumerable <CodeFile> arg_BB_0 = codeDir_0.Files; if (Analysis.func_1 == null) { Analysis.func_1 = new Func <CodeFile, bool>(Analysis.smethod_6); } CodeFile[] array2 = arg_BB_0.Where(Analysis.func_1).ToArray <CodeFile>(); for (int i = 0; i < array2.Length; i++) { CodeFile item = array2[i]; codeDir_0.Files.Remove(item); codeDir_0.ItemCollection.Remove(item); } }
public CodeFile(string path, string code, CodeDir directParent) { this.string_0 = path; this.string_2 = code; this.method_0(this.Code); this.codeDir_0 = directParent; }
public WheelView(IList <CodeFile> files, CodeDir rootDir) { InitializeComponent(); _style0 = (Style)base.FindResource("FilePieceStyle"); _style1 = (Style)base.FindResource("DirPieceStyle"); _wheelViewModel = new WheelViewModel(files); base.DataContext = _wheelViewModel; _codeDir = rootDir; base.Loaded += WheelView_Loaded; }
public WheelView(IList <CodeFile> files, CodeDir rootDir) { this.InitializeComponent(); this.style_0 = (Style)base.FindResource("FilePieceStyle"); this.style_1 = (Style)base.FindResource("DirPieceStyle"); this.wheelViewModel_0 = new WheelViewModel(files); base.DataContext = this.wheelViewModel_0; this.codeDir_0 = rootDir; base.Loaded += new RoutedEventHandler(this.WheelView_Loaded); }
private void method2(CodeDir codeDir) { foreach (CodeDir dir in codeDir.Directories) { method2(dir); } IEnumerable <CodeDir> directories = codeDir.Directories; if (Analysis.func0 == null) { Analysis.func0 = new Func <CodeDir, bool>(Analysis.smethod5); } CodeDir[] array = directories.Where(Analysis.func0).ToArray <CodeDir>(); for (int i = 0; i < array.Length; i++) { CodeDir dir = array[i]; codeDir.Directories.Remove(dir); codeDir.ItemCollection.Remove(dir); } IEnumerable <CodeFile> files = codeDir.Files; if (Analysis.func1 == null) { Analysis.func1 = new Func <CodeFile, bool>(Analysis.smethod6); } CodeFile[] array2 = files.Where(Analysis.func1).ToArray <CodeFile>(); for (int i = 0; i < array2.Length; i++) { CodeFile file = array2[i]; codeDir.Files.Remove(file); codeDir.ItemCollection.Remove(file); } }
private void method2(CodeDir codeDir) { foreach (CodeDir dir in codeDir.Directories) { method2(dir); } IEnumerable<CodeDir> directories = codeDir.Directories; if (Analysis.func0 == null) { Analysis.func0 = new Func<CodeDir, bool>(Analysis.smethod5); } CodeDir[] array = directories.Where(Analysis.func0).ToArray<CodeDir>(); for (int i = 0; i < array.Length; i++) { CodeDir dir = array[i]; codeDir.Directories.Remove(dir); codeDir.ItemCollection.Remove(dir); } IEnumerable<CodeFile> files = codeDir.Files; if (Analysis.func1 == null) { Analysis.func1 = new Func<CodeFile, bool>(Analysis.smethod6); } CodeFile[] array2 = files.Where(Analysis.func1).ToArray<CodeFile>(); for (int i = 0; i < array2.Length; i++) { CodeFile file = array2[i]; codeDir.Files.Remove(file); codeDir.ItemCollection.Remove(file); } }
private static bool smethod_5(CodeDir codeDir_0) { return(codeDir_0.GetAllFilesCount() == 0); }
public CodeFile(string path, string code, CodeDir directParent) { this.string_0 = path; this.string_2 = code; this.method_0(this.Code); this.codeDir_0 = directParent; }
private static bool smethod5(CodeDir codeDir) { return codeDir.GetAllFilesCount() == 0; }
public CodeFile(string path, string code, CodeDir directParent) { Path = path; Code = code; method0(Code); DirectParent = directParent; }
private CodeDir method4(DirectoryInfo directoryInfo, int int2, string string1) { CodeDir codeDir = new CodeDir { Path = directoryInfo.FullName, Name = directoryInfo.Name }; string1 = string1 + "\\" + directoryInfo.Name; DirectoryInfo[] directories = directoryInfo.GetDirectories(); for (int i = 0; i < directories.Length; i++) { DirectoryInfo directoryInfo_ = directories[i]; CodeDir codeDir2 = method4(directoryInfo_, int2, string1); if (codeDir2 != null) { codeDir2.DirectParent = codeDir; codeDir.Directories.Add(codeDir2); codeDir.ItemCollection.Add(codeDir2); } } List<Regex> excludeRegexes = Options.GetExcludeRegexes(); FileInfo[] files = directoryInfo.GetFiles(Options.FileSearchPattern, SearchOption.TopDirectoryOnly); for (int i = 0; i < files.Length; i++) { FileInfo fileInfo = files[i]; bool flag = false; for (int j = 0; j < excludeRegexes.Count; j++) { if (excludeRegexes[j].IsMatch(fileInfo.FullName)) { flag = true; } } if (!flag) { IncrementProgressValue(); string code = null; using (StreamReader streamReader = new StreamReader(fileInfo.FullName)) { code = streamReader.ReadToEnd(); } CodeFile codeFile = new CodeFile(fileInfo.FullName, code, codeDir); codeFile.ShortPath = string1; Files.Add(codeFile); codeDir.Files.Add(codeFile); codeDir.ItemCollection.Add(codeFile); } } CodeDir result; if (codeDir.GetAllFilesCount() == 0) { result = null; } else { result = codeDir; } return result; }
public WheelView(IList<CodeFile> files, CodeDir rootDir) { this.InitializeComponent(); this.style_0 = (Style)base.FindResource("FilePieceStyle"); this.style_1 = (Style)base.FindResource("DirPieceStyle"); this.wheelViewModel_0 = new WheelViewModel(files); base.DataContext = this.wheelViewModel_0; this.codeDir_0 = rootDir; base.Loaded += new RoutedEventHandler(this.WheelView_Loaded); }
private void method_2(CodeDir codeDir_0) { foreach (CodeDir codeDir in codeDir_0.Directories) { CodeDir codeDir; this.method_2(codeDir); } IEnumerable<CodeDir> arg_59_0 = codeDir_0.Directories; if (Analysis.func_0 == null) { Analysis.func_0 = new Func<CodeDir, bool>(Analysis.smethod_5); } CodeDir[] array = arg_59_0.Where(Analysis.func_0).ToArray<CodeDir>(); for (int i = 0; i < array.Length; i++) { CodeDir codeDir = array[i]; codeDir_0.Directories.Remove(codeDir); codeDir_0.ItemCollection.Remove(codeDir); } IEnumerable<CodeFile> arg_BB_0 = codeDir_0.Files; if (Analysis.func_1 == null) { Analysis.func_1 = new Func<CodeFile, bool>(Analysis.smethod_6); } CodeFile[] array2 = arg_BB_0.Where(Analysis.func_1).ToArray<CodeFile>(); for (int i = 0; i < array2.Length; i++) { CodeFile item = array2[i]; codeDir_0.Files.Remove(item); codeDir_0.ItemCollection.Remove(item); } }
public WheelView(IList<CodeFile> files, CodeDir rootDir) { InitializeComponent(); _style0 = (Style)base.FindResource("FilePieceStyle"); _style1 = (Style)base.FindResource("DirPieceStyle"); _wheelViewModel = new WheelViewModel(files); base.DataContext = _wheelViewModel; _codeDir = rootDir; base.Loaded += WheelView_Loaded; }
private void method_10() { try { DirectoryInfo directoryInfo = new DirectoryInfo(this.string_0); int minSimilarityLineLength = this.options_0.MinSimilarityLineLength; FileInfo[] files = directoryInfo.GetFiles(this.options_0.FileSearchPattern, SearchOption.AllDirectories); int num = 0; List <Regex> excludeRegexes = this.options_0.GetExcludeRegexes(); FileInfo[] array = files; int i = 0; IL_98: while (i < array.Length) { FileInfo fileInfo = array[i]; bool flag = false; for (int j = 0; j < excludeRegexes.Count; j++) { if (excludeRegexes[j].IsMatch(fileInfo.FullName)) { flag = true; IL_87: if (!flag) { num++; } i++; goto IL_98; } } goto IL_87; } if (num == 0) { this.AlertAction("No " + this.options_0.FileSearchPattern + " Files Found"); this.Done(); } else { this.UpdateProgressAction(0, num, "Loading Files..."); CodeDir codeDir = this.method_4(directoryInfo, this.options_0.MinSimilarityLineLength, ""); this.observableCollection_0.Add(codeDir); ObservableCollection <CodeFile> observableCollection = this.observableCollection_1; this.UpdateProgressAction(0, observableCollection.Count * observableCollection.Count / 2, "Comparing Files..."); int num2 = 0; StringBuilder stringBuilder = new StringBuilder(); for (int j = 0; j < observableCollection.Count; j++) { CodeFile codeFile = observableCollection[j]; for (int k = j; k < observableCollection.Count; k++) { num2++; if (num2 % 500 == 0) { this.UpdateProgressValue(num2); } try { CodeFile codeFile_ = observableCollection[k]; AllSequences allSequences = Analysis.smethod_1(codeFile, codeFile_, minSimilarityLineLength); foreach (Sequence current in allSequences.Sequences) { Analysis.smethod_4(codeFile, codeFile_, current); } goto IL_24D; } catch (Exception ex) { stringBuilder.AppendLine(codeFile.Name + " - " + observableCollection[k].Name); goto IL_24D; } break; IL_24D :; } codeFile.method_1(); codeFile.Similarities.Sort(new Comparison <Similarity>(Analysis.smethod_0)); } this.method_2(codeDir); this.method_3(); this.method_7(); if (stringBuilder.Length > 0) { this.AlertAction("Atomiq experienced an error with the following file combinations: " + stringBuilder.ToString()); } this.bool_0 = true; this.Done(); } } catch (Exception ex) { if (!(ex is ThreadAbortException)) { this.CaughtException = ex; } this.Done(); } }
private CodeDir method_4(DirectoryInfo directoryInfo_0, int int_2, string string_1) { CodeDir codeDir = new CodeDir { Path = directoryInfo_0.FullName, Name = directoryInfo_0.Name }; string_1 = string_1 + "\\" + directoryInfo_0.Name; DirectoryInfo[] directories = directoryInfo_0.GetDirectories(); for (int i = 0; i < directories.Length; i++) { DirectoryInfo directoryInfo_ = directories[i]; CodeDir codeDir2 = this.method_4(directoryInfo_, int_2, string_1); if (codeDir2 != null) { codeDir2.DirectParent = codeDir; codeDir.Directories.Add(codeDir2); codeDir.ItemCollection.Add(codeDir2); } } List <Regex> excludeRegexes = this.options_0.GetExcludeRegexes(); FileInfo[] files = directoryInfo_0.GetFiles(this.options_0.FileSearchPattern, SearchOption.TopDirectoryOnly); for (int i = 0; i < files.Length; i++) { FileInfo fileInfo = files[i]; bool flag = false; for (int j = 0; j < excludeRegexes.Count; j++) { if (excludeRegexes[j].IsMatch(fileInfo.FullName)) { flag = true; } } if (!flag) { this.IncrementProgressValue(); string code = null; using (StreamReader streamReader = new StreamReader(fileInfo.FullName)) { code = streamReader.ReadToEnd(); } CodeFile codeFile = new CodeFile(fileInfo.FullName, code, codeDir); codeFile.ShortPath = string_1; this.observableCollection_1.Add(codeFile); codeDir.Files.Add(codeFile); codeDir.ItemCollection.Add(codeFile); } } CodeDir result; if (codeDir.GetAllFilesCount() == 0) { result = null; } else { result = codeDir; } return(result); }