Checks whether the map's source is a source provided by Mapbox, rather than a custom source.

@param singleSource an individual source object from the map
@return true if the source is from the Mapbox Streets vector source, false if it's not.
489743
private boolean sourceIsFromMapbox(Source singleSource) {
    if (singleSource instanceof VectorSource) {
      String url = ((VectorSource) singleSource).getUrl();
      if (url != null) {
        for (String supportedSource : SUPPORTED_SOURCES) {
          if (url.contains(supportedSource)) {
            return true;
          }
        }
      }
    }
    return false;
  }
681709
private static boolean isRingSystemSproutedWithNonRingDoubleBonds(IAtomContainer fullContainer,
            IAtomContainer isolatedRingSystem) {
        Iterator<IAtom> atoms = isolatedRingSystem.atoms().iterator();
        while (atoms.hasNext()) {
            IAtom atom = atoms.next();
            Iterator<IBond> neighborBonds = fullContainer.getConnectedBondsList(atom).iterator();
            while (neighborBonds.hasNext()) {
                IBond neighborBond = neighborBonds.next();
                if (!neighborBond.getFlag(CDKConstants.ISINRING)
                        && neighborBond.getOrder() == Order.DOUBLE
                        || neighborBond.getOrder() == Order.TRIPLE) {
                    if (!("N.sp2.3".equals(atom.getAtomTypeName()) && "O.sp2".equals(neighborBond
                                                                                         .getOther(atom).getAtomTypeName()))) return true;
                }
            }
        }
        return false;
    }
86329
def is_build_linked(source, pkg):
        
        for line in source.split("\n"):
            if re.search(r"(api|compile)\s+project\(['\"]:{}['\"]\)".format(pkg),
                         line):
                return True
        return False
532015
public boolean isSameRM(XAResource xares) throws XAException {

        if (!(xares instanceof JDBCXAResource)) {
            return false;
        }

        return xaDataSource == ((JDBCXAResource) xares).getXADataSource();
    }
604392
protected final boolean isNoop(Convert<?, ?> convert) {
        Type sourceType = convert.getSourcePosition().getType();
        if (ParameterizedType.class.isInstance(sourceType) && convert.getSourcePosition().getValue() != null) {
            sourceType =
                Types.narrowestParameterizedType(convert.getSourcePosition().getValue().getClass(),
                    (ParameterizedType) sourceType);
        }
        if (TypeUtils.isAssignable(sourceType, convert.getTargetPosition().getType())) {
            if (ParameterizedType.class.isInstance(convert.getTargetPosition().getType())) {
                // make sure all type params of target position are accounted for by source before declaring it a noop:
                final Class<?> rawTargetType = TypeUtils.getRawType(convert.getTargetPosition().getType(), null);
                final Map<TypeVariable<?>, Type> typeMappings = TypeUtils.getTypeArguments(sourceType, rawTargetType);

                for (TypeVariable<?> v : rawTargetType.getTypeParameters()) {
                    if (typeMappings.get(v) == null) {
                        return false;
                    }
                    if (typeMappings.get(v) instanceof TypeVariable<?>) {
                        return false;
                    }
                }
            }
            return true;
        }
        return false;
    }
435957
public static boolean areSoSourcesAbisSupported() {
    sSoSourcesLock.readLock().lock();
    try {
      if (sSoSources == null) {
        return false;
      }

      String supportedAbis[] = SysUtil.getSupportedAbis();
      for (int i = 0; i < sSoSources.length; ++i) {
        String[] soSourceAbis = sSoSources[i].getSoSourceAbis();
        for (int j = 0; j < soSourceAbis.length; ++j) {
          boolean soSourceSupported = false;
          for (int k = 0; k < supportedAbis.length && !soSourceSupported; ++k) {
            soSourceSupported = soSourceAbis[j].equals(supportedAbis[k]);
          }
          if (!soSourceSupported) {
            Log.e(TAG, "abi not supported: " + soSourceAbis[j]);
            return false;
          }
        }
      }

      return true;
    } finally {
      sSoSourcesLock.readLock().unlock();
    }
  }
642168
@Override
    public Map<String, DataSource> getDataSources() {
        HashMap<String, DataSource> map = new HashMap<>();
        for (Map.Entry<String, HikariDataSource> entry : sources.entrySet()) {
            if (entry.getValue() != null) {
                map.put(entry.getKey(), entry.getValue());
            }
        }
        return map;
    }
531715
public void checkSourceStatus(boolean check_gensrc) {
        removedSources = calculateRemovedSources();
        for (Source s : removedSources) {
            if (!s.isGenerated() || check_gensrc) {
                taintPackage(s.pkg().name(), "source "+s.name()+" was removed");
            }
        }

        addedSources = calculateAddedSources();
        for (Source s : addedSources) {
            String msg = null;
            if (isIncremental()) {
                // When building from scratch, there is no point
                // printing "was added" for every file since all files are added.
                // However for an incremental build it makes sense.
                msg = "source "+s.name()+" was added";
            }
            if (!s.isGenerated() || check_gensrc) {
                taintPackage(s.pkg().name(), msg);
            }
        }

        modifiedSources = calculateModifiedSources();
        for (Source s : modifiedSources) {
            if (!s.isGenerated() || check_gensrc) {
                taintPackage(s.pkg().name(), "source "+s.name()+" was modified");
            }
        }
    }
