@Override public void sawOpcode(int seen) { if (seen == Const.INVOKEVIRTUAL) { String methodName = getNameConstantOperand(); if (Values.HASHCODE.equals(methodName) && SignatureBuilder.SIG_VOID_TO_INT.equals(getSigConstantOperand()) && (stack.getStackDepth() > 0)) { String calledClass = stack.getStackItem(0).getSignature(); if (LANG3_HASH_CODE_BUILDER.equals(calledClass) || LANG_HASH_CODE_BUILDER.equals(calledClass)) { bugReporter.reportBug(new BugInstance(this, "CHTH_COMMONS_HASHCODE_BUILDER_TOHASHCODE", HIGH_PRIORITY).addClass(this).addMethod(this) .addSourceLine(this)); } } } super.sawOpcode(seen); stack.sawOpcode(this, seen); } }
@Override public void sawOpcode(int seen) { if (seen == INVOKEVIRTUAL) { String methodName = getNameConstantOperand(); if (Values.HASHCODE.equals(methodName) && SignatureBuilder.SIG_VOID_TO_INT.equals(getSigConstantOperand()) && (stack.getStackDepth() > 0)) { String calledClass = stack.getStackItem(0).getSignature(); if (LANG3_HASH_CODE_BUILDER.equals(calledClass) || LANG_HASH_CODE_BUILDER.equals(calledClass)) { bugReporter.reportBug(new BugInstance(this, "CHTH_COMMONS_HASHCODE_BUILDER_TOHASHCODE", HIGH_PRIORITY).addClass(this).addMethod(this) .addSourceLine(this)); } } } super.sawOpcode(seen); stack.sawOpcode(this, seen); } }
@Override public void sawOpcode(int seen) { try { if (seen == INVOKEVIRTUAL) { String methodName = getNameConstantOperand(); if ("equals".equals(methodName) && SignatureBuilder.SIG_OBJECT_TO_BOOLEAN.equals(getSigConstantOperand()) && (stack.getStackDepth() > 1)) { String calledClass = stack.getStackItem(1).getSignature(); if (LANG3_EQUALS_BUILDER.equals(calledClass) || LANG_EQUALS_BUILDER.equals(calledClass)) { bugReporter.reportBug(new BugInstance(this, BugType.CEBE_COMMONS_EQUALS_BUILDER_ISEQUALS.name(), HIGH_PRIORITY).addClass(this) .addMethod(this).addSourceLine(this)); } } } } finally { super.sawOpcode(seen); stack.sawOpcode(this, seen); } } }
@Override public void sawOpcode(int seen) { try { if (seen == Const.INVOKEVIRTUAL) { String methodName = getNameConstantOperand(); if ("equals".equals(methodName) && SignatureBuilder.SIG_OBJECT_TO_BOOLEAN.equals(getSigConstantOperand()) && (stack.getStackDepth() > 1)) { String calledClass = stack.getStackItem(1).getSignature(); if (LANG3_EQUALS_BUILDER.equals(calledClass) || LANG_EQUALS_BUILDER.equals(calledClass)) { bugReporter.reportBug(new BugInstance(this, BugType.CEBE_COMMONS_EQUALS_BUILDER_ISEQUALS.name(), HIGH_PRIORITY).addClass(this) .addMethod(this).addSourceLine(this)); } } } } finally { super.sawOpcode(seen); stack.sawOpcode(this, seen); } } }
super.sawOpcode(seen); } finally { stack.sawOpcode(this, seen);
super.sawOpcode(seen); } finally { stack.sawOpcode(this, seen);