public void Check() { List <List <SimilarityCheckerItem> > CodeGroups = GroupByCode(new List <SimilarityCheckerItem>(ItemsDictionary.Values)); List <List <SimilarityCheckerItem> > StrictLengthGroups = new List <List <SimilarityCheckerItem> >(); List <List <SimilarityCheckerItem> > RelaxedLengthGroups = new List <List <SimilarityCheckerItem> >(); foreach (List <SimilarityCheckerItem> Group in CodeGroups) { StrictLengthGroups.AddRange(StrictGroupByLength(Group)); RelaxedLengthGroups.AddRange(RelaxedGroupByLength(Group)); } List <List <SimilarityCheckerItem> > StrictContentGroups = new List <List <SimilarityCheckerItem> >(); List <List <SimilarityCheckerItem> > RelaxedContentGroups = new List <List <SimilarityCheckerItem> >(); foreach (List <SimilarityCheckerItem> Group in StrictLengthGroups) { StrictContentGroups.AddRange(StrictGroupByContent(Group)); } foreach (List <SimilarityCheckerItem> Group in RelaxedLengthGroups) { RelaxedContentGroups.AddRange(RelaxedGroupByContent(Group)); } StrictGroups.Clear(); foreach (List <SimilarityCheckerItem> sig in StrictContentGroups) { SimilarityCheckerGroup SCG = new SimilarityCheckerGroup(); foreach (SimilarityCheckerItem sci in sig) { SCG.AddItem(sci); } StrictGroups.Add(SCG); } RelaxedGroups.Clear(); foreach (List <SimilarityCheckerItem> rig in RelaxedContentGroups) { SimilarityCheckerGroup RCG = new SimilarityCheckerGroup(); foreach (SimilarityCheckerItem rci in rig) { RCG.AddItem(rci); } RelaxedGroups.Add(RCG); } }
public void Check() { List<List<SimilarityCheckerItem>> CodeGroups = GroupByCode(new List<SimilarityCheckerItem>(ItemsDictionary.Values)); List<List<SimilarityCheckerItem>> StrictLengthGroups = new List<List<SimilarityCheckerItem>>(); List<List<SimilarityCheckerItem>> RelaxedLengthGroups = new List<List<SimilarityCheckerItem>>(); foreach (List<SimilarityCheckerItem> Group in CodeGroups) { StrictLengthGroups.AddRange(StrictGroupByLength(Group)); RelaxedLengthGroups.AddRange(RelaxedGroupByLength(Group)); } List<List<SimilarityCheckerItem>> StrictContentGroups = new List<List<SimilarityCheckerItem>>(); List<List<SimilarityCheckerItem>> RelaxedContentGroups = new List<List<SimilarityCheckerItem>>(); foreach (List<SimilarityCheckerItem> Group in StrictLengthGroups) { StrictContentGroups.AddRange(StrictGroupByContent(Group)); } foreach (List<SimilarityCheckerItem> Group in RelaxedLengthGroups) { RelaxedContentGroups.AddRange(RelaxedGroupByContent(Group)); } StrictGroups.Clear(); foreach (List<SimilarityCheckerItem> sig in StrictContentGroups) { SimilarityCheckerGroup SCG = new SimilarityCheckerGroup(); foreach (SimilarityCheckerItem sci in sig) { SCG.AddItem(sci); } StrictGroups.Add(SCG); } RelaxedGroups.Clear(); foreach (List<SimilarityCheckerItem> rig in RelaxedContentGroups) { SimilarityCheckerGroup RCG = new SimilarityCheckerGroup(); foreach (SimilarityCheckerItem rci in rig) { RCG.AddItem(rci); } RelaxedGroups.Add(RCG); } }