public static List <IO2Finding> getFindingsWithSink(List <IO2Finding> findings, string regExToFind)
        {
            var results = new List <IO2Finding>();

            foreach (IO2Finding o2Finding in findings)
            {
                IO2Trace sink = OzasmtUtils.getKnownSink(o2Finding.o2Traces);
                if (sink != null && sink.signature != "" && RegEx.findStringInString(sink.signature, regExToFind))
                {
                    results.Add(o2Finding);
                }
            }
            return(results);
        }
Example #2
0
        public static List <IO2Finding> glueTraceSinkWithSources(IO2AssessmentLoad o2AssessmentLoad, String ozasmtWithSinks, String ozasmtWithSoures)
        {
            var results = new List <IO2Finding>();
            Dictionary <string, List <IO2Trace> > o2TracesWithSources = OzasmtUtils.getDictionaryWithO2AllSubTraces(o2AssessmentLoad, ozasmtWithSoures);

            foreach (IO2Finding o2FindingWithSink in new O2Assessment(o2AssessmentLoad, ozasmtWithSinks).o2Findings)
            {
                string sinkToFind = OzasmtUtils.getKnownSink(o2FindingWithSink.o2Traces).signature;
                if (o2TracesWithSources.ContainsKey(sinkToFind))
                {
                    foreach (IO2Trace o2TraceWithSourcre in o2TracesWithSources[sinkToFind])
                    {
                        results.Add(createCopyAndGlueTraceSinkWithSource(o2FindingWithSink, o2TraceWithSourcre));
                    }
                }
            }
            return(results);
        }
 public IO2Trace getSink()
 {
     return(OzasmtUtils.getKnownSink(o2Traces) ?? OzasmtUtils.getLostSink(o2Traces));
 }