query
stringlengths
74
6.1k
positive
listlengths
1
1
negative
listlengths
9
9
public PeriodicEvent runEvery(Runnable task, float delay, float period, int repetitions) { if (repetitions < 1) { return null; } else if (repetitions == 1) { // Better to burn a handful of CPU cycles than to churn memory by // creating a new callback ...
[ "Run a task periodically, for a set number of times.\n\n@param task\nTask to run.\n@param delay\nThe first execution will happen in {@code delay} seconds.\n@param period\nSubsequent executions will happen every {@code period} seconds\nafter the first.\n@param repetitions\nRepeat count\n@return {@code null} if {@cod...
[ "Inspects the object and all superclasses for public, non-final, accessible methods and returns a\ncollection containing all the attributes found.\n\n@param classToInspect the class under inspection.", "Read the domain controller's data from an input stream.\n\n@param instream the input stream\n@throws Exception"...
private static OriginatorType mapOriginator(Originator originator) { if (originator == null) { return null; } OriginatorType origType = new OriginatorType(); origType.setProcessId(originator.getProcessId()); origType.setIp(originator.getIp()); origType.setHost...
[ "Mapping originator.\n\n@param originator the originator\n@return the originator type" ]
[ "Asynchronous call that begins execution of the task\nand returns immediately.", "Start the chain of execution running.\n\n@throws IllegalStateException\nif the chain of execution has already been started.", "Unlink the specified reference from this object.\nMore info see OJB doc.\n\n@param obj Object with refe...
@Override public void solve(DMatrixRBlock B, DMatrixRBlock X) { if( B.blockLength != blockLength ) throw new IllegalArgumentException("Unexpected blocklength in B."); DSubmatrixD1 L = new DSubmatrixD1(decomposer.getT(null)); if( X != null ) { if( X.blockLength != bl...
[ "If X == null then the solution is written into B. Otherwise the solution is copied\nfrom B into X." ]
[ "Start watching the fluo app uuid. If it changes or goes away then halt the process.", "Returns true if the given candidate is a group that is filtered due to rule parameters in the current call graph.", "This is private. It is a helper function for the utils.", "Try to provide an escaped, ready-to-use shell ...
public static transformpolicy[] get(nitro_service service) throws Exception{ transformpolicy obj = new transformpolicy(); transformpolicy[] response = (transformpolicy[])obj.get_resources(service); return response; }
[ "Use this API to fetch all the transformpolicy resources that are configured on netscaler." ]
[ "Returns a factory that vends DelimitRegExIterators that reads the contents of the\ngiven Reader, splits on the specified delimiter, applies op, then returns the result.", "Adds a procedure argument definition to this class descriptor.\n\n@param argDef The procedure argument definition", "Saves changes in prope...
private void readRelationships(Storepoint phoenixProject) { for (Relationship relation : phoenixProject.getRelationships().getRelationship()) { readRelation(relation); } }
[ "Read task relationships from a Phoenix file.\n\n@param phoenixProject Phoenix project data" ]
[ "Runs a method call with retries.\n@param pjp a {@link ProceedingJoinPoint} representing an annotated\nmethod call.\n@param retryableAnnotation the {@link org.fishwife.jrugged.aspects.Retryable}\nannotation that wrapped the method.\n@throws Throwable if the method invocation itself throws one during execution.\n@re...
public static String normalizeWS(String value) { char[] tmp = new char[value.length()]; int pos = 0; boolean prevws = false; for (int ix = 0; ix < tmp.length; ix++) { char ch = value.charAt(ix); if (ch != ' ' && ch != '\t' && ch != '\n' && ch != '\r') { if (prevws && pos != 0) ...
[ "Removes trailing and leading whitespace, and also reduces each\nsequence of internal whitespace to a single space." ]
[ "Create an embedded host controller.\n\n@param jbossHomePath the location of the root of the host controller installation. Cannot be {@code null} or empty.\n@param modulePath the location of the root of the module repository. May be {@code null} if the standard\nlocation under {@code jbossHomePath} should be used\n...
public void commit() { if (directory == null) return; try { if (reader != null) reader.close(); // it turns out that IndexWriter.optimize actually slows // searches down, because it invalidates the cache. therefore // not calling it any more. // http://www.searchwor...
[ "Flushes all changes to disk." ]
[ "Apply the remote domain model to the local host controller.\n\n@param bootOperations the result of the remote read-domain-model op\n@return {@code true} if the model was applied successfully, {@code false} otherwise", "Register the DAO with the cache. This will allow folks to build a DAO externally and then regi...
public static base_response update(nitro_service client, nsspparams resource) throws Exception { nsspparams updateresource = new nsspparams(); updateresource.basethreshold = resource.basethreshold; updateresource.throttle = resource.throttle; return updateresource.update_resource(client); }
[ "Use this API to update nsspparams." ]
[ "Add the set with given bundles to the \"Import-Package\" main attribute.\n\n@param importedPackages The set of all packages to add.", "Crop the image between two points.\n\n@param top Top bound.\n@param left Left bound.\n@param bottom Bottom bound.\n@param right Right bound.\n@throws IllegalArgumentException if ...
private static int getTrimmedXStart(BufferedImage img) { int height = img.getHeight(); int width = img.getWidth(); int xStart = width; for (int i = 0; i < height; i++) { for (int j = 0; j < width; j++) { if (img.getRGB(j, i) != Color.WHITE.getRGB() && j < xStart) { xStart = j; ...
[ "Get the first non-white X point\n@param img Image n memory\n@return the x start" ]
[ "Checks to see if all the provided matrices are the expected size for an SVD. If an error is encountered\nthen an exception is thrown. This automatically handles compact and non-compact formats", "New REST client uses new REST service", "Get a value as a string.\n\n@param key the key for looking up the value....
public void setGroupName(String name, int id) { PreparedStatement statement = null; try (Connection sqlConnection = sqlService.getConnection()) { statement = sqlConnection.prepareStatement( "UPDATE " + Constants.DB_TABLE_SERVER_GROUPS + " SET " + Constant...
[ "Set the group name\n\n@param name new name of server group\n@param id ID of group" ]
[ "Wrapper delayed emission, based on delayProvider.\n\n@param event the event to emit\n@param milliseconds the delay in milliseconds\n@param <T> the type of event\n@return delayed observable", "Adds a submodule to the module.\n\n<P>\nINFO: If the module is promoted, all added submodule will be promoted.\n\n@param ...
private String alterPrefix(String word, String oldPrefix, String newPrefix) { if (word.startsWith(oldPrefix)) { return word.replaceFirst(oldPrefix, newPrefix); } return (newPrefix + word); }
[ "Manipulates a string by cutting of a prefix, if present, and adding a new prefix.\n\n@param word the string to be manipulated\n@param oldPrefix the old prefix that should be replaced\n@param newPrefix the new prefix that is added\n@return the manipulated string" ]
[ "Get the value of a primitive type from the request data.\n\n@param fieldName the name of the attribute to get from the request data.\n@param pAtt the primitive attribute.\n@param requestData the data to retrieve the value from.", "Sets selected page implicitly\n@param page new selected page\n@return true if the ...
public String getProperty(String key, String defaultValue) { return mProperties.getProperty(key, defaultValue); }
[ "Gets a property with a default value.\n@param key\nThe key string.\n@param defaultValue\nThe default value.\n@return The property string." ]
[ "this method looks up the appropriate JDOClass for a given persistent Class.\nIt uses the JDOModel to perfom this lookup.\n@param c the persistent Class\n@return the JDOCLass object", "Returns a new iterator filtering any null references.\n\n@param unfiltered\nthe unfiltered iterator. May not be <code>null</code>...
@SuppressWarnings("WeakerAccess") public int segmentHeight(final int segment, final boolean front) { final ByteBuffer bytes = getData(); if (isColor) { final int base = segment * 6; final int frontHeight = Util.unsign(bytes.get(base + 5)); if (front) { ...
[ "Determine the height of the preview given an index into it.\n\n@param segment the index of the waveform preview segment to examine\n@param front if {@code true} the height of the front (brighter) segment of a color waveform preview is returned,\notherwise the height of the back (dimmer) segment is returned. Has no...
[ "This continuously tries to reconnect in a separate thread and will only stop if the connection was established\nsuccessfully or the server gets shutdown. If there is currently a reconnect task active the connection paramaters\nand callback will get updated.\n\n@param reconnectUri the updated connection uri\n@pa...
public static base_response update(nitro_service client, dospolicy resource) throws Exception { dospolicy updateresource = new dospolicy(); updateresource.name = resource.name; updateresource.qdepth = resource.qdepth; updateresource.cltdetectrate = resource.cltdetectrate; return updateresource.update_resource...
[ "Use this API to update dospolicy." ]
[ "Add tags to a photo.\n\nThis method requires authentication with 'write' permission.\n\n@param photoId\nThe photo ID\n@param tags\nThe tags\n@throws FlickrException", "Use this API to fetch the statistics of all dos_stats resources that are configured on netscaler.", "Check that each emitted notification is pr...
public AT_Row setPaddingLeftChar(Character paddingLeftChar) { if(this.hasCells()){ for(AT_Cell cell : this.getCells()){ cell.getContext().setPaddingLeftChar(paddingLeftChar); } } return this; }
[ "Sets the left padding character for all cells in the row.\n@param paddingLeftChar new padding character, ignored if null\n@return this to allow chaining" ]
[ "Use this API to update transformpolicy.", "Use this API to update gslbservice resources.", "Gets container with alls groups of a certain user.\n\n@param cms cmsobject\n@param user to find groups for\n@param caption caption property\n@param iconProp property\n@param ou ou\n@param propStatus status property\n@pa...
public ItemRequest<Section> delete(String section) { String path = String.format("/sections/%s", section); return new ItemRequest<Section>(this, Section.class, path, "DELETE"); }
[ "A specific, existing section can be deleted by making a DELETE request\non the URL for that section.\n\nNote that sections must be empty to be deleted.\n\nThe last remaining section in a board view cannot be deleted.\n\nReturns an empty data block.\n\n@param section The section to delete.\n@return Request object"...
[ "Retrieve all Collection attributes of a given instance\n\n@param newObj the instance to be loaded or refreshed\n@param cld the ClassDescriptor of the instance\n@param forced if set to true, loading is forced even if cld differs", "Creates the DAO if we have config information cached and caches the DAO.", "Use ...
private synchronized void setFactoryMethod(Method newMethod) { if (newMethod != null) { // make sure it's a no argument method if (newMethod.getParameterTypes().length > 0) { throw new MetadataException( "Factory methods...
[ "Specify the method to instantiate objects\nrepresented by this descriptor.\n@see #setFactoryClass" ]
[ "Add parameter to testCase\n\n@param context which can be changed", "Removes 'original' and places 'target' at the same location", "Return primary key values of given Identity object.\n\n@param cld\n@param oid\n@return Object[]\n@throws PersistenceBrokerException", "Internally undo recorded changes we did so ...
public ProteusApplication addDefaultRoutes(RoutingHandler router) { if (config.hasPath("health.statusPath")) { try { final String statusPath = config.getString("health.statusPath"); router.add(Methods.GET, statusPath, (final HttpServerExchange exchange) -> ...
[ "Add utility routes the router\n\n@param router" ]
[ "Set the weekdays at which the event should take place.\n@param weekDays the weekdays at which the event should take place.", "Returns the ARGB components for all pixels in this image\n\n@return an array containing an array for each ARGB components in that order.", "static expansion helpers", "Convert a colle...
public boolean decompose(DMatrixRMaj mat , int indexStart , int n ) { double m[] = mat.data; double el_ii; double div_el_ii=0; for( int i = 0; i < n; i++ ) { for( int j = i; j < n; j++ ) { double sum = m[indexStart+i*mat.numCols+j]; int iEl ...
[ "Decomposes a submatrix. The results are written to the submatrix\nand to its internal matrix L.\n\n@param mat A matrix which has a submatrix that needs to be inverted\n@param indexStart the first index of the submatrix\n@param n The width of the submatrix that is to be inverted.\n@return True if it was able to fi...
[ "Locate the no arg constructor for the class.", "Get a scalar value for the DOM diversity using the Robust Tree Edit Distance\n\n@param dom1\n@param dom2\n@return", "Get a TokenizerFactory that does Penn Treebank tokenization.\nThis is now the recommended factory method to use.\n\n@param factory A TokenFactory ...
@NonNull private List<String> mapObsoleteElements(List<String> names) { List<String> elementsToRemove = new ArrayList<>(names.size()); for (String name : names) { if (name.startsWith("android")) continue; elementsToRemove.add(name); } return elementsToRemove; ...
[ "Maps all views that don't start with \"android\" namespace.\n\n@param names All shared element names.\n@return The obsolete shared element names." ]
[ "Get a log file and last relevant date, and check if the log file is relevant\n@param currentLogFile The log file\n@param lastRelevantDate The last date which files should be keeping since\n@return false if the file should be deleted, true if it does not.", "Set the url for the shape file.\n\n@param url shape fil...
private SubProject readSubProject(byte[] data, int uniqueIDOffset, int filePathOffset, int fileNameOffset, int subprojectIndex) { try { SubProject sp = new SubProject(); int type = SUBPROJECT_TASKUNIQUEID0; if (uniqueIDOffset != -1) { int value = MPPUtilit...
[ "Method used to read the sub project details from a byte array.\n\n@param data byte array\n@param uniqueIDOffset offset of unique ID\n@param filePathOffset offset of file path\n@param fileNameOffset offset of file name\n@param subprojectIndex index of the subproject, used to calculate unique id offset\n@return new ...
[ "Creates an InputObjectStream and an OutputObjectStream from a Socket, and\npasses them to the closure. The streams will be closed after the closure\nreturns, even if an exception is thrown.\n\n@param socket this Socket\n@param closure a Closure\n@return the value returned by the closure\n@throws IOException if a...
private float[] generateParticleTimeStamps(float totalTime) { float timeStamps[] = new float[mEmitRate * 2]; for ( int i = 0; i < mEmitRate * 2; i +=2 ) { timeStamps[i] = totalTime + mRandom.nextFloat(); timeStamps[i + 1] = 0; } return timeStamps; ...
[ "Generate random time stamps from the current time upto the next one second.\nPassed as texture coordinates to the vertex shader, an unused field is present\nwith every pair passed.\n\n@param totalTime\n@return" ]
[ "Use this API to convert sslpkcs12.", "Manually set the breaker to be reset and ready for use. This\nis only useful after a manual trip otherwise the breaker will\ntrip automatically again if the service is still unavailable.\nJust like a real breaker. WOOT!!!", "Get image parent ID from imageID on the curren...
public static String encodeAuthority(String authority, String encoding) throws UnsupportedEncodingException { return HierarchicalUriComponents.encodeUriComponent(authority, encoding, HierarchicalUriComponents.Type.AUTHORITY); }
[ "Encodes the given URI authority with the given encoding.\n@param authority the authority to be encoded\n@param encoding the character encoding to encode to\n@return the encoded authority\n@throws UnsupportedEncodingException when the given encoding parameter is not supported" ]
[ "Get the photos for the specified group pool, optionally filtering by taf.\n\nThis method does not require authentication.\n\n@see com.flickr4java.flickr.photos.Extras\n@param groupId\nThe group ID\n@param userId\nThe user ID (may be null)\n@param tags\nThe optional tags (may be null)\n@param extras\nSet of extra-a...
public Set<BsonValue> getPausedDocumentIds(final MongoNamespace namespace) { this.waitUntilInitialized(); try { ongoingOperationsGroup.enter(); final Set<BsonValue> pausedDocumentIds = new HashSet<>(); for (final CoreDocumentSynchronizationConfig config : this.syncConfig.getSynchro...
[ "Return the set of synchronized document _ids in a namespace\nthat have been paused due to an irrecoverable error.\n\n@param namespace the namespace to get paused document _ids for.\n@return the set of paused document _ids in a namespace" ]
[ "Use this API to delete gslbsite of given name.", "Produces or returns the existing proxy class. The operation is thread-safe.\n\n@return always the class of the proxy", "Format the label text.\n\n@param scaleUnit The unit used for the scalebar.\n@param value The scale value.\n@param intervalUnit The scaled uni...
@Override public ProjectFile read(String accessDatabaseFileName) throws MPXJException { try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String url = "jdbc:odbc:DRIVER=Microsoft Access Driver (*.mdb);DBQ=" + accessDatabaseFileName; m_connection = DriverManager.getConnection...
[ "This is a convenience method which reads the first project\nfrom the named MPD file using the JDBC-ODBC bridge driver.\n\n@param accessDatabaseFileName access database file name\n@return ProjectFile instance\n@throws MPXJException" ]
[ "Use this API to fetch snmpalarm resource of given name .", "Search for the attribute \"id\" and return the value.\n\n@return the id of this element or null when not found", "Navigate to this address in the given model node.\n\n@param model the model node\n@param create {@code true} to create the last part of t...
private Field getFieldRecursive(Class c, String name) throws NoSuchFieldException { try { return c.getDeclaredField(name); } catch (NoSuchFieldException e) { // if field could not be found in the inheritance hierarchy, signal error ...
[ "try to find a field in class c, recurse through class hierarchy if necessary\n\n@throws NoSuchFieldException if no Field was found into the class hierarchy" ]
[ "Adds the index input to list.\n\n@param name the name\n@param in the in\n@param postingsFormatName the postings format name\n@return the string\n@throws IOException Signals that an I/O exception has occurred.", "Get a list of people in a given photo.\n\n@param photoId\n@throws FlickrException", "Gets the match...
public Membership getMembership() { URI uri = new URIBase(getBaseUri()).path("_membership").build(); Membership membership = couchDbClient.get(uri, Membership.class); return membership; }
[ "Get the list of all nodes and the list of active nodes in the cluster.\n\n@return Membership object encapsulating lists of all nodes and the cluster nodes\n@see <a\nhref=\"https://console.bluemix.net/docs/services/Cloudant/api/advanced.html#-get-_membership-\">\n_membership</a>" ]
[ "Find the the qualfied container port of the target service\nUses java annotations first or returns the container port.\n\n@param service\nThe target service.\n@param qualifiers\nThe set of qualifiers.\n\n@return Returns the resolved containerPort of '0' as a fallback.", "dispatch to gravity state", "Pseudo-Inv...
public boolean contains(String id) { assertNotEmpty(id, "id"); InputStream response = null; try { response = couchDbClient.head(new DatabaseURIHelper(dbUri).documentUri(id)); } catch (NoDocumentException e) { return false; } finally { close(res...
[ "Checks if a document exist in the database.\n\n@param id The document _id field.\n@return true If the document is found, false otherwise." ]
[ "ChromeCast does not allow you to jump levels too quickly to avoid blowing speakers.\nSetting by increment allows us to easily get the level we want\n\n@param level volume level from 0 to 1 to set\n@throws IOException\n@see <a href=\"https://developers.google.com/cast/docs/design_checklist/sender#sender-control-vol...
public static void printHelp(final Options options) { Collection<Option> c = options.getOptions(); System.out.println("Command line options are:"); int longestLongOption = 0; for (Option op : c) { if (op.getLongOpt().length() > longestLongOption) { longestLong...
[ "Prints the help on the command line\n\n@param options Options object from commons-cli" ]
[ "Obtain parameters from query\n\n@param query query to scan\n@return Map of parameters", "Write the table configuration to a buffered writer.", "Get the time zone for a specific exchange suffix\n\n@param suffix suffix for the exchange in YahooFinance\n@return time zone of the exchange", "Get image parent ID f...
public static StoreDefinition getStoreDef(List<StoreDefinition> list, String name) { for(StoreDefinition def: list) if(def.getName().equals(name)) return def; return null; }
[ "Get a store definition from the given list of store definitions\n\n@param list A list of store definitions\n@param name The name of the store\n@return The store definition" ]
[ "Facade method for operating the Telnet Shell supporting line editing and command\nhistory over a socket.\n\n@param prompt Prompt to be displayed\n@param appName The app name string\n@param mainHandler Main command handler\n@param input Input stream.\n@param output Output stream.\n@return Shell that can be either f...
public Replication targetOauth(String consumerSecret, String consumerKey, String tokenSecret, String token) { targetOauth = new JsonObject(); this.consumerSecret = consumerSecret; this.consumerKey = consumerKey; this.tokenSecret = tokenSecret; t...
[ "Authenticate with the target database using OAuth.\n\n@param consumerSecret consumer secret\n@param consumerKey consumer key\n@param tokenSecret token secret\n@param token token\n@return this Replication instance to set more options\n@deprecated OAuth 1.0 implementation has been <a href=\"http://docs.couchdb.org/e...
[ "Remove duplicate Strings from the given array. Also sorts the array, as\nit uses a TreeSet.\n\n@param array the String array\n@return an array without duplicates, in natural sort order", "Returns a correlation matrix which has rank &lt; n and for which the first n factors agree with the factors of correlationMat...
public final SimpleFeatureCollection autoTreat(final Template template, final String features) throws IOException { SimpleFeatureCollection featuresCollection = treatStringAsURL(template, features); if (featuresCollection == null) { featuresCollection = treatStringAsGeoJson(featu...
[ "Get the features collection from a GeoJson inline string or URL.\n\n@param template the template\n@param features what to parse\n@return the feature collection\n@throws IOException" ]
[ "Gets the Correlation distance between two points.\n\n@param p A point in space.\n@param q A point in space.\n@return The Correlation distance between x and y.", "Gets the instance associated with the current thread.", "Use this API to fetch dnssuffix resources of given names .", "Process task dependencies.",...
public void createOverride(int groupId, String methodName, String className) throws Exception { // first make sure this doesn't already exist for (Method method : EditService.getInstance().getMethodsFromGroupId(groupId, null)) { if (method.getMethodName().equals(methodName) && method.getClas...
[ "given the groupId, and 2 string arrays, adds the name-responses pair to the table_override\n\n@param groupId ID of group\n@param methodName name of method\n@param className name of class\n@throws Exception exception" ]
[ "marks the message as read", "Create a new path\n\n@param pathName friendly name of path\n@param pathValue path value or regex\n@param requestType path request type. \"GET\", \"POST\", etc", "Call the onQueryExecuteTimeLimitExceeded hook if necessary\n@param sql sql statement that took too long\n@param querySta...
public void addComparator(Comparator<T> comparator, boolean ascending) { this.comparators.add(new InvertibleComparator<T>(comparator, ascending)); }
[ "Add a Comparator to the end of the chain using the provided sort order.\n@param comparator the Comparator to add to the end of the chain\n@param ascending the sort order: ascending (true) or descending (false)" ]
[ "Add a new script\n\n@param model\n@param name\n@param script\n@return\n@throws Exception", "Prepares Artifactory server either from serverID or from ArtifactoryServer.\n\n@param artifactoryServerID\n@param pipelineServer\n@return", "Get the first non-white Y point\n@param img Image in memory\n@return the trimm...
protected void addPropertiesStart(String type) { putProperty(PropertyKey.Host.name(), IpUtils.getHostName()); putProperty(PropertyKey.Type.name(), type); putProperty(PropertyKey.Status.name(), Status.Start.name()); }
[ "Add properties to 'properties' map on transaction start\n@param type - of transaction" ]
[ "Ask the specified player for the specified waveform preview from the specified media slot, first checking if we\nhave a cached copy.\n\n@param dataReference uniquely identifies the desired waveform preview\n\n@return the preview, if it was found, or {@code null}\n\n@throws IllegalStateException if the WaveformFind...
public ClassicCounter<K2> setCounter(K1 o, Counter<K2> c) { ClassicCounter<K2> old = getCounter(o); total -= old.totalCount(); if (c instanceof ClassicCounter) { map.put(o, (ClassicCounter<K2>) c); } else { map.put(o, new ClassicCounter<K2>(c)); } total += c.totalCount(); ...
[ "replace the counter for K1-index o by new counter c" ]
[ "Use this API to fetch all the dnstxtrec resources that are configured on netscaler.", "Adds BETWEEN criteria,\ncustomer_id between 1 and 10\n\n@param attribute The field name to be used\n@param value1 The lower boundary\n@param value2 The upper boundary", "Webkit based browsers require that we set the...
private HiveShellContainer createHiveServerContainer(final List<? extends Script> scripts, final Object testCase, TemporaryFolder baseDir) throws IOException { HiveServerContext context = new StandaloneHiveServerContext(baseDir, config); final HiveServerContainer hiveTestHarness = new HiveSer...
[ "Traverses the test case annotations. Will inject a HiveShell in the test case that envelopes the HiveServer." ]
[ "Encodes the given source into an encoded String using the rules specified\nby the given component and with the given options.\n@param source the source string\n@param encoding the encoding of the source string\n@param type the URI component for the source\n@return the encoded URI\n@throws IllegalArgumentException ...
public Map<String, Table> process(File directory, String prefix) throws IOException { String filePrefix = prefix.toUpperCase(); Map<String, Table> tables = new HashMap<String, Table>(); File[] files = directory.listFiles(); if (files != null) { for (File file : files) ...
[ "Main entry point. Reads a directory containing a P3 Btrieve database files\nand returns a map of table names and table content.\n\n@param directory directory containing the database\n@param prefix file name prefix used to identify files from the same database\n@return Map of table names to table data" ]
[ "In the case where the prefix sits at a segment boundary, and the prefix sequence is null - null - 0, this changes to prefix sequence of null - x - 0, where x is segment bit length.\n\nNote: We allow both [null, null, 0] and [null, x, 0] where x is segment length. However, to avoid inconsistencies when doing segme...
public static void copyThenClose(InputStream input, OutputStream output) throws IOException { copy(input, output); input.close(); output.close(); }
[ "Copies information between specified streams and then closes\nboth of the streams.\n@throws java.io.IOException" ]
[ "Get the root path where the build is located, the project may be checked out to\na sub-directory from the root workspace location.\n\n@param globalEnv EnvVars to take the workspace from, if workspace is not found\nthen it is take from project.getSomeWorkspace()\n@return The location of the root of the Gradle build...
public static String serialize(final Object obj) throws IOException { final ObjectMapper mapper = new ObjectMapper(); mapper.disable(MapperFeature.USE_GETTERS_AS_SETTERS); return mapper.writeValueAsString(obj); }
[ "Serialize an object with Json\n@param obj Object\n@return String\n@throws IOException" ]
[ "Obtains a local date in Julian calendar system from the\nera, year-of-era and day-of-year fields.\n\n@param era the Julian era, not null\n@param yearOfEra the year-of-era\n@param dayOfYear the day-of-year\n@return the Julian local date, not null\n@throws DateTimeException if unable to create the date\n@throws C...
private void processCalendarHours(ProjectCalendar calendar, Row row, int dayIndex) { Day day = Day.getInstance(dayIndex); boolean working = row.getInt("CD_WORKING") != 0; calendar.setWorkingDay(day, working); if (working == true) { ProjectCalendarHours hours = calendar.addCalen...
[ "Process calendar hours.\n\n@param calendar parent calendar\n@param row calendar hours data\n@param dayIndex day index" ]
[ "Use this API to fetch all the appfwwsdl resources that are configured on netscaler.", "get bearer token returned by IAM in JSON format", "Informs this sequence model that the value of the element at position pos has changed.\nThis allows this sequence model to update its internal model if desired.", "Sets th...
public List<Action> getRootActions() { final List<Action> rootActions = srcUpdTrees.stream().map(t -> originalActionsSrc.get(t)) .collect(Collectors.toList()); rootActions.addAll(srcDelTrees.stream() // .filter(t -> !srcDelTrees.contains(t.getParent()) && !srcUpdTrees.contains(t.getParent())) // .map(t...
[ "This method retrieves ONLY the ROOT actions" ]
[ "Copy the contents of this buffer to the destination LBuffer\n@param srcOffset\n@param dest\n@param destOffset\n@param size", "very big duct tape", "Use this API to fetch aaagroup_authorizationpolicy_binding resources of given name .", "Parses the query facet configurations.\n@param rangeFacetObject The JSON ...
public static base_responses update(nitro_service client, dbdbprofile resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { dbdbprofile updateresources[] = new dbdbprofile[resources.length]; for (int i=0;i<resources.length;i++){ updateresources[i] =...
[ "Use this API to update dbdbprofile resources." ]
[ "Obtains a Julian local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Julian local date-time, not null\n@throws DateTimeException if unable to create the date-time", "Returns an identity matrix", "Queries a Search Index and returns ungrouped ...
public static int color(ColorHolder colorHolder, Context ctx) { if (colorHolder == null) { return 0; } else { return colorHolder.color(ctx); } }
[ "a small static helper class to get the color from the colorHolder\n\n@param colorHolder\n@param ctx\n@return" ]
[ "Use this API to fetch clusternodegroup_binding resource of given name .", "Establish connection to the ChromeCast device", "Removes a design document using DesignDocument object from the database.\n\n@param designDocument the design document object to be removed\n@return {@link DesignDocument}", "compute Cos...
private void registerColumns() { for (int i = 0; i < cols.length; i++) { DJCrosstabColumn crosstabColumn = cols[i]; JRDesignCrosstabColumnGroup ctColGroup = new JRDesignCrosstabColumnGroup(); ctColGroup.setName(crosstabColumn.getProperty().getProperty()); ctColGroup.setHeight(crosstabColumn.getHeaderHeig...
[ "Registers the Columngroup Buckets and creates the header cell for the columns" ]
[ "A convenience method for creating an immutable sorted map.\n\n@param self a SortedMap\n@return an immutable SortedMap\n@see java.util.Collections#unmodifiableSortedMap(java.util.SortedMap)\n@since 1.0", "Add an individual class to the map file.\n\n@param loader jar file class loader\n@param jarEntry jar file ent...
public List<Gallery> getList(String userId, int perPage, int page) throws FlickrException { Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("method", METHOD_GET_LIST); parameters.put("user_id", userId); if (perPage > 0) { parameters.put("pe...
[ "Return the list of galleries created by a user. Sorted from newest to oldest.\n\n@param userId\nThe user you want to check for\n@param perPage\nNumber of galleries per page\n@param page\nThe page number\n@return gallery\n@throws FlickrException\n\n@see <a hrerf=\"http://www.flickr.com/services/api/flickr.galleries...
[ "Merges this with the list of sections to produce the smallest array of sequential block subnets, going from smallest to largest\n\n@param sections the sections to merge with this\n@return", "Resolve the single type argument of the given generic interface against the given\ntarget method which is assumed to retur...
public synchronized void start() throws Exception { if (state == State.RUNNING) { LOG.debug("Ignore start() call on HTTP service {} since it has already been started.", serviceName); return; } if (state != State.NOT_STARTED) { if (state == State.STOPPED) { throw new IllegalStateExc...
[ "Starts the HTTP service.\n\n@throws Exception if the service failed to started" ]
[ "A specific, existing custom field can be deleted by making a DELETE request on the URL for that custom field.\n\nReturns an empty data record.\n\n@param customField Globally unique identifier for the custom field.\n@return Request object", "Curries a function that takes three arguments.\n\n@param function\nthe ...
public Dataset<String, String> getDataset(Dataset<String, String> oldData, Index<String> goodFeatures) { //public Dataset getDataset(List data, Collection goodFeatures) { //makeAnswerArraysAndTagIndex(data); int[][] oldDataArray = oldData.getDataArray(); int[] oldLabelArray = oldData.getLabelsArra...
[ "Build a Dataset from some data.\n\n@param oldData This {@link Dataset} represents data for which we which to\nsome features, specifically those features not in the {@link edu.stanford.nlp.util.Index}\ngoodFeatures.\n@param goodFeatures An {@link edu.stanford.nlp.util.Index} of features we wish to retain.\n@re...
[ "Get a loader that lists the files in the current path,\nand monitors changes.", "Checks if a property's type is valid to be included in the report.\n@param _property the property.\n@return true if the property is is of a valid type.", "Log a byte array as a hex dump.\n\n@param data byte array", "Joins the gi...
public static long readBytes(byte[] bytes, int offset, int numBytes) { int shift = 0; long value = 0; for(int i = offset + numBytes - 1; i >= offset; i--) { value |= (bytes[i] & 0xFFL) << shift; shift += 8; } return value; }
[ "Read the given number of bytes into a long\n\n@param bytes The byte array to read from\n@param offset The offset at which to begin reading\n@param numBytes The number of bytes to read\n@return The long value read" ]
[ "Join the Collection of Strings using the specified delimiter.\n\n@param s\nThe String collection\n@param delimiter\nThe delimiter String\n@return The joined String", "Returns the value of the matrix at the specified index of the 1D row major array.\n\n@see DMatrixRMaj#get(int)\n\n@param index The element's index...
public static base_responses unset(nitro_service client, onlinkipv6prefix resources[], String[] args) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { onlinkipv6prefix unsetresources[] = new onlinkipv6prefix[resources.length]; for (int i=0;i<resources.length;i...
[ "Use this API to unset the properties of onlinkipv6prefix resources.\nProperties that need to be unset are specified in args array." ]
[ "Checks if the given project exists or not.\n\n@param name project name\n@return true/false\n@throws IllegalArgumentException", "Reads characters until any 'end' character is encountered, ignoring\nescape sequences.\n\n@param out\nThe StringBuilder to write to.\n@param in\nThe Input String.\n@param start\nStartin...
public DbOrganization getOrganization(final String organizationId) { final DbOrganization dbOrganization = repositoryHandler.getOrganization(organizationId); if(dbOrganization == null){ throw new WebApplicationException(Response.status(Response.Status.NOT_FOUND) .entity(...
[ "Returns an Organization\n\n@param organizationId String\n@return DbOrganization" ]
[ "Returns the raw class of the given type.", "Removes a design document using DesignDocument object from the database.\n\n@param designDocument the design document object to be removed\n@return {@link DesignDocument}", "Creates the string mappings.\n\n@param mtasTokenIdFactory\nthe mtas token id factory\n@param ...
@Override public Trajectory subList(int fromIndex, int toIndex) { Trajectory t = new Trajectory(dimension); for(int i = fromIndex; i < toIndex; i++){ t.add(this.get(i)); } return t; }
[ "Generates a sub-trajectory" ]
[ "Binds the Identities Primary key values to the statement.", "Start a server.\n\n@return the http server\n@throws Exception the exception", "Returns the index of the segment containing the first byte outside the network prefix.\nWhen networkPrefixLength is null, or it matches or exceeds the bit length, returns ...
public Optional<URL> getServiceUrl() { Optional<Service> optionalService = client.services().inNamespace(namespace) .list().getItems() .stream() .findFirst(); return optionalService .map(this::createUrlForService) .orElse(Optional.empty()); ...
[ "Gets the URL of the first service that have been created during the current session.\n\n@return URL of the first service." ]
[ "A specific, existing task can be deleted by making a DELETE request on the\nURL for that task. Deleted tasks go into the \"trash\" of the user making\nthe delete request. Tasks can be recovered from the trash within a period\nof 30 days; afterward they are completely removed from the system.\n\nReturns an empty da...
protected void concatenateReports() { if (!concatenatedReports.isEmpty()) { // dummy group for page break if needed DJGroup globalGroup = createDummyGroup(); report.getColumnsGroups().add(0, globalGroup); } for (Subreport subreport : concatenatedReports) { D...
[ "Create dummy groups for each concatenated report, and in the footer of\neach group adds the subreport." ]
[ "Seeks to the given season within the given year\n\n@param seasonString\n@param yearString", "Inserts a new instance but references via the outIdentifier, which is returned as part of the ExecutionResults\nThe outIdentifier can be null.\nThe entryPoint, which can also be null, specifies the entrypoint the object ...
public void set( T a ) { if( a.getType() == getType() ) mat.set(a.getMatrix()); else { setMatrix(a.mat.copy()); } }
[ "Sets the elements in this matrix to be equal to the elements in the passed in matrix.\nBoth matrix must have the same dimension.\n\n@param a The matrix whose value this matrix is being set to." ]
[ "Gets Widget layout dimension\n@param axis The {@linkplain Layout.Axis axis} to obtain layout size for\n@return dimension", "Gets the index input list.\n\n@return the index input list", "Stops all servers.\n\n{@inheritDoc}", "Create a SVG graphic with the give dimensions.\n\n@param size The size of the SVG gr...
public boolean canBeLinked(D declaration, ServiceReference<S> declarationBinderRef) { // Evaluate the target filter of the ImporterService on the Declaration Filter filter = bindersManager.getTargetFilter(declarationBinderRef); return filter.matches(declaration.getMetadata()); }
[ "Return true if the Declaration can be linked to the ImporterService.\n\n@param declaration The Declaration\n@param declarationBinderRef The ServiceReference<ImporterService> of the ImporterService\n@return true if the Declaration can be linked to the ImporterService" ]
[ "Return a product descriptor for a specific strike.\n\n@param referenceDate The reference date (translating the maturity floating point date to dates.\n@param index The index corresponding to the strike grid.\n@return a product descriptor for a specific strike.\n@throws ArrayIndexOutOfBoundsException Thrown if inde...
public BoxFile.Info getFileInfo(String fileID) { URL url = FILE_INFO_URL_TEMPLATE.build(this.api.getBaseURL(), fileID); BoxAPIRequest request = new BoxAPIRequest(this.api, url, "GET"); BoxJSONResponse response = (BoxJSONResponse) request.send(); JsonObject jsonObject = JsonObject.readFro...
[ "Gets information about a trashed file.\n@param fileID the ID of the trashed file.\n@return info about the trashed file." ]
[ "Launches the client with the specified parameters.\n\n@param args\ncommand line parameters\n@throws ParseException\n@throws IOException", "Clone layer information considering what may be copied to the client.\n\n@param original layer info\n@return cloned copy including only allowed information", "Initialize al...
public static void closeMASCaseManager(File caseManager) { FileWriter caseManagerWriter; try { caseManagerWriter = new FileWriter(caseManager, true); caseManagerWriter.write("}\n"); caseManagerWriter.flush(); caseManagerWriter.close(); } catch (IO...
[ "Method to close the file caseManager. It is called just one time, by the\nMASReader, once every test and stroy have been added.\n\n@param caseManager" ]
[ "Returns the adapter position of the Child associated with this ChildViewHolder\n\n@return The adapter position of the Child if it still exists in the adapter.\nRecyclerView.NO_POSITION if item has been removed from the adapter,\nRecyclerView.Adapter.notifyDataSetChanged() has been called after the last\nlayout pas...
public static DoubleMatrix cholesky(DoubleMatrix A) { DoubleMatrix result = A.dup(); int info = NativeBlas.dpotrf('U', A.rows, result.data, 0, A.rows); if (info < 0) { throw new LapackArgumentException("DPOTRF", -info); } else if (info > 0) { throw new LapackPositivityExcepti...
[ "Compute Cholesky decomposition of A\n\n@param A symmetric, positive definite matrix (only upper half is used)\n@return upper triangular matrix U such that A = U' * U" ]
[ "Add the list with given bundles to the \"Import-Package\" main attribute.\n\n@param importedPackages The list of all packages to add.", "required for rest assured base URI configuration.", "Use this API to fetch authenticationradiuspolicy_authenticationvserver_binding resources of given name .", "Starting wi...
public final int toChars(int[] src, int srcOff, int srcLen, char[] dest, int destOff) { if (srcLen < 0) { throw new IllegalArgumentException("srcLen must be >= 0"); } int written = 0; for (int i = 0; i < srcLen; ++i) { written += Character.toChars(src[srcOff + i], dest, destOff + written); ...
[ "Converts a sequence of unicode code points to a sequence of Java characters.\n\n@return the number of chars written to the destination buffer" ]
[ "Creates an internal project and repositories such as a token storage.", "Use this API to fetch tmsessionpolicy_binding resource of given name .", "Uncompresses the given textual content and writes it to the given file.\n\n@param file The file to write to\n@param compressedContent The content\n@thr...
public static Logger getLogger(String className) { if (logType == null) { logType = findLogType(); } return new Logger(logType.createLog(className)); }
[ "Return a logger associated with a particular class name." ]
[ "Checks the available space and sets max-height to the details field-set.", "Return true if the AST expression has not already been visited. If it is\nthe first visit, register the expression so that the next visit will return false.\n\n@param expression - the AST expression to check\n@return true if the AST expr...
public ClassDescriptor getSuperClassDescriptor() { if (!m_superCldSet) { if(getBaseClass() != null) { m_superCld = getRepository().getDescriptorFor(getBaseClass()); if(m_superCld.isAbstract() || m_superCld.isInterface()) ...
[ "Answers the ClassDescriptor referenced by 'super' ReferenceDescriptor.\n@return ClassDescriptor or null" ]
[ "Sets the maximum time to wait before a call to getConnection is timed out.\n\nSetting this to zero is similar to setting it to Long.MAX_VALUE\n\n@param connectionTimeout\n@param timeUnit the unit of the connectionTimeout argument", "Removes a tag from the resource.\n@param key the key of the tag to remove\n@retu...
public void translateRectangle(Rectangle rect, float dx, float dy) { float width = rect.getWidth(); float height = rect.getHeight(); rect.setLeft(rect.getLeft() + dx); rect.setBottom(rect.getBottom() + dy); rect.setRight(rect.getLeft() + dx + width); rect.setTop(rect.getBottom() + dy + height); }
[ "Translate this rectangle over the specified following distances.\n\n@param rect rectangle to move\n@param dx delta x\n@param dy delta y" ]
[ "This method performs database modification at the very and of transaction.", "Add the string representation of the given object to this sequence immediately. That is, all the trailing\nwhitespace of this sequence will be ignored and the string is appended directly after the last segment that\ncontains something ...
public static void forceDelete(final Path path) throws IOException { if (!java.nio.file.Files.isDirectory(path)) { java.nio.file.Files.delete(path); } else { java.nio.file.Files.walkFileTree(path, DeleteDirVisitor.getInstance()); } }
[ "Deletes a path from the filesystem\n\nIf the path is a directory its contents\nwill be recursively deleted before it itself\nis deleted.\n\nNote that removal of a directory is not an atomic-operation\nand so if an error occurs during removal, some of the directories\ndescendants may have already been removed\n\n@t...
[ "Returns a list of your geo-tagged photos.\n\nThis method requires authentication with 'read' permission.\n\n@param minUploadDate\nMinimum upload date. Photos with an upload date greater than or equal to this value will be returned. Set to null to not specify a date.\n@param maxUploadDate\nMaximum upload date. Phot...
public int getRegisteredResourceRequestCount(K key) { if(requestQueueMap.containsKey(key)) { Queue<AsyncResourceRequest<V>> requestQueue = getRequestQueueForExistingKey(key); // FYI: .size() is not constant time in the next call. ;) if(requestQueue != null) { ...
[ "Count the number of queued resource requests for a specific pool.\n\n@param key The key\n@return The count of queued resource requests. Returns 0 if no queue\nexists for given key." ]
[ "New SOAP client uses new SOAP service.", "Throws one RendererException if the content parent or layoutInflater are null.", "send object to client and serialize it using JSON\n\n@param objectToSend the object to send\n@param cb the callback after sending the message", "Loads the file content in the propertie...
public static <T> void write(BufferedWriter writer, DatabaseTableConfig<T> config) throws SQLException { try { writeConfig(writer, config); } catch (IOException e) { throw SqlExceptionUtil.create("Could not write config to writer", e); } }
[ "Write the table configuration to a buffered writer." ]
[ "Fetch the specified expression from the cache or create it if necessary.\n\n@param expressionString the expression string\n@return the expression\n@throws ParseException oops", "Checks to see within the flags if a reload, i.e. not a full restart, is required.\n\n@param flags the flags to check\n\n@return {@code ...
public static base_response update(nitro_service client, dbdbprofile resource) throws Exception { dbdbprofile updateresource = new dbdbprofile(); updateresource.name = resource.name; updateresource.interpretquery = resource.interpretquery; updateresource.stickiness = resource.stickiness; updateresource.kcdacc...
[ "Use this API to update dbdbprofile." ]
[ "Select a List of values from a Matcher using a Collection\nto identify the indices to be selected.\n\n@param self a Matcher\n@param indices a Collection of indices\n@return a String of the values at the given indices\n@since 1.6.0", "Process a module or bundle root.\n\n@param root the root\n@param layers th...
public static void load(File file) { try(FileInputStream inputStream = new FileInputStream(file)) { LineIterator it = IOUtils.lineIterator(inputStream, "UTF-8"); while (it.hasNext()) { String line = it.next(); if (!line.startsWith("...
[ "Load the given configuration file." ]
[ "Add the line to the content\n\n@param bufferedFileReader The file reader\n@param content The content of the file\n@param line The current read line\n@throws IOException", "Add a text symbolizer definition to the rule.\n\n@param styleJson The old style.", "Register the entity as batch l...
public void bootstrap() throws Exception { final HostRunningModeControl runningModeControl = environment.getRunningModeControl(); final ControlledProcessState processState = new ControlledProcessState(true); shutdownHook.setControlledProcessState(processState); ServiceTarget target = ser...
[ "Start the host controller services.\n\n@throws Exception" ]
[ "Get the Attribute metadata for an MBean by name.\n@return the {@link Map} of {@link String} attribute names to {@link MBeanAttributeInfo} values.", "Determines the number bytes required to store a variable length\n\n@param i length of Bytes\n@return number of bytes needed", "Returns all known Java installation...
public static void endRequest() { final List<RequestScopedItem> result = CACHE.get(); if (result != null) { CACHE.remove(); for (final RequestScopedItem item : result) { item.invalidate(); } } }
[ "ends the request and clears the cache. This can be called before the request is over,\nin which case the cache will be unavailable for the rest of the request." ]
[ "If the specified value is not greater than or equal to the specified minimum and\nless than or equal to the specified maximum, adjust it so that it is.\n@param value The value to check.\n@param min The minimum permitted value.\n@param max The maximum permitted value.\n@return {@code value} if it is between the spe...
private void merge(Integer cid1, Integer cid2) { Collection<String> klass1 = classix.get(cid1); Collection<String> klass2 = classix.get(cid2); // if klass1 is the smaller, swap the two if (klass1.size() < klass2.size()) { Collection<String> tmp = klass2; klass2 = klass1; klass1 = tmp;...
[ "Merges the two classes into a single class. The smaller class is\nremoved, while the largest class is kept." ]
[ "Remove a part of a CharSequence by replacing the first occurrence\nof target within self with '' and returns the result.\n\n@param self a CharSequence\n@param target an object representing the part to remove\n@return a String containing the original minus the part to be removed\n@see #minus(String, Object)\n@sin...
@JsonProperty("labels") @JsonInclude(Include.NON_EMPTY) public Map<String, TermImpl> getLabelUpdates() { return getMonolingualUpdatedValues(newLabels); }
[ "Label accessor provided for JSON serialization only." ]
[ "Returns a valid DisplayMetrics object\n\n@param context valid context\n@return DisplayMetrics object", "Reads Phoenix resource assignments.\n\n@param mpxjResource MPXJ resource\n@param res Phoenix resource", "Consumes the next character in the request, checking that it matches the\nexpected one. This method sh...
public int size() { int size = cleared ? 0 : snapshot.size(); for ( Map.Entry<RowKey,AssociationOperation> op : currentState.entrySet() ) { switch ( op.getValue().getType() ) { case PUT: if ( cleared || !snapshot.containsKey( op.getKey() ) ) { size++; } break; case REMOVE: if ( ...
[ "Returns the number of rows within this association.\n\n@return the number of rows within this association" ]
[ "Add another store destination to an existing streaming session\n\n\n@param store the name of the store to stream to", "Summarizes balance for the given nodeId to PartitionCount.\n\n@param nodeIdToPartitionCount\n@param title for use in pretty string\n@return Pair: getFirst() is utility value to be minimized, get...
public static Integer convertOverrideIdentifier(String overrideIdentifier) throws Exception { Integer overrideId = -1; try { // there is an issue with parseInt where it does not parse negative values correctly boolean isNegative = false; if (overrideIdentifier.starts...
[ "Obtain override ID\n\n@param overrideIdentifier can be the override ID or class name\n@return\n@throws Exception" ]
[ "Moves the cursor to the given row number in the iterator. If the row\nnumber is positive, the cursor moves to the given row number with\nrespect to the beginning of the iterator. The first row is row 1, the\nsecond is row 2, and so on.\n\n@param row the row to move to in this iterator, by absolute number", "Add...
private void writeMap(String fieldName, Object value) throws IOException { @SuppressWarnings("unchecked") Map<String, Object> map = (Map<String, Object>) value; m_writer.writeStartObject(fieldName); for (Map.Entry<String, Object> entry : map.entrySet()) { Object entryValue = en...
[ "Write a map field to the JSON file.\n\n@param fieldName field name\n@param value field value" ]
[ "Remove the S3 file that contains the domain controller data.\n\n@param directoryName the name of the directory that contains the S3 file", "Finish configuration.", "Use this API to fetch all the gslbrunningconfig resources that are configured on netscaler.", "Issue the database statements to drop the table a...
public static base_response create(nitro_service client, sslfipskey resource) throws Exception { sslfipskey createresource = new sslfipskey(); createresource.fipskeyname = resource.fipskeyname; createresource.modulus = resource.modulus; createresource.exponent = resource.exponent; return createresource.perfor...
[ "Use this API to create sslfipskey." ]
[ "Remove an read lock.", "Hides the original Java-style method name using an attribute\nwhich should be respected by Visual Studio, the creates a new\nwrapper method using a .Net style method name.\n\nNote that this does not work for VB as it is case insensitive. Even\nthough Visual Studio won't show you the Java-...
public CollectionDescriptor getCollectionDescriptorByName(String name) { if (name == null) { return null; } CollectionDescriptor cod = (CollectionDescriptor) getCollectionDescriptorNameMap().get(name); // // BRJ: if the CollectionDescriptor is...
[ "Get an CollectionDescriptor by name BRJ\n@param name\n@return CollectionDescriptor or null" ]
[ "Starts the scavenger.", "Set the occurrences. If the String is invalid, the occurrences will be set to \"-1\" to cause server-side validation to fail.\n@param occurrences the interval to set.", "Get public photos from the user's contacts.\n\nThis method does not require authentication.\n\n@see com.flickr4java....
private List<File> getConfigFiles() { String[] filenames = { "opencms-modules.xml", "opencms-system.xml", "opencms-vfs.xml", "opencms-importexport.xml", "opencms-sites.xml", "opencms-variables.xml", "opencms-scheduler.xml", ...
[ "Gets existing config files.\n\n@return the existing config files" ]
[ "Populates the project header.\n\n@param record MPX record\n@param properties project properties\n@throws MPXJException", "Gets the date time str standard.\n\n@param d\nthe d\n@return the date time str standard", "Adds OPT_N | OPT_NODE option to OptionParser, with multiple arguments.\n\n@param parser OptionPars...
public static List<Sentence> splitSentences(CharSequence text) { return JavaConversions.seqAsJavaList( TwitterKoreanProcessor.splitSentences(text) ); }
[ "Split input text into sentences.\n\n@param text Input text.\n@return List of Sentence objects." ]
[ "Use this API to add authenticationradiusaction resources.", "Throws an exception if at least one results directory is missing.", "Add a column to be set to a value for UPDATE statements. This will generate something like 'columnName =\nexpression' where the expression is built by the caller.\n\n<p>\nThe expres...
protected final String computeId( final ITemplateContext context, final IProcessableElementTag tag, final String name, final boolean sequence) { String id = tag.getAttributeValue(this.idAttributeDefinition.getAttributeName()); if (!org.thymeleaf.util.StringUtils.isEm...
[ "This method is designed to be called from the diverse subclasses" ]
[ "Select this tab item.", "The location for this elevation.\n\n@return", "This method allows a predecessor relationship to be added to this\ntask instance.\n\n@param targetTask the predecessor task\n@param type relation type\n@param lag relation lag\n@return relationship", "Use this API to add tmtrafficaction....
public static String fancyStringF(double value, DecimalFormat format, int length, int significant) { String formatted = fancyString(value, format, length, significant); int n = length-formatted.length(); if( n > 0 ) { StringBuilder builder = new StringBuilder(n); for (i...
[ "Fixed length fancy formatting for doubles. If possible decimal notation is used. If all the significant digits\ncan't be shown then it will switch to exponential notation. If not all the space is needed then it will\nbe filled in to ensure it has the specified length.\n\n@param value value being formatted\n@param...
[ "Checks all data sets in IIM records 1, 2 and 3 for constraint violations.\n\n@return list of constraint violations, empty set if IIM file is valid", "Sets the value for the API's \"sitefilter\" parameter based on the current\nsettings.\n\n@param properties\ncurrent setting of parameters", "Use this API to upda...
public PartialCollection<BoxItem.Info> getChildrenRange(long offset, long limit, String... fields) { QueryStringBuilder builder = new QueryStringBuilder() .appendParam("limit", limit) .appendParam("offset", offset); if (fields.length > 0) { builder.appendPara...
[ "Retrieves a specific range of child items in this folder.\n\n@param offset the index of the first child item to retrieve.\n@param limit the maximum number of children to retrieve after the offset.\n@param fields the fields to retrieve.\n@return a partial collection containing the specified range of child items." ...
[ "Get a collection of methods declared on this object by method name.\n\n@param name the name of the method\n@return the (possibly empty) collection of methods with the given name", "Convert an Object to a Timestamp, without an Exception", "Convert this object to a json array.", "Adds a new Site matcher object...
public void set(int index, T object) { synchronized (mLock) { if (mOriginalValues != null) { mOriginalValues.set(index, object); } else { mObjects.set(index, object); } } if (mNotifyOnChange) notifyDataSetChanged(); }
[ "set the specified object at index\n\n@param object The object to add at the end of the array." ]
[ "Get all backup data\n\n@param model\n@return\n@throws Exception", "Performs the update to the persistent configuration model. This default implementation simply removes\nthe targeted resource.\n\n@param context the operation context\n@param operation the operation\n@throws OperationFailedException if there is a...
@SuppressWarnings({"WeakerAccess", "unused"}) // For library users public void registerWidget(View widget) { prepareWidget(widget); if (widget instanceof AlgoliaResultsListener) { AlgoliaResultsListener listener = (AlgoliaResultsListener) widget; if (!this.resultListeners.co...
[ "Links the given widget to InstantSearch according to the interfaces it implements.\n\n@param widget a widget implementing ({@link AlgoliaResultsListener} || {@link AlgoliaErrorListener} || {@link AlgoliaSearcherListener})." ]
[ "Returns the index of a key in the set.\n\n@param key The key to search for.\n@return Returns the index of the key if it exists, else a negative integer.", "Use this API to clear gslbldnsentries resources.", "Process TestCaseFinishedEvent. Add steps and attachments from\ntop step from stepStorage to current tes...
private int getDaysInRange(Date startDate, Date endDate) { int result; Calendar cal = DateHelper.popCalendar(endDate); int endDateYear = cal.get(Calendar.YEAR); int endDateDayOfYear = cal.get(Calendar.DAY_OF_YEAR); cal.setTime(startDate); if (endDateYear == cal.get(Calendar.YEAR...
[ "This method calculates the absolute number of days between two dates.\nNote that where two date objects are provided that fall on the same\nday, this method will return one not zero. Note also that this method\nassumes that the dates are passed in the correct order, i.e.\nstartDate < endDate.\n\n@param startDate S...
[ "Read a four byte integer.\n\n@param data byte array\n@param offset offset into array\n@return integer value", "Gets the prefix from value.\n\n@param value the value\n@return the prefix from value", "Retrieve the number of minutes per week for this calendar.\n\n@return minutes per week", "Retrieves the conten...
void applyFreshParticleOffScreen( @NonNull final Scene scene, final int position) { final int w = scene.getWidth(); final int h = scene.getHeight(); if (w == 0 || h == 0) { throw new IllegalStateException( "Cannot generate particles if scen...
[ "Set new particle coordinates somewhere off screen and apply new direction towards the screen\n\n@param position the particle position to apply new values to" ]
[ "If this represents an ip address, returns that address.\nIf this represents a host, returns the resolved ip address of that host.\nOtherwise, returns null, but only for strings that are considered valid address strings but cannot be converted to address objects.\n\nThis method will throw exceptions for invalid for...
public void build(double[] coords, int nump) throws IllegalArgumentException { if (nump < 4) { throw new IllegalArgumentException("Less than four input points specified"); } if (coords.length / 3 < nump) { throw new IllegalArgumentException("Coordinate array too small for...
[ "Constructs the convex hull of a set of points whose coordinates are given\nby an array of doubles.\n\n@param coords\nx, y, and z coordinates of each input point. The length of\nthis array must be at least three times <code>nump</code>.\n@param nump\nnumber of input points\n@throws IllegalArgumentException\nthe num...
[ "Whether the specified JavaBeans property exists on the given type or not.\n\n@param clazz the type of interest\n@param property the JavaBeans property name\n@param elementType the element type to check, must be either {@link ElementType#FIELD} or\n{@link ElementType#METHOD}.\n@return {@code true} if the specified ...
public void clear() { Class collClass = getCollectionClass(); // ECER: assure we notify all objects being removed, // necessary for RemovalAwareCollections... if (IRemovalAwareCollection.class.isAssignableFrom(collClass)) { getData().clear(); } ...
[ "Clears the proxy. A cleared proxy is defined as loaded\n\n@see Collection#clear()" ]
[ "Add statistics about sent emails.\n\n@param recipients The list of recipients.\n@param storageUsed If a remote storage was used.", "Creates a single property declaration.\n@param property Property name.\n@param term Property value.\n@return The resulting declaration.", "Build call for getCharactersCharacterIdS...
public static base_response add(nitro_service client, dnsaaaarec resource) throws Exception { dnsaaaarec addresource = new dnsaaaarec(); addresource.hostname = resource.hostname; addresource.ipv6address = resource.ipv6address; addresource.ttl = resource.ttl; return addresource.add_resource(client); }
[ "Use this API to add dnsaaaarec." ]
[ "defines the KEY in the parent report parameters map where to get the subreport parameters map.\n@param path where to get the parameter map for the subrerpot.\n@return", "Initialize the various DAO configurations after the various setters have been called.", "Retrieve a UUID in the form required by Primavera PM...
public static Cluster balanceContiguousPartitionsPerZone(final Cluster nextCandidateCluster, final int maxContiguousPartitionsPerZone) { System.out.println("Balance number of contiguous partitions within a zone."); System.out.println("numPartiti...
[ "Ensures that no more than maxContiguousPartitionsPerZone partitions are\ncontiguous within a single zone.\n\nMoves the necessary partitions to break up contiguous runs from each zone\nto some other random zone/node. There is some chance that such random\nmoves could result in contiguous partitions in other zones.\...
[ "Returns the user defined field without its prefix.\n\n@param field the name of the user defined field\n@return the user defined field without the prefix, or null if the fields\ndoesn't apply to this control file.\n@since 1.1", "return a prepared Insert Statement fitting for the given ClassDescriptor", "Shortcu...
public List<ChannelInfo> getChannels(String connectionName) { final URI uri = uriWithPath("./connections/" + encodePathSegment(connectionName) + "/channels/"); return Arrays.asList(this.rt.getForObject(uri, ChannelInfo[].class)); }
[ "Retrieves state and metrics information for all channels on individual connection.\n@param connectionName the connection name to retrieve channels\n@return list of channels on the connection" ]
[ "return a prepared Insert Statement fitting for the given ClassDescriptor", "Generate the init script from the Artifactory URL.\n\n@return The generated script.", "Helper method that searches an object array for the occurence of a\nspecific object based on reference equality\n@param searchFor the object to sear...
private Object filterValue(Object value) { if (value instanceof Boolean && !((Boolean) value).booleanValue()) { value = null; } if (value instanceof String && ((String) value).isEmpty()) { value = null; } if (value instanceof Double && ((Double) value).doub...
[ "Replace default values will null, allowing them to be ignored.\n\n@param value value to test\n@return filtered value" ]
[ "Escapes args' string values according to format\n\n@param format the Format used by the PrintStream\n@param args the array of args to escape\n@return The cloned and escaped array of args", "Answer a List of InCriteria based on values, each InCriteria\ncontains only inLimit values\n@param attribute\n@param values...
public String getAccuracyDescription(int numDigits) { NumberFormat nf = NumberFormat.getNumberInstance(); nf.setMaximumFractionDigits(numDigits); Triple<Double, Integer, Integer> accu = getAccuracyInfo(); return nf.format(accu.first()) + " (" + accu.second() + "/" + (accu.second() + accu.third()) +...
[ "Returns a String summarizing overall accuracy that will print nicely." ]
[ "Ignore some element from the AST\n\n@param element\n@return", "Convert a date to the String representation we use in the JSON.\n@param d the date to convert\n@return the String representation we use in the JSON.", "a small static helper to set the image from the imageHolder nullSave to the imageView\n\n@param ...
@SuppressWarnings("unchecked") public Map<String, Object> getCustomProperties() { return (Map<String, Object>) getCachedValue(ProjectField.CUSTOM_PROPERTIES); }
[ "Retrieve a map of custom document properties.\n\n@return the Document Summary Information Map" ]
[ "Sanity check precondition for above setters", "Acquire transaction with a single permit in a thread. Transactions are acquired reentrantly, i.e.\nwith respect to transactions already acquired in the thread.\n\n@return the number of acquired permits, identically equal to 1.", "Performs an efficient update of ea...
public List<BoxAPIResponse> execute(List<BoxAPIRequest> requests) { this.prepareRequest(requests); BoxJSONResponse batchResponse = (BoxJSONResponse) send(); return this.parseResponse(batchResponse); }
[ "Execute a set of API calls as batch request.\n@param requests list of api requests that has to be executed in batch.\n@return list of BoxAPIResponses" ]
[ "Validates aliases.\n\n@param uuid The structure id for which the aliases should be valid\n@param aliasPaths a map from id strings to alias paths\n@param callback the callback which should be called with the validation results", "set custom request for profile's default client\n\n@param profileName profileName to...
public static boolean isPunct(String s){ Pattern p = Pattern.compile("^[\\p{Punct}]+$"); Matcher m = p.matcher(s); return m.matches(); }
[ "Given a String the method uses Regex to check if the String only contains punctuation characters\n\n@param s a String to check using regex\n@return true if the String is valid" ]
[ "Use this API to fetch appfwprofile_cookieconsistency_binding resources of given name .", "Samples a batch of indices in the range [0, numExamples) without replacement.", "Execute a CLI command. This can be any command that you might execute on\nthe CLI command line, including both server-side operations and lo...
public double[] getTenors(double moneyness, double maturity) { int maturityInMonths = (int) Math.round(maturity * 12); int[] tenorsInMonths = getTenors(convertMoneyness(moneyness), maturityInMonths); double[] tenors = new double[tenorsInMonths.length]; for(int index = 0; index < tenors.length; index++) ...
[ "Return all valid tenors for a given moneyness and maturity.\nUses the payment times of the fix schedule to determine fractions.\n\n@param moneyness The moneyness as actual offset from par swap rate for which to get the maturities.\n@param maturity The maturities as year fraction from the reference date.\n@return T...
[ "a helper method to enable the keyboardUtil for a specific activity\nor disable it. note this will cause some frame drops because of the\nlistener.\n\n@param activity\n@param enable", "Checks if user exists.\n\n@param userId the user id, which can be an email or the login.\n@return true, if user exists.", "Copy...
public static OptionalString ofNullable(ResourceKey key, String value) { return new GenericOptionalString(RUNTIME_SOURCE, key, value); }
[ "Returns new instance of OptionalString with given key and value\n@param key key of the returned OptionalString\n@param value wrapped string\n@return given object wrapped in OptionalString with given key" ]
[ "Use this API to clear configuration on netscaler.\n@param force clear confirmation without prompting.\n@param level clear config according to the level. eg: basic, extended, full\n@return status of the operation performed.\n@throws Exception Nitro exception is thrown.", "Returns all the retention policies with s...
public static int getNavigationBarHeight(Context context) { Resources resources = context.getResources(); int id = resources.getIdentifier(context.getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT ? "navigation_bar_height" : "navigation_bar_height_landscape", "dimen", "...
[ "helper to calculate the navigationBar height\n\n@param context\n@return" ]
[ "Returns a long between interval\n@param min Minimum value\n@param max Maximum value\n@return long number", "Handles incoming Serial Messages. Serial messages can either be messages\nthat are a response to our own requests, or the stick asking us information.\n@param incomingMessage the incoming message to proces...
Map<Object, Object> getFilters() { Map<Object, Object> result = new HashMap<Object, Object>(4); result.put(TableProperty.KEY, m_table.getFilterFieldValue(TableProperty.KEY)); result.put(TableProperty.DEFAULT, m_table.getFilterFieldValue(TableProperty.DEFAULT)); result.put(TableProperty....
[ "Returns the currently set filters in a map column -> filter.\n\n@return the currently set filters in a map column -> filter." ]
[ "Re-initializes the shader texture used to fill in\nthe Circle upon drawing.", "Binding view holder with payloads is used to handle partial changes in item.", "Add resources to the tree.\n\n@param parentNode parent tree node\n@param file resource container", "Fancy print without a space added to positive numb...