id stringlengths 25 27 | content stringlengths 190 15.4k | max_stars_repo_path stringlengths 31 217 |
|---|---|---|
robustness-copilot_data_301 | /**
* Returns either {@code `text`} (backtick-quoted) or {@code [null]}.
*
* @since 2.9
*/
public static String backticked(String text){
if (text == null) {
return "[null]";
}
return new StringBuilder(text.length() + 2).append('`').append(text).append('`').toString();
} | /src/main/java/com/fasterxml/jackson/databind/util/ClassUtil.java |
robustness-copilot_data_302 | /**
* Performs that Bayesian model generation, using the {molecule:activity} pairs that have been submitted up to this
* point. Once this method has finished, the object can be used to generate predictions, validation data or to
* serialise for later use.
*/
public void build() throws CDKException{... | /tool/model/src/main/java/org/openscience/cdk/fingerprint/model/Bayesian.java |
robustness-copilot_data_303 | /**
* Position the hydrogen label relative to the element label.
*
* @param position relative position where the hydrogen is placed
* @param element the outline of the element label
* @param hydrogen the outline of the hydrogen
* @return positioned hydrogen label
*/
TextOutline posi... | /display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/StandardAtomGenerator.java |
robustness-copilot_data_304 | /**
* Calculate the hash code and store it for later quick reference.
*/
void calcHashCode(){
int code = 0;
int elementCount = 0;
for (String element : _elements) {
int stringHash = 0;
if (element == null) {
stringHash = NULL_ELEMENT_HASH;
} else {
... | /modules/dcache-info/src/main/java/org/dcache/services/info/base/StatePath.java |
robustness-copilot_data_305 | /**
* Checks whether the query angle constraint matches a target distance.
*
* This method checks whether a query constraint is satisfied by an observed
* angle (represented by a {@link org.openscience.cdk.pharmacophore.PharmacophoreAngleBond} in the target molecule.
* Note that angles are com... | /tool/pcore/src/main/java/org/openscience/cdk/pharmacophore/PharmacophoreQueryAngleBond.java |
robustness-copilot_data_306 | /**
* Recursively encodes a SMARTS expression into the provides
* string builder.
*
* @param idx atom index
* @param bprev previous bond
* @param sb destition to write SMARTS to
*/
private void encodeExpr(int idx, int bprev, StringBuilder sb){
avisit[idx] = numVisit++;
s... | /tool/smarts/src/main/java/org/openscience/cdk/smarts/SmartsFragmentExtractor.java |
robustness-copilot_data_307 | /**
* Find out if the Topic 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 entity... | /open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineTopicHandler.java |
robustness-copilot_data_308 | /**
* Extracts top-level coverage information from the JaCoCo report document.
*/
private static Map<Type, Coverage> loadRatios(JacocoReportDir layout, String[] includes, String... excludes) throws IOException{
Map<CoverageElement.Type, Coverage> ratios = new LinkedHashMap<>();
ExecutionFileLoader efl = la... | /src/main/java/hudson/plugins/jacoco/JacocoBuildAction.java |
robustness-copilot_data_309 | /**
* Use this to add yourself to this IChemObject as a listener. In order to do
* so, you must implement the ChemObjectListener Interface.
*
*@param col the ChemObjectListener
*@see #removeListener
*/
public void addListener(IChemObjectListener col){
List<IChemObjectListe... | /base/data/src/main/java/org/openscience/cdk/ChemObject.java |
robustness-copilot_data_310 | /**
* The number values to check is typically small ({@literal < 5}) and thus
* we use brute-force to count the number of inversions.
*
*{@inheritDoc}
*/
public int parity(long[] current){
int count = 0;
for (int i = 0, n = indices.length; i < n; i++) {
for (int j = i + 1; j < ... | /tool/hash/src/main/java/org/openscience/cdk/hash/stereo/BasicPermutationParity.java |
robustness-copilot_data_311 | /**
* Equals method that returns true if containing properties are the same.
*
* @param objectToCompare object to compare
* @return boolean result of comparison
*/
public boolean equals(Object objectToCompare){
if (this == objectToCompare) {
return true;
}
if (objectToCompa... | /open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/rest/LogRecordRequestBody.java |
robustness-copilot_data_312 | /**
* Split a label it to recognised tokens for reversing, the
* validity of the label is not checked! The method is intended
* for zero/single attachments only and linkers are not supported.
*
*
* Example:
* {@code NHCH2Ph -> N,H,C,H2,Ph -> reverse/join -> PhH2CHN}
*
* ... | /display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/AbbreviationLabel.java |
robustness-copilot_data_313 | /**
* Builds a protein by connecting a new amino acid at the C-terminus of the
* given strand. The acidic oxygen of the added amino acid is removed so that
* additional amino acids can be added savely. But this also means that you
* might want to add an oxygen at the end of the protein building!
... | /storage/pdb/src/main/java/org/openscience/cdk/tools/ProteinBuilderTool.java |
robustness-copilot_data_314 | /**
* Method to find all links in {@link Network} that intersect a given {@link Link}. Convenience method that
* only uses MATSim objects.
*
* @param link
* @param network
* @return
*/
public static List<Link> findIntersectingLinks(Link link, final Network network){
LineString segment = GeometryUti... | /matsim/src/main/java/org/matsim/core/utils/geometry/GeometryUtils.java |
robustness-copilot_data_315 | /**
* Helper method for testing checks without having to deploy them on a Sonar instance.
*
* @param inputFile is the file to be checked
* @param visitors AST checks and visitors to use
* @return file checked with measures and issues
*/
public static SourceFile scanSingleInputFile(InputFile inputFile... | /cxx-squid/src/main/java/org/sonar/cxx/CxxAstScanner.java |
robustness-copilot_data_316 | /**
* Returns a new numeric column initialized with the given name and size. The values in the column
* are integers beginning at startsWith and continuing through size (exclusive), monotonically
* increasing by 1 TODO consider a generic fill function including steps or random samples from
* various distrib... | /core/src/main/java/tech/tablesaw/api/IntColumn.java |
robustness-copilot_data_317 | /**
* Checks the JSON result from the dynamic cluster size update REST request.
*
* @param jsonResult The JSON String result from the dynamic server cluster size update REST
* request
* @return true if the result means the update was successful, false otherwise
*/
static boolean checkUpdateDynam... | /operator/src/main/java/oracle/kubernetes/operator/wlsconfig/WlsClusterConfig.java |
robustness-copilot_data_318 | /**
* Obtain the integer MMFF atom type for a given symbolic MMFF type.
*
* @param sym Symbolic MMFF type
* @return integer MMFF type
*/
int intType(final String sym){
Integer intType = typeMap.get(sym);
if (intType == null) {
return 0;
}
return intType;
} | /tool/forcefield/src/main/java/org/openscience/cdk/forcefield/mmff/MmffParamSet.java |
robustness-copilot_data_319 | /**
* Given the service associated with a server service-deleted event, removes the service if it is
* not older than the one recorded.
*
* @param serverName the name of the associated server
* @param event the service associated with the event
* @return true if the service was actually removed
*/
... | /operator/src/main/java/oracle/kubernetes/operator/helpers/DomainPresenceInfo.java |
robustness-copilot_data_320 | /**
* Calculate the count of atoms of the longest aliphatic chain in the supplied {@link IAtomContainer}.
* <p>
* The method require one parameter:
* if checkRingSyste is true the CDKConstant.ISINRING will be set
*
* @param mol The {@link IAtomContainer} for which this descriptor is to be ... | /descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/LongestAliphaticChainDescriptor.java |
robustness-copilot_data_321 | /**
* Builds the CDKRGraph ( resolution graph ), from two atomContainer
* (description of the two molecules to compare)
* This is the interface point between the CDK model and
* the generic MCSS algorithm based on the RGRaph.
*
* @param sourceGraph Description of the first molecule
... | /legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKMCS.java |
robustness-copilot_data_322 | /**
* Returns the lowest 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 molecul... | /base/data/src/main/java/org/openscience/cdk/ConformerContainer.java |
robustness-copilot_data_323 | /**
* Internal - create a canonical SMILES string temporarily adjusting to default
* hydrogen count. This method may be moved to the SMILESGenerator in future.
*
* @param mol molecule
* @param ordering ordering output
* @return SMILES
* @throws CDKException SMILES could be generate
... | /tool/sdg/src/main/java/org/openscience/cdk/layout/IdentityTemplateLibrary.java |
robustness-copilot_data_324 | /**
* Determines if 2 bondA1 have 1 atom in common if second is atom query AtomContainer
* and wheter the order of the atoms is correct (atoms match).
*
* @param bondA1 first bondA1
* @param bond2 second bondA1
* @param queryBond1 first query bondA1
* @param queryBond2 second qu... | /legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKMCS.java |
robustness-copilot_data_325 | /**
* Reusable method to replace placeholders in the input string./
*
* @param input String input
* @param contentVariableReplacements current map of content variables
* @return The replaced or original String
*/
private String replaceInString(String input, Map<String, Object> contentVari... | /bundle/src/main/java/com/adobe/acs/commons/ccvar/filter/ContentVariableJsonFilter.java |
robustness-copilot_data_326 | /**
* Unregisters the application {@link HealthCheck} with the given name.
*
* @param name the name of the {@link HealthCheck} instance
*/
public void unregister(String name){
HealthCheck healthCheck;
synchronized (lock) {
healthCheck = healthChecks.remove(name);
if (healthC... | /metrics-healthchecks/src/main/java/io/dropwizard/metrics5/health/HealthCheckRegistry.java |
robustness-copilot_data_327 | /**
* Transform all services from the existing carrier to the new carrier with
* shipments. The location of the depot from which the "old" carrier starts the
* tour to the service is used as fromLocation for the new Shipment.
*
* @param carrierWS the "new" carrier with Shipments
* @param carrier the alrea... | /contribs/freight/src/main/java/org/matsim/contrib/freight/utils/FreightUtils.java |
robustness-copilot_data_328 | /**
* Given the assigned preliminary MMFF atom types (symbs[]) update these to the aromatic types.
* To begin, all the 5 and 6 member aromatic cycles are discovered. The symbolic types of five
* and six member cycles are then update with {@link #updateAromaticTypesInFiveMemberRing(int[],
* String[])... | /tool/forcefield/src/main/java/org/openscience/cdk/forcefield/mmff/MmffAromaticTypeMapping.java |
robustness-copilot_data_329 | /**
* Helper method that encapsulate logic in trying to close output generator
* in case of failure; useful mostly in forcing flush()ing as otherwise
* error conditions tend to be hard to diagnose. However, it is often the
* case that output state may be corrupt so we need to be prepared for
* ... | /src/main/java/com/fasterxml/jackson/databind/util/ClassUtil.java |
robustness-copilot_data_330 | /**
* Simple helper function that sets all hydrogen counts to 0.
*
* @param container a structure representation
* @return the input container
*/
private static IAtomContainer clearHydrogenCounts(IAtomContainer container){
for (IAtom atom : container.atoms()) atom.setImplicitHydrogenCount(... | /tool/sdg/src/main/java/org/openscience/cdk/layout/StructureDiagramGenerator.java |
robustness-copilot_data_331 | /**
* Compare two {@link IChemObject} classes and return the difference as a {@link String}.
*
* @param first the first of the two classes to compare
* @param second the second of the two classes to compare
* @return a {@link String} representation of the difference between the first and secon... | /misc/diff/src/main/java/org/openscience/cdk/tools/diff/AtomDiff.java |
robustness-copilot_data_332 | /**
* Find a neutral oxygen bonded to the {@code atom} with a pi bond.
*
* @param container the container
* @param atom an atom from the container
* @return a pi bonded oxygen (or null if not found)
*/
private static IAtom findPiBondedOxygen(IAtomContainer container, IAtom atom){
... | /storage/inchi/src/main/java/org/openscience/cdk/graph/invariant/InChINumbersTools.java |
robustness-copilot_data_333 | /**
* Read a ChemFile from a file in MDL RDF format.
*
* @param chemFile The IChemFile
* @return The IChemFile that was read from the RDF file.
*/
private IChemFile readChemFile(IChemFile chemFile) throws CDKException{
IChemSequence chemSequence = chemFile.getBuilder().newInstance(ICh... | /storage/ctab/src/main/java/org/openscience/cdk/io/MDLRXNReader.java |
robustness-copilot_data_334 | /**
* Writes the values of the snapshot to the given stream.
*
* @param output an output stream
*/
public void dump(OutputStream output){
try (PrintWriter out = new PrintWriter(new OutputStreamWriter(output, UTF_8))) {
for (long value : values) {
out.printf("%d%n", value);
... | /metrics-core/src/main/java/io/dropwizard/metrics5/UniformSnapshot.java |
robustness-copilot_data_335 | /**
* Returns a StringColumn with the year and quarter from this column concatenated into a String
* that will sort lexicographically in temporal order.
*
* <p>This simplifies the production of plots and tables that aggregate values into standard
* temporal units (e.g., you want monthly data but your sou... | /core/src/main/java/tech/tablesaw/columns/dates/DateMapFunctions.java |
robustness-copilot_data_336 | /**
* Mark the passage of time and decay the current rate accordingly.
*/
public void tick(){
final long count = uncounted.sumThenReset();
final double instantRate = count / interval;
if (initialized) {
final double oldRate = this.rate;
rate = oldRate + (alpha * (instantRate - old... | /metrics-core/src/main/java/io/dropwizard/metrics5/EWMA.java |
robustness-copilot_data_337 | /**
* Locate all 5 and 6 member cycles (rings) in a structure representation.
*
* @param container structure representation
* @param graph adjacency list graph representation of structure
* @return closed walks (first = last vertex) of the cycles
*/
static int[][] cyclesOfSizeFiveOrSi... | /tool/forcefield/src/main/java/org/openscience/cdk/forcefield/mmff/MmffAromaticTypeMapping.java |
robustness-copilot_data_338 | /**
* Convert to a single value map, abandon values except the first of each parameter.
*
* @return single value map
*/
public Map<String, String> toSingleValueMap(){
return queryMap.entrySet().stream().collect(Collectors.toMap(Map.Entry::getKey, entry -> entry.getValue().get(0)));
} | /elasticjob-infra/elasticjob-restful/src/main/java/org/apache/shardingsphere/elasticjob/restful/wrapper/QueryParameterMap.java |
robustness-copilot_data_339 | /**
* Create a new chem model for a single {@link IAtomContainer}.
*
* @param container the container to create the model for
* @return a new {@link IChemModel}
*/
private static IChemModel newModel(final IAtomContainer container){
if (container == null)
throw new NullPointerExcept... | /storage/ctab/src/main/java/org/openscience/cdk/io/MDLV2000Reader.java |
robustness-copilot_data_340 | /**
* Given an index of an atom in the query get the index of the other atom in
* the double bond.
*
* @param i query atom index
* @return the other atom index involved in a double bond
*/
private int otherIndex(int i){
IDoubleBondStereochemistry element = (IDoubleBondStereochemistry)... | /base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/StereoMatch.java |
robustness-copilot_data_341 | /**
* Returns an Iterator for looping over all isotopes in this MolecularFormulaExpand.
*
* @return An Iterator with the isotopes in this MolecularFormulaExpand
*/
public Iterable<IIsotope> isotopes(){
return new Iterable<IIsotope>() {
@Override
public Iterator<IIsotope> it... | /tool/formula/src/main/java/org/openscience/cdk/formula/MolecularFormulaRange.java |
robustness-copilot_data_342 | /**
* It is needed to call the addExplicitHydrogensToSatisfyValency method from
* the class tools.HydrogenAdder, and 3D coordinates.
*
*@param atom The IAtom for which the DescriptorValue is requested
*@param ac AtomContainer
*@return a dou... | /descriptor/qsaratomic/src/main/java/org/openscience/cdk/qsar/descriptors/atomic/InductiveAtomicHardnessDescriptor.java |
robustness-copilot_data_343 | /**
* Produces an ROC validation set, using the inputs provided prior to the model building, using leave-one-out. Note that
* this should only be used for small datasets, since it is very thorough, and scales as O(N^2) relative to training set
* size.
*/
public void validateLeaveOneOut(){
final... | /tool/model/src/main/java/org/openscience/cdk/fingerprint/model/Bayesian.java |
robustness-copilot_data_344 | /**
* Creates a canonical request string out of HTTP request components.
*
* @param sortedIncludedHeaders the headers that should be included into canonical request string
* @return a string representing the canonical request
*/
public String create(List<String> sortedIncludedHeaders){
// ... | /src/main/java/com/twilio/jwt/validation/RequestCanonicalizer.java |
robustness-copilot_data_345 | /**
* Attempts to discover classes that are annotated with the annotation. Accumulated
* classes can be accessed by calling {@link #getClasses()}.
*
* @param annotation
* the annotation that should be present on matching classes
* @param packageNames
* one or more package names to... | /src/main/java/org/apache/ibatis/io/ResolverUtil.java |
robustness-copilot_data_346 | /**
* Adds or replaces a list subtag with a list of compound tags.
*
* @param key the key to write to
* @param list the list contents as compound tags
*/
public void putCompoundList(@NonNls String key, List<CompoundTag> list){
put(key, new ListTag<>(TagType.COMPOUND, list));
} | /src/main/java/net/glowstone/util/nbt/CompoundTag.java |
robustness-copilot_data_347 | /**
* Determines if this AtomContainer contains 2D coordinates for some or all molecules.
* See comment for center(IAtomContainer atomCon, Dimension areaDim, HashMap renderingCoordinates) for details on coordinate sets
*
*
* @param container the molecule to be considered
* @return 0 n... | /legacy/src/main/java/org/openscience/cdk/geometry/GeometryTools.java |
robustness-copilot_data_348 | /**
* Create a copy of the list of V1EnvVar environment variables.
*
* @param envVars list of environment variables to copy
* @return List containing a copy of the original list.
*/
public static List<V1EnvVar> createCopy(List<V1EnvVar> envVars){
ArrayList<V1EnvVar> copy = new ArrayList<>();
if ... | /operator/src/main/java/oracle/kubernetes/operator/helpers/PodHelper.java |
robustness-copilot_data_349 | /**
* Assign non-planar, up and down labels to indicate tetrahedral configuration. Currently all
* existing directional labels are removed before assigning new labels.
*
* @param container the structure to assign labels to
* @return a container with assigned labels (currently the same as the in... | /tool/sdg/src/main/java/org/openscience/cdk/layout/NonplanarBonds.java |
robustness-copilot_data_350 | /**
* Initiate the MolecularFormulaExpand with the maximum and minimum occurrence of the Elements.
* In this case all elements of the periodic table are loaded.
*/
private void ensureDefaultOccurElements(IChemObjectBuilder builder){
if (mfRange == null) {
String[] elements = new String[] { "... | /tool/formula/src/main/java/org/openscience/cdk/formula/rules/ElementRule.java |
robustness-copilot_data_351 | /**
* Adds a new data series to the chart with the specified title.
* <code>xs<code> and <code>ys</code> should have the same length. If not,
* only as many items are shown as the shorter array contains.
*
* @param title
* @param xs
* The x values.
* @param ys
* The y values.
... | /matsim/src/main/java/org/matsim/core/utils/charts/XYScatterChart.java |
robustness-copilot_data_352 | /**
* Check to see if the schema is a free form object.
*
* A free form object is an object (i.e. 'type: object' in a OAS document) that:
* 1) Does not define properties, and
* 2) Is not a composed schema (no anyOf, oneOf, allOf), and
* 3) additionalproperties is not defined, or additional... | /modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java |
robustness-copilot_data_353 | /**
* Return all molecular formulas but ordered according the tolerance difference between masses.
*
* @param mass The mass to analyze
* @param formulaSet The IMolecularFormulaSet to order
* @return The IMolecularFormulaSet ordered
*/
private IMolecularFormulaSet ret... | /legacy/src/main/java/org/openscience/cdk/formula/MassToFormulaTool.java |
robustness-copilot_data_354 | /**
* Electron contribution of an element with the specified connectivity and valence.
*
* @param elem atomic number
* @param x connectivity
* @param v bonded valence
* @return p electrons
*/
static int contribution(int elem, int x, int v){
switch(elem) {
case 6:
... | /tool/forcefield/src/main/java/org/openscience/cdk/forcefield/mmff/MmffAromaticTypeMapping.java |
robustness-copilot_data_355 | /**
* isNullType returns true if the input schema is the 'null' type.
*
* The 'null' type is supported in OAS 3.1 and above. It is not supported
* in OAS 2.0 and OAS 3.0.x.
*
* For example, the "null" type could be used to specify that a value must
* either be null or a specified type... | /modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java |
robustness-copilot_data_356 | /**
* Checks the current URL path against the included and excluded patterns. Exclusions hold priority.
*
* @param urlPath Current request path
* @return if the request should be processed
*/
private boolean shouldProcess(String urlPath){
// If includes are specified but none are valid we ... | /bundle/src/main/java/com/adobe/acs/commons/ccvar/filter/ContentVariableJsonFilter.java |
robustness-copilot_data_357 | /**
* Process De-Classified Entity event for lineage entity
* The entity context is published if there is no lineage classification left.
* The Classification Context event is sent if there are lineage classifications available on lineage entity.
*
* @param entityDetail the entity object that c... | /open-metadata-implementation/access-services/asset-lineage/asset-lineage-server/src/main/java/org/odpi/openmetadata/accessservices/assetlineage/listeners/AssetLineageOMRSTopicListener.java |
robustness-copilot_data_358 | /**
* If any errors have been found, print the list of errors first, then print the command line help text.
*
* @param errorMessages List of error messages
* @param stream the output stream to write the text to
*/
protected void printHelp(List<String> errorMessages, PrintStream stream){... | /liquibase-core/src/main/java/liquibase/integration/commandline/Main.java |
robustness-copilot_data_359 | /**
* Gets whether there has been a position change between the two Locations.
*
* @param first The initial location.
* @param second The final location.
* @return A boolean.
*/
public static boolean hasMoved(Location first, Location second){
return first.getX() != second.getX() || fi... | /src/main/java/net/glowstone/util/Position.java |
robustness-copilot_data_360 | /**
* Calculates the fingerprints for the given {@link IAtomContainer}, and stores them for subsequent retrieval.
*
* @param mol chemical structure; all nodes should be known legitimate elements
*/
public void calculate(IAtomContainer mol) throws CDKException{
this.mol = mol;
fplist.clear()... | /descriptor/fingerprint/src/main/java/org/openscience/cdk/fingerprint/CircularFingerprinter.java |
robustness-copilot_data_361 | /**
* Adds or replaces a list subtag with a list of floats.
*
* @param key the key to write to
* @param list the list contents as floats, to convert to float tags
*/
public void putFloatList(@NonNls String key, List<Float> list){
putList(key, TagType.FLOAT, list, FloatTag::new);
} | /src/main/java/net/glowstone/util/nbt/CompoundTag.java |
robustness-copilot_data_362 | /**
* Applies the given function to a list subtag if it is present and its contents are string
* 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 readStri... | /src/main/java/net/glowstone/util/nbt/CompoundTag.java |
robustness-copilot_data_363 | /**
* Access the index of Obj->Int map, if the entry isn't found we return -1.
*
* @param idxs index map
* @param obj the object
* @param <T> the object type
* @return index or -1 if not found
*/
private static Integer findIdx(Map<T, Integer> idxs, T obj){
Integer idx = idxs.get(... | /storage/ctab/src/main/java/org/openscience/cdk/io/MDLV3000Writer.java |
robustness-copilot_data_364 | /**
* Creates and adds a {@link Volume} to the {@link Count}ing station.
* @param h indicating the hour-of-day. <b><i>Note: the hours for a counting
* station must be from 1-24, and <b><i>not</i></b> from 0-23,
* otherwise the {@link MatsimCountsReader} will throw an error.
* </i></b>
* @param val t... | /matsim/src/main/java/org/matsim/counts/Count.java |
robustness-copilot_data_365 | /**
* Returns a one line string representation of this Atom.
* Methods is conform RFC #9.
*
* @return The string representation of this Atom
*/
public String toString(){
StringBuffer stringContent = new StringBuffer(64);
stringContent.append("Atom(").append(hashCode());
if (getSym... | /base/silent/src/main/java/org/openscience/cdk/silent/Atom.java |
robustness-copilot_data_366 | /**
* Creates a binary encoded 'picture' message to the socket (or actor), so it can be sent.
* The arguments are encoded in a binary format that is compatible with zproto, and
* is designed to reduce memory allocations.
*
* @param picture The picture argument is a string that defines the
... | /src/main/java/org/zeromq/proto/ZPicture.java |
robustness-copilot_data_367 | /**
* Encrypts the provided packet, so it's can't be eavesdropped during a transfer
* to a CollectD server. Wire format:
* <pre>
* +---------------------------------+-------------------------------+
* ! Type (0x0210) ! Length !
* +------------------... | /metrics-collectd/src/main/java/io/dropwizard/metrics5/collectd/PacketWriter.java |
robustness-copilot_data_368 | /**
* Checks that all the cells are singletons - that is, they only have one
* element. A discrete partition is equivalent to a permutation.
*
* @return true if all the cells are discrete
*/
public boolean isDiscrete(){
for (SortedSet<Integer> cell : cells) {
if (cell.size() != 1) ... | /tool/group/src/main/java/org/openscience/cdk/group/Partition.java |
robustness-copilot_data_369 | /**
* Calculate the nearest <i>N</i> words for a given input word.
*
* @param vectors vectors, keyed by word
* @param word the input word
* @param topN the number of similar word vectors to output
* @return the {@code topN} similar words of the input word
*/
private static Set<String> neares... | /src/main/java/io/anserini/ann/ApproximateNearestNeighborEval.java |
robustness-copilot_data_370 | /**
* Update aromatic atom types in a six member ring. The aromatic types here are hard coded from
* the 'MMFFAROM.PAR' file.
*
* @param cycle 6-member aromatic cycle / ring
* @param symbs vector of symbolic types for the whole structure
*/
static void updateAromaticTypesInSixMemberRing(i... | /tool/forcefield/src/main/java/org/openscience/cdk/forcefield/mmff/MmffAromaticTypeMapping.java |
robustness-copilot_data_371 | /**
* Adjust all double bond elements in the provided structure. <b>IMPORTANT:
* up/down labels should be adjusted before adjust double-bond
* configurations. coordinates are reflected by this method which can lead
* to incorrect tetrahedral specification.</b>
*
* @param container the stru... | /tool/sdg/src/main/java/org/openscience/cdk/layout/CorrectGeometricConfiguration.java |
robustness-copilot_data_372 | /**
* Given the current target candidate (m), find the next candidate. The next
* candidate is the next vertex > m (in some ordering) that is unmapped and
* is adjacent to a mapped vertex (terminal). If there is no such vertex
* (disconnected) the next unmapped vertex is returned. If there are no mo... | /base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/AbstractVFState.java |
robustness-copilot_data_373 | /**
* Adds an Isotope to this MolecularFormulaExpand in a number of
* maximum and minimum occurrences allowed.
*
* @param isotope The isotope to be added to this MolecularFormulaExpand
* @param countMax The maximal number of occurrences to add
* @param countMin The minimal number of ... | /tool/formula/src/main/java/org/openscience/cdk/formula/MolecularFormulaRange.java |
robustness-copilot_data_374 | /**
* Fetches the Lucene {@link Document} based on some field other than its unique collection docid. For example,
* scientific articles might have DOIs. The method is named to be consistent with Lucene's
* {@link IndexReader#document(int)}, contra Java's standard method naming conventions.
*
* @param re... | /src/main/java/io/anserini/index/IndexReaderUtils.java |
robustness-copilot_data_375 | /**
* Due to the error with old implementation where total features
* were passed instead of failures (and vice versa) following correction must be applied for trends generated
* between release 3.0.0 and 3.1.0.
*/
private void applyPatchForFeatures(){
for (int i = 0; i < totalFeatures.length; ... | /src/main/java/net/masterthought/cucumber/Trends.java |
robustness-copilot_data_376 | /**
* Finds IChemFormats that provide a container for serialization for the
* given features. The syntax of the integer is explained in the DataFeatures class.
*
* @param features the data features for which a IChemFormat is searched
* @return an array of IChemFormat's that can contai... | /storage/io/src/main/java/org/openscience/cdk/io/WriterFactory.java |
robustness-copilot_data_377 | /**
* Layout the ring system, rotate and translate the template.
*
*@param originalCoord coordinates of the placedRingAtom from the template
*@param placedRingAtom placedRingAtom
*@param ringSet ring system which placedRingAtom is part of
*@param centerPlac... | /tool/builder3d/src/main/java/org/openscience/cdk/modeling/builder3d/ModelBuilder3D.java |
robustness-copilot_data_378 | /**
* Access the neighbors of {@code element} as their indices.
*
* @param element tetrahedral element
* @param map atom index lookup
* @return the neighbors
*/
private int[] neighbors(ITetrahedralChirality element, Map<IAtom, Integer> map){
IAtom[] atoms = element.getLigands();
... | /base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/StereoMatch.java |
robustness-copilot_data_379 | /**
* Adds the cq:ReplicationStatus mixin if the node doesnt already have it or does have it as its jcr:supertype
* already.
*
* @param node the node obj
* @throws RepositoryException
*/
private void addReplicationStatusMixin(final Node node) throws RepositoryException{
if (!this.hasM... | /bundle/src/main/java/com/adobe/acs/commons/replication/status/impl/ReplicationStatusManagerImpl.java |
robustness-copilot_data_380 | /**
* Returns an Iterator for looping over all isotopes in this adduct formula.
*
* @return An Iterator with the isotopes in this adduct formula
*/
public Iterable<IIsotope> isotopes(){
return new Iterable<IIsotope>() {
@Override
public Iterator<IIsotope> iterator() {
... | /base/silent/src/main/java/org/openscience/cdk/silent/AdductFormula.java |
robustness-copilot_data_381 | /**
* Create an instance of a {@link ValidationRule} which should result in an error should the evaluate of this rule fail.
*
* @param failureMessage The message to be displayed in the event of a test failure (intended to be user-facing).
* @param fn The test condition to be applied as a part of thi... | /modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/ValidationRule.java |
robustness-copilot_data_382 | /**
* Generate the OAuth2 Provider URL to be used in the login page link for the provider.
* @param idpId Unique ID for the provider (used to lookup in authn service bean)
* @param redirectPage page part of URL where we should be redirected after login (e.g. "dataverse.xhtml")
* @return A generated ... | /src/main/java/edu/harvard/iq/dataverse/authorization/providers/oauth2/OAuth2LoginBackingBean.java |
robustness-copilot_data_383 | /**
* Splits the table into two stratified samples, this uses the specified column to divide the
* table into groups, randomly assigning records to each according to the proportion given in
* trainingProportion.
*
* @param column the column to be used for the stratified sampling
* @param table1Proport... | /core/src/main/java/tech/tablesaw/api/Table.java |
robustness-copilot_data_384 | /**
* Test whether we accept atom and it's connected bonds for inclusion in a
* double bond configuration. This method checks for query bonds (up/down)
* as well as double bond counts. If there is more then one double bond in
* the connect bonds then it cannot have Z/E configuration.
*
* @... | /tool/hash/src/main/java/org/openscience/cdk/hash/stereo/GeometricDoubleBondEncoderFactory.java |
robustness-copilot_data_385 | /**
* Create a new Precondition subclass based on the given tag name.
*/
public Precondition create(String tagName){
Class<?> aClass = preconditions.get(tagName);
if (aClass == null) {
return null;
}
try {
return (Precondition) aClass.getConstructor().newInstance();
} catc... | /liquibase-core/src/main/java/liquibase/precondition/PreconditionFactory.java |
robustness-copilot_data_386 | /**
* Initialize the surface, generating the points on the accessible surface
* area of each atom as well as calculating the surface area of each atom.
*/
private void init(){
for (IAtom atom : atoms) {
if (atom.getPoint3d() == null)
throw new IllegalArgumentException("One or mor... | /descriptor/qsarmolecular/src/main/java/org/openscience/cdk/geometry/surface/NumericalSurface.java |
robustness-copilot_data_387 | /**
* Returns all the groups that are in, of are ancestors of a group in
* the passed group collection.
*
* @param groups
* @return {@code groups} and their ancestors.
*/
public Set<Group> collectAncestors(Collection<Group> groups){
Set<Group> retVal = new HashSet<>();
Set<Group... | /src/main/java/edu/harvard/iq/dataverse/authorization/groups/GroupServiceBean.java |
robustness-copilot_data_388 | /**
* Return the isotope pattern sorted by intensity
* to the highest abundance.
*
* @param isotopeP The IsotopePattern object to sort
* @return The IsotopePattern sorted
*/
public static IsotopePattern sortByIntensity(IsotopePattern isotopeP){
try {
IsotopePattern i... | /tool/formula/src/main/java/org/openscience/cdk/formula/IsotopePatternManipulator.java |
robustness-copilot_data_389 | /**
* Processes a collection of {@link ExecutionEntity} instances, which form on execution tree.
* All the executions share the same rootProcessInstanceId (which is provided).
* The return value will be the root {@link ExecutionEntity} instance, with all child {@link ExecutionEntity}
* instances populated a... | /activiti-core/activiti-engine/src/main/java/org/activiti/engine/impl/persistence/entity/ExecutionEntityManagerImpl.java |
robustness-copilot_data_390 | /**
* Test if the MII domain wants to use online update.
*
* @return true if using online update
*/
boolean isUseOnlineUpdate(){
return Optional.ofNullable(configuration).map(Configuration::getModel).map(Model::getOnlineUpdate).map(OnlineUpdate::getEnabled).orElse(false);
} | /operator/src/main/java/oracle/kubernetes/weblogic/domain/model/DomainSpec.java |
robustness-copilot_data_391 | /**
* If cachedBytes are not null, returns a Reader created from the cachedBytes. Otherwise, returns
* a Reader from the underlying source.
*/
public Reader createReader(byte[] cachedBytes) throws IOException{
if (cachedBytes != null) {
return charset != null ? new InputStreamReader(new ByteArrayI... | /core/src/main/java/tech/tablesaw/io/Source.java |
robustness-copilot_data_392 | /**
* Create a new encoder for the specified left and right atoms. The parent
* is the atom which is connected by a double bond to the left and right
* atom. For simple double bonds the parent of each is the other atom, in
* cumulenes the parents are not the same.
*
* @param container th... | /tool/hash/src/main/java/org/openscience/cdk/hash/stereo/GeometricDoubleBondEncoderFactory.java |
robustness-copilot_data_393 | /**
* Create the charge adjunct text for the specified charge and number of unpaired electrons.
*
* @param charge formal charge
* @param unpaired number of unpaired electrons
* @return adjunct text
*/
static String chargeAdjunctText(final int charge, final int unpaired){
StringBuild... | /display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/StandardAtomGenerator.java |
robustness-copilot_data_394 | /**
* Generates a random float between {@code -range} and {@code range}.
*
* @param range the bounds of the random float.
* @return A randomly generated float.
*/
public static float randomReal(float range){
ThreadLocalRandom rand = ThreadLocalRandom.current();
return (2.0F * rand.next... | /src/main/java/net/glowstone/util/SoundUtil.java |
robustness-copilot_data_395 | /**
* Apache and Nginx default to legacy CGI behavior in which header with underscore are ignored. Raise this for awareness to the user.
*
* @param parameter Any spec doc parameter. The method will handle {@link HeaderParameter} evaluation.
* @return {@link ValidationRule.Pass} if the check succeeds... | /modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/OpenApiParameterValidations.java |
robustness-copilot_data_396 | /**
* Disables an index, so it's no longer updated by Oak.
*
* @param oakIndex the index
* @throws PersistenceException
*/
public void disableIndex(@Nonnull Resource oakIndex) throws PersistenceException{
final ModifiableValueMap oakIndexProperties = oakIndex.adaptTo(ModifiableValueMap.cla... | /bundle/src/main/java/com/adobe/acs/commons/oak/impl/EnsureOakIndexJobHandler.java |
robustness-copilot_data_397 | /**
* Adds a {@link HealthCheckRegistryListener} to a collection of listeners that will be notified on health check
* registration. Listeners will be notified in the order in which they are added. The listener will be notified of all
* existing health checks when it first registers.
*
* @param ... | /metrics-healthchecks/src/main/java/io/dropwizard/metrics5/health/HealthCheckRegistry.java |
robustness-copilot_data_398 | /**
* Factory method that should be used to construct instances.
* For some common cases, can reuse canonical instances: currently
* this is the case for empty Strings, in future possible for
* others as well. If null is passed, will return null.
*
* @return Resulting {@link TextNode} obje... | /src/main/java/com/fasterxml/jackson/databind/node/TextNode.java |
robustness-copilot_data_399 | /**
* Projects a CDKRGraph bitset on the source graph G2.
* @param set CDKRGraph BitSet to project
* @return The associate BitSet in G2
*/
public BitSet projectG2(BitSet set){
BitSet projection = new BitSet(getSecondGraphSize());
CDKRNode xNode = null;
for (int x = set.nextSetBi... | /legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKRGraph.java |
robustness-copilot_data_400 | /**
* Check if a ring in a ring set is a macro cycle. We define this as a
* ring with >= 10 atom and has at least one bond that isn't contained
* in any other rings.
*
* @param ring ring to check
* @param rs rest of ring system
* @return ring is a macro cycle
*/
private boolea... | /tool/sdg/src/main/java/org/openscience/cdk/layout/StructureDiagramGenerator.java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.