query stringlengths 74 6.1k | positive listlengths 1 1 | negative listlengths 9 9 |
|---|---|---|
public ProducerPoolData<V> getProducerPoolData(String topic, Partition bidPid, List<V> data) {
return new ProducerPoolData<V>(topic, bidPid, data);
} | [
"This constructs and returns the request object for the producer pool\n\n@param topic the topic to which the data should be published\n@param bidPid the broker id and partition id\n@param data the data to be published\n@return producer data of builder"
] | [
"Calculates the beginLine of a violation report.\n\n@param pmdViolation The violation for which the beginLine should be calculated.\n@return The beginLine is assumed to be the line with the smallest number. However, if the smallest number is\nout-of-range (non-positive), it takes the other number.",
"Mbeans for U... |
public List<Cluster> cluster(final Collection<Point2D> points) {
final List<Cluster> clusters = new ArrayList<Cluster>();
final Map<Point2D, PointStatus> visited = new HashMap<Point2D, DBScan.PointStatus>();
KDTree<Point2D> tree = new KDTree<Point2D>(2);
// Populate the kdTree
... | [
"Performs DBSCAN cluster analysis.\n\n@param points the points to cluster\n@return the list of clusters\n@throws NullArgumentException if the data points are null"
] | [
"Update the plane based on arcore best knowledge of the world\n\n@param scale",
"Creates a build\n\n@param appName See {@link #listApps} for a list of apps that can be used.\n@param build the build information",
"Registers an event handler in the repository shared between Javascript\nand Java.\n\n@param h Event... |
ServerStatus getState() {
final InternalState requiredState = this.requiredState;
final InternalState state = internalState;
if(requiredState == InternalState.FAILED) {
return ServerStatus.FAILED;
}
switch (state) {
case STOPPED:
return Ser... | [
"Determine the current state the server is in.\n\n@return the server status"
] | [
"Append the given char as a decimal HTML entity.\n\n@param out\nThe StringBuilder to write to.\n@param value\nThe character.",
"Checks that native primarykey fields have readonly access, and warns if not.\n\n@param fieldDef The field descriptor\n@param checkLevel The current check level (this constraint is checke... |
public void addHeader(String key, String value) {
if (key.equals("As-User")) {
for (int i = 0; i < this.headers.size(); i++) {
if (this.headers.get(i).getKey().equals("As-User")) {
this.headers.remove(i);
}
}
}
if (key.e... | [
"Adds an HTTP header to this request.\n@param key the header key.\n@param value the header value."
] | [
"This method retrieves all security permissions contained within the specified node.\n\n@param context the {@link OperationContext} used to resolve the permission attributes.\n@param node the {@link ModelNode} that might contain security permissions metadata.\n@return a {@link List} containing the retrieved permiss... |
public void moveDown(I_CmsEditableGroupRow row) {
int index = m_container.getComponentIndex(row);
if ((index >= 0) && (index < (m_container.getComponentCount() - 1))) {
m_container.removeComponent(row);
m_container.addComponent(row, index + 1);
}
updateButtonBars... | [
"Moves the given row down.\n\n@param row the row to move"
] | [
"Use this API to fetch cachepolicylabel resource of given name .",
"gets the first non annotation line number of a node, taking into account annotations.",
"Creates the operation to add a resource.\n\n@param address the address of the operation to add.\n@param properties the properties to set for the resourc... |
private WeekDay readWeekDay(JSONValue val) throws IllegalArgumentException {
String str = readOptionalString(val);
if (null != str) {
return WeekDay.valueOf(str);
}
throw new IllegalArgumentException();
} | [
"Read a single weekday from the provided JSON value.\n@param val the value to read the week day from.\n@return the week day read\n@throws IllegalArgumentException thrown if the provided JSON value is not the representation of a week day."
] | [
"Returns the zip entry for a file in the archive.\n@param filename the file name\n@return the zip entry for the file with the provided name\n@throws ZipException thrown if the file is not in the zip archive",
"Checks if there's exactly one option that exists among all opts.\n\n@param options OptionSet to checked\... |
boolean lockInterruptibly(final Integer permit, final long timeout, final TimeUnit unit) throws InterruptedException {
if (permit == null) {
throw new IllegalArgumentException();
}
return sync.tryAcquireNanos(permit, unit.toNanos(timeout));
} | [
"Acquire the exclusive lock, with a max wait timeout to acquire.\n@param permit - the permit Integer for this operation. May not be {@code null}.\n@param timeout - the timeout scalar quantity.\n@param unit - see {@code TimeUnit} for quantities.\n@return {@code boolean} true on successful acquire.\n@throws Interrupt... | [
"Retrieve a finish date time in the form required by Phoenix.\n\n@param value Date instance\n@return formatted date time",
"Send an event to other applications\n\n@param context context in which to send the broadcast\n@param event event to send",
"Use this API to disable clusterinstance resources of given nam... |
public static void rebuild(final MODE newMode) {
if (mode != newMode) {
mode = newMode;
TYPE type;
switch (mode) {
case DEBUG:
type = TYPE.ANDROID;
Log.startFullLog();
break;
case DEVELOPER:
... | [
"Rebuild logging systems with updated mode\n@param newMode log mode"
] | [
"Retrieves the working hours on the given date.\n\n@param date required date\n@param cal optional calendar instance\n@param day optional day instance\n@return working hours",
"Send a request to another handler internal to the server, getting back the response body and response code.\n\n@param request request to s... |
public void logAttributeWarning(PathAddress address, String message, Set<String> attributes) {
messageQueue.add(new AttributeLogEntry(address, null, message, attributes));
} | [
"Log a warning for the resource at the provided address and the given attributes, using the provided detail\nmessage.\n\n@param address where warning occurred\n@param message custom error message to append\n@param attributes attributes we that have problems about"
] | [
"Generate the global CSS style for the whole document.\n@return the CSS code used in the generated document header",
"Returns all the dependencies taken into account the artifact of the module that will be removed from the dependencies\n\n@param module Module\n@param producedArtifacts List<String>\n@return Set<De... |
public static String replaceErrorMsg(String origMsg) {
String replaceMsg = origMsg;
for (ERROR_TYPE errorType : ERROR_TYPE.values()) {
if (origMsg == null) {
replaceMsg = PcConstants.NA;
return replaceMsg;
}
if (origMsg.contains(erro... | [
"Replace error msg.\n\n@param origMsg\nthe orig msg\n@return the string"
] | [
"Performs a null edit on an item. This has some effects on Wikibase,\nsuch as refreshing the labels of the referred items in the UI.\n\n@param itemId\nthe document to perform a null edit on\n@throws MediaWikiApiErrorException\nif the API returns errors\n@throws IOException\nif there are any IO errors, such as missi... |
public PerformUsage getJVMMemoryUsage() {
int mb = 1024 * 1024;
Runtime rt = Runtime.getRuntime();
PerformUsage usage = new PerformUsage();
usage.totalMemory = (double) rt.totalMemory() / mb;
usage.freeMemory = (double) rt.freeMemory() / mb;
usage.usedMemory = (double) rt... | [
"Gets the JVM memory usage.\n\n@return the JVM memory usage"
] | [
"Restore the recorded state from the rollback xml.\n\n@param target the patchable target\n@param rollbackPatchId the rollback patch id\n@param patchType the the current patch type\n@param history the recorded history\n@throws PatchingException",
"Enables lifecycle callbacks for Android devi... |
public double getCouponPayment(int periodIndex, AnalyticModel model) {
ForwardCurve forwardCurve = model.getForwardCurve(forwardCurveName);
if(forwardCurve == null && forwardCurveName != null && forwardCurveName.length() > 0) {
throw new IllegalArgumentException("No forward curve with name '" + forwardCurveName... | [
"Returns the coupon payment of the period with the given index. The analytic model is needed in case of floating bonds.\n\n@param periodIndex The index of the period of interest.\n@param model The model under which the product is valued.\n@return The value of the coupon payment in the given period."
] | [
"Operations to do after all subthreads finished their work on index\n\n@param backend",
"returns an Array with an Objects NON-PK VALUES\n@throws PersistenceBrokerException if there is an erros accessing o field values",
"Schedules the task with a fixed delay period and an initialDelay period. This functions\nl... |
public static cmppolicylabel[] get(nitro_service service) throws Exception{
cmppolicylabel obj = new cmppolicylabel();
cmppolicylabel[] response = (cmppolicylabel[])obj.get_resources(service);
return response;
} | [
"Use this API to fetch all the cmppolicylabel resources that are configured on netscaler."
] | [
"Check type.\n\n@param type the type\n@return the boolean",
"Wait and retry.",
"Prepare our statement for the subclasses.\n\n@param limit\nLimit for queries. Can be null if none.",
"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... |
public Number getFloat(int field) throws MPXJException
{
try
{
Number result;
if ((field < m_fields.length) && (m_fields[field].length() != 0))
{
result = m_formats.getDecimalFormat().parse(m_fields[field]);
}
else
{
result = ... | [
"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 to be retrieved\n@return the value of the required field"
] | [
"Processes all entities in a Wikidata dump using the given entity\nprocessor. By default, the most recent JSON dump will be used. In offline\nmode, only the most recent previously downloaded file is considered.\n\n@param entityDocumentProcessor\nthe object to use for processing entities in this dump",
"Use this A... |
public double nextDouble(double lo, double hi) {
if (lo < 0) {
if (nextInt(2) == 0)
return -nextDouble(0, -lo);
else
return nextDouble(0, hi);
} else {
return (lo + (hi - lo) * nextDouble());
}
} | [
"Generate a uniform random number in the range [lo, hi)\n\n@param lo lower limit of range\n@param hi upper limit of range\n@return a uniform random real in the range [lo, hi)"
] | [
"Use this API to delete sslcipher resources of given names.",
"Use this API to update systemcollectionparam.",
"Get string value of flow context for current instance\n@return string value of flow context",
"Retrieves the timephased breakdown of actual cost.\n\n@return timephased actual cost",
"Gets a list o... |
public static tunnelip_stats get(nitro_service service, String tunnelip) throws Exception{
tunnelip_stats obj = new tunnelip_stats();
obj.set_tunnelip(tunnelip);
tunnelip_stats response = (tunnelip_stats) obj.stat_resource(service);
return response;
} | [
"Use this API to fetch statistics of tunnelip_stats resource of given name ."
] | [
"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",
"For each node in specified zones, tries swapping some minimum number of\nrandom partitions per node with some minimum number of random partitions\nf... |
protected void checkProducerMethod(EnhancedAnnotatedMethod<T, ? super X> method) {
if (method.getEnhancedParameters(Observes.class).size() > 0) {
throw BeanLogger.LOG.inconsistentAnnotationsOnMethod(PRODUCER_ANNOTATION, "@Observes", this.method,
Formats.formatAsStackTraceElement(... | [
"Validates the producer method"
] | [
"Returns the value of the sum of discounted cash flows of the bond where\nthe discounting is done with the given yield curve.\nThis method can be used for optimizer.\n\n@param evaluationTime The evaluation time as double. Cash flows prior and including this time are not considered.\n@param rate The yield which is u... |
public void animate(GVRHybridObject object, float animationTime)
{
GVRMeshMorph morph = (GVRMeshMorph) mTarget;
mKeyInterpolator.animate(animationTime * mDuration, mCurrentValues);
morph.setWeights(mCurrentValues);
} | [
"Computes the blend weights for the given time and\nupdates them in the target."
] | [
"Prepare a parallel HTTP OPTION Task.\n\n@param url\nthe UrlPostfix: e.g. in http://localhost:8080/index.html.,the url is \"/index.html\"\n@return the parallel task builder",
"Parse duration represented in thousandths of minutes.\n\n@param properties project properties\n@param value duration value\n@param targetT... |
public static base_response update(nitro_service client, gslbservice resource) throws Exception {
gslbservice updateresource = new gslbservice();
updateresource.servicename = resource.servicename;
updateresource.ipaddress = resource.ipaddress;
updateresource.publicip = resource.publicip;
updateresource.public... | [
"Use this API to update gslbservice."
] | [
"Propagate onEnter events to listeners\n@param hit collision object",
"Use this API to link sslcertkey resources.",
"Use this API to delete systemuser of given name.",
"This method is called to format a constraint type.\n\n@param type constraint type\n@return formatted constraint type",
"Retrieve configurat... |
private Renderer createRenderer(T content, ViewGroup parent) {
int prototypeIndex = getPrototypeIndex(content);
Renderer renderer = getPrototypeByIndex(prototypeIndex).copy();
renderer.onCreate(content, layoutInflater, parent);
return renderer;
} | [
"Create a Renderer getting a copy from the prototypes collection.\n\n@param content to render.\n@param parent used to inflate the view.\n@return a new renderer."
] | [
"Get a list of referring domains for 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 photoId\n(Optional) The id of the photo to get stat... |
public byte[] getByteArrayValue(int index)
{
byte[] result = null;
if (m_array[index] != null)
{
result = (byte[]) m_array[index];
}
return (result);
} | [
"This method retrieves a byte array containing the data at the\ngiven index in the block. If no data is found at the given index\nthis method returns null.\n\n@param index index of the data item to be retrieved\n@return byte array containing the requested data"
] | [
"Set dates where the event should not take place, even if they are part of the series.\n@param dates dates to set.",
"Wrapper functions with no bounds checking are used to access matrix internals",
"Checks if there's exactly one option that exists among all possible opts.\n\n@param options OptionSet to checked\... |
public static CuratorFramework newAppCurator(FluoConfiguration config) {
return newCurator(config.getAppZookeepers(), config.getZookeeperTimeout(),
config.getZookeeperSecret());
} | [
"Creates a curator built using Application's zookeeper connection string. Root path will start\nat Fluo application chroot."
] | [
"Set HTTP client\n\n@param httpClient\nAn instance of OkHttpClient\n@return Api Client",
"Use this API to fetch statistics of appfwpolicylabel_stats resource of given name .",
"Merge two maps of configuration properties. If the original contains a mapping for the same key, the new mapping is ignored.\n\n@param ... |
public synchronized boolean hasNext()
{
try
{
if (!isHasCalledCheck())
{
setHasCalledCheck(true);
setHasNext(getRsAndStmt().m_rs.next());
if (!getHasNext())
{
autoReleaseDbResources(... | [
"returns true if there are still more rows in the underlying ResultSet.\nReturns false if ResultSet is exhausted."
] | [
"Get the bar size.\n\n@param settings Parameters for rendering the scalebar.",
"Send a data to Incoming Webhook endpoint.",
"Moves our current playback position to the specified beat; this will be reflected in any status and beat packets\nthat we are sending. An incoming value less than one will jump us to the ... |
public void setKnotBlend(int n, int type) {
knotTypes[n] = (byte)((knotTypes[n] & ~BLEND_MASK) | type);
rebuildGradient();
} | [
"Set a knot blend type.\n@param n the knot index\n@param type the knot blend type\n@see #getKnotBlend"
] | [
"Load the given class using a specific class loader.\n\n@param className The name of the class\n@param cl The Class Loader to be used for finding the class.\n@return The class object",
"Read a text file into a single string\n\n@param file\nThe file to read\n@return The contents, or null on error.",
"Prepare a m... |
private void validatePermissions(final File dirPath, final File file) {
// Check execute and read permissions for parent dirPath
if( !dirPath.canExecute() || !dirPath.canRead() ) {
validFilePermissions = false;
filePermissionsProblemPath = dirPath.getAbsolutePath();
... | [
"This method performs a series of permissions checks given a directory and properties file path.\n\n1 - Check whether the parent directory dirPath has proper execute and read permissions\n2 - Check whether properties file path is readable and writable\n\nIf either of the permissions checks fail, update validFilePer... | [
"Gets the favorite entry for a given row.\n\n@param row the widget used to display the favorite\n@return the favorite entry for the widget",
"Get the directory where the compiled jasper reports should be put.\n\n@param configuration the configuration for the current app.",
"Specify additional query parameters t... |
public String putDocument(Document document) {
String key = UUID.randomUUID().toString();
documentMap.put(key, document);
return key;
} | [
"Puts a new document in the service. The generate key is globally unique.\n\n@param document document\n@return key unique key to reference the document"
] | [
"Replaces the translations in an existing container with the translations for the provided locale.\n@param locale the locale for which translations should be loaded.\n@return <code>true</code> if replacing succeeded, <code>false</code> otherwise.",
"Support the subscript operator for String.\n\n@param text a Str... |
@SuppressWarnings("WeakerAccess")
public synchronized void stop() {
if (isRunning()) {
final Set<DeviceAnnouncement> lastDevices = getCurrentDevices();
socket.get().close();
socket.set(null);
devices.clear();
firstDeviceTime.set(0);
// ... | [
"Stop listening for device announcements. Also discard any announcements which had been received, and\nnotify any registered listeners that those devices have been lost."
] | [
"Read a list of fixed size blocks using an instance of the supplied reader class.\n\n@param readerClass reader class\n@return list of blocks",
"Use this API to fetch all the appfwprofile resources that are configured on netscaler.",
"Assign float value within allowed range of [0,infinity) to initializeOnly SFFl... |
public TimephasedWorkContainer getBaselineWork(ResourceAssignment assignment, ProjectCalendar calendar, TimephasedWorkNormaliser normaliser, byte[] data, boolean raw)
{
TimephasedWorkContainer result = null;
if (data != null && data.length > 0)
{
LinkedList<TimephasedWork> list = null;
... | [
"Extracts baseline work from the MPP file for a specific baseline.\nReturns null if no baseline work is present, otherwise returns\na list of timephased work items.\n\n@param assignment parent assignment\n@param calendar baseline calendar\n@param normaliser normaliser associated with this data\n@param data timephas... | [
"Calculate the value of a CMS strike using the Black-Scholes model for the swap rate together with\nthe Hunt-Kennedy convexity adjustment.\n\n@param forwardSwaprate The forward swap rate\n@param volatility Volatility of the log of the swap rate\n@param swapAnnuity The swap annuity\n@param optionMaturity The option ... |
private boolean hasReceivedHeartbeat() {
long currentTimeMillis = System.currentTimeMillis();
boolean result = lastTimeMessageReceived + heartbeatTimeoutMs >= currentTimeMillis;
if (!result)
Jvm.warn().on(getClass(), Integer.toHexString(hashCode()) + " missed heartbeat, lastTimeMess... | [
"called periodically to check that the heartbeat has been received\n\n@return {@code true} if we have received a heartbeat recently"
] | [
"if you don't have an argument, choose the value that is going to be inserted into the map instead\n\n@param commandLineOption specification of the command line options\n@param value the value that is going to be inserted into the map instead of the argument",
"Read a text file resource into a single string\n\n@p... |
public void setPrefix(String prefix) {
if (!Strings.isNullOrEmpty(getProject().getUserProperty(SYSPROP_PREFIX()))) {
log("Ignoring prefix attribute because it is overridden by user properties.", Project.MSG_WARN);
} else {
SysGlobals.initializeWith(prefix);
}
} | [
"Initializes custom prefix for all junit4 properties. This must be consistent\nacross all junit4 invocations if done from the same classpath. Use only when REALLY needed."
] | [
"Configures the given annotation as a tag.\n\nThis is useful if you want to treat annotations as tags in JGiven that you cannot or want not\nto be annotated with the {@link com.tngtech.jgiven.annotation.IsTag} annotation.\n\n@param tagAnnotation the tag to be configured\n@return a configuration builder for configur... |
public static URL findConfigResource(String resourceName) {
if (Strings.isNullOrEmpty(resourceName)) {
return null;
}
final URL url = resourceName.startsWith(ROOT) ? DefaultConfiguration.class.getResource(resourceName)
: DefaultConfiguration.class.getResource(ROOT + reso... | [
"Returns the URL of a classpath resource.\n\n@param resourceName\nThe name of the resource.\n\n@return The URL."
] | [
"Process the scheduling project property from PROJPROP. This table only seems to exist\nin P6 databases, not XER files.\n\n@throws SQLException",
"Set the value as provided.\n@param value the serial date value as JSON string.",
"Use this API to Import responderhtmlpage.",
"Creates the adapter for the target d... |
public SingleProfileBackup getProfileBackupData(int profileID, String clientUUID) throws Exception {
SingleProfileBackup singleProfileBackup = new SingleProfileBackup();
List<PathOverride> enabledPaths = new ArrayList<>();
List<EndpointOverride> paths = PathOverrideService.getInstance().getPath... | [
"Get the active overrides with parameters and the active server group for a client\n\n@param profileID Id of profile to get configuration for\n@param clientUUID Client Id to export configuration\n@return SingleProfileBackup containing active overrides and active server group\n@throws Exception exception"
] | [
"Checks the preconditions for creating a new IsIncludedIn processor with a Set of Objects.\n\n@param possibleValues\nthe Set of possible values\n@throws NullPointerException\nif possibleValues is null\n@throws IllegalArgumentException\nif possibleValues is empty",
"Add new control at the end of control bar with s... |
private File makeDestFile(URL src) {
if (dest == null) {
throw new IllegalArgumentException("Please provide a download destination");
}
File destFile = dest;
if (destFile.isDirectory()) {
//guess name from URL
String name = src.toString();
... | [
"Generates the path to an output file for a given source URL. Creates\nall necessary parent directories for the destination file.\n@param src the source\n@return the path to the output file"
] | [
"Scans a single class for Swagger annotations - does not invoke ReaderListeners",
"Waits for the timeout duration until the url responds with correct status code\n\n@param routeUrl URL to check (usually a route one)\n@param timeout Max timeout value to await for route readiness.\nIf not set, default timeou... |
public RgbaColor adjustHue(float degrees) {
float[] HSL = convertToHsl();
HSL[0] = hueCheck(HSL[0] + degrees); // ensure [0-360)
return RgbaColor.fromHsl(HSL);
} | [
"Returns a new color that has the hue adjusted by the specified\namount."
] | [
"Returns the setter method for the field on an object.\n\n@param object\nthe object\n@param fieldName\nthe field name\n@param argumentType\nthe type to be passed to the setter\n@param <T>\nthe object type\n@return the setter method associated with the field on the object\n@throws NullPointerException\nif object, fi... |
public void writeNameValuePair(String name, int value) throws IOException
{
internalWriteNameValuePair(name, Integer.toString(value));
} | [
"Write an int attribute.\n\n@param name attribute name\n@param value attribute value"
] | [
"Maps a single prefix, uri pair as namespace.\n\n@param prefix the prefix to use\n@param namespaceURI the URI to use\n@throws IllegalArgumentException if prefix or namespaceURI is null",
"get the ArrayTypeSignature corresponding to given generic array type\n\n@param genericArrayType\n@return",
"Returns the file... |
private void addException(ProjectCalendar mpxjCalendar, net.sf.mpxj.ganttproject.schema.Date date)
{
String year = date.getYear();
if (year == null || year.isEmpty())
{
// In order to process recurring exceptions using MPXJ, we need a start and end date
// to constrain the number ... | [
"Add a single exception to a calendar.\n\n@param mpxjCalendar MPXJ calendar\n@param date calendar exception"
] | [
"Checks if the provided license is valid and could be stored into the database\n\n@param license the license to test\n@throws WebApplicationException if the data is corrupted",
"Re-Tag the websocket connection hold by this context with label specified.\nThis method will remove all previous tags on the websocket c... |
public static boolean isVector(DMatrixSparseCSC a) {
return (a.numCols == 1 && a.numRows > 1) || (a.numRows == 1 && a.numCols>1);
} | [
"Returns true if the input is a vector\n@param a A matrix or vector\n@return true if it's a vector. Column or row."
] | [
"Entry point for processing filter definitions.\n\n@param properties project properties\n@param filters project filters\n@param fixedData filter fixed data\n@param varData filter var data",
"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 subsy... |
@SuppressWarnings("unused")
public void setError(CharSequence error, Drawable icon) {
mPhoneEdit.setError(error, icon);
} | [
"Sets an error message that will be displayed in a popup when the EditText has focus along\nwith an icon displayed at the right-hand side.\n\n@param error error message to show"
] | [
"Adds, eventually merging, a direction for the specified relation type\n@param relationType\n@param direction",
"Sets the monitoring service.\n\n@param monitoringService the new monitoring service",
"Returns the bill for the month specified.\n\n@param month for which bill to retrieve.\n@param year for which bil... |
public static synchronized void addCachedDatabaseConfigs(Collection<DatabaseTableConfig<?>> configs) {
Map<Class<?>, DatabaseTableConfig<?>> newMap;
if (configMap == null) {
newMap = new HashMap<Class<?>, DatabaseTableConfig<?>>();
} else {
newMap = new HashMap<Class<?>, DatabaseTableConfig<?>>(configMap);
... | [
"This adds database table configurations to the internal cache which can be used to speed up DAO construction.\nThis is especially true of Android and other mobile platforms."
] | [
"Returns an integer array that contains the default values for all the\ntexture parameters.\n\n@return an integer array that contains the default values for all the\ntexture parameters.",
"Returns the resolution of resolving the conflict between a local and remote event using\nthe given conflict resolver.\n\n@par... |
protected int mapGanttBarHeight(int height)
{
switch (height)
{
case 0:
{
height = 6;
break;
}
case 1:
{
height = 8;
break;
}
case 2:
{
height = 10;
break;
... | [
"This method maps the encoded height of a Gantt bar to\nthe height in pixels.\n\n@param height encoded height\n@return height in pixels"
] | [
"Keep a cache of items files associated with classification in order to improve performance.",
"Counts a single pair of coordinates in all datasets.\n\n@param xCoord\n@param yCoord\n@param itemDocument",
"Read an optional boolean value form a JSON value.\n@param val the JSON value that should represent the bool... |
public boolean isPrivate() {
// refer to RFC 1918
// 10/8 prefix
// 172.16/12 prefix (172.16.0.0 – 172.31.255.255)
// 192.168/16 prefix
IPv4AddressSegment seg0 = getSegment(0);
IPv4AddressSegment seg1 = getSegment(1);
return seg0.matches(10)
|| seg0.matches(172) && seg1.matchesWithPre... | [
"Unicast addresses allocated for private use\n\n@see java.net.InetAddress#isSiteLocalAddress()"
] | [
"Renumbers all entity unique IDs.",
"Acquire the exclusive lock, with a max wait timeout to acquire.\n@param permit - the permit Integer for this operation. May not be {@code null}.\n@param timeout - the timeout scalar quantity.\n@param unit - see {@code TimeUnit} for quantities.\n@return {@code boolean} true on ... |
public final Object getValue(final String id, final String property) {
final CriteriaBuilder builder = getSession().getCriteriaBuilder();
final CriteriaQuery<Object> criteria = builder.createQuery(Object.class);
final Root<PrintJobStatusExtImpl> root = criteria.from(PrintJobStatusExtImpl.class);... | [
"get specific property value of job.\n\n@param id the id\n@param property the property name/path\n@return the property value"
] | [
"Invoke to find all services for given service type using specified class loader\n\n@param classLoader specified class loader\n@param serviceType given service type\n@return List of found services",
"Gets the date time str concise.\n\n@param d\nthe d\n@return the date time str concise",
"Configs created by this... |
private void checkRateLimit(String quotaKey, Tracked trackedOp) {
String quotaValue = null;
try {
if(!metadataStore.getQuotaEnforcingEnabledUnlocked()) {
return;
}
quotaValue = quotaStore.cacheGet(quotaKey);
// Store may not have any quotas... | [
"Ensure the current throughput levels for the tracked operation does not\nexceed set quota limits. Throws an exception if exceeded quota.\n\n@param quotaKey\n@param trackedOp"
] | [
"Load the view port execution.\n\n@param then callback when the view port is detected.\n@param fallback fallback when no view port detected or failure to detect the given\n{@link Boundary} (using {@link #propagateFallback(boolean)})",
"Setter for blob handle value.\n\n@param txn enclosing transaction\n@param ... |
void rejectAttributes(RejectedAttributesLogContext rejectedAttributes, ModelNode attributeValue) {
for (RejectAttributeChecker checker : checks) {
rejectedAttributes.checkAttribute(checker, name, attributeValue);
}
} | [
"Checks attributes for rejection\n\n@param rejectedAttributes gathers information about failed attributes\n@param attributeValue the attribute value"
] | [
"Prints the plan to a file.\n\n@param outputDirName\n@param plan",
"Get a property as a string or defaultValue.\n\n@param key the property name\n@param defaultValue the default value",
"Unlink the specified reference object.\nMore info see OJB doc.\n@param source The source object with the specified reference f... |
private void readCalendars(Project project, HashMap<BigInteger, ProjectCalendar> map)
{
Project.Calendars calendars = project.getCalendars();
if (calendars != null)
{
LinkedList<Pair<ProjectCalendar, BigInteger>> baseCalendars = new LinkedList<Pair<ProjectCalendar, BigInteger>>();
... | [
"This method extracts calendar data from an MSPDI file.\n\n@param project Root node of the MSPDI file\n@param map Map of calendar UIDs to names"
] | [
"Sets the SCXML model with a string\n\n@param model the model text",
"Returns the log conditional likelihood of the given dataset.\n\n@return The log conditional likelihood of the given dataset.",
"Convert Collection to Set\n@param collection Collection\n@return Set",
"To get all the textual content in the do... |
public int[] executeBatch(PreparedStatement stmt) throws PlatformException
{
// Check for Oracle batching support
final Method methodSendBatch = (Method) m_batchStatementsInProgress.remove(stmt);
final boolean statementBatchingSupported = methodSendBatch != null;
int[] retval ... | [
"Try Oracle update batching and call sendBatch or revert to\nJDBC update batching.\n@param stmt the batched prepared statement about to be executed\n@return always <code>null</code> if Oracle update batching is used,\nsince it is impossible to dissolve total row count into distinct\nstatement counts. If JDBC update... | [
"LRN cross-channel backward computation. Double parameters cast to tensor data type",
"Create an LBuffer from a given file.\n@param file\n@return\n@throws IOException",
"Starts recursive delete on all delete objects object graph",
"This method is used to calculate the duration of work between two fixed\ndates... |
public static long access2d(DMatrixRMaj a , DMatrixRMaj b , DMatrixRMaj c )
{
long timeBefore = System.currentTimeMillis();
for( int i = 0; i < a.numRows; i++ ) {
for( int j = 0; j < b.numCols; j++ ) {
c.set(i,j,a.get(i,0)*b.get(0,j));
}
for( in... | [
"Only sets and gets that are by row and column are used."
] | [
"Mark the given child resource as the post run dependent of the parent of this collection.\n\n@param childResource the child resource",
"Expensive. Creates the plan for the specific settings.",
"Removes all currently assigned labels for this Datum then adds all\nof the given Labels.",
"Add columns to the tree... |
public static base_responses delete(nitro_service client, dnsaaaarec resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
dnsaaaarec deleteresources[] = new dnsaaaarec[resources.length];
for (int i=0;i<resources.length;i++){
deleteresources[i] = ne... | [
"Use this API to delete dnsaaaarec resources."
] | [
"Check that each group is satisfied by one and only one field.\n\n@param currentPath the json path to the element being checked",
"Creates a new undeploy description.\n\n@param deploymentDescription the deployment description to copy\n\n@return the description",
"generate a message for loglevel INFO\n\n@param p... |
public List<T> resolveConflicts(List<T> values) {
if(values.size() > 1)
return values;
else
return Collections.singletonList(values.get(0));
} | [
"Arbitrarily resolve the inconsistency by choosing the first object if\nthere is one.\n\n@param values The list of objects\n@return A single value, if one exists, taken from the input list."
] | [
"Abort an active extern transaction associated with the given PB.",
"Remove an read lock.",
"iteration not synchronized",
"Use this API to add gslbsite resources.",
"Create the OJB_CLAZZ pseudo column based on CASE WHEN.\nThis column defines the Class to be instantiated.\n@param buf",
"Resumes a given ent... |
public Where<T, ID> and() {
ManyClause clause = new ManyClause(pop("AND"), ManyClause.AND_OPERATION);
push(clause);
addNeedsFuture(clause);
return this;
} | [
"AND operation which takes the previous clause and the next clause and AND's them together."
] | [
"Set the DPI value for GeoServer if there are already FORMAT_OPTIONS.",
"Set RGB output range.\n\n@param outRGB Range.",
"Use this API to count nstrafficdomain_bridgegroup_binding resources configued on NetScaler.",
"Set an enterprise cost value.\n\n@param index cost index (1-30)\n@param value cost value",
... |
public boolean preHandle(HttpServletRequest request,
HttpServletResponse response, Object handler) throws Exception {
String queryString = request.getQueryString() == null ? "" : request.getQueryString();
if (ConfigurationService.getInstance().isValid()
|| ... | [
"This will check to see if certain configuration values exist from the ConfigurationService\nIf not then it redirects to the configuration screen"
] | [
"Return the inverse cumulative distribution function at x.\n\n@param x Argument\n@return Inverse cumulative distribution function at x.",
"Called when a payload thread has ended. This also notifies the poller to poll once again.",
"Boot with the given operations, performing full model and capability registry va... |
public void clear() {
valueBoxBase.setText("");
clearStatusText();
if (getPlaceholder() == null || getPlaceholder().isEmpty()) {
label.removeStyleName(CssName.ACTIVE);
}
} | [
"Resets the text box by removing its content and resetting visual state."
] | [
"Configure a new user defined field.\n\n@param fieldType field type\n@param dataType field data type\n@param name field name",
"Serialize the object JSON. When an error occures return a string with the given error.",
"Converts a value to the appropriate type.\n\n@param type target type\n@param value input value... |
public static void main(final String[] args) throws IOException
{
// This is just a _hack_ ...
BufferedReader reader = null;
if (args.length == 0)
{
System.err.println("No input file specified.");
System.exit(-1);
}
if (args.length > 1)
... | [
"Static main.\n\n@param args\nProgram arguments.\n@throws IOException\nIf an IO error occurred."
] | [
"Most complete output",
"Cancel old waiting jobs.\n\n@param starttimeThreshold threshold for start time\n@param checkTimeThreshold threshold for last check time\n@param message the error message",
"Capture stdout and route them through Redwood\n@return this",
"Iterates over all tags of current member and eval... |
public synchronized void stop() throws DatastoreEmulatorException {
// We intentionally don't check the internal state. If people want to try and stop the server
// multiple times that's fine.
stopEmulatorInternal();
if (state != State.STOPPED) {
state = State.STOPPED;
if (projectDirectory !... | [
"Stops the emulator. Multiple calls are allowed.\n\n@throws DatastoreEmulatorException if the emulator cannot be stopped"
] | [
"Add new control at the control bar with specified touch listener, resource and position.\nSize of control bar is updated based on new number of controls.\n@param name name of the control to remove\n@param resId the control face\n@param listener touch listener\n@param position control position in the bar",
"As al... |
public static String getOffsetCodeFromCurveName(String curveName) {
if(curveName == null || curveName.length() == 0) {
return null;
}
String[] splits = curveName.split("(?<=\\D)(?=\\d)");
String offsetCode = splits[splits.length-1];
if(!Character.isDigit(offsetCode.charAt(0))) {
return null;
}... | [
"Determines the offset code of a forward contract from the name of a forward curve.\nThis method will extract a group of one or more digits together with the first letter behind them, if any.\nIf there are multiple groups of digits in the name, this method will extract the last.\nIf there is no number in the string... | [
"Update the state of the picker. If it has an owner, the picker\nwill use that object to derive its position and orientation.\nThe \"active\" state of this controller is used to indicate touch.\nThe cursor position is updated after picking.",
"Adjusts the site root and returns a cloned CmsObject, iff the module h... |
public static void configure(Job conf, SimpleConfiguration props) {
try {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
props.save(baos);
conf.getConfiguration().set(PROPS_CONF_KEY,
new String(baos.toByteArray(), StandardCharsets.UTF_8));
} catch (Exception e) {
... | [
"Call this method to initialize the Fluo connection props\n\n@param conf Job configuration\n@param props Use {@link org.apache.fluo.api.config.FluoConfiguration} to set props\nprogrammatically"
] | [
"Invalidate the item in layout\n@param dataIndex data index",
"Retrieve URL without parameters\n\n@param sourceURI source URI\n@return URL without parameters",
"Returns the field descriptors given in the the field names list.\n\n@param fieldNames The field names, separated by commas\n@return The field descripto... |
private List<TimephasedWork> splitWork(CostRateTable table, ProjectCalendar calendar, TimephasedWork work, int rateIndex)
{
List<TimephasedWork> result = new LinkedList<TimephasedWork>();
work.setTotalAmount(Duration.getInstance(0, work.getAmountPerDay().getUnits()));
while (true)
{
... | [
"Splits timephased work segments in line with cost rates. Note that this is\nan approximation - where a rate changes during a working day, the second\nrate is used for the whole day.\n\n@param table cost rate table\n@param calendar calendar used by this assignment\n@param work timephased work segment\n@param rateIn... | [
"Check whether the URL end with one of the given suffixes.\n\n@param uri URI\n@param patterns possible suffixes\n@return true when URL ends with one of the suffixes",
"Use this API to fetch snmpalarm resource of given name .",
"Delete all backups asynchronously",
"Scans all Forge addons for classes accepted b... |
private void readResources()
{
for (MapRow row : getTable("RTAB"))
{
Resource resource = m_projectFile.addResource();
setFields(RESOURCE_FIELDS, row, resource);
m_eventManager.fireResourceReadEvent(resource);
// TODO: Correctly handle calendar
}
} | [
"Read resource data from a PEP file."
] | [
"Adds a rule row to the table with a given style.\n@param style the rule style, must not be null nor {@link TableRowStyle#UNKNOWN}\n@throws {@link NullPointerException} if style was null\n@throws {@link IllegalArgumentException} if style was {@link TableRowStyle#UNKNOWN}",
"Triggers a replication request.",
"Pr... |
public void addItem(T value, Direction dir, String text) {
addItem(value, dir, text, true);
} | [
"Adds an item to the list box, specifying its direction and an initial\nvalue 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 dir the item's direction\n@param text the text of the item to be added"
] | [
"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",
"Consumes a produced result. Calls every transformer in sequence... |
public CollectionRequest<CustomField> findByWorkspace(String workspace) {
String path = String.format("/workspaces/%s/custom_fields", workspace);
return new CollectionRequest<CustomField>(this, CustomField.class, path, "GET");
} | [
"Returns a list of the compact representation of all of the custom fields in a workspace.\n\n@param workspace The workspace or organization to find custom field definitions in.\n@return Request object"
] | [
"Called when a ParentViewHolder has triggered an expansion for it's parent\n\n@param flatParentPosition the position of the parent that is calling to be expanded",
"Command-line version of the classifier. See the class\ncomments for examples of use, and SeqClassifierFlags\nfor more information on supported flags... |
public ItemRequest<Task> dependents(String task) {
String path = String.format("/tasks/%s/dependents", task);
return new ItemRequest<Task>(this, Task.class, path, "GET");
} | [
"Returns the compact representations of all of the dependents of a task.\n\n@param task The task to get dependents on.\n@return Request object"
] | [
"currently does not support paths with name constrains",
"Drops a driver from the DriverManager's list.",
"Returns a string that represents a valid Solr query range.\n\n@param from Lower bound of the query range.\n@param to Upper bound of the query range.\n@return String that represents a Solr query range.",
... |
protected void ensureDJStyles() {
//first of all, register all parent styles if any
for (Style style : getReport().getStyles().values()) {
addStyleToDesign(style);
}
Style defaultDetailStyle = getReport().getOptions().getDefaultDetailStyle();
Style defaultHeaderStyl... | [
"Sets a default style for every element that doesn't have one\n\n@throws JRException"
] | [
"Calculates the next date, starting from the provided date.\n\n@param date the current date.\n@param interval the number of month to add when moving to the next month.",
"Prints the results of the equation to standard out. Useful for debugging",
"Restore backup data\n\n@param fileData - json file with restore d... |
Object lookup(String key) throws ObjectNameNotFoundException
{
Object result = null;
NamedEntry entry = localLookup(key);
// can't find local bound object
if(entry == null)
{
try
{
PersistenceBroker broker = tx.getBroker();
... | [
"Return a named object associated with the specified key."
] | [
"Get the element as a boolean.\n\n@param i the index of the element to access",
"Adds all pairs from 'fromMap' to 'toMap' excluding once that matching the pattern",
"Creates a statement with parameters that should work with most RDBMS.",
"When we execute a single statement we only need the corresponding Row w... |
public static String formatDateTime(Context context, ReadablePartial time, int flags) {
return android.text.format.DateUtils.formatDateTime(context, toMillis(time), flags | FORMAT_UTC);
} | [
"Formats a date or a time according to the local conventions.\n\nSince ReadablePartials don't support all fields, we fill in any blanks\nneeded for formatting by using the epoch (1970-01-01T00:00:00Z).\n\nSee {@link android.text.format.DateUtils#formatDateTime} for full docs.\n\n@param context the context is requir... | [
"Evaluates the body if the current class has at least one member with at least one tag with the specified name.\n\n@param template The body of the block tag\n@param attributes The attributes of the template tag\n@exception XDocletException Description of Exception\n@doc.tag ... |
public static Timespan create(Timespan... timespans) {
if (timespans == null) {
return null;
}
if (timespans.length == 0) {
return ZERO_MILLISECONDS;
}
Timespan res = timespans[0];
for (int i = 1; i < timespans.length; i++) {
Timespa... | [
"Creates a timespan from a list of other timespans.\n\n@return a timespan representing the sum of all the timespans provided"
] | [
"Remove a column from the Document\n\n@param entity the {@link Document} with the column\n@param column the column to remove",
"Get the class name without the qualified package name.\n@param className the className to get the short name for\n@return the class name of the class without the package name\n@throws Il... |
protected static String createDotStoryName(String scenarioName) {
String[] words = scenarioName.trim().split(" ");
String result = "";
for (int i = 0; i < words.length; i++) {
String word1 = words[i];
String word2 = word1.toLowerCase();
if (!word1.equals(word2... | [
"Creates the name of the .story file to be wrote with the testcase. The\nname of the scenario must be given with spaces.\n\n@param scenarioName\n- The scenario name, with spaces\n@return the .story file name."
] | [
"Retrieve a number of rows matching the supplied query.\n\n@param sql query statement\n@return result set\n@throws SQLException",
"create a HTTP POST request.\n\n@return {@link HttpConnection}",
"Sets the replacement var map.\n\n@param replacementVarMap\nthe replacement var map\n@return the parallel task builde... |
public Where<T, ID> isNull(String columnName) throws SQLException {
addClause(new IsNull(columnName, findColumnFieldType(columnName)));
return this;
} | [
"Add a 'IS NULL' clause so the column must be null. '=' NULL does not work."
] | [
"Returns the export format indicated in the result-type parameter \"layoutManager\"\n@param _invocation\n@return",
"Set the horizontal and vertical alignment for the image when image gets cropped by resizing.\n\n@param valign Vertical alignment.\n@param halign Horizontal alignment.\n@throws IllegalStateException ... |
public static authenticationvserver_binding get(nitro_service service, String name) throws Exception{
authenticationvserver_binding obj = new authenticationvserver_binding();
obj.set_name(name);
authenticationvserver_binding response = (authenticationvserver_binding) obj.get_resource(service);
return response;
... | [
"Use this API to fetch authenticationvserver_binding resource of given name ."
] | [
"Iterate through dependencies",
"Sets the replace var map to single target.\n\n@param replacementVarMapList\nthe replacement var map list\n@param uniformTargetHost\nthe uniform target host\n@return the parallel task builder",
"Logs an error by sending an error event to all listeners.\n\nError events can be gene... |
public static base_response unset(nitro_service client, tmsessionparameter resource, String[] args) throws Exception{
tmsessionparameter unsetresource = new tmsessionparameter();
return unsetresource.unset_resource(client,args);
} | [
"Use this API to unset the properties of tmsessionparameter resource.\nProperties that need to be unset are specified in args array."
] | [
"Returns an empty Promotion details in Json\n\n@return String\n@throws IOException",
"Use this API to fetch wisite_binding resource of given name .",
"resolves any lazy cross references in this resource, adding Issues for unresolvable elements to this resource.\nThis resource might still contain resolvable prox... |
public static base_responses update(nitro_service client, responderpolicy resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
responderpolicy updateresources[] = new responderpolicy[resources.length];
for (int i=0;i<resources.length;i++){
updatere... | [
"Use this API to update responderpolicy resources."
] | [
"Returns whether this represents a valid host name or address format.\n@return",
"Get a value as a string.\n\n@param key the key for looking up the value.\n@param type the type of the object\n@param <V> the type",
"Get a list of referrers from a given domain to a user's photostream.\n\n@param date\n(Required) S... |
public static String changeFirstLetterToLowerCase(String word) {
char[] letras = word.toCharArray();
char a = letras[0];
letras[0] = Character.toLowerCase(a);
return new String(letras);
} | [
"Method used to write the name of the scenarios methods\n\n@param word\n@return the same word starting with lower case"
] | [
"If this address was resolved from a host, returns that host. Otherwise, does a reverse name lookup.",
"Determines if still WRITING or COMPLETE.\n\n@param itemTag mad libs style string to insert into progress message.\n@return state of stream request handler",
"Utility method to clear cached calendar data.",
... |
private int getItemViewType(Class prototypeClass) {
int itemViewType = -1;
for (Renderer renderer : prototypes) {
if (renderer.getClass().equals(prototypeClass)) {
itemViewType = getPrototypeIndex(renderer);
break;
}
}
if (itemViewType == -1) {
throw new PrototypeNotFou... | [
"Return the Renderer class associated to the prototype.\n\n@param prototypeClass used to search the renderer in the prototypes collection.\n@return the prototype index associated to the prototypeClass."
] | [
"compute Exp using Taylor Series.\n\n@param x An angle, in radians.\n@param nTerms Number of terms.\n@return Result.",
"Prepare the options by adding additional information to them.\n@see <a href=\"https://docs.mongodb.com/manual/core/index-ttl/\">TTL Indexes</a>",
"Gets type from super class's type parame... |
private <T> CoreRemoteMongoCollection<T> getRemoteCollection(
final MongoNamespace namespace,
final Class<T> resultClass
) {
return remoteClient
.getDatabase(namespace.getDatabaseName())
.getCollection(namespace.getCollectionName(), resultClass);
} | [
"Returns the remote collection representing the given namespace.\n\n@param namespace the namespace referring to the remote collection.\n@param resultClass the {@link Class} that represents documents in the collection.\n@param <T> the type documents in the collection.\n@return the remote collection represe... | [
"Retrieves a string value from the extended data.\n\n@param type Type identifier\n@return string value",
"Str map to str.\n\n@param map\nthe map\n@return the string",
"Set day.\n\n@param d day instance",
"Notifies that multiple footer items are changed.\n\n@param positionStart the position.\n@param itemCount ... |
protected void updateModel(final OperationContext context, final ModelNode operation) throws OperationFailedException {
// verify that the resource exist before removing it
context.readResource(PathAddress.EMPTY_ADDRESS, false);
Resource resource = context.removeResource(PathAddress.EMPTY_ADDRES... | [
"Performs the update to the persistent configuration model. This default implementation simply removes\nthe targeted resource.\n\n@param context the operation context\n@param operation the operation\n@throws OperationFailedException if there is a problem updating the model"
] | [
"This method retrieves a String of the specified type,\nbelonging to the item with the specified unique ID.\n\n@param id unique ID of entity to which this data belongs\n@param type data type identifier\n@return string containing required data",
"Get the default provider used.\n\n@return the default provider, neve... |
public CustomHeadersInterceptor replaceHeader(String name, String value) {
this.headers.put(name, new ArrayList<String>());
this.headers.get(name).add(value);
return this;
} | [
"Add a single header key-value pair. If one with the name already exists,\nit gets replaced.\n\n@param name the name of the header.\n@param value the value of the header.\n@return the interceptor instance itself."
] | [
"flush all messages to disk\n\n@param force flush anyway(ignore flush interval)",
"Guess whether given file is binary. Just checks for anything under 0x09.",
"Create a list of operations required to a boot a managed server.\n\n@param serverName the server name\n@param domainModel the complete domain model\n@par... |
public static StringTemplateGroup readStringTemplateGroup(InputStream stream) {
try {
return new StringTemplateGroup(
new InputStreamReader(stream, "UTF-8"),
DefaultTemplateLexer.class,
new StringTemplateErrorListener() {
@Suppres... | [
"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 string template group"
] | [
"Overloads the left shift operator to provide an easy way to append multiple\nobjects as string representations to a String.\n\n@param self a String\n@param value an Object\n@return a StringBuffer built from this string\n@since 1.0",
"Return the available format ids.",
"Parses a single query facet item with qu... |
@Override
public void destroy(T instance, CreationalContext<T> creationalContext) {
super.destroy(instance, creationalContext);
try {
getProducer().preDestroy(instance);
// WELD-1010 hack?
if (creationalContext instanceof CreationalContextImpl) {
(... | [
"Destroys an instance of the bean\n\n@param instance The instance"
] | [
"This method allows a resource assignment to be added to the\ncurrent task.\n\n@param resource the resource to assign\n@return ResourceAssignment object",
"Compute the repair set from the given values and nodes\n\n@param nodeValues The value found on each node\n@return A set of repairs to perform",
"Create a ne... |
public static boolean isTrait(final ClassNode cNode) {
return cNode!=null
&& ((cNode.isInterface() && !cNode.getAnnotations(TRAIT_CLASSNODE).isEmpty())
|| isAnnotatedWithTrait(cNode));
} | [
"Returns true if the specified class node is a trait.\n@param cNode a class node to test\n@return true if the classnode represents a trait"
] | [
"Enables or disabled shadow casting for a direct light.\nEnabling shadows attaches a GVRShadowMap component to the\nGVRSceneObject which owns the light and provides the\ncomponent with an orthographic camera for shadow casting.\n@param enableFlag true to enable shadow casting, false to disable",
"Gets the status ... |
public static DMatrixSparseTriplet uniform(int numRows , int numCols , int nz_total ,
double min , double max , Random rand ) {
// Create a list of all the possible element values
int N = numCols*numRows;
if( N < 0 )
throw new IllegalArg... | [
"Randomly generates matrix with the specified number of matrix elements filled with values from min to max.\n\n@param numRows Number of rows\n@param numCols Number of columns\n@param nz_total Total number of non-zero elements in the matrix\n@param min Minimum value\n@param max maximum value\n@param rand Random numb... | [
"Parse duration represented in thousandths of minutes.\n\n@param properties project properties\n@param value duration value\n@param targetTimeUnit required output time units\n@return Duration instance",
"Sign in a connection to the registry by key.\n\nNote multiple connections can be attached to the same key\n\n@... |
public Pair<int[][][], int[]> documentToDataAndLabels(List<IN> document) {
int docSize = document.size();
// first index is position in the document also the index of the
// clique/factor table
// second index is the number of elements in the clique/window these
// features are for (starting ... | [
"Convert a document List into arrays storing the data features and labels.\n\n@param document\nTraining documents\n@return A Pair, where the first element is an int[][][] representing the\ndata and the second element is an int[] representing the labels"
] | [
"Append field with quotes and escape characters added, if required.\n\n@return this",
"Scale all widgets in Main Scene hierarchy\n@param scale",
"Load the InstalledIdentity configuration based on the module.path\n\n@param installedImage the installed image\n@param productConfig the product config\n@param modul... |
public void updateInfo(BoxTermsOfServiceUserStatus.Info info) {
URL url = TERMS_OF_SERVICE_USER_STATUSES_TEMPLATE.build(this.getAPI().getBaseURL(), this.getID());
BoxJSONRequest request = new BoxJSONRequest(this.getAPI(), url, "PUT");
request.setBody(info.getPendingChanges());
BoxJSONRe... | [
"Updates the information about the user status for this terms of service with any info fields that have\nbeen modified locally.\n@param info the updated info."
] | [
"Return all option names that not already have a value\nand is enabled",
"Shutdown each AHC client in the map.",
"Returns the vertex with given ID framed into given interface.",
"Get an image using the specified URL suffix.\n\n@deprecated\n@param suffix\nThe URL suffix, including the .extension\n@return The B... |
public static <OutT, InT> PagedList<OutT> toPagedList(List<InT> list, final Func1<InT, OutT> mapper) {
PageImpl<InT> page = new PageImpl<>();
page.setItems(list);
page.setNextPageLink(null);
PagedList<InT> pagedList = new PagedList<InT>(page) {
@Override
public Pa... | [
"Converts the given list of a type to paged list of a different type.\n\n@param list the list to convert to paged list\n@param mapper the mapper to map type in input list to output list\n@param <OutT> the type of items in output paged list\n@param <InT> the type of items in input paged list\n@return the paged list"... | [
"Make a copy of JobContext of current thread\n@return the copy of current job context or an empty job context",
"Use this API to fetch all the nsrollbackcmd resources that are configured on netscaler.",
"Decodes stream data based on content encoding\n@param contentEncoding\n@param bytes\n@return String represen... |
public static String insertDumpInformation(String pattern,
String dateStamp, String project) {
if (pattern == null) {
return null;
} else {
return pattern.replace("{DATE}", dateStamp).replace("{PROJECT}",
project);
}
} | [
"Inserts the information about the dateStamp of a dump and the project\nname into a pattern.\n\n@param pattern\nString with wildcards\n@param dateStamp\n@param project\n@return String with injected information."
] | [
"Remove an addon from an app.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@param addonName Addon name. See {@link #listAppAddons} for a list of addons that can be used.\n@return the request object",
"Check whether error handling works. If it works, you should see an\nok, ... |
private void initDurationButtonGroup() {
m_groupDuration = new CmsRadioButtonGroup();
m_endsAfterRadioButton = new CmsRadioButton(
EndType.TIMES.toString(),
Messages.get().key(Messages.GUI_SERIALDATE_DURATION_ENDTYPE_OCC_0));
m_endsAfterRadioButton.setGroup(m_groupDurat... | [
"Configure all UI elements in the \"ending\"-options panel."
] | [
"Sets the database dialect.\n\n@param dialect\nthe database dialect",
"Formats a percentage value.\n\n@param number MPXJ percentage value\n@return Primavera percentage value",
"Generates the path to an output file for a given source URL. Creates\nall necessary parent directories for the destination file.\n@para... |
private void emit(float[] particlePositions, float[] particleVelocities,
float[] particleTimeStamps)
{
float[] allParticlePositions = new float[particlePositions.length + particleBoundingVolume.length];
System.arraycopy(particlePositions, 0, allParticlePositions, 0, particlePos... | [
"Append the bounding volume particle positions, times and velocities to the existing mesh\nbefore creating a new scene object with this mesh attached to it.\nAlso, append every created scene object and its creation time to corresponding array lists.\n\n@param particlePositions\n@param particleVelocities\n@param par... | [
"Use this API to restore appfwprofile resources.",
"Get the contents from the request URL.\n\n@param url URL to get the response from\n@param layer the raster layer\n@return {@link InputStream} with the content\n@throws IOException cannot get content",
"Extract the generic type from the given Class object.\n@pa... |
protected String getLocaleSpecificTitle(Locale locale) {
String result = null;
try {
if (isDetailRequest()) {
// this is a request to a detail page
CmsResource res = getDetailContent();
CmsFile file = m_cms.readFile(res);
Cms... | [
"Returns the title according to the given locale.\n@param locale the locale for which the title should be read.\n@return the title according to the given locale"
] | [
"Register the entity as batch loadable, if enabled\n\nCopied from {@link org.hibernate.type.ManyToOneType#scheduleBatchLoadIfNeeded}",
"parse json text to specified class\n\n@param jsonRtn\n@param jsonRtnClazz\n@return",
"sets the initialization method for this descriptor",
"If the variable is a local tempora... |
public final void notifyContentItemChanged(int position) {
if (position < 0 || position >= contentItemCount) {
throw new IndexOutOfBoundsException("The given position " + position
+ " is not within the position bounds for content items [0 - " + (contentItemCount - 1) + "].");
... | [
"Notifies that a content item is changed.\n\n@param position the position."
] | [
"Increment the version info associated with the given node\n\n@param node The node",
"Used by the slave host when creating the host info dmr sent across to the DC during the registration process\n\n@param ignoreUnaffectedServerGroups whether the slave host is set up to ignore config for server groups it does not ... |
static String[] tokenize(String str) {
char sep = '.';
int start = 0;
int len = str.length();
int count = 0;
for (int pos = 0; pos < len; pos++) {
if (str.charAt(pos) == sep) {
if (pos != start) {
count++;
}
... | [
"Tokenize the the string as a package hierarchy\n\n@param str\n@return"
] | [
"Set dates with the provided check states.\n@param datesWithCheckInfo the dates to set, accompanied with the check state to set.",
"Removes the expiration flag.",
"Set the value as provided.\n@param value the serial date value as JSON string.",
"Features are only cacheable when not converted lazily as lazy fe... |
public void addGroupBy(String[] fieldNames)
{
for (int i = 0; i < fieldNames.length; i++)
{
addGroupBy(fieldNames[i]);
}
} | [
"Adds an array of groupby fieldNames for ReportQueries.\n@param fieldNames The groupby to set\n@deprecated use QueryByCriteria#addGroupBy"
] | [
"This method extracts calendar data from an MSPDI file.\n\n@param project Root node of the MSPDI file\n@param map Map of calendar UIDs to names",
"Sum of all elements\n\n@param A (Input) Matrix. Not modified.\n@return scalar",
"Build copyright map once.",
"Attempt to resolve the given expression string, recur... |
public static ForwardCurveInterpolation createForwardCurveFromMonteCarloLiborModel(String name, LIBORModelMonteCarloSimulationModel model, double startTime) throws CalculationException{
int timeIndex = model.getTimeIndex(startTime);
// Get all Libors at timeIndex which are not yet fixed (others null) and times for... | [
"Create a forward curve from forwards given by a LIBORMonteCarloModel.\n\n@param name name of the forward curve.\n@param model Monte Carlo model providing the forwards.\n@param startTime time at which the curve starts, i.e. zero time for the curve\n@return a forward curve from forwards given by a LIBORMont... | [
"Determines the component type for a given array type.\n\n@param type the given array type\n@return the component type of a given array type",
"Set the association in the entry state.\n\n@param collectionRole the role of the association\n@param association the association",
"Translate a Wikimedia language code ... |
public SingleAssetEuropeanOptionProductDescriptor getDescriptor(LocalDate referenceDate, int index) throws ArrayIndexOutOfBoundsException{
LocalDate maturityDate = FloatingpointDate.getDateFromFloatingPointDate(referenceDate, maturity);
if(index >= strikes.length) {
throw new ArrayIndexOutOfBoundsException("Stri... | [
"Return a product descriptor for a specific strike.\n\n@param referenceDate The reference date (translating the maturity floating point date to dates.\n@param index The index corresponding to the strike grid.\n@return a product descriptor for a specific strike.\n@throws ArrayIndexOutOfBoundsException Thrown if inde... | [
"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 ParallelTaskBuilder prepareHttpPost(String url) {
reinitIfClosed();
ParallelTaskBuilder cb = new ParallelTaskBuilder();
cb.getHttpMeta().setHttpMethod(HttpMethod.POST);
cb.getHttpMeta().setRequestUrlPostfix(url);
return cb;
} | [
"Prepare a parallel HTTP POST Task.\n\n@param url\nthe UrlPostfix: e.g. in http://localhost:8080/index.html.,the url is \"/index.html\"\n@return the parallel task builder"
] | [
"Animate de-selection of visible views and clear\nselected set.",
"low level http operations",
"Gets the value of the ppvItem property.\n\n<p>\nThis accessor method returns a reference to the live list,\nnot a snapshot. Therefore any modification you make to the\nreturned list will be present inside the JAXB ob... |
public ScheduleDescriptor generateScheduleDescriptor(LocalDate startDate, LocalDate endDate) {
return new ScheduleDescriptor(startDate, endDate, getFrequency(), getDaycountConvention(), getShortPeriodConvention(), getDateRollConvention(),
getBusinessdayCalendar(), getFixingOffsetDays(), getPaymentOffsetDays(), ... | [
"Generate a schedule descriptor for the given start and end date.\n\n@param startDate The start date.\n@param endDate The end date.\n@return The schedule descriptor"
] | [
"Computes the p=1 norm. If A is a matrix then the induced norm is computed.\n\n@param A Matrix or vector.\n@return The norm.",
"Removes a design document using DesignDocument object from the database.\n\n@param designDocument the design document object to be removed\n@return {@link DesignDocument}",
"Clears al... |
public long countByLex(final LexRange lexRange) {
return doWithJedis(new JedisCallable<Long>() {
@Override
public Long call(Jedis jedis) {
return jedis.zlexcount(getKey(), lexRange.from(), lexRange.to());
}
});
} | [
"When all the elements in a sorted set are inserted with the same score, in order to force lexicographical\nordering, this command returns the number of elements in the sorted set with a value in the given range.\n@param lexRange\n@return the number of elements in the specified range."
] | [
"Write the standard set of day types.\n\n@param calendars parent collection of calendars",
"Add an additional SSExtension\n@param ssExt the ssextension to set",
"Returns iterable with all assignments of this retention policy.\n@param limit the limit of entries per response. The default value is 100.\n@param fie... |
private void onClickAdd() {
if (m_currentLocation.isPresent()) {
CmsFavoriteEntry entry = m_currentLocation.get();
List<CmsFavoriteEntry> entries = getEntries();
entries.add(entry);
try {
m_favDao.saveFavorites(entries);
} catch (Excep... | [
"The click handler for the add button."
] | [
"Reads baseline values for the current resource.\n\n@param xmlResource MSPDI resource instance\n@param mpxjResource MPXJ resource instance",
"Generates a Map of query parameters for Artifact regarding the filters\n\n@return Map<String, Object>",
"Adds each required length, ensuring it isn't negative.\n\n@param ... |
public static <K,V> Map<K,V> minus(Map<K,V> self, Map removeMe) {
final Map<K,V> ansMap = createSimilarMap(self);
ansMap.putAll(self);
if (removeMe != null && removeMe.size() > 0) {
for (Map.Entry<K, V> e1 : self.entrySet()) {
for (Object e2 : removeMe.entrySet()) {
... | [
"Create a Map composed of the entries of the first map minus the\nentries of the given map.\n\n@param self a map object\n@param removeMe the entries to remove from the map\n@return the resulting map\n@since 1.7.4"
] | [
"Add columns to the tree.\n\n@param parentNode parent tree node\n@param table columns container",
"Adds a new point.\n\n@param point a point\n@return this for chaining",
"Given an array of variable names, returns an Xml String\nof values.\n\n@param dataMap an map containing variable names and their correspondin... |
public View getFullScreenView() {
if (mFullScreenView != null) {
return mFullScreenView;
}
final DisplayMetrics metrics = new DisplayMetrics();
mActivity.getWindowManager().getDefaultDisplay().getMetrics(metrics);
final int screenWidthPixels = Math.max(metrics.widthP... | [
"Invalidating just the GVRView associated with the GVRViewSceneObject\nincorrectly set the clip rectangle to just that view. To fix this,\nwe have to create a full screen android View and invalidate this\nto restore the clip rectangle.\n@return full screen View object"
] | [
"Set the occurrences. If the String is invalid, the occurrences will be set to \"-1\" to cause server-side validation to fail.\n@param occurrences the interval to set.",
"decides which icon to apply or hide this view\n\n@param imageHolder\n@param imageView\n@param iconColor\n@param tint",
"Remove a notification... |
private void addClass(URLClassLoader loader, JarEntry jarEntry, XMLStreamWriter writer, boolean mapClassMethods) throws ClassNotFoundException, XMLStreamException, IntrospectionException
{
String className = jarEntry.getName().replaceAll("\\.class", "").replaceAll("/", ".");
writer.writeStartElement("cla... | [
"Add an individual class to the map file.\n\n@param loader jar file class loader\n@param jarEntry jar file entry\n@param writer XML stream writer\n@param mapClassMethods true if we want to produce .Net style class method names\n@throws ClassNotFoundException\n@throws XMLStreamException\n@throws IntrospectionExcepti... | [
"Assigns retention policy with givenID to folder or enterprise.\n@param api the API connection to be used by the created assignment.\n@param policyID id of the assigned retention policy.\n@param assignTo object representing folder or enterprise to assign policy to.\n@return info about created assignment.",
"A spe... |
public static spilloverpolicy[] get(nitro_service service, options option) throws Exception{
spilloverpolicy obj = new spilloverpolicy();
spilloverpolicy[] response = (spilloverpolicy[])obj.get_resources(service,option);
return response;
} | [
"Use this API to fetch all the spilloverpolicy resources that are configured on netscaler."
] | [
"key function. first validate if the ACM has adequate data; then execute\nit after the validation. the new ParallelTask task guareetee to have the\ntargethost meta and command meta not null\n\n@param handler\nthe handler\n@return the parallel task",
"Gets id of a link and creates the new one if necessary.\n\n@par... |
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
switch (requestCode) {
case REQUEST_PERMISSIONS_CODE:
if (listener != null) {
boolean granted = grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED;
liste... | [
"You should call this method from your activity onRequestPermissionsResult.\n\n@param requestCode The request code passed in requestPermissions(android.app.Activity, String[], int)\n@param permissions The requested permissions. Never null.\n@param grantResults The grant results for the corresponding permissions w... | [
"Decompiles a single type.\n\n@param metadataSystem\n@param typeName\n@return\n@throws IOException",
"Write a time units field to the JSON file.\n\n@param fieldName field name\n@param value field value",
"Use this API to delete dnsaaaarec resources of given names.",
"Sets the access token to use when authenti... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.