Returns a {@link ScannerSupplier} with the {@link BugChecker}s that are in the ENABLED lists.
347810
public static ScannerSupplier defaultChecks() {
    return allChecks()
        .filter(Predicates.or(Predicates.in(ENABLED_ERRORS), Predicates.in(ENABLED_WARNINGS)));
  }
864759
public <T extends Widget & Checkable> List<T> getCheckableChildren() {
        List<Widget> children = getChildren();
        ArrayList<T> result = new ArrayList<>();
        for (Widget c : children) {
            if (c instanceof Checkable) {
                result.add((T) c);
            }
        }
        return result;
    }
718209
public ClassInfoList getAllAnnotations() {
        if (closed.get()) {
            throw new IllegalArgumentException("Cannot use a ScanResult after it has been closed");
        }
        if (!scanSpec.enableClassInfo || !scanSpec.enableAnnotationInfo) {
            throw new IllegalArgumentException(
                    "Please call ClassGraph#enableClassInfo() and #enableAnnotationInfo() before #scan()");
        }
        return ClassInfo.getAllAnnotationClasses(classNameToClassInfo.values(), scanSpec);
    }
169802
public RbnfLenientScannerProvider getLenientScannerProvider() {
        // there's a potential race condition if two threads try to set/get the scanner at
        // the same time, but you get what you get, and you shouldn't be using this from
        // multiple threads anyway.
        if (scannerProvider == null && lenientParse && !lookedForScanner) {
            try {
                lookedForScanner = true;
                Class<?> cls = Class.forName("android.icu.impl.text.RbnfScannerProviderImpl");
                RbnfLenientScannerProvider provider = (RbnfLenientScannerProvider)cls.newInstance();
                setLenientScannerProvider(provider);
            }
            catch (Exception e) {
                // any failure, we just ignore and return null
            }
        }

        return scannerProvider;
    }
896978
public java.util.List<Patch> getPatches() {
        if (patches == null) {
            patches = new com.amazonaws.internal.SdkInternalList<Patch>();
        }
        return patches;
    }
1097754
private static final TreeScanner<Void, Void> createFindIdentifiersScanner(
      ImmutableSet.Builder<Symbol> builder, @Nullable Tree stoppingPoint) {
    return new TreeScanner<Void, Void>() {
      @Override
      public Void scan(Tree tree, Void unused) {
        return Objects.equals(stoppingPoint, tree) ? null : super.scan(tree, unused);
      }

      @Override
      public Void scan(Iterable<? extends Tree> iterable, Void unused) {
        if (stoppingPoint != null && iterable != null) {
          ImmutableList.Builder<Tree> builder = ImmutableList.builder();
          for (Tree t : iterable) {
            if (stoppingPoint.equals(t)) {
              break;
            }
            builder.add(t);
          }
          iterable = builder.build();
        }
        return super.scan(iterable, unused);
      }

      @Override
      public Void visitIdentifier(IdentifierTree identifierTree, Void unused) {
        Symbol symbol = ASTHelpers.getSymbol(identifierTree);
        if (symbol != null) {
          builder.add(symbol);
        }
        return null;
      }
    };
  }
510061
public @Nonnull BugPattern getBugPattern() {
        BugPattern result = DetectorFactoryCollection.instance().lookupBugPattern(getType());
        if (result != null) {
            return result;
        }
        AnalysisContext.logError("Unable to find description of bug pattern " + getType());
        result = DetectorFactoryCollection.instance().lookupBugPattern("UNKNOWN");
        if (result != null) {
            return result;
        }
        return BugPattern.REALLY_UNKNOWN;
    }
1255018
public PackageInfoList getPackageInfo() {
        if (closed.get()) {
            throw new IllegalArgumentException("Cannot use a ScanResult after it has been closed");
        }
        if (!scanSpec.enableClassInfo) {
            throw new IllegalArgumentException("Please call ClassGraph#enableClassInfo() before #scan()");
        }
        return new PackageInfoList(packageNameToPackageInfo.values());
    }
1161273
def _getbugs(self, idlist, permissive,
            include_fields=None, exclude_fields=None, extra_fields=None):
        
        oldidlist = idlist
        idlist = []
        for i in oldidlist:
            try:
                idlist.append(int(i))
            except ValueError:
                # String aliases can be passed as well
                idlist.append(i)

        extra_fields = self._listify(extra_fields or [])
        extra_fields += self._getbug_extra_fields

        getbugdata = {"ids": idlist}
        if permissive:
            getbugdata["permissive"] = 1

        getbugdata.update(self._process_include_fields(
            include_fields, exclude_fields, extra_fields))

        r = self._proxy.Bug.get(getbugdata)

        if self._check_version(4, 0):
            bugdict = dict([(b['id'], b) for b in r['bugs']])
        else:
            bugdict = dict([(b['id'], b['internals']) for b in r['bugs']])

        ret = []
        for i in idlist:
            found = None
            if i in bugdict:
                found = bugdict[i]
            else:
                # Need to map an alias
                for valdict in bugdict.values():
                    if i in self._listify(valdict.get("alias", None)):
                        found = valdict
                        break

            ret.append(found)

        return ret