867712
private boolean findJavaSourceFiles(String[] args) {
        String prev = "";
        for (String s : args) {
            if (s.endsWith(".java") && !prev.equals("-xf") && !prev.equals("-if")) {
                return true;
            }
            prev = s;
        }
        return false;
    }
1082986
private static Bitmap checkSource(Bitmap original, int radius) {
        if (radius < 0 || radius > 256) {
            throw new RuntimeException("Blur bitmap radius must >= 1 and <=256.");
        }

        // First we should check the original
        if (original == null) {
            throw new NullPointerException("Blur bitmap original isn't null.");
        }
        if (original.isRecycled()) {
            throw new RuntimeException("Blur bitmap can't blur a recycled bitmap.");
        }

        Bitmap.Config config = original.getConfig();
        if (config != Bitmap.Config.ARGB_8888 && config != Bitmap.Config.RGB_565) {
            throw new RuntimeException("Blur bitmap only supported Bitmap.Config.ARGB_8888 and Bitmap.Config.RGB_565.");
        }

        return (original);
    }
659858
private boolean containsCloudTrailLogs(CloudTrailSource ctSource) {
        SourceType sourceType = SourceType.valueOf(ctSource.getSourceAttributes().get(SourceAttributeKeys.SOURCE_TYPE.getAttributeKey()));
        switch(sourceType) {
            case CloudTrailLog:
                return true;
            case CloudTrailValidationMessage:
                logger.warn(String.format("Delete CloudTrail validation message: %s.", ctSource.toString()));
                return false;
            case Other:
            default:
                logger.info(String.format("Skip Non CloudTrail Log File: %s.", ctSource.toString()));
                return false;
        }
    }
1228287
public Source loadSource(Package lastPackage, String l, boolean is_generated) {
        Source s = Source.load(lastPackage, l, is_generated);
        lastPackage.addSource(s);
        sources.put(s.name(), s);
        return s;
    }
757186
protected void ensureEventSource(UUID eventSource, Event event) {
		if (event.getSource() == null) {
			if (eventSource != null) {
				event.setSource(new Address(getSpaceID(), eventSource));
			} else {
				throw new AssertionError("Every event must have a source"); //$NON-NLS-1$
			}
		}
	}
150872
private static boolean isOutFile(final File filePathName, final File inputMap) {
        final File relativePath = FileUtils.getRelativePath(inputMap.getAbsoluteFile(), filePathName.getAbsoluteFile());
        return !(relativePath.getPath().length() == 0 || !relativePath.getPath().startsWith(".."));
    }
1117423
@SuppressWarnings("resource")
    private static WstxInputSource sourceFromSS(WstxInputSource parent, ReaderConfig cfg,
    		String refName, int xmlVersion, StreamSource ssrc)
        throws IOException, XMLStreamException
    {
        InputBootstrapper bs;
        Reader r = ssrc.getReader();
        String pubId = ssrc.getPublicId();
        String sysId0 = ssrc.getSystemId();
        URL ctxt = (parent == null) ? null : parent.getSource();
        URL url = (sysId0 == null || sysId0.length() == 0) ? null
            : URLUtil.urlFromSystemId(sysId0, ctxt);

        final SystemId systemId = SystemId.construct(sysId0, (url == null) ? ctxt : url);
        
        if (r == null) {
            InputStream in = ssrc.getInputStream();
            if (in == null) { // Need to try just resolving the system id then
                if (url == null) {
                    throw new IllegalArgumentException("Can not create Stax reader for a StreamSource -- neither reader, input stream nor system id was set.");
                }
                in = URLUtil.inputStreamFromURL(url);
            }
            bs = StreamBootstrapper.getInstance(pubId, systemId, in);
        } else {
            bs = ReaderBootstrapper.getInstance(pubId, systemId, r, null);
        }
        
        Reader r2 = bs.bootstrapInput(cfg, false, xmlVersion);
        return InputSourceFactory.constructEntitySource
            (cfg, parent, refName, bs, pubId, systemId, xmlVersion, r2);
    }
1329660
public void setChaincodeSourceLocation(File chaincodeSourceLocation) throws InvalidArgumentException {
        if (chaincodeSourceLocation == null) {
            throw new InvalidArgumentException("Chaincode source location may not be null.");
        }
        if (chaincodeInputStream != null) {
            throw new InvalidArgumentException("Error setting chaincode location. Chaincode input stream already set. Only one or the other maybe set.");
        }

        this.chaincodeSourceLocation = chaincodeSourceLocation;
    }
756200
static SourceFile extractSourceMap(
      SourceFile jsFile, String sourceMapURL, boolean parseInlineSourceMaps) {
    if (parseInlineSourceMaps && sourceMapURL.startsWith(BASE64_URL_PREFIX)) {
      String extractedString = extractBase64String(sourceMapURL);
      if (extractedString != null) {
        return SourceFile.fromCode(jsFile.getName() + ".inline.map", extractedString);
      }
      return null;
    }
    // TODO(tdeegan): Handle absolute urls here.  The compiler needs to come up with a scheme for
    // properly resolving absolute urls from http:// or the root /some/abs/path/... See b/62544959.
    if (isAbsolute(sourceMapURL)) {
      return null;
    }
    // If not absolute, its relative.
    // TODO(tdeegan): Handle urls relative to //# sourceURL. See the sourcemap spec.
    return getRelativePath(jsFile.getName(), sourceMapURL);
  }