query stringlengths 74 6.1k | positive listlengths 1 1 | negative listlengths 9 9 |
|---|---|---|
private String createMethodSignature(Method method)
{
StringBuilder sb = new StringBuilder();
sb.append("(");
for (Class<?> type : method.getParameterTypes())
{
sb.append(getTypeString(type));
}
sb.append(")");
Class<?> type = method.getReturnType();
if (type.... | [
"Creates a method signature.\n\n@param method Method instance\n@return method signature"
] | [
"Figures out the correct class loader to use for a proxy for a given bean",
"Authenticates the API connection for Box Developer Edition.",
"Read phases and activities from the Phoenix file to create the task hierarchy.\n\n@param phoenixProject all project data\n@param storepoint storepoint containing current pr... |
private void processActivities(Storepoint phoenixProject)
{
final AlphanumComparator comparator = new AlphanumComparator();
List<Activity> activities = phoenixProject.getActivities().getActivity();
Collections.sort(activities, new Comparator<Activity>()
{
@Override public int compare... | [
"Process the set of activities from the Phoenix file.\n\n@param phoenixProject project data"
] | [
"Use this API to disable clusterinstance resources of given names.",
"Returns all selected values of the list box, or empty array if none.\n\n@return the selected values of the list box",
"Sets the specified date attribute to the specified value.\n\n@param name name of the attribute\n@param value value of the a... |
public static double getRadiusToBoundedness(double D, int N, double timelag, double B){
double cov_area = a(N)*D*timelag;
double radius = Math.sqrt(cov_area/(4*B));
return radius;
} | [
"Calculates the radius to a given boundedness value\n@param D Diffusion coefficient\n@param N Number of steps\n@param timelag Timelag\n@param B Boundedeness\n@return Confinement radius"
] | [
"Updates the story and returns the full record for the updated story.\nOnly comment stories can have their text updated, and only comment stories and\nattachment stories can be pinned. Only one of `text` and `html_text` can be specified.\n\n@param story Globally unique identifier for the story.\n@return Request ob... |
public ScopedToken getLowerScopedToken(List<String> scopes, String resource) {
assert (scopes != null);
assert (scopes.size() > 0);
URL url = null;
try {
url = new URL(this.getTokenURL());
} catch (MalformedURLException e) {
assert false : "An invalid refr... | [
"Get a lower-scoped token restricted to a resource for the list of scopes that are passed.\n@param scopes the list of scopes to which the new token should be restricted for\n@param resource the resource for which the new token has to be obtained\n@return scopedToken which has access token and other details"
] | [
"Gets a SerialMessage with the MULTI INSTANCE GET command.\nReturns the number of instances for this command class.\n@param the command class to return the number of instances for.\n@return the serial message.",
"Adds the contents of a Java package to this JAR.\n\n@param clazz a class whose package we wish to ad... |
public AT_Row setPaddingRight(int paddingRight) {
if(this.hasCells()){
for(AT_Cell cell : this.getCells()){
cell.getContext().setPaddingRight(paddingRight);
}
}
return this;
} | [
"Sets the right padding for all cells in the row.\n@param paddingRight new padding, ignored if smaller than 0\n@return this to allow chaining"
] | [
"Request a scoped transactional token.\n@param accessToken application access token.\n@param scope scope of transactional token.\n@return a BoxAPIConnection which can be used to perform transactional requests.",
"Returns the number of consecutive leading one or zero bits.\nIf network is true, returns the number o... |
private void logColumn(FastTrackColumn column)
{
if (m_log != null)
{
m_log.println("TABLE: " + m_currentTable.getType());
m_log.println(column.toString());
m_log.flush();
}
} | [
"Log column data.\n\n@param column column data"
] | [
"Add authentication information for the given host\n@param host the host\n@param credentials the credentials\n@param authScheme the scheme for preemptive authentication (should be\n<code>null</code> if adding authentication for a proxy server)\n@param context the context in which the authentication information\nsho... |
static List<List<String>> handleNewLines( List<List<String>> tableModel ) {
List<List<String>> result = Lists.newArrayListWithExpectedSize( tableModel.size() );
for( List<String> row : tableModel ) {
if( hasNewline( row ) ) {
result.addAll( splitRow( row ) );
} e... | [
"Handles newlines by removing them and add new rows instead"
] | [
"Use this API to update Interface.",
"Returns iterable containing assignments for this single legal hold policy.\n@param fields the fields to retrieve.\n@return an iterable containing assignments for this single legal hold policy.",
"Add a list of enums to the options map\n@param key The key for the options map... |
private void putToSessionCache(Identity oid, CacheEntry entry, boolean onlyIfNew)
{
if(onlyIfNew)
{
// no synchronization needed, because session cache was used per broker instance
if(!sessionCache.containsKey(oid)) sessionCache.put(oid, entry);
}
else
... | [
"Put object to session cache.\n\n@param oid The {@link org.apache.ojb.broker.Identity} of the object to cache\n@param entry The {@link org.apache.ojb.broker.cache.ObjectCacheTwoLevelImpl.CacheEntry} of the object\n@param onlyIfNew Flag, if set <em>true</em> only new objects (not already in session cache) be cached.... | [
"Get the spatial object from the cache.\n\n@param key key to get object for\n@param type type of object which should be returned\n@return object for key or null if object does not exist or is a different type",
"Assigns retention policy with givenID to the folder.\n@param api the API connection to be used by the ... |
public static base_response unset(nitro_service client, Interface resource, String[] args) throws Exception{
Interface unsetresource = new Interface();
unsetresource.id = resource.id;
return unsetresource.unset_resource(client,args);
} | [
"Use this API to unset the properties of Interface resource.\nProperties that need to be unset are specified in args array."
] | [
"Returns the deployment names with the specified runtime names at the specified deploymentRootAddress.\n\n@param deploymentRootResource\n@param runtimeNames\n@return the deployment names with the specified runtime names at the specified deploymentRootAddress.",
"helper method to set the TranslucentNavigationFlag\... |
public void fetchUninitializedAttributes() {
for (String prefixedId : getPrefixedAttributeNames()) {
BeanIdentifier id = getNamingScheme().deprefix(prefixedId);
if (!beanStore.contains(id)) {
ContextualInstance<?> instance = (ContextualInstance<?>) getAttribute(prefixedId... | [
"Fetch all relevant attributes from the backing store and copy instances which are not present in the local bean store."
] | [
"Make a composite filter from the given sub-filters using AND to combine filters.",
"Creates a new undeploy description.\n\n@param deploymentDescription the deployment description to copy\n\n@return the description",
"Get a lower-scoped token restricted to a resource for the list of scopes that are passed.\n@pa... |
protected <T> Request doInvoke(ResponseReader responseReader,
String methodName, RpcStatsContext statsContext, String requestData,
AsyncCallback<T> callback) {
RequestBuilder rb = doPrepareRequestBuilderImpl(responseReader, methodName,
statsContext, requestData, callback);
try {
retu... | [
"Performs a remote service method invocation. This method is called by\ngenerated proxy classes.\n\n@param <T> return type for the AsyncCallback\n@param responseReader instance used to read the return value of the\ninvocation\n@param requestData payload that encodes the addressing and arguments of the\nRPC call\n@p... | [
"Add the given string to this sequence. The given indentation will be prepended to\neach line except the first one if the object has a multi-line string representation.\n\n@param str\nthe appended string.\n@param indentation\nthe indentation string that should be prepended. May not be <code>null</code>.\n@since 2.1... |
public void deleteModule(final String moduleId) {
final DbModule module = getModule(moduleId);
repositoryHandler.deleteModule(module.getId());
for (final String gavc : DataUtils.getAllArtifacts(module)) {
repositoryHandler.deleteArtifact(gavc);
}
} | [
"Delete a module\n\n@param moduleId String"
] | [
"Returns the integer value o the given belief",
"Import CountryList from RAW resource\n\n@param context Context\n@return CountryList",
"Create an IPv6 mixed address using the given ipv6 segments and using this address for the embedded IPv4 segments\n\n@param segs\n@return",
"Helper method to synchronously inv... |
public Archetype parse(String adl) {
try {
return parse(new StringReader(adl));
} catch (IOException e) {
// StringReader should never throw an IOException
throw new AssertionError(e);
}
} | [
"Parses an adl source into a differential archetype.\n\n@param adl contents of an adl source file\n@return parsed archetype\n@throws org.openehr.adl.parser.AdlParserException if an error occurred while parsing"
] | [
"This may cost twice what it would in the original Map because we have to find\nthe original value for this key.\n\n@param key key with which the specified value is to be associated.\n@param value value to be associated with the specified key.\n@return previous value associated with specified key, or <tt>null</tt... |
private static void addVersionInfo(byte[] grid, int size, int version) {
// TODO: Zint masks with 0x41 instead of 0x01; which is correct? https://sourceforge.net/p/zint/tickets/110/
long version_data = QR_ANNEX_D[version - 7];
for (int i = 0; i < 6; i++) {
grid[((size - 11) * size) +... | [
"Adds version information."
] | [
"Resolve the single type argument of the given generic interface against the given\ntarget method which is assumed to return the given interface or an implementation\nof it.\n@param method the target method to check the return type of\n@param genericIfc the generic interface or superclass to resolve the type argume... |
public static final Duration parseDuration(String value)
{
return value == null ? null : Duration.getInstance(Double.parseDouble(value), TimeUnit.DAYS);
} | [
"Parse a duration value.\n\n@param value duration value\n@return Duration instance"
] | [
"Gets the node list from string line seperate or space seperate.\n\n@param listStr\nthe list str\n@param removeDuplicate\nthe remove duplicate\n@return the node list from string line seperate or space seperate",
"Remove a partition from the node provided\n\n@param node The node from which we're removing the parti... |
public boolean add(long key) {
final int index = ((((int) (key >>> 32)) ^ ((int) (key))) & 0x7fffffff) % capacity;
final Entry entryOriginal = table[index];
for (Entry entry = entryOriginal; entry != null; entry = entry.next) {
if (entry.key == key) {
return false;
... | [
"Adds the given value to the set.\n\n@return true if the value was actually new"
] | [
"Write a standard CoNLL format output file.\n\n@param doc The document: A List of CoreLabel\n@param out Where to send the answers to",
"Finish a state transition from a notification.\n\n@param current\n@param next",
"Record the checkout queue length\n\n@param dest Destination of the socket to checkout. Will act... |
public static File guessKeyRingFile() throws FileNotFoundException {
final Collection<String> possibleLocations = getKnownPGPSecureRingLocations();
for (final String location : possibleLocations) {
final File candidate = new File(location);
if (candidate.exists()) {
... | [
"Tries to guess location of the user secure keyring using various\nheuristics.\n\n@return path to the keyring file\n@throws FileNotFoundException if no keyring file found"
] | [
"Ask the specified player for an Artist menu.\n\n@param slotReference the player and slot for which the menu is desired\n@param sortOrder the order in which responses should be sorted, 0 for default, see Section 6.11.1 of the\n<a href=\"https://github.com/Deep-Symmetry/dysentery/blob/master/doc/Analysis.pdf\">Packe... |
public void reportCompletion(NodeT completed) {
completed.setPreparer(true);
String dependency = completed.key();
for (String dependentKey : nodeTable.get(dependency).dependentKeys()) {
DAGNode<DataT, NodeT> dependent = nodeTable.get(dependentKey);
dependent.lock().lock()... | [
"Reports that a node is resolved hence other nodes depends on it can consume it.\n\n@param completed the node ready to be consumed"
] | [
"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",
"Get the class name without the package\n\n@param c The class name with package\n@return the class name without the package",
"Returns an attribute's ... |
public static <T, A extends Annotation> String getClassAnnotationValue(Class<T> classType, Class<A> annotationType, String attributeName) {
String value = null;
Annotation annotation = classType.getAnnotation(annotationType);
if (annotation != null) {
try {
value = (String) annotation.annotationType().getM... | [
"Get the value of a Annotation in a class declaration.\n@param classType\n@param annotationType\n@param attributeName\n@return the value of the annotation as String or null if something goes wrong"
] | [
"Invalidate layout setup.",
"Read the projects from a ConceptDraw PROJECT file as top level tasks.\n\n@param cdp ConceptDraw PROJECT file",
"Sets the delegate of the service, that gets notified of the\nstatus of message delivery.\n\nNote: This option has no effect when using non-blocking\nconnections.",
"Exec... |
public void sendEventsFromQueue() {
if (null == queue || stopSending) {
return;
}
LOG.fine("Scheduler called for sending events");
int packageSize = getEventsPerMessageCall();
while (!queue.isEmpty()) {
final List<Event> list = new ArrayList<Event>();
... | [
"Method will be executed asynchronously."
] | [
"Instantiates an instance of input Java shader class,\nwhich must be derived from GVRShader or GVRShaderTemplate.\n@param id Java class which implements shaders of this type.\n@param ctx GVRContext shader belongs to\n@return GVRShader subclass which implements this shader type",
"Get viewport size al... |
public static String createUnquotedConstant(String str) {
if (str == null || str.isEmpty()) {
return str;
}
if (str.startsWith("\"")) {
str = str.substring(1);
}
if (str.endsWith("\"")) {
str = str.substring(0,
s... | [
"Removes double-quotes from around a string\n@param str\n@return"
] | [
"Use this API to unset the properties of onlinkipv6prefix resources.\nProperties that need to be unset are specified in args array.",
"Get an extent aware Iterator based on the ReportQuery\n\n@param query\n@param cld\n@return OJBIterator",
"Unlock all files opened for writing.",
"Support the range subscript o... |
public int create(DatabaseConnection databaseConnection, T data, ObjectCache objectCache) throws SQLException {
if (mappedInsert == null) {
mappedInsert = MappedCreate.build(dao, tableInfo);
}
int result = mappedInsert.insert(databaseType, databaseConnection, data, objectCache);
if (dao != null && !localIsIn... | [
"Create a new entry in the database from an object."
] | [
"Returns the average event value in the current interval",
"Prepares the CmsObject for jumping to this favorite location, and returns the appropriate URL.\n\n@param cms the CmsObject to initialize for jumping to the favorite\n@return the link for the favorite location\n\n@throws CmsException if something goes wro... |
public void setVec3(String key, float x, float y, float z)
{
checkKeyIsUniform(key);
NativeLight.setVec3(getNative(), key, x, y, z);
} | [
"Set the value for a floating point vector of length 3.\n@param key name of uniform to set.\n@param x new X value\n@param y new Y value\n@param z new Z value\n@see #getVec3\n@see #getFloatVec(String)"
] | [
"This method is called from the task class each time an attribute\nis added, ensuring that all of the attributes present in each task\nrecord are present in the resource model.\n\n@param field field identifier",
"Adds an artifact to the module.\n\n<P>\nINFO: If the module is promoted, all added artifacts will be ... |
public final void info(Object pObject)
{
getLogger().log(FQCN, Level.INFO, pObject, null);
} | [
"generate a message for loglevel INFO\n\n@param pObject the message Object"
] | [
"Helper to get locale specific properties.\n\n@return the locale specific properties map.",
"Converts the text stream data to HTML form.\n\n@param content the content to convert\n@return the HTML version of the content",
"That is, of size 6, which become 8, since HashMaps are powers of 2. Still, it's half the ... |
public static final BigInteger printEarnedValueMethod(EarnedValueMethod value)
{
return (value == null ? BigInteger.valueOf(EarnedValueMethod.PERCENT_COMPLETE.getValue()) : BigInteger.valueOf(value.getValue()));
} | [
"Print an earned value method.\n\n@param value EarnedValueMethod instance\n@return earned value method value"
] | [
"Reads and consumes a number of characters from the underlying reader,\nfilling the byte array provided.\n\n@param holder A byte array which will be filled with bytes read from the underlying reader.\n@throws ProtocolException If a char can't be read into each array element.",
"Specifies the ARM resource id of th... |
public static String lookupIfEmpty( final String value,
final Map<String, String> props,
final String key ) {
return value != null ? value : props.get(key);
} | [
"Extracts value from map if given value is null.\n@param value current value\n@param props properties to extract value from\n@param key property name to extract\n@return initial value or value extracted from map"
] | [
"Resize the image passing the new height and width\n\n@param height\n@param width\n@return",
"Attemps to delete all provided segments from a log and returns how many it was able to",
"Given a method node, checks if we are calling a private method from an inner class.",
"Counts each property for which there is... |
public synchronized void removeControlPoint(ControlPoint controlPoint) {
if (controlPoint.decreaseReferenceCount() == 0) {
ControlPointIdentifier id = new ControlPointIdentifier(controlPoint.getDeployment(), controlPoint.getEntryPoint());
entryPoints.remove(id);
}
} | [
"Removes the specified entry point\n\n@param controlPoint The entry point"
] | [
"Validate that the Unique IDs for the entities in this container are valid for MS Project.\nIf they are not valid, i.e one or more of them are too large, renumber them.",
"Returns the device push token or null\n\n@param type com.clevertap.android.sdk.PushType (FCM or GCM)\n@return String device token or null\nNOT... |
public static <T> void finish(T query, long correlationId, EventBus bus, String... labels) {
for (String type : labels) {
RemoveLabelledQuery<T> next = finish(query, correlationId, type);
bus.post(next);
}
} | [
"Publish finish events for each of the specified query labels\n\n<pre>\n{@code\nLabelledEvents.start(\"get\", 1l, bus, \"typeA\", \"custom\");\ntry {\nreturn \"ok\";\n} finally {\nRequestEvents.finish(\"get\", 1l, bus, \"typeA\", \"custom\");\n}\n\n}\n</pre>\n\n\n@param query Completed query\n@param correlationId I... | [
"The type descriptor for a method node is a string containing the name of the method, its return type,\nand its parameter types in a canonical form. For simplicity, I'm using the format of a Java declaration\nwithout parameter names.\n\n@return the type descriptor",
"Load a model to attach to the avatar\n@param a... |
public static<A, B, C, Z> Function3<A, B, C, Z> lift(Func3<A, B, C, Z> f) {
return bridge.lift(f);
} | [
"Lift a Java Func3 to a Scala Function3\n\n@param f the function to lift\n\n@returns the Scala function"
] | [
"Converts Observable of list to Observable of Inner.\n@param innerList list to be converted.\n@param <InnerT> type of inner.\n@return Observable for list of inner.",
"If the column name is a dotted column, returns the first part.\nReturns null otherwise.\n\n@param column the column that might have a prefix\n@retu... |
public static rewriteglobal_binding get(nitro_service service) throws Exception{
rewriteglobal_binding obj = new rewriteglobal_binding();
rewriteglobal_binding response = (rewriteglobal_binding) obj.get_resource(service);
return response;
} | [
"Use this API to fetch a rewriteglobal_binding resource ."
] | [
"Create a new server group for a profile\n\n@param model\n@param profileId\n@return\n@throws Exception",
"Add columns to the tree.\n\n@param parentNode parent tree node\n@param table columns container",
"Notify listeners that the tree structure has changed.",
"Writes triples to determine the statements with t... |
public int blast(InputStream input, OutputStream output) throws IOException
{
m_input = input;
m_output = output;
int lit; /* true if literals are coded */
int dict; /* log2(dictionary size) - 6 */
int symbol; /* decoded symbol, extra bits for distance */
int len; /* length for c... | [
"Decode PKWare Compression Library stream.\n\nFormat notes:\n\n- First byte is 0 if literals are uncoded or 1 if they are coded. Second\nbyte is 4, 5, or 6 for the number of extra bits in the distance code.\nThis is the base-2 logarithm of the dictionary size minus six.\n\n- Compressed data is a combination of lit... | [
"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",
"Method to know if already exists one file with the same name in the same\nfolder\n\n... |
private TableAlias createTableAlias(String aTable, String aPath, String aUserAlias)
{
if (aUserAlias == null)
{
return createTableAlias(aTable, aPath);
}
else
{
return createTableAlias(aTable, aUserAlias + ALIAS_SEPARATOR + aPath);
}
} | [
"Create a TableAlias for path or userAlias\n@param aTable\n@param aPath\n@param aUserAlias\n@return TableAlias"
] | [
"Specify the time out of the session established at the server. The\nsession is kept alive by requests sent by this client object. If the\nsession is idle for a period of time that would timeout the session, the\nclient will send a PING request to keep the session alive.\n\n@param timeout timeout in milliseconds, m... |
public static void moveBandsElemnts(int yOffset, JRDesignBand band) {
if (band == null)
return;
for (JRChild jrChild : band.getChildren()) {
JRDesignElement elem = (JRDesignElement) jrChild;
elem.setY(elem.getY() + yOffset);
}
} | [
"Moves the elements contained in \"band\" in the Y axis \"yOffset\"\n@param yOffset\n@param band"
] | [
"Answer the SQL-Clause for a FieldCriteria\n\n@param c FieldCriteria\n@param cld ClassDescriptor",
"Writes the entire remaining contents of the buffer to the channel. May complete in one operation, but the\ndocumentation is vague, so this keeps going until we are sure.\n\n@param buffer the data to be written\n@pa... |
public boolean isUpToDate(final DbArtifact artifact) {
final List<String> versions = repoHandler.getArtifactVersions(artifact);
final String currentVersion = artifact.getVersion();
final String lastDevVersion = getLastVersion(versions);
final String lastReleaseVersion = getLastRelease(v... | [
"Check if the current version match the last release or the last snapshot one\n\n@param artifact\n@return boolean"
] | [
"Process TestCaseEvent. You can change current testCase context\nusing this method.\n\n@param event to process",
"Main method to start reading the plain text given by the client\n\n@param args\n, where arg[0] is Beast configuration file (beast.properties)\nand arg[1] is Logger configuration file (logger.propertie... |
@SuppressWarnings("unchecked")
public <T extends GVRComponent> ArrayList<T> getAllComponents(long type) {
ArrayList<T> list = new ArrayList<T>();
GVRComponent component = getComponent(type);
if (component != null)
list.add((T) component);
for (GVRSceneObject child : mChil... | [
"Get all components of a specific class from this scene object and its descendants.\n@param type component type (as returned from getComponentType())\n@return ArrayList of components with the specified class."
] | [
"Use this API to fetch dnsnsecrec resources of given names .",
"Construct a new instance.\n\n@return the new instance",
"Return the trimmed source line corresponding to the specified AST node\n\n@param node - the Groovy AST node",
"Use this API to add route6.",
"Sets the jdbcLevel. parse the string setting ... |
private static long scanForLocSig(FileChannel channel) throws IOException {
channel.position(0);
ByteBuffer bb = getByteBuffer(CHUNK_SIZE);
long end = channel.size();
while (channel.position() <= end) {
read(bb, channel);
int bufferPos = 0;
while (... | [
"Boyer Moore scan that proceeds forwards from the end of the file looking for the first LOCSIG"
] | [
"Lift a Java Func4 to a Scala Function4\n\n@param f the function to lift\n\n@returns the Scala function",
"Finds the Widget in hierarchy\n@param name Name of the child to find\n@return The named child {@link Widget} or {@code null} if not found.",
"Resets the generator state.",
"Returns true if the addon depe... |
static JDOClass getJDOClass(Class c)
{
JDOClass rc = null;
try
{
JavaModelFactory javaModelFactory = RuntimeJavaModelFactory.getInstance();
JavaModel javaModel = javaModelFactory.getJavaModel(c.getClassLoader());
JDOModel m = JDOModelFactoryImpl.getInstance().getJDOModel(javaModel);
rc = m.ge... | [
"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"
] | [
"Modify the meta-data for a photoset.\n\n@param photosetId\nThe photoset ID\n@param title\nA new title\n@param description\nA new description (can be null)\n@throws FlickrException",
"Get the collection of contacts for the calling user.\n\n@return The Collection of Contact objects",
"Returns the name of this al... |
public static Command newStartProcess(String processId,
Map<String, Object> parameters) {
return getCommandFactoryProvider().newStartProcess( processId,
parameters );
} | [
"Start a process using the given parameters.\n\n@param processId\n@param parameters\n@return"
] | [
"Record operation for async ops time\n\n@param dest Destination of the socket to connect to. Will actually record\nif null. Otherwise will call this on self and corresponding child\nwith this param null.\n@param opTimeUs The number of us for the op to finish",
"Helper method to check that we got the right size pa... |
protected Connection newConnectionFromDriverManager(JdbcConnectionDescriptor jcd)
throws LookupException
{
Connection retval = null;
// use JDBC DriverManager
final String driver = jcd.getDriver();
final String url = getDbURL(jcd);
try
{
... | [
"Returns a new created connection\n\n@param jcd the connection descriptor\n@return an instance of Connection from the drivermanager"
] | [
"Gets the top of thread-local shell stack, or null if it is empty.\n\n@return the top of the shell stack",
"Swaps two specified partitions.\n\nPair-wase partition swapping may be more prone to local minima than\nlarger perturbations. Could consider \"swapping\" a list of\n<nodeId/partitionId>. This would allow a ... |
private void createPropertyVfsBundleFiles() throws CmsIllegalArgumentException, CmsLoaderException, CmsException {
String bundleFileBasePath = m_sitepath + m_basename + "_";
for (Locale l : m_localizations.keySet()) {
CmsResource res = m_cms.createResource(
bundleFileBasePat... | [
"Creates all propertyvfsbundle files for the currently loaded translations.\nThe method is used to convert xmlvfsbundle files into propertyvfsbundle files.\n\n@throws CmsIllegalArgumentException thrown if resource creation fails.\n@throws CmsLoaderException thrown if the propertyvfsbundle type can't be read from th... | [
"Convert an object to a set of maps.\n\n@param mapper the object mapper\n@param source the source object\n@return set",
"Gets display duration for specified frame.\n\n@param n int index of frame.\n@return delay in milliseconds.",
"Adds listeners and reads from a file.\n\n@param reader reader for file type\n@par... |
public static int findVerticalOffset(JRDesignBand band) {
int finalHeight = 0;
if (band != null) {
for (JRChild jrChild : band.getChildren()) {
JRDesignElement element = (JRDesignElement) jrChild;
int currentHeight = element.getY() + element.getHeight();
if (currentHeight > finalHeight) finalHeight =... | [
"Finds \"Y\" coordinate value in which more elements could be added in the band\n@param band\n@return"
] | [
"Send a request to another handler internal to the server, getting back the response body and response code.\n\n@param request request to send to another handler.\n@return {@link InternalHttpResponse} containing the response code and body.",
"Returns an iterator over the items in the trash.\n@return an iterator o... |
public ValueContainer[] getCurrentLockingValues(Object o) throws PersistenceBrokerException
{
FieldDescriptor[] fields = getLockingFields();
ValueContainer[] result = new ValueContainer[fields.length];
for (int i = 0; i < result.length; i++)
{
result[i] = new ValueC... | [
"returns an Array with an Objects CURRENT locking VALUES , BRJ\n@throws PersistenceBrokerException if there is an erros accessing o field values"
] | [
"Read an int from an input stream.\n\n@param is input stream\n@return int value",
"Handles week day changes.\n@param event the change event.",
"Add a 'IS NOT NULL' clause so the column must not be null. '<>' NULL does not work.",
"Internal method that finds the matching enum for a configured field that ... |
@SuppressWarnings("unchecked")
public <T> T convertElement(ConversionContext context, Object source,
TypeReference<T> destinationType) throws ConverterException {
return (T) elementConverter.convert(context, source, destinationType);
} | [
"Convert element to another object given a parameterized type signature\n\n@param context\n@param destinationType\nthe destination type\n@param source\nthe source object\n\n@return the converted object\n@throws ConverterException\nif conversion failed"
] | [
"Use this API to rename a gslbservice resource.",
"Set the value for a floating point vector of length 4.\n@param key name of uniform to set.\n@param x new X value\n@param y new Y value\n@param z new Z value\n@param w new W value\n@see #getVec4\n@see #getFloatVec(String)",
"Joins the given ints using the given ... |
private String appendXmlEndingTag(String value) {
StringBuilder sb = new StringBuilder();
sb.append("</").append(value).append(">");
return sb.toString();
} | [
"Helper xml end tag writer\n\n@param value the output stream to use in writing"
] | [
"Use this API to fetch snmpuser resource of given name .",
"Returns a new index creation statement using the session's keyspace.\n\n@param keyspace the keyspace name\n@param table the table name\n@param name the index name\n@return a new index creation statement",
"Use this API to fetch all the dnspolicylabel r... |
public Resource addReference(Reference reference) {
Resource resource = this.rdfWriter.getUri(Vocabulary.getReferenceUri(reference));
this.referenceQueue.add(reference);
this.referenceSubjectQueue.add(resource);
return resource;
} | [
"Adds the given reference to the list of references that should still be\nserialized, and returns the RDF resource that will be used as a subject.\n\n@param reference\nthe reference to be serialized\n@return RDF resource that represents this reference"
] | [
"First reduce the Criteria to the normal disjunctive form, then\ncalculate the necessary tree of joined tables for each item, then group\nitems with the same tree of joined tables.",
"Returns an English label for a given datatype.\n\n@param datatype\nthe datatype to label\n@return the label",
"Retrieves a long ... |
private void checkForCycles(DefaultDirectedWeightedGraph<RuleProvider, DefaultEdge> graph)
{
CycleDetector<RuleProvider, DefaultEdge> cycleDetector = new CycleDetector<>(graph);
if (cycleDetector.detectCycles())
{
// if we have cycles, then try to throw an exception with some us... | [
"Use the jgrapht cycle checker to detect any cycles in the provided dependency graph."
] | [
"add a foreign key field ID",
"Performs the transformation.\n\n@return True if the file was modified.",
"Read, validate, and discard a single message, returning the next valid offset, and the\nmessage being validated\n\n@throws IOException any exception",
"Checks the given field descriptor.\n\n@param fieldDef... |
public static void setEnabled(Element element, boolean enabled) {
element.setPropertyBoolean("disabled", !enabled);
setStyleName(element, "disabled", !enabled);
} | [
"It's enough to just set the disabled attribute on the\nelement, but we want to also add a \"disabled\" class so that we can\nstyle it.\n\nAt some point we'll just be able to use .button:disabled,\nbut that doesn't work in IE8-"
] | [
"Use this API to fetch authenticationradiuspolicy_vpnvserver_binding resources of given name .",
"Populate the container, converting raw data into Java types.\n\n@param field custom field to which these values belong\n@param values raw value data\n@param descriptions raw description data",
"Sets the transformat... |
public ItemRequest<Team> removeUser(String team) {
String path = String.format("/teams/%s/removeUser", team);
return new ItemRequest<Team>(this, Team.class, path, "POST");
} | [
"The user to remove can be referenced by their globally unique user ID or their email address.\nRemoves the user from the specified team. Returns an empty data record.\n\n@param team Globally unique identifier for the team.\n@return Request object"
] | [
"Gets any previous versions of this file. Note that only users with premium accounts will be able to retrieve\nprevious versions of their files.\n\n@return a list of previous file versions.",
"URL-Decodes a given string using ISO-8859-1. No UnsupportedEncodingException to handle as it is dealt with in\nthis metho... |
private void init(AttributeSet attrs) {
inflate(getContext(), R.layout.intl_phone_input, this);
/**+
* Country spinner
*/
mCountrySpinner = (Spinner) findViewById(R.id.intl_phone_edit__country);
mCountrySpinnerAdapter = new CountrySpinnerAdapter(getContext());
... | [
"Init after constructor"
] | [
"Send the message using the JavaMail session defined in the message\n\n@param mimeMessage Message to send",
"set the textColor of the ColorHolder to a view\n\n@param view",
"With the QR algorithm it is possible for the found singular values to be negative. This\nmakes them all positive by multiplying it by a d... |
public ApiClient setHttpClient(OkHttpClient newHttpClient) {
if (!httpClient.equals(newHttpClient)) {
newHttpClient.networkInterceptors().addAll(httpClient.networkInterceptors());
httpClient.networkInterceptors().clear();
newHttpClient.interceptors().addAll(httpClient.interce... | [
"Set HTTP client\n\n@param httpClient\nAn instance of OkHttpClient\n@return Api Client"
] | [
"Returns the decoded string, in case it contains non us-ascii characters.\nReturns the same string if it doesn't or the passed value in case\nof an UnsupportedEncodingException.\n\n@param str string to be decoded\n@return the decoded string, in case it contains non us-ascii characters;\nor the same string if it doe... |
public static <T> Set<T> toSet(Iterable<T> items) {
Set<T> set = new HashSet<T>();
addAll(set, items);
return set;
} | [
"Create a set out of the items in the Iterable.\n\n@param <T>\nThe type of items in the Iterable.\n@param items\nThe items to be made into a set.\n@return A set consisting of the items from the Iterable."
] | [
"Transforms user name and icon size into the rfs image path.\n\n@param name the user name\n@param size IconSize to get icon for\n\n@return the path",
"persist decorator and than continue to children without touching the model",
"Create the actual patchable target.\n\n@param name the layer name\n@param layer... |
public void setAttributes(Object feature, Map<String, Attribute> attributes) throws LayerException {
for (Map.Entry<String, Attribute> entry : attributes.entrySet()) {
String name = entry.getKey();
if (!name.equals(getGeometryAttributeName())) {
asFeature(feature).setAttribute(name, entry.getValue());
}
... | [
"Set the attributes of a feature.\n\n@param feature the feature\n@param attributes the attributes\n@throws LayerException oops"
] | [
"Read the domain controller data from an S3 file.\n\n@param directoryName the name of the directory in the bucket that contains the S3 file\n@return the domain controller data",
"Remove a notification message. Recursive until all pending removals have been completed.",
"Get all backup data\n\n@param model\n@ret... |
public static void validateRollbackState(final String patchID, final InstalledIdentity identity) throws PatchingException {
final Set<String> validHistory = processRollbackState(patchID, identity);
if (patchID != null && !validHistory.contains(patchID)) {
throw PatchLogger.ROOT_LOGGER.patchN... | [
"Validate the consistency of patches to the point we rollback.\n\n@param patchID the patch id which gets rolled back\n@param identity the installed identity\n@throws PatchingException"
] | [
"Calculate Median value.\n@param values Values.\n@return Median.",
"convert Date to XMLGregorianCalendar.\n\n@param date the date\n@return the xML gregorian calendar",
"Apply an XMLDSig onto the passed document.\n\n@param aPrivateKey\nThe private key used for signing. May not be <code>null</code>.\n@param aCert... |
private void cleanupDestination(DownloadRequest request, boolean forceClean) {
if (!request.isResumable() || forceClean) {
Log.d("cleanupDestination() deleting " + request.getDestinationURI().getPath());
File destinationFile = new File(request.getDestinationURI().getPath());
... | [
"Called just before the thread finishes, regardless of status, to take any necessary action on\nthe downloaded file with mDownloadedCacheSize file.\n\n@param forceClean - It will delete downloaded cache, Even streaming is enabled, If user intentionally cancelled."
] | [
"Returns true if the provided matrix is has a value of 1 along the diagonal\nelements and zero along all the other elements.\n\n@param a Matrix being inspected.\n@param tol How close to zero or one each element needs to be.\n@return If it is within tolerance to an identity matrix.",
"Decomposes the input matrix '... |
private void setHint() {
if (mPhoneEdit != null && mSelectedCountry != null && mSelectedCountry.getIso() != null) {
Phonenumber.PhoneNumber phoneNumber = mPhoneUtil.getExampleNumberForType(mSelectedCountry.getIso(), PhoneNumberUtil.PhoneNumberType.MOBILE);
if (phoneNumber != null) {
... | [
"Set hint number for country"
] | [
"Upgrade the lock on the given object to the given lock mode. The call has\nno effect if the object's current lock is already at or above that level of\nlock mode.\n\n@param obj object to acquire a lock on.\n@param lockMode lock mode to acquire. The lock modes\nare <code>READ</code> , <code>UPGRADE</code> ... |
public void addStoreDefinition(StoreDefinition storeDef) {
// acquire write lock
writeLock.lock();
try {
// Check if store already exists
if(this.storeNames.contains(storeDef.getName())) {
throw new VoldemortException("Store already exists !");
... | [
"Function to add a new Store to the Metadata store. This involves\n\n1. Create a new entry in the ConfigurationStorageEngine for STORES.\n\n2. Update the metadata cache.\n\n3. Re-create the 'stores.xml' key\n\n@param storeDef defines the new store to be created"
] | [
"Obtains a Symmetry010 local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Symmetry010 local date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Set the scrollbar used for vertical scrolling.\n\n@param scrollbar ... |
public synchronized int get(byte[] dst, int off, int len) {
if (available == 0) {
return 0;
}
// limit is last index to read + 1
int limit = idxGet < idxPut ? idxPut : capacity;
int count = Math.min(limit - idxGet, len);
System.arraycopy(buffer, idxGet, dst, ... | [
"Gets as many of the requested bytes as available from this buffer.\n\n@return number of bytes actually got from this buffer (0 if no bytes are available)"
] | [
"Create a buffered image with the correct image bands etc... for the tiles being loaded.\n\n@param imageWidth width of the image to create\n@param imageHeight height of the image to create.",
"Filters attributes from the HTML string.\n\n@param html The HTML to filter.\n@return The filtered HTML string.",
"Retur... |
public static void addStory(File caseManager, String storyName,
String testPath, String user, String feature, String benefit) throws BeastException {
FileWriter caseManagerWriter;
String storyClass = SystemReader.createClassName(storyName);
try {
BufferedReader reader = ... | [
"The third method to write caseManager. Its task is to write the call to\nthe story to be run.\n\n@param caseManager\nthe file where the test must be written\n@param storyName\nthe name of the story\n@param test_path\nthe path where the story can be found\n@param user\nthe user requesting the story\n@param feature\... | [
"Here we start a intern odmg-Transaction to hide transaction demarcation\nThis method could be invoked several times within a transaction, but only\nthe first call begin a intern odmg transaction",
"Sets the value to a default.",
"Return any feedback messages and errors that were generated - but\nsuppressed - d... |
public JaCoCoReportReader readJacocoReport(IExecutionDataVisitor executionDataVisitor, ISessionInfoVisitor sessionInfoStore) {
if (jacocoExecutionData == null) {
return this;
}
JaCoCoExtensions.logger().info("Analysing {}", jacocoExecutionData);
try (InputStream inputStream = new BufferedInputStr... | [
"Read JaCoCo report determining the format to be used.\n@param executionDataVisitor visitor to store execution data.\n@param sessionInfoStore visitor to store info session.\n@return true if binary format is the latest one.\n@throws IOException in case of error or binary format not supported."
] | [
"Retrieves the Material Shader ID associated with the\ngiven shader template class.\n\nA shader template is capable of generating multiple variants\nfrom a single shader source. The exact vertex and fragment\nshaders are generated by GearVRF based on the lights\nbeing used and the material attributes. you may subcl... |
@Pure
@Inline(value = "(new $3<$5, $6>($1, $2))", imported = UnmodifiableMergingMapView.class, constantExpression = true)
public static <K, V> Map<K, V> union(Map<? extends K, ? extends V> left, Map<? extends K, ? extends V> right) {
return new UnmodifiableMergingMapView<K, V>(left, right);
} | [
"Merge the given maps.\n\n<p>\nThe replied map is a view on the given two maps.\nIf a key exists in the two maps, the replied value is the value of the right operand.\n</p>\n\n<p>\nEven if the key of the right operand exists in the left operand, the value in the right operand is preferred.\n</p>\n\n<p>\nThe replied... | [
"Use this API to add nspbr6.",
"read messages beginning from offset\n\n@param offset next message offset\n@param length the max package size\n@return a MessageSet object with length data or empty\n@see MessageSet#Empty\n@throws IOException any exception",
"Use this API to delete nsip6 of given name.",
"Helper... |
public String getHostName() {
if( addr instanceof NbtAddress ) {
return ((NbtAddress)addr).getHostName();
}
return ((InetAddress)addr).getHostName();
} | [
"Return the hostname of this address such as \"MYCOMPUTER\"."
] | [
"Extract the parameters from a method using the Jmx annotation if present,\nor just the raw types otherwise\n\n@param m The method to extract parameters from\n@return An array of parameter infos",
"Return the text box for the specified text and font.\n\n@param text text\n@param font font\n@return text box",
"Su... |
private static int nextIndex( String description, int defaultIndex ) {
Pattern startsWithNumber = Pattern.compile( "(\\d+).*" );
Matcher matcher = startsWithNumber.matcher( description );
if( matcher.matches() ) {
return Integer.parseInt( matcher.group( 1 ) ) - 1;
}
... | [
"Returns the next index of the argument by decrementing 1 from the possibly parsed number\n\n@param description this String will be searched from the start for a number\n@param defaultIndex this will be returned if the match does not succeed\n@return the parsed index or the defaultIndex"
] | [
"Core implementation of matchPath. It is isolated so that it can be called\nfrom TokenizedPattern.",
"Compute the CRC32 of the segment of the byte array given by the\nspecificed size and offset\n\n@param bytes The bytes to checksum\n@param offset the offset at which to begin checksumming\n@param size the numbe... |
private ColumnDef addColumnFor(FieldDescriptorDef fieldDef, TableDef tableDef)
{
String name = fieldDef.getProperty(PropertyHelper.OJB_PROPERTY_COLUMN);
ColumnDef columnDef = tableDef.getColumn(name);
if (columnDef == null)
{
columnDef = new ColumnDef(name... | [
"Generates a column for the given field and adds it to the table.\n\n@param fieldDef The field\n@param tableDef The table\n@return The column def"
] | [
"Internal utility to help JNI add hit objects to the pick list. Specifically for MeshColliders with picking\nfor UV, Barycentric, and normal coordinates enabled",
"Returns the value of the specified matrix element. Performs a bounds check to make sure\nthe requested element is part of the matrix.\n\n@param row T... |
protected List<String> getPluginsPath() throws IOException {
List<String> result = new ArrayList<>();
Path pluginsDirectory = PROPERTIES.getAllureHome().resolve("plugins").toAbsolutePath();
if (Files.notExists(pluginsDirectory)) {
return Collections.emptyList();
}
tr... | [
"Returns the plugins classpath elements."
] | [
"Build call for getCharactersCharacterIdShip\n\n@param characterId\nAn EVE character ID (required)\n@param datasource\nThe server name you would like data from (optional, default to\ntranquility)\n@param ifNoneMatch\nETag from a previous request. A 304 will be returned if this\nmatches the current ETag (optional)\n... |
final void waitForSizeQueue(final int queueSize) {
synchronized (this.queue) {
while (this.queue.size() > queueSize) {
try {
this.queue.wait(250L);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
}
try {
Thread.sleep(500L... | [
"For test purposes only."
] | [
"Unlock all files opened for writing.",
"Uploads a new file to this folder with custom upload parameters.\n\n@param uploadParams the custom upload parameters.\n@return the uploaded file's info.",
"Given a HTTPResponce, process it, throwing an error if needed and return a Token for the next\nrequest.",
"This m... |
public boolean addMethodToResponseOverride(String pathName, String methodName) {
// need to find out the ID for the method
// TODO: change api for adding methods to take the name instead of ID
try {
Integer overrideId = getOverrideIdForMethodName(methodName);
// now post... | [
"Add a method to the enabled response overrides for a path\n\n@param pathName name of path\n@param methodName name of method\n@return true if success, false otherwise"
] | [
"Retrieves the amount of time represented by a calendar exception\nbefore or after an intersection point.\n\n@param exception calendar exception\n@param date intersection time\n@param after true to report time after intersection, false to report time before\n@return length of time in milliseconds",
"Helper for pa... |
public Search groupField(String fieldName, boolean isNumber) {
assertNotEmpty(fieldName, "fieldName");
if (isNumber) {
databaseHelper.query("group_field", fieldName + "<number>");
} else {
databaseHelper.query("group_field", fieldName);
}
return thi... | [
"Group results by the specified field.\n\n@param fieldName by which to group results\n@param isNumber whether field isNumeric.\n@return this for additional parameter setting or to query"
] | [
"a small static helper to set a multi state drawable on a view\n\n@param icon\n@param iconColor\n@param selectedIcon\n@param selectedIconColor\n@param tinted\n@param imageView",
"Load the view port execution.\n\n@param then callback when the view port is detected.\n@param fallback fallback when no view port detec... |
public void authenticate() {
URL url;
try {
url = new URL(this.getTokenURL());
} catch (MalformedURLException e) {
assert false : "An invalid token URL indicates a bug in the SDK.";
throw new RuntimeException("An invalid token URL indicates a bug in the SDK.",... | [
"Authenticates the API connection for Box Developer Edition."
] | [
"Sets the target hosts from json path.\n\n@param jsonPath\nthe json path\n@param sourcePath\nthe source path\n@param sourceType\nthe source type\n@return the parallel task builder\n@throws TargetHostsLoadException\nthe target hosts load exception",
"Returns if this maps the specified cell.\n\n@param cell the cell... |
public static appflowglobal_binding get(nitro_service service) throws Exception{
appflowglobal_binding obj = new appflowglobal_binding();
appflowglobal_binding response = (appflowglobal_binding) obj.get_resource(service);
return response;
} | [
"Use this API to fetch a appflowglobal_binding resource ."
] | [
"Updates a metadata classification on the specified file.\n\n@param classificationType the metadata classification type.\n@return the new metadata classification type updated on the file.",
"if you want to convert some string to an object, you have an argument to parse",
"Use this API to fetch cacheselector res... |
protected Iterator<MACAddress> iterator(MACAddress original) {
MACAddressCreator creator = getAddressCreator();
boolean isSingle = !isMultiple();
return iterator(
isSingle ? original : null,
creator,//using a lambda for this one results in a big performance hit
isSingle ? null : segmentsIterato... | [
"these are the iterators used by MACAddress"
] | [
"Register custom filter types especially for serializer of specification json file",
"Given an AVRO serializer definition, validates if all the avro schemas\nare valid i.e parseable.\n\n@param avroSerDef",
"Removes all commas from the token list",
"this method is called from the event methods",
"Print curre... |
public static JsonPatch fromJson(final JsonNode node) throws IOException {
requireNonNull(node, "node");
try {
return Jackson.treeToValue(node, JsonPatch.class);
} catch (JsonMappingException e) {
throw new JsonPatchException("invalid JSON patch", e);
}
} | [
"Static factory method to build a JSON Patch out of a JSON representation.\n\n@param node the JSON representation of the generated JSON Patch\n@return a JSON Patch\n@throws IOException input is not a valid JSON patch\n@throws NullPointerException input is null"
] | [
"Stops the playback of a sound and destroys the corresponding Sound Object or Soundfield.",
"Return a Halton number, sequence starting at index = 0, base > 1.\n\n@param index The index of the sequence.\n@param base The base of the sequence. Has to be greater than one (this is not checked).\n@return The Halton ... |
public static boolean isFormatCorrect(String fileName, ReadOnlyStorageFormat format) {
switch(format) {
case READONLY_V0:
case READONLY_V1:
if(fileName.matches("^[\\d]+_[\\d]+\\.(data|index)")) {
return true;
} else {
... | [
"Given a file name and read-only storage format, tells whether the file\nname format is correct\n\n@param fileName The name of the file\n@param format The RO format\n@return true if file format is correct, else false"
] | [
"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}).",
"Fetches the current online data for the given item, and adds numerical\nlabels if neces... |
public static base_response convert(nitro_service client, sslpkcs12 resource) throws Exception {
sslpkcs12 convertresource = new sslpkcs12();
convertresource.outfile = resource.outfile;
convertresource.Import = resource.Import;
convertresource.pkcs12file = resource.pkcs12file;
convertresource.des = resource.d... | [
"Use this API to convert sslpkcs12."
] | [
"Interfaces, enums, annotations, and abstract classes cannot be\ninstantiated.\n\n@param actionClass\nclass to check\n@return returns true if the class cannot be instantiated or should be\nignored",
"Invoke an HTTP GET request on a remote host. You must close the InputStream after you are done with.\n\n@param pat... |
protected void internalReleaseConnection(ConnectionHandle connectionHandle) throws SQLException {
if (!this.cachedPoolStrategy){
connectionHandle.clearStatementCaches(false);
}
if (connectionHandle.getReplayLog() != null){
connectionHandle.getReplayLog().clear();
connectionHandle.recoveryResult.g... | [
"Release a connection by placing the connection back in the pool.\n@param connectionHandle Connection being released.\n@throws SQLException"
] | [
"Checks that the modified features exist.\n\n@param classDef The class descriptor\n@param checkLevel The current check level (this constraint is checked in basic and strict)\n@exception ConstraintException If the constraint has been violated",
"Returns a string representation of the receiver, containing\nthe St... |
public float getColorR(int vertex, int colorset) {
if (!hasColors(colorset)) {
throw new IllegalStateException("mesh has no colorset " + colorset);
}
checkVertexIndexBounds(vertex);
/* bound checks for colorset are done by java for us */
return m_col... | [
"Returns the red color component of a color from a vertex color set.\n\n@param vertex the vertex index\n@param colorset the color set\n@return the red color component"
] | [
"See if there is an auto-attach cache file that seems to match the media in the specified slot, and if so,\nattach it.\n\n@param slot the player slot that is under consideration for automatic cache attachment",
"Check real offset.\n\n@return the boolean",
"Converts the List to PagedList.\n@param list list to be... |
public static List<Integer> getStolenPrimaryPartitions(final Cluster currentCluster,
final Cluster finalCluster,
final int stealNodeId) {
List<Integer> finalList = new ArrayList<Integer>(finalCl... | [
"For a particular stealer node find all the primary partitions tuples it\nwill steal.\n\n@param currentCluster The cluster definition of the existing cluster\n@param finalCluster The final cluster definition\n@param stealNodeId Node id of the stealer node\n@return Returns a list of primary partitions which this ste... | [
"Adds a data source to the configuration. If in deduplication mode\ngroupno == 0, otherwise it gives the number of the group to which\nthe data source belongs.",
"we can't call this method 'of', cause it won't compile on JDK7",
"Get info about the shards in the database.\n\n@return List of shards\n@see <a\nhref... |
private void deliverBeatGridUpdate(int player, BeatGrid beatGrid) {
if (!getBeatGridListeners().isEmpty()) {
final BeatGridUpdate update = new BeatGridUpdate(player, beatGrid);
for (final BeatGridListener listener : getBeatGridListeners()) {
try {
list... | [
"Send a beat grid update announcement to all registered listeners.\n\n@param player the player whose beat grid information has changed\n@param beatGrid the new beat grid associated with that player, if any"
] | [
"Processes the template for all table definitions in the torque model.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\n@doc.tag type=\"block\"",
"Convenience method for getting the value of a... |
public static base_responses delete(nitro_service client, String selectorname[]) throws Exception {
base_responses result = null;
if (selectorname != null && selectorname.length > 0) {
cacheselector deleteresources[] = new cacheselector[selectorname.length];
for (int i=0;i<selectorname.length;i++){
delete... | [
"Use this API to delete cacheselector resources of given names."
] | [
"Gets any previous versions of this file. Note that only users with premium accounts will be able to retrieve\nprevious versions of their files.\n\n@return a list of previous file versions.",
"Determines whether the given documentation part contains the specified tag with the given parameter having the\ngiven val... |
public void transform(DataPipe cr) {
for (Map.Entry<String, String> entry : cr.getDataMap().entrySet()) {
String value = entry.getValue();
if (value.equals("#{customplaceholder}")) {
// Generate a random number
int ran = rand.nextInt();
en... | [
"The transform method for this DataTransformer\n@param cr a reference to DataPipe from which to read the current map"
] | [
"Gets the persistence broker used by this indirection handler.\nIf no PBKey is available a runtime exception will be thrown.\n\n@return a PersistenceBroker",
"Returns an array of the names of all atributes of this descriptor.\n\n@return The list of attribute names (will not be <code>null</code>)",
"Operates on ... |
public void deleteFolder(String folderID) {
URL url = FOLDER_INFO_URL_TEMPLATE.build(this.api.getBaseURL(), folderID);
BoxAPIRequest request = new BoxAPIRequest(this.api, url, "DELETE");
BoxAPIResponse response = request.send();
response.disconnect();
} | [
"Permanently deletes a trashed folder.\n@param folderID the ID of the trashed folder to permanently delete."
] | [
"Prioritises the list of step candidates that match a given step.\n\n@param stepAsText\nthe textual step to match\n@param candidates\nthe List of StepCandidate\n@return The prioritised list according to the\n{@link PrioritisingStrategy}.",
"Wrap an operation's parameters in a simple encapsulating object\n@param o... |
private static void bodyWithConcatenation(
SourceBuilder code,
Map<Property, PropertyCodeGenerator> generatorsByProperty,
String typename) {
code.add(" return \"%s{", typename);
String prefix = "";
for (Property property : generatorsByProperty.keySet()) {
PropertyCodeGenerator gener... | [
"Generate the body of a toString method that uses plain concatenation.\n\n<p>Conventionally, we join properties with comma separators. If all of the properties are\nalways present, this can be done with a long block of unconditional code. We could use a\nStringBuilder for this, but in fact the Java compiler will do... | [
"Obtain parameters from query\n\n@param query query to scan\n@return Map of parameters",
"One of the two main methods in this class. Creates a RendererViewHolder instance with a\nRenderer inside ready to be used. The RendererBuilder to create a RendererViewHolder using the\ninformation given as parameter.\n\n@par... |
public static final <T> T getSingle( Iterable<T> it ) {
if( ! it.iterator().hasNext() )
return null;
final Iterator<T> iterator = it.iterator();
T o = iterator.next();
if(iterator.hasNext())
throw new IllegalStateException("Found multiple items in iterator over "... | [
"Returns a single item from the Iterator.\nIf there's none, returns null.\nIf there are more, throws an IllegalStateException.\n\n@throws IllegalStateException"
] | [
"Replies the elements of the given map except the pair with the given key.\n\n<p>\nThe replied map is a view on the given map. It means that any change\nin the original map is reflected to the result of this operation.\n</p>\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param map the map... |
protected void fireEvent(HotKey hotKey) {
HotKeyEvent event = new HotKeyEvent(hotKey);
if (useSwingEventQueue) {
SwingUtilities.invokeLater(event);
} else {
if (eventQueue == null) {
eventQueue = Executors.newSingleThreadExecutor();
}
... | [
"Helper method fro providers to fire hotkey event in a separate thread\n\n@param hotKey hotkey to fire"
] | [
"Session connect generate channel.\n\n@param session\nthe session\n@return the channel\n@throws JSchException\nthe j sch exception",
"Caches the given object using the given Identity as key\n\n@param oid The Identity key\n@param obj The object o cache",
"This method is used to finalize the configuration\nafte... |
public static void indexResourceRoot(final ResourceRoot resourceRoot) throws DeploymentUnitProcessingException {
if (resourceRoot.getAttachment(Attachments.ANNOTATION_INDEX) != null) {
return;
}
VirtualFile indexFile = resourceRoot.getRoot().getChild(ModuleIndexBuilder.INDEX_LOCATIO... | [
"Creates and attaches the annotation index to a resource root, if it has not already been attached"
] | [
"Use this API to add dnstxtrec.",
"Delete all enabled overrides for a client\n\n@param profileId profile ID of teh client\n@param client_uuid UUID of teh client",
"Read a Synchro string from an input stream.\n\n@param is input stream\n@return String instance",
"Use this API to add route6 resources.",
"Get t... |
public ReplyObject getReplyList(String topicId, int perPage, int page) throws FlickrException {
ReplyList<Reply> reply = new ReplyList<Reply>();
TopicList<Topic> topic = new TopicList<Topic>();
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", M... | [
"Get list of replies\n\n@param topicId\nUnique identifier of a topic for a given group {@link Topic}.\n@return A reply object\n@throws FlickrException\n@see <a href=\"http://www.flickr.com/services/api/flickr.groups.discuss.replies.getList.html\">API Documentation</a>"
] | [
"Read project calendars.",
"Indicates that contextual session bean instance has been constructed.",
"Creates a single property declaration.\n@param property Property name.\n@param term Property value.\n@return The resulting declaration.",
"Adds api doc roots from a link. The folder reffered by the link should... |
public void load(File file) {
try {
PropertiesConfiguration config = new PropertiesConfiguration();
// disabled to prevent accumulo classpath value from being shortened
config.setDelimiterParsingDisabled(true);
config.load(file);
((CompositeConfiguration) internalConfig).addConfigurati... | [
"Loads configuration from File. Later loads have lower priority.\n\n@param file File to load from\n@since 1.2.0"
] | [
"Helper function to bind script bundler to various targets",
"Returns the bill for the month specified.\n\n@param month for which bill to retrieve.\n@param year for which bill to retrieve.\n@return {@link Response}\n\n@throws RequestException if request to transloadit server fails.\n@throws LocalOperationExceptio... |
public static Index index(String keyspace, String table, String name) {
return new Index(table, name).keyspace(keyspace);
} | [
"Returns a new index creation statement using the session's keyspace.\n\n@param keyspace the keyspace name\n@param table the table name\n@param name the index name\n@return a new index creation statement"
] | [
"Build a standard-format UDP packet for sending to port 50001 or 50002 in the protocol.\n\n@param type the type of packet to create.\n@param deviceName the 0x14 (twenty) bytes of the device name to send in the packet.\n@param payload the remaining bytes which come after the device name.\n@return the packet to send.... |
public void commandContinuationRequest()
throws ProtocolException {
try {
output.write('+');
output.write(' ');
output.write('O');
output.write('K');
output.write('\r');
output.write('\n');
output.flush();
... | [
"Sends a server command continuation request '+' back to the client,\nrequesting more data to be sent."
] | [
"Gets the Json Array representation of the given list of strings.\n@param keys List of strings\n@return the JsonArray represents the list of keys",
"Set the week day the events should occur.\n@param weekDay the week day to set.",
"Given a file name and read-only storage format, tells whether the file\nname form... |
public static appfwglobal_auditsyslogpolicy_binding[] get(nitro_service service) throws Exception{
appfwglobal_auditsyslogpolicy_binding obj = new appfwglobal_auditsyslogpolicy_binding();
appfwglobal_auditsyslogpolicy_binding response[] = (appfwglobal_auditsyslogpolicy_binding[]) obj.get_resources(service);
retur... | [
"Use this API to fetch a appfwglobal_auditsyslogpolicy_binding resources."
] | [
"Create a canonical represenation of the data type value. Defaults to the value converter.\n\n@since 2.9",
"Returns an iterator over the items in the trash.\n@return an iterator over the items in the trash.",
"Set the model used by the right table.\n\n@param model table model",
"Notifies that multiple header ... |
public void deleteFile(String fileID) {
URL url = FILE_INFO_URL_TEMPLATE.build(this.api.getBaseURL(), fileID);
BoxAPIRequest request = new BoxAPIRequest(this.api, url, "DELETE");
BoxAPIResponse response = request.send();
response.disconnect();
} | [
"Permanently deletes a trashed file.\n@param fileID the ID of the trashed folder to permanently delete."
] | [
"Retrieves the timephased breakdown of actual cost.\n\n@return timephased actual cost",
"Add a creatable \"post-run\" dependent for this task item.\n\n@param creatable the creatable \"post-run\" dependent.\n@return the key to be used as parameter to taskResult(string) method to retrieve created \"post-run\" depen... |
public static int compare(Integer n1, Integer n2)
{
int result;
if (n1 == null || n2 == null)
{
result = (n1 == null && n2 == null ? 0 : (n1 == null ? 1 : -1));
}
else
{
result = n1.compareTo(n2);
}
return (result);
} | [
"Compare two integers, accounting for null values.\n\n@param n1 integer value\n@param n2 integer value\n@return comparison result"
] | [
"Creates a XopBean. The image on the disk is included as a byte array,\na DataHandler and java.awt.Image\n@return the bean\n@throws Exception",
"This method is called to format a time value.\n\n@param value time value\n@return formatted time value",
"Another method to force an input string into a fixed width fi... |
public LuaScript endScriptReturn(LuaValue value, LuaScriptConfig config) {
add(new LuaAstReturnStatement(argument(value)));
String scriptText = buildScriptText();
return new BasicLuaScript(scriptText, config);
} | [
"End building the script, adding a return value statement\n@param config the configuration for the script to build\n@param value the value to return\n@return the new {@link LuaScript} instance"
] | [
"Get components list for current instance\n@return components",
"Kicks off an animation that will result in the pointer being centered in the\npie slice of the currently selected item.",
"Implementation of FNV-1a hash algorithm.\n@see <a href=\"https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_f... |
public void addColumn(ColumnDef columnDef)
{
columnDef.setOwner(this);
_columns.put(columnDef.getName(), columnDef);
} | [
"Adds a column to this table definition.\n\n@param columnDef The new column"
] | [
"Remove all of the audio sources from the audio manager.\nThis will stop all sound from playing.",
"Returns true if the given method has a possibly matching instance method with the given name and arguments.\n\n@param name the name of the method of interest\n@param arguments the arguments to match against\n@... |
private void emitStatusLine(AggregatedResultEvent result, TestStatus status, long timeMillis) throws IOException {
final StringBuilder line = new StringBuilder();
line.append(shortTimestamp(result.getStartTimestamp()));
line.append(Strings.padEnd(statusNames.get(status), 8, ' '));
line.append(formatDur... | [
"Emit status line for an aggregated event."
] | [
"Clean up the environment object for the given storage engine",
"Use this API to update Interface resources.",
"Shutdown the container.\n\n@see Weld#initialize()",
"Creates metadata on this folder using a specified scope and template.\n\n@param templateName the name of the metadata template.\n@param scope ... |
public synchronized void tick() {
long currentTime = GVRTime.getMilliTime();
long cutoffTime = currentTime - BUFFER_SECONDS * 1000;
ListIterator<Long> it = mTimestamps.listIterator();
while (it.hasNext()) {
Long timestamp = it.next();
if (timestamp < cutoffTime) {... | [
"Should be called each frame."
] | [
"Merge two maps of configuration properties. If the original contains a mapping for the same key, the new mapping is ignored.\n\n@param original\n@param toMerge",
"return the workspace size needed for ctc",
"Removes the given service provider factory from the set of\nproviders for the service.\n\n@param service... |
private void tryToSetParsedValue(String value) throws Exception {
JSONObject json = JSONParser.parseStrict(value).isObject();
JSONValue val = json.get(JsonKey.START);
setStart(readOptionalDate(val));
val = json.get(JsonKey.END);
setEnd(readOptionalDate(val));
setWholeDay... | [
"Try to set the value from the provided Json string.\n@param value the value to set.\n@throws Exception thrown if parsing fails."
] | [
"Submit a command to the server.\n\n@param command The CLI command\n@return The DMR response as a ModelNode\n@throws CommandFormatException\n@throws IOException",
"The cell String is the string representation of the object.\nIf padLeft is greater than 0, it is padded. Ditto right",
"Handle http worker response.... |
public static appfwprofile_denyurl_binding[] get(nitro_service service, String name) throws Exception{
appfwprofile_denyurl_binding obj = new appfwprofile_denyurl_binding();
obj.set_name(name);
appfwprofile_denyurl_binding response[] = (appfwprofile_denyurl_binding[]) obj.get_resources(service);
return response... | [
"Use this API to fetch appfwprofile_denyurl_binding resources of given name ."
] | [
"Use this API to fetch aaapreauthenticationpolicy_aaaglobal_binding resources of given name .",
"This method writes project extended attribute data into an MSPDI file.\n\n@param project Root node of the MSPDI file",
"Set the header names to forward from the request. Should not be defined if all is set to true\... |
private Long fetchServiceId(ServiceReference serviceReference) {
return (Long) serviceReference.getProperty(org.osgi.framework.Constants.SERVICE_ID);
} | [
"Returns the service id with the propertype.\n\n@param serviceReference\n@return long value for the service id"
] | [
"Gets the value for the key.\n\n@param key the key to check for the value\n\n@return the value or an empty collection if no values were set",
"This produces a string with no compressed segments and all segments of full length,\nwhich is 4 characters for IPv6 segments and 3 characters for IPv4 segments.",
"Print... |
private void getMonthlyDates(Calendar calendar, int frequency, List<Date> dates)
{
if (m_relative)
{
getMonthlyRelativeDates(calendar, frequency, dates);
}
else
{
getMonthlyAbsoluteDates(calendar, frequency, dates);
}
} | [
"Calculate start dates for a monthly recurrence.\n\n@param calendar current date\n@param frequency frequency\n@param dates array of start dates"
] | [
"Retrieve a finish date.\n\n@param data byte array\n@param offset offset into byte array\n@return finish date",
"To read an object in a quick & dirty way. Prepare to handle failures when object serialization changes!",
"Confirms that both clusters have the same number of total partitions.\n\n@param lhs\n@param ... |
private boolean isRedeployAfterRemoval(ModelNode operation) {
return operation.hasDefined(DEPLOYMENT_OVERLAY_LINK_REMOVAL) &&
operation.get(DEPLOYMENT_OVERLAY_LINK_REMOVAL).asBoolean();
} | [
"Check if this is a redeployment triggered after the removal of a link.\n@param operation the current operation.\n@return true if this is a redeploy after the removal of a link.\n@see org.jboss.as.server.deploymentoverlay.DeploymentOverlayDeploymentRemoveHandler"
] | [
"The read timeout for the underlying URLConnection to the twitter stream.",
"Use this API to save cacheobject resources.",
"Use the universal project reader to open the file.\nThrow an exception if we can't determine the file type.\n\n@param inputFile file name\n@return ProjectFile instance",
"Returns the dot... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.