id stringlengths 25 27 | content stringlengths 190 15.4k | max_stars_repo_path stringlengths 31 217 |
|---|---|---|
robustness-copilot_data_701 | /**
* Writes the fields of the given node into the generator.
*/
private void writeFieldsOfNode(JsonGenerator generator, JsonNode node) throws IOException{
if (node != null) {
for (Iterator<Entry<String, JsonNode>> fields = node.fields(); fields.hasNext(); ) {
Entry<String, JsonNode> ... | /src/main/java/net/logstash/logback/composite/GlobalCustomFieldsJsonProvider.java |
robustness-copilot_data_702 | /**
* Method to deal with distance calculation when only the x and y-components
* of the coordinates are used. The elevation (z component) is ignored,
* whether it is available or not.
* (xy-plane)
* @param coord
* @param other
* @return
*/
publi... | /matsim/src/main/java/org/matsim/core/utils/geometry/CoordUtils.java |
robustness-copilot_data_703 | /**
* Create the port alias and attach it to the process.
*
* @param userId the name of the calling user
* @param portAlias the port alias values
* @param processGUID the unique identifier of the process
* @param externalSourceName the unique name of the externa... | /open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEnginePortHandler.java |
robustness-copilot_data_704 | /**
* Private method that actually parses the input to read a ChemFile
* object.
*
* Each PMP frame is stored as a Crystal in a ChemModel. The PMP
* file is stored as a ChemSequence of ChemModels.
*
* @return A ChemFile containing the data parsed from input.
*/
private IChem... | /storage/io/src/main/java/org/openscience/cdk/io/PMPReader.java |
robustness-copilot_data_705 | /**
* Destroys this entity by removing it from the world and marking it as not being active.
*/
public void remove(){
removed = true;
active = false;
boundingBox = null;
world.getEntityManager().unregister(this);
server.getEntityIdManager().deallocate(this);
this.setPassenger(null);
... | /src/main/java/net/glowstone/entity/GlowEntity.java |
robustness-copilot_data_706 | /**
* Obtain the permutation parity (-1,0,+1) to put the ligands in descending
* order (highest first). A parity of 0 indicates two or more ligands were
* equivalent.
*
* @param ligands the ligands to sort
* @return parity, odd (-1), even (+1) or none (0)
*/
private static int permPa... | /descriptor/cip/src/main/java/org/openscience/cdk/geometry/cip/CIPTool.java |
robustness-copilot_data_707 | /**
* Hydrogen atom types are assigned based on their parent types. The mmff-symb-mapping file
* provides this mapping.
*
* @param hdefIn input stream of mmff-symb-mapping.tsv
* @return mapping of parent to hydrogen definitions
* @throws IOException
*/
private Map<String, String> loa... | /tool/forcefield/src/main/java/org/openscience/cdk/forcefield/mmff/MmffAtomTypeMatcher.java |
robustness-copilot_data_708 | /**
* Returns a map from appenders to levels for a logger.
* <p>
* The map contains the effective log levels, that is, the levels used for filtering log
* events.
*/
private synchronized Map<String, Level> computeEffectiveMap(LoggerName logger){
Map<String, Level> inheritedMap = getInherit... | /modules/cells/src/main/java/dmg/util/logback/FilterThresholdSet.java |
robustness-copilot_data_709 | /**
* Removes all isotopes from a given element in the MolecularFormula.
*
* @param formula IMolecularFormula molecularFormula
* @param element The IElement of the IIsotopes to be removed
* @return The molecularFormula with the isotopes removed
*/
public static IMolecularF... | /tool/formula/src/main/java/org/openscience/cdk/tools/manipulator/MolecularFormulaManipulator.java |
robustness-copilot_data_710 | /**
* Adds or replaces a list subtag with a list of doubles.
*
* @param key the key to write to
* @param list the list contents as doubles, to convert to double tags
*/
public void putDoubleList(@NonNls String key, List<Double> list){
putList(key, TagType.DOUBLE, list, DoubleTag::new);
} | /src/main/java/net/glowstone/util/nbt/CompoundTag.java |
robustness-copilot_data_711 | /**
* True, if the MolecularFormula 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 MolecularFormula is searched for
* @return Tr... | /base/data/src/main/java/org/openscience/cdk/formula/MolecularFormula.java |
robustness-copilot_data_712 | /**
* Parses the pattern into a {@link NodeWriter}.
*
* @return a {@link NodeWriter}
* @throws JsonPatternException thrown in case of invalid pattern
*/
private NodeWriter<Event> initializeNodeWriter() throws JsonPatternException{
AbstractJsonPatternParser<Event> parser = createParser(thi... | /src/main/java/net/logstash/logback/composite/AbstractPatternJsonProvider.java |
robustness-copilot_data_713 | /**
* Method for constructing a new instance with configuration that
* updates passed Object (as root value), instead of constructing
* a new value.
*<p>
* Note that the method does NOT change state of this reader, but
* rather construct and returns a newly configured instance.
*/
p... | /src/main/java/com/fasterxml/jackson/databind/ObjectReader.java |
robustness-copilot_data_714 | /**
* Returns a list of the vertices contained in this cycle.
* The vertices are in the order of a traversal of the cycle.
*
* @return a list of the vertices contained in this cycle
*/
public List vertexList(){
List vertices = new ArrayList(edgeSet().size());
Object startVertex = verte... | /legacy/src/main/java/org/openscience/cdk/ringsearch/cyclebasis/SimpleCycle.java |
robustness-copilot_data_715 | /**
* Create the oak index based on the ensure definition.
*
* @param ensuredDefinition the ensure definition
* @param oakIndexes the parent oak index folder
* @return the updated oak index resource
* @throws PersistenceException
* @throws RepositoryException
*/
public Re... | /bundle/src/main/java/com/adobe/acs/commons/oak/impl/EnsureOakIndexJobHandler.java |
robustness-copilot_data_716 | /**
* Test a permutation to see if it is in the group. Note that this also
* alters the permutation passed in.
*
* @param permutation the one to test
* @return the position it should be in the group, if any
*/
public int test(Permutation permutation){
for (int i = 0; i < size; i++) {
... | /tool/group/src/main/java/org/openscience/cdk/group/PermutationGroup.java |
robustness-copilot_data_717 | /**
* Create a {@link CoordinatorRegistryCenter} or return the existing one if there is one set up with the same {@code connectionString}, {@code namespace} and {@code digest} already.
*
* @param connectString registry center connect string
* @param namespace registry center namespace
* @param ... | /elasticjob-lite/elasticjob-lite-lifecycle/src/main/java/org/apache/shardingsphere/elasticjob/lite/lifecycle/internal/reg/RegistryCenterFactory.java |
robustness-copilot_data_718 | /**
* Build a new StatePath that points to the same location from the immediate child's
* point-of-view. For example, if the current path is characterised as <tt>aa.bb.cc</tt>, then
* the returned StatePath is characterised by <tt>bb.cc</tt>.
* <p>
* If the path has no children of children, nu... | /modules/dcache-info/src/main/java/org/dcache/services/info/base/StatePath.java |
robustness-copilot_data_719 | /**
* Create a dynamic server config using server template and index number of this server.
*
* @param name Name of the server
* @param index index of this server within the cluster, for example, the index of dserver-2 would
* be 2
* @param clusterName name of the WLS cluster that this server belo... | /operator/src/main/java/oracle/kubernetes/operator/wlsconfig/WlsDynamicServerConfig.java |
robustness-copilot_data_720 | /**
* For links with unknown max speed we assume that links with a length of less than 300m are urban links. For urban
* links with a length of 0m the speed is 10km/h. For links with a length of 300m the speed is the default freespeed
* property for that highway type. For links with a length ... | /contribs/osm/src/main/java/org/matsim/contrib/osm/networkReader/LinkProperties.java |
robustness-copilot_data_721 | /**
* This function takes a path and tries to find the file in the file system or
* in the resource path. The order of resolution is as follows:
*
* <ol>
* <li>Find path in file system</li>
* <li>Find path in file system with compression extension (e.g. *.gz)</li>
... | /matsim/src/main/java/org/matsim/core/utils/io/IOUtils.java |
robustness-copilot_data_722 | /**
* Adds a Molecule to the list of templates use by this TemplateHandler.
*
* @param molecule The molecule to be added to the TemplateHandler
*/
public void addMolecule(IAtomContainer molecule){
if (!GeometryUtil.has2DCoordinates(molecule))
throw new IllegalArgumentException("Template... | /tool/sdg/src/main/java/org/openscience/cdk/layout/TemplateHandler.java |
robustness-copilot_data_723 | /**
* Return true if the specified 'schema' is an object that can be extended with additional properties.
* Additional properties means a Schema should support all explicitly defined properties plus any
* undeclared properties.
*
* A MapSchema differs from an ObjectSchema in the following way:
... | /modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java |
robustness-copilot_data_724 | /**
* Sort the {@code indices}, which correspond to an index in the {@code atoms} array in
* clockwise order.
*
* @param indices indices, 0 to n
* @param focus the central atom
* @param atoms the neighbors of the focus
* @param n the number of neighbors
* @return the pe... | /tool/sdg/src/main/java/org/openscience/cdk/layout/NonplanarBonds.java |
robustness-copilot_data_725 | /**
* Open a regular property file (not embedded in a resource - use {@link #parseDefaultPropertyFileFromResource}
* for that) and parse it.
*
* @param potentialPropertyFile path and file name to the the property file
* @throws IOException if the file cannot be opened
* @th... | /liquibase-core/src/main/java/liquibase/integration/commandline/Main.java |
robustness-copilot_data_726 | /**
* Inserts the given Node n into the pendingNodes queue and updates its time and cost information.
*
* @param n The Node that is revisited.
* @param data The data for node.
* @param pendingNodes The nodes visited and not processed yet.
* @param time The time of ... | /matsim/src/main/java/org/matsim/core/router/AStarEuclidean.java |
robustness-copilot_data_727 | /**
* Find a specific mail domain group by it's alias.
* @param groupAlias
* @return
*/
Optional<MailDomainGroup> findByAlias(String groupAlias){
try {
return Optional.of(em.createNamedQuery("MailDomainGroup.findByPersistedGroupAlias", MailDomainGroup.class).setParameter("persistedGrou... | /src/main/java/edu/harvard/iq/dataverse/authorization/groups/impl/maildomain/MailDomainGroupServiceBean.java |
robustness-copilot_data_728 | /**
* Adds a {@link MetricRegistryListener} to a collection of listeners that will be notified on
* metric creation. Listeners will be notified in the order in which they are added.
* <p>
* <b>N.B.:</b> The listener will be notified of all existing metrics when it first registers.
*
* @pa... | /metrics-core/src/main/java/io/dropwizard/metrics5/MetricRegistry.java |
robustness-copilot_data_729 | /**
* Removes a particular monomer, specified by its name.
*
* @param name The name of the monomer to remove
*/
public void removeMonomer(String name){
if (monomers.containsKey(name)) {
Monomer monomer = (Monomer) monomers.get(name);
this.remove(monomer);
monomers.remove... | /base/data/src/main/java/org/openscience/cdk/Polymer.java |
robustness-copilot_data_730 | /**
* Calculates the number of bits that would be needed to store the given value.
*
* @param number the value
* @return The number of bits that would be needed to store the value.
*/
public static int calculateNeededBits(int number){
int count = 0;
do {
count++;
number... | /src/main/java/net/glowstone/util/VariableValueArray.java |
robustness-copilot_data_731 | /**
* Returns an iterator over the elements in this queue. The iterator
* does not return the elements in any particular order. Removing
* elements is not supported via the iterator.
*
* @return an iterator over the elements in this queue.
*/
public Iterator<E> ite... | /matsim/src/main/java/org/matsim/core/utils/collections/PseudoRemovePriorityQueue.java |
robustness-copilot_data_732 | /**
* Create a CompletableFuture from guava's ListenableFuture to help migration from Guava to
* Java8.
*
* @param listenable ListenableFuture to convert.
* @return new CompletableFuture.
*/
public static CompletableFuture<T> fromListenableFuture(ListenableFuture<T> listenable){
final... | /modules/common/src/main/java/org/dcache/util/CompletableFutures.java |
robustness-copilot_data_733 | /**
* Check if all atoms in the bond list have 2D 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 has2DCoordinates(List<IBond> bonds){
fo... | /tool/hash/src/main/java/org/openscience/cdk/hash/stereo/GeometricCumulativeDoubleBondFactory.java |
robustness-copilot_data_734 | /**
* Shift the container horizontally to the right to make its bounds not
* overlap with the other bounds.
*
* @param container the {@link IAtomContainer} to shift to the right
* @param bounds the {@link Rectangle2D} of the {@link IAtomContainer}
* to shift
* @par... | /legacy/src/main/java/org/openscience/cdk/geometry/GeometryTools.java |
robustness-copilot_data_735 | /**
* Returns true if another {@link IAtomContainer} can be read.
*/
public boolean hasNext(){
if (nextAvailableIsKnown) {
return hasNext;
}
hasNext = false;
nextMolecule = null;
try {
currentFormat = (IChemFormat) MDLFormat.getInstance();
int lineNum = 0;
... | /storage/ctab/src/main/java/org/openscience/cdk/io/iterator/IteratingSDFReader.java |
robustness-copilot_data_736 | /**
* Positions an outline in the subscript position relative to another 'primary' label.
*
* @param label a label outline
* @param subscript the label outline to position as subscript
* @return positioned subscript outline
*/
TextOutline positionSubscript(TextOutline label, TextOutli... | /display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/StandardAtomGenerator.java |
robustness-copilot_data_737 | /**
* Find an r such that this[r] != other[r].
* @param other the other permutation to compare with
* @return the first point at which the two permutations differ
*/
public int firstIndexOfDifference(Permutation other){
int r = 0;
while ((r < values.length) && values[r] == other.get(r)) {
... | /tool/group/src/main/java/org/openscience/cdk/group/Permutation.java |
robustness-copilot_data_738 | /**
* IntIterator of source table row numbers that are present in this view. This can be used to in
* combination with the source table to iterate over the cells of a column in a sorted order
* without copying the column.
*
* @return an int iterator of row numbers in the source table that are present in ... | /core/src/main/java/tech/tablesaw/table/TableSlice.java |
robustness-copilot_data_739 | /**
* Apply the MDL valence model to the provided atom container.
*
* @param container an atom container loaded from an MDL format
* @return the container (for convenience)
*/
static IAtomContainer apply(IAtomContainer container){
int n = container.getAtomCount();
int[] valences = new ... | /storage/ctab/src/main/java/org/openscience/cdk/io/MDLValence.java |
robustness-copilot_data_740 | /**
* Choose any possible quadruple of the set of atoms
* in ac and establish all of the possible bonding schemes according to
* Faulon's equations.
*/
public static List<IAtomContainer> sample(IAtomContainer ac){
LOGGER.debug("RandomGenerator->mutate() Start");
List<IAtomContainer> structu... | /tool/structgen/src/main/java/org/openscience/cdk/structgen/VicinitySampler.java |
robustness-copilot_data_741 | /**
* Helper method that locates an atom based on its InChI atom table
* position, which has been set as ID.
* @param container input container
* @param position InChI atom table position
* @return atom on the position
*/
private IAtom findAtomByPosition(IAtomContainer container, int posi... | /tool/tautomer/src/main/java/org/openscience/cdk/tautomers/InChITautomerGenerator.java |
robustness-copilot_data_742 | /**
* generate the order of the Elements according probability occurrence.,
* beginning the C, H, O, N, Si, P, S, F, Cl, Br, I, Sn, B, Pb, Tl, Ba, In, Pd,
* Pt, Os, Ag, Zr, Se, Zn, Cu, Ni, Co, Fe, Cr, Ti, Ca, K, Al, Mg, Na, Ce,
* Hg, Au, Ir, Re, W, Ta, Hf, Lu, Yb, Tm, Er, Ho, Dy, Tb, Gd, Eu, Sm, Pm,... | /legacy/src/main/java/org/openscience/cdk/formula/MassToFormulaTool.java |
robustness-copilot_data_743 | /**
* the method take a boolean checkAromaticity: if the boolean is true, it means that
* aromaticity has to be checked.
*
*@param mol AtomContainer for which this descriptor is to be calculated
*@return The number of failures of the Lipinski rule
*/
public DescriptorValue calcula... | /descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/RuleOfFiveDescriptor.java |
robustness-copilot_data_744 | /**
* Get the collection of task statistics in the most recent week.
*
* @return Collection of running task statistics data objects
*/
public List<TaskRunningStatistics> findTaskRunningStatisticsWeekly(){
if (!isRdbConfigured()) {
return Collections.emptyList();
}
return rdbRep... | /elasticjob-cloud/elasticjob-cloud-scheduler/src/main/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/statistics/StatisticManager.java |
robustness-copilot_data_745 | /**
* Pop a ZFrame and return the toString() representation of it.
*
* @return toString version of pop'ed frame, or null if no frame exists.
*/
public String popString(){
ZFrame frame = pop();
if (frame == null) {
return null;
}
return frame.toString();
} | /src/main/java/org/zeromq/ZMsg.java |
robustness-copilot_data_746 | /**
* Applies the given function to a list subtag if it is present and its contents are float
* tags.
*
* @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... | /src/main/java/net/glowstone/util/nbt/CompoundTag.java |
robustness-copilot_data_747 | /**
* Evaluate the square of the Euclidean distance between two atoms.
*
*@param atom1 first atom
*@param atom2 second atom
*@return squared distance between the 2 atoms
*/
private double calculateSquaredDistanceBetweenTwoAtoms(IAtom atom1, IAtom atom2){
double distance = ... | /tool/charges/src/main/java/org/openscience/cdk/charges/InductivePartialCharges.java |
robustness-copilot_data_748 | /**
* Reverse a list of tokens for display, flipping
* brackets as needed.
*
* @param tokens list of tokens
*/
static void reverse(List<String> tokens){
Collections.reverse(tokens);
Deque<String> numbers = new ArrayDeque<>();
for (int i = 0; i < tokens.size(); i++) {
String... | /display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/AbbreviationLabel.java |
robustness-copilot_data_749 | /**
* Returns a string representation of the object: XML/UTF-8 encoded.
*
* @return object XML encoded
*/
public String toString(){
var stream = new ByteArrayOutputStream();
save(stream);
return stream.toString(StandardCharsets.UTF_8);
} | /cxx-squid/src/main/java/org/sonar/cxx/config/CxxSquidConfiguration.java |
robustness-copilot_data_750 | /**
* Use this fiber's executor to schedule an operation for some time in the future.
* @param timeout the interval before the check should run, in units
* @param unit the unit of time that defines the interval
* @param runnable the operation to run
*/
public void scheduleOnce(long timeout, TimeUnit uni... | /operator/src/main/java/oracle/kubernetes/operator/work/Fiber.java |
robustness-copilot_data_751 | /**
* A line is skipped if it is empty or is a comment. MMFF files use '*' to mark comments and '$'
* for end of file.
*
* @param line an input line
* @return whether to skip this line
*/
private static boolean skipLine(String line){
return line.isEmpty() || line.charAt(0) == '*' || l... | /tool/forcefield/src/main/java/org/openscience/cdk/forcefield/mmff/MmffAtomTypeMatcher.java |
robustness-copilot_data_752 | /**
* Normalize a path by removing consecutive <code>/</code>(slashes).
*
* @param path Path to process.
* @return Safe path pattern.
*/
static String normalizePath(@Nullable String path){
if (path == null || path.length() == 0 || path.equals("/")) {
return "/";
}
int len = path.leng... | /jooby/src/main/java/io/jooby/Router.java |
robustness-copilot_data_753 | /**
* Converts a JSON workflow configuration to a workflow configuration object.
*
* @param json JSON for workflow rule target
* @return a workflow rule target object
* @throws IOException if unable to create object
*/
public static WorkflowRuleTarget fromJson(String json) throws IOExcept... | /src/main/java/com/twilio/taskrouter/WorkflowRuleTarget.java |
robustness-copilot_data_754 | /**
* Find out if the Process object is already stored in the repository. It uses the fully qualified name to retrieve the entity
*
* @param userId the name of the calling user
* @param qualifiedName the qualifiedName name of the process to be searched
*
* @return optional with enti... | /open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineProcessHandler.java |
robustness-copilot_data_755 | /**
* Add a custom encoder to the hash generator which will be built. Although
* not enforced, the encoder should be stateless and should not modify any
* passed inputs.
*
* @param encoder an atom encoder
* @return fluent API reference (self)
* @throws NullPointerException no encoder ... | /tool/hash/src/main/java/org/openscience/cdk/hash/HashGeneratorMaker.java |
robustness-copilot_data_756 | /**
* Load a list of SMARTS patterns from the specified file.
*
* Each line in the file corresponds to a pattern with the following structure:
* PATTERN_DESCRIPTION: SMARTS_PATTERN, <i>e.g., Thioketone: [#6][CX3](=[SX1])[#6]</i>
*
* Empty lines and lines starting with a "#" are skipped.
... | /descriptor/fingerprint/src/main/java/org/openscience/cdk/fingerprint/StandardSubstructureSets.java |
robustness-copilot_data_757 | /**
* Choose a random plan from the person and return it.
* @return The newly selected plan for this person; <code>null</code> if the person has no plans.
*/
public T selectPlan(final HasPlansAndId<T, I> person){
// this used to use person.getRandomPlan(), but I inlined the function here... | /matsim/src/main/java/org/matsim/core/replanning/selectors/RandomPlanSelector.java |
robustness-copilot_data_758 | /**
* Persists the Users to CSV form data to the underlying jcr:content node.
* @param request the Sling HTTP Request object
* @param response the Sling HTTP Response object
* @throws IOException
* @throws ServletException
*/
public void doPost(SlingHttpServletRequest request, SlingHttpSe... | /bundle/src/main/java/com/adobe/acs/commons/exporters/impl/users/UsersSaveServlet.java |
robustness-copilot_data_759 | /**
* Return the enum value in the language specified format
* e.g. status becomes "status"
*
* @param value enum variable name
* @param datatype data type
* @return the sanitized value for enum
*/
public String toEnumValue(String value, String datatype){
if ("number".equalsIg... | /modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java |
robustness-copilot_data_760 | /**
* Overridable factory method called by {@link #writeValues(OutputStream)}
* method (and its various overrides), and initializes it as necessary.
*
* @since 2.5
*/
protected SequenceWriter _newSequenceWriter(boolean wrapInArray, JsonGenerator gen, boolean managedInput) throws IOException{
... | /src/main/java/com/fasterxml/jackson/databind/ObjectWriter.java |
robustness-copilot_data_761 | /**
* Given the current configuration create an {@link AtomHashGenerator}.
*
* @return instance of the generator
* @throws IllegalArgumentException no depth or encoders were configured
*/
public AtomHashGenerator atomic(){
if (depth < 0)
throw new IllegalArgumentException("no depth... | /tool/hash/src/main/java/org/openscience/cdk/hash/HashGeneratorMaker.java |
robustness-copilot_data_762 | /**
* Normalises a 5-member 'cycle' such that the hetroatom contributing the lone-pair is in
* position 1 (index 0). The alpha atoms are then in index 1 and 4 whilst the beta atoms are in
* index 2 and 3. If the ring contains more than one hetroatom the cycle is not normalised
* (return=false).
... | /tool/forcefield/src/main/java/org/openscience/cdk/forcefield/mmff/MmffAromaticTypeMapping.java |
robustness-copilot_data_763 | /**
* Will return the name of the last folder in pathName. Takes root folder into account.
* When called with argument "/folder", return value is "folder".
* When called with argument "/", return value is "/"
*
* @param pathName path
*
* @return folder name
*/
private String com... | /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_764 | /**
* Combines the values in an n x m matrix into a single array of size n.
* This process scans the rows and xors all unique values in the row
* together. If a duplicate value is found it is rotated using a
* pseudorandom number generator.
*
* @param perturbed n x m, matrix
* @return... | /tool/hash/src/main/java/org/openscience/cdk/hash/PerturbedAtomHashGenerator.java |
robustness-copilot_data_765 | /**
* Ensure that a Checksum is calculated for the supplied ChecksumType. If the ChecksumType is
* already registered then this method does nothing, otherwise the ChecksumChannel is updated to
* calculate the new ChecksumType. If the ChecksumChannel has accepted a contiguous range of
* data from of... | /modules/dcache/src/main/java/org/dcache/pool/movers/ChecksumChannel.java |
robustness-copilot_data_766 | /**
* Method that will set value of specified property if (and only if)
* it had no set value previously.
* Note that explicitly set {@code null} is a value.
* Functionally equivalent to:
*<code>
* if (get(propertyName) == null) {
* set(propertyName, value);
* return n... | /src/main/java/com/fasterxml/jackson/databind/node/ObjectNode.java |
robustness-copilot_data_767 | /**
* Pop frame off front of message, caller now owns frame.
* If next frame is empty, pops and destroys that empty frame
* (e.g. useful when unwrapping ROUTER socket envelopes)
* @return
* Unwrapped frame
*/
public ZFrame unwrap(){
if (size() == 0) {
return null;
... | /src/main/java/org/zeromq/ZMsg.java |
robustness-copilot_data_768 | /**
* Appends a throwable and recursively appends its causedby/suppressed throwables
* in "normal" order (Root cause last).
*/
private void appendRootCauseLast(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_769 | /**
* Locates by query all the ACLs that the principal participates in.
*
* @param resourceResolver the resource resolver to perform the user management
* @param principalName the principal name
* @param accessControlManager Jackrabbit access control manager
* @return a list of ... | /bundle/src/main/java/com/adobe/acs/commons/users/impl/EnsureAce.java |
robustness-copilot_data_770 | /**
* Special case, 'NCN+' matches entries that the validation suite say should actually be 'NC=N'.
* We can achieve 100% compliance by checking if NCN+ is still next to CNN+ or CIM+ after
* aromatic types are assigned
*
* @param symbs symbolic types
* @param graph adjacency list graph
... | /tool/forcefield/src/main/java/org/openscience/cdk/forcefield/mmff/MmffAtomTypeMatcher.java |
robustness-copilot_data_771 | /**
* Test if set sourceBitSet is contained in set targetBitSet.
* @param sourceBitSet a bitSet
* @param targetBitSet a bitSet
* @return true if sourceBitSet is contained in targetBitSet
*/
private boolean isContainedIn(BitSet sourceBitSet, BitSet targetBitSet){
boolean result =... | /legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKRGraph.java |
robustness-copilot_data_772 | /**
* Takes the passed info object and updated the internal fields according to it.
* @param inf the info from which we update the fields.
*/
public void applyDisplayInfo(AuthenticatedUserDisplayInfo inf){
setFirstName(inf.getFirstName());
setLastName(inf.getLastName());
if (nonEmpty(inf.getE... | /src/main/java/edu/harvard/iq/dataverse/authorization/users/AuthenticatedUser.java |
robustness-copilot_data_773 | /**
* Method called to ensure that given parser is ready for reading
* content for data binding.
*
* @return First token to be used for data binding after this call:
* can never be null as exception will be thrown if parser cannot
* provide more tokens.
*
* @throws IOException ... | /src/main/java/com/fasterxml/jackson/databind/ObjectMapper.java |
robustness-copilot_data_774 | /**
* Adds a change listener to the list of listeners.
*
* @param listener
* The listener added to the list
*/
public void addCDKChangeListener(ICDKChangeListener listener){
if (listeners == null) {
listeners = new ArrayList<ICDKChangeListener>();
}
if (!listener... | /display/render/src/main/java/org/openscience/cdk/renderer/RendererModel.java |
robustness-copilot_data_775 | /**
* Execute the task while the Thread Context Class Loader is set to the provided
* Class Loader.
*
* @param classLoader the requested class loader
* @param task the task
* @param <V> the return type of the task
* @return the return value
* @throws Exception the exception thro... | /bundle/src/main/java/com/adobe/acs/commons/util/ThreadContextClassLoaderTaskExecutor.java |
robustness-copilot_data_776 | /**
* Adds patches to the specified patch builder to correct differences in the current vs required
* maps.
*
* @param patchBuilder a builder for the patches
* @param basePath the base for the patch path (excluding the name)
* @param current a map of the values found in a Kubernetes resource
... | /operator/src/main/java/oracle/kubernetes/operator/helpers/KubernetesUtils.java |
robustness-copilot_data_777 | /**
* Splits this partition by taking the cell at cellIndex and making two
* new cells - the first with the the rest of the elements from that cell
* and the second with the singleton splitElement.
*
* @param cellIndex the index of the cell to split on
* @param splitElement the element to ... | /tool/group/src/main/java/org/openscience/cdk/group/Partition.java |
robustness-copilot_data_778 | /**
* Finds a neighbor attached to 'atom' that is singley bonded and isn't
* 'exclude'. If no such atom exists, the 'atom' is returned.
*
* @param container a molecule container
* @param atom the atom to find the neighbor or
* @param exclude don't find this atom
* @return the o... | /storage/inchi/src/main/java/org/openscience/cdk/inchi/InChIToStructure.java |
robustness-copilot_data_779 | /**
* Creates a new discretizer with bin borders defined such that each bin
* would contain approximately <tt>size</tt> samples from <tt>samples</tt>.
*
* Samples are sorted into bins in ascending order. If there are not
* sufficient (less than <tt>size</tt>) samples to fil... | /contribs/common/src/main/java/org/matsim/contrib/common/stats/FixedSampleSizeDiscretizer.java |
robustness-copilot_data_780 | /**
* Reads partial atomic charges and add the to the given ChemModel.
*
* @param model Description of the Parameter
* @throws CDKException Description of the Exception
* @throws IOException Description of the Exception
*/
private void readPartialCharges(IChemModel model) throws CDKExcep... | /storage/io/src/main/java/org/openscience/cdk/io/Gaussian98Reader.java |
robustness-copilot_data_781 | /**
* Reorders the {@link ILigand} objects in the array according to the CIP rules.
*
* @param ligands Array of {@link ILigand}s to be reordered.
* @return Reordered array of {@link ILigand}s.
*/
public static ILigand[] order(ILigand[] ligands){
ILigand[] newLigands = new ILigand[li... | /descriptor/cip/src/main/java/org/openscience/cdk/geometry/cip/CIPTool.java |
robustness-copilot_data_782 | /**
* Connect and initialize a channel from {@link ConnectionBuilder}.
*
* @param connectionBuilder must not be {@code null}.
* @return the {@link ConnectionFuture} to synchronize the connection process.
* @since 4.4
*/
protected ConnectionFuture<T> initializeChannelAsync(ConnectionBuilde... | /src/main/java/io/lettuce/core/AbstractRedisClient.java |
robustness-copilot_data_783 | /**
* Tries double bond combinations for a certain input container of which the double bonds have been stripped
* around the mobile hydrogen positions. Recursively.
*
* @param container
* @param dblBondsAdded counts double bonds added so far
* @param bondOffSet offset for next double bond ... | /tool/tautomer/src/main/java/org/openscience/cdk/tautomers/InChITautomerGenerator.java |
robustness-copilot_data_784 | /**
* Extract the charge position given a molecular formula format [O3S]2-.
*
* @param formula The formula to inspect
* @return The charge position in the string
*/
private static int findChargePosition(String formula){
int end = formula.length() - 1;
int pos = end;
while (p... | /tool/formula/src/main/java/org/openscience/cdk/tools/manipulator/MolecularFormulaManipulator.java |
robustness-copilot_data_785 | /**
* Judge whether current sharding items are all register start success.
*
* @param shardingItems current sharding items
* @return current sharding items are all start success or not
*/
public boolean isRegisterStartSuccess(final Collection<Integer> shardingItems){
for (int each : shardi... | /elasticjob-lite/elasticjob-lite-core/src/main/java/org/apache/shardingsphere/elasticjob/lite/internal/guarantee/GuaranteeService.java |
robustness-copilot_data_786 | /**
* Obtain the parity (winding) of a tetrahedral element. The parity is -1
* for clockwise (odd), +1 for anticlockwise (even) and 0 for unspecified.
*
* @param stereo configuration
* @return the parity
*/
private int parity(ITetrahedralChirality.Stereo stereo){
switch(stereo) {
... | /tool/sdg/src/main/java/org/openscience/cdk/layout/NonplanarBonds.java |
robustness-copilot_data_787 | /**
* Main method which assigns Gasteiger Marisili partial sigma charges.
*
*@param ac AtomContainer
*@param setCharge The Charge
*@return AtomContainer with partial charges
*@exception Exception Possible Exceptions
*/
public IAtomContainer a... | /tool/charges/src/main/java/org/openscience/cdk/charges/GasteigerMarsiliPartialCharges.java |
robustness-copilot_data_788 | /**
* Performs a breadthFirstSearch in an AtomContainer starting with a
* particular sphere, which usually consists of one start atom, and searches
* for the longest aliphatic chain which is yet unplaced. If the search
* encounters an unplaced ring atom, it is also appended to the chain so that
... | /tool/sdg/src/main/java/org/openscience/cdk/layout/AtomPlacer.java |
robustness-copilot_data_789 | /**
* Exclude subsequent generated nodes, if they are consecutive and on the same line.
*/
private static boolean isGeneratedNodeExcluded(AstNode astNode){
var prev = astNode.getPreviousAstNode();
return prev != null && prev.getTokenLine() == astNode.getTokenLine() && prev.isCopyBookOrGeneratedNode();
} | /cxx-checks/src/main/java/org/sonar/cxx/checks/metrics/TooManyStatementsPerLineCheck.java |
robustness-copilot_data_790 | /**
* Creates a new module / config-group with the specified name.
*
* @param name
* The name of the config-group to be created.
*
* @return the newly created config group
* @throws IllegalArgumentException
* if a config-grou... | /matsim/src/main/java/org/matsim/core/config/Config.java |
robustness-copilot_data_791 | /**
* Method called to locate deserializer ahead of time, if permitted
* by configuration. Method also is NOT to throw an exception if
* access fails.
*/
protected JsonDeserializer<Object> _prefetchRootDeserializer(JavaType valueType){
if ((valueType == null) || !_config.isEnabled(Deserializati... | /src/main/java/com/fasterxml/jackson/databind/ObjectReader.java |
robustness-copilot_data_792 | /**
* Generate a new geometric parity (2D or 3D) for the given molecule and
* atom indices. This method ensure that 2D and 3D coordinates are available
* on the specified atoms and returns null if the 2D or 3D coordinates are
* not fully available.
*
* @param mol a molecule
* @param l... | /tool/hash/src/main/java/org/openscience/cdk/hash/stereo/GeometricDoubleBondEncoderFactory.java |
robustness-copilot_data_793 | /**
* Given a file path, loads the contents of the files into a map.
*
* @param rootDir the path to the top-level directory
* @return a map of file names to string contents.
* @throws IOException if an error occurs during the read
*/
static Map<String, String> loadContents(Path rootDir) throws IOExce... | /operator/src/main/java/oracle/kubernetes/operator/helpers/FileGroupReader.java |
robustness-copilot_data_794 | /**
* Find out if the entity 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 entity to be searched
* @param entityTypeName the type name of t... | /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_795 | /**
* Atom-atom mapping of the input molecule to the bare container constructed from the InChI connection table.
* This makes it possible to map the positions of the mobile hydrogens in the InChI back to the input molecule.
* @param inchiMolGraph molecule (bare) as defined in InChI
* @param mol user... | /tool/tautomer/src/main/java/org/openscience/cdk/tautomers/InChITautomerGenerator.java |
robustness-copilot_data_796 | /**
* Waits for the counter to change to a value different from
* <code>value</code>.
* <p>
* The method returns when one of the following happens:
* <p>
* * The current counter value is different from the
* <code>value</code> argument; or
* <p>
* * Some other thread invokes... | /modules/common/src/main/java/org/dcache/util/AtomicCounter.java |
robustness-copilot_data_797 | /**
* Shift the containers in a reaction vertically upwards to not overlap
* with the reference Rectangle2D. The shift is such that the given
* gap is realized, but only if the reactions are actually overlapping.
*
* @param reaction the reaction to shift
* @param bounds the bounds of the... | /legacy/src/main/java/org/openscience/cdk/geometry/GeometryTools.java |
robustness-copilot_data_798 | /**
* Add a new singleton cell to the end of the partition containing only
* this element.
*
* @param element the element to add in its own cell
*/
public void addSingletonCell(int element){
SortedSet<Integer> cell = new TreeSet<Integer>();
cell.add(element);
this.cells.add(cell);
... | /tool/group/src/main/java/org/openscience/cdk/group/Partition.java |
robustness-copilot_data_799 | /**
* Convert a binary representation back into an event receiver's list of desired events.
*
* @param data the binary data
* @return a Map between the target and its set of desired event types.
* @throws IllegalArgumentException if the data is badly formatted.
*/
public static Map<PnfsId... | /modules/dcache/src/main/java/diskCacheV111/namespace/EventNotifier.java |
robustness-copilot_data_800 | /**
* Exchange the elements at index i with that at index j.
*
* @param values an array of values
* @param i an index
* @param j another index
*/
private static void exch(long[] values, int i, int j){
long k = values[i];
values[i] = values[j];
values[j] = k;
} | /storage/inchi/src/main/java/org/openscience/cdk/graph/invariant/InChINumbersTools.java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.