public RelativeEditLocation Analyze(ISST sst) { foreach (var md in sst.Methods) { var res = new RelativeEditLocation(); foreach (var stmt in md.Body) { stmt.Accept(_visitor, res); } if (res.HasEditLocation) { return(res); } } return(new RelativeEditLocation()); }
private void SortIn(RelativeEditLocation loc) { switch (loc.Size) { case 2: _histogram2.Add(loc.Location); break; case 3: _histogram3.Add(loc.Location); break; case 4: _histogram4.Add(loc.Location); break; case 5: _histogram5.Add(loc.Location); break; case 6: _histogram6.Add(loc.Location); break; case 7: _histogram7.Add(loc.Location); break; case 8: _histogram8.Add(loc.Location); break; case 9: _histogram9.Add(loc.Location); break; default: _histogram10P.AddRatio(loc.Location, loc.Size); break; } }
private bool Equals(RelativeEditLocation other) { return(Size == other.Size && Location == other.Location); }