query stringlengths 74 6.1k | positive listlengths 1 1 | negative listlengths 9 9 |
|---|---|---|
public Map<String, MBeanAttributeInfo> getAttributeMetadata() {
MBeanAttributeInfo[] attributeList = mBeanInfo.getAttributes();
Map<String, MBeanAttributeInfo> attributeMap = new TreeMap<String, MBeanAttributeInfo>();
for (MBeanAttributeInfo attribute: attributeList) {
attributeMap... | [
"Get the Attribute metadata for an MBean by name.\n@return the {@link Map} of {@link String} attribute names to {@link MBeanAttributeInfo} values."
] | [
"Use this API to add cmppolicylabel.",
"Helper to get locale specific properties.\n\n@return the locale specific properties map.",
"Use this API to unset the properties of tmsessionparameter resource.\nProperties that need to be unset are specified in args array.",
"Gets all the enterprise events that occurre... |
private PBKey buildDefaultKey()
{
List descriptors = connectionRepository().getAllDescriptor();
JdbcConnectionDescriptor descriptor;
PBKey result = null;
for (Iterator iterator = descriptors.iterator(); iterator.hasNext();)
{
descriptor = (JdbcConnectionDes... | [
"Try to build an default PBKey for convenience PB create method.\n\n@return PBKey or <code>null</code> if default key was not declared in\nmetadata"
] | [
"Return true only if the specified object responds to the named method\n@param object - the object to check\n@param methodName - the name of the method\n@return true if the object responds to the named method",
"all objects in list1 that are not in list2\n\n@param <T>\n@param list1\nFirst collection\n@param list2... |
public boolean detectBlackBerryTouch() {
if (detectBlackBerry()
&& ((userAgent.indexOf(deviceBBStorm) != -1)
|| (userAgent.indexOf(deviceBBTorch) != -1)
|| (userAgent.indexOf(deviceBBBoldTouch) != -1)
|| (userAgent.indexOf(deviceBBCurveTouch) !=... | [
"Detects if the current browser is a BlackBerry Touch\ndevice, such as the Storm, Torch, and Bold Touch. Excludes the Playbook.\n@return detection of a Blackberry touchscreen device"
] | [
"Reflection API to find the method corresponding to the default implementation of a trait, given a bridge method.\n@param someMethod a method node\n@return null if it is not a method implemented in a trait. If it is, returns the method from the trait class.",
"Returns the optional query modifier.\n@return the opt... |
public static String writeMultipleClientConfigAvro(Map<String, Properties> mapStoreToProps) {
// TODO: Use a dedicated json lib. We shouldn't be manually manipulating json...
String avroConfig = "";
Boolean firstStore = true;
for(String storeName: mapStoreToProps.keySet()) {
... | [
"Assembles an avro format string that contains multiple fat client configs\nfrom map of store to properties\n\n@param mapStoreToProps A map of store names to their properties\n@return Avro string that contains multiple store configs"
] | [
"Converts any string into a string that is safe to use as a file name.\nThe result will only include ascii characters and numbers, and the \"-\",\"_\", and \".\" characters.",
"This method can be used by child classes to apply the configuration that is stored in config.",
"Get bean manager from portlet context.... |
protected MappedPreparedStmt<T, ID> prepareStatement(Long limit, boolean cacheStore) throws SQLException {
List<ArgumentHolder> argList = new ArrayList<ArgumentHolder>();
String statement = buildStatementString(argList);
ArgumentHolder[] selectArgs = argList.toArray(new ArgumentHolder[argList.size()]);
FieldTyp... | [
"Prepare our statement for the subclasses.\n\n@param limit\nLimit for queries. Can be null if none."
] | [
"Deserializes a variable, checking whether the datatype is custom or not\n@param s\n@param variableType\n@param dataTypes\n@return",
"Parses an RgbaColor from an rgb value.\n\n@return the parsed color",
"Add new control at the end of control bar with specified touch listener.\nSize of control bar is updated bas... |
public static DMatrixRMaj nullspaceQRP( DMatrixRMaj A , int totalSingular ) {
SolveNullSpaceQRP_DDRM solver = new SolveNullSpaceQRP_DDRM();
DMatrixRMaj nullspace = new DMatrixRMaj(1,1);
if( !solver.process(A,totalSingular,nullspace))
throw new RuntimeException("Solver failed. try S... | [
"Computes the null space using QRP decomposition. This is faster than using SVD but slower than QR.\nMuch more stable than QR though.\n@param A (Input) Matrix\n@param totalSingular Number of singular values\n@return Null space"
] | [
"Truncated power function.\n\n@param value Value.\n@param degree Degree.\n@return Result.",
"Delivers the correct JSON Object for the Stencilset Extensions\n\n@param extensions",
"Use this API to update protocolhttpband.",
"As part of checking whether a metadata cache can be auto-mounted for a particular med... |
@PostConstruct
protected void postConstruct() {
if (pixelPerUnitBased) {
// Calculate numerator and denominator
if (pixelPerUnit > PIXEL_PER_METER) {
this.numerator = pixelPerUnit / conversionFactor;
this.denominator = 1;
} else {
this.numerator = 1;
this.denominator = PIXEL_PER_METER / pixe... | [
"Finish configuration."
] | [
"Called internally to actually process the Iteration.",
"Determine which type of percent complete is used on on this task,\nand calculate the required value.\n\n@param row task data\n@return percent complete value",
"Use this API to add ipset.",
"Get a collection of all of the user's groups.\n\n@return A Coll... |
public void setList(List<T> list) {
if (list != mList) {
mList = list;
if (mList == null) {
notifyInvalidated();
} else {
notifyChanged();
}
}
} | [
"Set new list data set\n@param list new data set"
] | [
"We have received an update that invalidates the waveform preview for a player, so clear it and alert\nany listeners if this represents a change. This does not affect the hot cues; they will stick around until the\nplayer loads a new track that overwrites one or more of them.\n\n@param update the update which means... |
public static DMatrixRMaj insideSpan(DMatrixRMaj[] span , double min , double max , Random rand ) {
DMatrixRMaj A = new DMatrixRMaj(span.length,1);
DMatrixRMaj B = new DMatrixRMaj(span[0].getNumElements(),1);
for( int i = 0; i < span.length; i++ ) {
B.set(span[i]);
doub... | [
"Creates a random vector that is inside the specified span.\n\n@param span The span the random vector belongs in.\n@param rand RNG\n@return A random vector within the specified span."
] | [
"This method retrieves the data at the given offset and returns\nit as a String, assuming the underlying data is composed of\nsingle byte characters.\n\n@param offset offset of required data\n@return string containing required data",
"Restores a trashed folder back to its original location.\n@param folderID the ... |
public boolean endsWith(Bytes suffix) {
Objects.requireNonNull(suffix, "endsWith(Bytes suffix) cannot have null parameter");
int startOffset = this.length - suffix.length;
if (startOffset < 0) {
return false;
} else {
int end = startOffset + this.offset + suffix.length;
for (int i = s... | [
"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"
] | [
"Deletes this BoxStoragePolicyAssignment.",
"Add an entry to the cache.\n@param key key to use.\n@param value access token information to store.",
"2-D Forward Discrete Hartley Transform.\n\n@param data Data.",
"Sum of all elements\n\n@param A (Input) Matrix. Not modified.\n@return scalar",
"loads... |
public void createNewFile() throws SmbException {
if( getUncPath0().length() == 1 ) {
throw new SmbException( "Invalid operation for workgroups, servers, or shares" );
}
close( open0( O_RDWR | O_CREAT | O_EXCL, 0, ATTR_NORMAL, 0 ), 0L );
} | [
"Create a new file but fail if it already exists. The check for\nexistance of the file and it's creation are an atomic operation with\nrespect to other filesystem activities."
] | [
"Set an attribute of this node as Object. This method is backed by\na HashMap, so all rules of HashMap apply to this method.\nFires a PropertyChangeEvent.",
"Returns all the deployment runtime names associated with an overlay accross all server groups.\n\n@param context the current OperationContext.\n@param overl... |
String getDefaultReturnFields() {
StringBuffer fields = new StringBuffer("");
fields.append(CmsSearchField.FIELD_PATH);
fields.append(',');
fields.append(CmsSearchField.FIELD_INSTANCEDATE).append('_').append(getSearchLocale().toString()).append("_dt");
fields.append(',');
... | [
"The fields returned by default. Typically the output is done via display formatters and hence nearly no\nfield is necessary. Returning all fields might cause performance problems.\n\n@return the default return fields."
] | [
"Perform a post-boot scan to remove any deployments added during boot that failed to deploy properly.\nThis method isn't private solely to allow a unit test in the same package to call it.",
"Attaches locale groups to the copied page.\n@param copiedPage the copied page.\n@throws CmsException thrown if the root cm... |
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
for (ResourceRoot resourceRoot : DeploymentUtils.allResourceRoots(deploymentUnit)) {
ResourceRootIndexer.indexResourceRoo... | [
"Process this deployment for annotations. This will use an annotation indexer to create an index of all annotations\nfound in this deployment and attach it to the deployment unit context.\n\n@param phaseContext the deployment unit context\n@throws DeploymentUnitProcessingException"
] | [
"Answer the counted size\n\n@return int",
"Sets the value to a default.",
"Retrieve the number of minutes per week for this calendar.\n\n@return minutes per week",
"Matrix inverse for symmetric positive definite matrices. For small matrices an unrolled\ncholesky is used. Otherwise a standard decomposition.\n\... |
public ListResponse listTemplates(Map<String, Object> options)
throws RequestException, LocalOperationException {
Request request = new Request(this);
return new ListResponse(request.get("/templates", options));
} | [
"Returns a list of all templates under the user account\n\n@param options {@link Map} extra options to send along with the request.\n@return {@link ListResponse}\n\n@throws RequestException if request to transloadit server fails.\n@throws LocalOperationException if something goes wrong while running non-http operat... | [
"Answer the TableAlias for aPath\n@param aPath\n@param hintClasses\n@return TableAlias, null if none",
"Use this API to unset the properties of nslimitselector resource.\nProperties that need to be unset are specified in args array.",
"Shows a dialog with user information for given session.\n\n@param session to... |
private Date readOptionalDate(JSONValue val) {
JSONString str = null == val ? null : val.isString();
if (str != null) {
try {
return new Date(Long.parseLong(str.stringValue()));
} catch (@SuppressWarnings("unused") NumberFormatException e) {
// do... | [
"Read an optional Date value form a JSON value.\n@param val the JSON value that should represent the Date as long value in a string.\n@return the Date from the JSON or null if reading the date fails."
] | [
"Finds all the resource names contained in this file system folder.\n\n@param classPathRootOnDisk The location of the classpath root on disk, with a trailing slash.\n@param scanRootLocation The root location of the scan on the classpath, without leading or trailing slashes.\n@param folder The folder... |
public static <T> NewSessionBean<T> of(BeanAttributes<T> attributes, InternalEjbDescriptor<T> ejbDescriptor, BeanManagerImpl beanManager) {
EnhancedAnnotatedType<T> type = beanManager.getServices().get(ClassTransformer.class).getEnhancedAnnotatedType(ejbDescriptor.getBeanClass(), beanManager.getId());
r... | [
"Creates an instance of a NewEnterpriseBean from an annotated class\n\n@param clazz The annotated class\n@param beanManager The Bean manager\n@return a new NewEnterpriseBean instance"
] | [
"Use this API to update cachecontentgroup.",
"Displays a sample model for the report request.\n@return A string describing the structure of a certain report execution",
"Returns the full workspace record for a single workspace.\n\n@param workspace Globally unique identifier for the workspace or organization.\n... |
public static vpnsessionaction get(nitro_service service, String name) throws Exception{
vpnsessionaction obj = new vpnsessionaction();
obj.set_name(name);
vpnsessionaction response = (vpnsessionaction) obj.get_resource(service);
return response;
} | [
"Use this API to fetch vpnsessionaction resource of given name ."
] | [
"Gets a list of registered docker images from the images cache, if it has been\nregistered to the cache for a specific build-info ID and if a docker manifest has been captured for it\nby the build-info proxy.\nAdditionally, the methods also removes the returned images from the cache.\n@param buildInfoId\n@return",
... |
public static sslcipher get(nitro_service service, String ciphergroupname) throws Exception{
sslcipher obj = new sslcipher();
obj.set_ciphergroupname(ciphergroupname);
sslcipher response = (sslcipher) obj.get_resource(service);
return response;
} | [
"Use this API to fetch sslcipher resource of given name ."
] | [
"Sets the name of the base calendar associated with this task.\nNote that this attribute appears in MPP9 and MSPDI files.\n\n@param calendar calendar instance",
"Log warning for the resource at the provided address and single attribute, using the provided detail\nmessage.\n\n@param address where warning occurre... |
private Query getReportQueryByCriteriaCount(ReportQueryByCriteria aQuery)
{
ReportQueryByCriteria countQuery = (ReportQueryByCriteria) getQueryByCriteriaCount(aQuery);
// BRJ: keep the original columns to build the Join
countQuery.setJoinAttributes(aQuery.getAttributes());
/... | [
"Create a Count-Query for ReportQueryByCriteria"
] | [
"Returns with an iterable of URIs that points to all elements that are\nreferenced by the argument or vice-versa.\n\n@return an iterable of URIs that are referenced by the argument or the\nother way around.",
"This method retrieves ONLY the ROOT actions",
"Creates a Span that covers an exact row. String paramet... |
private void writeFileCreationRecord() throws IOException
{
ProjectProperties properties = m_projectFile.getProjectProperties();
m_buffer.setLength(0);
m_buffer.append("MPX");
m_buffer.append(m_delimiter);
m_buffer.append(properties.getMpxProgramName());
m_buffer.append(m_delimit... | [
"Write file creation record.\n\n@throws IOException"
] | [
"This method lists any notes attached to tasks.\n\n@param file MPX file",
"Get random geographical location\n@return 2-Tuple of ints (latitude, longitude)",
"Print work units.\n\n@param value TimeUnit instance\n@return work units value",
"For a given activity, retrieve a map of the activity code values which ... |
public static InputStream toStream(String content, Charset charset) {
byte[] bytes = content.getBytes(charset);
return new ByteArrayInputStream(bytes);
} | [
"Converts the string of given content to an input stream.\n\n@param content the string content.\n@param charset the charset for conversion.\n@return the stream (should be closed by invoker)."
] | [
"Creates a new instance with the given key and value.\nMay be used instead of the constructor for convenience reasons.\n\n@param k\nthe key. May be <code>null</code>.\n@param v\nthe value. May be <code>null</code>.\n@return a newly created pair. Never <code>null</code>.\n@since 2.3",
"Get the inactive history dir... |
public static String makeAsciiTable(Object[][] table, Object[] rowLabels, Object[] colLabels, int padLeft, int padRight, boolean tsv) {
StringBuilder buff = new StringBuilder();
// top row
buff.append(makeAsciiTableCell("", padLeft, padRight, tsv)); // the top left cell
for (int j = 0; j < table[0].... | [
"Returns an text table containing the matrix of Strings passed in.\nThe first dimension of the matrix should represent the rows, and the\nsecond dimension the columns."
] | [
"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.",
"So we will follow rfc 1035 and in addition allow the underscore.",
"Non-blocking call\n\n@param key\n@param value\n@return",
... |
public PayloadBuilder customField(final String key, final Object value) {
root.put(key, value);
return this;
} | [
"Sets any application-specific custom fields. The values\nare presented to the application and the iPhone doesn't\ndisplay them automatically.\n\nThis can be used to pass specific values (urls, ids, etc) to\nthe application in addition to the notification message\nitself.\n\n@param key the custom field name\n@pa... | [
"Sets a property on this Javascript object for which the value is a\nJavascriptEnum\n\nThe value is set to what is returned by the getEnumValue() method on the JavascriptEnum\n\n@param propertyName The name of the property.\n@param propertyValue The value of the property.",
"Returns the specified range of element... |
private void setMax(MtasRBTreeNode n) {
n.max = n.right;
if (n.leftChild != null) {
n.max = Math.max(n.max, n.leftChild.max);
}
if (n.rightChild != null) {
n.max = Math.max(n.max, n.rightChild.max);
}
} | [
"Sets the max.\n\n@param n the new max"
] | [
"Returns a copy of the given document.\n@param document the document to copy.\n@return a copy of the given document.",
"Create an embedded host controller.\n\n@param jbossHomePath the location of the root of the host controller installation. Cannot be {@code null} or empty.\n@param modulePath the location of the ... |
public void load(IAssetEvents handler)
{
GVRAssetLoader loader = getGVRContext().getAssetLoader();
if (mReplaceScene)
{
loader.loadScene(getOwnerObject(), mVolume, mImportSettings, getGVRContext().getMainScene(), handler);
}
else
{
loader.load... | [
"Loads the asset referenced by the file name\nunder the owner of this component.\nIf this component was constructed to replace the scene with\nthe asset, the main scene of the current context\nwill contain only the owner of this\ncomponent upon return. Otherwise, the loaded asset is a\nchild of this component's own... | [
"Use this API to update vridparam.",
"Perform all Cursor cleanup here.",
"at this point definition below is not really needed as it is the same as for 1.1, but it is here as place holder when subsystem parser evolves.",
"Sends a message to the dbserver, first assembling it into a single byte buffer so that it... |
private static <T, ID> void addCreateTableStatements(DatabaseType databaseType, TableInfo<T, ID> tableInfo,
List<String> statements, List<String> queriesAfter, boolean ifNotExists, boolean logDetails)
throws SQLException {
StringBuilder sb = new StringBuilder(256);
if (logDetails) {
logger.info("creating t... | [
"Generate and return the list of statements to create a database table and any associated features."
] | [
"Perform the work of processing the various OperationContext.Stage queues, and then the DONE stage.",
"Aggregates a list of templates specified by @Template",
"Returns a licenses regarding its Id and a fake on if no license exist with such an Id\n\n@param licenseId String\n@return License",
"Counts a single p... |
synchronized void transitionFailed(final InternalState state) {
final InternalState current = this.internalState;
if(state == current) {
// Revert transition and mark as failed
switch (current) {
case PROCESS_ADDING:
this.internalState = Intern... | [
"Notification that a state transition failed.\n\n@param state the failed transition"
] | [
"Destroy the proxy & update the map containing the registration ref.\n\n@param importDeclaration",
"Fetch the outermost Hashmap.\n\n@param firstKey\nfirst key\n@return the the innermost hashmap",
"Get the authentication info for this layer.\n\n@return authentication info.",
"Copies just the upper or lower tri... |
protected boolean shouldApplyThisRuleTo(ClassNode classNode) {
// TODO Consider caching applyTo, doNotApplyTo and associated WildcardPatterns
boolean shouldApply = true;
String applyTo = getApplyToClassNames();
String doNotApplyTo = getDoNotApplyToClassNames();
if (apply... | [
"Return true if this rule should be applied for the specified ClassNode, based on the\nconfiguration of this rule.\n@param classNode - the ClassNode\n@return true if this rule should be applied for the specified ClassNode"
] | [
"Applies the given codec registry to be used alongside the default codec registry.\n\n@param codecRegistry the codec registry to merge in.\n@return an {@link StitchObjectMapper} with the merged codec registries.",
"Stops the currently running animation, if any.\n@see GVRAvatar#start(String)\n@see GVRAnimationEngi... |
protected static boolean numericEquals(Field vector1, Field vector2) {
if (vector1.size() != vector2.size())
return false;
if (vector1.isEmpty())
return true;
Iterator<Object> it1 = vector1.iterator();
Iterator<Object> it2 = vector2.iterator();
while (it1.hasNext()) {
Object obj1 = it1.next();
O... | [
"Compares two vectors and determines if they are numeric equals,\nindependent of its type.\n\n@param vector1\nthe first vector\n@param vector2\nthe second vector\n@return true if the vectors are numeric equals"
] | [
"Disply available use cases.",
"Adds a redeploy step to the composite operation.\n\n@param builder the builder to add the step to\n@param deployment the deployment being redeployed",
"Allows the closure to be called for NullObject\n\n@param closure the closure to call on the object\n@return result of calling... |
private String formatConstraintType(ConstraintType type)
{
return (type == null ? null : LocaleData.getStringArray(m_locale, LocaleData.CONSTRAINT_TYPES)[type.getValue()]);
} | [
"This method is called to format a constraint type.\n\n@param type constraint type\n@return formatted constraint type"
] | [
"Invoke the operation.\n@param parameterMap the {@link Map} of parameter names to value arrays.\n@return the {@link Object} return value from the operation.\n@throws JMException Java Management Exception",
"Main method of the class, which handles the process of creating the tests\n\n@param requirementsFolder\n, i... |
public static base_response add(nitro_service client, dospolicy resource) throws Exception {
dospolicy addresource = new dospolicy();
addresource.name = resource.name;
addresource.qdepth = resource.qdepth;
addresource.cltdetectrate = resource.cltdetectrate;
return addresource.add_resource(client);
} | [
"Use this API to add dospolicy."
] | [
"This method is very similar to addMainHandler, except ShellFactory\nwill pass all handlers registered with this method to all this shell's subshells.\n\n@see org.gearvrf.debug.cli.Shell#addMainHandler(java.lang.Object, java.lang.String)\n\n@param handler Object which should be registered as handler.\n@param prefix... |
public void editCoords(String photoId, String userId, Rectangle bounds) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_EDIT_COORDS);
parameters.put("photo_id", photoId);
parameters.put("user_id", userId);
... | [
"Edit the co-ordinates that the user shows in\n\n@param photoId\n@param userId\n@param bounds\n@throws FlickrException"
] | [
"Returns the current revision.",
"Sets the top padding for all cells in the table.\n@param paddingTop new padding, ignored if smaller than 0\n@return this to allow chaining",
"Perform a one-off scan during boot to establish deployment tasks to execute during boot",
"Get the names of the currently registered f... |
public void addCommandClass(ZWaveCommandClass commandClass)
{
ZWaveCommandClass.CommandClass key = commandClass.getCommandClass();
if (!supportedCommandClasses.containsKey(key)) {
supportedCommandClasses.put(key, commandClass);
if (commandClass instanceof ZWaveEventListener)
this.controller.addEve... | [
"Adds a command class to the list of supported command classes by this node.\nDoes nothing if command class is already added.\n@param commandClass the command class instance to add."
] | [
"look for zero after country code, and remove if present",
"Create a handful of default currencies to keep Primavera happy.",
"Print the given values after displaying the provided message.",
"Set a custom response for this path\n\n@param pathName name of path\n@param customResponse value of custom response\n@... |
public static <T> boolean addAll(Collection<T> self, Iterable<T> items) {
boolean changed = false;
for (T next : items) {
if (self.add(next)) changed = true;
}
return changed;
} | [
"Adds all items from the iterable to the Collection.\n\n@param self the collection\n@param items the items to add\n@return true if the collection changed"
] | [
"Add new control at the end of control bar with specified touch listener.\nSize of control bar is updated based on new number of controls.\n@param name name of the control to remove\n@param properties JSON control specific properties\n@param listener touch listener",
"Use this API to fetch vpnsessionaction resour... |
public double[][] getU() {
double[][] X = new double[n][n];
double[][] U = X;
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
if (i <= j) {
U[i][j] = LU[i][j];
} else {
U[i][j] = 0.0;
... | [
"Get the Upper triangular factor.\n\n@return U."
] | [
"Use this API to add dospolicy.",
"Use this API to fetch appfwhtmlerrorpage resource of given name .",
"Logs a message for a case where the value of a property does not fit to\nits declared datatype.\n\n@param propertyIdValue\nthe property that was used\n@param datatype\nthe declared type of the property\n@para... |
public Object newInstance(String resource) {
try {
String name = resource.startsWith("/") ? resource : "/" + resource;
File file = new File(this.getClass().getResource(name).toURI());
return newInstance(classLoader.parseClass(new GroovyCodeSource(file), true));
} catc... | [
"Creates an object instance from the Groovy resource\n\n@param resource the Groovy resource to parse\n@return An Object instance"
] | [
"Opens the jar, wraps any IOException.",
"Set a proxy for REST-requests.\n\n@param proxyHost\n@param proxyPort",
"For each node, checks if the store exists and then verifies that the remote schema\nmatches the new one. If the remote store doesn't exist, it creates it.",
"performs a primary key lookup operatio... |
private static int getTrimmedHeight(BufferedImage img) {
int width = img.getWidth();
int height = img.getHeight();
int trimmedHeight = 0;
for (int i = 0; i < width; i++) {
for (int j = height - 1; j >= 0; j--) {
if (img.getRGB(i, j) != Color.WHITE.getRGB() && j > trimmedHeight) {
... | [
"Get the last non-white Y point\n@param img Image in memory\n@return The trimmed height"
] | [
"Use this API to fetch all the autoscaleprofile resources that are configured on netscaler.",
"Use this API to update nsrpcnode resources.",
"Convert the Phoenix representation of a duration into a Duration instance.\n\n@param value Phoenix duration\n@return Duration instance",
"Generate a call to the delegat... |
@Nullable
public Import find(@Nonnull final String typeName) {
Check.notEmpty(typeName, "typeName");
Import ret = null;
final Type type = new Type(typeName);
for (final Import imp : imports) {
if (imp.getType().getName().equals(type.getName())) {
ret = imp;
break;
}
}
if (ret == null) {
fi... | [
"Searches the set of imports to find a matching import by type name.\n\n@param typeName\nname of type (qualified or simple name allowed)\n@return found import or {@code null}"
] | [
"Sets object for statement at specific index, adhering to platform- and null-rules.\n@param stmt the statement\n@param index the current parameter index\n@param value the value to set\n@param sqlType the JDBC SQL-type of the value\n@throws SQLException on platform error",
"gets a class from the class cache. This ... |
public String renameApp(String appName, String newName) {
return connection.execute(new AppRename(appName, newName), apiKey).getName();
} | [
"Rename an existing app.\n@param appName Existing app name. See {@link #listApps()} for names that can be used.\n@param newName New name to give the existing app.\n@return the new name of the object"
] | [
"Use this API to clear Interface.",
"generates a Meta Object Protocol method, that is used to call a non public\nmethod, or to make a call to super.\n\n@param mopCalls list of methods a mop call method should be generated for\n@param useThis true if \"this\" should be used for the naming",
"Adds a handler for ... |
public static Map<String, String> getMetadataFromSequenceFile(FileSystem fs, Path path) {
try {
Configuration conf = new Configuration();
conf.setInt("io.file.buffer.size", 4096);
SequenceFile.Reader reader = new SequenceFile.Reader(fs, path, new Configuration());
... | [
"Read the metadata from a hadoop SequenceFile\n\n@param fs The filesystem to read from\n@param path The file to read from\n@return The metadata from this file"
] | [
"To read an object in a quick & dirty way. Prepare to handle failures when object serialization changes!",
"Get all the attribute values for an MBean by name. The values are HTML escaped.\n@return the {@link Map} of attribute names and values.\n@throws javax.management.AttributeNotFoundException Unable to find t... |
public Map<String, Attribute> getAttributes() {
Map<String, Attribute> result = new HashMap<>();
DataSourceAttribute datasourceAttribute = new DataSourceAttribute();
Map<String, Attribute> dsResult = new HashMap<>();
dsResult.put(MAP_KEY, this.mapAttribute);
datasourceAttribute.s... | [
"Gets the attributes provided by the processor.\n\n@return the attributes"
] | [
"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.",
"Decompiles a single type.\n\n@param metadataSystem\n@param typeName\n@return\n@throws IOException",
"Use this API to add inat r... |
private boolean addType(TypeDefinition type) {
if (type == null) {
return false;
}
if (type.getBaseTypeId() == null) {
return false;
}
// find base type
TypeDefinition baseType = null;
if (type.getBaseTypeId() == BaseTypeId.CMIS_DOCUMENT... | [
"Adds a type to collection with inheriting base type properties.\n\n@param type the type definition to add\n\n@return true if the type definition was added"
] | [
"Method for reporting SQLException. This is used by\nthe treenodes if retrieving information for a node\nis not successful.\n@param message The message describing where the error occurred\n@param sqlEx The exception to be reported.",
"Generates a toString method using concatenation or a StringBuilder.",
"Write ... |
public void addControllerType(GVRControllerType controllerType)
{
if (cursorControllerTypes == null)
{
cursorControllerTypes = new ArrayList<GVRControllerType>();
}
else if (cursorControllerTypes.contains(controllerType))
{
return;
}
cu... | [
"Enable the use of the given controller type by\nadding it to the cursor controller types list.\n@param controllerType GVRControllerType to add to the list"
] | [
"Get the object responsible for printing to the correct output format.\n\n@param specJson the request json from the client",
"once we're on ORM 5",
"Generates required number of placeholders as string.\n\nExample: {@code numberOfPlaceholders == 1, result == \"?\"},\n{@code numberOfPlaceholders == 2, result == \... |
TrackMetadata queryMetadata(final DataReference track, final CdjStatus.TrackType trackType, final Client client)
throws IOException, InterruptedException, TimeoutException {
// Send the metadata menu request
if (client.tryLockingForMenuOperations(20, TimeUnit.SECONDS)) {
try {
... | [
"Request metadata for a specific track ID, given a dbserver connection to a player that has already been set up.\nSeparated into its own method so it could be used multiple times with the same connection when gathering\nall track metadata.\n\n@param track uniquely identifies the track whose metadata is desired\n@pa... | [
"Get the element at the index as a json array.\n\n@param i the index of the element to access",
"Sets the first occurence.\n\n@param min the min\n@param max the max\n@throws ParseException the parse exception",
"Assigns a retention policy to all items with a given metadata template, optionally matching on field... |
public static String getAt(GString text, Range range) {
return getAt(text.toString(), range);
} | [
"Support the range subscript operator for GString\n\n@param text a GString\n@param range a Range\n@return the String of characters corresponding to the provided range\n@since 2.3.7"
] | [
"This method returns the actual raw class associated with the specified\ntype.",
"Returns the x-coordinate of a vertex position.\n\n@param vertex the vertex index\n@return the x coordinate",
"Update the repeat number for a client path\n\n@param newNum new repeat number of the path\n@param path_id ID of the path... |
public void addItem(T value, String text, boolean reload) {
values.add(value);
listBox.addItem(text, keyFactory.generateKey(value));
if (reload) {
reload();
}
} | [
"Adds an item to the list box, specifying an initial value for the item.\n\n@param value the item's value, to be submitted if it is part of a\n{@link FormPanel}; cannot be <code>null</code>\n@param text the text of the item to be added\n@param reload perform a 'material select' reload to update the DOM."
] | [
"Send a database announcement to all registered listeners.\n\n@param slot the media slot whose database availability has changed\n@param database the database whose relevance has changed\n@param available if {@code} true, the database is newly available, otherwise it is no longer relevant",
"Validates the binding... |
private void stripTrailingDelimiters(StringBuilder buffer)
{
int index = buffer.length() - 1;
while (index > 0 && buffer.charAt(index) == m_delimiter)
{
--index;
}
buffer.setLength(index + 1);
} | [
"This method removes trailing delimiter characters.\n\n@param buffer input sring buffer"
] | [
"Determine if a CharSequence can be parsed as a Double.\n\n@param self a CharSequence\n@return true if the CharSequence can be parsed\n@see #isDouble(String)\n@since 1.8.2",
"Cancel old waiting jobs.\n\n@param starttimeThreshold threshold for start time\n@param checkTimeThreshold threshold for last check time\n@p... |
public static sslcertkey_crldistribution_binding[] get(nitro_service service, String certkey) throws Exception{
sslcertkey_crldistribution_binding obj = new sslcertkey_crldistribution_binding();
obj.set_certkey(certkey);
sslcertkey_crldistribution_binding response[] = (sslcertkey_crldistribution_binding[]) obj.ge... | [
"Use this API to fetch sslcertkey_crldistribution_binding resources of given name ."
] | [
"Use this API to update snmpuser resources.",
"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.",
"Retrieve timephased baseline cost. Note tha... |
public static Module unserializeModule(final String module) throws IOException {
final ObjectMapper mapper = new ObjectMapper();
mapper.disable(MapperFeature.USE_GETTERS_AS_SETTERS);
return mapper.readValue(module, Module.class);
} | [
"Un-serialize a Json into Module\n@param module String\n@return Module\n@throws IOException"
] | [
"Check if zone count policy is satisfied\n\n@return whether zone is satisfied",
"Use this API to fetch all the responderpolicy resources that are configured on netscaler.",
"Internal method for recursivly searching for a class descriptor that avoids\nclass loading when we already have a class object.\n\n@param ... |
public static java.sql.Timestamp getTimestamp(Object value) {
try {
return toTimestamp(value);
} catch (ParseException pe) {
pe.printStackTrace();
return null;
}
} | [
"Convert an Object to a Timestamp, without an Exception"
] | [
"Returns the plugins classpath elements.",
"Set the inner angle of the spotlight cone in degrees.\n\nBeyond the outer cone angle there is no illumination.\nThe underlying uniform \"outer_cone_angle\" is the cosine\nof this input angle. If the inner cone angle is larger than the outer cone angle\nthere will be une... |
public static sslservice[] get(nitro_service service, sslservice_args args) throws Exception{
sslservice obj = new sslservice();
options option = new options();
option.set_args(nitro_util.object_to_string_withoutquotes(args));
sslservice[] response = (sslservice[])obj.get_resources(service, option);
return re... | [
"Use this API to fetch all the sslservice resources that are configured on netscaler.\nThis uses sslservice_args which is a way to provide additional arguments while fetching the resources."
] | [
"Ensures that the given collection descriptor has the collection-class property if necessary.\n\n@param collDef The collection descriptor\n@param checkLevel The current check level (this constraint is checked in basic (partly) and strict)\n@exception ConstraintException If collection-class is given for an array ... |
public Token add( Symbol symbol ) {
Token t = new Token(symbol);
push( t );
return t;
} | [
"Adds a symbol to the end of the token list\n@param symbol Symbol which is to be added\n@return The new Token created around symbol"
] | [
"Use this API to fetch statistics of gslbservice_stats resource of given name .",
"Determine the color of the waveform given an index into it.\n\n@param segment the index of the first waveform byte to examine\n@param front if {@code true} the front (brighter) segment of a color waveform preview is returned,\nothe... |
private CoreLabel makeCoreLabel(String line) {
CoreLabel wi = new CoreLabel();
// wi.line = line;
String[] bits = line.split("\\s+");
switch (bits.length) {
case 0:
case 1:
wi.setWord(BOUNDARY);
wi.set(AnswerAnnotation.class, OTHER);
break;
case 2:
wi.setWo... | [
"This deals with the CoNLL files for different languages which have\nbetween 2 and 5 columns on non-blank lines.\n\n@param line A line of CoNLL input\n@return The constructed token"
] | [
"Creates a new broker instance.\n\n@param jcdAlias The jdbc connection descriptor name as defined in the repository\n@param user The user name to be used for connecting to the database\n@param password The password to be used for connecting to the database\n@return The persistence broker\n@see org.apache.ojb.br... |
public byte[] getValueAsArray() {
ByteBuffer buffer = getValue();
byte[] result = new byte[buffer.remaining()];
buffer.get(result);
return result;
} | [
"Get the bytes which represent the payload of this field, without the leading type tag and length header, as\na newly-allocated byte array.\n\n@return a new byte array containing a copy of the bytes this field contains"
] | [
"Read the optional row header and UUID.\n\n@param stream input stream\n@param map row map",
"Set new list data set\n@param list new data set",
"Performs an implicit double step given the set of two imaginary eigenvalues provided.\nSince one eigenvalue is the complex conjugate of the other only one set of real a... |
public static byte[] encode(byte[] ba, int offset, long v) {
ba[offset + 0] = (byte) (v >>> 56);
ba[offset + 1] = (byte) (v >>> 48);
ba[offset + 2] = (byte) (v >>> 40);
ba[offset + 3] = (byte) (v >>> 32);
ba[offset + 4] = (byte) (v >>> 24);
ba[offset + 5] = (byte) (v >>> 16);
ba[offset + 6] ... | [
"Encode a long into a byte array at an offset\n\n@param ba Byte array\n@param offset Offset\n@param v Long value\n@return byte array given in input"
] | [
"Use this API to update cmpparameter.",
"Adds a new email alias to this user's account and confirms it without user interaction.\nThis functionality is only available for enterprise admins.\n@param email the email address to add as an alias.\n@param isConfirmed whether or not the email alias should be automatical... |
@Override
public void setExpectedMaxSize( int numRows , int numCols ) {
super.setExpectedMaxSize(numRows,numCols);
// if the matrix that is being decomposed is smaller than the block we really don't
// see the B matrix.
if( numRows < blockWidth)
B = new DMatrixRMaj(0,0);... | [
"Declares additional internal data structures."
] | [
"Returns the compact records for all users that are members of the team.\n\n@param team Globally unique identifier for the team.\n@return Request object",
"2-D Forward Discrete Hartley Transform.\n\n@param data Data.",
"The fields returned by default. Typically the output is done via display formatters and hen... |
private boolean detectWSAddressingFeature(InterceptorProvider provider, Bus bus) {
//detect on the bus level
if (bus.getFeatures() != null) {
Iterator<Feature> busFeatures = bus.getFeatures().iterator();
while (busFeatures.hasNext()) {
Feature busFeature = busFeat... | [
"detect if WS Addressing feature already enabled.\n\n@param provider the interceptor provider\n@param bus the bus\n@return true, if successful"
] | [
"Adds the scroll position CSS extension to the given component\n\n@param componentContainer the component to extend\n@param scrollBarrier the scroll barrier\n@param barrierMargin the margin\n@param styleName the style name to set beyond the scroll barrier",
"private multi-value handlers and helpers",
"Creates a... |
private void addModuleToGraph(final DbModule module, final AbstractGraph graph, final int depth) {
if (graph.isTreated(graph.getId(module))) {
return;
}
final String moduleElementId = graph.getId(module);
graph.addElement(moduleElementId, module.getVersion(), depth == 0);
... | [
"Manage the artifact add to the Module AbstractGraph\n\n@param graph\n@param depth"
] | [
"Return the text content of the document. It does not containing trailing spaces and asterisks\nat the start of the line.",
"Writes long strings to output stream as several chunks.\n\n@param stream stream to write to.\n@param str string to be written.\n@throws IOException if something went wrong",
"Method us... |
private void cascadeInsertFor(ObjectEnvelope mod, List alreadyPrepared)
{
// avoid endless recursion, so use List for registration
if(alreadyPrepared.contains(mod.getIdentity())) return;
alreadyPrepared.add(mod.getIdentity());
ClassDescriptor cld = getTransaction().getBroker()... | [
"Walk through the object graph of the specified insert object. Was used for\nrecursive object graph walk."
] | [
"Obtains a Accounting zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Accounting zoned date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Write a list of custom field attributes.",
"Use this API to fetch a... |
public static dnstxtrec[] get(nitro_service service) throws Exception{
dnstxtrec obj = new dnstxtrec();
dnstxtrec[] response = (dnstxtrec[])obj.get_resources(service);
return response;
} | [
"Use this API to fetch all the dnstxtrec resources that are configured on netscaler."
] | [
"This method is designed to be called from the diverse subclasses",
"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",
"Retrieves the formatted parent WBS value.\n\n@return formatted parent WBS value",
"Remove a lic... |
private void writeCurrency()
{
ProjectProperties props = m_projectFile.getProjectProperties();
CurrencyType currency = m_factory.createCurrencyType();
m_apibo.getCurrency().add(currency);
String positiveSymbol = getCurrencyFormat(props.getSymbolPosition());
String negativeSymbol = "(" ... | [
"Create a handful of default currencies to keep Primavera happy."
] | [
"Loads the properties file using the classloader provided. Creating a string from the properties\n\"user.agent.name\" and \"user.agent.version\".\n@param loader The class loader to use to load the resource.\n@param filename The name of the file to load.\n@return A string that represents the first part of the UA str... |
private String getSymbolName(char c)
{
String result = null;
switch (c)
{
case ',':
{
result = "Comma";
break;
}
case '.':
{
result = "Period";
break;
}
}
return result;
} | [
"Map the currency separator character to a symbol name.\n\n@param c currency separator character\n@return symbol name"
] | [
"Parse the XML for a collection as returned by getTree call.\n\n@param collectionElement\n@return",
"Gets currently visible user.\n\n@return List of user",
"Get the inactive history directories.\n\n@return the inactive history",
"Converts a Map to an array of objects, adding only those entries whose key is in... |
public static Path createTempDirectory(Path dir, String prefix) throws IOException {
try {
return Files.createTempDirectory(dir, prefix);
} catch (UnsupportedOperationException ex) {
}
return Files.createTempDirectory(dir, prefix);
} | [
"Create a temporary directory with the same attributes as its parent directory.\n@param dir\nthe path to directory in which to create the directory\n@param prefix\nthe prefix string to be used in generating the directory's name;\nmay be {@code null}\n@return the path to the newly created directory that did not... | [
"Discard the changes.",
"Read exactly buffer.length bytes from the stream into the buffer\n\n@param stream The stream to read from\n@param buffer The buffer to read into",
"Asta Powerproject assigns an explicit calendar for each task. This method\nis used to find the most common calendar and use this as the def... |
public void remove(Identity oid)
{
try
{
jcsCache.remove(oid.toString());
}
catch (CacheException e)
{
throw new RuntimeCacheException(e.getMessage());
}
} | [
"removes an Object from the cache.\n\n@param oid the Identity of the object to be removed."
] | [
"Used to apply or update the watermark for the item.\n@param itemUrl url template for the item.\n@param imprint the value must be \"default\", as custom watermarks is not yet supported.\n@return the watermark associated with the item.",
"Evalutes AND and OR operators.\n\n@param container data context\n@param prom... |
public void recordCheckoutQueueLength(SocketDestination dest, int queueLength) {
if(dest != null) {
getOrCreateNodeStats(dest).recordCheckoutQueueLength(null, queueLength);
recordCheckoutQueueLength(null, queueLength);
} else {
this.checkoutQueueLengthHistogram.insert... | [
"Record the checkout queue length\n\n@param dest Destination of the socket to checkout. Will actually record\nif null. Otherwise will call this on self and corresponding child\nwith this param null.\n@param queueLength The number of entries in the \"synchronous\" checkout\nqueue."
] | [
"Use this API to update snmpalarm.",
"public for testing purpose",
"Returns a unique file name\n@param baseFileName the requested base name for the file\n@param extension the requested extension for the file\n@param cleanBaseFileName specify if the <code>baseFileName</code> has to be cleaned before being used (... |
public void updateInfo(BoxWebLink.Info info) {
URL url = WEB_LINK_URL_TEMPLATE.build(this.getAPI().getBaseURL(), this.getID());
BoxJSONRequest request = new BoxJSONRequest(this.getAPI(), url, "PUT");
request.setBody(info.getPendingChanges());
String body = info.getPendingChanges();
... | [
"Updates the information about this weblink with any info fields that have been modified locally.\n\n<p>The only fields that will be updated are the ones that have been modified locally. For example, the following\ncode won't update any information (or even send a network request) since none of the info's fields we... | [
"Adds vector v1 to v2 and places the result in this vector.\n\n@param v1\nleft-hand vector\n@param v2\nright-hand vector",
"Get public photos from the user's contacts.\n\nThis method does not require authentication.\n\n@see com.flickr4java.flickr.photos.Extras\n@param userId\nThe user ID\n@param count\nThe number... |
private boolean isDebug(CmsObject cms, CmsSolrQuery query) {
String[] debugSecretValues = query.remove(REQUEST_PARAM_DEBUG_SECRET);
String debugSecret = (debugSecretValues == null) || (debugSecretValues.length < 1)
? null
: debugSecretValues[0];
if ((null != debugSecret) &... | [
"Checks if the query should be executed using the debug mode where the security restrictions do not apply.\n@param cms the current context.\n@param query the query to execute.\n@return a flag, indicating, if the query should be performed in debug mode."
] | [
"Adds an access constraint to the set used with the attribute\n@param accessConstraint the constraint\n@return a builder that can be used to continue building the attribute definition",
"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 thre... |
public static String make512Safe(StringBuffer input, String newline) {
StringBuilder result = new StringBuilder();
String content = input.toString();
String rest = content;
while (!rest.isEmpty()) {
if (rest.contains("\n")) {
String line = rest.substring(0, rest.indexOf("\n"));
rest = rest.substring(... | [
"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... | [
"Answer the primary key query to retrieve an Object\n\n@param oid the Identity of the Object to retrieve\n@return The resulting query",
"Checks that all the qualifiers in the set requiredQualifiers are in the set of qualifiers. Qualifier equality rules for\nannotation members are followed.\n\n@param requiredQuali... |
public ModelNode getDeploymentSubsystemModel(final String subsystemName) {
assert subsystemName != null : "The subsystemName cannot be null";
return getDeploymentSubModel(subsystemName, PathAddress.EMPTY_ADDRESS, null, deploymentUnit);
} | [
"Get the subsystem deployment model root.\n\n<p>\nIf the subsystem resource does not exist one will be created.\n</p>\n\n@param subsystemName the subsystem name.\n\n@return the model"
] | [
"Stores the output from a Frontier into the queue, pausing and waiting if the given queue is too large\n\n@param resultsMap map of String and String representing the output of a Frontier's DFS",
"Specify a specific index to run the query against\n\n@param designDocument set the design document to use\n@param inde... |
private void sortFields()
{
HashMap fields = new HashMap();
ArrayList fieldsWithId = new ArrayList();
ArrayList fieldsWithoutId = new ArrayList();
FieldDescriptorDef fieldDef;
for (Iterator it = getFields(); it.hasNext(); )
... | [
"Sorts the fields."
] | [
"Return a new instance of the BufferedImage\n\n@return BufferedImage",
"Append the text at the end of the File.\n\n@param file a File\n@param text the text to append at the end of the File\n@throws IOException if an IOException occurs.\n@since 1.0",
"Compares two sets of snaks, given by iterators. The method is... |
public void setBooleanAttribute(String name, Boolean value) {
ensureValue();
Attribute attribute = new BooleanAttribute(value);
attribute.setEditable(isEditable(name));
getValue().getAllAttributes().put(name, attribute);
} | [
"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"
] | [
"Cancel on target hosts.\n\n@param targetHosts\nthe target hosts\n@return true, if successful",
"END ODO CHANGES",
"Render a zero Double as null.\n\n@param value double value\n@return null if the double value is zero",
"Sets all dates in the list.\n@param dates the dates to set\n@param checked flag, indicatin... |
public static BMatrixRMaj elementLessThan(DMatrixRMaj A , double value , BMatrixRMaj output )
{
if( output == null ) {
output = new BMatrixRMaj(A.numRows,A.numCols);
}
output.reshape(A.numRows, A.numCols);
int N = A.getNumElements();
for (int i = 0; i < N; i++)... | [
"Applies the > operator to each element in A. Results are stored in a boolean matrix.\n\n@param A Input matrx\n@param value value each element is compared against\n@param output (Optional) Storage for results. Can be null. Is reshaped.\n@return Boolean matrix with results"
] | [
"the 1st request from the manager.",
"Closes the server socket.",
"Returns the connection that has been saved or null if none.",
"Progress info message\n\n@param tag Message that precedes progress info. Indicate 'keys' or\n'entries'.",
"Obtains a Accounting zoned date-time from another date-time object.\n\n... |
private void readCalendars()
{
Table cal = m_tables.get("CAL");
for (MapRow row : cal)
{
ProjectCalendar calendar = m_projectFile.addCalendar();
m_calendarMap.put(row.getInteger("CALENDAR_ID"), calendar);
Integer[] days =
{
row.getInteger("SUNDAY_HOUR... | [
"Read project calendars."
] | [
"Set whether the WMS tiles should be cached for later use. This implies that the WMS tiles will be proxied.\n\n@param useCache true when request needs to be cached\n@since 1.9.0",
"returns a sorted array of methods",
"Create the log if it does not exist or return back exist log\n\n@param topic the topic nam... |
public ReferrerList getPhotoReferrers(Date date, String domain, String photoId, int perPage, int page) throws FlickrException {
return getReferrers(METHOD_GET_PHOTO_REFERRERS, domain, "photo_id", photoId, date, perPage, page);
} | [
"Get a list of referrers from a given domain to a photo.\n\n@param date\n(Required) Stats will be returned for this date. A day according to Flickr Stats starts at midnight GMT for all users, and timestamps will\nautomatically be rounded down to the start of the day.\n@param domain\n(Required) The domain to return ... | [
"Converts an object into a tab delimited string with given fields\nRequires the object has public access for the specified fields\n\n@param object Object to convert\n@param delimiter delimiter\n@param fieldNames fieldnames\n@return String representing object",
"Calculates ATM Bachelier implied volatilities.\n\n@s... |
public static boolean nullSafeEquals(final Object obj1, final Object obj2) {
return ((obj1 == null && obj2 == null)
|| (obj1 != null && obj2 != null && obj1.equals(obj2)));
} | [
"Test for equality.\n@param obj1 the first object\n@param obj2 the second object\n@return true if both are null or the two objects are equal"
] | [
"Returns a query filter for the given document _id and version. The version is allowed to be\nnull. The query will match only if there is either no version on the document in the database\nin question if we have no reference of the version or if the version matches the database's\nversion.\n\n@param documentId the ... |
public ParallelTaskBuilder setReplaceVarMapToSingleTargetSingleVar(
String variable, List<String> replaceList, String uniformTargetHost) {
if (Strings.isNullOrEmpty(uniformTargetHost)) {
logger.error("uniform target host is empty or null. skil setting.");
return this;
... | [
"Sets the replace var map to single target single var.\n\n@param variable\nthe variable\n@param replaceList\n: the list of strings that will replace the variable\n@param uniformTargetHost\nthe uniform target host\n@return the parallel task builder"
] | [
"compares two java files",
"Match the Origin header with the allowed origins.\nIf it doesn't match then a 403 response code is set on the response and it returns null.\n@param exchange the current HttpExchange.\n@param allowedOrigins list of sanitized allowed origins.\n@return the first matching origin, null othe... |
public BlurBuilder downScale(int scaleInSample) {
data.options.inSampleSize = Math.min(Math.max(1, scaleInSample), 16384);
return this;
} | [
"Will scale the image down before processing for\nperformance enhancement and less memory usage\nsacrificing image quality.\n\n@param scaleInSample value greater than 1 will scale the image width/height, so 2 will getFromDiskCache you 1/4\nof the original size and 4 will getFromDiskCache you 1/16 of the original si... | [
"This method writes extended attribute data for a resource.\n\n@param xml MSPDI resource\n@param mpx MPXJ resource",
"Support the range subscript operator for CharSequence with IntRange\n\n@param text a CharSequence\n@param range an IntRange\n@return the subsequence CharSequence\n@since 1.0",
"Return the numbe... |
public static boolean checkDuplicateElements(DMatrixSparseCSC A ) {
A = A.copy(); // create a copy so that it doesn't modify A
A.sortIndices(null);
return !checkSortedFlag(A);
} | [
"Checks for duplicate elements. A is sorted\n@param A Matrix to be tested.\n@return true if duplicates or false if false duplicates"
] | [
"Returns the value for a given key from the database properties.\n\n@param key the property key\n\n@return the string value for a given key",
"Destroys all resource requests in requestQueue.\n\n@param requestQueue The queue for which all resource requests are to be\ndestroyed.",
"Use this API to clear nsconfig.... |
@Override
public EthiopicDate date(int prolepticYear, int month, int dayOfMonth) {
return EthiopicDate.of(prolepticYear, month, dayOfMonth);
} | [
"Obtains a local date in Ethiopic calendar system from the\nproleptic-year, month-of-year and day-of-month fields.\n\n@param prolepticYear the proleptic-year\n@param month the month-of-year\n@param dayOfMonth the day-of-month\n@return the Ethiopic local date, not null\n@throws DateTimeException if unable to crea... | [
"Redirect to page\n\n@param model\n@return",
"Invoked by subclasses; performs actual file roll. Tests to see whether roll\nis necessary have already been performed, so just do it.",
"Remove a part of a CharSequence by replacing the first occurrence\nof target within self with '' and returns the result.\n\n@para... |
public static sslcipher_individualcipher_binding[] get_filtered(nitro_service service, String ciphergroupname, filtervalue[] filter) throws Exception{
sslcipher_individualcipher_binding obj = new sslcipher_individualcipher_binding();
obj.set_ciphergroupname(ciphergroupname);
options option = new options();
opti... | [
"Use this API to fetch filtered set of sslcipher_individualcipher_binding resources.\nset the filter parameter values in filtervalue object."
] | [
"Use this API to fetch authenticationradiuspolicy_authenticationvserver_binding resources of given name .",
"Determine the consistency level of a key\n\n@param versionNodeSetMap A map that maps version to set of PrefixNodes\n@param replicationFactor Total replication factor for the set of clusters\n@return Consis... |
public final void reset()
{
for (int i = 0; i < permutationIndices.length; i++)
{
permutationIndices[i] = i;
}
remainingPermutations = totalPermutations;
} | [
"Resets the generator state."
] | [
"Checks if a given number is in the range of an integer.\n\n@param number\na number which should be in the range of an integer (positive or negative)\n\n@see java.lang.Integer#MIN_VALUE\n@see java.lang.Integer#MAX_VALUE\n\n@return number as an integer (rounding might occur)",
"Register the agent in the platform\n... |
List<String> getWarnings(JsonNode root) {
ArrayList<String> warnings = new ArrayList<>();
if (root.has("warnings")) {
JsonNode warningNode = root.path("warnings");
Iterator<Map.Entry<String, JsonNode>> moduleIterator = warningNode
.fields();
while (moduleIterator.hasNext()) {
Map.Entry<String, Js... | [
"Extracts warnings that are returned in an API response.\n\n@param root\nroot node of the JSON result"
] | [
"Attaches meta info about the current state of the device to an event.\nTypically, this meta is added only to the ping event.",
"Use this API to update csparameter.",
"Prints the help on the command line\n\n@param options Options object from commons-cli",
"ceiling for clipped RELU, alpha for ELU",
"Returns ... |
protected Object[] idsOf(final List<?> idsOrValues) {
// convert list to array that we can mutate
final Object[] ids = idsOrValues.toArray();
// mutate array to contain only non-empty ids
int length = 0;
for (int i = 0; i < ids.length;) {
final Object p = ids[i++];
... | [
"Returns an array of non-empty ids from the given list of ids or values.\n\n@param idsOrValues\nlist of ids and/or values\n@return array of non-empty ids"
] | [
"This method extracts calendar data from a Planner file.\n\n@param project Root node of the Planner file",
"Accessor method used to retrieve a Float 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... |
public ProgressBar stop() {
target.kill();
try {
thread.join();
target.consoleStream.print("\n");
target.consoleStream.flush();
}
catch (InterruptedException ex) { }
return this;
} | [
"Stops this progress bar."
] | [
"Use this API to fetch all the responderpolicy resources that are configured on netscaler.",
"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.",
"Get the pickers date.",
"... |
protected boolean isSingleConnection(DatabaseConnection conn1, DatabaseConnection conn2) throws SQLException {
// initialize the connections auto-commit flags
conn1.setAutoCommit(true);
conn2.setAutoCommit(true);
try {
// change conn1's auto-commit to be false
conn1.setAutoCommit(false);
if (conn2.isAu... | [
"Return true if the two connections seem to one one connection under the covers."
] | [
"Finish initializing service.\n\n@throws IOException oop",
"Scales a process type\n\n@param appName See {@link #listApps} for a list of apps that can be used.\n@param processType type of process to maintain\n@param quantity number of processes to maintain",
"Return the single class name from a class-name string... |
public static void generateJavaFiles(String requirementsFolder,
String platformName, String src_test_dir, String tests_package,
String casemanager_package, String loggingPropFile)
throws Exception {
File reqFolder = new File(requirementsFolder);
if (reqFolder.isDirec... | [
"Main method of the class, which handles the process of creating the tests\n\n@param requirementsFolder\n, it is the folder where the plain text given by the client is\nstored\n@param platformName\n, to choose the MAS platform (JADE, JADEX, etc.)\n@param src_test_dir\n, the folder where our classes are created\n@pa... | [
"Add an URL to the given classloader\n\n@param loader ClassLoader\n@param url URL to add\n@throws IOException I/O Error\n@throws InvocationTargetException Invocation Error\n@throws IllegalArgumentException Illegal Argument\n@throws IllegalAccessException Illegal Access\n@throws SecurityException Security Constraint... |
private void checkGAs(List l)
{
for (final Iterator i = l.iterator(); i.hasNext();)
if (!(i.next() instanceof GroupAddress))
throw new KNXIllegalArgumentException("not a group address list");
} | [
"iteration not synchronized"
] | [
"Set the map attribute.\n\n@param name the attribute name\n@param attribute the attribute",
"Returns an iterator over the items in this folder.\n\n@return an iterator over the items in this folder.",
"Writes one or more String columns as a line to the CsvWriter.\n\n@param columns\nthe columns to write\n@throws ... |
static TarArchiveEntry defaultFileEntryWithName( final String fileName ) {
TarArchiveEntry entry = new TarArchiveEntry(fileName, true);
entry.setUserId(ROOT_UID);
entry.setUserName(ROOT_NAME);
entry.setGroupId(ROOT_UID);
entry.setGroupName(ROOT_NAME);
entry.setMode(TarArc... | [
"Creates a tar file entry with defaults parameters.\n@param fileName the entry name\n@return file entry with reasonable defaults"
] | [
"This version assumes relativeIndices array no longer needs to\nbe copied. Further it is assumed that it has already been\nchecked or assured by construction that relativeIndices\nis sorted.",
"Apply aliases to task and resource fields.\n\n@param aliases map of aliases",
"Return the equivalence class of the arg... |
public final static int readMdLinkId(final StringBuilder out, final String in, final int start)
{
int pos = start;
int counter = 1;
while (pos < in.length())
{
final char ch = in.charAt(pos);
boolean endReached = false;
switch (ch)
{
... | [
"Reads a markdown link ID.\n\n@param out\nThe StringBuilder to write to.\n@param in\nInput String.\n@param start\nStarting position.\n@return The new position or -1 if this is no valid markdown link ID."
] | [
"Update a feature object in the Hibernate session.\n\n@param feature feature object\n@throws LayerException oops",
"Reads a stringtemplate group from a stream.\n\nThis will always return a group (empty if necessary), even if reading it from the stream fails.\n\n@param stream the stream to read from\n@return the s... |
private void addGreeting(String guestbookName, String user, String message)
throws DatastoreException {
Entity.Builder greeting = Entity.newBuilder();
greeting.setKey(makeKey(GUESTBOOK_KIND, guestbookName, GREETING_KIND));
greeting.getMutableProperties().put(USER_PROPERTY, makeValue(user).build());
... | [
"Add a greeting to the specified guestbook."
] | [
"Configs created by this ConfigBuilder will have the given Redis hostname.\n\n@param host the Redis hostname\n@return this ConfigBuilder",
"A convenience method for creating an immutable sorted set.\n\n@param self a SortedSet\n@return an immutable SortedSet\n@see java.util.Collections#unmodifiableSortedSet(java.u... |
private static void addTimePerComponent(HashMap<String, Long> mapComponentTimes, Component component) {
Long currentTimeOfComponent = 0L;
String key = component.getComponentType();
if (mapComponentTimes.containsKey(key)) {
currentTimeOfComponent = mapComponentTimes.get(key);
}
//when transacti... | [
"Add component processing time to given map\n@param mapComponentTimes\n@param component"
] | [
"Restores a trashed folder to a new location with a new name.\n@param folderID the ID of the trashed folder.\n@param newName an optional new name to give the folder. This can be null to use the folder's original name.\n@param newParentID an optional new parent ID for the folder. This can be null to use th... |
public static boolean readBooleanAttributeElement(final XMLExtendedStreamReader reader, final String attributeName)
throws XMLStreamException {
requireSingleAttribute(reader, attributeName);
final boolean value = Boolean.parseBoolean(reader.getAttributeValue(0));
requireNoContent(rea... | [
"Read an element which contains only a single boolean attribute.\n@param reader the reader\n@param attributeName the attribute name, usually \"value\"\n@return the boolean value\n@throws javax.xml.stream.XMLStreamException if an error occurs or if the\nelement does not contain the specified attribute, contains othe... | [
"Inverts an upper or lower triangular block submatrix.\n\n@param blockLength\n@param upper Is it upper or lower triangular.\n@param T Triangular matrix that is to be inverted. Must be block aligned. Not Modified.\n@param T_inv Where the inverse is stored. This can be the same as T. Modified.\n@param temp Work s... |
public static Dimension rectangleDoubleToDimension(final Rectangle2D.Double rectangle) {
return new Dimension(
(int) Math.round(rectangle.width),
(int) Math.round(rectangle.height));
} | [
"Round the size of a rectangle with double values.\n\n@param rectangle The rectangle.\n@return"
] | [
"Gets string content from InputStream\n\n@param is InputStream to read\n@return InputStream content",
"Returns the single abstract method of a class node, if it is a SAM type, or null otherwise.\n@param type a type for which to search for a single abstract method\n@return the method node if type is a SAM type, nu... |
public void removeHoursFromDay(ProjectCalendarHours hours)
{
if (hours.getParentCalendar() != this)
{
throw new IllegalArgumentException();
}
m_hours[hours.getDay().getValue() - 1] = null;
} | [
"Removes a set of calendar hours from the day to which they\nare currently attached.\n\n@param hours calendar hours instance"
] | [
"Draw an elliptical interior with this color.\n\n@param rect rectangle in which ellipse should fit\n@param color colour to use for filling",
"Load assertion from the provided json or throw exception if not possible.\n\n@param encodedAssertion the assertion as it was encoded in JSON.",
"This method returns the v... |
private void compile(ICompilationUnit[] sourceUnits, boolean lastRound) {
this.stats.startTime = System.currentTimeMillis();
try {
// build and record parsed units
reportProgress(Messages.compilation_beginningToCompile);
if (this.options.complianceLevel >= ClassFileC... | [
"General API\n-> compile each of supplied files\n-> recompile any required types for which we have an incomplete principle structure"
] | [
"Increment the version info associated with the given node\n\n@param node The node",
"Add a task to the project.\n\n@return new task instance",
"Find Flickr Places information by Place ID.\n\n@deprecated This method has been deprecated. It won't be removed but you should use {@link #getInfo(String, String)} ins... |
protected AbstractColumn buildSimpleImageColumn() {
ImageColumn column = new ImageColumn();
populateCommonAttributes(column);
populateExpressionAttributes(column);
column.setExpression(customExpression);
column.setExpressionToGroupBy(customExpressionToGroupBy);
column.setExpressionForCalculation(customEx... | [
"When creating image columns\n@return"
] | [
"Use this API to update sslcertkey.",
"Remove all scene objects.",
"Sets the monitoring service.\n\n@param monitoringService the new monitoring service",
"Given a Task instance, this task determines if it should be written to the\nPM XML file as an activity or as a WBS item, and calls the appropriate\nmethod.... |
private void dbUpgrade()
{
DbConn cnx = this.getConn();
Map<String, Object> rs = null;
int db_schema_version = 0;
try
{
rs = cnx.runSelectSingleRow("version_select_latest");
db_schema_version = (Integer) rs.get("VERSION_D1");
}
catch (E... | [
"Updates the database. Never call this during normal operations, upgrade is a user-controlled operation."
] | [
"This method calculates the absolute number of days between two dates.\nNote that where two date objects are provided that fall on the same\nday, this method will return one not zero. Note also that this method\nassumes that the dates are passed in the correct order, i.e.\nstartDate < endDate.\n\n@param startDate S... |
protected void checkVariableName(GraphRewrite event, EvaluationContext context)
{
if (variableName == null)
{
setVariableName(Iteration.getPayloadVariableName(event, context));
}
} | [
"Check the variable name and if not set, set it with the singleton variable name being on the top of the stack."
] | [
"Logout the current session. After calling this method,\nthe session will be cleared",
"Initialize current thread's JobContext using specified copy\n@param origin the original job context",
"get the TypeSignature corresponding to given class with given type\narguments\n\n@param clazz\n@param typeArgs\n@return",... |
public GVRMesh findMesh(GVRSceneObject model)
{
class MeshFinder implements GVRSceneObject.ComponentVisitor
{
private GVRMesh meshFound = null;
public GVRMesh getMesh() { return meshFound; }
public boolean visit(GVRComponent comp)
{
GVR... | [
"Finds the first mesh in the given model.\n@param model root of a model loaded by the asset loader.\n@return GVRMesh found or null if model does not contain meshes\n@see #loadMesh(GVRAndroidResource.MeshCallback, GVRAndroidResource, int)"
] | [
"Invoke a method through reflection.\nFalls through to using the Invoker to call the method in case the reflection call fails..\n\n@param object the object on which to invoke a method\n@param methodName the name of the method to invoke\n@param parameters the parameters of the method call\n@return the result of the ... |
protected boolean executeOperation(final TransactionalProtocolClient.TransactionalOperationListener<ServerOperation> listener, TransactionalProtocolClient client, final ServerIdentity identity, final ModelNode operation, final OperationResultTransformer transformer) {
if(client == null) {
return fal... | [
"Execute the operation.\n\n@param listener the transactional operation listener\n@param client the transactional protocol client\n@param identity the server identity\n@param operation the operation\n@param transformer the operation result transformer\n@return whether the operation was executed"
] | [
"Use this API to fetch all the callhome resources that are configured on netscaler.",
"Generate a results file for each test in each suite.\n@param outputDirectory The target directory for the generated file(s).",
"Combines two trajectories by adding the corresponding positions. The trajectories have to have th... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.