query stringlengths 74 6.1k | positive listlengths 1 1 | negative listlengths 9 9 |
|---|---|---|
private String getProject(CmsObject cms, CmsFavoriteEntry entry) throws CmsException {
String result = m_projectLabels.get(entry.getProjectId());
if (result == null) {
result = cms.readProject(entry.getProjectId()).getName();
m_projectLabels.put(entry.getProjectId(), result);
... | [
"Gets the project name for a favorite entry.\n\n@param cms the CMS context\n@param entry the favorite entry\n@return the project name for the favorite entry\n@throws CmsException if something goes wrong"
] | [
"This method lists all resource assignments defined in the file.\n\n@param file MPX file",
"Registers all custom Externalizer implementations that Hibernate OGM needs into a running\nInfinispan CacheManager configuration.\nThis is only safe to do when Caches from this CacheManager haven't been started yet,\nor th... |
private static RemoteWebDriver buildRemoteWebDriver(String hubUrl) {
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setPlatform(Platform.ANY);
URL url;
try {
url = new URL(hubUrl);
} catch (MalformedURLException e) {
LOGGER.error("The given hub url of the remote server is mal... | [
"Private used static method for creation of a RemoteWebDriver. Taking care of the default\nCapabilities and using the HttpCommandExecutor.\n\n@param hubUrl the url of the hub to use.\n@return the RemoteWebDriver instance."
] | [
"Get the current stack trace element, skipping anything from known logging classes.\n@return The current stack trace for this thread",
"Use this API to fetch cachepolicylabel_binding resource of given name .",
"Executes the API action \"wbsetclaim\" for the given parameters.\n\n@param statement\nthe JSON serial... |
public static String digestToFileName(String digest) {
if (StringUtils.startsWith(digest, "sha1")) {
return "manifest.json";
}
return getShaVersion(digest) + "__" + getShaValue(digest);
} | [
"Digest format to layer file name.\n\n@param digest\n@return"
] | [
"Returns the local collection representing the given namespace for raw document operations.\n\n@param namespace the namespace referring to the local collection.\n@return the local collection representing the given namespace for raw document operations.",
"Utility function to get the current value.",
"Returns th... |
public static DMatrix2 extractColumn( DMatrix2x2 a , int column , DMatrix2 out ) {
if( out == null) out = new DMatrix2();
switch( column ) {
case 0:
out.a1 = a.a11;
out.a2 = a.a21;
break;
case 1:
out.a1 = a.a12;
... | [
"Extracts the column from the matrix a.\n@param a Input matrix\n@param column Which column is to be extracted\n@param out output. Storage for the extracted column. If null then a new vector will be returned.\n@return The extracted column."
] | [
"Throws one RendererException if the content parent or layoutInflater are null.",
"Use this API to fetch the statistics of all vpath_stats resources that are configured on netscaler.",
"Add the list with given bundles to the \"Require-Bundle\" main attribute.\n\n@param requiredBundles The list of all bundles to... |
public boolean removeHandlerFor(final GVRSceneObject sceneObject) {
sceneObject.detachComponent(GVRCollider.getComponentType());
return null != touchHandlers.remove(sceneObject);
} | [
"Makes the object unpickable and removes the touch handler for it\n@param sceneObject\n@return true if the handler has been successfully removed"
] | [
"Remove a key for all language versions. If a descriptor is present, the key is only removed in the descriptor.\n\n@param key the key to remove.\n@return <code>true</code> if removing was successful, <code>false</code> otherwise.",
"Returns the rank of the decomposed matrix.\n\n@see SingularOps_DDRM#rank(Singular... |
public static sslcertkey[] get(nitro_service service, String certkey[]) throws Exception{
if (certkey !=null && certkey.length>0) {
sslcertkey response[] = new sslcertkey[certkey.length];
sslcertkey obj[] = new sslcertkey[certkey.length];
for (int i=0;i<certkey.length;i++) {
obj[i] = new sslcertkey();
... | [
"Use this API to fetch sslcertkey resources of given names ."
] | [
"Exact conversion of displaced lognormal ATM volatiltiy to normal ATM volatility.\n\n@param forward The forward\n@param displacement The displacement (considering a displaced lognormal model, otherwise 0.\n@param maturity The maturity\n@param lognormalVolatiltiy The (implied) lognormal volatility.\n@return The (imp... |
public static double HighAccuracyFunction(double x) {
if (x < -8 || x > 8)
return 0;
double sum = x;
double term = 0;
double nextTerm = x;
double pwr = x * x;
double i = 1;
// Iterate until adding next terms doesn't produce
// any change wit... | [
"High-accuracy Normal cumulative distribution function.\n\n@param x Value.\n@return Result."
] | [
"Compute the CRC32 of the segment of the byte array given by the\nspecificed size and offset\n\n@param bytes The bytes to checksum\n@param offset the offset at which to begin checksumming\n@param size the number of bytes to checksum\n@return The CRC32",
"Sets the location value as string.\n\n@param value the s... |
public Object getObjectByIdentity(Identity id)
throws PersistenceBrokerException
{
checkOpen();
ObjectEnvelope envelope = objectEnvelopeTable.getByIdentity(id);
if (envelope != null)
{
return (envelope.needsDelete() ? null : envelope.getObject());
... | [
"Get object by identity. First lookup among objects registered in the\ntransaction, then in persistent storage.\n@param id The identity\n@return The object\n@throws PersistenceBrokerException"
] | [
"Gets or creates id of the entity type.\n\n@param entityType entity type name.\n@param allowCreate if set to true and if there is no entity type like entityType,\ncreate the new id for the entityType.\n@return entity type id.",
"Set a knot color.\n@param n the knot index\n@param color the color",
"Throws an Il... |
@PostConstruct
public final void addMetricsAppenderToLogback() {
final LoggerContext factory = (LoggerContext) LoggerFactory.getILoggerFactory();
final Logger root = factory.getLogger(Logger.ROOT_LOGGER_NAME);
final InstrumentedAppender metrics = new InstrumentedAppender(this.metricRegistry... | [
"Add an appender to Logback logging framework that will track the types of log messages made."
] | [
"Add assignments to the tree.\n\n@param parentNode parent tree node\n@param file assignments container",
"Get the column name from the indirection table.\n@param mnAlias\n@param path",
"Create a handful of default currencies to keep Primavera happy.",
"Returns the version of Jenkins Artifactory Plugin or empt... |
public static base_responses delete(nitro_service client, String sitename[]) throws Exception {
base_responses result = null;
if (sitename != null && sitename.length > 0) {
gslbsite deleteresources[] = new gslbsite[sitename.length];
for (int i=0;i<sitename.length;i++){
deleteresources[i] = new gslbsite();... | [
"Use this API to delete gslbsite resources of given names."
] | [
"Move the SQL value to the next one for version processing.",
"Image scale method\n@param imageToScale The image to be scaled\n@param dWidth Desired width, the new image object is created to this size\n@param dHeight Desired height, the new image object is created to this size\n@param fWidth What to multiply the ... |
public static BoxTermsOfService.Info create(BoxAPIConnection api,
BoxTermsOfService.TermsOfServiceStatus termsOfServiceStatus,
BoxTermsOfService.TermsOfServiceType termsOfServiceType, String text) {
URL url = ALL_TER... | [
"Creates a new Terms of Services.\n@param api the API connection to be used by the resource.\n@param termsOfServiceStatus the current status of the terms of services. Set to \"enabled\" or \"disabled\".\n@param termsOfServiceType the scope of terms of service. Set to \"external\" o... | [
"Get the value of a primitive type from the request data.\n\n@param fieldName the name of the attribute to get from the request data.\n@param pAtt the primitive attribute.\n@param requestData the data to retrieve the value from.",
"Creates a new instance of this class.\n\n@param variableName\nname of the instance... |
public static ComplexNumber Sin(ComplexNumber z1) {
ComplexNumber result = new ComplexNumber();
if (z1.imaginary == 0.0) {
result.real = Math.sin(z1.real);
result.imaginary = 0.0;
} else {
result.real = Math.sin(z1.real) * Math.cosh(z1.imaginary);
... | [
"Calculates Sine value of the complex number.\n\n@param z1 A Complex Number instance.\n@return Returns new ComplexNumber instance containing the Sine value of the specified complex number."
] | [
"This method tells you if a ClassNode implements or extends a certain class.\n@param node\nthe node\n@param target\nthe class\n@return\ntrue if the class node 'is a' target",
"Set the start time.\n@param date the start time to set.",
"Set the model used by the left table.\n\n@param model table model",
"invoke... |
public static <T> T createObject(final Class<T> clazz, final Object[] args, final Map<String,Object> vars)
throws NoSuchConstructorException, AmbiguousConstructorException, ReflectiveOperationException {
return invokeSetters(findConstructor(clazz, args).newInstance(args), vars);
} | [
"Create an object of the given type using a constructor that matches the\nsupplied arguments and invoke the setters with the supplied variables.\n\n@param <T> the object type\n@param clazz\nthe type to create\n@param args\nthe arguments to the constructor\n@param vars\nthe named arguments for setters\n@return a new... | [
"Init the licenses cache\n\n@param licenses",
"Returns a matrix of StatisticsMatrix type so that SimpleMatrix functions create matrices\nof the correct type.",
"The parameter 'project' is not used at the moment, but will be used once schema and plugin support lands.",
"Returns a PreparedStatementCreator that ... |
public void setShadow(float radius, float dx, float dy, int color) {
shadowRadius = radius;
shadowDx = dx;
shadowDy = dy;
shadowColor = color;
updateShadow();
} | [
"Enables a dark shadow for this CircularImageView.\nIf the radius is set to 0, the shadow is removed.\n@param radius Radius for the shadow to extend to.\n@param dx Horizontal shadow offset.\n@param dy Vertical shadow offset.\n@param color The color of the shadow to apply."
] | [
"Gets all checked widget indexes in the group. The indexes are counted from 0 to size -1,\nwhere size is the number of Checkable widgets in the group. It does not take into account\nany non-Checkable widgets added to the group widget.\n\n@return list of checked widget indexes",
"Extract site path, base name and l... |
public static wisite_accessmethod_binding[] get(nitro_service service, String sitepath) throws Exception{
wisite_accessmethod_binding obj = new wisite_accessmethod_binding();
obj.set_sitepath(sitepath);
wisite_accessmethod_binding response[] = (wisite_accessmethod_binding[]) obj.get_resources(service);
return r... | [
"Use this API to fetch wisite_accessmethod_binding resources of given name ."
] | [
"Locate the no arg constructor for the class.",
"Generate the next permutation and return a list containing\nthe elements in the appropriate order.\n@see #nextPermutationAsList(java.util.List)\n@see #nextPermutationAsArray()\n@return The next permutation as a list.",
"Use this API to unset the properties of aaa... |
public CollectionRequest<Task> tags(String task) {
String path = String.format("/tasks/%s/tags", task);
return new CollectionRequest<Task>(this, Task.class, path, "GET");
} | [
"Returns a compact representation of all of the tags the task has.\n\n@param task The task to get tags on.\n@return Request object"
] | [
"Transform a TMS layer description object into a raster layer info object.\n\n@param tileMap\nThe TMS layer description object.\n@return The raster layer info object as used by Geomajas.",
"Gets the groupby for ReportQueries of all Criteria and Sub Criteria\nthe elements are of class FieldHelper\n@return List of ... |
public void addDependencyGraph(DAGraph<DataT, NodeT> dependencyGraph) {
this.rootNode.addDependency(dependencyGraph.rootNode.key());
Map<String, NodeT> sourceNodeTable = dependencyGraph.nodeTable;
Map<String, NodeT> targetNodeTable = this.nodeTable;
this.merge(sourceNodeTable, targetNode... | [
"Mark root of this DAG depends on given DAG's root.\n\n@param dependencyGraph the dependency DAG"
] | [
"Returns the adapter position of the Child associated with this ChildViewHolder\n\n@return The adapter position of the Child if it still exists in the adapter.\nRecyclerView.NO_POSITION if item has been removed from the adapter,\nRecyclerView.Adapter.notifyDataSetChanged() has been called after the last\nlayout pas... |
@SuppressWarnings("SameParameterValue")
private void assembleAndSendPacket(Util.PacketType kind, byte[] payload, InetAddress destination, int port) throws IOException {
DatagramPacket packet = Util.buildPacket(kind,
ByteBuffer.wrap(announcementBytes, DEVICE_NAME_OFFSET, DEVICE_NAME_LENGTH).a... | [
"Finish the work of building and sending a protocol packet.\n\n@param kind the type of packet to create and send\n@param payload the content which will follow our device name in the packet\n@param destination where the packet should be sent\n@param port the port to which the packet should be sent\n\n@throws IOExcep... | [
"Join the Collection of Strings using the specified delimiter.\n\n@param s\nThe String collection\n@param delimiter\nThe delimiter String\n@return The joined String",
"Finds all variables in the context with the given names, and also attaches all WindupFreeMarkerMethods from all addons into the map.\n\nThis allow... |
protected void addImage(PdfContext context, ImageResult imageResult) throws BadElementException, IOException {
Bbox imageBounds = imageResult.getRasterImage().getBounds();
float scaleFactor = (float) (72 / getMap().getRasterResolution());
float width = (float) imageBounds.getWidth() * scaleFactor;
float height ... | [
"Add image in the document.\n\n@param context\nPDF context\n@param imageResult\nimage\n@throws BadElementException\nPDF construction problem\n@throws IOException\nPDF construction problem"
] | [
"moves to the next row of the underlying ResultSet and returns the\ncorresponding Object materialized from this row.",
"Sets the day of the month that matches the condition, i.e., the day of month of the 2nd Saturday.\nIf the day does not exist in the current month, the last possible date is set, i.e.,\ninstead o... |
private static void reverse(int first, int last, Swapper swapper) {
// no more needed since manually inlined
while (first < --last) {
swapper.swap(first++,last);
}
} | [
"Reverses a sequence of elements.\n@param array Array containing the sequence\n@param first Beginning of the range\n@param last One past the end of the range\n@exception ArrayIndexOutOfBoundsException If the range\nis invalid."
] | [
"Disables all the overrides for a specific profile\n\n@param model\n@param profileID\n@param clientUUID\n@return",
"Function to perform the forward pass for batch convolution",
"Returns the raw class of the given type.",
"Invokes a closure passing it a new Sql instance created from the given JDBC connection U... |
@SuppressWarnings({"unused", "WeakerAccess"})
public static void changeCredentials(String accountID, String token, String region) {
if(defaultConfig != null){
Logger.i("CleverTap SDK already initialized with accountID:"+defaultConfig.getAccountId()
+" and token:"+defaultConfi... | [
"This method is used to change the credentials of CleverTap account Id, token and region programmatically\n@param accountID CleverTap Account Id\n@param token CleverTap Account Token\n@param region Clever Tap Account Region"
] | [
"Creates the \"Add key\" button.\n@return the \"Add key\" button.",
"Returns script view\n\n@param model\n@return\n@throws Exception",
"Serialize specified object to directory with specified name.\n\n@param directory write to\n@param name serialize object with specified name\n@param obj object to ser... |
public DbLicense resolve(final String licenseId) {
for (final Entry<String, DbLicense> regexp : licensesRegexp.entrySet()) {
try {
if (licenseId.matches(regexp.getKey())) {
return regexp.getValue();
}
} catch (PatternSyntaxException e)... | [
"Resolve the targeted license thanks to the license ID\nReturn null if no license is matching the licenseId\n\n@param licenseId\n@return DbLicense"
] | [
"Appends a formatted line of code to the source.\n\n<p>Formatting supports {@code %s} and {@code %n$s}. Most args are converted according to their\n{@link Object#toString()} method, except that:<ul>\n<li> {@link Package} and {@link PackageElement} instances use their fully-qualified names\n(no \"package \" prefix).... |
public SimplifySpanBuild append(String text) {
if (TextUtils.isEmpty(text)) return this;
mNormalSizeText.append(text);
mStringBuilder.append(text);
return this;
} | [
"append normal text\n\n@param text normal text\n@return SimplifySpanBuild"
] | [
"Fills in the element with the InputValues for input\n\n@param element the node element\n@param input the input data",
"Creates a color item that represents a color field fond for a track.\n\n@param colorId the key of the color as found in the database\n@param label the corresponding color label as found in the... |
@RequestMapping(value = "/api/profile/{profileIdentifier}/clients/delete", method = RequestMethod.POST)
public
@ResponseBody
HashMap<String, Object> deleteClient(Model model,
@RequestParam("profileIdentifier") String profileIdentifier,
... | [
"Bulk delete clients from a profile.\n\n@param model\n@param profileIdentifier\n@param clientUUID\n@return returns the table of the remaining clients or an exception if deletion failed for some reason\n@throws Exception"
] | [
"Load the available layers.\n\n@param image the installed image\n@param productConfig the product config to establish the identity\n@param moduleRoots the module roots\n@param bundleRoots the bundle roots\n@return the layers\n@throws IOException",
"Sets the category of the notification... |
public static synchronized void resetAndSetNewConfig(Context ctx, Config config) {
GLOBAL_CONFIG = config;
if (DISK_CACHE_MANAGER != null) {
DISK_CACHE_MANAGER.clear();
DISK_CACHE_MANAGER = null;
createCache(ctx);
}
if (EXECUTOR_MANAGER != null) {
... | [
"Sets a new config and clears the previous cache"
] | [
"Map the EventType.\n\n@param eventType the event type\n@return the event",
"appends a WHERE-clause to the Statement\n@param where\n@param crit\n@param stmt",
"Executes the API action \"wbsetclaim\" for the given parameters.\n\n@param statement\nthe JSON serialization of claim to add or delete.\n@param bot\nif ... |
private void processProject(PrimaveraDatabaseReader reader, int projectID, String outputFile) throws Exception
{
long start = System.currentTimeMillis();
reader.setProjectID(projectID);
ProjectFile projectFile = reader.read();
long elapsed = System.currentTimeMillis() - start;
System.ou... | [
"Process a single project.\n\n@param reader Primavera reader\n@param projectID required project ID\n@param outputFile output file name"
] | [
"Peeks the current top of the stack or returns null if the stack is empty\n@return the current top of the stack or returns null if the stack is empty",
"Get the last date to keep logs from, by a given current date.\n@param currentDate the date of today\n@return the last date to keep log files from.",
"Login for... |
public void abortExternalTx(TransactionImpl odmgTrans)
{
if (log.isDebugEnabled()) log.debug("abortExternTransaction was called");
if (odmgTrans == null) return;
TxBuffer buf = (TxBuffer) txRepository.get();
Transaction extTx = buf != null ? buf.getExternTx() : null;
tr... | [
"Abort an active extern transaction associated with the given PB."
] | [
"Sort and order steps to avoid unwanted generation",
"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-... |
public void setWorkingDay(Day day, boolean working)
{
setWorkingDay(day, (working ? DayType.WORKING : DayType.NON_WORKING));
} | [
"convenience method for setting working or non-working days.\n\n@param day required day\n@param working flag indicating if the day is a working day"
] | [
"This method returns the actual raw class associated with the specified\ntype.",
"Total count of partition-stores moved in this task.\n\n@return number of partition stores moved in this task.",
"Filter for public tweets on these languages.\n\n@param languages\nValid BCP 47 (http://tools.ietf.org/html/bcp47) lan... |
public boolean isEmbeddedProperty(String targetTypeName, List<String> namesWithoutAlias) {
OgmEntityPersister persister = getPersister( targetTypeName );
Type propertyType = persister.getPropertyType( namesWithoutAlias.get( 0 ) );
if ( propertyType.isComponentType() ) {
// Embedded
return true;
}
else i... | [
"Checks if the path leads to an embedded property or association.\n\n@param targetTypeName the entity with the property\n@param namesWithoutAlias the path to the property with all the aliases resolved\n@return {@code true} if the property is an embedded, {@code false} otherwise."
] | [
"Determines if the queue identified by the given key is a delayed queue.\n\n@param jedis\nconnection to Redis\n@param key\nthe key that identifies a queue\n@return true if the key identifies a delayed queue, false otherwise",
"Use this API to unset the properties of protocolhttpband resource.\nProperties that nee... |
public void processCollection(String template, Properties attributes) throws XDocletException
{
String name = OjbMemberTagsHandler.getMemberName();
CollectionDescriptorDef collDef = _curClassDef.getCollection(name);
String attrName;
if (col... | [
"Sets the current collection definition derived from the current member, and optionally some attributes.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException If an error occurs\n@doc.tag type=\"block\"\n@doc.param ... | [
"Move this rectangle to the specified bottom-left point.\n\n@param rect rectangle to move\n@param x new x origin\n@param y new y origin",
"Append the WHERE part of the statement to the StringBuilder.",
"Prints the error message as log message.\n\n@param level the log level",
"Inserts a String value into the m... |
protected void endPersistence(final BufferedWriter writer) throws IOException {
// Append any additional users to the end of the file.
for (Object currentKey : toSave.keySet()) {
String key = (String) currentKey;
if (!key.contains(DISABLE_SUFFIX_KEY)) {
writePrope... | [
"Method called to indicate persisting the properties file is now complete.\n\n@throws IOException"
] | [
"This method lists task predecessor and successor relationships.\n\n@param file project file",
"validates operation against the definition and sets model for the parameters passed.\n\n@param operationObject model node of type {@link ModelType#OBJECT}, typically representing an operation request\n@param model ... |
private void connect() throws IOException, GeneralSecurityException {
synchronized (closedSync) {
if (socket == null || socket.isClosed()) {
SSLContext sc = SSLContext.getInstance("SSL");
sc.init(null, new TrustManager[] { new X509TrustAllManager() }, new SecureRandom... | [
"Establish connection to the ChromeCast device"
] | [
"parse the target resource and add it to the current shape\n@param shapes\n@param modelJSON\n@param current\n@throws org.json.JSONException",
"Sets the segment reject as a string. This method is for convenience\nto be able to set percent reject type just by calling with '3%' and\notherwise it uses rows. All this ... |
public static void setTime(Calendar calendar, int hourOfDay, int minute, int second, int millisecond) {
calendar.set(Calendar.HOUR_OF_DAY, hourOfDay);
calendar.set(Calendar.MINUTE, minute);
calendar.set(Calendar.SECOND, second);
calendar.set(Calendar.MILLISECOND, millisecond);
} | [
"Sets hour, minutes, seconds and milliseconds to the given values. Leaves date info untouched."
] | [
"OJB can handle only classes that declare at least one primary key attribute,\nthis method checks this condition.\n\n@param realObject The real object to check\n@throws ClassNotPersistenceCapableException thrown if no primary key is specified for the objects class",
"if you want to convert some string to an objec... |
protected FieldDescriptor resolvePayloadField(Message message) {
for (FieldDescriptor field : message.getDescriptorForType().getFields()) {
if (message.hasField(field)) {
return field;
}
}
throw new RuntimeException("No payload found in message " + messag... | [
"Find out which field in the incoming message contains the payload that is.\ndelivered to the service method."
] | [
"Should be called after all rows have been created\n@param headerStyle\n@param totalStyle\n@param totalHeaderStyle\n@return",
"Removes the task from the specified project. The task will still exist\nin the system, but it will not be in the project anymore.\n\nReturns an empty data block.\n\n@param task The task ... |
public static Double getDistanceBetweenCoordinates(Tuple2<Double, Double> point1, Tuple2<Double, Double> point2) {
// sqrt( (x2-x1)^2 + (y2-y2)^2 )
Double xDiff = point1._1() - point2._1();
Double yDiff = point1._2() - point2._2();
return Math.sqrt(xDiff * xDiff + yDiff * yDiff);
... | [
"Get distance between geographical coordinates\n@param point1 Point1\n@param point2 Point2\n@return Distance (double)"
] | [
"Overridden to skip some symbolizers.",
"Send a packet to the target player telling it to load the specified track from the specified source player.\n\n@param targetPlayer the device number of the player that you want to have load a track\n@param rekordboxId the identifier of a track within the source player's re... |
public static Value.Builder makeValue(Value value1, Value value2, Value... rest) {
ArrayValue.Builder arrayValue = ArrayValue.newBuilder();
arrayValue.addValues(value1);
arrayValue.addValues(value2);
arrayValue.addAllValues(Arrays.asList(rest));
return Value.newBuilder().setArrayValue(arrayValue);
... | [
"Make a list value containing the specified values."
] | [
"Saves the loaded XML bundle as property bundle.\n@throws UnsupportedEncodingException thrown if localizations from the XML bundle could not be loaded correctly.\n@throws CmsException thrown if any of the interactions with the VFS fails.\n@throws IOException thrown if localizations from the XML bundle could not be ... |
public static String defaultHtml(HttpServletRequest request) {
CmsObject cms = CmsFlexController.getController(request).getCmsObject();
// We only want the big red warning in Offline mode
if (cms.getRequestContext().getCurrentProject().isOnlineProject()) {
return "<div><!--Dynamic ... | [
"Returns the default output for functions without configured JSPs.\n\n@param request the current request\n@return the default HTML output"
] | [
"Initializes an annotation class\n\n@param name The name of the annotation class\n@return The instance of the annotation. Returns a dummy if the class was\nnot found",
"Internal method that finds the matching enum for a configured field that has the name argument.\n\n@return The matching enum value or null if bla... |
public <S extends AddressSegment> void getSplitSegments(S segs[], int index, AddressSegmentCreator<S> creator) {
if(!isMultiple()) {
int bitSizeSplit = IPv6Address.BITS_PER_SEGMENT >>> 1;
Integer myPrefix = getSegmentPrefixLength();
Integer highPrefixBits = getSplitSegmentPrefix(bitSizeSplit, myPrefix, 0... | [
"Converts this IPv6 address segment into smaller segments,\ncopying them into the given array starting at the given index.\n\nIf a segment does not fit into the array because the segment index in the array is out of bounds of the array,\nthen it is not copied.\n\n@param segs\n@param index"
] | [
"Return the list of all the module submodules\n\n@param module\n@return List<DbModule>",
"This function wires up a SSL Listener with the cyber villians root CA and cert with the correct CNAME for the request\n\n@param host\n@param listener",
"a small static helper to set the image from the imageHolder nullSave ... |
private StateVertex addStateToCurrentState(StateVertex newState, Eventable eventable) {
LOGGER.debug("addStateToCurrentState currentState: {} newState {}",
currentState.getName(), newState.getName());
// Add the state to the stateFlowGraph. Store the result
StateVertex cloneState = stateFlowGraph.putIfAbsent... | [
"Adds the newState and the edge between the currentState and the newState on the SFG.\n\n@param newState the new state.\n@param eventable the clickable causing the new state.\n@return the clone state iff newState is a clone, else returns null"
] | [
"Get the bounding box for a certain tile.\n\n@param code\nThe unique tile code. Determines what tile we're talking about.\n@param maxExtent\nThe maximum extent of the grid to which this tile belongs.\n@param scale\nThe current client side scale.\n@return Returns the bounding box for the tile, expressed in the layer... |
public static Iterable<Metadata> getAllMetadata(BoxItem item, String ... fields) {
QueryStringBuilder builder = new QueryStringBuilder();
if (fields.length > 0) {
builder.appendParam("fields", fields);
}
return new BoxResourceIterable<Metadata>(
item.getAPI(),... | [
"Used to retrieve all metadata associated with the item.\n@param item item to get metadata for.\n@param fields the optional fields to retrieve.\n@return An iterable of metadata instances associated with the item."
] | [
"Combines weighted crf with this crf\n\n@param crf\n@param weight",
"Extracts the value of this bit flag from the supplied byte array\nand sets the value in the supplied container.\n\n@param container container\n@param data byte array",
"Initializes data structures",
"Increment the version info associated wit... |
public static ComplexNumber Add(ComplexNumber z1, ComplexNumber z2) {
return new ComplexNumber(z1.real + z2.real, z1.imaginary + z2.imaginary);
} | [
"Adds two complex numbers.\n\n@param z1 Complex Number.\n@param z2 Complex Number.\n@return Returns new ComplexNumber instance containing the sum of specified complex numbers."
] | [
"Use this API to fetch auditnslogpolicy_vpnvserver_binding resources of given name .",
"Initializes the metadataCache for MetadataStore",
"Assigns one variable to one value\n\n@param action an Assign Action\n@param possibleStateList a current list of possible states produced so far from expanding a model state\... |
public boolean changeState(StateVertex nextState) {
if (nextState == null) {
LOGGER.info("nextState given is null");
return false;
}
LOGGER.debug("Trying to change to state: '{}' from: '{}'", nextState.getName(),
currentState.getName());
if (stateFlowGraph.canGoTo(currentState, nextState)) {
LOGG... | [
"Change the currentState to the nextState if possible. The next state should already be\npresent in the graph.\n\n@param nextState the next state.\n@return true if currentState is successfully changed."
] | [
"Detach any script file from a scriptable target.\n\n@param target The scriptable target.",
"commit all envelopes against the current broker",
"With this impl, it only returns the same credentials once. Otherwise it's possible that a loop will occur.\nWhen server returns status code 401, the HTTP client provide... |
public ClosableIterator<Tuple> callStoredProcedure(EmbeddedCacheManager embeddedCacheManager, String storedProcedureName, ProcedureQueryParameters queryParameters, ClassLoaderService classLoaderService ) {
validate( queryParameters );
Cache<String, String> cache = embeddedCacheManager.getCache( STORED_PROCEDURES_CA... | [
"Returns the result of a stored procedure executed on the backend.\n\n@param embeddedCacheManager embedded cache manager\n@param storedProcedureName name of stored procedure\n@param queryParameters parameters passed for this query\n@param classLoaderService the class loader service\n\n@return a {@link ClosableItera... | [
"Creates and returns a temporary directory for a printing task.",
"Checks whether the given class maps to a different table but also has the given collection.\n\n@param origCollDef The original collection to search for\n@param origTableDef The original table\n@param classDef The class descriptor to test\n@re... |
public static final void setPosition(UIObject o, Rect pos) {
Style style = o.getElement().getStyle();
style.setPropertyPx("left", pos.x);
style.setPropertyPx("top", pos.y);
} | [
"Sets the position of a UIObject"
] | [
"Utility function to get the current value.",
"Dump data for all non-summary tasks to stdout.\n\n@param name file name",
"Returns the connection count by key specified in this registry\n\nNote it might count connections that are closed but not removed from registry yet\n\n@param key\nthe key\n@return connection... |
protected Boolean getIgnoreReleaseDate() {
Boolean isIgnoreReleaseDate = parseOptionalBooleanValue(m_configObject, JSON_KEY_IGNORE_RELEASE_DATE);
return (null == isIgnoreReleaseDate) && (m_baseConfig != null)
? Boolean.valueOf(m_baseConfig.getGeneralConfig().getIgnoreReleaseDate())
: is... | [
"Returns a flag indicating if also unreleased resources should be found.\n@return A flag indicating if also unreleased resources should be found."
] | [
"Aggregates a list of templates specified by @Template",
"Read a field into our table configuration for field=value line.",
"This method writes task data to an MSPDI file.\n\n@param project Root node of the MSPDI file",
"Sets the resource to which this calendar is linked. Note that this\nmethod updates the ca... |
private static boolean matches(@Nonnull final Pattern pattern, @Nonnull final CharSequence chars) {
return pattern.matcher(chars).matches();
} | [
"Checks whether a character sequence matches against a specified pattern or not.\n\n@param pattern\npattern, that the {@code chars} must correspond to\n@param chars\na readable sequence of {@code char} values which should match the given pattern\n@return {@code true} when {@code chars} matches against the passed {@... | [
"Store an Object.\n@see org.apache.ojb.broker.PersistenceBroker#store(Object)",
"Sets the ssh priv key relative path wtih passphrase.\n\n@param privKeyRelativePath the priv key relative path\n@param passphrase the passphrase\n@return the parallel task builder",
"Copy the contents of the given String to the give... |
public static int copyAllBytes(InputStream in, OutputStream out) throws IOException {
int byteCount = 0;
byte[] buffer = new byte[BUFFER_SIZE];
while (true) {
int read = in.read(buffer);
if (read == -1) {
break;
}
out.write(buffer, ... | [
"Copies all available data from in to out without closing any stream.\n\n@return number of bytes copied"
] | [
"Add authentication information for the given host\n@param host the host\n@param credentials the credentials\n@param authScheme the scheme for preemptive authentication (should be\n<code>null</code> if adding authentication for a proxy server)\n@param context the context in which the authentication information\nsho... |
public void setJdbcLevel(String jdbcLevel)
{
if (jdbcLevel != null)
{
try
{
double intLevel = Double.parseDouble(jdbcLevel);
setJdbcLevel(intLevel);
}
catch(NumberFormatException nfe)
{
... | [
"Sets the jdbcLevel. parse the string setting and check that it is indeed an integer.\n@param jdbcLevel The jdbcLevel to set"
] | [
"Use this API to fetch aaauser_auditsyslogpolicy_binding resources of given name .",
"Search for rectangles which have the same width and x position, and\nwhich join together vertically and merge them together to reduce the\nnumber of rectangles needed to describe a symbol.",
"Open the log file for writing.",
... |
protected final boolean isPatternValid() {
switch (getPatternType()) {
case DAILY:
return isEveryWorkingDay() || isIntervalValid();
case WEEKLY:
return isIntervalValid() && isWeekDaySet();
case MONTHLY:
return isIntervalValid()... | [
"Checks, if all values necessary for a specific pattern are valid.\n@return a flag, indicating if all values required for the pattern are valid."
] | [
"Request a scoped transactional token for a particular resource.\n@param accessToken application access token.\n@param scope scope of transactional token.\n@param resource resource transactional token has access to.\n@return a BoxAPIConnection which can be used to perform transactional requests.",
"Synthesize and... |
public static DMatrixRMaj symmetric(int length, double min, double max, Random rand) {
DMatrixRMaj A = new DMatrixRMaj(length,length);
symmetric(A,min,max,rand);
return A;
} | [
"Creates a random symmetric matrix whose values are selected from an uniform distribution\nfrom min to max, inclusive.\n\n@param length Width and height of the matrix.\n@param min Minimum value an element can have.\n@param max Maximum value an element can have.\n@param rand Random number generator.\n@return A symme... | [
"iteration not synchronized",
"If there are any observer methods, they must be static or business\nmethods.",
"Use this API to add snmpuser resources.",
"Decode the String from Base64 into a byte array.\n\n@param value the string to be decoded\n@return the decoded bytes as an array\n@since 1.0",
"Use this A... |
ArgumentsBuilder param(String param, String value) {
if (value != null) {
args.add(param);
args.add(value);
}
return this;
} | [
"Adds a parameter that requires a string argument to the argument list.\nIf the given argument is null, then the argument list remains unchanged."
] | [
"Check to see whether a packet starts with the standard header bytes, followed by a known byte identifying it.\nIf so, return the kind of packet that has been recognized.\n\n@param packet a packet that has just been received\n@param port the port on which the packet has been received\n\n@return the type of packet t... |
public final double[] getDpiSuggestions() {
if (this.dpiSuggestions == null) {
List<Double> list = new ArrayList<>();
for (double suggestion: DEFAULT_DPI_VALUES) {
if (suggestion <= this.maxDpi) {
list.add(suggestion);
}
}
... | [
"Get DPI suggestions.\n\n@return DPI suggestions"
] | [
"Build the operation transformers.\n\n@param registry the shared resource registry\n@return the operation transformers",
"to check availability, then class name is truncated to bundle id",
"Creates a server setup based on provided properties.\n\n@param properties the properties.\n@return the server setup, or an... |
protected static <K, T> void groupAnswer(final Map<K, List<T>> answer, T element, K value) {
if (answer.containsKey(value)) {
answer.get(value).add(element);
} else {
List<T> groupedElements = new ArrayList<T>();
groupedElements.add(element);
answer.put(va... | [
"Groups the current element according to the value\n\n@param answer the map containing the results\n@param element the element to be placed\n@param value the value according to which the element will be placed\n@since 1.5.0"
] | [
"Converts a DTO attribute into a generic attribute object.\n\n@param attribute\nThe DTO attribute.\n@return The server side attribute representation. As we don't know at this point what kind of object the\nattribute is (that's a problem for the <code>FeatureModel</code>), we return an <code>Object</code>.",
"This... |
protected void addSpecialMethods(ClassFile proxyClassType, ClassMethod staticConstructor) {
try {
// Add special methods for interceptors
for (Method method : LifecycleMixin.class.getMethods()) {
BeanLogger.LOG.addingMethodToProxy(method);
MethodInformatio... | [
"Adds methods requiring special implementations rather than just\ndelegation.\n\n@param proxyClassType the Javassist class description for the proxy type"
] | [
"Overridden to do only the clean-part of the linking but not\nthe actual linking. This is deferred until someone wants to access\nthe content of the resource.",
"Tests that the area is valid geojson, the style ref is valid or null and the display is non-null.",
"Static method to convert a binary operator into a... |
public void update(int width, int height, int sampleCount) {
if (capturing) {
throw new IllegalStateException("Cannot update backing texture while capturing");
}
this.width = width;
this.height = height;
if (sampleCount == 0)
captureTexture = new GVRRend... | [
"Updates the backing render texture. This method should not\nbe called when capturing is in progress.\n\n@param width The width of the backing texture in pixels.\n@param height The height of the backing texture in pixels.\n@param sampleCount The MSAA sample count."
] | [
"Checks length and compare order of field names with declared PK fields in metadata.",
"Retrieves the content of the filename. Also reads from JAR Searches for the resource in the\nroot folder in the jar\n\n@param fileName Filename.\n@return The contents of the file.\n@throws IOException On error.",
"Use this A... |
private static int readDataBlock(String text, int offset, int length, List<byte[]> blocks)
{
int bytes = length / 2;
byte[] data = new byte[bytes];
for (int index = 0; index < bytes; index++)
{
data[index] = (byte) Integer.parseInt(text.substring(offset, offset + 2), 16);
o... | [
"Reads a data block and adds it to the list of blocks.\n\n@param text RTF data\n@param offset current offset\n@param length next block length\n@param blocks list of blocks\n@return next offset"
] | [
"Find the current active layout.\n\n@param phoenixProject phoenix project data\n@return current active layout",
"Use this API to fetch the statistics of all appfwprofile_stats resources that are configured on netscaler.",
"The parameter 'project' is not used at the moment, but will be used once schema and plugi... |
@SuppressWarnings("deprecation")
private static WriteConcern mergeWriteConcern(WriteConcern original, WriteConcern writeConcern) {
if ( original == null ) {
return writeConcern;
}
else if ( writeConcern == null ) {
return original;
}
else if ( original.equals( writeConcern ) ) {
return original;
}... | [
"As we merge several operations into one operation, we need to be sure the write concern applied to the aggregated\noperation respects all the requirements expressed for each separate operation.\n\nThus, for each parameter of the write concern, we keep the stricter one for the resulting merged write concern."
] | [
"Fetch the latest versions for cluster metadata",
"Sets the underlying read timeout in milliseconds.\nA value of 0 specifies an infinite timeout.\n@see okhttp3.OkHttpClient.Builder#readTimeout(long, TimeUnit)",
"Converts from RGB to Hexadecimal notation.",
"Create and serialize a WorkerStatus for a pause even... |
public static java.util.Date getDateTime(Object value) {
try {
return toDateTime(value);
} catch (ParseException pe) {
pe.printStackTrace();
return null;
}
} | [
"Convert an Object to a DateTime, without an Exception"
] | [
"Get the signatures that have been computed for all tracks currently loaded in any player for which we have\nbeen able to obtain all necessary metadata.\n\n@return the signatures that uniquely identify the tracks loaded in each player\n\n@throws IllegalStateException if the SignatureFinder is not running",
"Links... |
public String getWrappingHint(String fieldName) {
if (isEmpty()) {
return "";
}
return String.format(" You can use this expression: %s(%s(%s))",
formatMethod(wrappingMethodOwnerName, wrappingMethodName, ""),
formatMethod(copyMethodOwnerName, copyMetho... | [
"For given field name get the actual hint message"
] | [
"Checks if maintenance mode is enabled for the given app\n\n@param appName See {@link #listApps} for a list of apps that can be used.\n@return true if maintenance mode is enabled",
"This method is used by JNI, do not call or modify.\n\n@param type the type\n@param number the number",
"Adds a logical operator bl... |
public static nspbr6[] get(nitro_service service, nspbr6_args args) throws Exception{
nspbr6 obj = new nspbr6();
options option = new options();
option.set_args(nitro_util.object_to_string_withoutquotes(args));
nspbr6[] response = (nspbr6[])obj.get_resources(service, option);
return response;
} | [
"Use this API to fetch all the nspbr6 resources that are configured on netscaler.\nThis uses nspbr6_args which is a way to provide additional arguments while fetching the resources."
] | [
"Receive some bytes from the player we are requesting metadata from.\n\n@param is the input stream associated with the player metadata socket.\n@return the bytes read.\n\n@throws IOException if there is a problem reading the response",
"Converts a DTO attribute into a generic attribute object.\n\n@param attribute... |
public static void log(String label, String data)
{
if (LOG != null)
{
LOG.write(label);
LOG.write(": ");
LOG.println(data);
LOG.flush();
}
} | [
"Log a string.\n\n@param label label text\n@param data string data"
] | [
"Parse a string representation of a Boolean value.\n\n@param value string representation\n@return Boolean value",
"Create a Deliverable inside the database that will track a file created by a JobInstance Must be called from inside a transaction\n\n@param path\nFilePath (relative to a root directory - cf. Node)\n@... |
public <V> V attach(final AttachmentKey<V> key, final V value) {
assert key != null;
return key.cast(contextAttachments.put(key, value));
} | [
"Attaches an arbitrary object to this context.\n\n@param key they attachment key used to ensure uniqueness and used for retrieval of the value.\n@param value the value to store.\n@param <V> the value type of the attachment.\n\n@return the previous value associated with the key or {@code null} if there was no pr... | [
"Finish the oauth flow after the user was redirected back.\n\n@param code\nCode returned by the Eve Online SSO\n@param state\nThis should be some secret to prevent XRSF see\ngetAuthorizationUri\n@throws net.troja.eve.esi.ApiException",
"Function to filter files based on defined rules.",
"Read project calendars.... |
public void animate(float timeInSec)
{
GVRSkeleton skel = getSkeleton();
GVRPose pose = skel.getPose();
computePose(timeInSec,pose);
skel.poseToBones();
skel.updateBonePose();
skel.updateSkinPose();
} | [
"Compute pose of skeleton at the given time from the animation channels.\n@param timeInSec animation time in seconds."
] | [
"Reads a combined date and time value.\n\n@param data byte array of data\n@param offset location of data as offset into the array\n@return time value",
"Resolve temporary folder.",
"Reads characters until any 'end' character is encountered, ignoring\nescape sequences.\n\n@param out\nThe StringBuilder to write t... |
public static InternetPrintWriter createForEncoding(OutputStream outputStream, boolean autoFlush, Charset charset) {
return new InternetPrintWriter(new OutputStreamWriter(outputStream, charset), autoFlush);
} | [
"Creates a new InternetPrintWriter for given charset encoding.\n\n@param outputStream the wrapped output stream.\n@param charset the charset.\n@return a new InternetPrintWriter."
] | [
"Checks to see if all the diagonal elements in the matrix are positive.\n\n@param a A matrix. Not modified.\n@return true if all the diagonal elements are positive, false otherwise.",
"Sets the ssh priv key relative path.\nNote that must be relative path for now.\nThis default to no need of passphrase for the pr... |
public synchronized boolean put(byte value) {
if (available == capacity) {
return false;
}
buffer[idxPut] = value;
idxPut = (idxPut + 1) % capacity;
available++;
return true;
} | [
"Puts a single byte if the buffer is not yet full.\n\n@return true if the byte was put, or false if the buffer is full"
] | [
"Return the next word of the string, in other words it stops when a space is encountered.",
"Read a list of fixed sized blocks from the input stream.\n\n@return List of MapRow instances representing the fixed size blocks",
"On complete.\nSave response headers when needed.\n\n@param response\nthe response\n@retu... |
private void plan() {
// Mapping of stealer node to list of primary partitions being moved
final TreeMultimap<Integer, Integer> stealerToStolenPrimaryPartitions = TreeMultimap.create();
// Output initial and final cluster
if(outputDir != null)
RebalanceUtils.dumpClusters(cur... | [
"Create a plan. The plan consists of batches. Each batch involves the\nmovement of no more than batchSize primary partitions. The movement of a\nsingle primary partition may require migration of other n-ary replicas,\nand potentially deletions. Migrating a primary or n-ary partition\nrequires migrating one partitio... | [
"Convert weekly recurrence days into a bit field.\n\n@param task recurring task\n@return bit field as a string",
"Lookup an object via its name.\n@param name The name of an object.\n@return The object with that name.\n@exception ObjectNameNotFoundException There is no object with the specified name.\nObjectNameNo... |
private List<Row> getRows(String tableName, String columnName, Integer id)
{
List<Row> result;
List<Row> table = m_tables.get(tableName);
if (table == null)
{
result = Collections.<Row> emptyList();
}
else
{
if (columnName == null)
{
re... | [
"Filters a list of rows from the named table. If a column name and a value\nare supplied, then use this to filter the rows. If no column name is\nsupplied, then return all rows.\n\n@param tableName table name\n@param columnName filter column name\n@param id filter column value\n@return filtered list of rows"
] | [
"Use this API to unset the properties of gslbservice resources.\nProperties that need to be unset are specified in args array.",
"1-D Integer array to float array.\n\n@param array Integer array.\n@return Float array.",
"Closes the Netty Channel and releases all resources",
"Use this API to fetch a respondergl... |
private boolean costRateTableWriteRequired(CostRateTableEntry entry, Date from)
{
boolean fromDate = (DateHelper.compare(from, DateHelper.FIRST_DATE) > 0);
boolean toDate = (DateHelper.compare(entry.getEndDate(), DateHelper.LAST_DATE) > 0);
boolean costPerUse = (NumberHelper.getDouble(entry.getCost... | [
"This method determines whether the cost rate table should be written.\nA default cost rate table should not be written to the file.\n\n@param entry cost rate table entry\n@param from from date\n@return boolean flag"
] | [
"Reverse Engineers an XPath Expression of a given Node in the DOM.\n\n@param node the given node.\n@return string xpath expression (e.g., \"/html[1]/body[1]/div[3]\").",
"Sets the character translator.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param charTransla... |
public void copyTo(ColumnBuffer dest, LongPredicate timestampTest) {
dest.clear();
if (key != null) {
dest.key = new Key(key);
}
for (int i = 0; i < timeStamps.size(); i++) {
long time = timeStamps.get(i);
if (timestampTest.test(time)) {
dest.add(time, values.get(i));
}... | [
"Clears the dest ColumnBuffer and inserts all entries in dest where the timestamp passes the\ntimestampTest.\n\n@param dest Destination ColumnBuffer\n@param timestampTest Test to determine which timestamps get added to dest"
] | [
"Construct a Access Token from a Flickr Response.\n\n@param response",
"Get a bean from the application context. Returns null if the bean does not exist.\n@param name name of bean\n@param requiredType type of bean\n@return the bean or null",
"Checks the preconditions for creating a new LMinMax processor.\n\n@pa... |
public static protocolhttpband[] get(nitro_service service, protocolhttpband_args args) throws Exception{
protocolhttpband obj = new protocolhttpband();
options option = new options();
option.set_args(nitro_util.object_to_string_withoutquotes(args));
protocolhttpband[] response = (protocolhttpband[])obj.get_res... | [
"Use this API to fetch all the protocolhttpband resources that are configured on netscaler.\nThis uses protocolhttpband_args which is a way to provide additional arguments while fetching the resources."
] | [
"Use this API to fetch wisite_binding resources of given names .",
"This implementation does not support the 'offset' and 'maxResultSize' parameters.",
"Adds an additional site link to the constructed document.\n\n@param title\nthe title of the linked page\n@param siteKey\nidentifier of the site, e.g., \"enwiki... |
public static aaa_stats get(nitro_service service) throws Exception{
aaa_stats obj = new aaa_stats();
aaa_stats[] response = (aaa_stats[])obj.stat_resources(service);
return response[0];
} | [
"Use this API to fetch the statistics of all aaa_stats resources that are configured on netscaler."
] | [
"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 reset appfwlearningdata resources.",
"Set a knot color.\n@param n the knot index\n@param color the color",
"Generate... |
public static AnalysisResult fakeSuccess() {
return new AnalysisResult(null, new Extensions(Collections.emptyMap(), Collections.emptyMap(),
Collections.emptyMap(), Collections.emptyMap()));
} | [
"A factory method for users that need to report success without actually running any analysis. The returned\nresult will be successful, but will not contain the actual configurations of extensions.\n\n@return a \"fake\" successful analysis result"
] | [
"Processes the template for all index descriptors of the current class definition.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\n@doc.tag type=\"block\"",
"Update the anchor based on arcore... |
public void setKnots(int[] x, int[] rgb, byte[] types) {
numKnots = rgb.length+2;
xKnots = new int[numKnots];
yKnots = new int[numKnots];
knotTypes = new byte[numKnots];
if (x != null)
System.arraycopy(x, 0, xKnots, 1, numKnots-2);
else
for (int i = 1; i > numKnots-1; i++)
xKnots[i] = 255*i/(numKn... | [
"Set the values of all the knots.\nThis version does not require the \"extra\" knots at -1 and 256\n@param x the knot positions\n@param rgb the knot colors\n@param types the knot types"
] | [
"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",
"The normalized string returned by this method is consistent with java.net.Inet6address.\n\nIPs are not compressed nor mixed in this representation. If this has a prefi... |
public void setObjectForStatement(PreparedStatement ps, int index,
Object value, int sqlType) throws SQLException
{
if (sqlType == Types.TINYINT)
{
ps.setByte(index, ((Byte) value).byteValue());
}
else
{
s... | [
"Patch provided by Avril Kotzen (hi001@webmail.co.za)\nDB2 handles TINYINT (for mapping a byte)."
] | [
"Adds the contents of a Java package to this JAR.\n\n@param clazz a class whose package we wish to add to the JAR.\n@param filter a filter to select particular classes\n@return {@code this}",
"Move sections relative to each other in a board view. One of\n`before_section` or `after_section` is required.\n\nSectio... |
public static Class<?> resolveReturnType(Method method, Class<?> clazz) {
Assert.notNull(method, "Method must not be null");
Type genericType = method.getGenericReturnType();
Assert.notNull(clazz, "Class must not be null");
Map<TypeVariable, Type> typeVariableMap = getTypeVariableMap(clazz);
Type rawType = ge... | [
"Determine the target type for the generic return type of the given method,\nwhere formal type variables are declared on the given class.\n@param method the method to introspect\n@param clazz the class to resolve type variables against\n@return the corresponding generic parameter or return type\n@see #resolveReturn... | [
"Scans the given file looking for a complete zip file format end of central directory record.\n\n@param file the file\n\n@return true if a complete end of central directory record could be found\n\n@throws IOException",
"Compares current cluster with final cluster. Uses pertinent store defs\nfor each cluster to d... |
protected void rehash(int newCapacity) {
int oldCapacity = table.length;
//if (oldCapacity == newCapacity) return;
long oldTable[] = table;
int oldValues[] = values;
byte oldState[] = state;
long newTable[] = new long[newCapacity];
int newValues[] = new int[newCapacity];
byte newState[] = new byte[... | [
"Rehashes the contents of the receiver into a new table\nwith a smaller or larger capacity.\nThis method is called automatically when the\nnumber of keys in the receiver exceeds the high water mark or falls below the low water mark."
] | [
"Remove a part of a CharSequence by replacing the first occurrence\nof target within self with '' and returns the result.\n\n@param self a CharSequence\n@param target an object representing the part to remove\n@return a String containing the original minus the part to be removed\n@see #minus(String, Object)\n@sin... |
public static gslbservice_stats[] get(nitro_service service) throws Exception{
gslbservice_stats obj = new gslbservice_stats();
gslbservice_stats[] response = (gslbservice_stats[])obj.stat_resources(service);
return response;
} | [
"Use this API to fetch the statistics of all gslbservice_stats resources that are configured on netscaler."
] | [
"Drop down selected view\n\n@param position position of selected item\n@param convertView View of selected item\n@param parent parent of selected view\n@return convertView",
"Use this API to fetch filtered set of dbdbprofile resources.\nset the filter parameter values in filtervalue object.",
"Get a han... |
@SuppressWarnings("boxing")
public OAuth1Token getAccessToken(OAuth1RequestToken oAuthRequestToken, String verifier) {
OAuth10aService service = new ServiceBuilder(apiKey)
.apiSecret(sharedSecret)
.build(FlickrApi.instance());
// Flickr seems to return invalid ... | [
"Trade the request token for an access token, this is step three of authorization.\n@param oAuthRequestToken\nthis is the token returned by the {@link AuthInterface#getRequestToken} call.\n@param verifier"
] | [
"Changes to cluster OR store definition metadata results in routing\nstrategies changing. These changes need to be propagated to all the\nlisteners.\n\n@param cluster The updated cluster metadata\n@param storeDefs The updated list of store definition",
"Sets the set of language filters based on the given string.\... |
public static boolean setDefaultCustomResponse(String pathValue, String requestType, String customData) {
try {
JSONObject profile = getDefaultProfile();
String profileName = profile.getString("name");
PathValueClient client = new PathValueClient(profileName, false);
... | [
"Sets a custom response on an endpoint using default profile and client\n\n@param pathValue path (endpoint) value\n@param requestType path request type. \"GET\", \"POST\", etc\n@param customData custom response data\n@return true if success, false otherwise"
] | [
"Read assignment data.",
"Extract data for a single resource.\n\n@param row Synchro resource data",
"Use this API to delete sslfipskey of given name.",
"Retrieve a node list based on an XPath expression.\n\n@param document XML document to process\n@param expression compiled XPath expression\n@return node list... |
public static String replaceFullRequestContent(
String requestContentTemplate, String replacementString) {
return (requestContentTemplate.replace(
PcConstants.COMMAND_VAR_DEFAULT_REQUEST_CONTENT,
replacementString));
} | [
"Replace full request content.\n\n@param requestContentTemplate\nthe request content template\n@param replacementString\nthe replacement string\n@return the string"
] | [
"Extracts a flat set of interception bindings from a given set of interceptor bindings.\n\n@param addTopLevelInterceptorBindings add top level interceptor bindings to the result set.\n@param addInheritedInterceptorBindings add inherited level interceptor bindings to the result set.\n@return",
"This is pretty ugly... |
public static base_response unset(nitro_service client, responderpolicy resource, String[] args) throws Exception{
responderpolicy unsetresource = new responderpolicy();
unsetresource.name = resource.name;
return unsetresource.unset_resource(client,args);
} | [
"Use this API to unset the properties of responderpolicy resource.\nProperties that need to be unset are specified in args array."
] | [
"Image scale method\n@param imageToScale The image to be scaled\n@param dWidth Desired width, the new image object is created to this size\n@param dHeight Desired height, the new image object is created to this size\n@param fWidth What to multiply the width by. value < 1 scales down, and value > one scales up\n@par... |
public static void dumpClusters(Cluster currentCluster,
Cluster finalCluster,
String outputDirName,
String filePrefix) {
dumpClusterToFile(outputDirName, filePrefix + currentClusterFileName, currentCluste... | [
"Given the initial and final cluster dumps it into the output directory\n\n@param currentCluster Initial cluster metadata\n@param finalCluster Final cluster metadata\n@param outputDirName Output directory where to dump this file\n@param filePrefix String to prepend to the initial & final cluster\nmetadata files\n@t... | [
"Creates the JSON serialized form of the accessory for use over the Homekit Accessory Protocol.\n\n@param instanceId the static id of the accessory.\n@return a future that will complete with the JSON builder for the object.",
"Get the int resource id with specified type definition\n@param context\n@param id Strin... |
String getStatusHelp(CmsUser user, boolean disabled, boolean newUser) {
if (disabled) {
return CmsVaadinUtils.getMessageText(Messages.GUI_USERMANAGEMENT_USER_DISABLED_HELP_0);
}
if (newUser) {
return CmsVaadinUtils.getMessageText(Messages.GUI_USERMANAGEMENT_USER_INACTIVE... | [
"Returns status help message.\n\n@param user CmsUser\n@param disabled boolean\n@param newUser boolean\n@return String"
] | [
"determine the what state a transaction is in by inspecting the primary column",
"Enables or disables sound.\nWhen sound is disabled, nothing is played but the\naudio sources remain intact.\n@param flag true to enable sound, false to disable.",
"Whether the given column is part of this key family or not.\n\n@re... |
protected static Map<Double, Double> doQuantization(double max,
double min,
double[] values)
{
double range = max - min;
int noIntervals = 20;
double intervalSize = range / noInter... | [
"Convert the continuous values into discrete values by chopping up\nthe distribution into several equally-sized intervals."
] | [
"Sets the width and height of the canvas the text is drawn to.\n\n@param width\nwidth of the new canvas.\n\n@param height\nhegiht of the new canvas.",
"Parses command line arguments.\n\n@param args\nArray of arguments, like the ones provided by\n{@code void main(String[] args)}\n@param objs\nOne or more objects w... |
@Override
public void preStateCrawling(CrawlerContext context,
ImmutableList<CandidateElement> candidateElements, StateVertex state) {
LOG.debug("preStateCrawling");
List<CandidateElementPosition> newElements = Lists.newLinkedList();
LOG.info("Prestate found ... | [
"Logs all the canidate elements so that the plugin knows which elements were the candidate\nelements."
] | [
"Sets padding between the pages\n@param padding\n@param axis",
"Override this method to change the default splash screen size or\nposition.\n\nThis method will be called <em>before</em> {@link #onInit(GVRContext)\nonInit()} and before the normal render pipeline starts up. In particular,\nthis means that any {@lin... |
@SuppressWarnings("unchecked")
private void addPrivateFieldsAccessors(ClassNode node) {
Set<ASTNode> accessedFields = (Set<ASTNode>) node.getNodeMetaData(StaticTypesMarker.PV_FIELDS_ACCESS);
if (accessedFields==null) return;
Map<String, MethodNode> privateConstantAccessors = (Map<String, Met... | [
"Adds special accessors for private constants so that inner classes can retrieve them."
] | [
"Read properties from the raw header data.\n\n@param stream input stream",
"Opens the stream in a background thread.",
"Get the Avro Schema of the input path, assuming the path contains just one\nschema version in all files under that path.",
"Send a request that expects a single message as its response, then... |
public List<RoutableDestination<T>> getDestinations(String path) {
String cleanPath = (path.endsWith("/") && path.length() > 1)
? path.substring(0, path.length() - 1) : path;
List<RoutableDestination<T>> result = new ArrayList<>();
for (ImmutablePair<Pattern, RouteDestinationWithGroups> patternRout... | [
"Get a list of destinations and the values matching templated parameter for the given path.\nReturns an empty list when there are no destinations that are matched.\n\n@param path path to be routed.\n@return List of Destinations matching the given route."
] | [
"Packages of the specified classes will be scanned and found classes will be added to the set of bean classes for the synthetic bean archive.\n\n@param scanRecursively\n@param packageClasses\n@return self",
"We have more input since wait started",
"Computes the householder vector used in QR decomposition.\n\nu ... |
public void createTaskFieldMap(Props props)
{
byte[] fieldMapData = null;
for (Integer key : TASK_KEYS)
{
fieldMapData = props.getByteArray(key);
if (fieldMapData != null)
{
break;
}
}
if (fieldMapData == null)
{
populateDe... | [
"Creates a field map for tasks.\n\n@param props props data"
] | [
"Links the two field names into a single left.right field name.\nIf the left field is empty, right is returned\n\n@param left one field name\n@param right the other field name\n\n@return left.right or right if left is an empty string",
"Sort MapRows based on a named attribute.\n\n@param rows map rows to sort\n@pa... |
public static void pullImage(String imageTag, String username, String password, String host) throws IOException {
final AuthConfig authConfig = new AuthConfig();
authConfig.withUsername(username);
authConfig.withPassword(password);
DockerClient dockerClient = null;
try {
... | [
"Pull docker image using the docker java client.\n\n@param imageTag\n@param username\n@param password\n@param host"
] | [
"Creates a copy with verbose mode enabled.\n\n@param serverSetups the server setups.\n@return copies of server setups with verbose mode enabled.",
"Use this API to fetch nssimpleacl resources of given names .",
"Use this API to add authenticationradiusaction resources.",
"Returns the configured fields of the ... |
public String processNested(Properties attributes) throws XDocletException
{
String name = OjbMemberTagsHandler.getMemberName();
XClass type = OjbMemberTagsHandler.getMemberType();
int dim = OjbMemberTagsHandler.getMemberDimension();
NestedDef nestedD... | [
"Addes the current member as a nested object.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException If an error occurs\n@doc.tag type=\"content\""
] | [
"Returns a prefix length for which the range of this segment grouping matches the the block of addresses for that prefix.\n\nIf no such prefix exists, returns null\n\nIf this segment grouping represents a single value, returns the bit length\n\n@return the prefix length or null",
"Find the the qualfied container ... |
private void deleteBackups() {
File[] storeDirList = ReadOnlyUtils.getVersionDirs(storeDir, 0L, getCurrentVersionId());
if(storeDirList != null && storeDirList.length > (numBackups + 1)) {
// delete ALL old directories asynchronously
File[] extraBackups = ReadOnlyUtils.findKthVer... | [
"Delete all backups asynchronously"
] | [
"Delete a module from Grapes server\n\n@param name\n@param version\n@throws GrapesCommunicationException\n@throws javax.naming.AuthenticationException",
"Returns a client model from a ResultSet\n\n@param result resultset containing client information\n@return Client or null\n@throws Exception exception",
"A fin... |
public static Iterable<BoxCollection.Info> getAllCollections(final BoxAPIConnection api) {
return new Iterable<BoxCollection.Info>() {
public Iterator<BoxCollection.Info> iterator() {
URL url = GET_COLLECTIONS_URL_TEMPLATE.build(api.getBaseURL());
return new BoxCollec... | [
"Gets an iterable of all the collections for the given user.\n@param api the API connection to be used when retrieving the collections.\n@return an iterable containing info about all the collections."
] | [
"Translate the string to bytes using the given encoding\n\n@param string The string to translate\n@param encoding The encoding to use\n@return The bytes that make up the string",
"Get the filters ImporterServiceFilter and ImportDeclarationFilter from the properties, stop the instance if one of.\nthem is invalid."... |
public synchronized final void closeStream() {
try {
if ((stream != null) && (streamState == StreamStates.OPEN)) {
stream.close();
stream = null;
}
streamState = StreamStates.CLOSED;
} catch (IOException e) {
e.printStackTra... | [
"Close the open stream.\n\nClose the stream if it was opened before"
] | [
"This method is used to configure the primary and alternative\nformat patterns.\n\n@param primaryPattern new format pattern\n@param alternativePatterns alternative format patterns\n@param decimalSeparator Locale specific decimal separator to replace placeholder\n@param groupingSeparator Locale specific grouping sep... |
private void rotatorPushRight2( int m , int offset)
{
double b11 = bulge;
double b12 = diag[m+offset];
computeRotator(b12,-b11);
diag[m+offset] = b12*c-b11*s;
if( m+offset<N-1) {
double b22 = off[m+offset];
off[m+offset] = b22*c;
bulge =... | [
"Used to finish up pushing the bulge off the matrix."
] | [
"Searches the type and its sub types for the nearest ojb-persistent type and returns its name.\n\n@param type The type to search\n@return The qualified name of the found type or <code>null</code> if no type has been found",
"Registers the transformers for JBoss EAP 7.0.0.\n\n@param subsystemRegistration con... |
public int getMinutesPerYear()
{
return m_minutesPerYear == null ? NumberHelper.getInt(getParentFile().getProjectProperties().getMinutesPerYear()) : m_minutesPerYear.intValue();
} | [
"Retrieve the number of minutes per year for this calendar.\n\n@return minutes per year"
] | [
"Merge two ExecutionStatistics into one. This method is private in order not to be synchronized (merging.\n@param otherStatistics",
"Computes the final list of versions to be stored, on top of what is\ncurrently being stored. Final list is valuesInStorage modified in place\n\n\n@param valuesInStorage list of vers... |
public void notifySubscriberCallback(ContentNotification cn) {
String content = fetchContentFromPublisher(cn);
distributeContentToSubscribers(content, cn.getUrl());
} | [
"Output method responsible for sending the updated content to the Subscribers.\n\n@param cn"
] | [
"Synthesize and forward a KeyEvent to the library.\n\nThis call is made from the native layer.\n\n@param code id of the button\n@param action integer representing the action taken on the button",
"Saves messages to a xmlvfsbundle file.\n\n@throws CmsException thrown if writing to the file fails.",
"Get a hand... |
private String pathToProperty(String path) {
if (path == null || !path.startsWith("/")) {
throw new IllegalArgumentException("Path must be prefixed with a \"/\".");
}
return path.substring(1);
} | [
"Converts a JSON patch path to a JSON property name.\nCurrently the metadata API only supports flat maps.\n@param path the path that designates the key. Must be prefixed with a \"/\".\n@return the JSON property name."
] | [
"Use this API to fetch a vpnglobal_vpntrafficpolicy_binding resources.",
"Returns the list of colliders attached to scene objects that are\nvisible from the viewpoint of the camera.\n\n<p>\nThis method is thread safe because it guarantees that only\none thread at a time is picking against particular scene graph,\... |
public static base_response update(nitro_service client, nsip6 resource) throws Exception {
nsip6 updateresource = new nsip6();
updateresource.ipv6address = resource.ipv6address;
updateresource.td = resource.td;
updateresource.nd = resource.nd;
updateresource.icmp = resource.icmp;
updateresource.vserver = r... | [
"Use this API to update nsip6."
] | [
"Returns the command to run by the shell to normally run the checkin script.\n@return the command to run by the shell to normally run the checkin script.",
"Gets the index to use in the search.\n\n@return the index to use in the search",
"Wrap a simple attribute def as list.\n\n@param def the attribute definit... |
void awaitStabilityUninterruptibly(long timeout, TimeUnit timeUnit) throws TimeoutException {
boolean interrupted = false;
try {
long toWait = timeUnit.toMillis(timeout);
long msTimeout = System.currentTimeMillis() + toWait;
while (true) {
if (interrup... | [
"Await service container stability ignoring thread interruption.\n\n@param timeout maximum period to wait for service container stability\n@param timeUnit unit in which {@code timeout} is expressed\n\n@throws java.util.concurrent.TimeoutException if service container stability is not reached before the specified ti... | [
"Performs a standard QR decomposition on the specified submatrix that is one block wide.\n\n@param blockLength\n@param Y\n@param gamma",
"Start unmarshalling using the parser.\n@param parser\n@param preProcessingData\n@return the root element of a bpmn2 document.\n@throws java.io.IOException",
"Creates a color ... |
public static boolean isInSubDirectory(File dir, File file)
{
if (file == null)
return false;
if (file.equals(dir))
return true;
return isInSubDirectory(dir, file.getParentFile());
} | [
"Returns true if \"file\" is a subfile or subdirectory of \"dir\".\n\nFor example with the directory /path/to/a, the following return values would occur:\n\n/path/to/a/foo.txt - true /path/to/a/bar/zoo/boo/team.txt - true /path/to/b/foo.txt - false"
] | [
"Get global hotkey provider for current platform\n\n@param useSwingEventQueue whether the provider should be using Swing Event queue or a regular thread\n@return new instance of Provider, or null if platform is not supported\n@see X11Provider\n@see WindowsProvider\n@see CarbonProvider",
"Generate the specified ou... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.