private List<FileMatch> filterSourceMatchesThatAreTargetMatches(List<FileMatch> sourceMatchCandidates,List<FileMatch> targetMatchCandidates){
  List<FileMatch> filteredSourceMatchCandidates=new ArrayList<>();
  List<Path> targetPaths=getPaths(targetMatchCandidates);
  for (  FileMatch sourceMatchCandidate : sourceMatchCandidates) {
    if (!targetPaths.contains(sourceMatchCandidate.getPath())) {
      filteredSourceMatchCandidates.add(sourceMatchCandidate);
    }
  }
  return filteredSourceMatchCandidates;
}

private List < FileMatch > filterSourceMatchesThatAreTargetMatches ( List < FileMatch > sourceMatchCandidates , List < FileMatch > targetMatchCandidates ) { List < FileMatch > filteredSourceMatchCandidates = new ArrayList < > ( ) ; List < Path > targetPaths = getPaths ( targetMatchCandidates ) ; for ( FileMatch sourceMatchCandidate : sourceMatchCandidates ) { if ( ! targetPaths . contains ( sourceMatchCandidate . getPath ( ) ) ) { filteredSourceMatchCandidates . add ( sourceMatchCandidate ) ; } } return filteredSourceMatchCandidates ; }
removes from source matches entries that are also a target match . in some cases regex can match both as a source and a target ( eg . file . fr . resx will be returned as source with basename : file . fr and target with basename : file ) so in that case the file is consider to be a target file and not a source file .
