language
stringclasses
2 values
func_code_string
stringlengths
63
466k
python
def format_t_into_dhms_format(timestamp): """ Convert an amount of second into day, hour, min and sec :param timestamp: seconds :type timestamp: int :return: 'Ad Bh Cm Ds' :rtype: str >>> format_t_into_dhms_format(456189) '5d 6h 43m 9s' >>> format_t_into_dhms_format(3600) '0d 1h 0...
java
public void marshall(GetLoadBalancerRequest getLoadBalancerRequest, ProtocolMarshaller protocolMarshaller) { if (getLoadBalancerRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(getLoadBalanc...
python
def qteRemoveKey(self, keysequence: QtmacsKeysequence): """ Remove ``keysequence`` from this key map. |Args| * ``keysequence`` (**QtmacsKeysequence**): key sequence to remove from this key map. |Returns| **None** |Raises| * **QtmacsArgument...
python
def get_pipeline_inputs(job, input_flag, input_file): """ Get the input file from s3 or disk, untargz if necessary and then write to file job store. :param job: job :param str input_flag: The name of the flag :param str input_file: The value passed in the config file :return: The jobstore ID for...
java
public void setSnippetEnd(int v) { if (Cooccurrence_Type.featOkTst && ((Cooccurrence_Type)jcasType).casFeat_snippetEnd == null) jcasType.jcas.throwFeatMissing("snippetEnd", "ch.epfl.bbp.uima.types.Cooccurrence"); jcasType.ll_cas.ll_setIntValue(addr, ((Cooccurrence_Type)jcasType).casFeatCode_snippetEnd, v)...
python
def valid_kbreak_matchings(start_edges, result_edges): """ A staticmethod check implementation that makes sure that degrees of vertices, that are affected by current :class:`KBreak` By the notion of k-break, it shall keep the degree of vertices in :class:`bg.breakpoint_graph.BreakpointGraph` the same, ...
python
def enbw(wnd): """ Equivalent Noise Bandwidth in bins (Processing Gain reciprocal). """ return sum(el ** 2 for el in wnd) / sum(wnd) ** 2 * len(wnd)
java
@Override public Date parseTime(String input) throws ParseException { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "parseTime parsing [" + input + "]"); } String data = input; int i = data.indexOf(';', 0); // PK20062 - check for ...
java
@SuppressWarnings("unchecked") private static List<String> toList(Object object) { List<String> list = new ArrayList<String>(); if (object == null || object == JSONObject.NULL) { return null; } if (object instanceof List) { return ((List<String>) object); } else if (object instanceof...
java
public OmdbBuilder setImdbId(final String imdbId) throws OMDBException { if (StringUtils.isBlank(imdbId)) { throw new OMDBException(ApiExceptionType.UNKNOWN_CAUSE, "Must provide an IMDB ID!"); } params.add(Param.IMDB, imdbId); return this; }
java
void setTokenKind(int newKind) { org.drools.constraint.parser.JavaToken token = (org.drools.constraint.parser.JavaToken)token(); token.setKind(newKind); }
python
def _X_selected(X, selected): """Split X into selected features and other features""" n_features = X.shape[1] ind = np.arange(n_features) sel = np.zeros(n_features, dtype=bool) sel[np.asarray(selected)] = True non_sel = np.logical_not(sel) n_selected = np.sum(sel) X_sel = X[:, ind[sel]] ...
java
public void marshall(ServiceSetting serviceSetting, ProtocolMarshaller protocolMarshaller) { if (serviceSetting == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(serviceSetting.getSettingId(), SETTIN...
python
def get_depth2goobjs(go2obj, max_depth=2): """Init depth2goobjs using list sorted by depth, get level-00/01 GO terms.""" depth2goobjs = {d:list() for d in range(max_depth+1)} goid_seen = set() for _, goobj in sorted(go2obj.items(), key=lambda t: t[1].depth): # Save depth-00, ...
java
public boolean addContentFontFaceContainerStyle(final FontFaceContainerStyle ffcStyle) { final FontFace fontFace = ffcStyle.getFontFace(); if (fontFace != null) { this.fontFaces.add(fontFace); } return this.addContentStyle(ffcStyle); }
java
public static ObjectMapper buildObjectMapper() { ObjectMapper objectMapper = new ObjectMapper(); objectMapper.setDateFormat(new StdDateFormat()); objectMapper.setPropertyNamingStrategy(new PropertyNamingStrategy.SnakeCaseStrategy()); objectMapper.setSerializationInclusion(JsonInclude.Include.NON_EMPTY); objec...
java
private static <A> ProgramChromosome<A> create( final Tree<? extends Op<A>, ?> program, final Predicate<? super ProgramChromosome<A>> validator, final ISeq<? extends Op<A>> operations, final ISeq<? extends Op<A>> terminals ) { final ISeq<ProgramGene<A>> genes = FlatTreeNode.of(program).stream() .map(n -> ...
java
private void runInternal(IMarker marker) throws CoreException { Assert.isNotNull(marker); PendingRewrite pending = resolveWithoutWriting(marker); if(pending == null){ return; } try { IRegion region = completeRewrite(pending); if(region == null){ ...
java
@SuppressWarnings({"unused", "WeakerAccess"}) public void recordScreen(String screenName){ if(screenName == null || (!currentScreenName.isEmpty() && currentScreenName.equals(screenName))) return; getConfigLogger().debug(getAccountId(), "Screen changed to " + screenName); currentScreenName = ...
python
def listify(val, return_type=tuple): """ Examples: >>> listify('abc', return_type=list) ['abc'] >>> listify(None) () >>> listify(False) (False,) >>> listify(('a', 'b', 'c'), return_type=list) ['a', 'b', 'c'] """ # TODO: flatlistify((1, 2, 3...
python
def security(policy, app_secret): """ Creates a valid signature and policy based on provided app secret and parameters ```python from filestack import Client, security # a policy requires at least an expiry policy = {'expiry': 56589012, 'call': ['read', 'store', 'pick']} sec = security(...
java
static void modifyProfiles(File destination, Map<String, Profile> modifications) { final boolean inPlaceModify = destination.exists(); File stashLocation = null; // Stash the original file, before we apply the changes if (inPlaceModify) { boolean stashed = false; ...
python
def cli_print(msg, color='', end=None, file=sys.stdout, logger=_LOG): """Print the message to file and also log it. This function is intended as a 'tee' mechanism to enable the CLI interface as a first-class citizen, while ensuring that everything the operator sees also has an analogous logging entry in the te...
java
protected SQLException markPossiblyBroken(SQLException e) { String state = e.getSQLState(); boolean alreadyDestroyed = false; ConnectionState connectionState = this.getConnectionHook() != null ? this.getConnectionHook().onMarkPossiblyBroken(this, state, e) : ConnectionState.NOP; if (state == null){...
java
private void initRandom() { try { random = new SecureRandom(); } catch (Exception e) { log.warn("Could not generate SecureRandom for session-id randomness", e); random = new Random(); weakRandom = true; } }
python
def GetAncestors(self): """Yields all ancestors of a path. The ancestors are returned in order from closest to the farthest one. Yields: Instances of `rdf_objects.PathInfo`. """ current = self while True: current = current.GetParent() if current is None: return ...
java
@Override public ListUserHierarchyGroupsResult listUserHierarchyGroups(ListUserHierarchyGroupsRequest request) { request = beforeClientExecution(request); return executeListUserHierarchyGroups(request); }
java
private static void stitchChunks(Configuration conf, JobConf jobConf, final Arguments args) throws IOException { //check if the file system is the dfs FileSystem dstfs = args.dst.getFileSystem(conf); DistributedFileSystem dstdistfs = DFSUtil.convertToDFS(dstfs); if(dstdistfs == null) { thr...
java
private void parsePlurals(JsonObject root, String type, Map<String, PluralData> map) { JsonObject node = resolve(root, "supplemental", type); for (Map.Entry<String, JsonElement> entry : node.entrySet()) { String language = entry.getKey(); PluralData data = new PluralData(); for (Map.Entry<Stri...
java
@Override public void infoSeeFromEast(ControllerPlayer c, double distance, double direction, double distChange, double dirChange, double bodyFacingDirection, double headFacingDirection) { switch (qualifier) { case 'l' : switch (number) { ...
java
public static <T, R, E extends Throwable> @NonNull Function<T, R> unwrappingRethrowFunction(final @NonNull ThrowingFunction<T, R, E> function) { return input -> { try { return function.throwingApply(input); } catch(final Throwable t) { throw rethrow(unwrap(t)); } }; }
java
public void write(RowOutputInterface out) { out.writeSize(storageSize); out.writeData(rowData, tTable.colTypes); out.writeEnd(); hasDataChanged = false; }
python
def dict2pb(cls, adict, strict=False): """ Takes a class representing the ProtoBuf Message and fills it with data from the dict. """ obj = cls() for field in obj.DESCRIPTOR.fields: if not field.label == field.LABEL_REQUIRED: continue if not field.has_default_value: ...
python
def norm_zero_one(array, dim=None): """ normalizes a numpy array from 0 to 1 based in its extent Args: array (ndarray): dim (int): Returns: ndarray: CommandLine: python -m utool.util_alg --test-norm_zero_one Example: >>> # ENABLE_DOCTEST >>> ...
java
@Override public ListAliasesResult listAliases(ListAliasesRequest request) { request = beforeClientExecution(request); return executeListAliases(request); }
python
def new_cbuf(self, input, null_if_empty=True): """ Converts the input into a raw C buffer :param input: The input :param null_if_empty: If the input is empty :return: A tuple of buffer,length """ if not isinstance(input, bytes) and input: input = input...
java
public void shutdown() { logger.warn("Shutting down FlowRunnerManager..."); if (this.azkabanProps.getBoolean(ConfigurationKeys.AZKABAN_POLL_MODEL, false)) { this.pollingService.shutdown(); } this.executorService.shutdown(); boolean result = false; while (!result) { logger.info("Await...
python
def _matching_pattern_sets(self): """Returns an iterator containing all PatternSets that match this directory. This is build by chaining the this-directory specific PatternSet (self.matched_and_subdir), the local (non-inheriting) PatternSet (self.matched_no_subdir) with all the ...
java
@Override public StandardJavaFileManager getStandardFileManager( DiagnosticListener<? super JavaFileObject> diagnosticListener, Locale locale, Charset charset) { Context context = new Context(); context.put(Locale.class, locale); if (diagnosticListener != ...
python
def aesthetics(cls): """ Return a set of all non-computed aesthetics for this stat. stats should not override this method. """ aesthetics = cls.REQUIRED_AES.copy() calculated = get_calculated_aes(cls.DEFAULT_AES) for ae in set(cls.DEFAULT_AES) - set(calculated): ...
java
NameWithINode getSourceFile(String parity, String prefix) throws IOException { if (isHarFile(parity)) { return null; } // remove the prefix String src = parity.substring(prefix.length()); byte[][] components = INodeDirectory.getPathComponents(src); INode inode = namesystem.dir.getINode(com...
java
@Check public void checkContainerType(SarlAgent agent) { final XtendTypeDeclaration declaringType = agent.getDeclaringType(); if (declaringType != null) { final String name = canonicalName(declaringType); assert name != null; error(MessageFormat.format(Messages.SARLValidator_28, name), agent, nu...
java
private static void onBind(Class clazz) { if (((MetamodelImpl) em.getMetamodel()).getEntityMetadataMap().isEmpty()) { EntityMetadata metadata = new EntityMetadata(clazz); metadata.setPersistenceUnit(getPersistenceUnit()); setSchemaAndPU(clazz, metadata); ...
python
def _parse_shard_list(shard_list, current_shard_list): """ parse shard list :param shard_list: format like: 1,5-10,20 :param current_shard_list: current shard list :return: """ if not shard_list: return current_shard_list target_shards = [] for n in shard_list.split(","): ...
python
def raise_201(instance, location): """Abort the current request with a 201 (Created) response code. Sets the Location header correctly. If the location does not start with a slash, the path of the current request is prepended. :param instance: Resource instance (used to access the response) :type i...
java
protected String randomValue(List<String> values) { if (values == null || values.isEmpty()) { throw new InvalidFunctionUsageException("No values to choose from"); } final int idx = random.nextInt(values.size()); return values.get(idx); }
python
def _complete_word(self, symbol, attribute): """Suggests context completions based exclusively on the word preceding the cursor.""" #The cursor is after a %(,\s and the user is looking for a list #of possibilities that is a bit smarter that regular AC. if self.context.el_call in ...
python
def groups_data(self): """All data about all groups (get-only). :getter: Returns all data about all groups :type: list of GroupData """ return _ListProxy(GroupData(num, name, symbol, variant) for (num, name, symbol, variant) in...
java
private Duration getRangeDurationSubDay(ProjectCalendar projectCalendar, TimescaleUnits rangeUnits, DateRange range, List<TimephasedWork> assignments, int startIndex) { throw new UnsupportedOperationException("Please request this functionality from the MPXJ maintainer"); }
java
@SuppressWarnings("unchecked") public EList<IfcPhysicalQuantity> getQuantities() { return (EList<IfcPhysicalQuantity>) eGet(Ifc2x3tc1Package.Literals.IFC_ELEMENT_QUANTITY__QUANTITIES, true); }
python
def rollforward(self, dt): """ Roll provided date forward to next offset only if not on offset. """ if not self.onOffset(dt): if self.n >= 0: return self._next_opening_time(dt) else: return self._prev_opening_time(dt) return...
python
def is_empty(self): """True if only a single empty `a:p` element is present.""" ps = self.p_lst if len(ps) > 1: return False if not ps: raise InvalidXmlError('p:txBody must have at least one a:p') if ps[0].text != '': return False ret...
java
@Override public void trimContexts() { for (int index = 0; index < this.frames.length; ++index) { final Frame f = this.frames[index]; f.trimRecursive(); } this.frame_index = 0; }
java
public static String findCurrentWordFromCursor(String text, int cursor) { if (text.length() <= cursor + 1) { // return last word if (text.contains(SPACE)) { if (doWordContainEscapedSpace(text)) { if (doWordContainOnlyEscapedSpace(text)) ...
java
public static Map<String, Long> buildCountMap(Pattern pattern, String text) { return buildCountMap(pattern.splitAsStream(text)); }
java
public static Treenode search(Treenode start, String text, ITreenodeSearch search) { return search(start.getTreeview(), text, search); }
python
def set_cols_width(self, array): """Set the desired columns width - the elements of the array should be integers, specifying the width of each column. For example: [10, 20, 5] """ self._check_row_size(array) try: array = map(int, array) ...
python
def generate_method(service_module, service_name, method_name): """Generate a method for the given Thrift service. :param service_module: Thrift-generated service module :param service_name: Name of the Thrift service :param method_name: Method being called """ assert se...
java
public Object doRemoteAction(String strCommand, Map<String, Object> properties) throws DBException, RemoteException { return null; // Not supported }
python
def directed_predicates_in_expression(expression: ShExJ.shapeExpr, cntxt: Context) -> Dict[IRIREF, PredDirection]: """ Directed predicates in expression -- return all predicates in shapeExpr along with which direction(s) they evaluate :param expression: Expression to scan :param cntxt: :return: ...
python
def has_item(self, url): """ Test if required item exists in the cache. """ _hash = self.build_hash(url) query = {'_id': _hash} doc = self.dbase.cache.find_one(query, {'id': 1}) return doc is not None
python
def iscode(obj): """A replacement for inspect.iscode() which we can't used because we may be using a different version of Python than the version of Python used in creating the byte-compiled objects. Here, the code types may mismatch. """ return inspect.iscode(obj) or isinstance(obj, Code3) or isins...
java
public EClass getIfcElementComponentType() { if (ifcElementComponentTypeEClass == null) { ifcElementComponentTypeEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc2x3tc1Package.eNS_URI) .getEClassifiers().get(199); } return ifcElementComponentTypeEClass; }
python
def _fit(self, col): """Create a map of the empirical probability for each category. Args: col(pandas.DataFrame): Data to transform. """ column = col[self.col_name].replace({np.nan: np.inf}) frequencies = column.groupby(column).count().rename({np.inf: None}).to_dict...
java
public static Request newUploadVideoRequest(Session session, File file, Callback callback) throws FileNotFoundException { ParcelFileDescriptor descriptor = ParcelFileDescriptor.open(file, ParcelFileDescriptor.MODE_READ_ONLY); Bundle parameters = new Bundle(1); parameters.putParcelabl...
python
def prettyfy(response, format='json'): """A wrapper for pretty_json and pretty_xml """ if format == 'json': return pretty_json(response.content) else: return pretty_xml(response.content)
java
public static Map<String, List<String>> startConfig(Map<String, Object> config, boolean restart) { Map<String, List<String>> rc = load(config, true, restart); return start(rc, true, restart); }
python
def get_default(self, section, option): """ Get Default value for a given (section, option) -> useful for type checking in 'get' method """ section = self._check_section_option(section, option) for sec, options in self.defaults: if sec == section: ...
java
private String getBasePath(String path1, String path2) { StringBuffer base = new StringBuffer(); path1 = path1.replace('\\', '/'); path2 = path2.replace('\\', '/'); String[] parts1 = path1.split("/"); String[] parts2 = path2.split("/"); for (int i = 0; i < parts1.lengt...
java
public DeviceEnvelope addDevice(Device device) throws ApiException { ApiResponse<DeviceEnvelope> resp = addDeviceWithHttpInfo(device); return resp.getData(); }
java
public void setFlattenWriter(Writer w, boolean inclComments, boolean inclConditionals, boolean inclPEs) { mFlattenWriter = new DTDWriter(w, inclComments, inclConditionals, inclPEs); }
java
public LineString toLineString(List<LatLng> latLngs, boolean hasZ, boolean hasM) { LineString lineString = new LineString(hasZ, hasM); populateLineString(lineString, latLngs); return lineString; }
python
def jks_pkey_decrypt(data, password_str): """ Decrypts the private key password protection algorithm used by JKS keystores. The JDK sources state that 'the password is expected to be in printable ASCII', though this does not appear to be enforced; the password is converted into bytes simply by taking ea...
java
public FieldInfo addField(Modifiers modifiers, String fieldName, TypeDesc type) { FieldInfo fi = new FieldInfo(this, modifiers, fieldName, type); mFields.add(fi); return fi; }
python
def generate_params(n_items, interval=5.0, ordered=False): r"""Generate random model parameters. This function samples a parameter independently and uniformly for each item. ``interval`` defines the width of the uniform distribution. Parameters ---------- n_items : int Number of distin...
java
public static Collection<String> getPropertyNames( final Class<?> clazz ) { if (clazz == null) { throw new IllegalArgumentException( "no class specified" ); } Map<String, PropertyAccessor> accessors = _getAccessors( clazz ); retu...
java
@Override public List<CommerceShippingFixedOption> findAll(int start, int end) { return findAll(start, end, null); }
python
def metric_from_cell(cell): """Calculates the metric matrix from cell, which is given in the Cartesian system.""" cell = np.asarray(cell, dtype=float) return np.dot(cell, cell.T)
python
def _trans_as_path(self, as_path_list): """Translates Four-Octet AS number to AS_TRANS and separates AS_PATH list into AS_PATH and AS4_PATH lists if needed. If the neighbor does not support Four-Octet AS number, this method constructs AS4_PATH list from AS_PATH list and swaps no...
python
def send_and_match_output(self, send, matches, shutit_pexpect_child=None, retry=3, strip=True, note=None, echo=None, ...
python
def snakify(name, sep='_'): ''' Convert CamelCase to snake_case. ''' name = re.sub("([A-Z]+)([A-Z][a-z])", r"\1%s\2" % sep, name) name = re.sub("([a-z\\d])([A-Z])", r"\1%s\2" % sep, name) return name.lower()
java
public void mergeSourceData(Record recSource, Record recDest, boolean bFound) { for (int iFieldSeq = 0; iFieldSeq < recSource.getFieldCount(); iFieldSeq++) { BaseField fldSource = recSource.getField(iFieldSeq); BaseField fldDest = recDest.getField(fldSource.getFieldName()); ...
python
def classify(self, text=u''): """ Predicts the Language of a given text. :param text: Unicode text to be classified. """ text = self.lm.normalize(text) tokenz = LM.tokenize(text, mode='c') result = self.lm.calculate(doc_terms=tokenz) #print 'Karbasa:', self....
python
def get(self, user_id, lang='zh_CN'): """ 获取用户基本信息(包括UnionID机制) 详情请参考 https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421140839 :param user_id: 普通用户的标识,对当前公众号唯一 :param lang: 返回国家地区语言版本,zh_CN 简体,zh_TW 繁体,en 英语 :return: 返回的 JSON 数据包 使用示例:: ...
python
def _ImportModuleHookBySuffix(name, package=None): """Callback when a module is imported through importlib.import_module.""" _IncrementNestLevel() try: # Really import modules. module = _real_import_module(name, package) finally: if name.startswith('.'): if package: name = _ResolveRel...
java
public static String[] splitByWholeSeparatorPreserveAllTokens(final String str, final String separator) { return splitByWholeSeparatorWorker(str, separator, -1, true); }
python
def add_role_info(self, role_name, role_type, host_id, config=None): """ Add a role info. The role will be created along with the service setup. @param role_name: Role name @param role_type: Role type @param host_id: The host where the role should run @param config: (Optional) A dictionary of r...
java
@Override public String chooseEngineServerAlias(String keyType, Principal[] issuers, SSLEngine engine) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) Tr.entry(tc, "chooseEngineServerAlias", new Object[] { keyType, issuers, engine }); String rc = null; if (nul...
java
public static <T> T[] toArray(Collection<T> col, Class<T> cls) { T[] arr = (T[]) Array.newInstance(cls, col.size()); return col.toArray(arr); }
python
def get_col_rgba(color, transparency=None, opacity=None): """This class converts a Gdk.Color into its r, g, b parts and adds an alpha according to needs If both transparency and opacity is None, alpha is set to 1 => opaque :param Gdk.Color color: Color to extract r, g and b from :param float | None t...
python
def devices(self): """Return all known devices. :return: list of :class:`Device` or :class:`DeviceGroup` instances. """ devices = [] count = self.lib.tdGetNumberOfDevices() for i in range(count): device = DeviceFactory(self.lib.tdGetDeviceId(i), lib=self.lib)...
python
def can_replicate_commands(self): """ Whether Redis supports single command replication. """ if not hasattr(self, '_can_replicate_commands'): info = self.redis.info('server') version_info = info['redis_version'].split('.') major, minor = int(version_in...
java
public static <T> ArrayList<T> sortThis(ArrayList<T> list, Comparator<? super T> comparator) { int size = list.size(); if (ArrayListIterate.canAccessInternalArray(list)) { Arrays.sort(ArrayListIterate.getInternalArray(list), 0, size, comparator); } else { ...
python
def to_method(func): """ Lift :func:`func` to a method; it will be called with the first argument 'self' ignored. :param func: Any callable object """ @functools.wraps(func) def wrapper(*args, **kwargs): """Wrapper function. """ return func(*args[1:], **kwargs) ...
java
private Description handleLocal(DCLInfo info, VisitorState state) { JCExpressionStatement expr = getChild(info.synchTree().getBlock(), JCExpressionStatement.class); if (expr == null) { return Description.NO_MATCH; } if (expr.getStartPosition() > ((JCTree) info.innerIf()).getStartPosition()) { ...
python
def _handle_result_line(self, sline): """ Parses the data line and adds to the dictionary. :param sline: a split data line to parse :returns: the number of rows to jump and parse the next data line or return the code error -1 """ # If there are less values founded...
java
public void setPosition(float x, float y, float z) { getTransform().setPosition(x, y, z); if (mTransformCache.setPosition(x, y, z)) { onTransformChanged(); } }
java
public BeanLazyOutputHandler handle(List<QueryParameters> outputList) throws MjdbcException { if (outputList instanceof QueryParametersLazyList) { return new BeanLazyOutputHandler(this.type, this.processor, (QueryParametersLazyList) outputList); } else { throw new MjdbcRuntimeExc...
java
public static ImmutableSet<String> wordSet(final Class<?> origin, final String resource) throws IOException { return ImmutableSet.copyOf(new HashSet<String>() {{ readResource(origin, resource, new NullReturnLineProcessor() { @Override public boolean processLine(@Nonnu...
java
public BoundingBox overlap(BoundingBox projectedCoverage) { BoundingBox overlap = null; if (point) { overlap = projectedBoundingBox; } else { overlap = projectedBoundingBox.overlap(projectedCoverage); } return overlap; }