PsiElement sibling = candidate;
ArrayList<PsiElement> candidates = new ArrayList<PsiElement>();
for (final PsiElement element : myPattern) {
if (sibling == null) return null;
if (!canBeEquivalent(element, sibling)) return null;
<BUG>candidates.add(sibling);
sibling = sibling.getNextSibling();
while (sibling instanceof PsiWhiteSpace) {
sibling = sibling.getNextSibling();
}</BUG>
}

PsiElement sibling = candidate;
ArrayList<PsiElement> candidates = new ArrayList<PsiElement>();
for (final PsiElement element : myPattern) {
if (sibling == null) return null;
if (!canBeEquivalent(element, sibling)) return null;
candidates.add(sibling);
sibling = PsiTreeUtil.skipSiblingsForward(sibling, PsiWhiteSpace.class, PsiComment.class);
}