23446
public java.util.List<Range> getProvisionedIops() {
        if (provisionedIops == null) {
            provisionedIops = new com.amazonaws.internal.SdkInternalList<Range>();
        }
        return provisionedIops;
    }
1262054
public static synchronized SortedMap<String, String> getContributedDetectors() {
        if (contributedDetectors != null) {
            return new TreeMap<>(contributedDetectors);
        }
        TreeMap<String, String> set = new TreeMap<>();

        IExtensionRegistry registry = Platform.getExtensionRegistry();
        for (IConfigurationElement configElt : registry.getConfigurationElementsFor(EXTENSION_POINT_ID)) {
            addContribution(set, configElt);
        }
        contributedDetectors = set;
        return new TreeMap<>(contributedDetectors);
    }
197650
def reqScannerSubscription(self, tickerId, subscription, scannerSubscriptionOptions):
        """"""
        return _swigibpy.EClient_reqScannerSubscription(self, tickerId, subscription, scannerSubscriptionOptions)
411475
@Override
    public <T extends Inspection> T getInspection() {
        return (T) payloads.values().iterator().next().getInspections().get(0);
    }
925026
@SuppressLint("MissingPermission") @RequiresPermission(allOf = {
      ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION, CHANGE_WIFI_STATE, ACCESS_WIFI_STATE
  }) public static Observable<List<ScanResult>> observeWifiAccessPoints(final Context context) {
    @SuppressLint("WifiManagerPotentialLeak") final WifiManager wifiManager =
        (WifiManager) context.getSystemService(Context.WIFI_SERVICE);

    if (wifiManager != null) {
      wifiManager.startScan(); // without starting scan, we may never receive any scan results
    } else {
      Log.w(LOG_TAG, "WifiManager was null, so WiFi scan was not started");
    }

    final IntentFilter filter = new IntentFilter();
    filter.addAction(WifiManager.RSSI_CHANGED_ACTION);
    filter.addAction(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION);

    return Observable.create(new ObservableOnSubscribe<List<ScanResult>>() {

      @Override public void subscribe(final ObservableEmitter<List<ScanResult>> emitter)
          throws Exception {
        final BroadcastReceiver receiver = createWifiScanResultsReceiver(emitter, wifiManager);

        if (wifiManager != null) {
          context.registerReceiver(receiver, filter);
        } else {
          emitter.onError(new RuntimeException(
              "WifiManager was null, so BroadcastReceiver for Wifi scan results "
                  + "cannot be registered"));
        }

        Disposable disposable = disposeInUiThread(new Action() {
          @Override public void run() {
            tryToUnregisterReceiver(context, receiver);
          }
        });

        emitter.setDisposable(disposable);
      }
    });
  }
1333908
static ClassInfoList getAllClasses(final Collection<ClassInfo> classes, final ScanSpec scanSpec) {
        return new ClassInfoList(
                ClassInfo.filterClassInfo(classes, scanSpec, /* strictWhitelist = */ true, ClassType.ALL),
                /* sortByName = */ true);
    }
1292618
public static <T> Supplier<T> uncheckedSupplier(SupplierWithException<T, ?> supplierWithException) {
		return () -> {
			T result = null;
			try {
				result = supplierWithException.get();
			} catch (Throwable t) {
				ExceptionUtils.rethrow(t);
			}
			return result;
		};
	}
1332779
public boolean displayWarning(BugInstance bugInstance) {

        int priority = bugInstance.getPriority();
        if (priority > getMinPriorityAsInt()) {
            return false;
        }

        int rank = bugInstance.getBugRank();
        if (rank > getMinRank()) {
            return false;
        }

        BugPattern bugPattern = bugInstance.getBugPattern();

        // HACK: it is conceivable that the detector plugin which generated
        // this warning is not available any more, in which case we can't
        // find out the category. Let the warning be visible in this case.
        if (!containsCategory(bugPattern.getCategory())) {
            return false;
        }

        if (!displayFalseWarnings) {
            boolean isFalseWarning = !Boolean.valueOf(bugInstance.getProperty(BugProperty.IS_BUG, "true")).booleanValue();
            if (isFalseWarning) {
                return false;
            }
        }

        return true;
    }