id
stringlengths
25
27
content
stringlengths
190
15.4k
max_stars_repo_path
stringlengths
31
217
robustness-copilot_data_801
/** * Builds functions that map the fields from source CronDefinition to target. * * @param from - source CronDefinition * @param to - target CronDefinition */ private void buildMappings(final CronDefinition from, final CronDefinition to){ final Map<CronFieldName, FieldDefinition> source...
/src/main/java/com/cronutils/mapper/CronMapper.java
robustness-copilot_data_802
/** * Does the atom at index {@code i} have priority over the atom at index * {@code j} for the tetrahedral atom {@code focus}. * * @param focus tetrahedral centre (or -1 if double bond) * @param i adjacent atom index * @param j adjacent atom index * @return whether atom i has...
/tool/sdg/src/main/java/org/openscience/cdk/layout/NonplanarBonds.java
robustness-copilot_data_803
/** * Find out if the PortImplementation 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 optiona...
/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_804
/** * Checks if each next {@link ILigand} is different from the previous * one according to the {@link CIPLigandRule}. It assumes that the input * is sorted based on that rule. * * @param ligands array of {@link ILigand} to check * @return true, if all ligands are different */ public...
/descriptor/cip/src/main/java/org/openscience/cdk/geometry/cip/CIPTool.java
robustness-copilot_data_805
/** * Builder for molecules (rather, for atom containers) from signature * strings. * * @param signatureString the signature string to use * @param coBuilder {@link IChemObjectBuilder} to build the returned atom container from * @return an atom container */ public static IAtomContain...
/descriptor/signature/src/main/java/org/openscience/cdk/signature/MoleculeSignature.java
robustness-copilot_data_806
/** Returns a column of the same type containing the first {@code numRows} of this column. */ Column<T> first(final int numRows){ int newRowCount = Math.min(numRows, size()); return inRange(0, newRowCount); }
/core/src/main/java/tech/tablesaw/columns/Column.java
robustness-copilot_data_807
/** * Returns a StringColumn with the year and month 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 sourc...
/core/src/main/java/tech/tablesaw/columns/datetimes/DateTimeMapFunctions.java
robustness-copilot_data_808
/** * Reports on the options that have been inserted into the MATSim {@link Config} * via the command line. */ private void reportOptions(){ logger.info(String.format("Received %d positional command line arguments:", positionalArguments.size())); logger.info(" " + String.join(" , ", positionalArguments...
/matsim/src/main/java/org/matsim/core/config/CommandLine.java
robustness-copilot_data_809
/** * Returns a List for looping over all isotopes in this adduct formula. * * @return A List with the isotopes in this adduct formula */ private List<IIsotope> isotopesList(){ List<IIsotope> isotopes = new ArrayList<IIsotope>(); Iterator<IMolecularFormula> componentIterator = component...
/base/data/src/main/java/org/openscience/cdk/formula/AdductFormula.java
robustness-copilot_data_810
/** * Splits this partition by taking the cell at cellIndex and making two * new cells - the first with the singleton splitElement and the second * with the rest of the elements from that cell. * * @param cellIndex the index of the cell to split on * @param splitElement the element to put ...
/tool/group/src/main/java/org/openscience/cdk/group/Partition.java
robustness-copilot_data_811
/** * Increases the priority (=decrease the given double value) of the element. * If the element ins not part of the queue, it is added. If the new priority * is lower than the existing one, the method returns <tt>false</tt> * * @return <tt>true</tt> if the elements priority...
/matsim/src/main/java/org/matsim/core/router/priorityqueue/BinaryMinHeap.java
robustness-copilot_data_812
/** * Layout the molecule, starts with ring systems and than aliphatic chains. * *@param ringSetMolecule ringSystems of the molecule */ private void layoutMolecule(List ringSetMolecule, IAtomContainer molecule, AtomPlacer3D ap3d, AtomTetrahedralLigandPlacer3D atlp3d, AtomPlacer atomPlacer) throws...
/tool/builder3d/src/main/java/org/openscience/cdk/modeling/builder3d/ModelBuilder3D.java
robustness-copilot_data_813
/** * Given a new proposed label or directoryLabel for a file, check against * existing files if a duplicate directoryLabel/label combination would be * created. */ public static boolean conflictsWithExistingFilenames(String pathPlusFilename, List<FileMetadata> fileMetadatas){ List<String> file...
/src/main/java/edu/harvard/iq/dataverse/ingest/IngestUtil.java
robustness-copilot_data_814
/** * Applies the given function to a list subtag if it is present and its contents are double * 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 readDoub...
/src/main/java/net/glowstone/util/nbt/CompoundTag.java
robustness-copilot_data_815
/** * Position the mass label relative to the element label. The mass adjunct is position to the * top left of the element label. * * @param massLabel mass label outline * @param elementLabel element label outline * @return positioned mass label */ TextOutline positionMassLabel(Te...
/display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/StandardAtomGenerator.java
robustness-copilot_data_816
/** * Searches for the current sling:resourceType under /content and replaces any nodes it finds * with the newResourceType. * * @param oldResourceType The current sling:resourceType. * @param newResourceType The new sling:resourceType to be used. */ protected final void searchAndUpdateRe...
/bundle/src/main/java/com/adobe/acs/commons/ondeploy/scripts/OnDeployScriptBase.java
robustness-copilot_data_817
/** * Returns the "raw" field of a document based on an internal Lucene docid. * The method is named to be consistent with Lucene's {@link IndexReader#document(int)}, contra Java's standard * method naming conventions. * * @param ldocid internal Lucene docid * @return the "raw" field the d...
/src/main/java/io/anserini/search/SimpleImpactSearcher.java
robustness-copilot_data_818
/** * Checks to see if this tag is a strict, deep submap of the given CompoundTag. * * @param other The CompoundTag that should contain our values. */ public boolean matches(CompoundTag other){ for (Entry<String, Tag> entry : value.entrySet()) { if (!other.value.containsKey(entry.getKey...
/src/main/java/net/glowstone/util/nbt/CompoundTag.java
robustness-copilot_data_819
/** * Mass number for a atom with a given atomic number and exact mass. * * @param atomicNumber atomic number * @param exactMass exact mass * @return the mass number (or null) if no mass number was found * @throws IOException isotope configuration could not be loaded */ private In...
/tool/forcefield/src/main/java/org/openscience/cdk/modeling/builder3d/MMFF94BasedParameterSetReader.java
robustness-copilot_data_820
/** * Checks whether this query atom matches a target atom. * * Currently a query pharmacophore atom will match a target pharmacophore group if the * symbols of the two groups match. This is based on the assumption that * pharmacophore groups with the same symbol will have the same SMARTS ...
/tool/pcore/src/main/java/org/openscience/cdk/pharmacophore/PharmacophoreQueryAtom.java
robustness-copilot_data_821
/** * For each item in the column, returns the same number with the sign changed. For example: -1.3 * returns 1.3, 2.135 returns -2.135 0 returns 0 */ DoubleColumn neg(){ DoubleColumn newColumn = DoubleColumn.create(name() + "[neg]", size()); for (int i = 0; i < size(); i++) { newColumn.set(i,...
/core/src/main/java/tech/tablesaw/columns/numbers/NumberMapFunctions.java
robustness-copilot_data_822
/** * Copy all shipments from the existing carrier to the new carrier with * shipments. * * @param carrierWS the "new" carrier with Shipments * @param carrier the already existing carrier */ private static void copyShipments(Carrier carrierWS, Carrier carrier){ for (CarrierShipment carrierShipment : ...
/contribs/freight/src/main/java/org/matsim/contrib/freight/utils/FreightUtils.java
robustness-copilot_data_823
/** * Convert a Java 2D shape to a list of points. * * @param shape a shape * @return list of point */ static List<Point2D> pointsOf(final Shape shape){ final List<Point2D> points = new ArrayList<Point2D>(); final double[] coordinates = new double[6]; for (PathIterator i = shape.ge...
/display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/ConvexHull.java
robustness-copilot_data_824
/** * Calculate the count of atoms of the largest pi system in the supplied {@link IAtomContainer}. * * <p>The method require one parameter: * <ol> * <li>if checkAromaticity is true, the method check the aromaticity, * <li>if false, means that the aromaticity has already been checked ...
/descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/LargestPiSystemDescriptor.java
robustness-copilot_data_825
/** * See if any of the provided filter patterns match the current path. TRUE, if no filters are received. * * @param filters An array of string making up the regex to match with the path. They should never * be empty since there is a DEFAULT value. * @param path The path to in...
/bundle/src/main/java/com/adobe/acs/commons/replication/dispatcher/impl/RefetchFlushContentBuilderImpl.java
robustness-copilot_data_826
/** * Abort call when a label could not be parsed. The tokens are cleared * and replaced with the original label. * * @param label the original label * @param tokens the current tokens * @return always returns false */ private static boolean failParse(String label, List<String> toke...
/display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/AbbreviationLabel.java
robustness-copilot_data_827
/** * Returns the computed digest or null if overlapping writes have been detected. * * @return Checksum */ private Set<Checksum> finalizeChecksums(){ _ioStateWriteLock.lock(); try { _isWritable = false; } finally { _ioStateWriteLock.unlock(); } synchronized (_da...
/modules/dcache/src/main/java/org/dcache/pool/movers/ChecksumChannel.java
robustness-copilot_data_828
/** * Method that can be used to serialize any Java value as * a String. Functionally equivalent to calling * {@link #writeValue(Writer,Object)} with {@link java.io.StringWriter} * and constructing String, but more efficient. *<p> * Note: prior to version 2.1, throws clause included {@link...
/src/main/java/com/fasterxml/jackson/databind/ObjectMapper.java
robustness-copilot_data_829
/** Returns the base 10 log of the values in this column as a NumberColumn. */ DoubleColumn log10(){ DoubleColumn newColumn = DoubleColumn.create(name() + "[log10]", size()); for (int i = 0; i < size(); i++) { newColumn.set(i, Math.log10(getDouble(i))); } return newColumn; }
/core/src/main/java/tech/tablesaw/columns/numbers/NumberMapFunctions.java
robustness-copilot_data_830
/** * Writes a IChemObject to the MDL RXN file formated output. * It can only output ChemObjects of type Reaction * * @param object class must be of type Molecule or MoleculeSet. * * @see org.openscience.cdk.ChemFile */ public void write(IChemObject object) throws CDKException{ i...
/storage/ctab/src/main/java/org/openscience/cdk/io/MDLRXNWriter.java
robustness-copilot_data_831
/** * Iterates through array items and replaces any placeholders found. * * @param node Array node * @param contentVariableReplacements current map of content variables */ private void replaceInArray(JsonNode node, Map<String, Object> contentVariableReplacements){ if (node.get(0) != null &...
/bundle/src/main/java/com/adobe/acs/commons/ccvar/filter/ContentVariableJsonFilter.java
robustness-copilot_data_832
/** * if md5 is not the same as the original, then update lcoal cache. * @param group ConfigGroupEnum * @param <T> the type of class * @param data the new config data */ protected void updateCache(final ConfigGroupEnum group, final List<T> data){ String json = GsonUtils.getInstance().toJso...
/shenyu-admin/src/main/java/org/apache/shenyu/admin/listener/AbstractDataChangedListener.java
robustness-copilot_data_833
/** * Formats an int to fit into the connectiontable and changes it * to a String. * * @param i The int to be formated * @param l Length of the String * @return The String to be written into the connectiontable */ private String formatMDLInt(int i, int l){ String s = ""...
/storage/ctab/src/main/java/org/openscience/cdk/io/MDLRXNWriter.java
robustness-copilot_data_834
/** * Process atom labels from extended SMILES in a char iter. * * @param iter char iteration * @param dest destination of labels (atomidx->label) * @return parse success/failure */ private static boolean processAtomLabels(final CharIter iter, final Map<Integer, String> dest){ int ato...
/storage/smiles/src/main/java/org/openscience/cdk/smiles/CxSmilesParser.java
robustness-copilot_data_835
/** * Method that will construct a POJONode and * insert it at specified position in this array. * * @return This array node, to allow chaining */ public ArrayNode insertPOJO(int index, Object pojo){ return _insert(index, (pojo == null) ? nullNode() : pojoNode(pojo)); }
/src/main/java/com/fasterxml/jackson/databind/node/ArrayNode.java
robustness-copilot_data_836
/** * Calculate new point(s) X in a B-A system to form B-A-X. Use C as reference * for * staggering about the B-A bond (1a) 1 ligand(B) of refAtom (A) which * itself has a ligand (C) (i) 1 points required; vector along AB vector (ii) * 2 points: 2 vectors in ABC plane, staggered and eclipsed wrt...
/tool/builder3d/src/main/java/org/openscience/cdk/modeling/builder3d/AtomTetrahedralLigandPlacer3D.java
robustness-copilot_data_837
/** * Takes the given Z Matrix coordinates and converts them to cartesian coordinates. * The first Atom end up in the origin, the second on on the x axis, and the third * one in the XY plane. The rest is added by applying the Zmatrix distances, angles * and dihedrals. Angles are in degrees. * ...
/storage/io/src/main/java/org/openscience/cdk/geometry/ZMatrixTools.java
robustness-copilot_data_838
/** * Adds or replaces a list subtag with a list of longs. * * @param key the key to write to * @param list the list contents as longs, to convert to long tags */ public void putLongList(@NonNls String key, List<Long> list){ putList(key, TagType.LONG, list, LongTag::new); }
/src/main/java/net/glowstone/util/nbt/CompoundTag.java
robustness-copilot_data_839
/** * Get the collection of job statistics in the most recent week. * * @return collection of running task statistics data objects */ public List<JobRunningStatistics> findJobRunningStatisticsWeekly(){ if (!isRdbConfigured()) { return Collections.emptyList(); } return rdbReposi...
/elasticjob-cloud/elasticjob-cloud-scheduler/src/main/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/statistics/StatisticManager.java
robustness-copilot_data_840
/** * Evaluates the valence corrected chi index for a set of fragments. * * This method takes into account the S and P atom types described in * Kier & Hall (1986), page 20 for which empirical delta V values are used. * * @param atomContainer The target <code>AtomContainer</code> * @...
/descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/ChiIndexUtils.java
robustness-copilot_data_841
/** * Associates the specified value with the specified coordinates in this * QuadTree. * * @param x x-coordinate where the specified value is to be associated. * @param y y-coordinate where the specified value is to be associated. * @param value value to be associa...
/matsim/src/main/java/org/matsim/core/utils/collections/QuadTree.java
robustness-copilot_data_842
/** * Clones this <code>Mapping</code> and the mapped <code>IChemObject</code>s. * * @return The cloned object */ public Object clone() throws CloneNotSupportedException{ Mapping clone = (Mapping) super.clone(); if (relation != null) { clone.relation = new IChemObject[relation.leng...
/base/silent/src/main/java/org/openscience/cdk/silent/Mapping.java
robustness-copilot_data_843
/** * Adds rows to destination for each row in table1 with the columns from table2 added as missing * values. */ private void withMissingLeftJoin(Table destination, Table table1, Selection table1Rows, Set<Integer> ignoreColumns, boolean keepTable2JoinKeyColumns){ for (int c = 0; c < destination.columnCoun...
/core/src/main/java/tech/tablesaw/joining/DataFrameJoiner.java
robustness-copilot_data_844
/** * Checks whether {@code this} dataset is locked for a given reason. * @param reason the reason we test for. * @return {@code true} iff the data set is locked for {@code reason}. */ public boolean isLockedFor(DatasetLock.Reason reason){ for (DatasetLock l : getLocks()) { if (l.getRea...
/src/main/java/edu/harvard/iq/dataverse/Dataset.java
robustness-copilot_data_845
/** * Clones this SingleElectron object, including a clone of the atom for which the * SingleElectron is defined. * * @return The cloned object */ public Object clone() throws CloneNotSupportedException{ SingleElectron clone = (SingleElectron) super.clone(); if (atom != null) { ...
/base/data/src/main/java/org/openscience/cdk/SingleElectron.java
robustness-copilot_data_846
/** * Evaluates the empirical delt V for some S environments. * * The method checks to see whether a S atom is in a -S-S-, * -SO-, -SO2- group and returns the empirical values noted * in Kier & Hall (1986), page 20. * * @param atom The S atom in question * @param atomCo...
/descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/ChiIndexUtils.java
robustness-copilot_data_847
/** * Check if the admin protocol channel is using a secure protocol like T3S or HTTPS. * @return true is a secure protocol is being used */ public boolean isLocalAdminProtocolChannelSecure(){ boolean adminProtocolPortSecure = false; boolean adminProtocolPortFound = false; if (networkAccessPoints ...
/operator/src/main/java/oracle/kubernetes/operator/wlsconfig/WlsServerConfig.java
robustness-copilot_data_848
/** * When a job is submitted, it adds itself as the child of a parent job. When it terminates, it * removes itself from the parent list. The multimap implementation automatically removes the * parent key from the table when its child collection is empty. * <p> * Breadth-first directories do ...
/modules/dcache-bulk/src/main/java/org/dcache/services/bulk/handlers/BulkJobCompletionHandler.java
robustness-copilot_data_849
/** * Create the port and attach it to the process. * * @param userId the name of the calling user * @param port the port values * @param entityTpeName the type name * @param externalSourceName the unique name of the external source * @param processGUID ...
/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_850
/** * Parse a {@link JsonNode} and produce the corresponding {@link NodeWriter}. * * @param node the {@link JsonNode} to parse. * @return a {@link NodeWriter} corresponding to the given JSON node * @throws JsonPatternException denotes an invalid pattern */ private NodeWriter<Event> parse...
/src/main/java/net/logstash/logback/pattern/AbstractJsonPatternParser.java
robustness-copilot_data_851
/** * Creates a new sumo handler by reading data from xml file. */ static SumoNetworkHandler read(File file) throws ParserConfigurationException, SAXException, IOException{ SAXParserFactory factory = SAXParserFactory.newInstance(); SAXParser saxParser = factory.newSAXParser(); SumoNetworkHandler...
/contribs/sumo/src/main/java/org/matsim/contrib/sumo/SumoNetworkHandler.java
robustness-copilot_data_852
/** * Parse a string of namespace names and return them as a collection. * @param namespaceString a comma-separated list of namespace names * @return Namespace list */ public static Collection<String> parseNamespaceList(String namespaceString){ Collection<String> namespaces = Stream.of(namespaceString....
/operator/src/main/java/oracle/kubernetes/operator/helpers/NamespaceHelper.java
robustness-copilot_data_853
/** * Receive a binary encoded 'picture' message from the socket (or actor). * This method is similar to {@link org.zeromq.ZMQ.Socket#recv()}, except the arguments are encoded * in a binary format that is compatible with zproto, and is designed to * reduce memory allocations. * * @param pi...
/src/main/java/org/zeromq/proto/ZPicture.java
robustness-copilot_data_854
/** Returns a column of the same type containing the last {@code numRows} of this column. */ Column<T> last(final int numRows){ int newRowCount = Math.min(numRows, size()); return inRange(size() - newRowCount, size()); }
/core/src/main/java/tech/tablesaw/columns/Column.java
robustness-copilot_data_855
/** * Iterates over keys to replace any placeholders in the values. * * @param node Object node * @param contentVariableReplacements current map of content variables */ private void replaceInObject(JsonNode node, Map<String, Object> contentVariableReplacements){ Iterator<String> fieldNames...
/bundle/src/main/java/com/adobe/acs/commons/ccvar/filter/ContentVariableJsonFilter.java
robustness-copilot_data_856
/** * Non destructively split a molecule into two parts at the specified bond. * * Note that if a ring bond is specified, the resultant list will contain * teh opened ring twice. * * @param atomContainer The molecule to split * @param bond The bond to split at * @return A list co...
/tool/fragment/src/main/java/org/openscience/cdk/fragment/FragmentUtils.java
robustness-copilot_data_857
/** * This makes atom map of matching atoms out of atom map of matching bonds as produced by the get(Subgraph|Ismorphism)Map methods. * Added by Asad since CDK one doesn't pick up the correct changes * @param list The list produced by the getMap method. * @param sourceGraph first molecule. Mu...
/legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKRMapHandler.java
robustness-copilot_data_858
/** * Return true if the SqlStatement class queries the database in any way to determine Statements to execute. * If the statement queries the database, it cannot be used in updateSql type operations */ public boolean generateStatementsVolatile(SqlStatement statement, Database database){ for (SqlGen...
/liquibase-core/src/main/java/liquibase/sqlgenerator/SqlGeneratorFactory.java
robustness-copilot_data_859
/** * Determines if, according to the algorithms implemented in this class, the given * AtomContainer has properly distributed double bonds. * * @param m {@link IAtomContainer} to check the bond orders for. * @return true, if bond orders are properly distributed * @throws CDKException thr...
/legacy/src/main/java/org/openscience/cdk/smiles/DeduceBondSystemTool.java
robustness-copilot_data_860
/** * Adds a new column to the column list of this PrimaryKey. The first column has the position 0. * If you specify a position that is greater than the number of columns present, undefined * columns (NULL expressions) will be added as padding. If a position that is already * occupied by a column is...
/liquibase-core/src/main/java/liquibase/structure/core/PrimaryKey.java
robustness-copilot_data_861
/** * Repeat a String {@code repeat} times to form a new String. * * <pre> * StringUtils.repeat(null, 2) = null * StringUtils.repeat("", 0) = "" * StringUtils.repeat("", 2) = "" * StringUtils.repeat("a", 3) = "aaa" * StringUtils.repeat("ab", 2) = "abab" * StringUtils.repeat("a", -2) = ""...
/core/src/main/java/tech/tablesaw/util/StringUtils.java
robustness-copilot_data_862
/** * Calculates the cheapest route from Node 'fromNode' to Node 'toNode' at * starting time 'startTime'. * * @param fromNode * The Node at which the route should start. * @param toNode * The Node at which the route should end. ...
/matsim/src/main/java/org/matsim/core/router/Dijkstra.java
robustness-copilot_data_863
/** * Create a stereo encoder for all potential 2D and 3D double bond stereo * configurations. * * @param container an atom container * @param graph adjacency list representation of the container * @return a new encoder for tetrahedral elements */ public StereoEncoder create(IAto...
/tool/hash/src/main/java/org/openscience/cdk/hash/stereo/GeometricDoubleBondEncoderFactory.java
robustness-copilot_data_864
/** * Returns {@code this}' string representation. Differs from {@link #toString} * which can also contain debug data, if needed. * * @return The string representation of this global id. */ public String asString(){ if (protocol == null || authority == null || identifier == null) { ...
/src/main/java/edu/harvard/iq/dataverse/GlobalId.java
robustness-copilot_data_865
/** * Assigns a set of rings to groups each sharing a bond. * * @param rBondsArray * @return A List of Lists each containing the ring indices of a set of fused rings */ private List<List<Integer>> assignRingGroups(List<Integer[]> rBondsArray){ List<List<Integer>> ringGroups; ringGroups...
/legacy/src/main/java/org/openscience/cdk/smiles/FixBondOrdersTool.java
robustness-copilot_data_866
/** * Access the default position of the hydrogen label when the atom has no * bonds. * * @param atom hydrogens will be labelled * @return the position */ static HydrogenPosition usingDefaultPlacement(final IAtom atom){ if (PREFIXED_H.contains(Elements.ofNumber(atom.getAtomicNumber()...
/display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/HydrogenPosition.java
robustness-copilot_data_867
/** * Creates a WLSServerConfig object using an "servers" or "serverTemplates" item parsed from JSON * result from WLS REST call. * * @param serverConfigMap A Map containing the parsed "servers" or "serverTemplates" element for a * WLS server or WLS server template. * @return A new WlsServerConfig...
/operator/src/main/java/oracle/kubernetes/operator/wlsconfig/WlsServerConfig.java
robustness-copilot_data_868
/** * Creates a schema generator, suitably customized for generating Kubernetes CRD schemas. */ public static SchemaGenerator createCrdSchemaGenerator(){ SchemaGenerator generator = new SchemaGenerator(); generator.defineAdditionalProperties(Quantity.class, "string"); generator.setForbidAdditionalPro...
/operator/src/main/java/oracle/kubernetes/weblogic/domain/model/CrdSchemaGenerator.java
robustness-copilot_data_869
/** * Finds the end character index of the parameter within the paramsString that starts at startIndex. * * Takes into account nesting of parameters. * * @param paramsString * @param startIndex index within paramsString to start looking * @return index at which the parameter string en...
/src/main/java/net/logstash/logback/appender/WaitStrategyFactory.java
robustness-copilot_data_870
/** * Returns the Elements ordered according to (approximate) probability of occurrence. * * <p>This begins with the "elements of life" C, H, O, N, (Si, P, S, F, Cl), * then continues with the "common" chemical synthesis ingredients, closing off * with the tail-end of the periodic table in atom...
/tool/formula/src/main/java/org/openscience/cdk/tools/manipulator/MolecularFormulaManipulator.java
robustness-copilot_data_871
/** * Converts a given string into a Bayesian model instance, or throws an exception if it is not valid. * * @param str string containing the serialised model * @return instantiated model that can be used for predictions */ public static Bayesian deserialise(String str) throws IOException{ ...
/tool/model/src/main/java/org/openscience/cdk/fingerprint/model/Bayesian.java
robustness-copilot_data_872
/** * Recycle the instance before returning it to the pool. * Sub-classes may override this method if they wish to implement their own custom logic. * * @param instance the instance to recycle * @return {@code true} if the instance can be recycled and returned to the pool, {@code false} if not...
/src/main/java/net/logstash/logback/util/ThreadLocalHolder.java
robustness-copilot_data_873
/** * Renames any column header that appears more than once. Subsequent appearances have "-[count]" * appended; For example, the first (or only) appearance of "foo" is named "foo", the second * appearance is named "foo-2" The header array is modified in place. * * @param headerNames The header names to b...
/core/src/main/java/tech/tablesaw/io/FileReader.java
robustness-copilot_data_874
/** * Partition the bonding partners of a given atom into placed (coordinates * assinged) and not placed. * *@param atom The atom whose bonding partners are to be * partitioned *@param unplacedPartners A vector for the unplaced bonding partners to go in *@param ...
/tool/sdg/src/main/java/org/openscience/cdk/layout/AtomPlacer.java
robustness-copilot_data_875
/** * Constructs a new {@link IDifference} object. * * @param name a name reflecting the nature of the created {@link IDifference} * @param first the first object to compare * @param second the second object to compare * @return an {@link IDifference} reflecting the differences be...
/misc/diff/src/main/java/org/openscience/cdk/tools/diff/tree/Point3dDifference.java
robustness-copilot_data_876
/** * Creates a function to adjust the freespeed for urban links. * @see LinkProperties#DEFAULT_FREESPEED_FACTOR * * @apiNote Can be used as example, but no public access currently */ static AfterLinkCreated adjustFreespeed(final double factor){ return (link, osmTags, direction) -> { ...
/contribs/osm/src/main/java/org/matsim/contrib/osm/networkReader/SupersonicOsmNetworkReader.java
robustness-copilot_data_877
/** * Returns a one line string representation of this LonePair. * This method is conform RFC #9. * * @return The string representation of this LonePair */ public String toString(){ StringBuffer resultString = new StringBuffer(); resultString.append("LonePair("); resultString.ap...
/base/silent/src/main/java/org/openscience/cdk/silent/LonePair.java
robustness-copilot_data_878
/** * Parse a JSON pattern and produce the corresponding {@link NodeWriter}. * Returns <em>null</em> if the pattern is invalid, null or empty. An error status is * logged when the pattern is invalid and parsing failed. * * @param pattern the JSON pattern to parse * @return a {@link NodeWr...
/src/main/java/net/logstash/logback/pattern/AbstractJsonPatternParser.java
robustness-copilot_data_879
/** * Adds or replaces a list subtag, converting the list entries to tags. * * @param <V> the list elements' Java type * @param key the key to write to * @param type the list elements' tag type * @param value the list contents, as objects to convert to tags * @param tagCreator a funct...
/src/main/java/net/glowstone/util/nbt/CompoundTag.java
robustness-copilot_data_880
/** * Locate a stereo bond adjacent to the {@code atom}. * * @param atom an atom * @return a stereo bond or null if non found */ private StereoBond findStereoBond(IAtom atom){ for (IBond bond : stereoBonds) if (bond.contains(atom)) return (StereoBond) bond; return null; }
/legacy/src/main/java/org/openscience/cdk/smiles/smarts/parser/SmartsQueryVisitor.java
robustness-copilot_data_881
/** * Gateway method the Filter uses to determine if the request is a candidate for processing by Assets Folder Properties Support. * These checks should be fast and fail broadest and fastest first. * * @param request the request * @return true if Assets Folder Properties Support should process...
/bundle/src/main/java/com/adobe/acs/commons/dam/impl/AssetsFolderPropertiesSupport.java
robustness-copilot_data_882
/** * Generate a SMARTS for the substructure formed of the provided * atoms. * * @param atomIdxs atom indexes * @return SMARTS, null if an empty array is passed */ public String generate(int[] atomIdxs){ if (atomIdxs == null) throw new NullPointerException("No atom indexes pro...
/tool/smarts/src/main/java/org/openscience/cdk/smarts/SmartsFragmentExtractor.java
robustness-copilot_data_883
/** * Adds all rings of another RingSet if they are not already part of this ring set. * * If you want to add a single ring to the set use {@link #addAtomContainer(org.openscience.cdk.interfaces.IAtomContainer)} * * @param ringSet the ring set to be united with this one. */ public void...
/base/silent/src/main/java/org/openscience/cdk/silent/RingSet.java
robustness-copilot_data_884
/** * Initialise our expiry time to some point in the future. * * @param lifetime the time, in seconds. */ private void becomeMortal(long lifetime){ _whenIShouldExpire = new Date(System.currentTimeMillis() + TimeUnit.SECONDS.toMillis(lifetime)); }
/modules/dcache-info/src/main/java/org/dcache/services/info/base/StateComposite.java
robustness-copilot_data_885
/** * Iterate over the underlying rows in the source table. If you set one of the rows while * iterating it will change the row in the source table. */ public Iterator<Row> iterator(){ return new Iterator<Row>() { private final Row row = new Row(TableSlice.this); @Override public...
/core/src/main/java/tech/tablesaw/table/TableSlice.java
robustness-copilot_data_886
/** * Capitalizes a String changing the first character to title case as per {@link * Character#toTitleCase(int)}. No other characters are changed. * * <p>A {@code null} input String returns {@code null}. * * <pre> * StringUtils.capitalize(null) = null * StringUtils.capitalize("") = "" * ...
/core/src/main/java/tech/tablesaw/util/StringUtils.java
robustness-copilot_data_887
/** * Access the bounds of a shape that have been transformed. * * @param shape any shape * @return the bounds of the shape transformed */ private Rectangle2D transformedBounds(Shape shape){ Rectangle2D rectangle2D = shape.getBounds2D(); Point2D minPoint = new Point2D.Double(rectangle2...
/display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/TextOutline.java
robustness-copilot_data_888
/** * Actual conversion implementation: instead of using existing read * and write methods, much of code is inlined. Reason for this is * that we must avoid root value wrapping/unwrapping both for efficiency and * for correctness. If root value wrapping/unwrapping is actually desired, * caller ...
/src/main/java/com/fasterxml/jackson/databind/ObjectMapper.java
robustness-copilot_data_889
/** * In the minimal IMolecularFormula must contain all those IElement found in the * minimal IMolecularFormula. * * @param formulaMax A IMolecularFormula which contains the maximal representation of the Elements * @param formulaMin A IMolecularFormula which contains the minimal representatio...
/tool/formula/src/main/java/org/openscience/cdk/tools/manipulator/MolecularFormulaSetManipulator.java
robustness-copilot_data_890
/** * Collect and return a report row for the workflow status. Method is package scope for unit tests. * @param status the status to report upon. * @return the row of data */ EnumMap<ReportColumns, Object> report(WorkflowRemovalStatus status){ final EnumMap<ReportColumns, Object> row = new En...
/bundle/src/main/java/com/adobe/acs/commons/mcp/impl/processes/WorkflowRemover.java
robustness-copilot_data_891
/** * Creates a default configuration properties with some common values like: application.tmpdir, * application.charset and pid (process ID). * * @return A configuration object. */ public static Config defaults(){ Path tmpdir = Paths.get(System.getProperty("user.dir"), "tmp"); Map<String, Strin...
/jooby/src/main/java/io/jooby/Environment.java
robustness-copilot_data_892
/** * Removes rings which do not have all sp2/planar3 aromatic atoms. * and also gets rid of rings that have more than 8 atoms in them. * * @param m The {@link IAtomContainer} from which we want to remove rings * @return The set of reduced rings */ private IRingSet removeExtraRings(IAtomC...
/legacy/src/main/java/org/openscience/cdk/smiles/FixBondOrdersTool.java