public void visitCode(Code obj) { try { Method m = getMethod(); if ((!m.isPublic() && !m.isProtected()) || m.isAbstract() || m.isSynthetic()) { return; if (sameAccess(getMethod().getAccessFlags(), superCode.getAccess()) && codeEquals(obj, superCode.getCode())) { bugReporter.reportBug(new BugInstance(this, BugType.COM_COPIED_OVERRIDDEN_METHOD.name(), NORMAL_PRIORITY).addClass(this).addMethod(this) .addSourceLine(classContext, this, getPC())); if ((getMethod().getAccessFlags() & Const.ACC_SYNCHRONIZED) != (superCode.getAccess() & Const.ACC_SYNCHRONIZED)) { return; parmTypes = getMethod().getArgumentTypes(); nextParmIndex = 0; nextParmOffset = getMethod().isStatic() ? 0 : 1; sawAload0 = nextParmOffset == 0; sawParentCall = false;
public void visitCode(Code obj) { try { Method m = getMethod(); if ((!m.isPublic() && !m.isProtected()) || m.isAbstract() || m.isSynthetic()) { return; if (sameAccess(getMethod().getAccessFlags(), superCode.getAccess()) && codeEquals(obj, superCode.getCode())) { bugReporter.reportBug(new BugInstance(this, BugType.COM_COPIED_OVERRIDDEN_METHOD.name(), NORMAL_PRIORITY).addClass(this).addMethod(this) .addSourceLine(classContext, this, getPC())); if ((getMethod().getAccessFlags() & ACC_SYNCHRONIZED) != (superCode.getAccess() & ACC_SYNCHRONIZED)) { return; parmTypes = getMethod().getArgumentTypes(); nextParmIndex = 0; nextParmOffset = getMethod().isStatic() ? 0 : 1; sawAload0 = nextParmOffset == 0; sawParentCall = false;
if ((seen == Const.INVOKESPECIAL) && getNameConstantOperand().equals(getMethod().getName()) && getSigConstantOperand().equals(getMethod().getSignature())) { sawParentCall = true; } else { int expectedInstruction = getExpectedReturnInstruction(getMethod().getReturnType()); if ((seen == expectedInstruction) && (getNextPC() == getCode().getCode().length)) { bugReporter.reportBug(
if ((seen == INVOKESPECIAL) && getNameConstantOperand().equals(getMethod().getName()) && getSigConstantOperand().equals(getMethod().getSignature())) { sawParentCall = true; } else { int expectedInstruction = getExpectedReturnInstruction(getMethod().getReturnType()); if ((seen == expectedInstruction) && (getNextPC() == getCode().getCode().length)) { bugReporter.reportBug(