internal static PDG GeneratePDG(string traceFile, IEnumerable <string> rawMethods) { Console.WriteLine("Generating input PDG..."); HashSet <string> prunedMethods = new HashSet <string>(); foreach (string rawMethod in rawMethods) { prunedMethods.Add(rawMethod.Substring(0, rawMethod.IndexOf('('))); } return(PDG.Convert(JPDA.GenerateBiGrams(traceFile, prunedMethods))); }
public override void Compute() { string traceID = (string)Workspace.Load("TraceID"); TLArtifactsCollection artifacts = (TLArtifactsCollection)Workspace.Load("Artifacts"); BiGramCollection bigrams = JPDA.GenerateBiGrams(Path.Combine(_config.TraceDirectory, traceID), new HashSet <string>(artifacts.Keys)); PDG pdg = PDG.Convert(bigrams); ISet <string> unique = JPDA.GenerateUniqueMethods(Path.Combine(_config.TraceDirectory, traceID)); Workspace.Store("PDG", pdg); Workspace.Store("UniqueMethods", unique); }