package com.intellij.psi.filters.element;
import com.intellij.psi.*;
<BUG>import com.intellij.psi.filters.ElementFilter;
public class ExcludeSillyAssignment implements ElementFilter {
@Override
public boolean isAcceptable(Object element, PsiElement context) {
if(!(element instanceof PsiElement)) return true;
PsiElement each = context;
</BUG>
while (each != null && !(each instanceof PsiFile)) {

package com.intellij.psi.filters.element;
import com.intellij.psi.*;
import com.intellij.psi.filters.ElementFilter;
import org.jetbrains.annotations.Nullable;
public class ExcludeSillyAssignment implements ElementFilter {
@Nullable
public static PsiReferenceExpression getAssignedReference(PsiElement position) {
PsiElement each = position;
while (each != null && !(each instanceof PsiFile)) {
