for (Object element : elements) {
if (!(element instanceof PsiFile)) {
continue;
}
final VirtualFile file = ((PsiFile)element).getVirtualFile();
<BUG>if (file == null || fileIndex.isInSource(file)) {
continue;</BUG>
}
final String filePath = PathUtil.getFileName(file.getPath()).toLowerCase();
int i = filePath.indexOf(trinity.second.toLowerCase());

for (Object element : elements) {
if (!(element instanceof PsiFile)) {
continue;
}
final VirtualFile file = ((PsiFile)element).getVirtualFile();
if (file == null || fileIndex.isInSource(file) && !fileIndex.isUnderSourceRootOfType(file, JavaModuleSourceRootTypes.RESOURCES)) {
continue;
}
final String filePath = PathUtil.getFileName(file.getPath()).toLowerCase();
int i = filePath.indexOf(trinity.second.toLowerCase());
