id stringlengths 25 27 | content stringlengths 190 15.4k | max_stars_repo_path stringlengths 31 217 |
|---|---|---|
robustness-copilot_data_601 | /**
* Assign the partial charges, all existing charges are cleared.
* Atom types must be assigned first.
*
* @param mol molecule
* @return charges were assigned
* @see #effectiveCharges(IAtomContainer)
* @see #assignAtomTypes(IAtomContainer)
*/
public boolean partialCharges(IAt... | /tool/forcefield/src/main/java/org/openscience/cdk/forcefield/mmff/Mmff.java |
robustness-copilot_data_602 | /**
* Judge whether job's sharding items are all completed.
*
* @return job's sharding items are all completed or not
*/
public boolean isAllCompleted(){
return jobNodeStorage.isJobNodeExisted(GuaranteeNode.COMPLETED_ROOT) && configService.load(false).getShardingTotalCount() <= jobNodeStorage.g... | /elasticjob-lite/elasticjob-lite-core/src/main/java/org/apache/shardingsphere/elasticjob/lite/internal/guarantee/GuaranteeService.java |
robustness-copilot_data_603 | /**
* Determines if two bonds have at least one atom in common.
*
* @param atom first bondA1
* @param bondB second bondA1
* @return the symbol of the common atom or "" if
* the 2 bonds have no common atom
*/
private static boolean hasCommonAtom(IBond bondA, IBond bo... | /legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKMCS.java |
robustness-copilot_data_604 | /**
* Creates a {@link Config} object from {@link System#getProperties()}.
*
* @return Configuration object.
*/
public static Config systemProperties(){
return ConfigFactory.parseProperties(System.getProperties(), ConfigParseOptions.defaults().setOriginDescription("system properties"));
} | /jooby/src/main/java/io/jooby/Environment.java |
robustness-copilot_data_605 | /**
* Encodes the {@code centres[]} specified in the constructor as either
* clockwise/anticlockwise or none. If there is a permutation parity but no
* geometric parity then we can not encode the configuration and 'true' is
* returned to indicate the perception is done. If there is no permutation
... | /tool/hash/src/main/java/org/openscience/cdk/hash/stereo/GeometryEncoder.java |
robustness-copilot_data_606 | /**
* Verify the geometric stereochemistry (cis/trans) of the double bond
* {@code u1=u2} is preserved in the target when the {@code mapping} is
* used.
*
* @param u1 one index of the double bond
* @param u2 other index of the double bond
* @param mapping mapping of vertices... | /base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/StereoMatch.java |
robustness-copilot_data_607 | /**
* Make the symmetric group Sym(N) for N. That is, a group of permutations
* that represents _all_ permutations of size N.
*
* @param size the size of the permutation
* @return a group for all permutations of N
*/
public static PermutationGroup makeSymN(int size){
List<Permutation>... | /tool/group/src/main/java/org/openscience/cdk/group/PermutationGroup.java |
robustness-copilot_data_608 | /**
* Take the mapped extensions and organize them by individual extension.
* @param configuredExtensions Map of extension mappings
* @return Map with extension as keys
*/
private Map<String, String[]> formatExtensions(final Map<String, String> configuredExtensions){
final Map<String, String[]>... | /bundle/src/main/java/com/adobe/acs/commons/replication/dispatcher/impl/RefetchFlushContentBuilderImpl.java |
robustness-copilot_data_609 | /**
* Returns a new IntColumn containing a value for each value in this column, truncating if
* necessary.
*
* <p>A narrowing primitive conversion such as this one may lose information about the overall
* magnitude of a numeric value and may also lose precision and range. Specifically, if the value
* ... | /core/src/main/java/tech/tablesaw/api/DoubleColumn.java |
robustness-copilot_data_610 | /**
* Insert a string (str) into the trie.
*
* @param trie trie node
* @param str the string to insert
* @param i index in the string
* @return a created child node or null
*/
private static Trie insert(Trie trie, String str, int i){
if (trie == null)
trie = new Trie(... | /display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/AbbreviationLabel.java |
robustness-copilot_data_611 | /**
* Check whether otherPath points to a location that is a child of this location. This is true
* iff each element of this path is identical to the corresponding element in otherPath and
* otherPath has length precisely greater by one.
* <pre>
* StatePath p1 = new StatePath("foo.bar");
... | /modules/dcache-info/src/main/java/org/dcache/services/info/base/StatePath.java |
robustness-copilot_data_612 | /**
* Returns a column containing integers representing the nth group (0-based) that a date falls
* into.
*
* <p>Example: When Unit = ChronoUnit.DAY and n = 5, we form 5 day groups. a Date that is 2 days
* after the start is assigned to the first ("0") group. A day 7 days after the start is assigned
*... | /core/src/main/java/tech/tablesaw/columns/datetimes/DateTimeMapFunctions.java |
robustness-copilot_data_613 | /**
* Builds the data file context for a tabular column.
*
* @param userId the unique identifier for the user
* @param entityDetail the entity for which the context is build
*
* @return the data file context of the tabular column
*
* @throws OCFCheckedExceptionBase checked ... | /open-metadata-implementation/access-services/asset-lineage/asset-lineage-server/src/main/java/org/odpi/openmetadata/accessservices/assetlineage/handlers/AssetContextHandler.java |
robustness-copilot_data_614 | /**
* Look for optional path parameter and expand the given pattern into multiple pattern.
*
* <pre>
* /path => [/path]
* /{id} => [/{id}]
* /path/{id} => [/path/{id}]
*
* /{id}? => [/, /{id}]
* /path/{id}? => [/path, /path/{id}]
* /path/{id}/{start}?/{end}? =>... | /jooby/src/main/java/io/jooby/Router.java |
robustness-copilot_data_615 | /**
* Calculate the count of atoms of the largest chain in the supplied {@link IAtomContainer}.
*
* @param atomContainer The {@link IAtomContainer} for which this descriptor is to be calculated
* @return the number of atoms in the largest chain of this AtomContainer
* @see #setParameters
*... | /descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/LargestChainDescriptor.java |
robustness-copilot_data_616 | /**
* Checks if the message starts with the given string.
*
* @param msg the message to check.
* @param data the string to check the message with. Shall be shorter than 256 characters.
* @param includeLength true if the string in the message is prefixed with the length, false if not.
* @re... | /src/main/java/zmq/io/Msgs.java |
robustness-copilot_data_617 | /**
* Evaluate the 12 descriptors used to characterize the 3D shape of a molecule.
*
* @param atomContainer The molecule to consider, should have 3D coordinates
* @return A 12 element array containing the descriptors.
* @throws CDKException if there are no 3D coordinates
*/
public static ... | /descriptor/fingerprint/src/main/java/org/openscience/cdk/similarity/DistanceMoment.java |
robustness-copilot_data_618 | /**
* For JPEG images, this method behaves similar to {@link Layer#write(String, double, OutputStream)}. The major
* difference is that it uses progressive encoding.
*
* @param layer the layer with the image to write to the output stream
* @param quality JPEG compression quality between 0 and... | /bundle/src/main/java/com/adobe/acs/commons/images/impl/ProgressiveJpeg.java |
robustness-copilot_data_619 | /**
* For a given molecule, determines its fingerprints and uses them to calculate a Bayesian prediction. Note that this
* value is unscaled, and so it only has relative meaning within the confines of the model, i.e. higher is more likely to
* be active.
*
* @param mol molecular structure whic... | /tool/model/src/main/java/org/openscience/cdk/fingerprint/model/Bayesian.java |
robustness-copilot_data_620 | /**
* Optimised method for reading a integer from 3 characters in a string at a
* specified index. MDL V2000 Molfile make heavy use of the 3 character ints
* in the atom/bond and property blocks. The integer may be signed and
* pre/post padded with white space.
*
* @param line input
... | /storage/ctab/src/main/java/org/openscience/cdk/io/MDLV2000Reader.java |
robustness-copilot_data_621 | /**
* Process changes to the human enitity's armor, and update the entity's armor attributes
* accordingly.
*/
private void processArmorChanges(){
GlowPlayer player = null;
if (this instanceof GlowPlayer) {
player = ((GlowPlayer) this);
}
boolean armorUpdate = false;
List<Equ... | /src/main/java/net/glowstone/entity/GlowHumanEntity.java |
robustness-copilot_data_622 | /**
* Multiply this permutation by another such that for all i,
* this[i] = this[other[i]].
*
* @param other the other permutation to use
* @return a new permutation with the result of multiplying the permutations
*/
public Permutation multiply(Permutation other){
Permutation newPermu... | /tool/group/src/main/java/org/openscience/cdk/group/Permutation.java |
robustness-copilot_data_623 | /**
* Builds the relational table context for a relational column.
*
* @param userId the unique identifier for the user
* @param entityDetail the entity for which the context is build
*
* @return the relational table context of the relational column
*
* @throws OCFCheckedEx... | /open-metadata-implementation/access-services/asset-lineage/asset-lineage-server/src/main/java/org/odpi/openmetadata/accessservices/assetlineage/handlers/AssetContextHandler.java |
robustness-copilot_data_624 | /**
* We create a new Plan which contains only the Leg that should be replanned and its previous and next
* Activities. By doing so the PlanAlgorithm will only change the Route of that Leg.
*
* Use currentNodeIndex from a DriverAgent if possible!
*
* Otherwise code it as following:
* startLink - Node1 - r... | /matsim/src/main/java/org/matsim/withinday/utils/EditRoutes.java |
robustness-copilot_data_625 | /**
* Scale a vector by a given factor, the input vector is not modified.
*
* @param vector a vector to scale
* @param factor how much the input vector should be scaled
* @return scaled vector
*/
static Vector2d scale(final Tuple2d vector, final double factor){
final Vector2d cpy = ne... | /display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/VecmathUtil.java |
robustness-copilot_data_626 | /**
* Consider if a column is seen twice then that column type should be
* considered an array. Because String is a default assumption when no type
* is specified, any redefinition of a column to a more specific type will
* be then assumed for that property altogether.
*
* @param a
* ... | /bundle/src/main/java/com/adobe/acs/commons/data/Spreadsheet.java |
robustness-copilot_data_627 | /**
* Creates a WlsClusterConfig object using an "clusters" item parsed from JSON result from WLS
* REST call.
*
* @param clusterConfigMap Map containing "cluster" item parsed from JSON result from WLS REST
* call
* @param serverTemplates Map containing all server templates configuration read from... | /operator/src/main/java/oracle/kubernetes/operator/wlsconfig/WlsClusterConfig.java |
robustness-copilot_data_628 | /**
* Searches the provided fields weighted by their boosts, using multiple threads.
* Batch version of {@link #searchFields(String, Map, int)}.
*
* @param queries list of queries
* @param qids list of unique query ids
* @param k number of hits
* @param threads number of threads
* @param fields ... | /src/main/java/io/anserini/search/SimpleSearcher.java |
robustness-copilot_data_629 | /**
* Use this to remove a ChemObjectListener from the ListenerList of this
* IChemObject. It will then not be notified of change in this object anymore.
*
*@param col The ChemObjectListener to be removed
*@see #addListener
*/
public void removeListener(IChemObjectListener col... | /base/data/src/main/java/org/openscience/cdk/ChemObject.java |
robustness-copilot_data_630 | /**
* Generates a checksum for a single node and its node sub-system, respecting the options.
* @param aggregateNodePath the absolute path of the node being aggregated into a checksum
* @param node the node whose subsystem to create a checksum for
* @param options the {@link ChecksumGeneratorOptions... | /bundle/src/main/java/com/adobe/acs/commons/analysis/jcrchecksum/impl/ChecksumGeneratorImpl.java |
robustness-copilot_data_631 | /**
* Applies the given function to a float subtag if it is present.
*
* @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 readFloat(@NonNls String key, FloatConsumer con... | /src/main/java/net/glowstone/util/nbt/CompoundTag.java |
robustness-copilot_data_632 | /**
* Finishes the calculation of the plans' scores and assigns the new scores
* to the plans if desired.
*/
public void finish(){
if (iteration == -1) {
throw new RuntimeException("Please initialize me before the iteration starts.");
}
controlerListenerManager.fireControlerAfterMobsimEvent(i... | /matsim/src/main/java/org/matsim/core/scoring/EventsToScore.java |
robustness-copilot_data_633 | /**
* Factory method for constructing {@link ObjectReader} that will
* read or update instances of a type {@code List<type>}.
* Functionally same as:
*<pre>
* readerFor(new TypeReference<List<type>>() { });
*</pre>
*
* @since 2.11
*/
public ObjectReader reade... | /src/main/java/com/fasterxml/jackson/databind/ObjectMapper.java |
robustness-copilot_data_634 | /**
*
* Creates a new instance of Post Filter and removes
* redundant mapping(s).
*
* @param mappings
* @return Filtered non-redundant mappings
*/
public static List<Map<Integer, Integer>> filter(List<List<Integer>> mappings){
FinalMappings finalMappings = FinalMappings.getInstan... | /legacy/src/main/java/org/openscience/cdk/smsd/filters/PostFilter.java |
robustness-copilot_data_635 | /**
* Export an {@link OpenAPI} model to the given format.
*
* @param openAPI Model.
* @param format Format.
* @throws IOException
* @return Output file.
*/
public Path export(@Nonnull OpenAPI openAPI, @Nonnull Format format) throws IOException{
Path output;
if (openAPI instanceof OpenAPIE... | /modules/jooby-openapi/src/main/java/io/jooby/openapi/OpenAPIGenerator.java |
robustness-copilot_data_636 | /**
* Creates a sorted list of lanes for a link.
* @param link
* @param lanesToLinkAssignment
* @return sorted list with the most upstream lane at the first position.
*/
public static List<ModelLane> createLanes(Link link, LanesToLinkAssignment lanesToLinkAssignment){
List<ModelLane> queueLanes = new A... | /matsim/src/main/java/org/matsim/lanes/LanesUtils.java |
robustness-copilot_data_637 | /**
* Helper method that removes empty hooks from passed array and packs it into new collection.
*
* @param hooks hooks to be reduced
* @return no empty hooks
*/
public static List<Hook> eliminateEmptyHooks(Hook[] hooks){
return Arrays.asList(hooks).stream().filter(Hook::hasContent).collec... | /src/main/java/net/masterthought/cucumber/util/Util.java |
robustness-copilot_data_638 | /**
* Check if a public key is in the certificate store.
* @param publicKey needs to be a 32 byte array representing the public key
*/
public boolean containsPublicKey(byte[] publicKey){
Utils.checkArgument(publicKey.length == 32, "publickey needs to have a size of 32 bytes. got only " + publicKey.l... | /src/main/java/org/zeromq/ZCertStore.java |
robustness-copilot_data_639 | /**
* Verifies that clazz implements Callable<? extends Serializable> and casts it to that type.
*
* @param clazz The clazz of the command object
* @return clazz cast to Callable<? extends Serializable>
*/
private Class<? extends Callable<? extends Serializable>> cast(Class<?> clazz){
if (... | /modules/common-cli/src/main/java/org/dcache/util/cli/AnnotatedCommandScanner.java |
robustness-copilot_data_640 | /**
* Compare the values of the supplied object with those stored in the current object.
*
* @param objectToCompare supplied object
* @return boolean result of comparison
*/
public boolean equals(Object objectToCompare){
if (this == objectToCompare) {
return true;
}
if (obj... | /open-metadata-implementation/frameworks/open-discovery-framework/src/main/java/org/odpi/openmetadata/frameworks/discovery/properties/Annotation.java |
robustness-copilot_data_641 | /**
* Methods that takes a ring of which all bonds are aromatic, and assigns single
* and double bonds. It does this in a non-general way by looking at the ring
* size and take everything as a special case.
*
* @param ring Ring to dearomatize
* @return False if it could not convert the ar... | /legacy/src/main/java/org/openscience/cdk/tools/DeAromatizationTool.java |
robustness-copilot_data_642 | /**
* Encodes the given string in such a way that it no longer contains
* characters that have a special meaning in xml.
*
* @see <a href="http://www.w3.org/International/questions/qa-escapes#use">http://www.w3.org/International/questions/qa-escapes#use</a>
* @param attributeValue
* @return String with som... | /matsim/src/main/java/org/matsim/core/events/algorithms/EventWriterXML.java |
robustness-copilot_data_643 | /**
* Returns the highest index at which the specific IAtomContainer appears in the list or -1 if is not found.
*
* A given IAtomContainer will occur in the list if the title matches the stored title for
* the conformers in this container and if the coordinates for each atom in the specified molecu... | /base/data/src/main/java/org/openscience/cdk/ConformerContainer.java |
robustness-copilot_data_644 | /**
* The only time a dataset can be in review is when it is in draft.
* @return if the dataset is being reviewed
*/
public boolean isInReview(){
if (versionState != null && versionState.equals(VersionState.DRAFT)) {
return getDataset().isLockedFor(DatasetLock.Reason.InReview);
} else {
... | /src/main/java/edu/harvard/iq/dataverse/DatasetVersion.java |
robustness-copilot_data_645 | /**
* Converts a limited set of String representations to their corresponding Objects
* <p/>
* Supports
* * Double
* * Long
* * Integer
* * Boolean (true/false)
* * Dates in string format of ISODateTimeFormat
* <p/>
* Else, null is returned.
*
* @param data t... | /bundle/src/main/java/com/adobe/acs/commons/util/TypeUtil.java |
robustness-copilot_data_646 | /**
* Report the current values of all metrics in the registry.
*/
public void report(){
synchronized (this) {
report(registry.getGauges(filter), registry.getCounters(filter), registry.getHistograms(filter), registry.getMeters(filter), registry.getTimers(filter));
}
} | /metrics-core/src/main/java/io/dropwizard/metrics5/ScheduledReporter.java |
robustness-copilot_data_647 | /**
* Compare two {@link IChemObject} classes and return the difference as an {@link IDifference}.
*
* @param first the first of the two classes to compare
* @param second the second of the two classes to compare
* @return an {@link IDifference} representation of the difference between the fir... | /misc/diff/src/main/java/org/openscience/cdk/tools/diff/AtomTypeDiff.java |
robustness-copilot_data_648 | /**
* Return a new table (shallow copy) that contains all the columns in this table, in the order
* given in the argument. Throw an IllegalArgument exception if the number of names given does not
* match the number of columns in this table. NOTE: This does not make a copy of the columns, so
* they are share... | /core/src/main/java/tech/tablesaw/api/Table.java |
robustness-copilot_data_649 | /**
* Creates a {@link WaitStrategy} from a string.
* <p>
* The following strategies are supported:
* <ul>
* <li><code>blocking</code> - {@link BlockingWaitStrategy}</li>
* <li><code>busySpin</code> - {@link BusySpinWaitStrategy}</li>
* <li><code>liteBlocking</code> - {@link LiteBlock... | /src/main/java/net/logstash/logback/appender/WaitStrategyFactory.java |
robustness-copilot_data_650 | /**
* This makes sourceAtom map of matching atoms out of sourceAtom map of matching bonds as produced by the get(Subgraph|Ismorphism)Map methods.
*
* @param rMapList The list produced by the getMap method.
* @param graph1 first molecule. Must not be an IQueryAtomContainer.
* @param graph... | /legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKRMapHandler.java |
robustness-copilot_data_651 | /**
* Creates a web hook object to track service calls.
*
* @param namespace the namespace
* @return the active web hook
* @throws ApiException if there is an error on the call that sets up the web hook.
*/
public Watchable<V1Service> createServiceWatch(String namespace) throws ApiException{
retu... | /operator/src/main/java/oracle/kubernetes/operator/builders/WatchBuilder.java |
robustness-copilot_data_652 | /**
* Calculate the size of the partition as the sum of the sizes of the cells.
*
* @return the number of elements in the partition
*/
public int numberOfElements(){
int n = 0;
for (SortedSet<Integer> cell : cells) {
n += cell.size();
}
return n;
} | /tool/group/src/main/java/org/openscience/cdk/group/Partition.java |
robustness-copilot_data_653 | /**
* Provide a short, simple human understandable string describing the supplied duration. The
* duration is a non-negative value. The output is appended to the supplied StringBuilder and
* has the form {@code <number> <space> <units>}, where {@code <number>} is an integer and
* {@code <units>} i... | /modules/common/src/main/java/org/dcache/util/TimeUtils.java |
robustness-copilot_data_654 | /**
* Returns the index of the first character in the string that is not a digit, starting at offset.
*/
private static int indexOfNonDigit(String string, int offset){
for (int i = offset; i < string.length(); i++) {
char c = string.charAt(i);
if (c < '0' || c > '9')
return i;... | /src/main/java/com/fasterxml/jackson/databind/util/ISO8601Utils.java |
robustness-copilot_data_655 | /**
* Checks whether a bond is connected to another one.
* This can only be true if the bonds have an Atom in common.
*
* @param bond The bond which is checked to be connect with this one
* @return true if the bonds share an atom, otherwise false
*/
public boolean isConnectedTo(IBond bond... | /base/silent/src/main/java/org/openscience/cdk/silent/Bond.java |
robustness-copilot_data_656 | /**
* Finds a minimal additional distance for the tour, when a pickup is added to
* the plan. The AssociatedActivities contains both activities of a job which
* should be added to the existing tour. The TourActivities which are already in
* the tour are found in context.getRoute().ge... | /contribs/freight/src/main/java/org/matsim/contrib/freight/jsprit/DistanceConstraint.java |
robustness-copilot_data_657 | /**
* Returns the "raw" 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 "raw" field th... | /src/main/java/io/anserini/index/IndexReaderUtils.java |
robustness-copilot_data_658 | /**
* Parse the given storedCheckSum string value and return a new CheckSum object.
*/
public static CheckSum parse(String checksumValue){
if (checksumValue == null) {
return null;
}
// The general layout of a checksum is:
// <1 digit: algorithm version number>:<1..n characters alphan... | /liquibase-core/src/main/java/liquibase/change/CheckSum.java |
robustness-copilot_data_659 | /**
* Writes a {@link IChemObject} to the MDL molfile formated output.
* It can only output ChemObjects of type {@link IChemFile},
* {@link IChemObject} and {@link IAtomContainer}.
*
* @param object {@link IChemObject} to write
* @see #accepts(Class)
*/
public void write(IChemObject ... | /storage/ctab/src/main/java/org/openscience/cdk/io/MDLV2000Writer.java |
robustness-copilot_data_660 | /**
* Get the value assigned to the current thread, creating a new one if none is assigned yet or the
* previous has been disposed.
*
* The value must be {@link #release()} to ensure proper life cycle before it can be {@link #acquire()}
* again.
*
* @return the value assigned to thi... | /src/main/java/net/logstash/logback/util/ThreadLocalHolder.java |
robustness-copilot_data_661 | /**
* Creates cross product for the selection of two tables.
*
* @param destination the destination table.
* @param table1 the table on left of join.
* @param table2 the table on right of join.
* @param table1Rows the selection of rows in table1.
* @param table2Rows the selection of rows in table2.... | /core/src/main/java/tech/tablesaw/joining/DataFrameJoiner.java |
robustness-copilot_data_662 | /**
* Helper method used to construct appropriate description
* when passed either type (Class) or an instance; in latter
* case, class of instance is to be used.
*
* @since 2.9
*/
public static String classNameOf(Object inst){
if (inst == null) {
return "[null]";
}
Cl... | /src/main/java/com/fasterxml/jackson/databind/util/ClassUtil.java |
robustness-copilot_data_663 | /**
* Adds annotated rule classes to an instance of NewRepository. Fails if one the classes has no SQALE annotation.
*/
public static void load(NewRepository repository, String languageKey, Iterable<Class> ruleClasses){
new AnnotationBasedRulesDefinition(repository, languageKey).addRuleClasses(true, ruleClas... | /cxx-squid-bridge/src/main/java/org/sonar/cxx/squidbridge/annotations/AnnotationBasedRulesDefinition.java |
robustness-copilot_data_664 | /**
* Provides basic statistics of a given {@link Network}.
* @param network
*/
public static void reportNetworkStatistics(Network network){
LOG.info("--- Network statistics: ------------------------------------------------------");
LOG.info(" Network description: " + network.getName());
LOG.info... | /matsim/src/main/java/org/matsim/core/network/algorithms/intersectionSimplifier/IntersectionSimplifier.java |
robustness-copilot_data_665 | /**
* Order the ligands from high to low precedence according to atomic and mass numbers.
*/
private ILigand[] order(ILigand[] ligands){
ILigand[] newLigands = new ILigand[ligands.length];
System.arraycopy(ligands, 0, newLigands, 0, ligands.length);
Arrays.sort(newLigands, numberRule);
ILigan... | /descriptor/cip/src/main/java/org/openscience/cdk/geometry/cip/rules/CIPLigandRule.java |
robustness-copilot_data_666 | /**
* Signs the provided packet, so a CollectD server can verify that its authenticity.
* Wire format:
* <pre>
* +-------------------------------+-------------------------------+
* ! Type (0x0200) ! Length !
* +-------------------------------+--------... | /metrics-collectd/src/main/java/io/dropwizard/metrics5/collectd/PacketWriter.java |
robustness-copilot_data_667 | /**
* Appends a new row to the model source data, which consists of a molecule and whether or not it
* is considered active.
*
* @param mol molecular structure, which must be non-blank
* @param active whether active or not
*/
public void addMolecule(IAtomContainer mol, boolean active) th... | /tool/model/src/main/java/org/openscience/cdk/fingerprint/model/Bayesian.java |
robustness-copilot_data_668 | /**
* Checks if a potential solution is a real one
* (not included in a previous solution)
* and add this solution to the solution list
* in case of success.
*
* @param traversed new potential solution
*/
private void solution(BitSet traversed) throws CDKException{
boolean inc... | /legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKRGraph.java |
robustness-copilot_data_669 | /**
* Changes to another plan with a probability proportional to exp( Delta scores ).
* Need to think through if this goes to Nash Equilibrium or to SUE !!!
*/
public T selectPlan(final HasPlansAndId<T, I> person){
// current plan and random plan:
T currentPlan = person.getSelectedPl... | /matsim/src/main/java/org/matsim/core/replanning/selectors/ExpBetaPlanChanger.java |
robustness-copilot_data_670 | /**
* Rescales Point2 so that length 1-2 is sum of covalent radii.
* If covalent radii cannot be found, use bond length of 1.0
*
*@param atom1 stationary atom
*@param atom2 movable atom
*@param point2 coordinates for atom 2
*@return new co... | /tool/builder3d/src/main/java/org/openscience/cdk/modeling/builder3d/AtomTetrahedralLigandPlacer3D.java |
robustness-copilot_data_671 | /**
* Helper method called to add explicitly ignored properties to a list
* of known ignored properties; this helps in proper reporting of
* errors.
*/
protected void _collectIgnorals(String name){
if (!_forSerialization && (name != null)) {
if (_ignoredPropertyNames == null) {
... | /src/main/java/com/fasterxml/jackson/databind/introspect/POJOPropertiesCollector.java |
robustness-copilot_data_672 | /**
* Converts a collection docid to a Lucene internal docid.
*
* @param reader index reader
* @param docid collection docid
* @return corresponding Lucene internal docid, or -1 if docid not found
*/
public static int convertDocidToLuceneDocid(IndexReader reader, String docid){
try {
Inde... | /src/main/java/io/anserini/index/IndexReaderUtils.java |
robustness-copilot_data_673 | /**
* Return comparison result based on the content of the properties.
*
* @param objectToCompare test object
* @return result of comparison
*/
public boolean equals(Object objectToCompare){
if (this == objectToCompare) {
return true;
}
if (objectToCompare == null || getCla... | /open-metadata-implementation/common-services/ocf-metadata-management/ocf-metadata-api/src/main/java/org/odpi/openmetadata/commonservices/ocf/metadatamanagement/rest/AssetResponse.java |
robustness-copilot_data_674 | /**
* cleanup the timestamps array and replace all expired entries with
* Instant.EPOCH;
*
* @return the number of emptied slots
*/
private int purgeExpiredEntries(){
int result = 0;
for (int i = 0; i < timestamps.length; i++) {
long now = clock.instant().toEpochMilli();
... | /bundle/src/main/java/com/adobe/acs/commons/throttling/ThrottlingState.java |
robustness-copilot_data_675 | /**
* Compare two IMolecularFormula looking at type and number of IIsotope and
* charge of the formula.
*
* @param formula1 The first IMolecularFormula
* @param formula2 The second IMolecularFormula
* @return True, if the both IMolecularFormula are the same
*/
public st... | /tool/formula/src/main/java/org/openscience/cdk/tools/manipulator/MolecularFormulaManipulator.java |
robustness-copilot_data_676 | /**
* Create a vector by specifying the source and destination coordinates.
*
* @param src start point of the vector
* @param dest end point of the vector
* @return a new vector
*/
private static double[] toVector(Point3d src, Point3d dest){
return new double[] { dest.x - src.x, dest... | /tool/hash/src/main/java/org/openscience/cdk/hash/stereo/DoubleBond3DParity.java |
robustness-copilot_data_677 | /**
* A method that will look for the first Enum value annotated with the given Annotation.
* <p>
* If there's more than one value annotated, the first one found will be returned. Which one exactly is used is undetermined.
*
* @param enumClass The Enum class to scan for a value with the given a... | /src/main/java/com/fasterxml/jackson/databind/util/ClassUtil.java |
robustness-copilot_data_678 | /**
* Sort MCS solution by stereo and bond type matches.
* @throws CDKException
*/
public synchronized void sortResultsByStereoAndBondMatch() throws CDKException{
// System.out.println("\n\n\n\nSort By ResultsByStereoAndBondMatch");
Map<Integer, Map<Integer, Integer>> allStereoMCS = new HashMap<... | /legacy/src/main/java/org/openscience/cdk/smsd/filters/ChemicalFilters.java |
robustness-copilot_data_679 | /**
* Validate that an object is equal depending on their stored values.
*
* @param objectToCompare object
* @return boolean result
*/
public boolean equals(Object objectToCompare){
if (this == objectToCompare) {
return true;
}
if (objectToCompare == null || getClass() != o... | /open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/connectors/stores/metadatacollectionstore/properties/typedefs/TypeDefPatch.java |
robustness-copilot_data_680 | /**
* Calculates the coordinate of the intersection point of the orthogonal projection
* of a given point on a line segment with that line segment. The line segment
* is given by two points, <code>lineFrom</code> and <code>lineTo</code>. If the
* projection point does not lie *on* th... | /matsim/src/main/java/org/matsim/core/utils/geometry/CoordUtils.java |
robustness-copilot_data_681 | /**
* Finds the best fallback for the given exception type and apply it to
* the exception or throw the original error if no fallback found.
* @param exp The original exception
* @return Result of the most suitable fallback
* @throws Exception The original exception if no fallback found
*/... | /src/main/java/org/cactoos/scalar/ScalarWithFallback.java |
robustness-copilot_data_682 | /**
* Handle fragment grouping of a reaction that specifies certain disconnected components
* are actually considered a single molecule. Normally used for salts, [Na+].[OH-].
*
* @param rxn reaction
* @param cxstate state
*/
private void handleFragmentGrouping(IReaction rxn, CxSmilesS... | /storage/smiles/src/main/java/org/openscience/cdk/smiles/SmilesParser.java |
robustness-copilot_data_683 | /**
* Routes a trip between the given O/D pair, with the given main mode.
*
* @param mainMode the main mode for the trip
* @param fromFacility a {@link Facility} representing the departure location
* @param toFacility a {@link Facility} representing the arrival location
... | /matsim/src/main/java/org/matsim/core/router/TripRouter.java |
robustness-copilot_data_684 | /**
* Look for type hints in the name of a column to extract a usable type.
* Also look for array hints as well. <br>
* Possible formats:
* <ul>
* <li>column-name - A column named "column-name" </li>
* <li>col@int - An integer column named "col" </li>
* <li>col2@int[] - An integer arr... | /bundle/src/main/java/com/adobe/acs/commons/data/Spreadsheet.java |
robustness-copilot_data_685 | /**
* Finds the cluster of nodes of which <code>startNode</code> is part of. The cluster
* contains all nodes which can be reached starting at <code>startNode</code>
* and from where it is also possible to return again to <code>startNode</code>.
*
* @param startNode the node... | /matsim/src/main/java/org/matsim/core/network/algorithms/NetworkCleaner.java |
robustness-copilot_data_686 | /**
* Applies the MDL valence model to atoms using the explicit valence (bond
* order sum) and charge to determine the correct number of implicit
* hydrogens. The model is not applied if the explicit valence is less than
* 0 - this is the case when a query bond was read for an atom.
*
* @p... | /storage/ctab/src/main/java/org/openscience/cdk/io/MDLV2000Reader.java |
robustness-copilot_data_687 | /**
* Adds the specified data entry to one or more split results, recording its location if it is not wholly
* in the first split result.
* @param entry a data entry
*/
private void addToSplitResult(DataEntry entry){
while (entry.getRemainingLength() > 0) {
remainingRoom -= entry.addToMap(curre... | /operator/src/main/java/oracle/kubernetes/operator/helpers/ConfigMapSplitter.java |
robustness-copilot_data_688 | /**
* Returns either quoted value (with double-quotes) -- if argument non-null
* String -- or String NULL (no quotes) (if null).
*
* @since 2.9
*/
public static String quotedOr(Object str, String forNull){
if (str == null) {
return forNull;
}
return String.format("\"%s\"", ... | /src/main/java/com/fasterxml/jackson/databind/util/ClassUtil.java |
robustness-copilot_data_689 | /**
* Checks if {@code s} contains a "truthy" value.
* @param s
* @return {@code true} iff {@code s} is not {@code null} and is "truthy" word.
* @see #TRUE_VALUES
*/
public static boolean isTrue(String s){
return (s != null) && TRUE_VALUES.contains(s.trim().toLowerCase());
} | /src/main/java/edu/harvard/iq/dataverse/util/StringUtil.java |
robustness-copilot_data_690 | /**
* Find the index of a hetroatom in a cycle. A hetroatom in MMFF is the unique atom that
* contributes a pi-lone-pair to the aromatic system.
*
* @param cycle aromatic cycle, |C| = 5
* @param contribution vector of p electron contributions from each vertex
* @return index of hetr... | /tool/forcefield/src/main/java/org/openscience/cdk/forcefield/mmff/MmffAromaticTypeMapping.java |
robustness-copilot_data_691 | /**
* Finds a vertex in 'vs' which is not 'u' or 'x'.
* .
* @param vs fixed size array of 3 elements
* @param u a vertex in 'vs'
* @param x another vertex in 'vs'
* @return the other vertex
*/
private static int findOther(int[] vs, int u, int x){
for (int v : vs) {
if (... | /tool/hash/src/main/java/org/openscience/cdk/hash/stereo/DoubleBondElementEncoderFactory.java |
robustness-copilot_data_692 | /**
* Select the theory and basis set from the first archive line.
*
* @param line Description of the Parameter
* @return Description of the Return Value
*/
private String parseLevelOfTheory(String line){
StringBuffer summary = new StringBuffer();
summary.append(line);
try {
... | /storage/io/src/main/java/org/openscience/cdk/io/Gaussian98Reader.java |
robustness-copilot_data_693 | /**
* batch delete some shenyu dicts by some id list.
*
* @param ids shenyu dict id list.
* @return {@linkplain ShenyuAdminResult}
*/
public ShenyuAdminResult deleteShenyuDicts(@RequestBody @NotEmpty final List<@NotBlank String> ids){
Integer deleteCount = shenyuDictService.deleteShenyuDic... | /shenyu-admin/src/main/java/org/apache/shenyu/admin/controller/ShenyuDictController.java |
robustness-copilot_data_694 | /**
* Thrown when the reflective bean converter has no access to a parameter name. Compilation
* must be done using <code>parameters</code> compiler option.
*
* @param parameter Parameter.
* @return Usage exception.
*/
public static Usage parameterNameNotPresent(@Nonnull Parameter parameter){
Exe... | /jooby/src/main/java/io/jooby/Usage.java |
robustness-copilot_data_695 | /**
* Combines the separate stereo encoder factories into a single factory.
*
* @return a single stereo encoder factory
*/
private StereoEncoderFactory makeStereoEncoderFactory(){
if (stereoEncoders.isEmpty()) {
return StereoEncoderFactory.EMPTY;
} else if (stereoEncoders.size() == ... | /tool/hash/src/main/java/org/openscience/cdk/hash/HashGeneratorMaker.java |
robustness-copilot_data_696 | /**
* Check if there are any feasible mappings left for the query vertex n. We
* scan the compatibility matrix to see if any value is > 0.
*
* @param n query vertex
* @return a candidate is present
*/
private boolean hasCandidate(int n){
for (int j = (n * matrix.mCols), end = (j + mat... | /base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/UllmannState.java |
robustness-copilot_data_697 | /**
* Generate coordinates for all atoms which are singly bonded and have no
* coordinates. This is useful when hydrogens are present but have no coordinates.
* It knows about C, O, N, S only and will give tetrahedral or trigonal
* geometry elsewhere. Bond lengths are computed from covalent radi... | /tool/builder3d/src/main/java/org/openscience/cdk/modeling/builder3d/AtomTetrahedralLigandPlacer3D.java |
robustness-copilot_data_698 | /**
* Method for finding all super classes (but not super interfaces) of given class,
* starting with the immediate super class and ending in the most distant one.
* Class itself is included if <code>addClassItself</code> is true.
*<p>
* NOTE: mostly/only called to resolve mix-ins as that's whe... | /src/main/java/com/fasterxml/jackson/databind/util/ClassUtil.java |
robustness-copilot_data_699 | /**
* Checks some simple heuristics for whether the subgraph query can
* realistically be atom subgraph of the supergraph. If, for example, the
* number of nitrogen atoms in the query is larger than that of the supergraph
* it cannot be part of it.
*
* @param ac1 the supergraph to be... | /legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKMCS.java |
robustness-copilot_data_700 | /**
* Returns true if and only if the subject has the given group ID.
*/
public static boolean hasGid(Subject subject, long gid){
Set<GidPrincipal> principals = subject.getPrincipals(GidPrincipal.class);
for (GidPrincipal principal : principals) {
if (principal.getGid() == gid) {
... | /modules/common/src/main/java/org/dcache/auth/Subjects.java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.