private static boolean compare(TestCaseResult exp,List<TestCaseResult> actList,String tool){
  if (actList == null || actList.isEmpty()) {
    return !exp.isReal();
  }
  for (  TestCaseResult act : actList) {
    int actualCWE=act.getCWE();
    int expectedCWE=exp.getCWE();
    boolean match=actualCWE == expectedCWE;
    if (!match && (expectedCWE == 564)) {
      match=(actualCWE == 89);
    }
    if (tool.startsWith("AppScan") || tool.startsWith("Vera")) {
      if (expectedCWE == 328 && actualCWE == 327) {
        match=true;
      }
    }
    if (match) {
      return exp.isReal();
    }
  }
  return !exp.isReal();
}

private static boolean compare ( TestCaseResult exp , List < TestCaseResult > actList , String tool ) { if ( actList == null || actList . isEmpty ( ) ) { return ! exp . isReal ( ) ; } for ( TestCaseResult act : actList ) { int actualCWE = act . getCWE ( ) ; int expectedCWE = exp . getCWE ( ) ; boolean match = actualCWE == expectedCWE ; if ( ! match && ( expectedCWE == 564 ) ) { match = ( actualCWE == 89 ) ; } if ( tool . startsWith ( "AppScan" ) || tool . startsWith ( "Vera" ) ) { if ( expectedCWE == 328 && actualCWE == 327 ) { match = true ; } } if ( match ) { return exp . isReal ( ) ; } } return ! exp . isReal ( ) ; }
check all actual results . if a real vulnerability matches , then exit . otherwise keep going .
