if (occurrences.length == 0) return true;
<BUG>GrMethod method = GrIntroduceFieldHandler.getContainingMethod(occurrences[0], clazz);
</BUG>
if (method == null) return false;
for (int i = 1; i < occurrences.length; i++) {
<BUG>GrMethod other = GrIntroduceFieldHandler.getContainingMethod(occurrences[i], clazz);
</BUG>
if (other != method) return false;
}
return true;

if (occurrences.length == 0) return true;
GrMethod method = GrIntroduceFieldHandler.getContainingMethod(occurrences[0], scope);
if (method == null) return false;
for (int i = 1; i < occurrences.length; i++) {
GrMethod other = GrIntroduceFieldHandler.getContainingMethod(occurrences[i], scope);
if (other != method) return false;
}
return true;
