id stringlengths 25 27 | content stringlengths 190 15.4k | max_stars_repo_path stringlengths 31 217 |
|---|---|---|
robustness-copilot_data_1 | /**
* Internal - load the SMARTS patterns for each atom type from MMFFSYMB.sma.
*
* @param smaIn input stream of MMFFSYMB.sma
* @return array of patterns
* @throws IOException
*/
static AtomTypePattern[] loadPatterns(InputStream smaIn) throws IOException{
List<AtomTypePattern> matcher... | /tool/forcefield/src/main/java/org/openscience/cdk/forcefield/mmff/MmffAtomTypeMatcher.java |
robustness-copilot_data_2 | /**
* Translates a attribute name into a name suitable for a named capturing group.
*/
private static String toGroupName(String attribute){
int pos = attribute.indexOf(';');
if (pos > -1) {
attribute = attribute.substring(0, pos);
}
return attribute.replace("X", "XX").replace(".", "X"... | /modules/dcache/src/main/java/org/dcache/services/billing/text/BillingParserBuilder.java |
robustness-copilot_data_3 | /**
* Changes the position of the given Node n in the pendingNodes queue and
* updates its time and cost information.
*
* @param n
* The Node that is revisited.
* @param data
* The data for n.
* @param pendingNodes
* The nodes visited and not processed yet.
* @param ... | /matsim/src/main/java/org/matsim/pt/router/TransitLeastCostPathTree.java |
robustness-copilot_data_4 | /**
* Insert the vertex 'v' into sorted position in the array 'vs'.
*
* @param v a vertex (int id)
* @param vs array of vertices (int ids)
* @return array with 'u' inserted in sorted order
*/
private static int[] insert(int v, int[] vs){
final int n = vs.length;
final int[] ws = ... | /storage/smiles/src/main/java/org/openscience/cdk/smiles/BeamToCDK.java |
robustness-copilot_data_5 | /**
* Handler for when a JSON element is an Object, representing a resource.
*
* @param key String
* @param parentResource Resource
* @throws IOException exception
* @throws RepositoryException exception
*/
private void createOrUpdateNodesForJsonObject(final ResourceResolver remoteAs... | /bundle/src/main/java/com/adobe/acs/commons/remoteassets/impl/RemoteAssetsNodeSyncImpl.java |
robustness-copilot_data_6 | /**
* Converts a JSON workflow configuration to a workflow object.
*
* @param json JSON for workflow
* @return a workflow rule target object
* @throws IOException if unable to create object
*/
public static Workflow fromJson(String json) throws IOException{
ObjectMapper mapper = new O... | /src/main/java/com/twilio/taskrouter/Workflow.java |
robustness-copilot_data_7 | /**
* Returns the time in millisecond until the next ticket.
* @return the time in millisecond until the next ticket.
*/
public long timeout(){
if (tickets.isEmpty()) {
return -1;
}
sortIfNeeded();
Ticket first = tickets.get(0);
return first.start - now() + first.delay;
} | /src/main/java/org/zeromq/timer/ZTicket.java |
robustness-copilot_data_8 | /**
* Specifies the version of the Kubernetes schema to use.
*
* @param version a Kubernetes version string, such as "1.9.0"
* @throws IOException if no schema for that version is cached.
*/
public void useKubernetesVersion(String version) throws IOException{
KubernetesSchemaReference reference = Ku... | /json-schema-generator/src/main/java/oracle/kubernetes/json/SchemaGenerator.java |
robustness-copilot_data_9 | /**
* adds a CacheEntry to the list of HSM storage requests.
*
* @param entry
*/
public synchronized void addCacheEntry(CacheEntry entry) throws CacheException, InterruptedException{
FileAttributes fileAttributes = entry.getFileAttributes();
String storageClass = fileAttributes.getStorageCl... | /modules/dcache/src/main/java/org/dcache/pool/classic/StorageClassContainer.java |
robustness-copilot_data_10 | /**
* Find the longest prefix from position (i) in this string that
* is present in the trie symbol table.
*
* @param trie trie node (start with root)
* @param string string to find a prefix of
* @param i the position in the string
* @param best best score so far (-1 to start... | /display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/AbbreviationLabel.java |
robustness-copilot_data_11 | /**
* Returns a hash code for {@code obj}.
*
* @param obj
* The object to get a hash code for. May be an array or <code>null</code>.
* @return A hash code of {@code obj} or 0 if {@code obj} is <code>null</code>
*/
public static int hashCode(Object obj){
if (obj == null) {
// for ... | /src/main/java/org/apache/ibatis/reflection/ArrayUtil.java |
robustness-copilot_data_12 | /**
* Writes a single frame in XYZ format to the Writer.
*
* @param mol the Molecule to write
* @throws java.io.IOException if there is an error during writing
*/
public void writeMolecule(IAtomContainer mol) throws IOException{
matcher = SybylAtomTypeMatcher.getInstance(mol.getBuilder());... | /storage/io/src/main/java/org/openscience/cdk/io/Mol2Writer.java |
robustness-copilot_data_13 | /**
* True is all the atoms in the given AtomContainer have been placed.
*
* @param ac The AtomContainer to be searched
* @return True is all the atoms in the given AtomContainer have been placed
*/
public boolean allHeavyAtomsPlaced(IAtomContainer ac){
for (int i = 0; i < ac.getAto... | /tool/builder3d/src/main/java/org/openscience/cdk/modeling/builder3d/AtomPlacer3D.java |
robustness-copilot_data_14 | /**
* Enqueue an event in the ring buffer, retrying if allowed by the configuration.
*
* @param event the event to add to the ring buffer
* @return {@code true} if the event is successfully enqueued, {@code false} if the event
* could not be added to the ring buffer.
* @throws Shu... | /src/main/java/net/logstash/logback/appender/AsyncDisruptorAppender.java |
robustness-copilot_data_15 | /**
* Draw some random numbers to better initialize the pseudo-random number generator.
*
* @param rng the random number generator to initialize.
*/
private static void prepareRNG(final Random rng){
for (int i = 0; i < 100; i++) {
rng.nextDouble();
}
} | /matsim/src/main/java/org/matsim/core/gbl/MatsimRandom.java |
robustness-copilot_data_16 | /**
* Encode the provided path of atoms to a string.
*
* @param path inclusive array of vertex indices
* @return encoded path
*/
private String encode(int[] path){
StringBuilder sb = new StringBuilder(path.length * 3);
for (int i = 0, n = path.length - 1; i <= n; i++) {
IAtom a... | /descriptor/fingerprint/src/main/java/org/openscience/cdk/fingerprint/ShortestPathWalker.java |
robustness-copilot_data_17 | /**
* Maps the view row number to the row number on the underlying source table.
*
* @param rowNumber the row number in the view.
* @return the matching row number in the underlying table.
*/
public int mappedRowNumber(int rowNumber){
if (isSorted()) {
return sortOrder[rowNumber];
} else... | /core/src/main/java/tech/tablesaw/table/TableSlice.java |
robustness-copilot_data_18 | /**
* Adds an {@link CarrierService} to the {@link Carrier}.
* @param carrier
* @param carrierService
*/
public static void addService(Carrier carrier, CarrierService carrierService){
carrier.getServices().put(carrierService.getId(), carrierService);
} | /contribs/freight/src/main/java/org/matsim/contrib/freight/carrier/CarrierUtils.java |
robustness-copilot_data_19 | /**
* Applies the given function to a list subtag if it is present and its contents are compound
* tags. Processes the list as a single object; to process each tag separately, instead use
* {@link #iterateCompoundList(String, Consumer)}.
*
* @param key the key to look up
* @param consumer ... | /src/main/java/net/glowstone/util/nbt/CompoundTag.java |
robustness-copilot_data_20 | /**
* Creates a web hook object to track config map calls.
*
* @param namespace the namespace
* @return the active web hook
* @throws ApiException if there is an error on the call that sets up the web hook.
*/
public Watchable<V1ConfigMap> createConfigMapWatch(String namespace) throws ApiException{
... | /operator/src/main/java/oracle/kubernetes/operator/builders/WatchBuilder.java |
robustness-copilot_data_21 | /**
* Creates a Function that returns a On instance with zero value.
*
* @param name - Cron field name
* @return new CronField -> CronField instance, never null
*/
static Function<CronField, CronField> returnOnZeroExpression(final CronFieldName name){
return field -> {
final FieldC... | /src/main/java/com/cronutils/mapper/CronMapper.java |
robustness-copilot_data_22 | /**
* This uses an exponential distance weighting to calculate the impact of point based emissions onto the centroid of
* a grid cell. The calculation is described in Kickhoefer's PhD thesis https://depositonce.tu-berlin.de/handle/11303/4386
* in Appendix A.2
*
* @param emissionSource Centroid ... | /contribs/analysis/src/main/java/org/matsim/contrib/analysis/spatial/SpatialInterpolation.java |
robustness-copilot_data_23 | /**
* Parses mobile H group(s) in an InChI String.
* <p>
* Multiple InChI sequences of mobile hydrogens are joined into a single sequence (list),
* see step 1 of algorithm in paper.
* <br>
* Mobile H group has syntax (H[n][-[m]],a1,a2[,a3[,a4...]])
* Brackets [ ] surround optional ter... | /tool/tautomer/src/main/java/org/openscience/cdk/tautomers/InChITautomerGenerator.java |
robustness-copilot_data_24 | /**
* Scan for help fields: fh_(= full help) or hh_(= help hint).
*/
private static void scanFields(Object obj, Map<List<String>, AcCommandExecutor> commands){
for (Field field : obj.getClass().getFields()) {
Iterator<String> i = Splitter.on('_').split(field.getName()).iterator();
FieldTy... | /modules/cells/src/main/java/dmg/util/command/AcCommandScanner.java |
robustness-copilot_data_25 | /**
* Find out if the SchemaAttribute 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 w... | /open-metadata-implementation/access-services/data-engine/data-engine-server/src/main/java/org/odpi/openmetadata/accessservices/dataengine/server/handlers/DataEngineSchemaAttributeHandler.java |
robustness-copilot_data_26 | /**
* batch delete some plugin handles by some id list.
* @param ids plugin handle id list.
* @return {@linkplain ShenyuAdminResult}
*/
public ShenyuAdminResult deletePluginHandles(@RequestBody @NotEmpty final List<@NotBlank String> ids){
return ShenyuAdminResult.success(ShenyuResultMessage.DEL... | /shenyu-admin/src/main/java/org/apache/shenyu/admin/controller/PluginHandleController.java |
robustness-copilot_data_27 | /**
* Parse and return a JsonNode representation of the input OAS document.
*
* @param location the URL of the OAS document.
* @param auths the list of authorization values to access the remote URL.
*
* @throws java.lang.Exception if an error occurs while retrieving the OpenAPI document.
... | /modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java |
robustness-copilot_data_28 | /**
* Adds a strategy to this manager with the specified weight. This weight
* compared to the sum of weights of all strategies in this manager defines
* the probability this strategy will be used for an agent.
*
*/
public final void addStrategy(final PlanStrategy strategy, final String subpopulation, final ... | /matsim/src/main/java/org/matsim/core/replanning/StrategyManager.java |
robustness-copilot_data_29 | /**
* Generate a transversal of a subgroup in this group.
*
* @param subgroup the subgroup to use for the transversal
* @return a list of permutations
*/
public List<Permutation> transversal(final PermutationGroup subgroup){
final long m = this.order() / subgroup.order();
final List<Pe... | /tool/group/src/main/java/org/openscience/cdk/group/PermutationGroup.java |
robustness-copilot_data_30 | /**
* When resolving a remote asset, first sync the asset from the remote server.
* @param resource The resource being resolved.
* @return The current resource. If the resource is a "remote" asset, it will
* first be converted to a true local AEM asset by sync'ing in the rendition
* binaries f... | /bundle/src/main/java/com/adobe/acs/commons/remoteassets/impl/RemoteAssetDecorator.java |
robustness-copilot_data_31 | /**
* Projects a CDKRGraph bitset on the source graph G1.
* @param set CDKRGraph BitSet to project
* @return The associate BitSet in G1
*/
public BitSet projectG1(BitSet set){
BitSet projection = new BitSet(getFirstGraphSize());
CDKRNode xNode = null;
for (int x = set.nextSetBit... | /legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKRGraph.java |
robustness-copilot_data_32 | /**
* Read the SMILES given in the input line - or return an empty container.
*
* @param line input line
* @return the read container (or an empty one)
*/
private IAtomContainer readSmiles(final String line){
try {
return sp.parseSmiles(line);
} catch (CDKException e) {
... | /storage/smiles/src/main/java/org/openscience/cdk/io/iterator/IteratingSMILESReader.java |
robustness-copilot_data_33 | /**
* Attempt to create/parse a cookie from application configuration object. The namespace given
* must be present and must defined a <code>name</code> property.
*
* The namespace might optionally defined: value, path, domain, secure, httpOnly and maxAge.
*
* @param namespace Cookie namespace/prefix.... | /jooby/src/main/java/io/jooby/Cookie.java |
robustness-copilot_data_34 | /**
* Returns an iterator over elements of type {@code T}.
*
* @return an Iterator.
*/
public Iterator<LocalTime> iterator(){
return new Iterator<LocalTime>() {
final IntIterator intIterator = intIterator();
@Override
public boolean hasNext() {
return intIterator.h... | /core/src/main/java/tech/tablesaw/api/TimeColumn.java |
robustness-copilot_data_35 | /**
* Using a fast identity template library, lookup the the ring system and assign coordinates.
* The method indicates whether a match was found and coordinates were assigned.
*
* @param rs the ring set
* @param molecule the rest of the compound
* @param anon check for anonmised... | /tool/sdg/src/main/java/org/openscience/cdk/layout/StructureDiagramGenerator.java |
robustness-copilot_data_36 | /**
* Returns the sum of the weights of all edges in this cycle.
*
* @return the sum of the weights of all edges in this cycle
*/
public double weight(){
double result = 0;
Iterator edgeIterator = edgeSet().iterator();
while (edgeIterator.hasNext()) {
result += ((Edge) edgeItera... | /legacy/src/main/java/org/openscience/cdk/ringsearch/cyclebasis/SimpleCycle.java |
robustness-copilot_data_37 | /**
* Whether the WebLogic domain contains a cluster with the given cluster name.
*
* @param clusterName cluster name to be checked
* @return True if the WebLogic domain contains a cluster with the given cluster name
*/
public synchronized boolean containsCluster(String clusterName){
if (clusterName... | /operator/src/main/java/oracle/kubernetes/operator/wlsconfig/WlsDomainConfig.java |
robustness-copilot_data_38 | /**
* Retrieve settings from the database via service and update cache.
*/
public static void updateProperties(){
if (settingsSvc == null) {
return;
}
properties.clear();
Set<Setting> dbSettings = settingsSvc.listAll();
dbSettings.forEach(s -> properties.put(PREFIX + "." + s.getNa... | /src/main/java/edu/harvard/iq/dataverse/settings/source/DbSettingConfigSource.java |
robustness-copilot_data_39 | /**
* On windows machines, it splits args on '=' signs. Put it back like it was.
*/
protected String[] fixupArgs(String[] args){
List<String> fixedArgs = new ArrayList<>();
for (int i = 0; i < args.length; i++) {
String arg = args[i];
if ((arg.startsWith("--") || arg.startsWith("-D")... | /liquibase-core/src/main/java/liquibase/integration/commandline/Main.java |
robustness-copilot_data_40 | /**
* Matching the given data with the set of compiled patterns.
*
* @param patterns
* @param data
* @return
*/
private boolean matches(List<Pattern> patterns, String data){
for (Pattern pattern : patterns) {
final Matcher matcher = pattern.matcher(data);
if (matcher.m... | /bundle/src/main/java/com/adobe/acs/commons/httpcache/config/impl/HttpCacheConfigImpl.java |
robustness-copilot_data_41 | /**
* Applies the given function to an integer subtag if it is present.
*
* @param key the key to look up
* @param consumer the function to apply
* @return true if the tag exists and was passed to the consumer; false otherwise
*/
public boolean readInt(@NonNls String key, IntConsumer cons... | /src/main/java/net/glowstone/util/nbt/CompoundTag.java |
robustness-copilot_data_42 | /**
* As the main goal is to minimise bus operation time, this method calculates how much longer the bus will operate
* after insertion. By returning INFEASIBLE_SOLUTION_COST, the insertion is considered infeasible
* <p>
* The insertion is invalid if some maxTravel/Wait constraints for the already scheduled req... | /contribs/drt/src/main/java/org/matsim/contrib/drt/optimizer/insertion/InsertionCostCalculator.java |
robustness-copilot_data_43 | /**
* Given a map, splits it so that no map has more total data than the specified limit, and returns a list of
* target objects built from the resultant maps. This may result in some maps receiving partial value for the largest
* items. If the target type implements CountRecorder, the 'recordCount' method of ... | /operator/src/main/java/oracle/kubernetes/operator/helpers/ConfigMapSplitter.java |
robustness-copilot_data_44 | /**
* Read a IChemModel from a file in MDL RDF format.
*
* @param chemModel The IChemModel
* @return The IChemModel that was read from the RDF file
*/
private IChemModel readChemModel(IChemModel chemModel) throws CDKException{
IReactionSet setOfReactions = chemModel.getReactionSet();... | /storage/ctab/src/main/java/org/openscience/cdk/io/MDLRXNReader.java |
robustness-copilot_data_45 | /**
* Invert the permutation, so that for all i : inv[p[i]] = i.
*
* @return the inverse of this permutation
*/
public Permutation invert(){
Permutation inversion = new Permutation(values.length);
for (int i = 0; i < values.length; i++) {
inversion.values[this.values[i]] = i;
}
... | /tool/group/src/main/java/org/openscience/cdk/group/Permutation.java |
robustness-copilot_data_46 | /**
* Add authentication methods to the given map
* This adds a boolean and a collection for each authentication type to the map.
* <p>
* Examples:
* <p>
* boolean hasOAuthMethods
* <p>
* List<CodegenSecurity> oauthMethods
*
* @param bundle the map which the ... | /modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java |
robustness-copilot_data_47 | /**
* Outputs system properties for the operating system and the java
* version. More specifically: os.name, os.version, os.arch, java.version
* and java.vendor.
*/
public void dumpSystemProperties(){
debug("os.name : " + System.getProperty("os.name"));
debug("os.version : " + Sy... | /misc/log4j/src/main/java/org/openscience/cdk/tools/LoggingTool.java |
robustness-copilot_data_48 | /**
* Recursively list the full resource path of all the resources that are children of all the
* resources found at the specified path.
*
* @param path The path of the resource(s) to list.
* @return A list containing the names of the child resources.
* @throws IOException If I/O errors occur
*/
p... | /src/main/java/org/apache/ibatis/io/VFS.java |
robustness-copilot_data_49 | /**
* Combines data with Collector identified by the given name.
*
* @param name String
* @param data Object
*/
public void combineWithCollector(String name, Object data){
Object object = collectorMap.get(name);
if (object instanceof Collector<?>) {
Collector<?> collector = (Co... | /src/main/java/com/networknt/schema/CollectorContext.java |
robustness-copilot_data_50 | /**
* These are the attributes we are getting from the IdP at testshib.org, a
* dump from https://pdurbin.pagekite.me/Shibboleth.sso/Session
*
* Miscellaneous
*
* Session Expiration (barring inactivity): 479 minute(s)
*
* Client Address: 10.0.2.2
*
* SSO Protocol: urn:o... | /src/main/java/edu/harvard/iq/dataverse/authorization/providers/shib/ShibUtil.java |
robustness-copilot_data_51 | /**
* Correct the mass according the charge of the IMmoleculeFormula.
* Negative charge will add the mass of one electron to the mass.
*
* @param mass The mass to correct
* @param charge The charge
* @return The mass with the correction
*/
private static double corre... | /tool/formula/src/main/java/org/openscience/cdk/tools/manipulator/MolecularFormulaManipulator.java |
robustness-copilot_data_52 | /**
* The starting with numeric value is used to show a quantity by which a formula is multiplied.
* For example: 2H2O really means that a H4O2 unit.
*
* @param formula Formula to correct
* @return Formula with the correction
*/
private static String multipleExtractor(String formul... | /tool/formula/src/main/java/org/openscience/cdk/tools/manipulator/MolecularFormulaManipulator.java |
robustness-copilot_data_53 | /**
* Parse the InChI canonical atom numbers (from the AuxInfo) to use in
* Universal SMILES.
*
* The parsing follows: "Rule A: The correspondence between the input atom
* order and the InChI canonical labels should be obtained from the
* reconnected metal layer (/R:) in preference to the ... | /storage/inchi/src/main/java/org/openscience/cdk/graph/invariant/InChINumbersTools.java |
robustness-copilot_data_54 | /**
* Factory method for constructing {@link ObjectReader} that will
* update given Object (usually Bean, but can be a Collection or Map
* as well, but NOT an array) with JSON data. Deserialization occurs
* normally except that the root-level value in JSON is not used for
* instantiating a new ... | /src/main/java/com/fasterxml/jackson/databind/ObjectMapper.java |
robustness-copilot_data_55 | /**
* Helper method used to weed out dynamic Proxy types; types that do
* not expose concrete method API that we could use to figure out
* automatic Bean (property) based serialization.
*/
public static boolean isProxyType(Class<?> type){
String name = type.getName();
if (name.startsWith("n... | /src/main/java/com/fasterxml/jackson/databind/util/ClassUtil.java |
robustness-copilot_data_56 | /**
* Constructs {@link InetSocketAddress}es by parsing the given {@link String} value.
* <p>
* The string is a comma separated list of destinations in the form of hostName[:portNumber].
* <p>
*
* For example, "host1.domain.com,host2.domain.com:5560"
* <p>
*
* If portNumber ... | /src/main/java/net/logstash/logback/appender/destination/DestinationParser.java |
robustness-copilot_data_57 | /**
* True, if the IMolecularFormulaSet contains the given IMolecularFormula but not
* as object. It compare according contains the same number and type of Isotopes.
* It is not based on compare objects.
*
* @param formulaSet The IMolecularFormulaSet
* @param formula The IMolecul... | /tool/formula/src/main/java/org/openscience/cdk/tools/manipulator/MolecularFormulaSetManipulator.java |
robustness-copilot_data_58 | /**
* Returns either {@code 'text'} (single-quoted) or {@code [null]}.
*
* @since 2.9
*/
public static String apostrophed(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_59 | /**
* Store a template library to the provided output stream.
*
* @param out output stream
* @throws IOException low level IO error
*/
void store(OutputStream out) throws IOException{
BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(out));
for (Entry<String, List<Point2d[]... | /tool/sdg/src/main/java/org/openscience/cdk/layout/IdentityTemplateLibrary.java |
robustness-copilot_data_60 | /**
* Read an unsigned int value from the given index with the expected number
* of digits.
*
* @param line input line
* @param index start index
* @param digits number of digits (max)
* @return an unsigned int
*/
private static int readUInt(final String line, int index, int ... | /storage/ctab/src/main/java/org/openscience/cdk/io/MDLV2000Reader.java |
robustness-copilot_data_61 | /**
* Generates a new unique filename by adding -[number] to the base name.
*
* @param fileName original filename
* @return a new unique filename
*/
public static String generateNewFileName(final String fileName){
String newName;
String baseName;
String extension = null;
int ex... | /src/main/java/edu/harvard/iq/dataverse/ingest/IngestUtil.java |
robustness-copilot_data_62 | /**
* Add timer to the set, timer repeats forever, or until cancel is called.
* @param interval the interval of repetition in milliseconds.
* @param handler the callback called at the expiration of the timer.
* @param args the optional arguments for the handler.
* @return an opaque handle for f... | /src/main/java/zmq/util/Timers.java |
robustness-copilot_data_63 | /**
* Converts the OpenAPI schema name to a model name suitable for the current code generator.
* May be overridden for each programming language.
* In case the name belongs to the TypeSystem it won't be renamed.
*
* @param name the name of the model
* @return capitalized model name
*... | /modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java |
robustness-copilot_data_64 | /**
* Cast the value if the current type doesn't match the required type.
* <br>
* Given the following example:
* <code>
* int withoutCast = 1;
* double withCast = (double) 1;
* </code>
* The variable withoutCast doesn't need to be casted, since we have int as required type and int as value type... | /javaparser-core-generators/src/main/java/com/github/javaparser/generator/core/utils/CodeUtils.java |
robustness-copilot_data_65 | /**
* Creates a ligand attached to a single chiral atom, where the involved
* atoms are identified by there index in the {@link IAtomContainer}. For ligand
* atom, {@link #HYDROGEN} can be passed as index, which will indicate the presence of
* an implicit hydrogen, not explicitly present in the chem... | /descriptor/cip/src/main/java/org/openscience/cdk/geometry/cip/CIPTool.java |
robustness-copilot_data_66 | /**
* Checks whether all the settings make sense or if there are some
* problems with the parameters currently set. Currently, this checks
* that for at least one activity type opening AND closing times are
* defined.
*/
public void checkConsistency(Config config){
super.checkConsistency(config);
... | /matsim/src/main/java/org/matsim/core/config/groups/PlanCalcScoreConfigGroup.java |
robustness-copilot_data_67 | /**
* This method calculates the ionization potential of an atom.
*
*@param atom The IAtom to ionize.
*@param container Parameter is the IAtomContainer.
*@return The ionization potential. Not possible the ionization.
*/
public DescriptorValue calculat... | /descriptor/qsaratomic/src/main/java/org/openscience/cdk/qsar/descriptors/atomic/IPAtomicHOSEDescriptor.java |
robustness-copilot_data_68 | /**
* Return true if the specified schema is an object with a fixed number of properties.
*
* A ObjectSchema differs from an MapSchema in the following way:
* - An ObjectSchema is not extensible, i.e. it has a fixed number of properties.
* - A MapSchema is an object that can be extended with an... | /modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java |
robustness-copilot_data_69 | /**
* Inserts a leg and a following act at position <code>pos</code> into the plan.
* @param pos the position where to insert the leg-act-combo. acts and legs are both counted from the beginning starting at 0.
* @param leg the leg to insert
* @param act the act to insert, following t... | /matsim/src/main/java/org/matsim/core/population/PopulationUtils.java |
robustness-copilot_data_70 | /**
* Generates an object representing a JSON schema for the specified class.
*
* @param someClass the class for which the schema should be generated
* @return a map of maps, representing the computed JSON
*/
public Map<String, Object> generate(Class<?> someClass){
Map<String, Object> result = new H... | /json-schema-generator/src/main/java/oracle/kubernetes/json/SchemaGenerator.java |
robustness-copilot_data_71 | /**
* Checks to make sure the given aggregate function is compatible with the type of the source
* column.
*/
private void validateColumn(FunctionMetaData function, Column<?> sourceColumn){
if (!function.isCompatibleColumn(sourceColumn.type())) {
throw new IllegalArgumentException("Function: " + f... | /core/src/main/java/tech/tablesaw/analytic/AnalyticQueryEngine.java |
robustness-copilot_data_72 | /**
* Executes all on-deploy scripts on bind of a script provider.
*/
protected void bindScriptProvider(OnDeployScriptProvider scriptProvider){
logger.info("Executing on-deploy scripts from scriptProvider: {}", scriptProvider.getClass().getName());
scriptProviders.add(scriptProvider);
List<OnDepl... | /bundle/src/main/java/com/adobe/acs/commons/ondeploy/impl/OnDeployExecutorImpl.java |
robustness-copilot_data_73 | /**
* Tests the <code>ring</code> in the <code>molecule</code> for aromaticity. Uses the
* Hückel rule (4n + 2) pie electrons. sp<sup>2</sup> hybridized C contibute 1 electron non
* sp<sup>2</sup> hybridized heteroatoms contribute 2 electrons (N and O should never be sp in
* or anything els... | /legacy/src/main/java/org/openscience/cdk/aromaticity/AromaticityCalculator.java |
robustness-copilot_data_74 | /**
* Computes the Murcko Scaffold for the provided molecule in linear time.
* Note the return value contains the same atoms/bonds as in the input
* and an additional clone and valence adjustments may be required.
*
* @param mol the molecule
* @return the atoms and bonds in the scaffold
... | /tool/fragment/src/main/java/org/openscience/cdk/fragment/MurckoFragmenter.java |
robustness-copilot_data_75 | /**
* Method for registering a module that can extend functionality
* provided by this mapper; for example, by adding providers for
* custom serializers and deserializers.
*
* @param module Module to register
*/
public ObjectMapper registerModule(Module module){
_assertNotNull("modul... | /src/main/java/com/fasterxml/jackson/databind/ObjectMapper.java |
robustness-copilot_data_76 | /**
* Updates feature's elements with items from the @elements list if an Id of the item coincides
* with an Id of any element from the @feature object. If there is no element in the @feature object
* then the item is appended to the end of the elements' list of the @feature.
*
* @param feature... | /src/main/java/net/masterthought/cucumber/reducers/ReportFeatureWithRetestMerger.java |
robustness-copilot_data_77 | /**
* Obtain an optional port number based on supplied URI. Use the defined port number, if the
* URI defines one; otherwise use the default port number for URI's schema, if one is known.
* Otherwise return an empty Optional.
*/
public static Optional<Integer> optionalPortWithDefault(URI uri){
... | /modules/common/src/main/java/org/dcache/util/URIs.java |
robustness-copilot_data_78 | /**
* Reducing the network so it only contains nodes included in the biggest Cluster.
* Loop over all nodes and check if they are in the cluster, if not, remove them from the network
*/
public static void reduceToBiggestCluster(Network network, Map<Id<Node>, Node> biggestCluster){
List<Node> allNodes2 = new... | /matsim/src/main/java/org/matsim/core/network/algorithms/NetworkCleaner.java |
robustness-copilot_data_79 | /**
* Create a unit partition - in other words, the coarsest possible partition
* where all the elements are in one cell.
*
* @param size the number of elements
* @return a new Partition with one cell containing all the elements
*/
public static Partition unit(int size){
Partition uni... | /tool/group/src/main/java/org/openscience/cdk/group/Partition.java |
robustness-copilot_data_80 | /**
* Returns a collection view of the values contained in this map. The
* collection's iterator will return the values in the order that their
* corresponding keys appear in the tree. The collection is backed by
* this <tt>QuadMap</tt> instance, so changes to this map are reflected in
* the collection.
*... | /matsim/src/main/java/org/matsim/core/utils/collections/QuadTree.java |
robustness-copilot_data_81 | /**
* Method used for serialization and introspection by core Jackson code.
*/
public EnumMap<?, SerializableString> internalMap(){
EnumMap<?, SerializableString> result = _asMap;
if (result == null) {
Map<Enum<?>, SerializableString> map = new LinkedHashMap<Enum<?>, SerializableString>();
... | /src/main/java/com/fasterxml/jackson/databind/util/EnumValues.java |
robustness-copilot_data_82 | /**
* Calculates lane capacities, according to {@link LanesUtils}.
*/
public void calculateLaneCapacities(Network network, Lanes lanes){
for (LanesToLinkAssignment l2l : lanes.getLanesToLinkAssignments().values()) {
Link link = network.getLinks().get(l2l.getLinkId());
for (Lane lane : l2l... | /contribs/sumo/src/main/java/org/matsim/contrib/sumo/SumoNetworkConverter.java |
robustness-copilot_data_83 | /**
* The Graham Scan algorithm determines the points belonging to the convex hull in O(n lg n).
*
* @param points set of points
* @return points in the convex hull
* @see <a href="http://en.wikipedia.org/wiki/Graham_scan">Graham scan, Wikipedia</a>
*/
static List<Point2D> grahamScan(fina... | /display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/ConvexHull.java |
robustness-copilot_data_84 | /**
* Validates that the passed password is indeed the password of the user.
* @param userIdInProvider
* @param password
* @return {@code true} if the password matches the user's password; {@code false} otherwise.
*/
public Boolean verifyPassword(String userIdInProvider, String password){
... | /src/main/java/edu/harvard/iq/dataverse/authorization/providers/builtin/BuiltinAuthenticationProvider.java |
robustness-copilot_data_85 | /**
* Maps the input bonds to a map of Atom->Elevation where the elevation is
* whether the bond is off the plane with respect to the central atom.
*
* @param atom central atom
* @param bonds bonds connected to the central atom
* @param map map to load with elevation values (can be reus... | /tool/hash/src/main/java/org/openscience/cdk/hash/stereo/GeometricTetrahedralEncoderFactory.java |
robustness-copilot_data_86 | /**
* {@inheritDoc}
*
* Return comparison result based on the content of the properties.
*/
public boolean equals(Object objectToCompare){
if (this == objectToCompare) {
return true;
}
if (!(objectToCompare instanceof DigitalService)) {
return false;
}
DigitalSer... | /open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/DigitalService.java |
robustness-copilot_data_87 | /**
* Returns true if the given main command arg needs no special parameters.
*
* @param arg the main command to test
* @return true if arg is a valid main command and needs no special parameters, false in all other cases
*/
private static boolean isNoArgCommand(String arg){
return COMMAND... | /liquibase-core/src/main/java/liquibase/integration/commandline/Main.java |
robustness-copilot_data_88 | /**
* Computes the score of a document with respect to a query given a scoring function. Assumes Anserini's default
* analyzer.
*
* @param reader index reader
* @param docid docid of the document to score
* @param q query
* @param similarity scoring function
* @return the score of the document w... | /src/main/java/io/anserini/index/IndexReaderUtils.java |
robustness-copilot_data_89 | /**
* Generate the next name for the given name, i.e. append "2" to the base name if not ending with a number,
* otherwise increase the number by 1. For example:
* status => status2
* status2 => status3
* myName100 => myName101
*
* @param name The base name
* @return The nex... | /modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java |
robustness-copilot_data_90 | /**
* Makes combinations recursively of all possible mobile Hydrogen positions.
* @param taken positions taken by hydrogen
* @param combinations combinations made so far
* @param skeleton container to work on
* @param totalMobHydrCount
* @param mobHydrAttachPositions
*/
private void ... | /tool/tautomer/src/main/java/org/openscience/cdk/tautomers/InChITautomerGenerator.java |
robustness-copilot_data_91 | /**
* Ostensibly, we iterate over all children to find Mortal children that should be removed. In
* practise, cached knowledge of Mortal child expiry Dates means this iterates over only those
* StateComponents that contain children that have actually expired.
*
* @param ourPath
* @param t... | /modules/dcache-info/src/main/java/org/dcache/services/info/base/StateComposite.java |
robustness-copilot_data_92 | /**
* Create an encoder for axial 3D 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_93 | /**
* Create a new Change implementation for the given change name. The class of the constructed object will be the Change implementation with the highest priority.
* Each call to create will return a new instance of the Change.
*/
public Change create(String name){
Change plugin = getPlugin(name);
... | /liquibase-core/src/main/java/liquibase/change/ChangeFactory.java |
robustness-copilot_data_94 | /**
* Check if the user is allowed to sync binaries.
*
* Service users, as well as the admin user, are prevented from sync'ing
* binaries to ensure that some back end procress traversing the DAM doesn't
* trigger a sync of the entire DAM, thus subverting the benefits of
* remote assets.
... | /bundle/src/main/java/com/adobe/acs/commons/remoteassets/impl/RemoteAssetDecorator.java |
robustness-copilot_data_95 | /**
* Method that is reverse of {@link #treeToValue}: it
* will convert given Java value (usually bean) into its
* equivalent Tree mode {@link JsonNode} representation.
* Functionally similar to serializing value into token stream and parsing that
* stream back as tree model node,
* but mo... | /src/main/java/com/fasterxml/jackson/databind/ObjectMapper.java |
robustness-copilot_data_96 | /**
* Fill the {@literal coordinates} and {@literal elevation} from the given
* offset index. If there is only one connection then the second entry (from
* the offset) will use the coordinates of <i>a</i>. The permutation parity
* is also built and returned.
*
* @param container atom con... | /tool/hash/src/main/java/org/openscience/cdk/hash/stereo/GeometricCumulativeDoubleBondFactory.java |
robustness-copilot_data_97 | /**
* Constructs the path after the algorithm has been run.
*
* @param fromNode
* The node where the path starts.
* @param toNode
* The node where the path ends.
* @param startTime
* The time when the trip starts.
... | /matsim/src/main/java/org/matsim/core/router/Dijkstra.java |
robustness-copilot_data_98 | /**
* Adds the mappings from "from" to "to". Nothing is done to copy the Object themselves,
* which should be fine for 99.9% of the usecases of Attributes (value objects)
*/
public static void copyTo(Attributes from, Attributes to){
for (var entry : from.getAsMap().entrySet()) {
... | /matsim/src/main/java/org/matsim/utils/objectattributes/attributable/AttributesUtils.java |
robustness-copilot_data_99 | /**
* Method for replacing value of specific property with passed
* value, and returning value (or null if none).
*
* @param propertyName Property of which value to replace
* @param value Value to set property to, replacing old value if any
*
* @return Old value of the property; null... | /src/main/java/com/fasterxml/jackson/databind/node/ObjectNode.java |
robustness-copilot_data_100 | /**
* Formats a float to fit into the connectiontable and changes it
* to a String.
*
* @param fl The float to be formated
* @return The String to be written into the connectiontable
*/
protected static String formatMDLFloat(float fl){
String s = "", fs = "";
int l;
NumberForm... | /storage/ctab/src/main/java/org/openscience/cdk/io/MDLV2000Writer.java |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 6