id stringlengths 25 27 | content stringlengths 190 15.4k | max_stars_repo_path stringlengths 31 217 |
|---|---|---|
robustness-copilot_data_501 | /**
* Creates matrix with info about the bonds in the amino acids.
* 0 = bond id, 1 = atom1 in bond, 2 = atom2 in bond, 3 = bond order.
* @return info
*/
public static int[][] aaBondInfo(){
if (aminoAcids == null) {
createAAs();
}
int[][] info = new int[153][4];
int counter ... | /storage/pdb/src/main/java/org/openscience/cdk/templates/AminoAcids.java |
robustness-copilot_data_502 | /**
* Convenience function to center an atom symbol on a specified point. The
* centering depends on the symbol alignment.
*
* @param x x-axis location
* @param y y-axis location
* @return the centered symbol (new instance)
*/
AtomSymbol center(double x, double y){
Point2D center... | /display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/AtomSymbol.java |
robustness-copilot_data_503 | /**
* Check that two elements are in the same cell of the partition.
*
* @param elementI an element in the partition
* @param elementJ an element in the partition
* @return true if both elements are in the same cell
*/
public boolean inSameCell(int elementI, int elementJ){
for (int ce... | /tool/group/src/main/java/org/openscience/cdk/group/Partition.java |
robustness-copilot_data_504 | /**
* Builds the context for a schema element without the asset context.
*
* @param userId the unique identifier for the user
* @param entityDetail the entity for which the context is build
*
* @return the context of the schema element
*
* @throws OCFCheckedExceptionBase ch... | /open-metadata-implementation/access-services/asset-lineage/asset-lineage-server/src/main/java/org/odpi/openmetadata/accessservices/assetlineage/handlers/AssetContextHandler.java |
robustness-copilot_data_505 | /**
* Adds some parameters to the given Node then adds it to the set of pending
* nodes.
*
* @param l
* The link from which we came to this Node.
* @param n
* The Node to add to the pending nodes.
* @param pendingNodes
* The set of pending nodes.
* @param currTime
... | /matsim/src/main/java/org/matsim/core/router/Dijkstra.java |
robustness-copilot_data_506 | /**
* Convert a set of asserted LoAs so it includes all equivalent LoAs.
*
* @param entity the kind of identity asserted, if known.
* @param asserted a collection of LoA asserted by some external agent.
* @return all LoAs for this identity.
*/
public static EnumSet<LoA> withImpliedLoA(O... | /modules/common/src/main/java/org/dcache/auth/LoAs.java |
robustness-copilot_data_507 | /**
* Read non-structural data from input and store as properties the provided
* 'container'. Non-structural data appears in a structure data file (SDF)
* after an Molfile and before the record deliminator ('$$$$'). The data
* consists of one or more Data Header and Data blocks, an example is seen
... | /storage/ctab/src/main/java/org/openscience/cdk/io/MDLV2000Reader.java |
robustness-copilot_data_508 | /**
* Inserts a trip between two activities in the sequence of plan elements
* returned by the {@link Plan#getPlanElements()} method of a plan. Note
* that the plan will be modified only if the returned list is the internal
* reference!
* <p></p>
* Note that this methods returns a unique solution because it... | /matsim/src/main/java/org/matsim/core/router/TripRouter.java |
robustness-copilot_data_509 | /**
* This uses a gaussian distance weighting to calculate the impact of link based emissions onto the centroid of a
* grid cell. The level of emission is assumed to be linear over the link. The calculation is described in Argawal's
* PhD thesis https://depositonce.tu-berlin.de/handle/11303/6266 in Appen... | /contribs/analysis/src/main/java/org/matsim/contrib/analysis/spatial/SpatialInterpolation.java |
robustness-copilot_data_510 | /**
* Calculates the descriptor value using the {@link VABCVolume} class.
*
* @param atomContainer The {@link IAtomContainer} whose volume is to be calculated
* @return A double containing the volume
*/
public DescriptorValue calculate(IAtomContainer atomContainer){
double volume;
try ... | /descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/VABCDescriptor.java |
robustness-copilot_data_511 | /**
* Writes a Molecule to an OutputStream in MDL sdf format.
*
* @param container Molecule that is written to an OutputStream
*/
public void writeMolecule(IAtomContainer container) throws Exception{
final int dim = getNumberOfDimensions(container);
StringBuilder line = new StringBuilder();... | /storage/ctab/src/main/java/org/openscience/cdk/io/MDLV2000Writer.java |
robustness-copilot_data_512 | /**
* Checks if the ReplicationStatusManager should make the provides resource w replication status.
*
* @param resource the return
* @return true is the resource is markable resource
* @throws RepositoryException
*/
private boolean accept(final Resource resource) throws RepositoryExcepti... | /bundle/src/main/java/com/adobe/acs/commons/replication/status/impl/JcrPackageReplicationStatusEventHandler.java |
robustness-copilot_data_513 | /**
* Creates the path where all iteration-related data should be stored.
*/
public final void createIterationDirectory(final int iteration){
File dir = new File(getIterationPath(iteration));
if (!dir.mkdir()) {
if (this.overwriteFiles == OverwriteFileSetting.overwriteExistingFiles && dir.exists())... | /matsim/src/main/java/org/matsim/core/controler/OutputDirectoryHierarchy.java |
robustness-copilot_data_514 | /**
* Format local date time from timestamp by system time zone.
*
* @param timestamp the timestamp
* @return the local date time
*/
public static LocalDateTime formatLocalDateTimeFromTimestampBySystemTimezone(final Long timestamp){
return LocalDateTime.ofEpochSecond(timestamp / 1000, 0, O... | /shenyu-common/src/main/java/org/apache/shenyu/common/utils/DateUtils.java |
robustness-copilot_data_515 | /**
* Similar to {@link #_readMapAndClose} but specialized for <code>JsonNode</code>
* reading.
*
* @since 2.9
*/
protected JsonNode _readTreeAndClose(JsonParser p0) throws IOException{
try (JsonParser p = p0) {
final JavaType valueType = constructType(JsonNode.class);
Dese... | /src/main/java/com/fasterxml/jackson/databind/ObjectMapper.java |
robustness-copilot_data_516 | /**
* Formats message based on string loaded from the resource bundle backing this logger.
* @param msgId Message id
* @param params Parameters to message formatting
* @return Formatted message
*/
public String formatMessage(String msgId, Object... params){
if (params == null || params.length == 0) ... | /operator/src/main/java/oracle/kubernetes/operator/logging/LoggingFacade.java |
robustness-copilot_data_517 | /**
* Since pending and undefined steps were added later
* there is need to fill missing data for those statuses.
*/
private void fillMissingSteps(){
passedFeatures = fillMissingArray(passedFeatures);
passedScenarios = fillMissingArray(passedScenarios);
passedSteps = fillMissingArray(passedS... | /src/main/java/net/masterthought/cucumber/Trends.java |
robustness-copilot_data_518 | /**
* Put in order the elements of the molecular formula.
*
* @param formula The IMolecularFormula to put in order
* @return IMolecularFormula object
*/
private IMolecularFormula putInOrder(IMolecularFormula formula){
IMolecularFormula new_formula = formula.getBuilder().newInstance(... | /legacy/src/main/java/org/openscience/cdk/formula/MassToFormulaTool.java |
robustness-copilot_data_519 | /**
* Create a big multicolumn selection for all join columns in the given table. Joins two tables.
*
* @param table the table that used to generate Selection.
* @param ri row number of row in table.
* @param indexes a reverse index for every join column in the table.
* @param selectionSize max size i... | /core/src/main/java/tech/tablesaw/joining/DataFrameJoiner.java |
robustness-copilot_data_520 | /**
* Fluent copy method that creates a new instance that is a copy
* of this instance except for one additional property that is
* passed as the argument.
* Note that method does not modify this instance but constructs
* and returns a new one.
*/
public BeanPropertyMap withProperty(Setta... | /src/main/java/com/fasterxml/jackson/databind/deser/impl/BeanPropertyMap.java |
robustness-copilot_data_521 | /**
* Puts a big-endian representation of {@code value} into <code>bytes</code> staring from
* <code>offset</code>.
*
* @param bytes
* @param offset
* @param value
* @throws IllegalArgumentException there is no enough room for 8 bytes.
*/
public static void putLong(byte[] bytes,... | /modules/common/src/main/java/org/dcache/util/Bytes.java |
robustness-copilot_data_522 | /**
* Determine the next value of the atom at index <i>v</i>. The value is
* calculated by combining the current values of adjacent atoms. When a
* duplicate value is found it can not be directly included and is
* <i>rotated</i> the number of times it has previously been seen.
*
* @param g... | /tool/hash/src/main/java/org/openscience/cdk/hash/SuppressedAtomHashGenerator.java |
robustness-copilot_data_523 | /**
* Sends a {@link SetWindowSlotMessage} to update the contents of an inventory slot.
*
* @param slot the slot ID
* @param item the new contents
*/
public void sendItemChange(int slot, ItemStack item){
if (invMonitor != null) {
session.send(new SetWindowSlotMessage(invMonitor.get... | /src/main/java/net/glowstone/entity/GlowPlayer.java |
robustness-copilot_data_524 | /** Returns a new Row object with its position set to the given zero-based row index. */
public Row row(int rowIndex){
Row row = new Row(Table.this);
row.at(rowIndex);
return row;
} | /core/src/main/java/tech/tablesaw/api/Table.java |
robustness-copilot_data_525 | /**
* This has special case logic to handle NOT quoting column names if they are
* of type 'LiquibaseColumn' - columns in the DATABASECHANGELOG or DATABASECHANGELOGLOCK
* tables.
*/
public String escapeObjectName(String objectName, Class<? extends DatabaseObject> objectType){
if ((quotingStrate... | /liquibase-core/src/main/java/liquibase/database/core/PostgresDatabase.java |
robustness-copilot_data_526 | /**
* Building an <code>ArrayList</code> of <code>DigicoreCluster</code>s. The DJ-Clustering
* procedure of Zhou <i>et al</i> (2004) is followed. If there are no points to cluster, a
* warning message is logged, and the procedure bypassed.
*/
public void clusterInput(double radius, int minimumPoints){
if (... | /matsim/src/main/java/org/matsim/core/network/algorithms/intersectionSimplifier/DensityCluster.java |
robustness-copilot_data_527 | /**
* Update a StateTransition object so a new StateComponent will be added to dCache's state. The
* changes are recorded in StateTransition so they can be applied later.
*
* @param ourPath the StatePath to this StateComposite.
* @param newComponentPath the StatePath to this StateComp... | /modules/dcache-info/src/main/java/org/dcache/services/info/base/StateComposite.java |
robustness-copilot_data_528 | /**
* Calculate the mass total given the elements and their respective occurrences.
*
* @param elemToCond_new The IIsotope to calculate
* @param value_In Array matrix with occurrences
* @return The sum total
*/
private double calculateMassT(List<IIsotope> isoToCond_... | /legacy/src/main/java/org/openscience/cdk/formula/MassToFormulaTool.java |
robustness-copilot_data_529 | /**
* Add the class designated by the fully qualified class name provided to the set of
* resolved classes if and only if it is approved by the Test supplied.
*
* @param test the test used to determine if the class matches
* @param fqn the fully qualified name of a class
*/
protected void addIfMatchi... | /src/main/java/org/apache/ibatis/io/ResolverUtil.java |
robustness-copilot_data_530 | /**
* Clones this <code>IChemObject</code>. It clones the identifier, flags,
* properties and pointer vectors. The ChemObjectListeners are not cloned, and
* neither is the content of the pointer vectors.
*
*@return The cloned object
*/
public Object clone() throws CloneNotSupportedE... | /base/data/src/main/java/org/openscience/cdk/ChemObject.java |
robustness-copilot_data_531 | /**
* Applies the given function to a byte subtag if it is present, converting it to boolean and
* negating it 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 b... | /src/main/java/net/glowstone/util/nbt/CompoundTag.java |
robustness-copilot_data_532 | /**
* Copy buffer to response for read count smaller then buffer size.
* @param buffer The buffer array
* @param response The response array
* @param num Number of bytes in response array from previous read
* @param read Number of bytes read in the buffer
* @return New count of bytes in th... | /src/main/java/org/cactoos/io/TailOf.java |
robustness-copilot_data_533 | /**
* Obtains caller details, class name and method, to be provided to the actual Logger. This code
* is adapted from ODLLogRecord, which should yield consistency in reporting using PlatformLogger
* versus a raw (ODL) Logger. JDK Logger does something similar but utilizes native methods
* directly.
*/
C... | /operator/src/main/java/oracle/kubernetes/operator/logging/LoggingFacade.java |
robustness-copilot_data_534 | /**
* Return the best wrapped version of the provided session.
*
* @param session the session to wrap
* @return a wrapped session
*/
public static Session useBestWrapper(final Session session){
if (session instanceof JackrabbitWrapper || session instanceof JcrWrapper) {
return sess... | /bundle/src/main/java/com/adobe/acs/commons/wrap/impl/SessionLogoutGuardFactory.java |
robustness-copilot_data_535 | /**
* Extracts the number of data layers and data blocks from the layer around the bull's eye.
*
* @param bullsEyeCorners the array of bull's eye corners
* @throws NotFoundException in case of too many errors or invalid parameters
*/
private void extractParameters(ResultPoint[] bullsEyeCorners) throws N... | /core/src/main/java/com/google/zxing/aztec/detector/Detector.java |
robustness-copilot_data_536 | /**
* JSON Schema defines oneOf as a validation property which can be applied to any schema.
* <p>
* OpenAPI Specification is a variant of JSON Schema for which oneOf is defined as:
* "Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema."
* <p>
* Where the... | /modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/OpenApiSchemaValidations.java |
robustness-copilot_data_537 | /**
* Find out if the Database 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 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/DataEngineRelationalDataHandler.java |
robustness-copilot_data_538 | /**
* Create unit vectors from one atom to all other provided atoms.
*
* @param fromAtom reference atom (will become 0,0)
* @param toAtoms list of to atoms
* @return unit vectors
*/
static List<Vector2d> newUnitVectors(final IAtom fromAtom, final List<IAtom> toAtoms){
final List<Vecto... | /display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/VecmathUtil.java |
robustness-copilot_data_539 | /**
* Closing leads to flushing the buffered output stream or writer to the underlying/wrapped response but only in case {@link #flushBufferOnClose} is set to {@code true}.
* Also this will automatically commit the response in case {@link #flushBuffer} has been called previously!
*
* @throws IOExc... | /bundle/src/main/java/com/adobe/acs/commons/util/BufferedServletOutput.java |
robustness-copilot_data_540 | /**
* Determines whether this entity can eat an item while healthy, and if so, applies the effects
* of eating it.
*
* @param player the player feeding the entity, for statistical purposes
* @param type an item that may be food
* @return true if the item should be consumed; false otherwise... | /src/main/java/net/glowstone/entity/GlowAnimal.java |
robustness-copilot_data_541 | /**
* Adds a single network change event and applies it to the corresponding
* links.
*
* @param event
* a network change event.
*/
public void addNetworkChangeEvent(final NetworkChangeEvent event){
this.networkChangeEvents.add(event);
for (Link link : event.getLinks()) {
if (lin... | /matsim/src/main/java/org/matsim/core/network/NetworkImpl.java |
robustness-copilot_data_542 | /**
* Maps given WeekDay to representation hold by this instance.
*
* @param targetWeekDayDefinition - referred weekDay
* @param dayOfWeek - day of week to be mapped.
* Value corresponds to this instance mapping.
* @return - int result
*/
... | /src/main/java/com/cronutils/mapper/WeekDay.java |
robustness-copilot_data_543 | /**
* Create an encoder for axial 2D stereochemistry for the given start and
* end atoms.
*
* @param container the molecule
* @param start start of the cumulated system
* @param startBonds bonds connected to the start
* @param end end of the cumulated system
* @param... | /tool/hash/src/main/java/org/openscience/cdk/hash/stereo/GeometricCumulativeDoubleBondFactory.java |
robustness-copilot_data_544 | /**
* Returns Patterns for the provided billing formats, as a Multimap mapping the Pattern to the
* attributes contained in the pattern.
*/
private static ImmutableSetMultimap<Pattern, String> toPatterns(Map<String, String> formats){
ImmutableSetMultimap.Builder<Pattern, String> builder = ImmutableS... | /modules/dcache/src/main/java/org/dcache/services/billing/text/BillingParserBuilder.java |
robustness-copilot_data_545 | /**
* Removed empty fields, sets field value display order.
*
* @param dsv the dataset version show fields we want to tidy up.
*/
protected void tidyUpFields(DatasetVersion dsv){
Iterator<DatasetField> dsfIt = dsv.getDatasetFields().iterator();
while (dsfIt.hasNext()) {
if (dsfIt.ne... | /src/main/java/edu/harvard/iq/dataverse/engine/command/impl/AbstractDatasetCommand.java |
robustness-copilot_data_546 | /**
* Save the headers into a headers node under the cache entry node.
* @throws RepositoryException
*/
private void populateHeaders() throws RepositoryException{
final Node headers = getOrCreateByPath(entryNode, JCRHttpCacheStoreConstants.PATH_HEADERS, OAK_UNSTRUCTURED, OAK_UNSTRUCTURED);
for (... | /bundle/src/main/java/com/adobe/acs/commons/httpcache/store/jcr/impl/writer/EntryNodeWriter.java |
robustness-copilot_data_547 | /**
* The method calculates the number of rotatable bonds of an atom container.
* If the boolean parameter is set to true, terminal bonds are included.
*
*@param ac AtomContainer
*@return number of rotatable bonds
*/
public DescriptorValue calculate(IAt... | /descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/RotatableBondsCountDescriptor.java |
robustness-copilot_data_548 | /**
* Converts the given config value into the appropriate bundle. If the given value is blank or
* null, the default value is returned. If the given value does not match any preprogrammmed
* bundles case insensitively, then null is returned.
*
* @param configValue The value from the config fil... | /src/main/java/net/glowstone/util/CompatibilityBundle.java |
robustness-copilot_data_549 | /**
* Method assigns 3D coordinates to the heavy atoms in an aliphatic chain.
*
* @param molecule the reference molecule for the chain
* @param chain the atoms to be assigned, must be connected
* @throws CDKException the 'chain' was not a chain
*/
public void placeAlipha... | /tool/builder3d/src/main/java/org/openscience/cdk/modeling/builder3d/AtomPlacer3D.java |
robustness-copilot_data_550 | /**
* Calculates Tanimoto distance for two count fingerprints using method 1.
*
* The feature/count type fingerprints may be of different length.
* Uses Tanimoto method from {@cdk.cite Steffen09}.
*
* @param fp1 count fingerprint 1
* @param fp2 count fingerprint 2
* @return a Ta... | /descriptor/fingerprint/src/main/java/org/openscience/cdk/similarity/Tanimoto.java |
robustness-copilot_data_551 | /**
* Judge whether job's sharding items are all started.
*
* @return job's sharding items are all started or not
*/
public boolean isAllStarted(){
return jobNodeStorage.isJobNodeExisted(GuaranteeNode.STARTED_ROOT) && configService.load(false).getShardingTotalCount() == jobNodeStorage.getJobNod... | /elasticjob-lite/elasticjob-lite-core/src/main/java/org/apache/shardingsphere/elasticjob/lite/internal/guarantee/GuaranteeService.java |
robustness-copilot_data_552 | /**
* Generic grow function, expand an array by a varried amount to have
* enough (required) space.
*
* @param array the array to expand
* @param required the minimum required space
* @param <T> array type
* @return the expanded array
*/
private static T[] grow(T[] array... | /base/data/src/main/java/org/openscience/cdk/AtomContainer.java |
robustness-copilot_data_553 | /**
* Provide a new QualityValue with the same quality but with the value mapped to a different
* type.
*
* @param <U> The new type of the value
* @param conversion the method to convert to the new type
* @return The mapped QualityValue.
*/
public QualityValue<U> mapWith(Funct... | /modules/dcache/src/main/java/org/dcache/util/QualityValue.java |
robustness-copilot_data_554 | /**
* Performs a breadthFirstSearch in an AtomContainer starting with a
* particular sphere, which usually consists of one start atom, and searches
* for a pi system.
*
* @param container The AtomContainer to
* be searched
* @param sphere A sphere of atoms to
... | /descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/LargestPiSystemDescriptor.java |
robustness-copilot_data_555 | /**
* Receive a 'picture' message to the socket (or actor).
*
*
* @param picture The picture is a string that defines the type of each frame.
* This makes it easy to recv a complex multiframe message in
* one call. The picture can contain any of these characte... | /src/main/java/org/zeromq/proto/ZPicture.java |
robustness-copilot_data_556 | /**
* Decides wheter to use the round robin algorithm or full enumeration algorithm.
* The round robin implementation here is optimized for chemical elements in organic compounds. It gets slow
* if
* - the mass of the smallest element is very large (i.e. hydrogen is not allowed)
* - the maximal... | /tool/formula/src/main/java/org/openscience/cdk/formula/MolecularFormulaGenerator.java |
robustness-copilot_data_557 | /**
* Adds a condition to the status, replacing any existing conditions with the same type, and removing other
* conditions according to the domain rules.
*
* @param newCondition the condition to add.
* @return this object.
*/
public DomainStatus addCondition(DomainCondition newCondition){
if (co... | /operator/src/main/java/oracle/kubernetes/weblogic/domain/model/DomainStatus.java |
robustness-copilot_data_558 | /**
* An easily-readable version of the permutation as a product of cycles.
*
* @return the cycle form of the permutation as a string
*/
public String toCycleString(){
int n = this.values.length;
boolean[] p = new boolean[n];
Arrays.fill(p, true);
StringBuilder sb = new StringBuilde... | /tool/group/src/main/java/org/openscience/cdk/group/Permutation.java |
robustness-copilot_data_559 | /**
* Applies the command line configuration to a MATSim {@link Config} instance.
* See {@link CommandLine} for more information on the syntax.
*
* @throws ConfigurationException
*/
public void applyConfiguration(Config config) throws ConfigurationException{
List<String> configOptions = options.keySet()... | /matsim/src/main/java/org/matsim/core/config/CommandLine.java |
robustness-copilot_data_560 | /**
* Given a molecule (possibly disconnected) compute the labels which
* would order the atoms by increasing canonical labelling. If the SMILES
* are isomeric (i.e. stereo and isotope specific) the InChI numbers are
* used. These numbers are loaded via reflection and the 'cdk-inchi' module
* s... | /storage/smiles/src/main/java/org/openscience/cdk/smiles/SmilesGenerator.java |
robustness-copilot_data_561 | /**
* Adds double-bond conformations ({@link DoubleBondStereochemistry}) to the
* atom-container.
*
* @param g Beam graph object (for directional bonds)
* @param ac The atom-container built from the Beam graph
*/
private void addDoubleBondStereochemistry(Graph g, IAtomContainer ac){
... | /storage/smiles/src/main/java/org/openscience/cdk/smiles/BeamToCDK.java |
robustness-copilot_data_562 | /**
* Pre-visit allows us to prepare the visitor for more optimal output.
* Currently we
* - find the most common stoke/fill/stroke-width values and set these as defaults
*
* @param elements elements to be visited
*/
public void previsit(Collection<? extends IRenderingElement> elements){
... | /app/depict/src/main/java/org/openscience/cdk/depict/SvgDrawVisitor.java |
robustness-copilot_data_563 | /**
* Quick check to see whether <i>either</i> the links are shorter than the
* given threshold.
* @param linkA
* @param linkB
* @param thresholdLength
* @return true if <i>either</i> links are shorter than the given threshold,
* false otherwise.
*/
private boolean eitherLinkIsShorterThanThreshold(L... | /matsim/src/main/java/org/matsim/core/network/algorithms/NetworkSimplifier.java |
robustness-copilot_data_564 | /**
* Progress the state-machine - the function return false when a mapping is
* found on the mapping is done.
*
* @return the state is partial
*/
private boolean map(){
if ((n == state.nMax() || m == state.mMax()) && !stack.empty())
state.remove(n = stack.popN(), m = stack.popM())... | /base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/StateStream.java |
robustness-copilot_data_565 | /**
* Check if all atoms in the bond list have 3D coordinates. There is some
* redundant checking but the list will typically be short.
*
* @param bonds the bonds to check
* @return whether all atoms have 2D coordinates
*/
private static boolean has3DCoordinates(List<IBond> bonds){
fo... | /tool/hash/src/main/java/org/openscience/cdk/hash/stereo/GeometricCumulativeDoubleBondFactory.java |
robustness-copilot_data_566 | /**
* Return true iff this restriction has an Authorisation that is subsumed by other.
*/
private boolean hasAuthorisationSubsumedBy(Authorisation other){
EnumSet<Activity> disallowedOtherActivities = EnumSet.complementOf(other.activities);
return authorisations.stream().anyMatch(ap -> disallowedOthe... | /modules/common/src/main/java/org/dcache/auth/attributes/MultiTargetedRestriction.java |
robustness-copilot_data_567 | /**
* Extract the information from a line which contains HOSE_ID & energy.
*
* @param str String with the information
* @return List with String = HOSECode and String = energy
*/
private static List<String> extractInfo(String str){
int beg = 0;
int end = 0;
int len = str.lengt... | /descriptor/qsaratomic/src/main/java/org/openscience/cdk/qsar/descriptors/atomic/ProtonAffinityHOSEDescriptor.java |
robustness-copilot_data_568 | /**
* Adds the specified class to the list of {@link VFS} implementations. Classes added in this
* manner are tried in the order they are added and before any of the built-in implementations.
*
* @param clazz The {@link VFS} implementation class to add.
*/
public static void addImplClass(Class<? extends... | /src/main/java/org/apache/ibatis/io/VFS.java |
robustness-copilot_data_569 | /**
* Finds the AtomType matching the Atom's element symbol, formal charge and
* hybridization state.
*
* @param atomContainer AtomContainer
* @param atom the target atom
* @exception CDKException Exception thrown if something goes wrong
* @return the mat... | /tool/structgen/src/main/java/org/openscience/cdk/atomtype/StructGenAtomTypeGuesser.java |
robustness-copilot_data_570 | /**
* Main method to be called to resolve overlap situations.
*
* @param ac The atomcontainer in which the atom or bond overlap exists
* @param sssr A ring set for this atom container if one exists, otherwhise null
*/
public double resolveOverlap(IAtomContainer ac, IRingSet sssr){
Ve... | /tool/sdg/src/main/java/org/openscience/cdk/layout/OverlapResolver.java |
robustness-copilot_data_571 | /**
* Normalize the intensity (relative abundance) of all isotopes in relation
* of the most abundant isotope.
*
* @param isopattern The IsotopePattern object
* @param minIntensity The minimum abundance
* @return The IsotopePattern cleaned
*/
private IsotopePattern clea... | /tool/formula/src/main/java/org/openscience/cdk/formula/IsotopePatternGenerator.java |
robustness-copilot_data_572 | /**
* Converts a {@link IAtomContainer} into a {@link Model} representation using the CDK OWL.
*
* @param molecule {@link IAtomContainer} to serialize into a RDF graph.
* @return the RDF graph representing the {@link IAtomContainer}.
*/
public static Model molecule2Model(IAtomContainer molecul... | /storage/iordf/src/main/java/org/openscience/cdk/libio/jena/Convertor.java |
robustness-copilot_data_573 | /**
* Selects a pool from a list using the WASS algorithm.
* <p/>
* Returns null if all pools are full.
*/
public P selectByAvailableSpace(List<P> pools, long filesize, Function<P, PoolCostInfo> getCost){
int length = pools.size();
double[] available = new double[length];
double minLoad... | /modules/dcache/src/main/java/org/dcache/poolmanager/WeightedAvailableSpaceSelection.java |
robustness-copilot_data_574 | /**
* Returns the time in millisecond until the next timer.
* @return the time in millisecond until the next timer.
*/
public long timeout(){
final long now = now();
for (Entry<Timer, Long> entry : entries()) {
final Timer timer = entry.getKey();
final Long expiration = entry.get... | /src/main/java/zmq/util/Timers.java |
robustness-copilot_data_575 | /**
* Check whether another path points to the same location.
*
* @param otherPath: the other path to compare
* @return: whether the other path point to the same location.
*/
public boolean equals(Object otherObject){
if (!(otherObject instanceof StatePath)) {
return false;
}
... | /modules/dcache-info/src/main/java/org/dcache/services/info/base/StatePath.java |
robustness-copilot_data_576 | /**
* Build edges of the RGraphs
* This method create the edge of the CDKRGraph and
* calculates the incompatibility and neighbourhood
* relationships between CDKRGraph nodes.
*
* @param graph the rGraph
* @param ac1 first molecule. Must not be an IQueryAtomContainer.
*... | /legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKMCS.java |
robustness-copilot_data_577 | /**
* Parse and verify the state returned from the provider.
*
* As it contains the providers implementation "id" field when send by us,
* we can return the corresponding provider object.
*
* This function is not side effect free: it will (if present) set {@link #redirectPage}
* to th... | /src/main/java/edu/harvard/iq/dataverse/authorization/providers/oauth2/OAuth2LoginBackingBean.java |
robustness-copilot_data_578 | /**
* Calculate the configuration of the double bond as a parity.
*
* @return opposite (+1), together (-1)
*/
public int parity(){
// create three vectors, v->u, v->w and u->x
double[] vu = toVector(v, u);
double[] vw = toVector(v, w);
double[] ux = toVector(u, x);
// normal vec... | /tool/hash/src/main/java/org/openscience/cdk/hash/stereo/DoubleBond3DParity.java |
robustness-copilot_data_579 | /**
* Parse a string like "[0,2|1,3]" to form the partition; cells are
* separated by '|' characters and elements within the cell by commas.
*
* @param strForm the partition in string form
* @return the partition corresponding to the string
* @throws IllegalArgumentException thrown if the ... | /tool/group/src/main/java/org/openscience/cdk/group/Partition.java |
robustness-copilot_data_580 | /**
* Applies the given function to a list subtag if it is present, converting it to a list of
* values first.
*
* @param <T> the type to convert the list entries to
* @param key the key to look up
* @param type the type that the list entries must be
* @param consumer the function to ... | /src/main/java/net/glowstone/util/nbt/CompoundTag.java |
robustness-copilot_data_581 | /**
* Returns true if and only if the subject has the given user ID.
*/
public static boolean hasUid(Subject subject, long uid){
Set<UidPrincipal> principals = subject.getPrincipals(UidPrincipal.class);
for (UidPrincipal principal : principals) {
if (principal.getUid() == uid) {
r... | /modules/common/src/main/java/org/dcache/auth/Subjects.java |
robustness-copilot_data_582 | /**
* access the number of stereo bonds in the provided bond list.
*
* @param bonds input list
* @return number of UP/DOWN bonds in the list, -1 if a query bond was
* found
*/
private static int nStereoBonds(List<IBond> bonds){
int count = 0;
for (IBond bond : bonds) {
... | /tool/hash/src/main/java/org/openscience/cdk/hash/stereo/GeometricTetrahedralEncoderFactory.java |
robustness-copilot_data_583 | /**
* Writes the gathered data tab-separated into a text file.
*
* @param filename The name of a file where to write the gathered data.
*/
public void write(final String filename){
try (OutputStream stream = IOUtils.getOutputStream(IOUtils.getFileUrl(filename), false)) {
write(new PrintStream(strea... | /matsim/src/main/java/org/matsim/analysis/LegHistogram.java |
robustness-copilot_data_584 | /**
* Checks if the given path looks like a Jcr Package path.
*
* Provides a very fast, String-based, in-memory check to weed out most false positives and avoid
* resolving the path to a Jcr Package and ensure it is valid.
*
* @param path
* @return true if at least one path looks like... | /bundle/src/main/java/com/adobe/acs/commons/replication/status/impl/JcrPackageReplicationStatusEventHandler.java |
robustness-copilot_data_585 | /**
* Stores an IRingSet corresponding to a AtomContainer using the bond numbers.
*
* @param mol The IAtomContainer for which to store the IRingSet.
* @param ringSet The IRingSet to store
*/
private void storeRingSystem(IAtomContainer mol, IRingSet ringSet){
listOfRings = new ArrayLi... | /legacy/src/main/java/org/openscience/cdk/smiles/DeduceBondSystemTool.java |
robustness-copilot_data_586 | /**
* Writes a single frame in PDB format to the Writer.
*
* @param molecule the Molecule to write
*/
public void writeMolecule(IAtomContainer molecule) throws CDKException{
try {
writeHeader();
int atomNumber = 1;
String hetatmRecordName = (writeAsHET.isSet()) ? "HETATM... | /storage/pdb/src/main/java/org/openscience/cdk/io/PDBWriter.java |
robustness-copilot_data_587 | /**
* Adds an {@link CarrierShipment} to the {@link Carrier}.
* @param carrier
* @param carrierShipment
*/
public static void addShipment(Carrier carrier, CarrierShipment carrierShipment){
carrier.getShipments().put(carrierShipment.getId(), carrierShipment);
} | /contribs/freight/src/main/java/org/matsim/contrib/freight/carrier/CarrierUtils.java |
robustness-copilot_data_588 | /**
* Calculates the distance of a given point to the border of the
* rectangle. If the point lies within the rectangle, the distance
* is zero.
*
* @param x left-right location
* @param y up-down location
* @return distance to border, 0 if inside rectangle or on border
*/
private double calcDi... | /matsim/src/main/java/org/matsim/core/network/LinkQuadTree.java |
robustness-copilot_data_589 | /**
* Loads the persisted version of each process definition and set values on the in-memory
* version to be consistent.
*/
protected void makeProcessDefinitionsConsistentWithPersistedVersions(ParsedDeployment parsedDeployment){
for (ProcessDefinitionEntity processDefinition : parsedDeployment.getAl... | /activiti-core/activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/deployer/BpmnDeployer.java |
robustness-copilot_data_590 | /**
* Returns a {@link String} representation for this {@link IDifference}.
*
* @return a {@link String}
*/
public String toString(){
if (differences.size() == 0)
return "";
StringBuffer diffBuffer = new StringBuffer();
diffBuffer.append(this.name).append('{');
Iterator<IDif... | /misc/diff/src/main/java/org/openscience/cdk/tools/diff/tree/Point3dDifference.java |
robustness-copilot_data_591 | /**
* Returns true if the given arg is a valid main command of Liquibase.
*
* @param arg the String to test
* @return true if it is a valid main command, false if not
*/
private static boolean isCommand(String arg){
return COMMANDS.MIGRATE.equals(arg) || COMMANDS.MIGRATE_SQL.equalsIgnoreCa... | /liquibase-core/src/main/java/liquibase/integration/commandline/Main.java |
robustness-copilot_data_592 | /**
* Convert this value to int (if possible).
*
* @return Int value.
*/
int intValue(){
try {
return Integer.parseInt(value());
} catch (NumberFormatException x) {
throw new TypeMismatchException(name(), int.class, x);
}
} | /jooby/src/main/java/io/jooby/Value.java |
robustness-copilot_data_593 | /**
* Parse an string possibly containing CXSMILES into an intermediate state
* ({@link CxSmilesState}) representation.
*
* @param str input character string (SMILES title field)
* @param state output CXSMILES state
* @return position where CXSMILES ends (below 0 means no CXSMILES)
*/... | /storage/smiles/src/main/java/org/openscience/cdk/smiles/CxSmilesParser.java |
robustness-copilot_data_594 | /**
* First creates a grid based on the network bounding box. Then removes all zones that do not intersect the service area.
* Result may contain zones that are barely included in the service area. But as passengers may walk into the service area,
* it seems appropriate that the DrtZonalSystem, which is used for ... | /contribs/drt/src/main/java/org/matsim/contrib/drt/analysis/zonal/DrtGridUtils.java |
robustness-copilot_data_595 | /**
* Extracts each folder path and builds FileFolders, with the qualified name of the form
* '<externalSourceName>::<path>'. The order is important, meaning the first folder is the one containing the file
* and the last one the root, and used in creating the folder hierarchy structure al the way to the ... | /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_596 | /**
* Return the isotope pattern normalized to the highest abundance.
*
* @param isotopeP The IsotopePattern object to normalize
* @return The IsotopePattern normalized
*/
public static IsotopePattern normalize(IsotopePattern isotopeP){
IsotopeContainer isoHighest = null;
dou... | /tool/formula/src/main/java/org/openscience/cdk/formula/IsotopePatternManipulator.java |
robustness-copilot_data_597 | /**
* Replace the AtomContainer at a specific position (array has to be large enough).
*
* @param position position in array for AtomContainer
* @param container the replacement AtomContainer
*/
public void replaceAtomContainer(int position, IAtomContainer container){
IAtomContainer old... | /base/data/src/main/java/org/openscience/cdk/AtomContainerSet.java |
robustness-copilot_data_598 | /**
* Returns all the indices a bit set may have. Can be used for
* cheap for-each loops (i.e. no boxing/unboxing).
* @return All the indices a BitSet has [0..63]
*/
public static short[] allIndices(){
short[] retVal = new short[64];
for (short s = 0; s < 64; s++) retVal[s] = s;
return retVal;
} | /src/main/java/edu/harvard/iq/dataverse/util/BitSet.java |
robustness-copilot_data_599 | /**
* Method that can be called to serialize this node and
* all of its descendants using specified JSON generator.
*/
public void serialize(JsonGenerator g, SerializerProvider provider) throws IOException{
@SuppressWarnings("deprecation")
boolean trimEmptyArray = (provider != null) && !provider... | /src/main/java/com/fasterxml/jackson/databind/node/ObjectNode.java |
robustness-copilot_data_600 | /**
* Validates input, resulting in a instance of {@link ValidationResult} which provides details on all validations performed (success, error, warning).
*
* @param input The object instance to be validated.
*
* @return A {@link ValidationResult} which details the success, error, and warning va... | /modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/GenericValidator.java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.