{"record":{"id":"0253876a71c38637","repo":"apache/hadoop","slug":"not-is-undefined-for","errorCode":null,"errorMessage":"not() is undefined for {}","messagePattern":"not\\(\\) is undefined for (.+?)","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/bloom/CountingBloomFilter.java","lineNumber":242,"sourceCode":"    for (int i = 0; i < nbHash; i++) {\n      // find the bucket\n      int wordNum = h[i] >> 4;          // div 16\n      int bucketShift = (h[i] & 0x0f) << 2;  // (mod 16) * 4\n      \n      long bucketMask = 15L << bucketShift;\n      long bucketValue = (buckets[wordNum] & bucketMask) >>> bucketShift;\n      if (bucketValue < res) res = (int)bucketValue;\n    }\n    if (res != Integer.MAX_VALUE) {\n      return res;\n    } else {\n      return 0;\n    }\n  }\n\n  @Override\n  public void not() {\n    throw new UnsupportedOperationException(\"not() is undefined for \"\n        + this.getClass().getName());\n  }\n\n  @Override\n  public void or(Filter filter) {\n    if(filter == null\n        || !(filter instanceof CountingBloomFilter)\n        || filter.vectorSize != this.vectorSize\n        || filter.nbHash != this.nbHash) {\n      throw new IllegalArgumentException(\"filters cannot be or-ed\");\n    }\n\n    CountingBloomFilter cbf = (CountingBloomFilter)filter;\n\n    int sizeInWords = buckets2words(vectorSize);\n    for(int i = 0; i < sizeInWords; i++) {\n      this.buckets[i] |= cbf.buckets[i];\n    }","sourceCodeStart":224,"sourceCodeEnd":260,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/bloom/CountingBloomFilter.java#L224-L260","documentation":"Error \"not() is undefined for {}\" thrown in apache/hadoop.","triggerScenarios":"Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/bloom/CountingBloomFilter.java:242 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["not() is only defined for CountingBloomFilter itself; it cannot be applied to {}. Do not call not() on this filter type."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}