query stringlengths 74 6.1k | positive listlengths 1 1 | negative listlengths 9 9 |
|---|---|---|
public void pause(ServerActivityCallback requestCountListener) {
if (paused) {
throw ServerLogger.ROOT_LOGGER.serverAlreadyPaused();
}
this.paused = true;
listenerUpdater.set(this, requestCountListener);
if (activeRequestCountUpdater.get(this) == 0) {
if (listenerUpdater.compareAndSet(this, requestCountListener, null)) {
requestCountListener.done();
}
}
} | [
"Pause the current entry point, and invoke the provided listener when all current requests have finished.\n\nIf individual control point tracking is not enabled then the listener will be invoked straight away\n\n@param requestCountListener The listener to invoke"
] | [
"Notifies that multiple header items are changed.\n\n@param positionStart the position.\n@param itemCount the item count.",
"digest message with MD5\n\n@param source message\n@return 32 bit MD5 value (lower case)",
"Adds a port that serves the HTTP requests. If unspecified, cleartext HTTP on port 36462 is u... |
@SuppressWarnings("unchecked")
public <T> T getOptionValue(String name)
{
return (T) configurationOptions.get(name);
} | [
"Returns the configuration value with the specified name."
] | [
"Assigns a list of nodes in the cluster represented by this failure\ndetector configuration.\n\n@param nodes Collection of Node instances, usually determined from the\nCluster; must be non-null",
"This method is called to format a time value.\n\n@param value time value\n@return formatted time value",
"Acquire t... |
public static void setPropertySafely(Marshaller marshaller, String name, Object value) {
try {
marshaller.setProperty(name, value);
} catch (PropertyException e) {
LOGGER.warn(String.format("Can't set \"%s\" property to given marshaller", name), e);
}
} | [
"Try to set specified property to given marshaller\n\n@param marshaller specified marshaller\n@param name name of property to set\n@param value value of property to set"
] | [
"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",
"Produces the Soundex key for the given string.",
"Retrieve the default mapping between MPXJ task fields and Primavera wbs field names... |
public HttpConnection setRequestBody(final String input) {
try {
final byte[] inputBytes = input.getBytes("UTF-8");
return setRequestBody(inputBytes);
} catch (UnsupportedEncodingException e) {
// This should never happen as every implementation of the java platform is required
// to support UTF-8.
throw new RuntimeException(e);
}
} | [
"Set the String of request body data to be sent to the server.\n\n@param input String of request body data to be sent to the server\n@return an {@link HttpConnection} for method chaining"
] | [
"Connect to the HC and retrieve the current model updates.\n\n@param controller the server controller\n@param callback the operation completed callback\n\n@throws IOException for any error",
"Sets a string that will be prepended to the JAR file's data.\n\n@param value the prefix, or {@code null} for none.\n@retur... |
protected boolean isSecureLink(CmsObject cms, String vfsName, CmsSite targetSite, boolean secureRequest) {
return OpenCms.getStaticExportManager().isSecureLink(cms, vfsName, targetSite.getSiteRoot(), secureRequest);
} | [
"Checks if the link target is a secure link.<p\n\n@param cms the current CMS context\n@param vfsName the path of the link target\n@param targetSite the target site containing the detail page\n@param secureRequest true if the currently running request is secure\n\n@return true if the link should be a secure link"
] | [
"Destroys the internal connection handle and creates a new one.\n@throws SQLException",
"Reports a given exception as a RuntimeException, since the interface does\nnot allow us to throw checked exceptions directly.\n\n@param e\nthe exception to report\n@throws RuntimeException\nin all cases",
"Gets a first data... |
public void displayUseCases()
{
System.out.println();
for (int i = 0; i < useCases.size(); i++)
{
System.out.println("[" + i + "] " + ((UseCase) useCases.get(i)).getDescription());
}
} | [
"Disply available use cases."
] | [
"Obtains a Julian local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Julian local date-time, not null\n@throws DateTimeException if unable to create the date-time",
"To populate the dropdown list from the jelly",
"Generate a sql where-clause... |
public boolean isConnectionHandleAlive(ConnectionHandle connection) {
Statement stmt = null;
boolean result = false;
boolean logicallyClosed = connection.logicallyClosed.get();
try {
connection.logicallyClosed.compareAndSet(true, false); // avoid checks later on if it's marked as closed.
String testStatement = this.config.getConnectionTestStatement();
ResultSet rs = null;
if (testStatement == null) {
// Make a call to fetch the metadata instead of a dummy query.
rs = connection.getMetaData().getTables( null, null, KEEPALIVEMETADATA, METADATATABLE );
} else {
stmt = connection.createStatement();
stmt.execute(testStatement);
}
if (rs != null) {
rs.close();
}
result = true;
} catch (SQLException e) {
// connection must be broken!
result = false;
} finally {
connection.logicallyClosed.set(logicallyClosed);
connection.setConnectionLastResetInMs(System.currentTimeMillis());
result = closeStatement(stmt, result);
}
return result;
} | [
"Sends a dummy statement to the server to keep the connection alive\n@param connection Connection handle to perform activity on\n@return true if test query worked, false otherwise"
] | [
"Adds multiple observers using unique integer prefixes for each.\n\n@deprecated since 1.1.0. Replaced by {@link #setObserverProvider(String)} and\n{@link #getObserverProvider()}",
"Add a IN clause so the column must be equal-to one of the objects from the list passed in.",
"Record the resource request wait time... |
public static base_responses delete(nitro_service client, String Dnssuffix[]) throws Exception {
base_responses result = null;
if (Dnssuffix != null && Dnssuffix.length > 0) {
dnssuffix deleteresources[] = new dnssuffix[Dnssuffix.length];
for (int i=0;i<Dnssuffix.length;i++){
deleteresources[i] = new dnssuffix();
deleteresources[i].Dnssuffix = Dnssuffix[i];
}
result = delete_bulk_request(client, deleteresources);
}
return result;
} | [
"Use this API to delete dnssuffix resources of given names."
] | [
"Deletes a product from the database\n\n@param name String",
"Set the String of request body data to be sent to the server.\n\n@param input String of request body data to be sent to the server\n@return an {@link HttpConnection} for method chaining",
"If this address was resolved from a host, returns that host. ... |
@Override
public final String optString(final String key, final String defaultValue) {
String result = optString(key);
return result == null ? defaultValue : result;
} | [
"Get a property as a string or defaultValue.\n\n@param key the property name\n@param defaultValue the default value"
] | [
"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)",
"Read file content to string.\n\n@param filePath\nthe file path\n@return the string\n@throws IOException\nSignal... |
public static base_response unset(nitro_service client, lbsipparameters resource, String[] args) throws Exception{
lbsipparameters unsetresource = new lbsipparameters();
return unsetresource.unset_resource(client,args);
} | [
"Use this API to unset the properties of lbsipparameters resource.\nProperties that need to be unset are specified in args array."
] | [
"Return a string that ensures that no line is longer then 512 characters\nand lines are broken according to manifest specification.\n\n@param input The buffer containing the content that should be made safe\n@param newline The string to use to create newlines (usually \"\\n\" or\n\"\\r\\n\")\n@return The string wit... |
public static void main(String[] args) {
String[] s = {"there once was a man", "this one is a manic", "hey there", "there once was a mane", "once in a manger.", "where is one match?", "Jo3seph Smarr!", "Joseph R Smarr"};
for (int i = 0; i < 8; i++) {
for (int j = 0; j < 8; j++) {
System.out.println("s1: " + s[i]);
System.out.println("s2: " + s[j]);
System.out.println("edit distance: " + editDistance(s[i], s[j]));
System.out.println("LCS: " + longestCommonSubstring(s[i], s[j]));
System.out.println("LCCS: " + longestCommonContiguousSubstring(s[i], s[j]));
System.out.println();
}
}
} | [
"Tests the string edit distance function."
] | [
"Creates a spin wrapper for a data input. The data format of the\ninput is assumed to be XML.\n\n@param input the input to wrap\n@return the spin wrapper for the input\n\n@throws IllegalArgumentException in case an argument of illegal type is provided (such as 'null')",
"Use this API to fetch filterpolicy_csvserv... |
public Photoset getInfo(String photosetId) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_GET_INFO);
parameters.put("photoset_id", photosetId);
Response response = transportAPI.get(transportAPI.getPath(), parameters, apiKey, sharedSecret);
if (response.isError()) {
throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
}
Element photosetElement = response.getPayload();
Photoset photoset = new Photoset();
photoset.setId(photosetElement.getAttribute("id"));
User owner = new User();
owner.setId(photosetElement.getAttribute("owner"));
photoset.setOwner(owner);
Photo primaryPhoto = new Photo();
primaryPhoto.setId(photosetElement.getAttribute("primary"));
primaryPhoto.setSecret(photosetElement.getAttribute("secret")); // TODO verify that this is the secret for the photo
primaryPhoto.setServer(photosetElement.getAttribute("server")); // TODO verify that this is the server for the photo
primaryPhoto.setFarm(photosetElement.getAttribute("farm"));
photoset.setPrimaryPhoto(primaryPhoto);
// TODO remove secret/server/farm from photoset?
// It's rather related to the primaryPhoto, then to the photoset itself.
photoset.setSecret(photosetElement.getAttribute("secret"));
photoset.setServer(photosetElement.getAttribute("server"));
photoset.setFarm(photosetElement.getAttribute("farm"));
photoset.setPhotoCount(photosetElement.getAttribute("count_photos"));
photoset.setVideoCount(Integer.parseInt(photosetElement.getAttribute("count_videos")));
photoset.setViewCount(Integer.parseInt(photosetElement.getAttribute("count_views")));
photoset.setCommentCount(Integer.parseInt(photosetElement.getAttribute("count_comments")));
photoset.setDateCreate(photosetElement.getAttribute("date_create"));
photoset.setDateUpdate(photosetElement.getAttribute("date_update"));
photoset.setIsCanComment("1".equals(photosetElement.getAttribute("can_comment")));
photoset.setTitle(XMLUtilities.getChildValue(photosetElement, "title"));
photoset.setDescription(XMLUtilities.getChildValue(photosetElement, "description"));
photoset.setPrimaryPhoto(primaryPhoto);
return photoset;
} | [
"Get the information for a specified photoset.\n\nThis method does not require authentication.\n\n@param photosetId\nThe photoset ID\n@return The Photoset\n@throws FlickrException"
] | [
"Get the URL for the user's profile.\n\n@param userId\nThe user ID\n@return The URL\n@throws FlickrException",
"Add a '>=' clause so the column must be greater-than or equals-to the value.",
"Converts a duration to duration time units.\n\n@param value duration value\n@return duration time units",
"Remove a... |
protected LayoutManager getLayOutManagerObj(ActionInvocation _invocation) {
if (layoutManager == null || "".equals(layoutManager)){
LOG.warn("No valid LayoutManager, using ClassicLayoutManager");
return new ClassicLayoutManager();
}
Object los = conditionalParse(layoutManager, _invocation);
if (los instanceof LayoutManager){
return (LayoutManager) los;
}
LayoutManager lo = null;
if (los instanceof String){
if (LAYOUT_CLASSIC.equalsIgnoreCase((String) los))
lo = new ClassicLayoutManager();
else if (LAYOUT_LIST.equalsIgnoreCase((String) los))
lo = new ListLayoutManager();
else {
try {
lo = (LayoutManager) Class.forName((String) los).newInstance();
} catch (Exception e) {
LOG.warn("No valid LayoutManager: " + e.getMessage(),e);
}
}
}
return lo;
} | [
"Returns the export format indicated in the result-type parameter \"layoutManager\"\n@param _invocation\n@return"
] | [
"Load a configuration in from a text file.\n\n@return A config if any of the fields were set otherwise null on EOF.",
"Adds descriptions to the item.\n\n@param descriptions\nthe descriptions to add",
"Compute the A matrix from the Q and R matrices.\n\n@return The A matrix.",
"Takes the file, reads it in, and ... |
public static clusterinstance[] get(nitro_service service) throws Exception{
clusterinstance obj = new clusterinstance();
clusterinstance[] response = (clusterinstance[])obj.get_resources(service);
return response;
} | [
"Use this API to fetch all the clusterinstance resources that are configured on netscaler."
] | [
"Sets the specified boolean attribute to the specified value.\n\n@param name name of the attribute\n@param value value of the attribute\n@since 1.9.0",
"Use this API to fetch a appfwglobal_auditsyslogpolicy_binding resources.",
"Add all elements in the iterator to the collection.\n\n@param target\n@param iterat... |
public boolean attachComponent(GVRComponent component) {
if (component.getNative() != 0) {
NativeSceneObject.attachComponent(getNative(), component.getNative());
}
synchronized (mComponents) {
long type = component.getType();
if (!mComponents.containsKey(type)) {
mComponents.put(type, component);
component.setOwnerObject(this);
return true;
}
}
return false;
} | [
"Attach a component to this scene object.\n\nEach scene object has a list of components that may\nbe attached to it. Only one component of a particular type\ncan be attached. Components are retrieved based on their type.\n\n@return true if component is attached, false if a component of that class is already attache... | [
"Use this API to fetch the statistics of all nspbr6_stats resources that are configured on netscaler.",
"Get a misc file.\n\n@param root the root\n@param item the misc content item\n@return the misc file",
"Normalizes the matrix such that the Frobenius norm is equal to one.\n\n@param A The matrix that is to be ... |
@Override
public int getShadowSize() {
Element shadowElement = shadow.getElement();
shadowElement.setScrollTop(10000);
return shadowElement.getScrollTop();
} | [
"Returns the size of the shadow element"
] | [
"Mark for creation all newly introduced dependent references.\nMark for deletion all nullified dependent references.\n@return the list of created objects",
"Create a deep copy.\n\n@param bindAddress overwrites bind address when creating deep copy.\n@return a copy of the server setup configuration.",
"Gathers th... |
public Object getProxyTarget(){
try {
return Proxy.getInvocationHandler(this.connection).invoke(null, this.getClass().getMethod("getProxyTarget"), null);
} catch (Throwable t) {
throw new RuntimeException("BoneCP: Internal error - transaction replay log is not turned on?", t);
}
} | [
"This method will be intercepted by the proxy if it is enabled to return the internal target.\n@return the target."
] | [
"Returns the text content to any HTML.\n\n@param html the HTML\n\n@return the text content",
"Returns the connection that has been saved or null if none.",
"Takes a numeric string value and converts it to a integer between 0 and 100.\n\nreturns 0 if the string is not numeric.\n\n@param percentage - A numeric st... |
private Month readOptionalMonth(JSONValue val) {
String str = readOptionalString(val);
if (null != str) {
try {
return Month.valueOf(str);
} catch (@SuppressWarnings("unused") IllegalArgumentException e) {
// Do nothing -return the default value
}
}
return null;
} | [
"Read an optional month value form a JSON value.\n@param val the JSON value that should represent the month.\n@return the month from the JSON or null if reading the month fails."
] | [
"Encodes the given URI scheme with the given encoding.\n@param scheme the scheme to be encoded\n@param encoding the character encoding to encode to\n@return the encoded scheme\n@throws UnsupportedEncodingException when the given encoding parameter is not supported",
"Draw a rounded rectangular boundary.\n\n@param... |
public static base_response delete(nitro_service client, dnstxtrec resource) throws Exception {
dnstxtrec deleteresource = new dnstxtrec();
deleteresource.domain = resource.domain;
deleteresource.String = resource.String;
deleteresource.recordid = resource.recordid;
return deleteresource.delete_resource(client);
} | [
"Use this API to delete dnstxtrec."
] | [
"Use this API to unset the properties of systemuser resource.\nProperties that need to be unset are specified in args array.",
"Render a zero Double as null.\n\n@param value double value\n@return null if the double value is zero",
"Gets the value of the task property.\n\n<p>\nThis accessor method returns a refe... |
public void logWarning(final String message) {
messageQueue.add(new LogEntry() {
@Override
public String getMessage() {
return message;
}
});
} | [
"Log a free-form warning\n@param message the warning message. Cannot be {@code null}"
] | [
"Clones the given collection.\n\n@param collDef The collection descriptor\n@param prefix A prefix for the name\n@return The cloned collection",
"refresh all primitive typed attributes of a cached instance\nwith the current values from the database.\nrefreshing of reference and collection attributes is not done\n... |
@Deprecated
private BufferedImage getOriginalImage(String suffix) throws IOException, FlickrException {
StringBuffer buffer = getOriginalBaseImageUrl();
buffer.append(suffix);
return _getImage(buffer.toString());
} | [
"Get the original-image using the specified URL suffix.\n\n@deprecated\n@see PhotosInterface#getImage(Photo, int)\n@param suffix\nThe URL suffix, including the .extension\n@return The BufferedImage object\n@throws IOException\n@throws FlickrException"
] | [
"Use this API to fetch appfwwsdl resource of given name .",
"Sanity check precondition for above setters",
"Parses the given XML doc to extract the properties and return them into a java.util.Properties.\n@param doc to parse\n@param sectionName which section to extract\n@return Properties map",
"Extracts the ... |
@Override
public boolean applyLayout(Layout itemLayout) {
boolean applied = false;
if (itemLayout != null && mItemLayouts.add(itemLayout)) {
// apply the layout to all visible pages
List<Widget> views = getAllViews();
for (Widget view: views) {
view.applyLayout(itemLayout.clone());
}
applied = true;
}
return applied;
} | [
"Apply the layout to the each page in the list\n@param itemLayout item layout in the page\n@return true if the new layout is applied successfully, otherwise - false"
] | [
"Use this API to add nssimpleacl.",
"Sets the SCXML model with an InputStream\n\n@param inputFileStream the model input stream",
"Start listening for device announcements and keeping track of the DJ Link devices visible on the network.\nIf already listening, has no effect.\n\n@throws SocketException if the sock... |
static ChangeEvent<BsonDocument> changeEventForLocalDelete(
final MongoNamespace namespace,
final BsonValue documentId,
final boolean writePending
) {
return new ChangeEvent<>(
new BsonDocument(),
OperationType.DELETE,
null,
namespace,
new BsonDocument("_id", documentId),
null,
writePending);
} | [
"Generates a change event for a local deletion of a document in the given namespace referring\nto the given document _id.\n\n@param namespace the namespace where the document was inserted.\n@param documentId the _id of the document that was updated.\n@return a change event for a local deletion of a document in the ... | [
"Sets the initial MoificationState of the wrapped object myObj. The initial state will be StateNewDirty if myObj\nis not persisten already. The state will be set to StateOldClean if the object is already persistent.",
"If a text contains double quotes, escape them.\n\n@param text the text to escape\n@return Escap... |
public ClassNode addInterface(String name) {
ClassNode intf = infoBase.node(name);
addInterface(intf);
return this;
} | [
"Specify the class represented by this `ClassNode` implements\nan interface specified by the given name\n\n@param name the name of the interface class\n@return this `ClassNode` instance"
] | [
"Returns an array of all the singular values",
"Summarizes balance for the given nodeId to PartitionCount.\n\n@param nodeIdToPartitionCount\n@param title for use in pretty string\n@return Pair: getFirst() is utility value to be minimized, getSecond() is\npretty summary string of balance",
"Use this API to fetch... |
public static Collection<MonetaryAmountFactory<?>> getAmountFactories(MonetaryAmountFactoryQuery query) {
return Optional.ofNullable(monetaryAmountsSingletonQuerySpi()).orElseThrow(() -> new MonetaryException(
"No MonetaryAmountsSingletonQuerySpi loaded, query functionality is not available."))
.getAmountFactories(query);
} | [
"Returns all factory instances that match the query.\n\n@param query the factory query, not null.\n@return the instances found, never null."
] | [
"Executes all event manipulating handler and writes the event with persist\nhandler.\n\n@param events the events",
"Get a list of modules regarding filters\n\n@param filters Map<String,String>\n@return List<Module>\n@throws GrapesCommunicationException",
"This method take a list of fileName of the type partitio... |
private void postProcessTasks()
{
List<Task> allTasks = m_file.getTasks();
if (allTasks.size() > 1)
{
Collections.sort(allTasks);
int taskID = -1;
int lastTaskID = -1;
for (int i = 0; i < allTasks.size(); i++)
{
Task task = allTasks.get(i);
taskID = NumberHelper.getInt(task.getID());
// In Project the tasks IDs are always contiguous so we can spot invalid tasks by making sure all
// IDs are represented.
if (!task.getNull() && lastTaskID != -1 && taskID > lastTaskID + 1)
{
// This task looks to be invalid.
task.setNull(true);
}
else
{
lastTaskID = taskID;
}
}
}
} | [
"This method is called to try to catch any invalid tasks that may have sneaked past all our other checks.\nThis is done by validating the tasks by task ID."
] | [
"Adds the allowed values. Override for attributes who should not use the allowed values.\n\n@param result the node to add the allowed values to\n@param validator the validator to get the allowed values from",
"Str map to str.\n\n@param map\nthe map\n@return the string",
"Returns the name of the bone.\n\n@return... |
private void enforceSrid(Object feature) throws LayerException {
Geometry geom = getFeatureModel().getGeometry(feature);
if (null != geom) {
geom.setSRID(srid);
getFeatureModel().setGeometry(feature, geom);
}
} | [
"Enforces the correct srid on incoming features.\n\n@param feature\nobject to enforce srid on\n@throws LayerException\nproblem getting or setting srid"
] | [
"Use this API to fetch lbmonitor_binding resources of given names .",
"Use this API to fetch a vpnglobal_appcontroller_binding resources.",
"Converts the provided javascript object to JSON string.\n\n<p>If the object is a Map instance, it is stringified as key-value pairs, if it is a list, it is stringified as\... |
@Nullable
public StitchUserT getUser() {
authLock.readLock().lock();
try {
return activeUser;
} finally {
authLock.readLock().unlock();
}
} | [
"Returns the active logged in user."
] | [
"Sets the bean store\n\n@param beanStore The bean store",
"Returns the complete record for a single status update.\n\n@param projectStatus The project status update to get.\n@return Request object",
"Deletes an organization\n\n@param organizationId String",
"Collect the URIs of resources, that are referenced... |
public static int getHostSegmentIndex(int networkPrefixLength, int bytesPerSegment, int bitsPerSegment) {
if(bytesPerSegment > 1) {
if(bytesPerSegment == 2) {
return networkPrefixLength >> 4;
}
return networkPrefixLength / bitsPerSegment;
}
return networkPrefixLength >> 3;
} | [
"Returns the index of the segment containing the first byte outside the network prefix.\nWhen networkPrefixLength is null, or it matches or exceeds the bit length, returns the segment count.\n\n@param networkPrefixLength\n@param byteLength\n@return"
] | [
"Obtains a Ethiopic local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Ethiopic local date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Get a property as a double or throw an exception.\n\n@param key the prope... |
public List<Ticket> checkTickets(Set<String> tickets) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_CHECK_TICKETS);
StringBuffer sb = new StringBuffer();
Iterator<String> it = tickets.iterator();
while (it.hasNext()) {
if (sb.length() > 0) {
sb.append(",");
}
Object obj = it.next();
if (obj instanceof Ticket) {
sb.append(((Ticket) obj).getTicketId());
} else {
sb.append(obj);
}
}
parameters.put("tickets", sb.toString());
Response response = transportAPI.post(transportAPI.getPath(), parameters, apiKey, sharedSecret);
if (response.isError()) {
throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
}
// <uploader>
// <ticket id="128" complete="1" photoid="2995" />
// <ticket id="129" complete="0" />
// <ticket id="130" complete="2" />
// <ticket id="131" invalid="1" />
// </uploader>
List<Ticket> list = new ArrayList<Ticket>();
Element uploaderElement = response.getPayload();
NodeList ticketNodes = uploaderElement.getElementsByTagName("ticket");
int n = ticketNodes.getLength();
for (int i = 0; i < n; i++) {
Element ticketElement = (Element) ticketNodes.item(i);
String id = ticketElement.getAttribute("id");
String complete = ticketElement.getAttribute("complete");
boolean invalid = "1".equals(ticketElement.getAttribute("invalid"));
String photoId = ticketElement.getAttribute("photoid");
Ticket info = new Ticket();
info.setTicketId(id);
info.setInvalid(invalid);
info.setStatus(Integer.parseInt(complete));
info.setPhotoId(photoId);
list.add(info);
}
return list;
} | [
"Checks the status of one or more asynchronous photo upload tickets. This method does not require authentication.\n\n@param tickets\na set of ticket ids (Strings) or {@link Ticket} objects containing ids\n@return a list of {@link Ticket} objects.\n@throws FlickrException"
] | [
"Try to fire a given event on the Browser.\n\n@param eventable the eventable to fire\n@return true iff the event is fired",
"Register capabilities associated with this resource.\n\n<p>Classes that overrides this method <em>MUST</em> call {@code super.registerCapabilities(resourceRegistration)}.</p>\n\n@param reso... |
public Collection<HazeltaskTask<GROUP>> call() throws Exception {
try {
if(isShutdownNow)
return this.getDistributedExecutorService().shutdownNowWithHazeltask();
else
this.getDistributedExecutorService().shutdown();
} catch(IllegalStateException e) {}
return Collections.emptyList();
} | [
"I promise that this is always a collection of HazeltaskTasks"
] | [
"Use this API to fetch sslvserver_sslciphersuite_binding resources of given name .",
"Writes one or more String columns as a line to the CsvWriter.\n\n@param columns\nthe columns to write\n@throws IllegalArgumentException\nif columns.length == 0\n@throws IOException\nIf an I/O error occurs\n@throws NullPointerExc... |
@Override
public synchronized long skip(final long length) throws IOException {
final long skip = super.skip(length);
this.count += skip;
return skip;
} | [
"Skips the stream over the specified number of bytes, adding the skipped\namount to the count.\n\n@param length the number of bytes to skip\n@return the actual number of bytes skipped\n@throws java.io.IOException if an I/O error occurs\n@see java.io.InputStream#skip(long)"
] | [
"Allows to access the names of the current defined roundings.\n\n@param providers the providers and ordering to be used. By default providers and ordering as defined in\n#getDefaultProviders is used.\n@return the set of custom rounding ids, never {@code null}.",
"All the indexes defined in the database. Type wide... |
private List<Pair<Integer, Double>> integerPixelCoordinatesAndWeights(double d, int numPixels) {
if (d <= 0.5) return Collections.singletonList(new Pair<>(0, 1.0));
else if (d >= numPixels - 0.5) return Collections.singletonList(new Pair<>(numPixels - 1, 1.0));
else {
double shifted = d - 0.5;
double floor = Math.floor(shifted);
double floorWeight = 1 - (shifted - floor);
double ceil = Math.ceil(shifted);
double ceilWeight = 1 - floorWeight;
assert (floorWeight + ceilWeight == 1);
return Arrays.asList(new Pair<>((int) floor, floorWeight), new Pair<>((int) ceil, ceilWeight));
}
} | [
"Operates on one dimension at a time."
] | [
"Obtain collection of headers to remove\n\n@return\n@throws Exception",
"May have to be changed to let multiple touch",
"Set the depth of the cursor.\nThis is the length of the ray from the origin\nto the cursor.\n@param depth default cursor depth",
"Adds a qualifier with the given property and value to the c... |
public static List<String> getCommaSeparatedStringValues(String paramValue, String type) {
List<String> commaSeparatedProps = Lists.newArrayList();
for(String url: Utils.COMMA_SEP.split(paramValue.trim()))
if(url.trim().length() > 0)
commaSeparatedProps.add(url);
if(commaSeparatedProps.size() == 0) {
throw new RuntimeException("Number of " + type + " should be greater than zero");
}
return commaSeparatedProps;
} | [
"Given the comma separated list of properties as a string, splits it\nmultiple strings\n\n@param paramValue Concatenated string\n@param type Type of parameter ( to throw exception )\n@return List of string properties"
] | [
"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",
"Try to get a system property for obsolete keys. The value is automatically converted - a runtime exception may be thrown during conversion.\n\n@return all ... |
@Override
public Object getCurrentVersion(Serializable id, SharedSessionContractImplementor session) throws HibernateException {
if ( log.isTraceEnabled() ) {
log.trace( "Getting version: " + MessageHelper.infoString( this, id, getFactory() ) );
}
final Tuple resultset = getFreshTuple( EntityKeyBuilder.fromPersister( this, id, session ), session );
if ( resultset == null ) {
return null;
}
else {
return gridVersionType.nullSafeGet( resultset, getVersionColumnName(), session, null );
}
} | [
"Retrieve the version number"
] | [
"Displays a localized warning.\n@param caption the caption of the warning.\n@param description the description of the warning.",
"Vend a SessionVar with the default value",
"If provided with an AVRO schema, validates it and checks if there are\nbackwards compatible.\n\nTODO should probably place some similar ch... |
public static String buildDynamicCapabilityName(String baseName, String ... dynamicNameElement) {
assert baseName != null;
assert dynamicNameElement != null;
assert dynamicNameElement.length > 0;
StringBuilder sb = new StringBuilder(baseName);
for (String part:dynamicNameElement){
sb.append(".").append(part);
}
return sb.toString();
} | [
"Constructs a full capability name from a static base name and a dynamic element.\n\n@param baseName the base name. Cannot be {@code null}\n@param dynamicNameElement the dynamic portion of the name. Cannot be {@code null}\n@return the full capability name. Will not return {@code null}"
] | [
"Counts additional occurrences of a property as the main property of\nstatements.\n\n@param usageStatistics\nstatistics object where count is stored\n@param property\nthe property to count\n@param count\nthe number of times to count the property",
"Sends the error to responder.",
"Build the tree of joins for th... |
void updateFromResponseOnDeletePost(Response<ResponseBody> response) throws IOException {
this.withResponse(response);
String responseContent = null;
if (response.body() != null) {
responseContent = response.body().string();
response.body().close();
}
this.withResource(serializerAdapter.<T>deserialize(responseContent, resourceType));
withStatus(AzureAsyncOperation.SUCCESS_STATUS, response.code());
} | [
"Updates the polling state from a DELETE or POST operation.\n\n@param response the response from Retrofit REST call\n@throws IOException thrown by deserialization"
] | [
"Store the versioned values\n\n@param values list of versioned bytes\n@return the list of versioned values rolled into an array of bytes",
"Adds a column pair to this foreignkey.\n\n@param localColumn The column in the local table\n@param remoteColumn The column in the remote table",
"Sets the provided filters... |
public SerialMessage getNoMoreInformationMessage() {
logger.debug("Creating new message for application command WAKE_UP_NO_MORE_INFORMATION for node {}", this.getNode().getNodeId());
SerialMessage result = new SerialMessage(this.getNode().getNodeId(), SerialMessage.SerialMessageClass.SendData, SerialMessage.SerialMessageType.Request, SerialMessage.SerialMessageClass.SendData, SerialMessage.SerialMessagePriority.Low);
byte[] newPayload = { (byte) this.getNode().getNodeId(),
2,
(byte) getCommandClass().getKey(),
(byte) WAKE_UP_NO_MORE_INFORMATION };
result.setMessagePayload(newPayload);
return result;
} | [
"Gets a SerialMessage with the WAKE_UP_NO_MORE_INFORMATION command.\n@return the serial message"
] | [
"Given a resource field number, this method returns the resource field name.\n\n@param key resource field number\n@return resource field name",
"Remove any overrides for an endpoint\n\n@param pathValue path (endpoint) value\n@param requestType path request type. \"GET\", \"POST\", etc\n@return true if success, fa... |
private void setSiteFilters(String filters) {
this.filterSites = new HashSet<>();
if (!"-".equals(filters)) {
Collections.addAll(this.filterSites, filters.split(","));
}
} | [
"Sets the set of site filters based on the given string.\n\n@param filters\ncomma-separates list of site keys, or \"-\" to filter all site\nlinks"
] | [
"Command to select a document from the POIFS for viewing.\n\n@param entry document to view",
"Install the installation manager service.\n\n@param serviceTarget\n@return the service controller for the installed installation manager",
"Associate a name with an object and make it persistent.\nAn object instance ma... |
@Override
@Deprecated
public List<CardWithActions> getBoardMemberActivity(String boardId, String memberId,
String actionFilter, Argument... args) {
if (actionFilter == null)
actionFilter = "all";
Argument[] argsAndFilter = Arrays.copyOf(args, args.length + 1);
argsAndFilter[args.length] = new Argument("actions", actionFilter);
return asList(() -> get(createUrl(GET_BOARD_MEMBER_CARDS).params(argsAndFilter).asString(),
CardWithActions[].class, boardId, memberId));
} | [
"FIXME Remove this method"
] | [
"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@param channel the channel to which we want to write data\n\n@throws IOException if there is a problem w... |
public final static String process(final File file, final Configuration configuration) throws IOException
{
final FileInputStream input = new FileInputStream(file);
final String ret = process(input, configuration);
input.close();
return ret;
} | [
"Transforms an input file into HTML using the given Configuration.\n\n@param file\nThe File to process.\n@param configuration\nthe Configuration\n@return The processed String.\n@throws IOException\nif an IO error occurs\n@since 0.7\n@see Configuration"
] | [
"Add a calendar day node.\n\n@param parentNode parent node\n@param calendar ProjectCalendar instance\n@param day calendar day",
"Sets the node meta data.\n\n@param key - the meta data key\n@param value - the meta data value\n@throws GroovyBugError if key is null or there is already meta\ndata under that key",
"... |
public Object remove(Object key)
{
if (key == null) return null;
purge();
int hash = hashCode(key);
int index = indexFor(hash);
Entry previous = null;
Entry entry = table[index];
while (entry != null)
{
if ((hash == entry.hash) && equals(key, entry.getKey()))
{
if (previous == null)
table[index] = entry.next;
else
previous.next = entry.next;
this.size--;
modCount++;
return entry.getValue();
}
previous = entry;
entry = entry.next;
}
return null;
} | [
"Removes the key and its associated value from this map.\n\n@param key the key to remove\n@return the value associated with that key, or null if\nthe key was not in the map"
] | [
"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.",
"Get object by identity. First lookup among objects registered in the\ntransaction, then in persistent storage.\n@param id The identity\n@return The object\n@throws P... |
public List<File> getAutoAttachCacheFiles() {
ArrayList<File> currentFiles = new ArrayList<File>(autoAttachCacheFiles);
Collections.sort(currentFiles, new Comparator<File>() {
@Override
public int compare(File o1, File o2) {
return o1.getName().compareTo(o2.getName());
}
});
return Collections.unmodifiableList(currentFiles);
} | [
"Get the metadata cache files that are currently configured to be automatically attached when matching media is\nmounted in a player on the network.\n\n@return the current auto-attache cache files, sorted by name"
] | [
"Return the list of galleries created by a user. Sorted from newest to oldest.\n\n@param userId\nThe user you want to check for\n@param perPage\nNumber of galleries per page\n@param page\nThe page number\n@return gallery\n@throws FlickrException\n\n@see <a hrerf=\"http://www.flickr.com/services/api/flickr.galleries... |
public void register() {
synchronized (loaders) {
loaders.add(this);
maximumHeaderLength = 0;
for (GVRCompressedTextureLoader loader : loaders) {
int headerLength = loader.headerLength();
if (headerLength > maximumHeaderLength) {
maximumHeaderLength = headerLength;
}
}
}
} | [
"Register a loader with the 'sniffer'.\n\n'Factory loaders' are pre-registered. To load a format we don't support,\ncreate a {@link GVRCompressedTextureLoader} descendant. Then, before\ntrying to load any files in that format, create an instance and call\n{@link #register()}:\n\n<pre>\n\nnew MyCompressedFormat().re... | [
"Sets the node meta data.\n\n@param key - the meta data key\n@param value - the meta data value\n@throws GroovyBugError if key is null or there is already meta\ndata under that key",
"parse the stencil out of a JSONObject and set it to the current shape\n@param modelJSON\n@param current\n@throws org.json.JSONExce... |
public static final TimeUnit parseWorkUnits(BigInteger value)
{
TimeUnit result = TimeUnit.HOURS;
if (value != null)
{
switch (value.intValue())
{
case 1:
{
result = TimeUnit.MINUTES;
break;
}
case 3:
{
result = TimeUnit.DAYS;
break;
}
case 4:
{
result = TimeUnit.WEEKS;
break;
}
case 5:
{
result = TimeUnit.MONTHS;
break;
}
case 7:
{
result = TimeUnit.YEARS;
break;
}
default:
case 2:
{
result = TimeUnit.HOURS;
break;
}
}
}
return (result);
} | [
"Parse work units.\n\n@param value work units value\n@return TimeUnit instance"
] | [
"Use this API to Force clustersync.",
"Sets hour, minutes, seconds and milliseconds to the given values. Leaves date info untouched.",
"Retrieve the jdbc type for the field descriptor that is related\nto this argument.",
"Returns s if it's at most maxWidth chars, otherwise chops right side to fit.",
"Set th... |
public Duration getTotalSlack()
{
Duration totalSlack = (Duration) getCachedValue(TaskField.TOTAL_SLACK);
if (totalSlack == null)
{
Duration duration = getDuration();
if (duration == null)
{
duration = Duration.getInstance(0, TimeUnit.DAYS);
}
TimeUnit units = duration.getUnits();
Duration startSlack = getStartSlack();
if (startSlack == null)
{
startSlack = Duration.getInstance(0, units);
}
else
{
if (startSlack.getUnits() != units)
{
startSlack = startSlack.convertUnits(units, getParentFile().getProjectProperties());
}
}
Duration finishSlack = getFinishSlack();
if (finishSlack == null)
{
finishSlack = Duration.getInstance(0, units);
}
else
{
if (finishSlack.getUnits() != units)
{
finishSlack = finishSlack.convertUnits(units, getParentFile().getProjectProperties());
}
}
double startSlackDuration = startSlack.getDuration();
double finishSlackDuration = finishSlack.getDuration();
if (startSlackDuration == 0 || finishSlackDuration == 0)
{
if (startSlackDuration != 0)
{
totalSlack = startSlack;
}
else
{
totalSlack = finishSlack;
}
}
else
{
if (startSlackDuration < finishSlackDuration)
{
totalSlack = startSlack;
}
else
{
totalSlack = finishSlack;
}
}
set(TaskField.TOTAL_SLACK, totalSlack);
}
return (totalSlack);
} | [
"The Total Slack field contains the amount of time a task can be\ndelayed without delaying the project's finish date.\n\n@return string representing duration"
] | [
"Extract a Class from the given Type.",
"Opens the stream in a background thread.",
"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 th... |
public static route6[] get(nitro_service service, route6_args args) throws Exception{
route6 obj = new route6();
options option = new options();
option.set_args(nitro_util.object_to_string_withoutquotes(args));
route6[] response = (route6[])obj.get_resources(service, option);
return response;
} | [
"Use this API to fetch all the route6 resources that are configured on netscaler.\nThis uses route6_args which is a way to provide additional arguments while fetching the resources."
] | [
"Returns the value of an option, or the default if the value is null or the key is not part of the map.\n@param configOptions the map with the config options.\n@param optionKey the option to get the value of\n@param defaultValue the default value to return if the option is not set.\n@return the value of an option, ... |
public void requestNodeInfo(int nodeId) {
SerialMessage newMessage = new SerialMessage(nodeId, SerialMessage.SerialMessageClass.RequestNodeInfo, SerialMessage.SerialMessageType.Request, SerialMessage.SerialMessageClass.ApplicationUpdate, SerialMessage.SerialMessagePriority.High);
byte[] newPayload = { (byte) nodeId };
newMessage.setMessagePayload(newPayload);
this.enqueue(newMessage);
} | [
"Send Request Node info message to the controller.\n@param nodeId the nodeId of the node to identify\n@throws SerialInterfaceException when timing out or getting an invalid response."
] | [
"This method allows a subsection of a byte array to be copied.\n\n@param data source data\n@param offset offset into the source data\n@param size length of the source data to copy\n@return new byte array containing copied data",
"Use this API to fetch vpnvserver_vpnnexthopserver_binding resources of given name ."... |
public static void createUsers(GreenMailOperations greenMail, InternetAddress... addresses) {
for (InternetAddress address : addresses) {
greenMail.setUser(address.getAddress(), address.getAddress());
}
} | [
"Create users for the given array of addresses. The passwords will be set to the email addresses.\n\n@param greenMail Greenmail instance to create users for\n@param addresses Addresses"
] | [
"Sets the SCXML model with a string\n\n@param model the model text",
"Special-purpose version for hashing a single int value. Value is treated as little-endian",
"Convert a key-version-nodeSet information to string\n\n@param key The key\n@param versionMap mapping versions to set of PrefixNodes\n@param storeName... |
public <Result> Result process(IUnitOfWork<Result, State> work) {
releaseReadLock();
acquireWriteLock();
try {
if (log.isTraceEnabled())
log.trace("process - " + Thread.currentThread().getName());
return modify(work);
} finally {
if (log.isTraceEnabled())
log.trace("Downgrading from write lock to read lock...");
acquireReadLock();
releaseWriteLock();
}
} | [
"Upgrades a read transaction to a write transaction, executes the work then downgrades to a read transaction\nagain.\n\n@since 2.4\n@noreference"
] | [
"Returns the first number available, starting at portNumberStartingPoint that's not already in the reservedPorts\nlist.\n\n@param portNumberStartingPoint first port number to start from.\n@param reservedPorts the ports already reserved.\n@return first number available not in the given list, starting at the given pa... |
public void hideKeyboard() {
InputMethodManager inputMethodManager = (InputMethodManager) getContext().getApplicationContext().getSystemService(Context.INPUT_METHOD_SERVICE);
inputMethodManager.hideSoftInputFromWindow(mPhoneEdit.getWindowToken(), 0);
} | [
"Hide keyboard from phoneEdit field"
] | [
"Print a work contour.\n\n@param value WorkContour instance\n@return work contour value",
"Convenience method for retrieving an Integer resource.\n\n@param locale locale identifier\n@param key resource key\n@return resource value",
"Formats a logging event to a writer.\n\n@param event\nlogging event to be forma... |
public static <T> T callConstructor(Class<T> klass) {
return callConstructor(klass, new Class<?>[0], new Object[0]);
} | [
"Call the no-arg constructor for the given class\n\n@param <T> The type of the thing to construct\n@param klass The class\n@return The constructed thing"
] | [
"This method is called to format a task type.\n\n@param value task type value\n@return formatted task type",
"Use this API to fetch the statistics of all scpolicy_stats resources that are configured on netscaler.",
"Sets top and bottom padding for all cells in the row.\n@param padding new padding for top and bo... |
public String getUuidFromResponse(ResponseOnSingeRequest myResponse) {
String uuid = PcConstants.NA;
String responseBody = myResponse.getResponseBody();
Pattern regex = Pattern.compile(getJobIdRegex());
Matcher matcher = regex.matcher(responseBody);
if (matcher.matches()) {
uuid = matcher.group(1);
}
return uuid;
} | [
"Gets the uuid from response.\n\n@param myResponse\nthe my response\n@return the uuid from response"
] | [
"Returns the address for the operation.\n\n@param op the operation\n\n@return the operation address or a new undefined model node",
"Returns the current definition on the indicated level.\n\n@param level The level\n@return The definition",
"Convert an integer to a RelationType instance.\n\n@param type in... |
public static void copyRecursively(final Path source, final Path target, boolean overwrite) throws IOException {
final CopyOption[] options;
if (overwrite) {
options = new CopyOption[]{StandardCopyOption.COPY_ATTRIBUTES, StandardCopyOption.REPLACE_EXISTING};
} else {
options = new CopyOption[]{StandardCopyOption.COPY_ATTRIBUTES};
}
Files.walkFileTree(source, new FileVisitor<Path>() {
@Override
public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException {
Files.copy(dir, target.resolve(source.relativize(dir)), options);
return FileVisitResult.CONTINUE;
}
@Override
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
Files.copy(file, target.resolve(source.relativize(file)), options);
return FileVisitResult.CONTINUE;
}
@Override
public FileVisitResult visitFileFailed(Path file, IOException exc) throws IOException {
DeploymentRepositoryLogger.ROOT_LOGGER.cannotCopyFile(exc, file);
return FileVisitResult.CONTINUE;
}
@Override
public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException {
return FileVisitResult.CONTINUE;
}
});
} | [
"Copy a path recursively.\n@param source a Path pointing to a file or a directory that must exist\n@param target a Path pointing to a directory where the contents will be copied.\n@param overwrite overwrite existing files - if set to false fails if the target file already exists.\n@throws IOException"
] | [
"Calculates ATM Bachelier implied volatilities.\n\n@see net.finmath.functions.AnalyticFormulas#bachelierOptionImpliedVolatility(double, double, double, double, double)\n\n@param optionValue RandomVarable representing the value of the option\n@param optionMaturity Time to maturity.\n@param swapAnnuity The swap annui... |
public TaskMode getTaskMode()
{
return BooleanHelper.getBoolean((Boolean) getCachedValue(TaskField.TASK_MODE)) ? TaskMode.MANUALLY_SCHEDULED : TaskMode.AUTO_SCHEDULED;
} | [
"Retrieves the task mode.\n\n@return task mode"
] | [
"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}",
"Creates a descriptor for the bundle in the same folder where the bundle files are lo... |
public String genId() {
S.Buffer sb = S.newBuffer();
sb.a(longEncoder.longToStr(nodeIdProvider.nodeId()))
.a(longEncoder.longToStr(startIdProvider.startId()))
.a(longEncoder.longToStr(sequenceProvider.seqId()));
return sb.toString();
} | [
"Generate a unique ID across the cluster\n@return generated ID"
] | [
"Post an artifact to the Grapes server\n\n@param artifact The artifact to post\n@param user The user posting the information\n@param password The user password\n@throws GrapesCommunicationException\n@throws javax.naming.AuthenticationException",
"Set the group name\n\n@param name new name of server group\n@param ... |
private boolean verify(String key, BoxSignatureAlgorithm actualAlgorithm, String actualSignature,
String webHookPayload, String deliveryTimestamp) {
if (actualSignature == null) {
return false;
}
byte[] actual = Base64.decode(actualSignature);
byte[] expected = this.signRaw(actualAlgorithm, key, webHookPayload, deliveryTimestamp);
return Arrays.equals(expected, actual);
} | [
"Verifies a provided signature.\n\n@param key\nfor which signature key\n@param actualAlgorithm\ncurrent signature algorithm\n@param actualSignature\ncurrent signature\n@param webHookPayload\nfor signing\n@param deliveryTimestamp\nfor signing\n@return true if verification passed"
] | [
"Check if all cluster objects in the list are congruent.\n\n@param clusterUrls of cluster objects\n@return",
"Decomposes a submatrix. The results are written to the submatrix\nand to its internal matrix L.\n\n@param mat A matrix which has a submatrix that needs to be inverted\n@param indexStart the first index o... |
private int getDaysToNextMatch(WeekDay weekDay) {
for (WeekDay wd : m_weekDays) {
if (wd.compareTo(weekDay) > 0) {
return wd.toInt() - weekDay.toInt();
}
}
return (m_weekDays.iterator().next().toInt() + (m_interval * I_CmsSerialDateValue.NUM_OF_WEEKDAYS))
- weekDay.toInt();
} | [
"Returns the number of days from the given weekday to the next weekday the event should occur.\n@param weekDay the current weekday.\n@return the number of days to the next weekday an event could occur."
] | [
"Append the given path segments to the existing path of this builder.\nEach given path segment may contain URI template variables.\n@param pathSegments the URI path segments\n@return this UriComponentsBuilder",
"Gets an enhanced protection domain for a proxy based on the given protection domain.\n@param domain th... |
protected Object[] getParameterValues(Object specialVal, BeanManagerImpl manager, CreationalContext<?> ctx, CreationalContext<?> transientReferenceContext) {
if (getInjectionPoints().isEmpty()) {
if (specialInjectionPointIndex == -1) {
return Arrays2.EMPTY_ARRAY;
} else {
return new Object[] { specialVal };
}
}
Object[] parameterValues = new Object[getParameterInjectionPoints().size()];
List<ParameterInjectionPoint<?, X>> parameters = getParameterInjectionPoints();
for (int i = 0; i < parameterValues.length; i++) {
ParameterInjectionPoint<?, ?> param = parameters.get(i);
if (i == specialInjectionPointIndex) {
parameterValues[i] = specialVal;
} else if (hasTransientReferenceParameter && param.getAnnotated().isAnnotationPresent(TransientReference.class)) {
parameterValues[i] = param.getValueToInject(manager, transientReferenceContext);
} else {
parameterValues[i] = param.getValueToInject(manager, ctx);
}
}
return parameterValues;
} | [
"Helper method for getting the current parameter values from a list of annotated parameters.\n\n@param parameters The list of annotated parameter to look up\n@param manager The Bean manager\n@return The object array of looked up values"
] | [
"Returns the configured request parameter for the current query string, or the default parameter if the core is not specified.\n@return The configured request parameter for the current query string, or the default parameter if the core is not specified.",
"This method allows a resource assignment to be added to t... |
public ItemRequest<Workspace> removeUser(String workspace) {
String path = String.format("/workspaces/%s/removeUser", workspace);
return new ItemRequest<Workspace>(this, Workspace.class, path, "POST");
} | [
"The user making this call must be an admin in the workspace.\nReturns an empty data record.\n\n@param workspace The workspace or organization to invite the user to.\n@return Request object"
] | [
"Set the HomeAsUpIndicator that is visible when user navigate to a fragment child\n@param indicator the resource drawable to use as indicator",
"Removes all candidates from this collection which are not\nassociated with an initialising method.\n\n@return a {@code Collection} containing the removed\nunassociated c... |
private boolean removeKeyForAllLanguages(String key) {
try {
if (hasDescriptor()) {
lockDescriptor();
}
loadAllRemainingLocalizations();
lockAllLocalizations(key);
} catch (CmsException | IOException e) {
LOG.warn("Not able lock all localications for bundle.", e);
return false;
}
if (!hasDescriptor()) {
for (Entry<Locale, SortedProperties> entry : m_localizations.entrySet()) {
SortedProperties localization = entry.getValue();
if (localization.containsKey(key)) {
localization.remove(key);
m_changedTranslations.add(entry.getKey());
}
}
}
return true;
} | [
"Remove a key for all language versions. If a descriptor is present, the key is only removed in the descriptor.\n\n@param key the key to remove.\n@return <code>true</code> if removing was successful, <code>false</code> otherwise."
] | [
"This method returns the string representation of an object. In most\ncases this will simply involve calling the normal toString method\non the object, but a couple of exceptions are handled here.\n\n@param o the object to formatted\n@return formatted string representing input Object",
"Gets the object whose inde... |
public static String[] copyArrayAddFirst(String[] arr, String add) {
String[] arrCopy = new String[arr.length + 1];
arrCopy[0] = add;
System.arraycopy(arr, 0, arrCopy, 1, arr.length);
return arrCopy;
} | [
"Utility function that copies a string array and add another string to\nfirst\n\n@param arr Original array of strings\n@param add\n@return Copied array of strings"
] | [
"Clean obsolete contents from the content repository. It will first mark contents as obsolete then after some time\nif these contents are still obsolete they will be removed.\n\n@return a map containing the list of marked contents and the list of deleted contents.",
"Reconstructs a number that is represented by m... |
public Triple<EObject, EReference, INode> decode(Resource res, String uriFragment) {
if (isUseIndexFragment(res)) {
return getLazyProxyInformation(res, uriFragment);
}
List<String> split = Strings.split(uriFragment, SEP);
EObject source = resolveShortFragment(res, split.get(1));
EReference ref = fromShortExternalForm(source.eClass(), split.get(2));
INode compositeNode = NodeModelUtils.getNode(source);
if (compositeNode==null)
throw new IllegalStateException("Couldn't resolve lazy link, because no node model is attached.");
INode textNode = getNode(compositeNode, split.get(3));
return Tuples.create(source, ref, textNode);
} | [
"decodes the uriFragment\n\n@param res the resource that contains the feature holder\n@param uriFragment the fragment that should be decoded\n@return the decoded information\n@see LazyURIEncoder#encode(EObject, EReference, INode)"
] | [
"Perform the entire sort operation",
"Adds the download button.\n\n@param view layout which displays the log file",
"Create a WebDriver backed EmbeddedBrowser.\n\n@param driver The WebDriver to use.\n@param filterAttributes the attributes to be filtered from DOM.\n@param crawlWaitReload the period to... |
public byte[] toArray() {
if (size() > Integer.MAX_VALUE)
throw new IllegalStateException("Cannot create byte array of more than 2GB");
int len = (int) size();
ByteBuffer bb = toDirectByteBuffer(0L, len);
byte[] b = new byte[len];
// Copy data to the array
bb.get(b, 0, len);
return b;
} | [
"Convert this buffer to a java array.\n@return"
] | [
"Creates a general purpose solver. Use this if you are not sure what you need.\n\n@param numRows The number of rows that the decomposition is optimized for.\n@param numCols The number of columns that the decomposition is optimized for.",
"Writes an untagged OK response, with the supplied response code,\nand an o... |
public static responderhtmlpage get(nitro_service service, String name) throws Exception{
responderhtmlpage obj = new responderhtmlpage();
obj.set_name(name);
responderhtmlpage response = (responderhtmlpage) obj.get_resource(service);
return response;
} | [
"Use this API to fetch responderhtmlpage resource of given name ."
] | [
"sets the row reader class name for thie class descriptor",
"Splits the given string.",
"Gets the Chi Square distance between two normalized histograms.\n\n@param histogram1 Histogram.\n@param histogram2 Histogram.\n@return The Chi Square distance between x and y.",
"This is the main entry point used to conve... |
public static void dumpBlockData(int headerSize, int blockSize, byte[] data)
{
if (data != null)
{
System.out.println(ByteArrayHelper.hexdump(data, 0, headerSize, false));
int index = headerSize;
while (index < data.length)
{
System.out.println(ByteArrayHelper.hexdump(data, index, blockSize, false));
index += blockSize;
}
}
} | [
"Dumps the contents of a structured block made up from a header\nand fixed sized records.\n\n@param headerSize header zie\n@param blockSize block size\n@param data data block"
] | [
"Utility function that pauses and asks for confirmation on dangerous\noperations.\n\n@param confirm User has already confirmed in command-line input\n@param opDesc Description of the dangerous operation\n@throws IOException\n@return True if user confirms the operation in either command-line input\nor here.",
"Con... |
public String convertToPrefixLength() throws AddressStringException {
IPAddress address = toAddress();
Integer prefix;
if(address == null) {
if(isPrefixOnly()) {
prefix = getNetworkPrefixLength();
} else {
return null;
}
} else {
prefix = address.getBlockMaskPrefixLength(true);
if(prefix == null) {
return null;
}
}
return IPAddressSegment.toUnsignedString(prefix, 10,
new StringBuilder(IPAddressSegment.toUnsignedStringLength(prefix, 10) + 1).append(IPAddress.PREFIX_LEN_SEPARATOR)).toString();
} | [
"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"
] | [
"Resize the image passing the new height and width\n\n@param height\n@param width\n@return",
"Get a loader that lists the Files in the current path,\nand monitors changes.",
"Attempts to clear the global log context used for embedded servers.",
"Calculate the finish variance.\n\n@return finish variance",
"E... |
public static URL codeLocationFromURL(String url) {
try {
return new URL(url);
} catch (Exception e) {
throw new InvalidCodeLocation(url);
}
} | [
"Creates a code location URL from a URL\n\n@param url the URL external form\n@return A URL created from URL\n@throws InvalidCodeLocation if URL creation fails"
] | [
"Open the log file for writing.",
"Select this tab item.",
"disables the responses for a given pathname and user id\n\n@param model\n@param path_id\n@param clientUUID\n@return\n@throws Exception",
"Extract the parent WBS from a WBS.\n\n@param wbs current WBS\n@return parent WBS",
"Join N sets.",
"Measure ... |
public static ExtensibleConfigurationPersister createHostXmlConfigurationPersister(final ConfigurationFile file, final HostControllerEnvironment environment,
final ExecutorService executorService, final ExtensionRegistry hostExtensionRegistry,
final LocalHostControllerInfo localHostControllerInfo) {
String defaultHostname = localHostControllerInfo.getLocalHostName();
if (environment.getRunningModeControl().isReloaded()) {
if (environment.getRunningModeControl().getReloadHostName() != null) {
defaultHostname = environment.getRunningModeControl().getReloadHostName();
}
}
HostXml hostXml = new HostXml(defaultHostname, environment.getRunningModeControl().getRunningMode(),
environment.isUseCachedDc(), Module.getBootModuleLoader(), executorService, hostExtensionRegistry);
BackupXmlConfigurationPersister persister = new BackupXmlConfigurationPersister(file, new QName(Namespace.CURRENT.getUriString(), "host"), hostXml, hostXml, false);
for (Namespace namespace : Namespace.domainValues()) {
if (!namespace.equals(Namespace.CURRENT)) {
persister.registerAdditionalRootElement(new QName(namespace.getUriString(), "host"), hostXml);
}
}
hostExtensionRegistry.setWriterRegistry(persister);
return persister;
} | [
"host.xml"
] | [
"Total count of partition-stores moved in this task.\n\n@return number of partition stores moved in this task.",
"Retrieve the value of a single-valued parameter.\n\n@param key\n@param defaultValue\n@param cnx",
"Writes a buffered some-value restriction.\n\n@param propertyUri\nURI of the property to which the r... |
@RequestMapping(value = "api/edit/repeatNumber", method = RequestMethod.POST)
public
@ResponseBody
String updateRepeatNumber(Model model, int newNum, int path_id,
@RequestParam(defaultValue = Constants.PROFILE_CLIENT_DEFAULT_ID) String clientUUID) throws Exception {
logger.info("want to update repeat number of path_id={}, to newNum={}", path_id, newNum);
editService.updateRepeatNumber(newNum, path_id, clientUUID);
return null;
} | [
"Calls a method from editService to update the repeat number for a path\n\n@param model\n@param newNum\n@param path_id\n@param clientUUID\n@return\n@throws Exception"
] | [
"Compares two annotated types and returns true if they are the same",
"Validates the binding types",
"this method will be invoked after methodToBeInvoked is invoked",
"write CustomInfo list into table.\n\n@param event the event",
"Builds a batch-fetch capable loader based on the given persister, lock-mode, ... |
private String parseAddress(String address) {
try {
StringBuilder buf = new StringBuilder();
InternetAddress[] netAddrs = InternetAddress.parseHeader(address, false);
for (InternetAddress netAddr : netAddrs) {
if (buf.length() > 0) {
buf.append(SP);
}
buf.append(LB);
String personal = netAddr.getPersonal();
if (personal != null && (personal.length() != 0)) {
buf.append(Q).append(personal).append(Q);
} else {
buf.append(NIL);
}
buf.append(SP);
buf.append(NIL); // should add route-addr
buf.append(SP);
try {
// Remove quotes to avoid double quoting
MailAddress mailAddr = new MailAddress(netAddr.getAddress().replaceAll("\"", "\\\\\""));
buf.append(Q).append(mailAddr.getUser()).append(Q);
buf.append(SP);
buf.append(Q).append(mailAddr.getHost()).append(Q);
} catch (Exception pe) {
buf.append(NIL + SP + NIL);
}
buf.append(RB);
}
return buf.toString();
} catch (AddressException e) {
throw new RuntimeException("Failed to parse address: " + address, e);
}
} | [
"Parses a String email address to an IMAP address string."
] | [
"Calculate the layout offset",
"Generate Allure report data from directories with allure report results.\n\n@param args a list of directory paths. First (args.length - 1) arguments -\nresults directories, last argument - the folder to generated data",
"Add a new column\n\n@param columnName the name of the colum... |
public ClassNode annotatedWith(String name) {
ClassNode anno = infoBase.node(name);
this.annotations.add(anno);
anno.annotated.add(this);
return this;
} | [
"Specify the class represented by this `ClassNode` is annotated\nby an annotation class specified by the name\n@param name the name of the annotation class\n@return this `ClassNode` instance"
] | [
"Insert syntax for our special table\n@param sequenceName\n@param maxKey\n@return sequence insert statement",
"Returns the text for the JSONObject of Link provided\nThe JSONObject of Link provided should be of the type \"copy\"\n@param jsonObject of Link\n@return String",
"Determines the number bytes required t... |
public AsciiTable setPaddingBottom(int paddingBottom) {
for(AT_Row row : this.rows){
if(row.getType()==TableRowType.CONTENT){
row.setPaddingBottom(paddingBottom);
}
}
return this;
} | [
"Sets the bottom padding for all cells in the table.\n@param paddingBottom new padding, ignored if smaller than 0\n@return this to allow chaining"
] | [
"Record the details of the media being cached, to make it easier to recognize, now that we have access to that\ninformation.\n\n@param slot the slot from which a metadata cache is being created\n@param zos the stream to which the ZipFile is being written\n@param channel the low-level channel to which the cache is b... |
public static BoxLegalHoldPolicy.Info createOngoing(BoxAPIConnection api, String name, String description) {
URL url = ALL_LEGAL_HOLD_URL_TEMPLATE.build(api.getBaseURL());
BoxJSONRequest request = new BoxJSONRequest(api, url, "POST");
JsonObject requestJSON = new JsonObject()
.add("policy_name", name)
.add("is_ongoing", true);
if (description != null) {
requestJSON.add("description", description);
}
request.setBody(requestJSON.toString());
BoxJSONResponse response = (BoxJSONResponse) request.send();
JsonObject responseJSON = JsonObject.readFrom(response.getJSON());
BoxLegalHoldPolicy createdPolicy = new BoxLegalHoldPolicy(api, responseJSON.get("id").asString());
return createdPolicy.new Info(responseJSON);
} | [
"Creates a new ongoing Legal Hold Policy.\n@param api the API connection to be used by the resource.\n@param name the name of Legal Hold Policy.\n@param description the description of Legal Hold Policy.\n@return information about the Legal Hold Policy created."
] | [
"Convenience method that returns the attribute value for the specified attribute name.\n\n@param attributeName the name of the attribute\n@return the value of the attribute or null if no such attribute exists\n@since 1.9.0",
"Save the values to the bundle descriptor.\n@throws CmsException thrown if saving fails."... |
protected long buildNextSequence(PersistenceBroker broker, ClassDescriptor cld, String sequenceName)
throws LookupException, SQLException, PlatformException
{
CallableStatement cs = null;
try
{
Connection con = broker.serviceConnectionManager().getConnection();
cs = getPlatform().prepareNextValProcedureStatement(con, PROCEDURE_NAME, sequenceName);
cs.executeUpdate();
return cs.getLong(1);
}
finally
{
try
{
if (cs != null)
cs.close();
}
catch (SQLException ignore)
{
// ignore it
}
}
} | [
"Calls the stored procedure stored procedure throws an\nerror if it doesn't exist.\n@param broker\n@param cld\n@param sequenceName\n@return\n@throws LookupException\n@throws SQLException"
] | [
"Utility method to register a proxy has a Service in OSGi.",
"Obtain all groups\n\n@return All Groups",
"Enable a host\n\n@param hostName\n@throws Exception",
"Calculates a md5 hash for an url\n\nIf a passed in url is absent then this method will return absent as well\n\n@param url - an url to a soy template ... |
public int getIndex(T value) {
int count = getItemCount();
for (int i = 0; i < count; i++) {
if (Objects.equals(getValue(i), value)) {
return i;
}
}
return -1;
} | [
"Gets the index of the specified value.\n\n@param value the value of the item to be found\n@return the index of the value"
] | [
"Gets the Jaccard distance between two points.\n\n@param p A point in space.\n@param q A point in space.\n@return The Jaccard distance between x and y.",
"Add a console pipeline to the Redwood handler tree,\nprinting to stdout.\nCalling this multiple times will result in messages being printed\nmultiple times.\n@... |
public void setSize(ButtonSize size) {
if (this.size != null) {
removeStyleName(this.size.getCssName());
}
this.size = size;
if (size != null) {
addStyleName(size.getCssName());
}
} | [
"Set the buttons size."
] | [
"Convert a color to an angle.\n\n@param color The RGB value of the color to \"find\" on the color wheel.\n\n@return The angle (in rad) the \"normalized\" color is displayed on the\ncolor wheel.",
"Read data for an individual task.\n\n@param row task data from database\n@param task Task instance",
"Process any S... |
public void setTabs(ArrayList<String>tabs) {
if (tabs == null || tabs.size() <= 0) return;
if (platformSupportsTabs) {
ArrayList<String> toAdd;
if (tabs.size() > MAX_TABS) {
toAdd = new ArrayList<>(tabs.subList(0, MAX_TABS));
} else {
toAdd = tabs;
}
this.tabs = toAdd.toArray(new String[0]);
} else {
Logger.d("Please upgrade com.android.support:design library to v28.0.0 to enable Tabs for App Inbox, dropping Tabs");
}
} | [
"Sets the name of the optional two tabs.\nThe contents of the tabs are filtered based on the name of the tab.\n@param tabs ArrayList of Strings"
] | [
"Convert from a DTO to an internal Spring bean definition.\n\n@param beanDefinitionDto The DTO object.\n@return Returns a Spring bean definition.",
"Use this API to add vpath resources.",
"Converts a tab delimited string into an object with given fields\nRequires the object has setXxx functions for the specifie... |
public PayloadBuilder resizeAlertBody(final int payloadLength, final String postfix) {
int currLength = length();
if (currLength <= payloadLength) {
return this;
}
// now we are sure that truncation is required
String body = (String)customAlert.get("body");
final int acceptableSize = Utilities.toUTF8Bytes(body).length
- (currLength - payloadLength
+ Utilities.toUTF8Bytes(postfix).length);
body = Utilities.truncateWhenUTF8(body, acceptableSize) + postfix;
// set it back
customAlert.put("body", body);
// calculate the length again
currLength = length();
if(currLength > payloadLength) {
// string is still too long, just remove the body as the body is
// anyway not the cause OR the postfix might be too long
customAlert.remove("body");
}
return this;
} | [
"Shrinks the alert message body so that the resulting payload\nmessage fits within the passed expected payload length.\n\nThis method performs best-effort approach, and its behavior\nis unspecified when handling alerts where the payload\nwithout body is already longer than the permitted size, or\nif the break occur... | [
"Use this API to update dospolicy resources.",
"Returns a specific profile\n\n@param profileId ID of profile\n@return Selected profile if found, null if not found\n@throws Exception exception",
"Creates the stats type.\n\n@param statsItems\nthe stats items\n@param sortType\nthe sort type\n@param functionParser\... |
protected static void safeWriteErrorResponse(final Channel channel, final ManagementProtocolHeader header, final Throwable error) {
if(header.getType() == ManagementProtocol.TYPE_REQUEST) {
try {
writeErrorResponse(channel, (ManagementRequestHeader) header, error);
} catch(IOException ioe) {
ProtocolLogger.ROOT_LOGGER.tracef(ioe, "failed to write error response for %s on channel: %s", header, channel);
}
}
} | [
"Safe write error response.\n\n@param channel the channel\n@param header the request header\n@param error the exception"
] | [
"Parse a list of objects from a JsonParser.\n\n@param jsonParser The JsonParser, preconfigured to be at the START_ARRAY token.",
"Recursively update parent task dates.\n\n@param parentTask parent task",
"Return a list of contacts for a user who have recently uploaded photos along with the total count of photos ... |
@Inject("struts.json.action.fileProtocols")
public void setFileProtocols(String fileProtocols) {
if (StringUtils.isNotBlank(fileProtocols)) {
this.fileProtocols = TextParseUtil.commaDelimitedStringToSet(fileProtocols);
}
} | [
"File URLs whose protocol are in these list will be processed as jars\ncontaining classes\n\n@param fileProtocols\nComma separated list of file protocols that will be considered\nas jar files and scanned"
] | [
"Get a property as a json array or throw exception.\n\n@param key the property name",
"Utility to list indexes of a given type.\n\n@param type the type of index to list, null means all types\n@param modelType the class to deserialize the index into\n@param <T> the type of the index\n@return the list of... |
public Object invokeMethod(String name, Object args) {
Object val = null;
if (args != null && Object[].class.isAssignableFrom(args.getClass())) {
Object[] arr = (Object[]) args;
if (arr.length == 1) {
val = arr[0];
} else if (arr.length == 2 && arr[0] instanceof Collection && arr[1] instanceof Closure) {
Closure<?> closure = (Closure<?>) arr[1];
Iterator<?> iterator = ((Collection) arr[0]).iterator();
List<Object> list = new ArrayList<Object>();
while (iterator.hasNext()) {
list.add(curryDelegateAndGetContent(closure, iterator.next()));
}
val = list;
} else {
val = Arrays.asList(arr);
}
}
content.put(name, val);
return val;
} | [
"Intercepts calls for setting a key and value for a JSON object\n\n@param name the key name\n@param args the value associated with the key"
] | [
"Sets the character translator for all cells in the row.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param charTranslator translator\n@return this to allow chaining",
"Set the ambient light intensity.\n\nThis designates the color of the ambient reflection.\nIt is... |
public void setIdleMaxAge(long idleMaxAge, TimeUnit timeUnit) {
this.idleMaxAgeInSeconds = TimeUnit.SECONDS.convert(idleMaxAge, checkNotNull(timeUnit));
} | [
"Sets Idle max age.\n\nThe time, for a connection to remain unused before it is closed off. Do not use aggressive values here!\n@param idleMaxAge time after which a connection is closed off\n@param timeUnit idleMaxAge time granularity."
] | [
"Called when the layout is applied to the data\n@param container WidgetContainer to access the org.gearvrf.org.gearvrf.widgetlib in the layout\n@param viewPortSize View port for data set",
"Creates a list of all permutations for a set with N elements.\n\n@param N Number of elements in the list being permuted.\n@r... |
public void setBaselineDurationText(int baselineNumber, String value)
{
set(selectField(TaskFieldLists.BASELINE_DURATIONS, baselineNumber), value);
} | [
"Sets the baseline duration text value.\n\n@param baselineNumber baseline number\n@param value baseline duration text value"
] | [
"private HttpServletResponse headers;",
"Read an int from an input stream.\n\n@param is input stream\n@return int value",
"Close tracks when the JVM shuts down.\n@return this",
"End building the script\n@param config the configuration for the script to build\n@return the new {@link LuaScript} instance",
"Al... |
@SuppressWarnings("unchecked")
private void addParameters(Model model, HttpServletRequest request) {
for (Object objectEntry : request.getParameterMap().entrySet()) {
Map.Entry<String, String[]> entry = (Map.Entry<String, String[]>) objectEntry;
String key = entry.getKey();
String[] values = entry.getValue();
if (null != values && values.length > 0) {
String value = values[0];
try {
model.addAttribute(key, getParameter(key, value));
} catch (ParseException pe) {
log.error("Could not parse parameter value {} for {}, ignoring parameter.", key, value);
} catch (NumberFormatException nfe) {
log.error("Could not parse parameter value {} for {}, ignoring parameter.", key, value);
}
}
}
} | [
"Add the extra parameters which are passed as report parameters. The type of the parameter is \"guessed\" from the\nfirst letter of the parameter name.\n\n@param model view model\n@param request servlet request"
] | [
"Returns the difference of sets s1 and s2.",
"Retrieves a specific range of items in this collection.\n@param offset the index of the first item to retrieve.\n@param limit the maximum number of items to retrieve after the offset.\n@param fields the fields to retrieve.\n@return a partial collect... |
private static void query(String filename) throws Exception
{
ProjectFile mpx = new UniversalProjectReader().read(filename);
listProjectProperties(mpx);
listResources(mpx);
listTasks(mpx);
listAssignments(mpx);
listAssignmentsByTask(mpx);
listAssignmentsByResource(mpx);
listHierarchy(mpx);
listTaskNotes(mpx);
listResourceNotes(mpx);
listRelationships(mpx);
listSlack(mpx);
listCalendars(mpx);
} | [
"This method performs a set of queries to retrieve information\nfrom the an MPP or an MPX file.\n\n@param filename name of the MPX file\n@throws Exception on file read error"
] | [
"adds all json extension to an diagram\n@param modelJSON\n@param current\n@throws org.json.JSONException",
"Convenience method for retrieving an Object resource.\n\n@param locale locale identifier\n@param key resource key\n@return resource value",
"Retrieve and validate the timeout value from the REST request.\... |
public boolean load()
{
_load();
java.util.Iterator it = this.alChildren.iterator();
while (it.hasNext())
{
Object o = it.next();
if (o instanceof OjbMetaTreeNode) ((OjbMetaTreeNode)o).load();
}
return true;
} | [
"Recursively loads the metadata for this node"
] | [
"This method retrieves the UID for a calendar associated with a task.\n\n@param mpx MPX Task instance\n@return calendar UID",
"Print the given values after displaying the provided message.",
"Wrap Statement with a proxy.\n@param target statement handle\n@param connectionHandle originating bonecp connection\n@re... |
public static double diagProd( DMatrix1Row T )
{
double prod = 1.0;
int N = Math.min(T.numRows,T.numCols);
for( int i = 0; i < N; i++ ) {
prod *= T.unsafe_get(i,i);
}
return prod;
} | [
"Computes the product of the diagonal elements. For a diagonal or triangular\nmatrix this is the determinant.\n\n@param T A matrix.\n@return product of the diagonal elements."
] | [
"The Baseline Start field shows the planned beginning date for a task at\nthe time you saved a baseline. Information in this field becomes available\nwhen you set a baseline.\n\n@return Date",
"Extract data for a single calendar.\n\n@param row calendar data",
"Unloads the sound file for this source, if any.",
... |
public void addIn(Object attribute, Query subQuery)
{
// PAW
// addSelectionCriteria(ValueCriteria.buildInCriteria(attribute, subQuery, getAlias()));
addSelectionCriteria(ValueCriteria.buildInCriteria(attribute, subQuery, getUserAlias(attribute)));
} | [
"IN Criteria with SubQuery\n@param attribute The field name to be used\n@param subQuery The subQuery"
] | [
"Given the comma separated list of properties as a string, splits it\nmultiple strings\n\n@param paramValue Concatenated string\n@param type Type of parameter ( to throw exception )\n@return List of string properties",
"Reset hard on HEAD.\n\n@throws GitAPIException",
"Fancy print without a space added to posit... |
public String getTypeDescriptor() {
if (typeDescriptor == null) {
StringBuilder buf = new StringBuilder(name.length() + parameters.length * 10);
buf.append(returnType.getName());
buf.append(' ');
buf.append(name);
buf.append('(');
for (int i = 0; i < parameters.length; i++) {
if (i > 0) {
buf.append(", ");
}
Parameter param = parameters[i];
buf.append(formatTypeName(param.getType()));
}
buf.append(')');
typeDescriptor = buf.toString();
}
return typeDescriptor;
} | [
"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"
] | [
"Use this API to fetch all the systemcore resources that are configured on netscaler.",
"Sets padding between the pages\n@param padding\n@param axis",
"Set HTTP client\n\n@param httpClient\nAn instance of OkHttpClient\n@return Api Client",
"Peeks the current top of the stack or returns null if the stack is em... |
public QueryBuilder<T, ID> join(QueryBuilder<?, ?> joinedQueryBuilder) throws SQLException {
addJoinInfo(JoinType.INNER, null, null, joinedQueryBuilder, JoinWhereOperation.AND);
return this;
} | [
"Join with another query builder. This will add into the SQL something close to \" INNER JOIN other-table ...\".\nEither the object associated with the current QueryBuilder or the argument QueryBuilder must have a foreign field\nof the other one. An exception will be thrown otherwise.\n\n<p>\n<b>NOTE:</b> This will... | [
"Retrieve the state object associated with the specified interceptor instance and property\nname on this request context.\n\n@param interceptor the interceptor instance\n@param stateName the name key that the state object was stored under\n@param stateType class of the type the stored state should be returned a... |
public void setWeeklyDay(Day day, boolean value)
{
if (value)
{
m_days.add(day);
}
else
{
m_days.remove(day);
}
} | [
"Set the state of an individual day in a weekly recurrence.\n\n@param day Day instance\n@param value true if this day is included in the recurrence"
] | [
"With the QR algorithm it is possible for the found singular values to be native. This\nmakes them all positive by multiplying it by a diagonal matrix that has",
"makes object obj persistent to the Objectcache under the key oid.",
"Use this API to delete appfwlearningdata resources.",
"Initialization necessa... |
private static void updateBaseCalendarNames(List<Pair<ProjectCalendar, BigInteger>> baseCalendars, HashMap<BigInteger, ProjectCalendar> map)
{
for (Pair<ProjectCalendar, BigInteger> pair : baseCalendars)
{
ProjectCalendar cal = pair.getFirst();
BigInteger baseCalendarID = pair.getSecond();
ProjectCalendar baseCal = map.get(baseCalendarID);
if (baseCal != null)
{
cal.setParent(baseCal);
}
}
} | [
"The way calendars are stored in an MSPDI file means that there\ncan be forward references between the base calendar unique ID for a\nderived calendar, and the base calendar itself. To get around this,\nwe initially populate the base calendar name attribute with the\nbase calendar unique ID, and now in this method ... | [
"Removes the duplicate node list.\n\n@param list\nthe list\n@return the int",
"Emit a event object with parameters and force all listeners to be called asynchronously.\n\n@param event\nthe target event\n@param args\nthe arguments passed in\n@see #emit(EventObject, Object...)",
"Try to provide an escaped, ready-... |
public ConverterServerBuilder requestTimeout(long timeout, TimeUnit unit) {
assertNumericArgument(timeout, true);
this.requestTimeout = unit.toMillis(timeout);
return this;
} | [
"Specifies the timeout for a network request.\n\n@param timeout The timeout for a network request.\n@param unit The time unit of the specified timeout.\n@return This builder instance."
] | [
"Flag that the processor has started execution.\n\n@param processorGraphNode the node that has started.",
"Returns the text content to any HTML.\n\n@param html the HTML\n\n@return the text content",
"Create a new Date. To the last day.",
"Finds the maximum abs in each column of A and stores it into values\n@p... |
protected synchronized void doWriteObjects(boolean isFlush) throws TransactionAbortedException, LockNotGrantedException
{
/*
arminw:
if broker isn't in PB-tx, start tx
*/
if (!getBroker().isInTransaction())
{
if (log.isDebugEnabled()) log.debug("call beginTransaction() on PB instance");
broker.beginTransaction();
}
// Notify objects of impending commits.
performTransactionAwareBeforeCommit();
// Now perfom the real work
objectEnvelopeTable.writeObjects(isFlush);
// now we have to perform the named objects
namedRootsMap.performDeletion();
namedRootsMap.performInsert();
namedRootsMap.afterWriteCleanup();
} | [
"Write objects to data store, but don't release the locks.\nI don't know what we should do if we are in a checkpoint and\nwe need to abort."
] | [
"Retrieves an integer value from the extended data.\n\n@param type Type identifier\n@return integer value",
"Should this request URI be compressed?\n\n@param requestUri request URI\n@return true when should be compressed",
"An extension point so we can control how the query gets executed.\nThis exists for testi... |
protected Patch createProcessedPatch(final Patch original) {
// Process elements
final List<PatchElement> elements = new ArrayList<PatchElement>();
// Process layers
for (final PatchEntry entry : getLayers()) {
final PatchElement element = createPatchElement(entry, entry.element.getId(), entry.modifications);
elements.add(element);
}
// Process add-ons
for (final PatchEntry entry : getAddOns()) {
final PatchElement element = createPatchElement(entry, entry.element.getId(), entry.modifications);
elements.add(element);
}
// Swap the patch element modifications, keep the identity ones since we don't need to fix the misc modifications
return new PatchImpl(original.getPatchId(), original.getDescription(), original.getLink(), original.getIdentity(), elements, identityEntry.modifications);
} | [
"Create a patch representing what we actually processed. This may contain some fixed content hashes for removed\nmodules.\n\n@param original the original\n@return the processed patch"
] | [
"Changes to a new sub-view and stores a report to be displayed by that subview.<p<\n\n@param newState the new state\n@param thread the report thread which should be displayed in the sub view\n@param label the label to display for the report",
"prefetch defined relationships requires JDBC level 2.0, does not work\... |
public Map<String, MBeanOperationInfo> getOperationMetadata() {
MBeanOperationInfo[] operations = mBeanInfo.getOperations();
Map<String, MBeanOperationInfo> operationMap = new TreeMap<String, MBeanOperationInfo>();
for (MBeanOperationInfo operation: operations) {
operationMap.put(operation.getName(), operation);
}
return operationMap;
} | [
"Get the Operation metadata for an MBean by name.\n@return the {@link Map} of {@link String} operation names to {@link MBeanOperationInfo} values."
] | [
"helper function to convert strings to bytes as needed.\n\n@param key\n@param value",
"Returns the current revision.",
"Use this API to fetch all the transformpolicylabel resources that are configured on netscaler.",
"Output method responsible for sending the updated content to the Subscribers.\n\n@param cn",... |
private void pushRight( int row ) {
if( isOffZero(row))
return;
// B = createB();
// B.print();
rotatorPushRight(row);
int end = N-2-row;
for( int i = 0; i < end && bulge != 0; i++ ) {
rotatorPushRight2(row,i+2);
}
// }
} | [
"If there is a zero on the diagonal element, the off diagonal element needs pushed\noff so that all the algorithms assumptions are two and so that it can split the matrix."
] | [
"Kicks off an animation that will result in the pointer being centered in the\npie slice of the currently selected item.",
"Adds another condition for an element within this annotation.",
"Recurses the given folder and creates the FileModels vertices for the child files to the graph.",
"Use this API to fetch ... |
public static ManagerFunctions.InputN createMultTransA() {
return (inputs, manager) -> {
if( inputs.size() != 2 )
throw new RuntimeException("Two inputs required");
final Variable varA = inputs.get(0);
final Variable varB = inputs.get(1);
Operation.Info ret = new Operation.Info();
if( varA instanceof VariableMatrix && varB instanceof VariableMatrix ) {
// The output matrix or scalar variable must be created with the provided manager
final VariableMatrix output = manager.createMatrix();
ret.output = output;
ret.op = new Operation("multTransA-mm") {
@Override
public void process() {
DMatrixRMaj mA = ((VariableMatrix)varA).matrix;
DMatrixRMaj mB = ((VariableMatrix)varB).matrix;
CommonOps_DDRM.multTransA(mA,mB,output.matrix);
}
};
} else {
throw new IllegalArgumentException("Expected both inputs to be a matrix");
}
return ret;
};
} | [
"Create the function. Be sure to handle all possible input types and combinations correctly and provide\nmeaningful error messages. The output matrix should be resized to fit the inputs."
] | [
"Returns iterable with all folder 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 folder assignments.",
"Return the \"common\" configuration set name. By default it is \"comm... |
protected void parseOperationsL(TokenList tokens, Sequence sequence) {
if( tokens.size == 0 )
return;
TokenList.Token token = tokens.first;
if( token.getType() != Type.VARIABLE )
throw new ParseError("The first token in an equation needs to be a variable and not "+token);
while( token != null ) {
if( token.getType() == Type.FUNCTION ) {
throw new ParseError("Function encountered with no parentheses");
} else if( token.getType() == Type.SYMBOL && token.getSymbol() == Symbol.TRANSPOSE) {
if( token.previous.getType() == Type.VARIABLE )
token = insertTranspose(token.previous,tokens,sequence);
else
throw new ParseError("Expected variable before transpose");
}
token = token.next;
}
} | [
"Parses operations where the input comes from variables to its left only. Hard coded to only look\nfor transpose for now\n\n@param tokens List of all the tokens\n@param sequence List of operation sequence"
] | [
"Accessor method used to retrieve an Rate object representing the\ncontents of an individual field. If the field does not exist in the\nrecord, null is returned.\n\n@param field the index number of the field to be retrieved\n@return the value of the required field\n@throws MPXJException normally thrown when parsing... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.