public MethodDuplicatesMatchProvider(PsiMethod method, List<Match> duplicates) {
myMethod = method;
myDuplicates = duplicates;
}
public void processMatch(Match match) throws IncorrectOperationException {
<BUG>if (RefactoringUtil.isInStaticContext(match.getMatchStart(), myMethod.getContainingClass())) {
myMethod.getModifierList().setModifierProperty(PsiModifier.STATIC, true);</BUG>
}
final PsiElementFactory factory = myMethod.getManager().getElementFactory();
<BUG>final boolean needQualifier = match.getInstanceExpression() != null;
final @NonNls String text = needQualifier ? "q." + myMethod.getName() + "()": myMethod.getName() + "()";
</BUG>
PsiMethodCallExpression methodCallExpression = (PsiMethodCallExpression)factory.createExpressionFromText(text, null);

public MethodDuplicatesMatchProvider(PsiMethod method, List<Match> duplicates) {
myMethod = method;
myDuplicates = duplicates;
}
public void processMatch(Match match) throws IncorrectOperationException {
final PsiClass containingClass = myMethod.getContainingClass();
if (isEssentialStaticContextAbsent(match)) {
myMethod.getModifierList().setModifierProperty(PsiModifier.STATIC, true);
}
final PsiElementFactory factory = myMethod.getManager().getElementFactory();
final boolean needQualifier = match.getInstanceExpression() != null;
final boolean needStaticQualifier = isExternal(match);
final @NonNls String text = needQualifier || needStaticQualifier ? "q." + myMethod.getName() + "()": myMethod.getName() + "()";
PsiMethodCallExpression methodCallExpression = (PsiMethodCallExpression)factory.createExpressionFromText(text, null);
