query stringlengths 74 6.1k | positive listlengths 1 1 | negative listlengths 9 9 |
|---|---|---|
protected boolean check(String value, String regex) {
Pattern pattern = Pattern.compile(regex);
return pattern.matcher(value).matches();
} | [
"Check whether the value is matched by a regular expression.\n\n@param value value\n@param regex regular expression\n@return true when value is matched"
] | [
"Use this API to fetch crvserver_binding resource of given name .",
"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 t... |
public void addRow(Component component) {
Component actualComponent = component == null ? m_newComponentFactory.get() : component;
I_CmsEditableGroupRow row = m_rowBuilder.buildRow(this, actualComponent);
m_container.addComponent(row);
updatePlaceholder();
updateButtonBars();
... | [
"Adds a row for the given component at the end of the group.\n\n@param component the component to wrap in the row to be added"
] | [
"page breaks should be near the bottom of the band, this method used while adding subreports\nwhich has the \"start on new page\" option.\n@param band",
"Attachments are only structurally different if one step has an inline attachment\nand the other step either has no inline attachment or the inline attachment is... |
public static Map<String, StoreDefinition> getSystemStoreDefMap() {
Map<String, StoreDefinition> sysStoreDefMap = Maps.newHashMap();
List<StoreDefinition> storesDefs = SystemStoreConstants.getAllSystemStoreDefs();
for(StoreDefinition def: storesDefs) {
sysStoreDefMap.put(def.getName(... | [
"Utility function that fetches system store definitions\n\n@return The map container that maps store names to store definitions"
] | [
"Removes all of the markers from the map.",
"Use this API to fetch the statistics of all vpath_stats resources that are configured on netscaler.",
"Specify the socket to be used as underlying socket to connect\nto the APN service.\n\nThis assumes that the socket connects to a SOCKS proxy.\n\n@deprecated use {@l... |
private static List<Segment> parseSegments(String origPathStr) {
String pathStr = origPathStr;
if (!pathStr.startsWith("/")) {
pathStr = pathStr + "/";
}
List<Segment> result = new ArrayList<>();
for (String segmentStr : PATH_SPLITTER.split(pathStr)) {
Ma... | [
"currently does not support paths with name constrains"
] | [
"Validate JUnit4 presence in a concrete version.",
"Adds a security property to be passed to the server.\n\n@param key the property key\n@param value the property value\n\n@return the builder",
"Returns this bar code's pattern, converted into a set of corresponding codewords.\nUseful for bar codes that encode... |
public static cachepolicylabel_binding get(nitro_service service, String labelname) throws Exception{
cachepolicylabel_binding obj = new cachepolicylabel_binding();
obj.set_labelname(labelname);
cachepolicylabel_binding response = (cachepolicylabel_binding) obj.get_resource(service);
return response;
} | [
"Use this API to fetch cachepolicylabel_binding resource of given name ."
] | [
"Removes the given object from the cache\n\n@param oid oid of the object to remove",
"Use this API to update clusternodegroup resources.",
"Locks the bundle descriptor.\n@throws CmsException thrown if locking fails.",
"Determines the partition ID that replicates the key on the given node.\n\n@param nodeId of... |
protected List<Reference> mergeReferences(
List<? extends Reference> references1,
List<? extends Reference> references2) {
List<Reference> result = new ArrayList<>();
for (Reference reference : references1) {
addBestReferenceToList(reference, result);
}
for (Reference reference : references2) {
addB... | [
"Merges two lists of references, eliminating duplicates in the process.\n\n@param references1\n@param references2\n@return merged list"
] | [
"Calculate delta with another vector\n@param v another vector\n@return delta vector",
"Add a module to a module tree\n\n@param module\n@param tree",
"Sets the current class definition derived from the current class, and optionally some attributes.\n\n@param template The template\n@param attributes ... |
@UiHandler({"m_atMonth", "m_everyMonth"})
void onMonthChange(ValueChangeEvent<String> event) {
if (handleChange()) {
m_controller.setMonth(event.getValue());
}
} | [
"Handler for month changes.\n@param event change event."
] | [
"Get a date range that correctly handles the case where the end time\nis midnight. In this instance the end time should be the start of the\nnext day.\n\n@param hours calendar hours\n@param start start date\n@param end end date",
"Get the spin scripting environment\n\n@param language the language name\n@return th... |
@SuppressFBWarnings(value = "DMI_COLLECTION_OF_URLS", justification = "Only local URLs involved")
private Map<ConfigurationKey, Object> readFileProperties(Set<URL> files) {
Map<ConfigurationKey, Object> found = new EnumMap<ConfigurationKey, Object>(ConfigurationKey.class);
for (URL file : files) {
... | [
"Read the set of property files. Keys and Values are automatically validated and converted.\n\n@param resourceLoader\n@return all the properties from the weld.properties file"
] | [
"This method returns the value of the product using a Black-Scholes model for the swap rate with the Hunt-Kennedy convexity adjustment.\nThe model is determined by a discount factor curve and a swap rate volatility.\n\n@param forwardCurve The forward curve from which the swap rate is calculated. The discount curve,... |
public static void inner_reorder_lower(DMatrix1Row A , DMatrix1Row B )
{
final int cols = A.numCols;
B.reshape(cols,cols);
Arrays.fill(B.data,0);
for (int i = 0; i <cols; i++) {
for (int j = 0; j <=i; j++) {
B.data[i*cols+j] += A.data[i]*A.data[j];
... | [
"Computes the inner product of A times A and stores the results in B. The inner product is symmetric and this\nfunction will only store the lower triangle. The value of the upper triangular matrix is undefined.\n\n<p>B = A<sup>T</sup>*A</sup>\n\n@param A (Input) Matrix\n@param B (Output) Storage for output."
] | [
"Use this API to fetch all the lbsipparameters resources that are configured on netscaler.",
"Returns only the leaf categories of the wrapped categories.\n\nThe method assumes that categories are ordered in the list, i.e., parents are directly followed by their children.\n\nNOTE: In the complete category tree a l... |
protected boolean checkPackageLocators(String classPackageName) {
if (packageLocators != null && !disablePackageLocatorsScanning && classPackageName.length() > 0
&& (packageLocatorsBasePackage == null || classPackageName.startsWith(packageLocatorsBasePackage))) {
for (String packageLocator : packageLocators) {... | [
"Checks if class package match provided list of package locators\n\n@param classPackageName\nname of class package\n@return true if class package is on the {@link #packageLocators} list"
] | [
"Clears the proxy. A cleared proxy is defined as loaded\n\n@see Collection#clear()",
"converts a java.net.URI to a decoded string",
"Creates a new Box Developer Edition connection with enterprise token leveraging BoxConfig.\n@param boxConfig box configuration settings object\n@return a new instance ... |
protected TransformationDescription buildDefault(final DiscardPolicy discardPolicy, boolean inherited, final AttributeTransformationDescriptionBuilderImpl.AttributeTransformationDescriptionBuilderRegistry registry, List<String> discardedOperations) {
// Build attribute rules
final Map<String, AttributeT... | [
"Build the default transformation description.\n\n@param discardPolicy the discard policy to use\n@param inherited whether the definition is inherited\n@param registry the attribute transformation rules for the resource\n@param discardedOperations the discarded operations\n@return the transformation description"
] | [
"Sets the SCXML model with an InputStream\n\n@param inputFileStream the model input stream",
"Curries a procedure that takes one argument.\n\n@param procedure\nthe original procedure. May not be <code>null</code>.\n@param argument\nthe fixed argument.\n@return a procedure that takes no arguments. Never <code>null... |
public void setAlias(String alias)
{
if (alias == null || alias.trim().equals(""))
{
m_alias = null;
}
else
{
m_alias = alias;
}
// propagate to SelectionCriteria,not to Criteria
for (int i = 0; i < m_criteria.size(); i++)
{
if (!(m_criteria.elementAt(i) instanceof Criteria))
... | [
"Sets the alias. Empty String is regarded as null.\n@param alias The alias to set"
] | [
"Checks if template mapper is configured in modules.\n\n@return true if the template mapper is configured in modules",
"Append Join for SQL92 Syntax",
"This utility method calculates the difference in working\ntime between two dates, given the context of a task.\n\n@param task parent task\n@param date1 first da... |
@PostConstruct
public void init() {
this.metricRegistry.register(name("gc"), new GarbageCollectorMetricSet());
this.metricRegistry.register(name("memory"), new MemoryUsageGaugeSet());
this.metricRegistry.register(name("thread-states"), new ThreadStatesGaugeSet());
this.metricRegistry... | [
"Add several jvm metrics."
] | [
"Use this API to delete nssimpleacl.",
"Gets display duration for specified frame.\n\n@param n int index of frame.\n@return delay in milliseconds.",
"Extracts the column of A and copies it into u while computing the magnitude of the\nlargest element and returning it.\n\n<pre>\nu[ (offsetU+row0+i)*2 ] = A.get... |
public Duration getStartVariance()
{
Duration variance = (Duration) getCachedValue(AssignmentField.START_VARIANCE);
if (variance == null)
{
TimeUnit format = getParentFile().getProjectProperties().getDefaultDurationUnits();
variance = DateHelper.getVariance(getTask(), getBaselineS... | [
"Calculate the start variance.\n\n@return start variance"
] | [
"Returns the vertex points in this hull.\n\n@return array of vertex points\n@see QuickHull3D#getVertices(double[])\n@see QuickHull3D#getFaces()",
"Log a message at the provided level.",
"Use this API to fetch nstrafficdomain_bridgegroup_binding resources of given name .",
"Stops and clears all transitions",
... |
public void addExtraInfo(String key, Object value) {
// Turn extraInfo into map
Map<String, Object> infoMap = (HashMap<String, Object>)getMapFromJSON(extraInfo);
// Add value
infoMap.put(key, value);
// Turn back into string
extraInfo = getJSONFromMap(infoMap);
} | [
"Add key value pair to extra info\n\n@param key Key of new item\n@param value New value to add"
] | [
"Adds a new metadata value of array type.\n@param path the path to the field.\n@param values the collection of values.\n@return the metadata object for chaining.",
"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 availa... |
public void setVolume(float volume)
{
// Save this in case this audio source is not being played yet
mVolume = volume;
if (isPlaying() && (getSourceId() != GvrAudioEngine.INVALID_ID))
{
// This will actually work only if the sound file is being played
mAudioLi... | [
"Changes the volume of an existing sound.\n@param volume volume value. Should range from 0 (mute) to 1 (max)"
] | [
"Tries to guess the packaging of the archive - whether it's an EAR, WAR, JAR.\nMaybe not needed as we can rely on the suffix?",
"Initialize that Foundation Logging library.",
"Write a long attribute.\n\n@param name attribute name\n@param value attribute value",
"prevent too many refreshes happening one after ... |
public static dnspolicylabel[] get(nitro_service service) throws Exception{
dnspolicylabel obj = new dnspolicylabel();
dnspolicylabel[] response = (dnspolicylabel[])obj.get_resources(service);
return response;
} | [
"Use this API to fetch all the dnspolicylabel resources that are configured on netscaler."
] | [
"Obtain the path ID for a profile\n\n@param identifier Can be the path ID, or friendly name\n@param profileId\n@return\n@throws Exception",
"Convenience method for retrieving a Map resource.\n\n@param locale locale identifier\n@param key resource key\n@return resource value",
"Set virtual host so the server can... |
private void readRelationships()
{
for (MapRow row : getTable("CONTAB"))
{
Task task1 = m_projectFile.getTaskByUniqueID(row.getInteger("TASK_ID_1"));
Task task2 = m_projectFile.getTaskByUniqueID(row.getInteger("TASK_ID_2"));
if (task1 != null && task2 != null)
{
... | [
"Read relationship data from a PEP file."
] | [
"Runs a query that returns a single int.",
"Write a duration field to the JSON file.\n\n@param fieldName field name\n@param value field value",
"Retrieve a list of the available P3 project names from a directory.\n\n@param directory directory containing P3 files\n@return list of project names",
"Check that an... |
public static base_response delete(nitro_service client, String ciphergroupname) throws Exception {
sslcipher deleteresource = new sslcipher();
deleteresource.ciphergroupname = ciphergroupname;
return deleteresource.delete_resource(client);
} | [
"Use this API to delete sslcipher of given name."
] | [
"Pauses the file upload. This is a blocking function that would try to wait till the assembly file uploads\nhave actually been paused if possible.\n\n@throws LocalOperationException if the method is called while no upload is going on.",
"Converts a class into a signature token.\n\n@param c class\n@return signatur... |
private void writeDateField(String fieldName, Object value) throws IOException
{
if (value instanceof String)
{
m_writer.writeNameValuePair(fieldName + "_text", (String) value);
}
else
{
Date val = (Date) value;
m_writer.writeNameValuePair(fieldName, val);
... | [
"Write a date field to the JSON file.\n\n@param fieldName field name\n@param value field value"
] | [
"Creates and returns a temporary directory for a printing task.",
"Cleans up a extension module's subsystems from the resource registration model.\n\n@param rootResource the model root resource\n@param moduleName the name of the extension's module. Cannot be {@code null}\n@throws IllegalStateException if the ex... |
public static HashMap<String, String> getMapFromJSONPath(JSONObject record, String path) {
return getObjectFromJSONPath(record, path);
} | [
"Gets a Map of attributes from a json object given a path to traverse.\n\n@param record a JSONObject to traverse.\n@param path the json path to follow.\n@return the attributes as a {@link HashMap}, or null if it was not found."
] | [
"Use this API to count sslcertkey_crldistribution_binding resources configued on NetScaler.",
"Parses server section of Zookeeper connection string",
"This private method allows the caller to determine if a given date is a\nworking day. This method takes account of calendar exceptions. It assumes\nthat the call... |
public ConfigBuilder withSentinels(final Set<String> sentinels) {
if (sentinels == null || sentinels.size() < 1) {
throw new IllegalArgumentException("sentinels is null or empty: " + sentinels);
}
this.sentinels = sentinels;
return this;
} | [
"Configs created by this ConfigBuilder will use the given Redis sentinels.\n\n@param sentinels the Redis set of sentinels\n@return this ConfigBuilder"
] | [
"Setter for \"addContentInfo\", indicating if content information should be added.\n@param doAddInfo The value of the \"addContentInfo\" attribute of the tag",
"Set the String-representation of size.\n\nLike: Square, Thumbnail, Small, Medium, Large, Original.\n\n@param label",
"Adds OPT_Z | OPT_ZONE option to O... |
static SortedSet<String> createStatsItems(String statsType)
throws IOException {
SortedSet<String> statsItems = new TreeSet<>();
SortedSet<String> functionItems = new TreeSet<>();
if (statsType != null) {
Matcher m = fpStatsItems.matcher(statsType.trim());
while (m.find()) {
String... | [
"Creates the stats items.\n\n@param statsType\nthe stats type\n@return the sorted set\n@throws IOException\nSignals that an I/O exception has occurred."
] | [
"We have a directory. Determine if this contains a multi-file database we understand, if so\nprocess it. If it does not contain a database, test each file within the directory\nstructure to determine if it contains a file whose format we understand.\n\n@param directory directory to process\n@return ProjectFile inst... |
protected void process(String text, Map params, Writer writer){
try{
Template t = new Template("temp", new StringReader(text), FreeMarkerTL.getEnvironment().getConfiguration());
t.process(params, writer);
}catch(Exception e){
throw new ViewException(e);
... | [
"Processes text as a FreeMarker template. Usually used to process an inner body of a tag.\n\n@param text text of a template.\n@param params map with parameters for processing.\n@param writer writer to write output to."
] | [
"Constructs a valid request and passes it on to the next handler. It also\ncreates the 'StoreClient' object corresponding to the store name\nspecified in the REST request.\n\n@param requestValidator The Validator object used to construct the\nrequest object\n@param ctx Context of the Netty channel\n@param messageEv... |
protected void recycleChildren() {
for (ListItemHostWidget host: getAllHosts()) {
recycle(host);
}
mContent.onTransformChanged();
mContent.requestLayout();
} | [
"Recycle all views in the list. The host views might be reused for other data to\nsave resources on creating new widgets."
] | [
"We have obtained a waveform preview for a device, so store it and alert any listeners.\n\n@param update the update which caused us to retrieve this waveform preview\n@param preview the waveform preview which we retrieved",
"This method is called to format a time value.\n\n@param value time value\n@return formatt... |
public void close() {
Iterator<SocketDestination> it = getStatsMap().keySet().iterator();
while(it.hasNext()) {
try {
SocketDestination destination = it.next();
JmxUtils.unregisterMbean(JmxUtils.createObjectName(JmxUtils.getPackageName(ClientRequestExecutor.cl... | [
"Unregister all MBeans"
] | [
"Close all HTTP clients created by this factory\n@throws IOException if an I/O error occurs",
"Returns a description a block of work, or \"exit\" if no more blocks exist\n\n@param name the assigned name of the consumer requesting a block of work\n@return a description a block of work, or \"exit\" if no more block... |
@SuppressWarnings("SameParameterValue")
private void sendField(Field field) throws IOException {
if (isConnected()) {
try {
field.write(channel);
} catch (IOException e) {
logger.warn("Problem trying to write field to dbserver, closing connection", e);... | [
"Attempt to send the specified field to the dbserver.\nThis low-level function is available only to the package itself for use in setting up the connection. It was\npreviously also used for sending parts of larger-scale messages, but because that sometimes led to them being\nfragmented into multiple network packets... | [
"Convert an operation for deployment overlays to be executed on local servers.\nSince this might be called in the case of redeployment of affected deployments, we need to take into account\nthe composite op resulting from such a transformation\n@see AffectedDeploymentOverlay#redeployLinksAndTransformOperationForDom... |
public static void addInterceptors(InterceptorProvider provider) {
PhaseManager phases = BusFactory.getDefaultBus().getExtension(PhaseManager.class);
for (Phase p : phases.getInPhases()) {
provider.getInInterceptors().add(new DemoInterceptor(p.getName()));
provider.getInFaultInte... | [
"This method will add a DemoInterceptor into every in and every out phase\nof the interceptor chains.\n\n@param provider"
] | [
"Adds search fields from elements on a container page to a container page's document.\n@param document The document for the container page\n@param cms The current CmsObject\n@param resource The resource of the container page\n@param systemFields The list of field names for fields where mappings to should be discard... |
private String generateValue() {
String result = "";
for (CmsCheckBox checkbox : m_checkboxes) {
if (checkbox.isChecked()) {
result += checkbox.getInternalValue() + ",";
}
}
if (result.contains(",")) {
result = result.substrin... | [
"Generate a string with all selected checkboxes separated with ','.\n\n@return a string with all selected checkboxes"
] | [
"Read a long int from a byte array.\n\n@param data byte array\n@param offset start offset\n@return long value",
"This method only overrides properties that are specific from Cube like await strategy or before stop events.\n\n@param overrideDockerCompositions\nthat contains information to override.",
"Facade met... |
public void scaleWeights(double scale) {
for (int i = 0; i < weights.length; i++) {
for (int j = 0; j < weights[i].length; j++) {
weights[i][j] *= scale;
}
}
} | [
"Scales the weights of this crfclassifier by the specified weight\n\n@param scale"
] | [
"performs a SELECT operation against RDBMS.\n@param query the query string.\n@param cld ClassDescriptor providing JDBC information.",
"Return cached object by key. The key will be concatenated with\ncurrent session id when fetching the cached object\n\n@param key\n@param <T>\nthe object type\n@return the cached o... |
public void sendLoadTrackCommand(DeviceUpdate target, int rekordboxId,
int sourcePlayer, CdjStatus.TrackSourceSlot sourceSlot, CdjStatus.TrackType sourceType)
throws IOException {
ensureRunning();
byte[] payload = new byte[LOAD_TRACK_PAYLOAD.length];
... | [
"Send a packet to the target device telling it to load the specified track from the specified source player.\n\n@param target an update from the player that you want to have load a track\n@param rekordboxId the identifier of a track within the source player's rekordbox database\n@param sourcePlayer the device numbe... | [
"Wait to shutdown service\n\n@param executorService Executor service to shutdown\n@param timeOutSec Time we wait for",
"Open the given url in default system browser.",
"Update the context session to mark a user logged in\n\n@param userIdentifier\nthe user identifier, could be either userId or username",
"Reco... |
private LinkedList<TimephasedWork> readTimephasedAssignment(ProjectCalendar calendar, Project.Assignments.Assignment assignment, int type)
{
LinkedList<TimephasedWork> result = new LinkedList<TimephasedWork>();
for (TimephasedDataType item : assignment.getTimephasedData())
{
if (NumberHel... | [
"Reads timephased assignment data.\n\n@param calendar current calendar\n@param assignment assignment data\n@param type flag indicating if this is planned or complete work\n@return list of timephased resource assignment instances"
] | [
"handles when a member leaves and hazelcast partition data is lost. We want\nto find the Futures that are waiting on lost data and error them",
"Sets selected page implicitly\n@param page new selected page\n@return true if the page has been selected successfully",
"Retrieve and validate the timeout value from... |
public ResponseOnSingeRequest genErrorResponse(Exception t) {
ResponseOnSingeRequest sshResponse = new ResponseOnSingeRequest();
String displayError = PcErrorMsgUtils.replaceErrorMsg(t.toString());
sshResponse.setStackTrace(PcStringUtils.printStackTrace(t));
sshResponse.setErrorMessage(... | [
"Gen error response.\n\n@param t\nthe t\n@return the response on single request"
] | [
"Whether this association contains no rows.\n\n@return {@code true} if this association contains no rows, {@code false} otherwise",
"Get a prefix for the log message to help identify which request is which and which responses\nbelong to which requests.",
"Find the path to the first association in the property p... |
public ResourceIterator<Node> findEntities(GraphDatabaseService executionEngine) {
Result result = executionEngine.execute( getFindEntitiesQuery() );
return result.columnAs( BaseNeo4jEntityQueries.ENTITY_ALIAS );
} | [
"Find all the node representing the entity.\n\n@param executionEngine the {@link GraphDatabaseService} used to run the query\n@return an iterator over the nodes representing an entity"
] | [
"Gets the publisher of the specified type, if it is wrapped by the \"Flexible Publish\" publisher in a project.\nNull is returned if no such publisher is found.\n@param project The project\n@param type The type of the publisher",
"The Baseline Duration field shows the original span of time planned\nto comp... |
public static sslcertkey_sslvserver_binding[] get(nitro_service service, String certkey) throws Exception{
sslcertkey_sslvserver_binding obj = new sslcertkey_sslvserver_binding();
obj.set_certkey(certkey);
sslcertkey_sslvserver_binding response[] = (sslcertkey_sslvserver_binding[]) obj.get_resources(service);
r... | [
"Use this API to fetch sslcertkey_sslvserver_binding resources of given name ."
] | [
"Destroys all resource requests in requestQueue.\n\n@param requestQueue The queue for which all resource requests are to be\ndestroyed.",
"Set a knot color.\n@param n the knot index\n@param color the color",
"Flatten a list of test suite results into a collection of results grouped by test class.\nThis method b... |
public void retrieveEngine() throws GeneralSecurityException, IOException {
if (serverEngineFactory == null) {
return;
}
engine = serverEngineFactory.retrieveHTTPServerEngine(nurl.getPort());
if (engine == null) {
engine = serverEngineFactory.getHTTPServerEngine(n... | [
"Post-configure retreival of server engine."
] | [
"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\... |
private long getTotalUploadSize() throws IOException {
long size = 0;
for (Map.Entry<String, File> entry : files.entrySet()) {
size += entry.getValue().length();
}
for (Map.Entry<String, InputStream> entry : fileStreams.entrySet()) {
size += entry.getValue().avai... | [
"used for upload progress"
] | [
"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",
"Converts a submatrix into an extract matrix operation.\n@param variableTarget The variable in which the submatrix is extrac... |
private InputStream connect(String url) throws IOException {
URLConnection conn = new URL(URL_BASE + url).openConnection();
conn.setConnectTimeout(CONNECT_TIMEOUT);
conn.setReadTimeout(READ_TIMEOUT);
conn.setRequestProperty("User-Agent", USER_AGENT);
return conn.getInputStream();
} | [
"Open the connection to the server.\n\n@param url the url to connect to\n@return returns the input stream for the connection\n@throws IOException cannot get result"
] | [
"Set the classpath for loading the driver.\n\n@param classpath the classpath",
"Get a random sample of k out of n elements.\n\nSee Algorithm S, D. E. Knuth, The Art of Computer Programming, Vol. 2, p.142.",
"Sets a string that will be prepended to the JAR file's data.\n\n@param value the prefix, or {@code null}... |
public void add(final IndexableTaskItem taskItem) {
this.dependsOnTaskGroup.addPostRunDependentTaskGroup(taskItem.taskGroup());
this.collection.add(taskItem);
} | [
"Adds a \"Post Run\" task to the collection.\n\n@param taskItem the \"Post Run\" task"
] | [
"Build a Count-Query based on aQuery\n@param aQuery\n@return The count query",
"Add all elements in the iterable to the collection.\n\n@param target\n@param iterable\n@return true if the target was modified, false otherwise",
"return the list of FormInputs that match this element\n\n@param element\n@return",
... |
@Override
public void init(NamedList args) {
Object regex = args.remove(PARAM_REGEX);
if (null == regex) {
throw new SolrException(ErrorCode.SERVER_ERROR, "Missing required init parameter: " + PARAM_REGEX);
}
try {
m_regex = Pattern.compile(regex.toString());... | [
"Read the parameters on initialization.\n\n@see org.apache.solr.update.processor.UpdateRequestProcessorFactory#init(org.apache.solr.common.util.NamedList)"
] | [
"Generate a unique ID across the cluster\n@return generated ID",
"Get a setted section knowing his title\n\nN.B. this search only into section list and bottom section list.\n@param title is the title of the section\n@return the section with title or null if the section is not founded",
"Demonstrates how to add ... |
public static route6[] get(nitro_service service) throws Exception{
route6 obj = new route6();
route6[] response = (route6[])obj.get_resources(service);
return response;
} | [
"Use this API to fetch all the route6 resources that are configured on netscaler."
] | [
"Start a managed server.\n\n@param factory the boot command factory",
"Shuts down a managed domain container. The servers are first stopped, then the host controller is shutdown.\n\n@param client the client used to communicate with the server\n@param timeout the graceful shutdown timeout, a value of {@code -1} w... |
@Nullable
@VisibleForTesting
protected PolygonSymbolizer createPolygonSymbolizer(final PJsonObject styleJson) {
if (this.allowNullSymbolizer && !styleJson.has(JSON_FILL_COLOR)) {
return null;
}
final PolygonSymbolizer symbolizer = this.styleBuilder.createPolygonSymbolizer();... | [
"Add a polygon symbolizer definition to the rule.\n\n@param styleJson The old style."
] | [
"todo remove, here only for binary compatibility of elytron subsystem, drop once it is in.",
"Create a temporary directory under a given workspace",
"Called when a drawer has settled in a completely open state.",
"Initialize the fat client for the given store.\n\n1. Updates the coordinatorMetadata 2.Gets the ... |
public static int numberAwareCompareTo(Comparable self, Comparable other) {
NumberAwareComparator<Comparable> numberAwareComparator = new NumberAwareComparator<Comparable>();
return numberAwareComparator.compare(self, other);
} | [
"Provides a method that compares two comparables using Groovy's\ndefault number aware comparator.\n\n@param self a Comparable\n@param other another Comparable\n@return a -ve number, 0 or a +ve number according to Groovy's compareTo contract\n@since 1.6.0"
] | [
"Issue the database statements to create the table associated with a table configuration.\n\n@param connectionSource\nconnectionSource Associated connection source.\n@param tableConfig\nHand or spring wired table configuration. If null then the class must have {@link DatabaseField}\nannotations.\n@return The number... |
public void setCloseConnectionWatchTimeout(long closeConnectionWatchTimeout, TimeUnit timeUnit) {
this.closeConnectionWatchTimeoutInMs = TimeUnit.MILLISECONDS.convert(closeConnectionWatchTimeout, timeUnit);
} | [
"Sets the time to wait when close connection watch threads are enabled. 0 = wait forever.\n@param closeConnectionWatchTimeout the watchTimeout to set\n@param timeUnit Time granularity"
] | [
"Use this API to fetch all the systemcollectionparam resources that are configured on netscaler.",
"Create a clone of the Renderer. This method is the base of the prototype mechanism implemented\nto avoid create new objects from RendererBuilder. Pay an special attention implementing clone\nmethod in Renderer subt... |
private void processHyperlinkData(Task task, byte[] data)
{
if (data != null)
{
int offset = 12;
String hyperlink;
String address;
String subaddress;
offset += 12;
hyperlink = MPPUtility.getUnicodeString(data, offset);
offset += ((hyperlink.... | [
"This method is used to extract the task hyperlink attributes\nfrom a block of data and call the appropriate modifier methods\nto configure the specified task object.\n\n@param task task instance\n@param data hyperlink data block"
] | [
"Use this API to fetch all the nsconfig resources that are configured on netscaler.",
"Given a field node, checks if we are calling a private field from an inner class.",
"Visit an exported package of the current module.\n\n@param packaze the qualified name of the exported package.\n@param access the access fla... |
public void setWeekDays(SortedSet<WeekDay> weekDays) {
final SortedSet<WeekDay> newWeekDays = null == weekDays ? new TreeSet<WeekDay>() : weekDays;
SortedSet<WeekDay> currentWeekDays = m_model.getWeekDays();
if (!currentWeekDays.equals(newWeekDays)) {
conditionallyRemoveExceptionsOn... | [
"Set the weekdays at which the event should take place.\n@param weekDays the weekdays at which the event should take place."
] | [
"Solve the using the lower triangular matrix in LU. Diagonal elements are assumed\nto be 1",
"Create a forward curve from forwards given by a LIBORMonteCarloModel.\n\n@param name name of the forward curve.\n@param model Monte Carlo model providing the forwards.\n@param startTime time at which the curve ... |
public static Trajectory getTrajectoryByID(List<? extends Trajectory> t, int id){
Trajectory track = null;
for(int i = 0; i < t.size() ; i++){
if(t.get(i).getID()==id){
track = t.get(i);
break;
}
}
return track;
} | [
"Finds trajectory by ID\n@param t List of Trajectories\n@param id ID of the trajectorie\n@return Trajectory with ID=id"
] | [
"make it public for CLI interaction to reuse JobContext",
"Traces the time taken just by the fat client inside Coordinator to\nprocess this request\n\n\n@param operationType\n@param OriginTimeInMs - Original request time in Http Request\n@param RequestStartTimeInMs - Time recorded just before fat client\nstarted ... |
protected ObjectPool setupPool(JdbcConnectionDescriptor jcd)
{
log.info("Create new ObjectPool for DBCP connections:" + jcd);
try
{
ClassHelper.newInstance(jcd.getDriver());
}
catch (InstantiationException e)
{
log.fatal("Unable to i... | [
"Returns a new ObjectPool for the specified connection descriptor.\nOverride this method to setup your own pool.\n@param jcd the connection descriptor for which to set up the pool\n@return a newly created object pool"
] | [
"Checks the preconditions for creating a new ParseDateTimeAbstract processor with date format and locale.\n\n@param dateFormat\nthe date format to use\n@param locale\nthe Locale used to parse the date\n@throws NullPointerException\nif dateFormat or locale is null",
"Retrieves the earliest start date for all assig... |
private List<EnrollmentTerm> parseEnrollmentTermList(final List<Response> responses) {
return responses.stream().
map(this::parseEnrollmentTermList).
flatMap(Collection::stream).
collect(Collectors.toList());
} | [
"a useless object at the top level of the response JSON for no reason at all."
] | [
"Called when remote end send a message to this connection\n@param receivedMessage the message received\n@return this context",
"Sets the time warp.\n\n@param l the new time warp",
"The service name to be removed. Can be overridden for unusual service naming patterns\n@param name The name of the resource being r... |
public boolean isObjectsFieldValueDefault(Object object) throws SQLException {
Object fieldValue = extractJavaFieldValue(object);
return isFieldValueDefault(fieldValue);
} | [
"Return whether or not the data object has a default value passed for this field of this type."
] | [
"This method finds the start of the next working period.\n\n@param cal current Calendar instance",
"Returns the intersection of this range with the given range, a range which includes those addresses in both this and the given rqnge.\n@param other\n@return",
"Start the chain of execution running.\n\n@throws Ill... |
public static Date getDateFromLong(long date)
{
TimeZone tz = TimeZone.getDefault();
return (new Date(date - tz.getRawOffset()));
} | [
"Creates a date from the equivalent long value. This conversion\ntakes account of the time zone.\n\n@param date date expressed as a long integer\n@return new Date instance"
] | [
"Clear JobContext of current thread",
"Calculate start dates for a weekly recurrence.\n\n@param calendar current date\n@param frequency frequency\n@param dates array of start dates",
"A find query only given as criterion. Leave it to MongoDB's own parser to handle it.\n\n@return the {@link Rule} to identify a f... |
public Weld addPackages(boolean scanRecursively, Class<?>... packageClasses) {
for (Class<?> packageClass : packageClasses) {
addPackage(scanRecursively, packageClass);
}
return this;
} | [
"Packages of the specified classes will be scanned and found classes will be added to the set of bean classes for the synthetic bean archive.\n\n@param scanRecursively\n@param packageClasses\n@return self"
] | [
"Given a list of store definitions return a set of store names\n\n@param storeDefList The list of store definitions\n@return Returns a set of store names",
"Print an extended attribute value.\n\n@param writer parent MSPDIWriter instance\n@param value attribute value\n@param type type of the value being passed\n@r... |
protected InputStream getCompressorInputStream(InputStream inputStream,
CompressionType compressionType) throws IOException {
switch (compressionType) {
case NONE:
return inputStream;
case GZIP:
return new GZIPInputStream(inputStream);
case BZ2:
return new BZip2CompressorInputStream(new BufferedInpu... | [
"Returns an input stream that applies the required decompression to the\ngiven input stream.\n\n@param inputStream\nthe input stream with the (possibly compressed) data\n@param compressionType\nthe kind of compression\n@return an input stream with decompressed data\n@throws IOException\nif there was a problem creat... | [
"Use this API to fetch all the dnsnsecrec resources that are configured on netscaler.\nThis uses dnsnsecrec_args which is a way to provide additional arguments while fetching the resources.",
"Answer the SQL-Clause for a FieldCriteria\n\n@param c FieldCriteria\n@param cld ClassDescriptor",
"Determines if we nee... |
public synchronized void init() {
channelFactory = new NioClientSocketChannelFactory(
Executors.newCachedThreadPool(),
Executors.newCachedThreadPool());
datagramChannelFactory = new NioDatagramChannelFactory(
Executors.newCachedThreadPool());
tim... | [
"Initialize; cached threadpool is safe as it is releasing resources automatically if idle"
] | [
"Send ourselves \"updates\" about any tracks that were loaded before we started, since we missed them.",
"Returns the text content to any HTML.\n\n@param html the HTML\n\n@return the text content",
"Use this API to fetch all the dnsnsecrec resources that are configured on netscaler.",
"This method retrieves a... |
private void showGlobalContextActionBar() {
ActionBar actionBar = getActionBar();
actionBar.setDisplayShowTitleEnabled(true);
actionBar.setTitle(R.string.app_name);
} | [
"Per the navigation drawer design guidelines, updates the action bar to show the global app\n'context', rather than just what's in the current screen."
] | [
"This method is used to configure the format pattern.\n\n@param patterns new format patterns",
"Find container env.\n\n@param ctx the container context\n@param dump the exception dump\n@return valid container or null",
"Remove a handler from the list\n@param toRemove The handler to remove. Any handler object th... |
public void execute(CommandHandler handler,
int timeout,
TimeUnit unit) throws
CommandLineException,
InterruptedException, ExecutionException, TimeoutException {
ExecutableBuilder builder = new ExecutableBuilder() {
CommandContext c = newTimeoutCommand... | [
"public for testing purpose"
] | [
"Process data for an individual calendar.\n\n@param row calendar data",
"Analyze all source code using the specified RuleSet and return the report results.\n\n@param ruleSet - the RuleSet to apply to each source component; must not be null.\n@return the results from applying the RuleSet to all of the source",
"... |
public static sslvserver_sslciphersuite_binding[] get(nitro_service service, String vservername) throws Exception{
sslvserver_sslciphersuite_binding obj = new sslvserver_sslciphersuite_binding();
obj.set_vservername(vservername);
sslvserver_sslciphersuite_binding response[] = (sslvserver_sslciphersuite_binding[])... | [
"Use this API to fetch sslvserver_sslciphersuite_binding resources of given name ."
] | [
"Use this API to unset the properties of csparameter resource.\nProperties that need to be unset are specified in args array.",
"This method writes data for a single calendar to a Planner file.\n\n@param mpxjCalendar MPXJ calendar instance\n@param plannerCalendar Planner calendar instance\n@throws JAXBException o... |
public CurrencyQueryBuilder setNumericCodes(int... codes) {
return set(CurrencyQuery.KEY_QUERY_NUMERIC_CODES,
Arrays.stream(codes).boxed().collect(Collectors.toList()));
} | [
"Set the numeric code. Setting it to -1 search for currencies that have no numeric code.\n\n@param codes the numeric codes.\n@return the query for chaining."
] | [
"Determines a histogram of contiguous runs of partitions within a zone.\nI.e., for each run length of contiguous partitions, how many such runs\nare there.\n\nDoes not correctly address \"wrap around\" of partition IDs (i.e., the fact\nthat partition ID 0 is \"next\" to partition ID 'max')\n\n@param cluster\n@param... |
public List<Addon> listAppAddons(String appName) {
return connection.execute(new AppAddonsList(appName), apiKey);
} | [
"List the addons already added to an app.\n@param appName new of the app\n@return a list of add-ons"
] | [
"Writes the results of the processing to a file.",
"Helper method that stores in a hash map how often a certain key occurs.\nIf the key has not been encountered yet, a new entry is created for it in\nthe map. Otherwise the existing value for the key is incremented.\n\n@param map\nthe map where the counts are stor... |
@Nonnull
protected Payload getPayload(final String testName) {
// Get the current bucket.
final TestBucket testBucket = buckets.get(testName);
// Lookup Payloads for this test
if (testBucket != null) {
final Payload payload = testBucket.getPayload();
if (null... | [
"Return the Payload attached to the current active bucket for |test|.\nAlways returns a payload so the client doesn't crash on a malformed\ntest definition.\n\n@param testName test name\n@return pay load attached to the current active bucket\n@deprecated Use {@link #getPayload(String, Bucket)} instead"
] | [
"Handle slop for nodes that are no longer part of the cluster. It may not\nalways be the case. For example, shrinking a zone or deleting a store.",
"Use this API to fetch systemsession resources of given names .",
"Retrieve the default aliases to be applied to MPXJ task and resource fields.\n\n@return map of al... |
public static String readFlowId(Message message) {
if (!(message instanceof SoapMessage)) {
return null;
}
String flowId = null;
Header hdFlowId = ((SoapMessage)message).getHeader(FLOW_ID_QNAME);
if (hdFlowId != null) {
if (hdFlowId.getObject() instanceof ... | [
"Read flow id.\n\n@param message the message\n@return flow id from the message"
] | [
"Build a compact representation of the ModelNode.\n@param node The model\n@return A single line containing the multi lines ModelNode.toString() content.",
"this remove the linebreak.\n\n@param input\nthe input\n@param patternStr\nthe pattern str\n@return the string",
"The method determines if the type can be re... |
public Collection getReaders(Object obj)
{
checkTimedOutLocks();
Identity oid = new Identity(obj,getBroker());
return getReaders(oid);
} | [
"returns a collection of Reader LockEntries for object obj.\nIf no LockEntries could be found an empty Vector is returned."
] | [
"Use this API to fetch the statistics of all appfwpolicy_stats resources that are configured on netscaler.",
"Create a transformation which takes the alignment settings into account.",
"Constructs a Google APIs HTTP client with the associated credentials.",
"Replace HTML entities\n@param content Content\n@par... |
public void populateFromAttributes(
@Nonnull final Template template,
@Nonnull final Map<String, Attribute> attributes,
@Nonnull final PObject requestJsonAttributes) {
if (requestJsonAttributes.has(JSON_REQUEST_HEADERS) &&
requestJsonAttributes.getObject(JSON_... | [
"Process the requestJsonAttributes using the attributes and the MapfishParser and add all resulting\nvalues to this values object.\n\n@param template the template of the current request.\n@param attributes the attributes that will be used to add values to this values object\n@param requestJsonAttributes the json da... | [
"Adds a handler for a mouse type event on the map.\n\n@param obj The object that the event should be registered on.\n@param type Type of the event to register against.\n@param h Handler that will be called when the event occurs.",
"Login the user and redirect back to original URL. If no\noriginal URL found then r... |
public static <T, C extends Comparable<? super C>> List<T> sortBy(Iterable<T> iterable,
final Functions.Function1<? super T, C> key) {
return ListExtensions.sortInplaceBy(Lists.newArrayList(iterable), key);
} | [
"Creates a sorted list that contains the items of the given iterable. The resulting list is sorted according to\nthe order induced by applying a key function to each element which yields a comparable criteria.\n\n@param iterable\nthe elements to be sorted. May not be <code>null</code>.\n@param key\nthe key function... | [
"Return the \"common\" configuration set name. By default it is \"common\"\n@return the \"common\" conf set name",
"Use this API to fetch tmsessionpolicy_binding resource of given name .",
"Sends this request while monitoring its progress and returns a BoxAPIResponse containing the server's response.\n\n<p>A Pr... |
private void executePlan(RebalancePlan rebalancePlan) {
logger.info("Starting to execute rebalance Plan!");
int batchCount = 0;
int partitionStoreCount = 0;
long totalTimeMs = 0;
List<RebalanceBatchPlan> entirePlan = rebalancePlan.getPlan();
int numBatches = entirePlan.... | [
"Executes the rebalance plan. Does so batch-by-batch. Between each batch,\nstatus is dumped to logger.info.\n\n@param rebalancePlan"
] | [
"Ends interception context if it was previously stated. This is indicated by a local variable with index 0.",
"Checks if this has the passed suffix\n\n@param suffix is a Bytes object to compare to this\n@return true or false\n@since 1.1.0",
"Gets the host-ignore data for a slave host running the given version.\... |
public static int queryForInt(Statement stmt, String sql, int nullvalue) {
try {
ResultSet rs = stmt.executeQuery(sql);
try {
if (!rs.next())
return nullvalue;
return rs.getInt(1);
} finally {
rs.close();
}
} catch (SQLException e) {
throw... | [
"Runs a query that returns a single int."
] | [
"Write the table configuration to a buffered writer.",
"Checks whether the property of the given name is allowed for the model element.\n\n@param defClass The class of the model element\n@param propertyName The name of the property\n@return <code>true</code> if the property is allowed for this type of model e... |
public Boolean getBoolean(String fieldName) {
return hasValue(fieldName) ? Boolean.valueOf(String.valueOf(resultMap.get(fieldName))) : null;
} | [
"Returns the value of the identified field as a Boolean.\n@param fieldName the name of the field\n@return the value of the field as a Boolean"
] | [
"Producers returned from this method are not validated. Internal use only.",
"Extract resource group from a resource ID string.\n@param id the resource ID string\n@return the resource group name",
"Converts a list of dates to a Json array with the long representation of the dates as strings.\n@param individualD... |
public void process(String name) throws Exception
{
ProjectFile file = new UniversalProjectReader().read(name);
for (Task task : file.getTasks())
{
if (!task.getSummary())
{
System.out.print(task.getWBS());
System.out.print("\t");
System.out.pri... | [
"Dump data for all non-summary tasks to stdout.\n\n@param name file name"
] | [
"Installs a remoting stream server for a domain instance\n@param serviceTarget the service target to install the services into\n@param endpointName the name of the endpoint to install the stream server into\n@param networkInterfaceBinding the network interface binding\n@param port the port\n@param securityRealm the... |
public String getAuthorizationUrl(OAuth1RequestToken oAuthRequestToken, Permission permission) {
OAuth10aService service = new ServiceBuilder(apiKey)
.apiSecret(sharedSecret)
.build(FlickrApi.instance());
String authorizationUrl = service.getAuthorizationUrl(oAuthRe... | [
"Get the auth URL, this is step two of authorization.\n\n@param oAuthRequestToken\nthe token from a {@link AuthInterface#getRequestToken} call."
] | [
"Find any standard methods the user has 'underridden' in their type.",
"Returns an iterable containing the items in this folder sorted by name and direction.\n@param sort the field to sort by, can be set as `name`, `id`, and `date`.\n@param direction the direction to display the item results.\n@param fields the f... |
public static String createCustomExpressionInvocationText(CustomExpression customExpression, String customExpName, boolean usePreviousFieldValues) {
String stringExpression;
if (customExpression instanceof DJSimpleExpression) {
DJSimpleExpression varexp = (DJSimpleExpression) customExpressio... | [
"If you register a CustomExpression with the name \"customExpName\", then this will create the text needed\nto invoke it in a JRDesignExpression\n\n@param customExpName\n@param usePreviousFieldValues\n@return"
] | [
"Sets a custom configuration attribute.\n@param attributeName the attribute name. Names starting with\n{@link #JDBC_PROPERTY_NAME_PREFIX} will be used (without the prefix) by the\nConnectionFactory when creating connections from DriverManager\n(not used for external DataSource connections). Names starting with\n{@l... |
private static String convertPathToResource(String path) {
File file = new File(path);
List<String> parts = new ArrayList<String>();
do {
parts.add(file.getName());
file = file.getParentFile();
}
while (file != null);
StringBuffer sb = new StringB... | [
"Converts any path into something that can be placed in an Android directory.\n\nTraverses any subdirectories and flattens it all into a single filename. Also\ngets rid of commonly seen illegal characters in tz identifiers, and lower cases\nthe entire thing.\n\n@param path the path to convert\n@return a flat path ... | [
"Searches the variables layers, top to bottom, for the iterable having all of it's items of the given type. Return\nnull if not found.",
"Remove a misc file.\n\n@param name the file name\n@param path the relative path\n@param existingHash the existing hash\n@param isDirectory whether the file is a directory or no... |
private void ensureConversion(FieldDescriptorDef fieldDef, String checkLevel) throws ConstraintException
{
if (CHECKLEVEL_NONE.equals(checkLevel))
{
return;
}
// we issue a warning if we encounter a field with a java.util.Date java type without a conversion
... | [
"Constraint that ensures that the field has a conversion if the java type requires it. Also checks the conversion class.\n\n@param fieldDef The field descriptor\n@param checkLevel The current check level (this constraint is checked in basic (partly) and strict)\n@exception ConstraintException If the conversion cl... | [
"Use this API to rename a gslbservice resource.",
"Executes the rebalance plan. Does so batch-by-batch. Between each batch,\nstatus is dumped to logger.info.\n\n@param rebalancePlan",
"Exit reporting up to distributor, using information gained from status reports to the LineCountManager\n\n@return a boolean of ... |
private static void listTaskNotes(ProjectFile file)
{
for (Task task : file.getTasks())
{
String notes = task.getNotes();
if (notes.length() != 0)
{
System.out.println("Notes for " + task.getName() + ": " + notes);
}
}
System.out.println();
... | [
"This method lists any notes attached to tasks.\n\n@param file MPX file"
] | [
"Return the number of days between startDate and endDate given the\nspecific daycount convention.\n\n@param startDate The start date given as a {@link org.threeten.bp.LocalDate}.\n@param endDate The end date given as a {@link org.threeten.bp.LocalDate}.\n@param convention A convention string.\n@return The number of... |
public Iterable<BoxRetentionPolicyAssignment.Info> getAllAssignments(int limit, String ... fields) {
return this.getAssignments(null, limit, fields);
} | [
"Returns iterable with all assignments of this retention policy.\n@param limit the limit of entries per response. The default value is 100.\n@param fields the fields to retrieve.\n@return an iterable containing all assignments."
] | [
"Convert a wavelength to an RGB value.\n@param wavelength wavelength in nanometres\n@return the RGB value",
"Use this API to fetch responderpolicylabel_responderpolicy_binding resources of given name .",
"Returns PatternParser used to parse the conversion string. Subclasses may\noverride this to return a subcla... |
public ClientLayerInfo securityClone(ClientLayerInfo original) {
// the data is explicitly copied as this assures the security is considered when copying.
if (null == original) {
return null;
}
ClientLayerInfo client = null;
String layerId = original.getServerLayerId();
if (securityContext.isLayerVisible... | [
"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"
] | [
"Returns a \"clean\" version of the given filename in which spaces have\nbeen converted to dashes and all non-alphanumeric chars are underscores.",
"Handles an initial response from a PUT or PATCH operation response by polling the status of the operation\nasynchronously, once the operation finishes emits the fina... |
public PreparedStatement getUpdateStatement(ClassDescriptor cds) throws PersistenceBrokerSQLException, PersistenceBrokerException
{
try
{
return cds.getStatementsForClass(m_conMan).getUpdateStmt(m_conMan.getConnection());
}
catch (SQLException e)
{
... | [
"return a prepared Update Statement fitting to the given ClassDescriptor"
] | [
"This method processes any extended attributes associated with a resource.\n\n@param xml MSPDI resource instance\n@param mpx MPX resource instance",
"Pass the activity you use the drawer in ;)\nThis is required if you want to set any values by resource\n\n@param activity\n@return",
"Sets the permissions associa... |
public static base_response add(nitro_service client, snmpuser resource) throws Exception {
snmpuser addresource = new snmpuser();
addresource.name = resource.name;
addresource.group = resource.group;
addresource.authtype = resource.authtype;
addresource.authpasswd = resource.authpasswd;
addresource.privtyp... | [
"Use this API to add snmpuser."
] | [
"Sets the top padding character for all cells in the row.\n@param paddingTopChar new padding character, ignored if null\n@return this to allow chaining",
"Checks length and compare order of field names with declared PK fields in metadata.",
"SuppressWarnings I really want to return HazeltaskTasks instead of Run... |
private static void parseSsextensions(JSONObject modelJSON,
Diagram current) throws JSONException {
if (modelJSON.has("ssextensions")) {
JSONArray array = modelJSON.getJSONArray("ssextensions");
for (int i = 0; i < array.length(); i++) {
... | [
"adds all json extension to an diagram\n@param modelJSON\n@param current\n@throws org.json.JSONException"
] | [
"Build a stack trace for this path. This can be used in generating more meaningful exceptions\nwhile using Crawljax in conjunction with JUnit for example.\n\n@return a array of StackTraceElements denoting the steps taken by this path. The first\nelement [0] denotes the last {@link Eventable} on this path while the ... |
public synchronized Set<RegistrationPoint> getRegistrationPoints() {
Set<RegistrationPoint> result = new HashSet<>();
for (List<RegistrationPoint> registrationPoints : registrationPoints.values()) {
result.addAll(registrationPoints);
}
return Collections.unmodifiableSet(resul... | [
"Get all registration points associated with this registration.\n\n@return all registration points. Will not be {@code null} but may be empty"
] | [
"Sets the right padding for all cells in the table.\n@param paddingRight new padding, ignored if smaller than 0\n@return this to allow chaining",
"Returns the body of the request. This method is used to read posted JSON data.\n\n@param request The request.\n\n@return String representation of the request's body.\n... |
public Relationship createRelationshipForEmbeddedAssociation(GraphDatabaseService executionEngine, AssociationKey associationKey, EntityKey embeddedKey) {
String query = initCreateEmbeddedAssociationQuery( associationKey, embeddedKey );
Object[] queryValues = createRelationshipForEmbeddedQueryValues( associationKey... | [
"Give an embedded association, creates all the nodes and relationships required to represent it.\nIt assumes that the entity node containing the association already exists in the db.\n\n@param executionEngine the {@link GraphDatabaseService} to run the query\n@param associationKey the {@link AssociationKey} identif... | [
"Ask the specified player for the specified artwork from the specified media slot, first checking if we have a\ncached copy.\n\n@param artReference uniquely identifies the desired artwork\n@param trackType the kind of track that owns the artwork\n\n@return the artwork, if it was found, or {@code null}\n\n@throws Il... |
@UiThread
public int getParentAdapterPosition() {
int flatPosition = getAdapterPosition();
if (flatPosition == RecyclerView.NO_POSITION) {
return flatPosition;
}
return mExpandableAdapter.getNearestParentPosition(flatPosition);
} | [
"Returns the adapter position of the Parent associated with this ParentViewHolder\n\n@return The adapter position of the Parent 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 ... | [
"Adds a slash to a path if it doesn't end with a slash.\n\n@param folderName The path to append a possible slash.\n@return The new, correct path.",
"Expands all parents in a range of indices in the list of parents.\n\n@param startParentPosition The index at which to to start expanding parents\n@param parentCount ... |
public static List<String> getValueList(List<String> valuePairs, String delim) {
List<String> valueList = Lists.newArrayList();
for(String valuePair: valuePairs) {
String[] value = valuePair.split(delim, 2);
if(value.length != 2)
throw new VoldemortException("Inva... | [
"Utility function that gives list of values from list of value-pair\nstrings.\n\n@param valuePairs List of value-pair strings\n@param delim Delimiter that separates the value pair\n@returns The list of values; empty if no value-pair is present, The even\nelements are the first ones of the value pair, and the odd\ne... | [
"Checks to see if a subsystem resource has already been registered for the deployment.\n\n@param subsystemName the name of the subsystem\n\n@return {@code true} if the subsystem exists on the deployment otherwise {@code false}",
"Compares two annotated types and returns true if they are the same",
"Gets any app... |
protected void applyBanners() {
DynamicReportOptions options = getReport().getOptions();
if (options.getFirstPageImageBanners().isEmpty() && options.getImageBanners().isEmpty()){
return;
}
/*
First create image banners for the first page only
*/
JRDesignBand title = (JRDe... | [
"Create the image elements for the banners tha goes into the\ntitle and header bands depending on the case"
] | [
"Close it and ignore any exceptions.",
"Converts this address to a prefix length\n\n@return the prefix of the indicated IP type represented by this address or null if this address is valid but cannot be represented by a network prefix length\n@throws AddressStringException if the address is invalid",
"Try to se... |
public static csvserver_copolicy_binding[] get(nitro_service service, String name) throws Exception{
csvserver_copolicy_binding obj = new csvserver_copolicy_binding();
obj.set_name(name);
csvserver_copolicy_binding response[] = (csvserver_copolicy_binding[]) obj.get_resources(service);
return response;
} | [
"Use this API to fetch csvserver_copolicy_binding resources of given name ."
] | [
"Wraps a StatisticsMatrix around 'm'. Does NOT create a copy of 'm' but saves a reference\nto it.",
"Returns the current transaction for the calling thread.\n\n@throws org.odmg.TransactionNotInProgressException\n{@link org.odmg.TransactionNotInProgressException} if no transaction was found.",
"Use this API to ... |
@JavaScriptMethod
@SuppressWarnings({"UnusedDeclaration"})
public LoadBuildsResponse loadBuild(String buildId) {
LoadBuildsResponse response = new LoadBuildsResponse();
// When we load a new build we need also to reset the promotion plugin.
// The null plugin is related to 'None' plugin.... | [
"Load the related repositories, plugins and a promotion config associated to the buildId.\nCalled from the UI.\n\n@param buildId - The unique build id.\n@return LoadBuildsResponse e.g. list of repositories, plugins and a promotion config."
] | [
"Gets axis dimension\n@param axis Axis. It might be either {@link Layout.Axis#X X} or\n{@link Layout.Axis#Y Y} or {@link Layout.Axis#Z Z}\n@return axis dimension",
"Retrieve an enterprise field value.\n\n@param index field index\n@return field value",
"Disposes resources created to service this connection conte... |
private void addApiDocRoots(String packageListUrl) {
BufferedReader br = null;
packageListUrl = fixApiDocRoot(packageListUrl);
try {
URL url = new URL(packageListUrl + "/package-list");
br = new BufferedReader(new InputStreamReader(url.openStream()));
String line;
while((line = br.readLine()) != ... | [
"Adds api doc roots from a link. The folder reffered by the link should contain a package-list\nfile that will be parsed in order to add api doc roots to this configuration\n@param packageListUrl"
] | [
"Use this API to fetch statistics of nsacl6_stats resource of given name .",
"Packages of the specified classes will be scanned and found classes will be added to the set of bean classes for the synthetic bean archive.\n\n@param scanRecursively\n@param packageClasses\n@return self",
"for testing purpose",
"Re... |
private List<ExpandableWrapper<P, C>> generateFlattenedParentChildList(List<P> parentList, Map<P, Boolean> savedLastExpansionState) {
List<ExpandableWrapper<P, C>> flatItemList = new ArrayList<>();
int parentCount = parentList.size();
for (int i = 0; i < parentCount; i++) {
P parent... | [
"Generates a full list of all parents and their children, in order. Uses Map to preserve\nlast expanded state.\n\n@param parentList A list of the parents from\nthe {@link ExpandableRecyclerAdapter}\n@param savedLastExpansionState A map of the last expanded state for a given parent key.\n@return A list of all parent... | [
"Sets the duration for the animation to be played.\n\n@param start the animation will start playing from the specified time\n@param end the animation will stop playing at the specified time\n\n@return {@code this}, so you can chain setProperty() calls.\n@throws IllegalArgumentException\nIf {@code start} is either n... |
private void setLanguageFilters(String filters) {
this.filterLanguages = new HashSet<>();
if (!"-".equals(filters)) {
Collections.addAll(this.filterLanguages, filters.split(","));
}
} | [
"Sets the set of language filters based on the given string.\n\n@param filters\ncomma-separates list of language codes, or \"-\" to filter all\nlanguages"
] | [
"The period of time to ban a node that gives an error on an operation.\n\n@param nodeBannagePeriod The period of time to ban the node\n@param unit The time unit of the given value\n\n@deprecated Use {@link #setFailureDetectorBannagePeriod(long)} instead",
"Generate a map of UUID values to field types.\n\n@return ... |
@Override
public final Double optDouble(final String key) {
double result = this.obj.optDouble(key, Double.NaN);
if (Double.isNaN(result)) {
return null;
}
return result;
} | [
"Get a property as a double or null.\n\n@param key the property name"
] | [
"Returns the vertex points in this hull.\n\n@return array of vertex points\n@see QuickHull3D#getVertices(double[])\n@see QuickHull3D#getFaces()",
"Return all Clients for a profile\n\n@param profileId ID of profile clients belong to\n@return collection of the Clients found\n@throws Exception exception",
"Returns... |
public final void debug(Object pObject)
{
getLogger().log(FQCN, Level.DEBUG, pObject, null);
} | [
"generate a message for loglevel DEBUG\n\n@param pObject the message Object"
] | [
"Joins the given iterable objects using the given separator into a single string.\n\n@return the joined string or an empty string if iterable is null",
"Use this API to fetch all the vrid6 resources that are configured on netscaler.",
"This method is called by the ++ operator for the class CharSequence.\nIt inc... |
public static base_response add(nitro_service client, dnsview resource) throws Exception {
dnsview addresource = new dnsview();
addresource.viewname = resource.viewname;
return addresource.add_resource(client);
} | [
"Use this API to add dnsview."
] | [
"Sets this matrix equal to the matrix encoded in the array.\n\n@param numRows The number of rows.\n@param numCols The number of columns.\n@param rowMajor If the array is encoded in a row-major or a column-major format.\n@param data The formatted 1D array. Not modified.",
"Use this API to update clusternodegroup r... |
public static Timer getNamedTotalTimer(String timerName) {
long totalCpuTime = 0;
long totalSystemTime = 0;
int measurements = 0;
int timerCount = 0;
int todoFlags = RECORD_NONE;
Timer previousTimer = null;
for (Map.Entry<Timer, Timer> entry : registeredTimers.entrySet()) {
if (entry.getValue().name.e... | [
"Collect the total times measured by all known named timers of the given\nname. This is useful to add up times that were collected across separate\nthreads.\n\n@param timerName\n@return timer"
] | [
"Matrix inverse for symmetric positive definite matrices. For small matrices an unrolled\ncholesky is used. Otherwise a standard decomposition.\n\n@see UnrolledCholesky_DDRM\n@see LinearSolverFactory_DDRM#chol(int)\n\n@param mat (Input) SPD matrix\n@param result (Output) Inverted matrix.\n@return true if it could i... |
public void localCommit()
{
if (log.isDebugEnabled()) log.debug("commit was called");
if (!this.isInLocalTransaction)
{
throw new TransactionNotInProgressException("Not in transaction, call begin() before commit()");
}
try
{
if(!broker... | [
"Call commit on the underlying connection."
] | [
"retrieve a single reference- or collection attribute\nof a persistent instance.\n@param pInstance the persistent instance\n@param pAttributeName the name of the Attribute to load",
"Removes the expiration flag.",
"Allows the closure to be called for NullObject\n\n@param closure the closure to call on the objec... |
public void addRow(String primaryKeyColumnName, Map<String, Object> map)
{
Integer rowNumber = Integer.valueOf(m_rowNumber++);
map.put("ROW_NUMBER", rowNumber);
Object primaryKey = null;
if (primaryKeyColumnName != null)
{
primaryKey = map.get(primaryKeyColumnName);
}
... | [
"Add a row to the table. We have a limited understanding of the way\nBtrieve handles outdated rows, so we use what we think is a version number\nto try to ensure that we only have the latest rows.\n\n@param primaryKeyColumnName primary key column name\n@param map Map containing row data"
] | [
"Get the list of active tasks from the server.\n\n@return List of tasks\n@see <a href=\"https://console.bluemix.net/docs/services/Cloudant/api/active_tasks.html\">\nActive tasks</a>",
"Selects the single element of the collection for which the provided OQL query\npredicate is true.\n@param\tpredicate\tAn OQL bool... |
public RedwoodConfiguration clear(){
tasks = new LinkedList<Runnable>();
tasks.add(new Runnable(){ public void run(){
Redwood.clearHandlers();
Redwood.restoreSystemStreams();
Redwood.clearLoggingClasses();
} });
return this;
} | [
"Clear any custom configurations to Redwood\n@return this"
] | [
"Set the specific device class of the node.\n@param specificDeviceClass the specificDeviceClass to set\n@exception IllegalArgumentException thrown when the specific device class does not match\nthe generic device class.",
"Add utility routes the router\n\n@param router",
"Analyze all source code using the speci... |
void reset()
{
if (!hasStopped)
{
throw new IllegalStateException("cannot reset a non stopped queue poller");
}
hasStopped = false;
run = true;
lastLoop = null;
loop = new Semaphore(0);
} | [
"Will make the thread ready to run once again after it has stopped."
] | [
"Filter for public tweets on these languages.\n\n@param languages\nValid BCP 47 (http://tools.ietf.org/html/bcp47) language identifiers,\nand may represent any of the languages listed on Twitter's advanced search page\n(https://twitter.com/search-advanced), or \"und\" if no language could be detected.\nThese string... |
public static void sendMimeMessage(MimeMessage mimeMessage) {
try {
Transport.send(mimeMessage);
} catch (MessagingException e) {
throw new IllegalStateException("Can not send message " + mimeMessage, e);
}
} | [
"Send the message using the JavaMail session defined in the message\n\n@param mimeMessage Message to send"
] | [
"Returns the ARGB components for the pixel at the given coordinates\n\n@param x the x coordinate of the pixel component to grab\n@param y the y coordinate of the pixel component to grab\n@return an array containing ARGB components in that order.",
"Calculates ATM Bachelier implied volatilities.\n\n@see net.finmat... |
@Override
public void close() throws VoldemortException {
logger.debug("Close called for read-only store.");
this.fileModificationLock.writeLock().lock();
try {
if(isOpen) {
this.isOpen = false;
fileSet.close();
} else {
... | [
"Close the store."
] | [
"Updates the indices in the index buffer from a Java CharBuffer.\nAll of the entries of the input buffer are copied into\nthe storage for the index buffer. The new indices must be the\nsame size as the old indices - the index buffer size cannot be changed.\n@param data CharBuffer containing the new values\n@throws ... |
public int length() {
int length = 1 + 2 + deviceToken.length + 2 + payload.length;
final int marshalledLength = marshall().length;
assert marshalledLength == length;
return length;
} | [
"Returns the length of the message in bytes as it is encoded on the wire.\n\nApple require the message to be of length 255 bytes or less.\n\n@return length of encoded message in bytes"
] | [
"Appends a formatted line of code to the source.\n\n<p>Formatting supports {@code %s} and {@code %n$s}. Most args are converted according to their\n{@link Object#toString()} method, except that:<ul>\n<li> {@link Package} and {@link PackageElement} instances use their fully-qualified names\n(no \"package \" prefix).... |
public static final TimeUnit getTimeUnit(int value)
{
TimeUnit result = null;
switch (value)
{
case 1:
{
// Appears to mean "use the document format"
result = TimeUnit.ELAPSED_DAYS;
break;
}
case 2:
{
res... | [
"Convert an integer value into a TimeUnit instance.\n\n@param value time unit value\n@return TimeUnit instance"
] | [
"Creates an temporary directory. The created directory will be deleted when\ncommand will ended.",
"Layout which gets displayed if table is empty.\n\n@see org.opencms.ui.apps.user.I_CmsFilterableTable#getEmptyLayout()",
"Locate the no arg constructor for the class.",
"Add a Opacity bar to the color wheel.\n\n... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.