case Const.INVOKESPECIAL: case Const.INVOKESTATIC: hq.pushHash(getClassConstantOperand()); if (getNameConstantOperand().indexOf('$') == -1) { hq.pushHash(getNameConstantOperand()); hq.pushHash(getSigConstantOperand()); priority = hq.getPriority(); if (priority <= Priorities.LOW_PRIORITY) { accumulator.accumulateBug(new BugInstance(this, "NOISE_METHOD_CALL", priority).addClassAndMethod(this) case Const.GETSTATIC: case Const.PUTSTATIC: hq.pushHash(getClassConstantOperand()); if (getNameConstantOperand().indexOf('$') == -1) { hq.pushHash(getNameConstantOperand()); hq.pushHash(getSigConstantOperand()); priority = hq.getPriority(); if (priority <= Priorities.LOW_PRIORITY) { accumulator.accumulateBug(new BugInstance(this, "NOISE_FIELD_REFERENCE", priority).addClassAndMethod(this) case Const.INSTANCEOF: case Const.NEW: hq.pushHash(getClassConstantOperand()); break; case Const.IFEQ:
case INVOKESPECIAL: case INVOKESTATIC: hq.pushHash(getClassConstantOperand()); if (getNameConstantOperand().indexOf('$') == -1) { hq.pushHash(getNameConstantOperand()); hq.pushHash(getSigConstantOperand()); priority = hq.getPriority(); if (priority <= Priorities.LOW_PRIORITY) { accumulator.accumulateBug(new BugInstance(this, "NOISE_METHOD_CALL", priority).addClassAndMethod(this) case GETSTATIC: case PUTSTATIC: hq.pushHash(getClassConstantOperand()); if (getNameConstantOperand().indexOf('$') == -1) { hq.pushHash(getNameConstantOperand()); hq.pushHash(getSigConstantOperand()); priority = hq.getPriority(); if (priority <= Priorities.LOW_PRIORITY) { accumulator.accumulateBug(new BugInstance(this, "NOISE_FIELD_REFERENCE", priority).addClassAndMethod(this) case INSTANCEOF: case NEW: hq.pushHash(getClassConstantOperand()); break; case IFEQ:
public int getPriority() { int hash = getHash(); if ((hash & 0x1ff0) == 0) { hash = hash & 0xf; if (hash < 1) { return Priorities.HIGH_PRIORITY; } else if (hash < 1 + 2) { return Priorities.NORMAL_PRIORITY; } else if (hash < 1 + 2 + 4) { return Priorities.LOW_PRIORITY; } else { return Priorities.IGNORE_PRIORITY; } } else { return Priorities.IGNORE_PRIORITY + 1; } } }
public void pushHash(Object x) { push(x.hashCode()); }
@Override public void sawInt(int i) { hq.push(i); }
@Override public void sawClass() { hq.push(getClassConstantOperand()); }
@Override public void sawString(String s) { hq.pushHash(s); }
public void push(String s) { for (byte b : UTF8.getBytes(s)) { push(b); } }
public Noise(BugReporter bugReporter) throws NoSuchAlgorithmException { // this.bugReporter = bugReporter; this.accumulator = new BugAccumulator(bugReporter); hq = new HashQueue(24); }
public int getPriority() { int hash = getHash(); if ((hash & 0x1ff0) == 0) { hash = hash & 0xf; if (hash < 1) { return Priorities.HIGH_PRIORITY; } else if (hash < 1 + 2) { return Priorities.NORMAL_PRIORITY; } else if (hash < 1 + 2 + 4) { return Priorities.LOW_PRIORITY; } else { return Priorities.IGNORE_PRIORITY; } } else { return Priorities.IGNORE_PRIORITY + 1; } } }
@Override public void sawInt(int i) { hq.push(i); }
@Override public void sawString(String s) { hq.pushHash(s); }
public void pushHash(Object x) { push(x.hashCode()); }
public void push(String s) { for (byte b : UTF8.getBytes(s)) { push(b); } }
public Noise(BugReporter bugReporter) throws NoSuchAlgorithmException { // this.bugReporter = bugReporter; this.accumulator = new BugAccumulator(bugReporter); hq = new HashQueue(24); }
@Override public void sawClass() { hq.push(getClassConstantOperand()); }