id
stringlengths
25
27
content
stringlengths
190
15.4k
max_stars_repo_path
stringlengths
31
217
robustness-copilot_data_101
/** * Creates a new {@link Carriers} container only with {@link CarrierShipment}s * for creating a new VRP. As consequence of the transformation of * {@link CarrierService}s to {@link CarrierShipment}s the solution of the VRP * can have tours with vehicles returning to the depot and ...
/contribs/freight/src/main/java/org/matsim/contrib/freight/utils/FreightUtils.java
robustness-copilot_data_102
/** * Returns true if the first metadata indicates a newer resource than does the second. 'Newer' * indicates that the creation time is later. If two items have the same creation time, a higher * resource version indicates the newer resource. * * @param first the first item to compare * @param second...
/operator/src/main/java/oracle/kubernetes/operator/helpers/KubernetesUtils.java
robustness-copilot_data_103
/** * Create a pattern which can be used to find molecules which contain the * {@code query} structure. * * @param query the substructure to find * @return a pattern for finding the {@code query} */ public static Pattern findSubstructure(IAtomContainer query){ boolean isQuery = query ...
/base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/Ullmann.java
robustness-copilot_data_104
/** * Creates a new CronDefinition instance with provided field definitions. * * @return returns CronDefinition instance, never null */ public CronDefinition instance(){ final Set<CronConstraint> validations = new HashSet<>(); validations.addAll(cronConstraints); final List<FieldDefinit...
/src/main/java/com/cronutils/model/definition/CronDefinitionBuilder.java
robustness-copilot_data_105
/** * Check if the specified access token can be authenticated. * * @param principal The user, group or service account. * @param token The access token that identifies the user. * @param namespace Namespace * @return V1TokenReviewStatus containing either info about the authenticated user or an error ...
/operator/src/main/java/oracle/kubernetes/operator/helpers/AuthenticationProxy.java
robustness-copilot_data_106
/** * Un-sign a value, previously signed with {@link #sign(String, String)}. * Produces a nonnull value or <code>null</code> for invalid. * * @param value A signed value. * @param secret A secret key. * @return A new signed value or null. */ public static String unsign(@Nonnull final String value,...
/jooby/src/main/java/io/jooby/Cookie.java
robustness-copilot_data_107
/** * kekuliseAromaticRings - function to add double/single bond order information for molecules having rings containing all atoms marked SP2 or Planar3 hybridisation. * @param molecule The {@link IAtomContainer} to kekulise * @return The {@link IAtomContainer} with kekule structure * @throws CDKExc...
/legacy/src/main/java/org/openscience/cdk/smiles/FixBondOrdersTool.java
robustness-copilot_data_108
/** * Creates a step to initiate processing for all servers in the domain for which a configuration is defined, * checking the configuration of each exporter sidecar and updating it if necessary. * * Expects packet to contain DomainPresenceInfo and: * DOMAIN_TOPOLOGY the domain configura...
/operator/src/main/java/oracle/kubernetes/operator/steps/MonitoringExporterSteps.java
robustness-copilot_data_109
/** * Helper method for adding isotope distributions to a MF. The method adds * a distribution of isotopes by splitting the set of isotopes in two, * the one under consideration (specified by 'idx') and the remaining to be * considered ('&gt;idx'). The inflection point is calculate as 'k' * &le...
/tool/formula/src/main/java/org/openscience/cdk/tools/manipulator/MolecularFormulaManipulator.java
robustness-copilot_data_110
/** * Calculate new point(s) X in a B-A-C system, it forms a B-A(-C)-X * system. (2) 2 ligands(B, C) of refAtom A (i) 1 points required; vector in * ABC plane bisecting AB, AC. If ABC is linear, no points (ii) 2 points: 2 * points X1, X2, X1-A-X2 = angle about 2i vector * *@param aPoi...
/tool/builder3d/src/main/java/org/openscience/cdk/modeling/builder3d/AtomTetrahedralLigandPlacer3D.java
robustness-copilot_data_111
/** * Possibly update our belief of the earliest time that a Mortal child StateComponent will * expire. It is safe to call this method with all child Dates: it will update the * _earliestChildExpiry Date correctly. * * @param newDate the expiry Date of a Mortal child StateComponent */ pr...
/modules/dcache-info/src/main/java/org/dcache/services/info/base/StateComposite.java
robustness-copilot_data_112
/** * Using an import map created via {@link #getAllImportsMappings(Set)} to build a list import objects. * The import objects have two keys: import and classname which hold the key and value of the initial map entry. * * @param mappedImports Map of fully qualified import and import * @return T...
/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java
robustness-copilot_data_113
/** * Find out if the Transformation Project object is already stored in the repository as a Collection. 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 * ...
/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineCollectionHandler.java
robustness-copilot_data_114
/** * Check the feasibility of the candidate pair {n, m}. A candidate pair is * syntactically feasible iff all k-look-ahead rules hold. These look ahead * rules check adjacency relation of the mapping. If an edge is mapped in g1 * it should also be mapped in g2 and vise-versa (0-look-ahead). If an e...
/base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/VFState.java
robustness-copilot_data_115
/** * Returns a table consisting of randomly selected records from this table. The sample size is * based on the given proportion * * @param proportion The proportion to go in the sample */ public Table sampleX(double proportion){ Preconditions.checkArgument(proportion <= 1 && proportion >= 0, "The ...
/core/src/main/java/tech/tablesaw/api/Table.java
robustness-copilot_data_116
/** * Creates the e-mail template parameter map and invokes the OSGi E-Mail Service. * * @param success the list of successful Health Check Execution Results * @param failure the list of unsuccessful Health Check Execution Results * @param timeTaken the time taken to execute all Health Checks ...
/bundle/src/main/java/com/adobe/acs/commons/hc/impl/HealthCheckStatusEmailer.java
robustness-copilot_data_117
/** * If the hydrogens are position in from of the element we may need to move the hydrogen and * hydrogen count labels. This code assesses the positions of the mass, hydrogen, and hydrogen * count labels and determines the x-axis adjustment needed for the hydrogen label to dodge a * collision. ...
/display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/StandardAtomGenerator.java
robustness-copilot_data_118
/** * Merges the values found in the the source properties into the destination * property as a multi-value. The values of the source properties and * destination properties must all be the same property type. * * The unique set of properties will be stored in * * @param resource the ...
/bundle/src/main/java/com/adobe/acs/commons/wcm/impl/PropertyMergePostProcessor.java
robustness-copilot_data_119
/** * The method does not copy the message object - only the encoded message stream (if any). */ public CellMessage clone(){ try { CellMessage copy = (CellMessage) super.clone(); copy._destination = _destination.clone(); if (_source != null) { copy._source = _source.cl...
/modules/cells/src/main/java/dmg/cells/nucleus/CellMessage.java
robustness-copilot_data_120
/** * Returns a fingerprint from a Base64 encoded Pubchem fingerprint. * * @param enc The Base64 encoded fingerprint * @return A BitSet corresponding to the input fingerprint */ public static BitSet decode(String enc){ byte[] fp = base64Decode(enc); if (fp.length < 4) { throw n...
/descriptor/fingerprint/src/main/java/org/openscience/cdk/fingerprint/PubchemFingerprinter.java
robustness-copilot_data_121
/** * Provide download URL if no Terms of Use, no guestbook, and not * restricted. */ public static boolean isPubliclyDownloadable(FileMetadata fileMetadata){ if (fileMetadata == null) { return false; } if (fileMetadata.isRestricted()) { String msg = "Not publicly downloadabl...
/src/main/java/edu/harvard/iq/dataverse/util/FileUtil.java
robustness-copilot_data_122
/** * Return a hash code based on the values of this object. * * @return in hash code */ public int hashCode(){ return Objects.hash(getType(), getInstanceProvenanceType(), getMetadataCollectionId(), getMetadataCollectionName(), getInstanceLicense(), getCreatedBy(), getUpdatedBy(), getCreateTime...
/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/connectors/stores/metadatacollectionstore/properties/instances/InstanceAuditHeader.java
robustness-copilot_data_123
/** * Verify whether the WebLogic domain already has all the machines configured for use by the * dynamic cluster. For example, if machineNamePrefix is "domain1-cluster1-machine" and * numMachinesNeeded is 2, this method return true if machines named "domain1-cluster1-machine1" * and "domain1-cluster1-machi...
/operator/src/main/java/oracle/kubernetes/operator/wlsconfig/WlsClusterConfig.java
robustness-copilot_data_124
/** * Check if files in the certificate folders have been added or removed. */ boolean checkForChanges(){ final Map<File, byte[]> presents = new HashMap<>(fingerprints); boolean modified = traverseDirectory(location, new IFileVisitor() { @Override public boolean visitFile(File file)...
/src/main/java/org/zeromq/ZCertStore.java
robustness-copilot_data_125
/** * Create a stereo encoder for all potential 2D and 3D tetrahedral * elements. * * @param container an atom container * @param graph adjacency list representation of the container * @return a new encoder for tetrahedral elements */ public StereoEncoder create(IAtomContainer co...
/tool/hash/src/main/java/org/openscience/cdk/hash/stereo/GeometricTetrahedralEncoderFactory.java
robustness-copilot_data_126
/** * As it is possible that some implementations embed byte[] as POJONode * (despite optimal being {@link BinaryNode}), let's add support for exposing * binary data here too. */ public byte[] binaryValue() throws IOException{ if (_value instanceof byte[]) { return (byte[]) _value; ...
/src/main/java/com/fasterxml/jackson/databind/node/POJONode.java
robustness-copilot_data_127
/** * Checks whether both atoms are involved in an amide C-N bond: *N(*)C(*)=O. * * Only the most common constitution is considered. Tautomeric, O\C(*)=N\*, * and charged forms, [O-]\C(*)=N\*, are ignored. * * @param atom0 the first bonding partner * @param atom1 the second bonding pa...
/descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/RotatableBondsCountDescriptor.java
robustness-copilot_data_128
/** * Parse the json string containing WLS configuration and return a list containing a map of * (server attribute name, attribute value). * * @param jsonString JSON string containing WLS configuration to be parsed * @return a ParsedJson object containing WebLogic domain configuration by parsing the give...
/operator/src/main/java/oracle/kubernetes/operator/wlsconfig/WlsDomainConfig.java
robustness-copilot_data_129
/** * Initialize a PatternLayout with the supplied format and throw an {@link IllegalArgumentException} * if the format is invalid. * * @param format the pattern layout format * @return a configured and started {@link PatternLayoutAdapter} instance around the supplied format * @throws Ill...
/src/main/java/net/logstash/logback/pattern/AbstractJsonPatternParser.java
robustness-copilot_data_130
/** * Converts a Lucene internal docid to a collection docid. * * @param reader index reader * @param docid Lucene internal docid * @return corresponding collection docid, or <code>null</code> if not found. */ public static String convertLuceneDocidToDocid(IndexReader reader, int docid){ if (doci...
/src/main/java/io/anserini/index/IndexReaderUtils.java
robustness-copilot_data_131
/** * Generate a compact element for an atom, such as a circle or a square, * rather than text element. * * @param atom the atom to generate the compact element for * @param model the renderer model * @return a compact rendering element */ public IRenderingElement generateCompactElem...
/display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/BasicAtomGenerator.java
robustness-copilot_data_132
/** * Retrieves and removes the head of this queue, or <tt>null</tt> if this * queue is empty. * * @return the head of this queue, or <tt>null</tt> if this queue is empty. */ public E poll(){ E minValue; if (isEmpty()) return null; else { this.m...
/matsim/src/main/java/org/matsim/core/router/priorityqueue/BinaryMinHeap.java
robustness-copilot_data_133
/** * Find out if the DatabaseSchema 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 database schema to be searched * * @ret...
/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineRelationalDataHandler.java
robustness-copilot_data_134
/** * Used by {@link #sortMissingObjects(Collection, Database)} to determine whether to go into the sorting logic. */ protected boolean supportsSortingObjects(Database database){ return (database instanceof AbstractDb2Database) || (database instanceof MSSQLDatabase) || (database instanceof OracleDatabase...
/liquibase-core/src/main/java/liquibase/diff/output/changelog/DiffToChangeLog.java
robustness-copilot_data_135
/** * Returns a Selection containing all values from totalRangeStart to totalRangeEnd, except for * those in the range from excludedRangeStart to excludedRangeEnd. Start values are inclusive, end * values exclusive. */ static Selection withoutRange(int totalRangeStart, int totalRangeEnd, int excludedRange...
/core/src/main/java/tech/tablesaw/selection/Selection.java
robustness-copilot_data_136
/** * Whether the WebLogic domain contains a server with the given server name, * including standalone servers, and servers that belong to a configured or dynamic cluster. * * @param serverName server name to be checked * @return True if the WebLogic domain contains a server with the given server name ...
/operator/src/main/java/oracle/kubernetes/operator/wlsconfig/WlsDomainConfig.java
robustness-copilot_data_137
/** * Recalculates the {@link LigancyFourChirality} based on the new, given atom ordering. * * @param newOrder new order of atoms * @return the chirality following the new atom order */ public LigancyFourChirality project(ILigand[] newOrder){ ITetrahedralChirality.Stereo newStereo = this.s...
/descriptor/cip/src/main/java/org/openscience/cdk/geometry/cip/LigancyFourChirality.java
robustness-copilot_data_138
/** * Appends a throwable and recursively appends its causedby/suppressed throwables * in "reverse" order (Root cause first). */ private void appendRootCauseFirst(StringBuilder builder, String prefix, int indent, IThrowableProxy throwableProxy, Deque<String> stackHashes){ if (throwableProxy == null ...
/src/main/java/net/logstash/logback/stacktrace/ShortenedThrowableConverter.java
robustness-copilot_data_139
/** * Find out if the relationship is already stored in the repository. * It will search for relationships that have the source firstGUID and target secondGUID * * @param userId the name of the calling user * @param firstGUID the unique identifier of the entity at first...
/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineCommonHandler.java
robustness-copilot_data_140
/** * Invoke a method on an object and return whatever it returns. * * @param <T> * the generic type * @param method * The method to invoke. * @param object * The instance or class (for static methods) on which to invoke the method. * @param parameters * ...
/src/main/java/org/apache/ibatis/io/VFS.java
robustness-copilot_data_141
/** * Parse the "scope" claim and extract all SciToken or WLCG Profile scopes. */ private static List<AuthorisationSupplier> parseScope(String claim) throws InvalidScopeException{ return Splitter.on(' ').trimResults().splitToList(claim).stream().map(SciTokenPlugin::resolveScope).filter(Optional::isPresen...
/modules/gplazma2-scitoken/src/main/java/org/dcache/gplazma/scitoken/SciTokenPlugin.java
robustness-copilot_data_142
/** * Flattens properties of inline object schemas that belong to a composed schema into a * single flat list of properties. This is useful to generate a single or multiple * inheritance model. * * In the example below, codegen may generate a 'Dog' class that extends from the * generated '...
/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java
robustness-copilot_data_143
/** * Converts a {@link Resource} object into the matching {@link Order}. * * @param rdfOrder Resource for which the matching {@link Order} should be given. * @return the matching {@link Order}. */ public static Order resource2Order(Resource rdfOrder){ if (rdfOrder.equals(CDK.SINGLEBOND)) ...
/storage/iordf/src/main/java/org/openscience/cdk/libio/jena/Convertor.java
robustness-copilot_data_144
/** * Returns names of all attributes in the provided billing format. */ private static Set<String> toAttributes(String format){ Set<String> attributes = new HashSet<>(); Matcher matcher = ATTRIBUTE_PATTERN.matcher(format); while (matcher.find()) { String expression = matcher.group(1); ...
/modules/dcache/src/main/java/org/dcache/services/billing/text/BillingParserBuilder.java
robustness-copilot_data_145
/** * Create or updates an external relationship between two entities. Verifies that the relationship is not present before creating it. If the * relationship is present, verifies the instanceProperties for the relationship to be updated. * * @param userId the name of the calling use...
/open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineCommonHandler.java
robustness-copilot_data_146
/** * Obtain a prioritised array where the indices 0 to n which correspond to * the provided {@code atoms}. * * @param focus focus of the tetrahedral atom * @param atoms the atom * @param n number of atoms * @return prioritised indices */ private int[] priority(int focus, IA...
/tool/sdg/src/main/java/org/openscience/cdk/layout/NonplanarBonds.java
robustness-copilot_data_147
/** * Calculates the mass and abundance of all isotopes generated by adding one * atom. Receives the periodic table element and calculate the isotopes, if * there exist a previous calculation, add these new isotopes. In the * process of adding the new isotopes, remove those that has an abundance ...
/tool/formula/src/main/java/org/openscience/cdk/formula/IsotopePatternGenerator.java
robustness-copilot_data_148
/** * Convenience method to perceive atom types for all <code>IAtom</code>s in the * <code>IAtomContainer</code>, using the <code>CDKAtomTypeMatcher</code>. If the * matcher finds atom matching atom type, the <code>IAtom</code> will be configured * to have the same properties as the <code>IAtomType<...
/legacy/src/main/java/org/openscience/cdk/normalize/SMSDNormalizer.java
robustness-copilot_data_149
/** * Checks whether the P atom is in a PO environment. * * This environment is noted in Kier & Hall (1986), page 20 * * @param atom The P atom in question * @param atomContainer The molecule containing the P atom * @return The empirical delta V if present in the above envir...
/descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/ChiIndexUtils.java
robustness-copilot_data_150
/** * Notifies registered listeners of certain changes that have occurred in * this model. */ public void fireChange(){ if (getNotification() && listeners != null) { EventObject event = new EventObject(this); for (int i = 0; i < listeners.size(); i++) { listeners.get(i).s...
/display/render/src/main/java/org/openscience/cdk/renderer/RendererModel.java
robustness-copilot_data_151
/** * Partition the source table into a series of table slices. Does not modify the underlying table. */ private Iterable<TableSlice> partition(){ if (query.getPartitionColumns().isEmpty()) { return ImmutableList.of(new TableSlice(query.getTable())); } return query.getTable().splitOn(query.ge...
/core/src/main/java/tech/tablesaw/analytic/AnalyticQueryEngine.java
robustness-copilot_data_152
/** * Generate the whole group from the compact list of permutations. * * @return a list of permutations */ public List<Permutation> all(){ final List<Permutation> permutations = new ArrayList<Permutation>(); Backtracker counter = new Backtracker() { @Override public void a...
/tool/group/src/main/java/org/openscience/cdk/group/PermutationGroup.java
robustness-copilot_data_153
/** * Converts a {@link Model} into an {@link IAtomContainer} using the given {@link IChemObjectBuilder}. * * @param model RDF graph to deserialize into an {@link IAtomContainer}. * @param builder {@link IChemObjectBuilder} used to create new {@link IChemObject}s. * @return a {@link IAtomContai...
/storage/iordf/src/main/java/org/openscience/cdk/libio/jena/Convertor.java
robustness-copilot_data_154
/** * Check whether redirection for the given request is allowed. * <ol> * <li>On author redirects are disabled in EDIT, PREVIEW and DESIGN WCM Modes. * To test on author you need to disable WCM mode and append &wcmmode=disabled * to the query string</li> * <li>Redirects are supported only...
/bundle/src/main/java/com/adobe/acs/commons/redirects/filter/RedirectFilter.java
robustness-copilot_data_155
/** * Returns the mappings between the reactant and the product side. * * @return An Iterator to the Mappings. * @see #addMapping */ public Iterable<IMapping> mappings(){ return new Iterable<IMapping>() { @Override public Iterator<IMapping> iterator() { retu...
/base/data/src/main/java/org/openscience/cdk/Reaction.java
robustness-copilot_data_156
/** * Generates one or more SqlStatements depending on how the SQL should be parsed. * If split statements is set to true then the SQL is split and each command is made into a separate SqlStatement. * <p></p> * If stripping comments is true then any comments are removed before the splitting is execu...
/liquibase-core/src/main/java/liquibase/change/AbstractSQLChange.java
robustness-copilot_data_157
/** * Make a canonical signature string of a given height. * * @param height the maximum height to make signatures * @return the canonical signature string */ public String toCanonicalSignatureString(int height){ String canonicalSignature = null; for (int i = 0; i < getVertexCount(); i...
/descriptor/signature/src/main/java/org/openscience/cdk/signature/MoleculeSignature.java
robustness-copilot_data_158
/** * Create an encoder for the {@link ITetrahedralChirality} element. * * @param tc stereo element from an atom container * @param atomToIndex map of atoms to indices * @return a new geometry encoder */ private static GeometryEncoder encoder(ITetrahedralChirality tc, Map<IAtom, ...
/tool/hash/src/main/java/org/openscience/cdk/hash/stereo/TetrahedralElementEncoderFactory.java
robustness-copilot_data_159
/** * True, if the MolecularFormula contains the given element as IIsotope object. * * @param formula IMolecularFormula molecularFormula * @param element The element this MolecularFormula is searched for * @return True, if the MolecularFormula contains the given element object ...
/tool/formula/src/main/java/org/openscience/cdk/tools/manipulator/MolecularFormulaManipulator.java
robustness-copilot_data_160
/** * Return the isotope pattern sorted by mass * to the highest abundance. * * @param isotopeP The IsotopePattern object to sort * @return The IsotopePattern sorted */ public static IsotopePattern sortByMass(IsotopePattern isotopeP){ try { IsotopePattern isoSort = (...
/tool/formula/src/main/java/org/openscience/cdk/formula/IsotopePatternManipulator.java
robustness-copilot_data_161
/** * Calculates the distance based on the route-based distances between every tour * activities. The method also integrates the associated pickup in the tour. */ private double calculateRouteDistanceWithAssociatedPickup(JobInsertionContext context){ double routeDistance = 0; int pos...
/contribs/freight/src/main/java/org/matsim/contrib/freight/jsprit/DistanceConstraint.java
robustness-copilot_data_162
/** * Create AccessTokenAuthentication component for authenticating user represented by * the given token. * @param accessToken - User's Bearer token * @return - this CallBuilder instance */ public CallBuilder withAuthentication(String accessToken){ if (!isNullOrEmpty(accessToken)) { this.he...
/operator/src/main/java/oracle/kubernetes/operator/helpers/CallBuilder.java
robustness-copilot_data_163
/** * This function finds rings and uses aromaticity detection code to * aromatize the molecule. * @param mol input molecule */ public static void aromatizeMolecule(IAtomContainer mol){ IRingSet ringSet = null; try { AllRingsFinder arf = new AllRingsFinder(); ringSet = arf.f...
/legacy/src/main/java/org/openscience/cdk/normalize/SMSDNormalizer.java
robustness-copilot_data_164
/** * Creates a copy of {@code this}, with identical business logic fields. * E.g., {@link #label} would be duplicated; {@link #version} will not. * * @return A copy of {@code this}, except for the DB-related data. */ public FileMetadata createCopy(){ FileMetadata fmd = new FileMetadata()...
/src/main/java/edu/harvard/iq/dataverse/FileMetadata.java
robustness-copilot_data_165
/** * Checks if this service should react to or ignore this replication action. * * @param replicationAction The replication action that is initiating this flush request * @param replicationOptions The replication options that is initiating this flush request * @return true is this service shou...
/bundle/src/main/java/com/adobe/acs/commons/replication/dispatcher/impl/DispatcherFlushRulesImpl.java
robustness-copilot_data_166
/** * True, if the AdductFormula contains the given IIsotope object and not * the instance. The method looks for other isotopes which has the same * symbol, natural abundance and exact mass. * * @param isotope The IIsotope this AdductFormula is searched for * @return True, if...
/base/data/src/main/java/org/openscience/cdk/formula/AdductFormula.java
robustness-copilot_data_167
/** * Calculates 11 directional and 6 non-directional WHIM descriptors for. * the specified weighting scheme * * @param container Parameter is the atom container. * @return An ArrayList containing the descriptors in the order described above. */ public DescriptorValue calculate(IAtomConta...
/descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/WHIMDescriptor.java
robustness-copilot_data_168
/** * Is the {@code mapping} of the stereochemistry in the query preserved in * the target. * * @param mapping permutation of the query vertices * @return the stereo chemistry is value */ public boolean test(final int[] mapping){ // n.b. not true for unspecified queries e.g. [C@?H](*)...
/base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/StereoMatch.java
robustness-copilot_data_169
/** * Parses CXSMILES layer and set attributes for atoms and bonds on the provided molecule. * * @param title SMILES title field * @param mol molecule */ private void parseMolCXSMILES(String title, IAtomContainer mol) throws InvalidSmilesException{ CxSmilesState cxstate; int pos; ...
/storage/smiles/src/main/java/org/openscience/cdk/smiles/SmilesParser.java
robustness-copilot_data_170
/** * Helper method, that can be used to compute start time of legs. * (it is also used internally). * It is provided here, because such an operation is mainly useful for routing, * but it may be externalized in a "util" class... * @param config TODO */ public stat...
/matsim/src/main/java/org/matsim/core/router/TripRouter.java
robustness-copilot_data_171
/** * The parenthesis convention is used to show a quantity by which a formula is multiplied. * For example: (C12H20O11)2 really means that a C24H40O22 unit. * * @param formula Formula to correct * @return Formula with the correction */ private static String breakExtractor(String f...
/tool/formula/src/main/java/org/openscience/cdk/tools/manipulator/MolecularFormulaManipulator.java
robustness-copilot_data_172
/** * Returns the "contents" field of a document based on a collection docid. The method is named to be consistent with * Lucene's {@link IndexReader#document(int)}, contra Java's standard method naming conventions. * * @param reader index reader * @param docid collection docid * @return the "contents...
/src/main/java/io/anserini/index/IndexReaderUtils.java
robustness-copilot_data_173
/** * Performs the calculation: the graph will be analyzed and ring information will be determined and wrapped * up into descriptors. * * @param mol the atoms and bonds that make up the molecular object * @return the various ring-based descriptors generated */ public DescriptorValue calcu...
/descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/SmallRingDescriptor.java
robustness-copilot_data_174
/** * Does the layout for the next RingSystem that is connected to those parts of * the molecule that have already been laid out. Finds the next ring with an * unplaced ring atom and lays out this ring. Then lays out the ring substituents * of this ring. Then moves and rotates the laid out ring to m...
/tool/sdg/src/main/java/org/openscience/cdk/layout/StructureDiagramGenerator.java
robustness-copilot_data_175
/** * Constructs an empty rule (useful for testing). * * @return An "empty" rule. */ static ValidationRule empty(){ return new ValidationRule(Severity.ERROR, "empty", "failure message", (i) -> Fail.empty()); }
/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/ValidationRule.java
robustness-copilot_data_176
/** * Reads a CSV file, converts it into a dataverse DataTable. * * @param stream a <code>BufferedInputStream</code>. * @return an <code>TabularDataIngest</code> object * @throws java.io.IOException if a reading error occurs. */ public TabularDataIngest read(BufferedInputStream stream, Fi...
/src/main/java/edu/harvard/iq/dataverse/ingest/tabulardata/impl/plugins/csv/CSVFileReader.java
robustness-copilot_data_177
/** * Replaces the special characters in the URLEncoded string with the replacement values defined by the spec. * * Partially copied from https://github.com/aws/aws-sdk-java: com.amazonaws.util.SdkHttpUtils (2017-05-19) * * @param string the string to replace characters in * @param r...
/src/main/java/com/twilio/jwt/validation/RequestCanonicalizer.java
robustness-copilot_data_178
/** * Return true if the subject is root or has the special ExemptFromNamespaceChecks principal. * * @param subject The identity of the user. * @return if the user is except from namespace checks. * @see #isRoot(javax.security.auth.Subject) */ public static boolean isExemptFromNamespaceCh...
/modules/common/src/main/java/org/dcache/auth/Subjects.java
robustness-copilot_data_179
/** * Method called to get rid of candidate properties that are marked * as ignored. */ protected void _removeUnwantedProperties(Map<String, POJOPropertyBuilder> props){ Iterator<POJOPropertyBuilder> it = props.values().iterator(); while (it.hasNext()) { POJOPropertyBuilder prop = it.nex...
/src/main/java/com/fasterxml/jackson/databind/introspect/POJOPropertiesCollector.java
robustness-copilot_data_180
/** * Returns a selection for all records that match neither of the given functions. In other words, * if either (or both) of sel1 or sel2 is {@code true}, the record as a whole is {@code false}. */ public static Function<Table, Selection> neither(Function<Table, Selection> sel1, Function<Table, Selection> se...
/core/src/main/java/tech/tablesaw/api/QuerySupport.java
robustness-copilot_data_181
/** * Converts the 'skills' attribute to a list of strings. * * @param attributes the {@link Attributes} container that is checked for the * skill(s) to be converted. * @return the {@link List} of skills, possibly empty, as parsed from the * ...
/contribs/freight/src/main/java/org/matsim/contrib/freight/utils/FreightUtils.java
robustness-copilot_data_182
/** * Sends the managed entity's properties to the client, if the client's snapshot is stale. * * @param session the client's session */ public void sendMessages(GlowSession session){ if (!needsUpdate) { return; } int id = entity.entityId; if (entity instanceof GlowPlayer) {...
/src/main/java/net/glowstone/entity/AttributeManager.java
robustness-copilot_data_183
/** * Create a library entry from a SMILES string with the coordinates suffixed in binary. The * entry should be created with {@link #encodeEntry(java.util.Map.Entry)} and not created * manually. Note, the entry is not added to the library. * * @param str input string * @return library ent...
/tool/sdg/src/main/java/org/openscience/cdk/layout/IdentityTemplateLibrary.java
robustness-copilot_data_184
/** * Calculate new point X in a B-A(-D)-C system. It forms a B-A(-D)(-C)-X * system. (3) 3 ligands(B, C, D) of refAtom A (i) 1 points required; if A, B, * C, D coplanar, no points. else vector is resultant of BA, CA, DA * *@param aPoint to which substituents are added *@param bPoint...
/tool/builder3d/src/main/java/org/openscience/cdk/modeling/builder3d/AtomTetrahedralLigandPlacer3D.java
robustness-copilot_data_185
/** * Determines if the ensure definition is the same as the the same-named oak:index definition. * * @param ensureDefinition the ensure index definition * @param oakIndex the oak index definition * @return true if the ensure definition and the oak index definition are different * ...
/bundle/src/main/java/com/adobe/acs/commons/oak/impl/EnsureOakIndexJobHandler.java
robustness-copilot_data_186
/** * The method returns apha partial charges assigned to an heavy atom through Gasteiger Marsili * It is needed to call the addExplicitHydrogensToSatisfyValency method from the class tools.HydrogenAdder. * For this method will be only possible if the heavy atom has single bond. * *@param a...
/descriptor/qsaratomic/src/main/java/org/openscience/cdk/qsar/descriptors/atomic/PartialSigmaChargeDescriptor.java
robustness-copilot_data_187
/** * Check if given number is greater or equal to start range and minor or equal to end range. * * @param fieldValue - to be validated * @throws IllegalArgumentException - if not in range */ protected void isInRange(final FieldValue<?> fieldValue){ if (fieldValue instanceof IntegerFieldVa...
/src/main/java/com/cronutils/model/field/expression/visitor/ValidationFieldExpressionVisitor.java
robustness-copilot_data_188
/** * Verify that for every vertex adjacent to n, there should be at least one * feasible candidate adjacent which can be mapped. If no such candidate * exists the mapping of n -> m is not longer valid. * * @param n query vertex * @param m target vertex * @return mapping is still vali...
/base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/UllmannState.java
robustness-copilot_data_189
/** * Obtain the field name from a potential SD data header. If the header * does not contain a field name, then null is returned. The method does * not currently return field numbers (e.g. DT&lt;n&gt;). * * @param line an input line * @return the field name */ static String dataHead...
/storage/ctab/src/main/java/org/openscience/cdk/io/MDLV2000Reader.java
robustness-copilot_data_190
/** * From a provided set of cycles find the 5/6 member cycles that fit the MMFF aromaticity * definition - {@link #isAromaticRing(int[], int[], int[], boolean[])}. The cycles of size 6 * are listed first. * * @param cycles initial set of cycles from * @param contribution vector of p...
/tool/forcefield/src/main/java/org/openscience/cdk/forcefield/mmff/MmffAromaticTypeMapping.java
robustness-copilot_data_191
/** * Adds a mapping between the reactant and product side to this * Reaction. * * @param mapping Mapping to add. * @see #mappings */ public void addMapping(IMapping mapping){ if (mappingCount + 1 >= map.length) growMappingArray(); map[mappingCount] = mapping; mappin...
/base/data/src/main/java/org/openscience/cdk/Reaction.java
robustness-copilot_data_192
/** * Add a conformer to the end of the list. * * This method allows you to add a IAtomContainer object as another conformer. * Before adding it ensures that the title of specific object matches the * stored title for these conformers. It will also check that the number of * atoms in the ...
/base/data/src/main/java/org/openscience/cdk/ConformerContainer.java
robustness-copilot_data_193
/** * Removes the threshold of the given logger and appender combination in this threshold set. The * new effective threshold will be derived from the regular inheritance rules. */ public synchronized void remove(LoggerName logger, String appender){ if (_rules.remove(logger, appender) != null) { ...
/modules/cells/src/main/java/dmg/util/logback/FilterThresholdSet.java
robustness-copilot_data_194
/** * Sort the AtomContainers and multipliers using a provided Comparator. * @param comparator defines the sorting method */ public void sortAtomContainers(final Comparator<IAtomContainer> comparator){ Integer[] indexes = new Integer[atomContainerCount]; for (int i = 0; i < indexes.length; i++) ...
/base/data/src/main/java/org/openscience/cdk/AtomContainerSet.java
robustness-copilot_data_195
/** * Using the angular extents of vectors, determine the best position for a hydrogen label. The * position with the most space is selected first. If multiple positions have the same amount of * space, the one where the hydrogen position is most centred is selected. If all position are * okay, the ...
/display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/HydrogenPosition.java
robustness-copilot_data_196
/** * Returns the Lucene {@link Document} based on a collection docid. The method is named to be consistent with Lucene's * {@link IndexReader#document(int)}, contra Java's standard method naming conventions. * * @param reader index reader * @param docid collection docid * @return corresponding Lucene...
/src/main/java/io/anserini/index/IndexReaderUtils.java
robustness-copilot_data_197
/** * Applies the given function to a byte subtag if it is present, converting it to boolean first. * * @param key the key to look up * @param consumer the function to apply * @return true if the tag exists and was passed to the consumer; false otherwise */ public boolean readBoolean(@Non...
/src/main/java/net/glowstone/util/nbt/CompoundTag.java
robustness-copilot_data_198
/** * Checks if the CharSequence contains only Unicode letters or digits. * * <p>{@code null} will return {@code false}. An empty CharSequence (length()=0) will return * {@code false}. * * <pre> * StringUtils.isAlphanumeric(null) = false * StringUtils.isAlphanumeric("") = false * String...
/core/src/main/java/tech/tablesaw/util/StringUtils.java
robustness-copilot_data_199
/** * Removes nodes from the network that have no incoming or outgoing links attached to them. */ public void removeNodesWithoutLinks(){ List<Node> toBeRemoved = new ArrayList<>(); for (Node node : this.network.getNodes().values()) { if ((node.getInLinks().size() == 0) && (node.getOut...
/matsim/src/main/java/org/matsim/core/network/algorithms/MultimodalNetworkCleaner.java
robustness-copilot_data_200
/** * Execute all aggregate functions for the given slice setting values in the appropriate * destination column. */ private void processAggregateFunctions(TableSlice slice){ for (String toColumn : query.getArgumentList().getAggregateFunctions().keySet()) { FunctionCall<AggregateFunctions> functio...
/core/src/main/java/tech/tablesaw/analytic/AnalyticQueryEngine.java