id
stringlengths
25
27
content
stringlengths
190
15.4k
max_stars_repo_path
stringlengths
31
217
robustness-copilot_data_201
/** * Calculate sp3/sp2 hybridization ratio in the supplied {@link IAtomContainer}. * * @param container The AtomContainer for which this descriptor is to be calculated. * @return The ratio of sp3 to sp2 carbons */ public DescriptorValue calculate(IAtomContainer container){ try { I...
/descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/HybridizationRatioDescriptor.java
robustness-copilot_data_202
/** * Select the lowest ring number for use in SMARTS. * * @return ring number * @throws IllegalStateException all ring numbers are used */ private int chooseRingNumber(){ for (int i = 1; i < rnums.length; i++) { if (rnums[i] == 0) { rnums[i] = 1; return i; ...
/tool/smarts/src/main/java/org/openscience/cdk/smarts/SmartsFragmentExtractor.java
robustness-copilot_data_203
/** * Check max time different seconds tolerable between job server and registry center. * * @throws JobExecutionEnvironmentException throe JobExecutionEnvironmentException if exceed max time different seconds */ public void checkMaxTimeDiffSecondsTolerable() throws JobExecutionEnvironmentExceptio...
/elasticjob-lite/elasticjob-lite-core/src/main/java/org/apache/shardingsphere/elasticjob/lite/internal/config/ConfigurationService.java
robustness-copilot_data_204
/** * Find the 2nd terminus stop (1st terminus is at index 0 per definition). * * Returns stop index instead of the stop, in order to cater for stops which are * served multiple times * * @param stops * @return index of the stop which is half way on the r...
/contribs/minibus/src/main/java/org/matsim/contrib/minibus/genericUtils/TerminusStopFinder.java
robustness-copilot_data_205
/** * Evaluates the simple chi index for a set of fragments. * * @param atomContainer The target <code>AtomContainer</code> * @param fragLists A list of fragments * @return The simple chi index */ public static double evalSimpleIndex(IAtomContainer atomContainer, List<List<Integer>> ...
/descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/ChiIndexUtils.java
robustness-copilot_data_206
/** * Returns whether the appender is valid is valid for use in a threshold definition. */ public synchronized boolean hasAppender(String appender){ return _appenders.contains(appender) || (_parent != null && _parent.hasAppender(appender)); }
/modules/cells/src/main/java/dmg/util/logback/FilterThresholdSet.java
robustness-copilot_data_207
/** * Clones this bond object, including clones of the atoms between which the * bond is defined. * * @return The cloned object */ public IBond clone() throws CloneNotSupportedException{ Bond clone = (Bond) super.clone(); if (atoms != null) { clone.atoms = new IAtom[atoms.lengt...
/base/data/src/main/java/org/openscience/cdk/Bond.java
robustness-copilot_data_208
/** * Method for registering {@link ValueInstantiator} to use when deserializing * instances of type <code>beanType</code>. *<p> * Instantiator is * registered when module is registered for <code>ObjectMapper</code>. */ public SimpleModule addValueInstantiator(Class<?> beanType, ValueInst...
/src/main/java/com/fasterxml/jackson/databind/module/SimpleModule.java
robustness-copilot_data_209
/** * The method calculates the bond total Partial charge of a given bond * It is needed to call the addExplicitHydrogensToSatisfyValency method from the class tools.HydrogenAdder. * *@param ac AtomContainer *@return return the sigma electronegativity */ public Descripto...
/descriptor/qsarbond/src/main/java/org/openscience/cdk/qsar/descriptors/bond/BondPartialTChargeDescriptor.java
robustness-copilot_data_210
/** * Create a new checksum instance for an already computed digest of a particular type. * * @param digest the input must have the following format: * <type>:<hexadecimal digest> * @throws IllegalArgumentException if argument has wrong form * @throws NullPointerException ...
/modules/common/src/main/java/org/dcache/util/Checksum.java
robustness-copilot_data_211
/** * Test if the domain is deployed under Istio environment. * * @return istioEnabled */ boolean isIstioEnabled(){ return Optional.ofNullable(configuration).map(Configuration::getIstio).map(Istio::getEnabled).orElse(false); }
/operator/src/main/java/oracle/kubernetes/weblogic/domain/model/DomainSpec.java
robustness-copilot_data_212
/** * Returns true if one of the servers in the cluster has the specified name. * * @param serverName the name to look for * @return true or false */ public boolean hasNamedServer(String serverName){ return getServerConfigs().stream().anyMatch(c -> serverName.equals(c.getName())); }
/operator/src/main/java/oracle/kubernetes/operator/wlsconfig/WlsClusterConfig.java
robustness-copilot_data_213
/** * Checks if the agent has a valid transport URI set. * * @param agent Agent to check * @return true if the Agent's transport URI is in the proper form */ private boolean isDispatcherTransportURI(final Agent agent){ final String transportURI = agent.getConfiguration().getTransportURI();...
/bundle/src/main/java/com/adobe/acs/commons/replication/dispatcher/DispatcherFlushFilter.java
robustness-copilot_data_214
/** * An iterator over {@code FileSegment} for the {@code DocumentCollection} iterable. * A collection is comprised of one or more file segments. */ public final Iterator<FileSegment<T>> iterator(){ List<Path> paths = discover(this.path); Iterator<Path> pathsIterator = paths.iterator(); return new...
/src/main/java/io/anserini/collection/DocumentCollection.java
robustness-copilot_data_215
/** * Factory method used to create {@link MappingIterator} instances; * either default, or custom subtype. * * @since 2.5 */ protected MappingIterator<T> _newIterator(JsonParser p, DeserializationContext ctxt, JsonDeserializer<?> deser, boolean parserManaged){ return new MappingIterator<...
/src/main/java/com/fasterxml/jackson/databind/ObjectReader.java
robustness-copilot_data_216
/** * Add extended tetrahedral stereo configuration to the Beam GraphBuilder. * * @param et stereo element specifying tetrahedral configuration * @param gb the current graph builder * @param indices atom indices */ private static void addExtendedTetrahedralConfiguration(Extended...
/storage/smiles/src/main/java/org/openscience/cdk/smiles/CDKToBeam.java
robustness-copilot_data_217
/** * Expands the given Node in the routing algorithm; may be overridden in * sub-classes. * * @param outNode * The Node to be expanded. * @param toNode * The target Node of the route. * @param pendingNodes * ...
/matsim/src/main/java/org/matsim/core/router/Dijkstra.java
robustness-copilot_data_218
/** Build a reverse index for every join column in the table. */ private List<Index> buildIndexesForJoinColumns(List<Integer> joinColumnIndexes, Table table){ return joinColumnIndexes.stream().map(c -> indexFor(table, c)).collect(Collectors.toList()); }
/core/src/main/java/tech/tablesaw/joining/DataFrameJoiner.java
robustness-copilot_data_219
/** * Randomly generates a single, connected, correctly bonded structure from * a number of fragments. IMPORTANT: The AtomContainers in the set must be * connected. If an AtomContainer is disconnected, no valid result will * be formed * @param atomContainers The fragments to generate for. ...
/tool/structgen/src/main/java/org/openscience/cdk/structgen/stochastic/PartialFilledStructureMerger.java
robustness-copilot_data_220
/** * Gets structure from InChI, and converts InChI library data structure * into an IAtomContainer. * * @throws CDKException */ protected void generateAtomContainerFromInchi(IChemObjectBuilder builder) throws CDKException{ InchiInput input = output.getInchiInput(); molecule = builder....
/storage/inchi/src/main/java/org/openscience/cdk/inchi/InChIToStructure.java
robustness-copilot_data_221
/** * Does a layout of all aliphatic parts connected to the parts of the molecule * that have already been laid out. Starts at the first bond with unplaced * neighbours and stops when a ring is encountered. * * @throws CDKException if an error occurs */ private void layoutAcyclicParts() t...
/tool/sdg/src/main/java/org/openscience/cdk/layout/StructureDiagramGenerator.java
robustness-copilot_data_222
/** * Registers rendering parameters from {@link IGenerator}s * with this model. * * @param generator */ public void registerParameters(IGenerator<? extends IChemObject> generator){ for (IGeneratorParameter<?> param : generator.getParameters()) { try { renderingParamete...
/display/render/src/main/java/org/openscience/cdk/renderer/RendererModel.java
robustness-copilot_data_223
/** * Method to use for adding mix-in annotations to use for augmenting * specified class or interface. All annotations from * <code>mixinSource</code> are taken to override annotations * that <code>target</code> (or its supertypes) has. * * @param target Class (or interface) whose annotat...
/src/main/java/com/fasterxml/jackson/databind/ObjectMapper.java
robustness-copilot_data_224
/** * Decode coordinates that have been placed in a byte buffer. * * @param str the string to decode * @return array of coordinates */ static Point2d[] decodeCoordinates(String str){ if (str.startsWith("|(")) { int end = str.indexOf(')', 2); if (end < 0) return ...
/tool/sdg/src/main/java/org/openscience/cdk/layout/IdentityTemplateLibrary.java
robustness-copilot_data_225
/** * Convenience function to resize the outline and maintain the existing * center point. * * @param scaleX scale x-axis * @param scaleY scale y-axis * @return resized outline */ TextOutline resize(final double scaleX, final double scaleY){ final Point2D center = getCenter(); ...
/display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/TextOutline.java
robustness-copilot_data_226
/** * Mark all values in row i allowing it to be reset later. * * @param i row index * @param marking the marking to store (should be negative) */ void markRow(int i, int marking){ for (int j = (i * mCols), end = j + mCols; j < end; j++) if (data[j] > 0) data[j] = marking; }
/base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/CompatibilityMatrix.java
robustness-copilot_data_227
/** * Put the order the List of IIsotope according the probability occurrence. * * @param isotopes_TO The List of IIsotope * @return The list of IIsotope ordered */ private List<IIsotope> orderList(List<IIsotope> isotopes_TO){ List<IIsotope> newOrderList = new ArrayList<IIsoto...
/legacy/src/main/java/org/openscience/cdk/formula/MassToFormulaTool.java
robustness-copilot_data_228
/** * Sets the converter for reading attributes of the specified class. * * @param clazz * @param converter * @return the previously registered converter for this class, or <code>null</code> if none was set before. */ public AttributeConverter<?> putAttributeConverter(final Class<?> clazz, final AttributeC...
/matsim/src/main/java/org/matsim/utils/objectattributes/ObjectAttributesXmlReader.java
robustness-copilot_data_229
/** * Query has sharding info in offline servers or not. * * @return has sharding info in offline servers or not */ public boolean hasShardingInfoInOfflineServers(){ List<String> onlineInstances = jobNodeStorage.getJobNodeChildrenKeys(InstanceNode.ROOT); int shardingTotalCount = configServ...
/elasticjob-lite/elasticjob-lite-core/src/main/java/org/apache/shardingsphere/elasticjob/lite/internal/sharding/ShardingService.java
robustness-copilot_data_230
/** * Applies the given function to each compound tag in a compound-list subtag, if that subtag * exists. * * @param key the key to look up * @param consumer the function to apply * @return true if the tag exists and was iterated over (even if it was empty); false otherwise */ public...
/src/main/java/net/glowstone/util/nbt/CompoundTag.java
robustness-copilot_data_231
/** * Melt implements the 'tidy' melt operation as described in these papers by Hadley Wickham. * * <p>Tidy concepts: {@see https://www.jstatsoft.org/article/view/v059i10} * * <p>Cast function details: {@see https://www.jstatsoft.org/article/view/v021i12} * * <p>In short, melt turns columns into ro...
/core/src/main/java/tech/tablesaw/api/Table.java
robustness-copilot_data_232
/** * Returns a StringColumn with the year and week-of-year derived from this column concatenated * into a String that will sort lexicographically in temporal order. * * <p>This simplifies the production of plots and tables that aggregate values into standard * temporal units (e.g., you want monthly data...
/core/src/main/java/tech/tablesaw/columns/datetimes/DateTimeMapFunctions.java
robustness-copilot_data_233
/** * Finds the cluster of links <pre>startLink</pre> is part of. The cluster * contains all links which can be reached starting at <code>startLink</code> * and from where it is also possible to return again to <code>startLink</code>. * * @param startLink the link to start building the cluster * @param mode...
/matsim/src/main/java/org/matsim/core/network/algorithms/MultimodalNetworkCleaner.java
robustness-copilot_data_234
/** * Generates the introspector job name based on the given domainUid. * * @param domainUid domainUid * @param serverName WebLogic server name * @return String introspector job name */ public static String toExternalServiceName(String domainUid, String serverName){ return toDns1123LegalName(Stri...
/operator/src/main/java/oracle/kubernetes/operator/helpers/LegalNames.java
robustness-copilot_data_235
/** * Queues a 'picture' message to the socket (or actor), so it can be sent. * * @param picture The picture is a string that defines the type of each frame. * This makes it easy to send a complex multiframe message in * one call. The picture can contain any of the...
/src/main/java/org/zeromq/proto/ZPicture.java
robustness-copilot_data_236
/** * Position the charge label on the top right of either the element or hydrogen label. Where the * charge is placed depends on the number of hydrogens and their position relative to the * element symbol. * * @param hydrogens number of hydrogen * @param position position of hydrogen ...
/display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/StandardAtomGenerator.java
robustness-copilot_data_237
/** * Gererates the plain-text email sections for sets of Health Check Execution Results. * * @param title The section title * @param results the Health Check Execution Results to render as plain text * @return the String for this section to be embedded in the e-mail */ protected String ...
/bundle/src/main/java/com/adobe/acs/commons/hc/impl/HealthCheckStatusEmailer.java
robustness-copilot_data_238
/** * Returns the Iterator to atoms making up this bond. * Iterator.remove() is not implemented. * * @return An Iterator to atoms participating in this bond * @see #setAtoms */ public Iterable<IAtom> atoms(){ return new Iterable<IAtom>() { @Override public Iterator<IA...
/base/data/src/main/java/org/openscience/cdk/Bond.java
robustness-copilot_data_239
/** * Create the schema type entity, with the corresponding schema attributes and relationships if it doesn't exist or * updates the existing one. * * @param userId the name of the calling user * @param schemaType the schema type values * @param externalSourceName the u...
/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineSchemaTypeHandler.java
robustness-copilot_data_240
/** * This method multiply all the element over a value. * * @param formula Formula to correct * @param factor Factor to multiply * @return Formula with the correction */ private static String muliplier(String formula, int factor){ String finalformula = ""; String recentEl...
/tool/formula/src/main/java/org/openscience/cdk/tools/manipulator/MolecularFormulaManipulator.java
robustness-copilot_data_241
/** * Removes a single instance of the specified element from this * queue, if it is present. * * @return <tt>true</tt> if the queue contained the specified * element. */ public boolean remove(E value){ if (value == null) return false; int index = indices[this.getIndex(value)]; ...
/matsim/src/main/java/org/matsim/core/router/priorityqueue/BinaryMinHeap.java
robustness-copilot_data_242
/** * Parse the input parameters into the form needed to call workflowInstanceRemover. The results are set into * instance variables. Method is package scope for unit testing. * * @throws ParseException * if the date is in an invalid format. * @throws PatternSyntaxException ...
/bundle/src/main/java/com/adobe/acs/commons/mcp/impl/processes/WorkflowRemover.java
robustness-copilot_data_243
/** * Method that can be used to serialize any Java value as * a byte array. Functionally equivalent to calling * {@link #writeValue(Writer,Object)} with {@link java.io.ByteArrayOutputStream} * and getting bytes, but more efficient. * Encoding used will be UTF-8. *<p> * Note: prior to...
/src/main/java/com/fasterxml/jackson/databind/ObjectMapper.java
robustness-copilot_data_244
/** * Utility method for shifting a specified value in an index to the back * (see {@link #permutation(int[])}). * * @param neighbors list of neighbors * @param v the value to shift to the back * @return <i>neighbors</i> array */ static int[] moveToBack(int[] neighbors, int v...
/tool/hash/src/main/java/org/openscience/cdk/hash/stereo/GeometricDoubleBondEncoderFactory.java
robustness-copilot_data_245
/** * Reads the property block from the {@code input} setting the values in the * container. * * @param input input resource * @param container the structure with atoms / bonds present * @param nAtoms the number of atoms in the atoms block * @throws IOException low-level IO err...
/storage/ctab/src/main/java/org/openscience/cdk/io/MDLV2000Reader.java
robustness-copilot_data_246
/** * Process the Web request and (optionally) delegate to the next * {@code ShenyuPlugin} through the given {@link ShenyuPluginChain}. * * @param exchange the current server exchange * @param chain provides a way to delegate to the next plugin * @return {@code Mono<Void>} to indicate w...
/shenyu-plugin/shenyu-plugin-base/src/main/java/org/apache/shenyu/plugin/base/AbstractShenyuPlugin.java
robustness-copilot_data_247
/** * Factory method for constructing {@link ObjectReader} that will * read values of a type {@code List<type>}. * Functionally same as: *<pre> * readerFor(type[].class); *</pre> * * @since 2.11 */ public ObjectReader readerForArrayOf(Class<?> type){ return _newReade...
/src/main/java/com/fasterxml/jackson/databind/ObjectMapper.java
robustness-copilot_data_248
/** * Reads the introspector config map for the specified domain, populating the following packet entries. * INTROSPECTION_STATE_LABEL the value of the domain's 'introspectVersion' when this map was created * * @param ns the namespace of the domain * @param domainUid the unique domain ID * ...
/operator/src/main/java/oracle/kubernetes/operator/helpers/ConfigMapHelper.java
robustness-copilot_data_249
/** * writes a single frame in XYZ format to the Writer. * @param mol the Molecule to write */ public void writeMolecule(IAtomContainer mol) throws IOException{ String st = ""; boolean writecharge = true; try { String s1 = "" + mol.getAtomCount(); writer.write(s1, 0, s1.length()...
/storage/io/src/main/java/org/openscience/cdk/io/XYZWriter.java
robustness-copilot_data_250
/** {@inheritDoc} * Function is called by the main program and serves as a starting point for the comparison procedure. * * @param shouldMatchBonds */ public synchronized void searchMCS(boolean shouldMatchBonds){ List<List<Integer>> mappings = null; try { if (source.getAtomCount() >...
/legacy/src/main/java/org/openscience/cdk/smsd/algorithm/mcsplus/MCSPlusHandler.java
robustness-copilot_data_251
/** * Save the inputstream to a binary property under the cache entry node. * @throws RepositoryException */ private void populateBinaryContent() throws RepositoryException{ final Node contents = getOrCreateByPath(entryNode, JCRHttpCacheStoreConstants.PATH_CONTENTS, JcrConstants.NT_FILE, JcrConstant...
/bundle/src/main/java/com/adobe/acs/commons/httpcache/store/jcr/impl/writer/EntryNodeWriter.java
robustness-copilot_data_252
/** * Find all the resources needed for the package definition. * * @param resourceResolver the resource resolver to find the resources * @param language the Query language * @param statement the Query statement * @param relPath the relative path to resolve against ...
/bundle/src/main/java/com/adobe/acs/commons/util/impl/QueryHelperImpl.java
robustness-copilot_data_253
/** * Creates asynchronous step to read WebLogic server state from a particular pod. * * @param info the domain presence * @param pod The pod * @param serverName Server name * @param timeoutSeconds Timeout in seconds * @return Created step */ private static Step createServerStatusReaderStep(Dom...
/operator/src/main/java/oracle/kubernetes/operator/ServerStatusReader.java
robustness-copilot_data_254
/** * Find a a Location obove or below the specified Location, which is on ground. * * <p>The returned Location will be at the center of the block, X and Y wise. * * @param spawn The Location a safe spawn position should be found at. * @return The location to spawn the player at. */ ...
/src/main/java/net/glowstone/entity/GlowPlayer.java
robustness-copilot_data_255
/** * Checks an atom to see if it should be drawn. There are three reasons * not to draw an atom - a) no coordinates, b) an invisible hydrogen or * c) an invisible carbon. * * @param atom the atom to check * @param container the atom container the atom is part of * @param model the re...
/display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/BasicAtomGenerator.java
robustness-copilot_data_256
/** * Convert the serialized JSON data found in the node property to Resources. * * @return the list of children sorting using the comparator. * @throws InvalidDataFormatException */ private List<SyntheticChildAsPropertyResource> deserialize() throws InvalidDataFormatException{ final long ...
/bundle/src/main/java/com/adobe/acs/commons/synth/children/ChildrenAsPropertyResource.java
robustness-copilot_data_257
/** * Step through the record, character by character, extracting each column and enduring that escaped double quotes * and other tricks found in CSV files are handled. * * @param fileRecord a single record from the CSV file store * @return an array of column values extracted from the record ...
/open-metadata-implementation/adapters/open-connectors/data-store-connectors/file-connectors/csv-file-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/datastore/csvfile/CSVFileStoreConnector.java
robustness-copilot_data_258
/** * Construct the folder structure in which a data file is stored all the way to the SoftwareServerCapability. Care is * taken to maintain uniqueness of the relationship NestedFile that is between the file and the first folder. * * @param fileGuid data file guid * @param pathName ...
/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineFolderHierarchyHandler.java
robustness-copilot_data_259
/** * Flip the storage order of atoms in a bond. * @param bond the bond */ private void flip(IBond bond){ bond.setAtoms(new IAtom[] { bond.getEnd(), bond.getBegin() }); }
/storage/inchi/src/main/java/org/openscience/cdk/inchi/InChIToStructure.java
robustness-copilot_data_260
/** * Formats an integer to fit into the connection table and changes it * to a String. * * @param x The int to be formated * @param n Length of the String * @return The String to be written into the connectiontable */ protected static String formatMDLInt(int x, int n){ char[] bu...
/storage/ctab/src/main/java/org/openscience/cdk/io/MDLV2000Writer.java
robustness-copilot_data_261
/** * Convert the a character (from an MDL V2000 input) to a charge value: * 1 = +1, 2 = +2, 3 = +3, 4 = doublet radical, 5 = -1, 6 = -2, 7 = -3. * * @param c a character * @return formal charge */ private static int toCharge(final char c){ switch(c) { case '1': re...
/storage/ctab/src/main/java/org/openscience/cdk/io/MDLV2000Reader.java
robustness-copilot_data_262
/** * Returns a selection for all records that don't match both of the given functions. In other * words, if both sel1 and sel2 are true, the record as a whole is false, and if either (or both) * of sel1 or sel2 is {@code false}, the record as a whole is {@code true}. */ public static Function<Table, Selec...
/core/src/main/java/tech/tablesaw/api/QuerySupport.java
robustness-copilot_data_263
/** * Looking if the Atom belongs to the halogen family. * * @param atom The IAtom * @return True, if it belongs */ private boolean familyHalogen(IAtom atom){ String symbol = atom.getSymbol(); return symbol.equals("F") || symbol.equals("Cl") || symbol.equals("Br") || symbol.equ...
/descriptor/qsaratomic/src/main/java/org/openscience/cdk/qsar/descriptors/atomic/IPAtomicHOSEDescriptor.java
robustness-copilot_data_264
/** * Adds the specified module / config-group with the specified name to the * configuration. * <p></p> * This is the typical way to "materialize" material that, so far, exists only as Map, into a specialized module. * @param specializedConfigModule * * @throws IllegalArgumentException * if...
/matsim/src/main/java/org/matsim/core/config/Config.java
robustness-copilot_data_265
/** * Determine the length of the line excluding trailing whitespace. * * @param str a string * @return the length when trailing white space is removed */ static int length(final String str){ int i = str.length() - 1; while (i >= 0 && str.charAt(i) == ' ') { i--; } retu...
/storage/ctab/src/main/java/org/openscience/cdk/io/MDLV2000Reader.java
robustness-copilot_data_266
/** * Run the {@link OnDeployScript}, if it has not previously been run successfully. * @param resourceResolver the resource resolver to use when running * @param script the script to run. * @return true if the script is executed, false if it has previous been run successfully */ protected boo...
/bundle/src/main/java/com/adobe/acs/commons/ondeploy/impl/OnDeployExecutorImpl.java
robustness-copilot_data_267
/** * Get all paths of lengths 0 to the specified length. * * This method will find all paths upto length N starting from each atom in the molecule and return the unique set * of such paths. * * @param container The molecule to search * @return A map of path strings, keyed on themselv...
/descriptor/fingerprint/src/main/java/org/openscience/cdk/fingerprint/ShortestPathFingerprinter.java
robustness-copilot_data_268
/** * Method that can be used to find primitive type for given class if (but only if) * it is either wrapper type or primitive type; returns {@code null} if type is neither. * * @since 2.7 */ public static Class<?> primitiveType(Class<?> type){ if (type.isPrimitive()) { return type...
/src/main/java/com/fasterxml/jackson/databind/util/ClassUtil.java
robustness-copilot_data_269
/** * Checks if the hook has content meaning as it has at least attachment or result with error message. * * @return <code>true</code> if the hook has content otherwise <code>false</code> */ public boolean hasContent(){ if (embeddings.length > 0) { // assuming that if the embedding exis...
/src/main/java/net/masterthought/cucumber/json/Hook.java
robustness-copilot_data_270
/** * Obtain the InChI auxiliary info for the provided structure using * using the specified InChI options. * * @param container the structure to obtain the numbers of * @return auxiliary info * @throws CDKException the inchi could not be generated */ static String auxInfo(IAtomCon...
/storage/inchi/src/main/java/org/openscience/cdk/graph/invariant/InChINumbersTools.java
robustness-copilot_data_271
/** * Calculates the orbits of the atoms of the molecule. * * @return a list of orbits */ public List<Orbit> calculateOrbits(){ List<Orbit> orbits = new ArrayList<Orbit>(); List<SymmetryClass> symmetryClasses = super.getSymmetryClasses(); for (SymmetryClass symmetryClass : symmetryClass...
/descriptor/signature/src/main/java/org/openscience/cdk/signature/MoleculeSignature.java
robustness-copilot_data_272
/** * Checks if the agent has valid CQ-Action-Scope: ResourceOnly header. * * @param agent Agent to check * @return true if the Agent's headers contain the expected values */ private boolean isResourceOnly(final Agent agent){ final ValueMap properties = agent.getConfiguration().getProperti...
/bundle/src/main/java/com/adobe/acs/commons/replication/dispatcher/DispatcherFlushFilter.java
robustness-copilot_data_273
/** * Format local date time from timestamp local date time. * * @param timestamp the timestamp * @return the local date time */ public static LocalDateTime formatLocalDateTimeFromTimestamp(final Long timestamp){ return LocalDateTime.ofEpochSecond(timestamp / 1000, 0, ZoneOffset.ofHours(8)...
/shenyu-common/src/main/java/org/apache/shenyu/common/utils/DateUtils.java
robustness-copilot_data_274
/** * Appends an empty row and returns a Row object indexed to the newly added row so values can be * set. * * <p>Intended usage: * * <p>for (int i = 0; ...) { Row row = table.appendRow(); row.setString("name", "Bob"); * row.setFloat("IQ", 123.4f); ...etc. } */ public Row appendRow(){ for (...
/core/src/main/java/tech/tablesaw/api/Table.java
robustness-copilot_data_275
/** * Computes the (expected or planned) activity end time, depending on the configured time interpretation. */ public static OptionalTime decideOnActivityEndTime(Activity act, double now, Config config){ return decideOnActivityEndTime(act, now, config.plans().getActivityDurationInterpretation())...
/matsim/src/main/java/org/matsim/core/population/PopulationUtils.java
robustness-copilot_data_276
/** * Aggregates a set of checksum entries into a single checksum value. * @param checksums the checksums * @return the checksum value */ protected String aggregateChecksums(final Map<String, String> checksums){ if (checksums.isEmpty()) { return null; } StringBuilder data = new ...
/bundle/src/main/java/com/adobe/acs/commons/analysis/jcrchecksum/impl/ChecksumGeneratorImpl.java
robustness-copilot_data_277
/** * Adds an automatically calculated offset to the coordinates of all atoms * such that all coordinates are positive and the smallest x or y coordinate * is exactly zero. * See comment for center(IAtomContainer atomCon, Dimension areaDim, HashMap renderingCoordinates) for details on coordinate...
/legacy/src/main/java/org/openscience/cdk/geometry/GeometryTools.java
robustness-copilot_data_278
/** * Compute the permutation parity of the values {@code vs}. The parity is * whether we need to do an odd or even number of swaps to put the values in * sorted order. * * @param vs values * @return parity of the permutation (odd = -1, even = +1) */ private int permutationParity(int...
/base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/StereoMatch.java
robustness-copilot_data_279
/** * Test whether the subtag with the given key is of {@link List} type. * * @param key the key to look up * @param type the {@link TagType} of the list's elements * @return true if the subtag exists and is a {@link List}; false otherwise */ public boolean isList(@NonNls String key, TagT...
/src/main/java/net/glowstone/util/nbt/CompoundTag.java
robustness-copilot_data_280
/** * Count and find first heavy atom(s) (non Hydrogens) in a chain. * * @param molecule the reference molecule for searching the chain * @param chain chain to be searched * @return the atom number of the first heavy atom the number of heavy atoms in the chain */ public int[] f...
/tool/builder3d/src/main/java/org/openscience/cdk/modeling/builder3d/AtomPlacer3D.java
robustness-copilot_data_281
/** * Makes sure that the travel times "make sense". * <p></p> * Imagine short bin sizes (e.g. 5min), small links (e.g. 300 veh/hour) * and small sample sizes (e.g. 2%). This would mean that effectively * in the simulation only 6 vehicles can pass the link in one hour, * one every 10min. So, the travel time...
/matsim/src/main/java/org/matsim/core/trafficmonitoring/TravelTimeCalculator.java
robustness-copilot_data_282
/** * Attempts to discover classes that are assignable to the type provided. In the case * that an interface is provided this method will collect implementations. In the case * of a non-interface class, subclasses will be collected. Accumulated classes can be * accessed by calling {@link #getClasses()}. ...
/src/main/java/org/apache/ibatis/io/ResolverUtil.java
robustness-copilot_data_283
/** * Checks if one of the loaded templates is a substructure in the given * Molecule. If so, it assigns the coordinates from the template to the * respective atoms in the Molecule, and marks the atoms as ISPLACED. * * @param molecule The molecule to be check for potential templates * @ret...
/tool/sdg/src/main/java/org/openscience/cdk/layout/TemplateHandler.java
robustness-copilot_data_284
/** * Check whether the node is marked as count station. If that is the case, migrate its count data to outCounts and mark it as non modifiable * @param node The node to be checked */ private void checkNodeIsMarkedAsCountStation(Node node){ Link linkToBlock = null; if (this.shortName...
/contribs/vsp/src/main/java/playground/vsp/andreas/osmBB/PTCountsNetworkSimplifier.java
robustness-copilot_data_285
/** * Tests if the electron count matches the H&uuml;ckel 4n+2 rule. */ private static boolean isHueckelValid(IAtomContainer singleRing) throws CDKException{ int electronCount = 0; for (IAtom ringAtom : singleRing.atoms()) { if (ringAtom.getHybridization() != CDKConstants.UNSET && (ringAtom.g...
/legacy/src/main/java/org/openscience/cdk/aromaticity/DoubleBondAcceptingAromaticityDetector.java
robustness-copilot_data_286
/** * Returns the largest ("top") n values in the column. Does not change the order in this column * * @param n The maximum number of records to return. The actual number will be smaller if n is * greater than the number of observations in the column * @return A list, possibly empty, of the largest o...
/core/src/main/java/tech/tablesaw/api/TimeColumn.java
robustness-copilot_data_287
/** * Check whether the cloud job is disabled or not. * * @param jobName job name * @return true is disabled, otherwise not */ public boolean isDisabled(@Param(name = "jobName", source = ParamSource.PATH) final String jobName){ return facadeService.isJobDisabled(jobName); }
/elasticjob-cloud/elasticjob-cloud-scheduler/src/main/java/org/apache/shardingsphere/elasticjob/cloud/console/controller/CloudJobController.java
robustness-copilot_data_288
/** * Pops and pushes its ways through the InChI connection table to build up a simple molecule. * @param inputInchi user input InChI * @param inputMolecule user input molecule * @param inchiAtomsByPosition * @return molecule with single bonds and no hydrogens. */ private IAtomContainer c...
/tool/tautomer/src/main/java/org/openscience/cdk/tautomers/InChITautomerGenerator.java
robustness-copilot_data_289
/** * Calculates the FMF descriptor value for the given {@link IAtomContainer}. * * @param container An {@link org.openscience.cdk.interfaces.IAtomContainer} for which this descriptor * should be calculated * @return An object of {@link org.openscience.cdk.qsar.DescriptorValue}...
/descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/FMFDescriptor.java
robustness-copilot_data_290
/** * Create job running context from job configuration and execution type. * * @param cloudJobConfig cloud job configuration * @param type execution type * @return Job running context */ public static JobContext from(final CloudJobConfiguration cloudJobConfig, final ExecutionType type){ ...
/elasticjob-cloud/elasticjob-cloud-scheduler/src/main/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/context/JobContext.java
robustness-copilot_data_291
/** * Utility to determine if the specified mass is the major isotope for the given atomic number. * * @param number atomic number * @param mass atomic mass * @return the mass is the major mass for the atomic number */ private boolean isMajorIsotope(int number, int mass){ try { ...
/display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/StandardAtomGenerator.java
robustness-copilot_data_292
/** * Convenience method for generateChecksums(session, path, new DefaultChecksumGeneratorOptions()). * * @param session the session * @param path tthe root path to generate checksums for * @return the map of abs path ~&gt; checksums * @throws RepositoryException * @throws IOExceptio...
/bundle/src/main/java/com/adobe/acs/commons/analysis/jcrchecksum/impl/ChecksumGeneratorImpl.java
robustness-copilot_data_293
/** * Generate the next pseudorandom number for the provided <i>seed</i>. * * @param seed random number seed * @return the next pseudorandom number */ long next(long seed){ seed = seed ^ seed << 21; seed = seed ^ seed >>> 35; return seed ^ seed << 4; }
/tool/hash/src/main/java/org/openscience/cdk/hash/Xorshift.java
robustness-copilot_data_294
/** * Return the variable name by removing invalid characters and proper escaping if * it's a reserved word. * * @param name the variable name * @return the sanitized variable name */ public String toVarName(final String name){ if (reservedWords.contains(name)) { return escape...
/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java
robustness-copilot_data_295
/** * Check a permutation to see if it is better, equal, or worse than the * current best. * * @param perm the permutation to check * @return BETTER, EQUAL, or WORSE */ private Result compareRowwise(Permutation perm){ int m = perm.size(); for (int i = 0; i < m - 1; i++) { ...
/tool/group/src/main/java/org/openscience/cdk/group/AbstractDiscretePartitionRefiner.java
robustness-copilot_data_296
/** * Returns the "contents" field of a document based on an internal Lucene docid. * The method is named to be consistent with Lucene's {@link IndexReader#document(int)}, contra Java's standard * method naming conventions. * * @param ldocid internal Lucene docid * @return the "contents" f...
/src/main/java/io/anserini/search/SimpleImpactSearcher.java
robustness-copilot_data_297
/** * Get sandbox of the cloud job by app name. * * @param appName application name * @return sandbox info * @throws JsonParseException parse json exception */ public Collection<Map<String, String>> sandbox(@Param(name = "appName", source = ParamSource.QUERY) final String appName) throws ...
/elasticjob-cloud/elasticjob-cloud-scheduler/src/main/java/org/apache/shardingsphere/elasticjob/cloud/console/controller/CloudOperationController.java
robustness-copilot_data_298
/** * Push frame plus empty frame to front of message, before 1st frame. * Message takes ownership of frame, will destroy it when message is sent. * @param frame */ public ZMsg wrap(ZFrame frame){ if (frame != null) { push(new ZFrame("")); push(frame); } return this; }
/src/main/java/org/zeromq/ZMsg.java
robustness-copilot_data_299
/** * Find out if the PortAlias object is already stored in the repository. It uses the fully qualified name to retrieve the entity * * @param userId the name of the calling user * @param qualifiedName the qualifiedName name of the process to be searched * * @return optional with en...
/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEnginePortHandler.java
robustness-copilot_data_300
/** * Determines if all this {@link IAtomContainer}'s atoms contain 3D coordinates. If any atom * is null or has unset 3D coordinates this method will return false. If the provided * container is null false is returned. * * @param container the atom container to examine * * @return in...
/legacy/src/main/java/org/openscience/cdk/geometry/GeometryTools.java