query
stringlengths
74
6.1k
positive
listlengths
1
1
negative
listlengths
9
9
protected T checkReturnValue(T instance) { if (instance == null && !isDependent()) { throw BeanLogger.LOG.nullNotAllowedFromProducer(getProducer(), Formats.formatAsStackTraceElement(getAnnotated().getJavaMember())); } if (instance == null) { InjectionPoint injectionPoint ...
[ "Validates the return value\n\n@param instance The instance to validate" ]
[ "Get the Query Paramaters to be used for search request.\n@return this.QueryStringBuilder.", "Try to build an default PBKey for convenience PB create method.\n\n@return PBKey or <code>null</code> if default key was not declared in\nmetadata", "Cancels all the pending & running requests and releases all the disp...
public static void endThreads(String check){ //(error check) if(currentThread != -1L){ throw new IllegalStateException("endThreads() called, but thread " + currentThread + " has not finished (exception in thread?)"); } //(end threaded environment) assert !control.isHeldByCurrentThread();...
[ "Signal that all threads have run to completion, and the multithreaded\nenvironment is over.\n@param check The name of the thread group passed to startThreads()" ]
[ "Computes the distance from a point p to the plane of this face.\n\n@param p\nthe point\n@return distance from the point to the plane", "Support the subscript operator for CharSequence.\n\n@param text a CharSequence\n@param index the index of the Character to get\n@return the Character at the given index\n@since...
public List<ModelNode> getAllowedValues() { if (allowedValues == null) { return Collections.emptyList(); } return Arrays.asList(this.allowedValues); }
[ "returns array with all allowed values\n@return allowed values" ]
[ "Returns a set that contains all the unique entries of the given iterator in the order of their appearance.\nThe result set is a copy of the iterator with stable order.\n\n@param iterator\nthe iterator. May not be <code>null</code>.\n@return a set with the unique entries of the given iterator. Never <code>null</cod...
public static AdminClient getAdminClient(String url) { ClientConfig config = new ClientConfig().setBootstrapUrls(url) .setConnectionTimeout(5, TimeUnit.SECONDS); AdminClientConfig adminConfig = new AdminClientConfig().setAdminSocketTimeoutSec(5); ...
[ "Utility function that constructs AdminClient.\n\n@param url URL pointing to the bootstrap node\n@return Newly constructed AdminClient" ]
[ "Helper xml end tag writer\n\n@param value the output stream to use in writing", "A henson navigator is a class that helps a consumer to consume the navigation api that it\ndeclares in its dependencies. The henson navigator will wrap the intent builders. Thus, a\nhenson navigator, is driven by consumption of inte...
private void ensureCollectionClass(CollectionDescriptorDef collDef, String checkLevel) throws ConstraintException { if (CHECKLEVEL_NONE.equals(checkLevel)) { return; } if (collDef.hasProperty(PropertyHelper.OJB_PROPERTY_ARRAY_ELEMENT_CLASS_REF)) { ...
[ "Ensures that the given collection descriptor has the collection-class property if necessary.\n\n@param collDef The collection descriptor\n@param checkLevel The current check level (this constraint is checked in basic (partly) and strict)\n@exception ConstraintException If collection-class is given for an array ...
[ "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", "Notification that the configuration has been written, and its current content should be stored to the .last file", "Checks if is file exist.\n\n@param filePath\nthe f...
protected void threadWatch(final ConnectionHandle c) { this.threadFinalizableRefs.put(c, new FinalizableWeakReference<Thread>(Thread.currentThread(), this.finalizableRefQueue) { public void finalizeReferent() { try { if (!CachedConnectionStrategy.this.pool.poolShuttingDown){ logger.debug("Mo...
[ "Keep track of this handle tied to which thread so that if the thread is terminated\nwe can reclaim our connection handle. We also\n@param c connection handle to track." ]
[ "Shortcut for mapping an arbitrary observable to void, using the IO scheduler.\n@param fromObservable the source observable\n@return a void-emitting observable", "Gets a JavaMail Session for given server type such as IMAP and additional props for JavaMail.\n\n@param setup the setup type, such as <code>ServerS...
public ItemRequest<Task> addFollowers(String task) { String path = String.format("/tasks/%s/addFollowers", task); return new ItemRequest<Task>(this, Task.class, path, "POST"); }
[ "Adds each of the specified followers to the task, if they are not already\nfollowing. Returns the complete, updated record for the affected task.\n\n@param task The task to add followers to.\n@return Request object" ]
[ "Compare an array of bytes with a subsection of a larger array of bytes.\n\n@param lhs small array of bytes\n@param rhs large array of bytes\n@param rhsOffset offset into larger array of bytes\n@return true if a match is found", "Start the socket server and waiting for finished\n\n@throws InterruptedException thr...
public void setRegistrationConfig(RegistrationConfig registrationConfig) { this.registrationConfig = registrationConfig; if (registrationConfig.getDefaultConfig()!=null) { for (String key : registrationConfig.getDefaultConfig().keySet()) { dynamicConfig.put(key, registration...
[ "The mediator registration config. If it contains default config and definitions,\nthen the dynamic config will be initialized with those values.\n\n@see org.openhim.mediator.engine.RegistrationConfig\n@see #getDynamicConfig()" ]
[ "Use this API to update snmpmanager.", "Return as a string the tagged values associated with c\n@param opt the Options used to guess font names\n@param c the Doc entry to look for @tagvalue\n@param prevterm the termination string for the previous element\n@param term the termination character for each tagged valu...
boolean undoChanges() { final State state = stateUpdater.getAndSet(this, State.ROLLBACK_ONLY); if (state == State.COMPLETED || state == State.ROLLBACK_ONLY) { // Was actually completed already return false; } PatchingTaskContext.Mode currentMode = this.mode; ...
[ "Internally undo recorded changes we did so far.\n\n@return whether the state required undo actions" ]
[ "Build data model for serialization.", "Renders a given graphic into a new image, scaled to fit the new size and rotated.", "If the resource has ordered child types, those child types will be stored in the attachment. If there are no\nordered child types, this method is a no-op.\n\n@param resourceAddress the ad...
public static int optionLength(String option) { int result = Standard.optionLength(option); if (result != 0) return result; else return UmlGraph.optionLength(option); }
[ "Option check, forwards options to the standard doclet, if that one refuses them,\nthey are sent to UmlGraph" ]
[ "Find a node in the tree. The node must be \"visible\" to be found.\n@param address The full address of the node matching ManagementModelNode.addressPath()\n@return The node, or null if not found.", "Returns the index of the eigenvalue which has the largest magnitude.\n\n@return index of the largest magnitude ei...
public PhotoContext getContext(String photoId) throws FlickrException { Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("method", METHOD_GET_CONTEXT); parameters.put("photo_id", photoId); Response response = transport.get(transport.getPath(), parame...
[ "Get the context for the specified photo.\n\nThis method does not require authentication.\n\n@param photoId\nThe photo ID\n@return The PhotoContext\n@throws FlickrException" ]
[ "Returns the AirMapView implementation as requested by the mapType argument. Use this method if\nyou need to request a specific AirMapView implementation that is not necessarily the preferred\ntype. For example, you can use it to explicit request a web-based map implementation.\n\n@param mapType Map type for the re...
public static float gain(float a, float b) { /* float p = (float)Math.log(1.0 - b) / (float)Math.log(0.5); if (a < .001) return 0.0f; else if (a > .999) return 1.0f; if (a < 0.5) return (float)Math.pow(2 * a, p) / 2; else return 1.0f - (float)Math.pow(2 * (1. - a), p) / 2; */ float c = (1.0f/b-...
[ "A variant of the gamma function.\n@param a the number to apply gain to\n@param b the gain parameter. 0.5 means no change, smaller values reduce gain, larger values increase gain.\n@return the output value" ]
[ "Converts the given hash code into an index into the\nhash table.", "Send a track metadata update announcement to all registered listeners.", "See page 385 of Fundamentals of Matrix Computations 2nd", "Clears the handler hierarchy.", "Used only for unit testing. Please do not use this method in other ways.\...
public void openBlockingInterruptable() throws InterruptedException { // We need to thread this call in order to interrupt it (when Ctrl-C occurs). connectionThread = new Thread(() -> { // This thread can't be interrupted from another thread. // Wi...
[ "Required to close the connection reading on the terminal, otherwise\nit can't be interrupted.\n\n@throws InterruptedException" ]
[ "It will look for all the deployments under the deploymentsRootAddress with a runtimeName in the specified list of\nruntime names and then transform the operation so that every server having those deployments will redeploy the\naffected deployments.\n\n@see #transformOperation\n@param removeOperation\n@param contex...
private boolean canSuccessorProceed() { if (predecessor != null && !predecessor.canSuccessorProceed()) { return false; } synchronized (this) { while (responseCount < groups.size()) { try { wait(); } catch (InterruptedE...
[ "Check from another ConcurrentGroupServerUpdatePolicy whose plans are meant to\nexecute once this policy's plans are successfully completed.\n\n@return <code>true</code> if the successor can proceed" ]
[ "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", "Get the MVT type mapping for the provided JTS Geometry.\n\n@param geometry JTS Geometry to get MVT type for\n@return MVT type for the given JTS Geometry, may r...
public double[] getZeroRates(double[] maturities) { double[] values = new double[maturities.length]; for(int i=0; i<maturities.length; i++) { values[i] = getZeroRate(maturities[i]); } return values; }
[ "Returns the zero rates for a given vector maturities.\n\n@param maturities The given maturities.\n@return The zero rates." ]
[ "Put new sequence object for given sequence name.\n@param sequenceName Name of the sequence.\n@param seq The sequence object to add.", "returns a sorted array of nested classes and interfaces", "Resize picture to desired size.\n\n@param width Desired width.\n@param height Desired height.\n@throws IllegalArgumen...
public Mapping<T> addFields() { if (idColumn == null) { throw new RuntimeException("Map ID column before adding class fields"); } for (Field f : ReflectionUtils.getDeclaredFieldsInHierarchy(clazz)) { if (!Modifier.isStatic(f.getModifiers()) && !isFie...
[ "Adds mappings for each declared field in the mapped class. Any fields\nalready mapped by addColumn are skipped." ]
[ "get an AdminClient from the cache if exists, if not create new one\nand return it. This method is non-blocking.\n\nAll AdminClient returned from checkout, once after the completion of\nusage must be returned to the pool by calling checkin. If not,\nthere will be leak of AdminClients (connections, threads and file ...
private void writeTasks() throws JAXBException { Tasks tasks = m_factory.createTasks(); m_plannerProject.setTasks(tasks); List<net.sf.mpxj.planner.schema.Task> taskList = tasks.getTask(); for (Task task : m_projectFile.getChildTasks()) { writeTask(task, taskList); } }
[ "This method writes task data to a Planner file.\n\n@throws JAXBException on xml creation errors" ]
[ "Recursively loads the metadata for this node", "Used to add exceptions to the calendar. The MPX standard defines\na limit of 250 exceptions per calendar.\n\n@param fromDate exception start date\n@param toDate exception end date\n@return ProjectCalendarException instance", "Use this API to fetch vpntrafficpolic...
public String getOriginalValue(ParsedCommandLine parsedLine, boolean required) throws CommandFormatException { String value = null; if(parsedLine.hasProperties()) { if(index >= 0) { List<String> others = parsedLine.getOtherProperties(); if(others.size() > inde...
[ "Returns value as it appeared on the command line with escape sequences\nand system properties not resolved. The variables, though, are resolved\nduring the initial parsing of the command line.\n\n@param parsedLine parsed command line\n@param required whether the argument is required\n@return argument value as i...
[ "Set the inner angle of the spotlight cone in degrees.\n\nBeyond the outer cone angle there is no illumination.\nThe underlying uniform \"outer_cone_angle\" is the cosine\nof this input angle. If the inner cone angle is larger than the outer cone angle\nthere will be unexpected results.\n@see #setInnerConeAngle(flo...
synchronized public void completeTask(int taskId, int partitionStoresMigrated) { tasksInFlight.remove(taskId); numTasksCompleted++; numPartitionStoresMigrated += partitionStoresMigrated; updateProgressBar(); }
[ "Called whenever a rebalance task completes. This means one task is done\nand some number of partition stores have been migrated.\n\n@param taskId\n@param partitionStoresMigrated Number of partition stores moved by this\ncompleted task." ]
[ "Use this API to add sslcipher resources.", "main class entry point.", "Read the leaf tasks for an individual WBS node.\n\n@param parent parent task\n@param id first task ID", "Detach a scope from its parent, this will trigger the garbage collection of this scope and it's\nsub-scopes\nif they are not referenc...
public static boolean respondsTo(Object object, String methodName) { MetaClass metaClass = DefaultGroovyMethods.getMetaClass(object); if (!metaClass.respondsTo(object, methodName).isEmpty()) { return true; } Map properties = DefaultGroovyMethods.getProperties(object); ...
[ "Return true only if the specified object responds to the named method\n@param object - the object to check\n@param methodName - the name of the method\n@return true if the object responds to the named method" ]
[ "Helper to read an optional String value.\n@param path The XML path of the element to read.\n@return The String value stored in the XML, or <code>null</code> if the value could not be read.", "Handle http Request.\n\n@param request HttpRequest to be handled.\n@param responder HttpResponder to write the response....
protected void handleParentheses( TokenList tokens, Sequence sequence ) { // have a list to handle embedded parentheses, e.g. (((((a))))) List<TokenList.Token> left = new ArrayList<TokenList.Token>(); // find all of them TokenList.Token t = tokens.first; while( t != null ) { ...
[ "Searches for pairs of parentheses and processes blocks inside of them. Embedded parentheses are handled\nwith no problem. On output only a single token should be in tokens.\n@param tokens List of parsed tokens\n@param sequence Sequence of operators" ]
[ "Sets whether an individual list value is selected.\n\n@param value the value of the item to be selected or unselected\n@param selected <code>true</code> to select the item", "Process the set of activities from the Phoenix file.\n\n@param phoenixProject project data", "Produces an IPv4 address section from a...
public static List<DockerImage> getImagesByBuildId(int buildInfoId) { List<DockerImage> list = new ArrayList<DockerImage>(); Iterator<DockerImage> it = images.iterator(); while (it.hasNext()) { DockerImage image = it.next(); if (image.getBuildInfoId() == buildInfoId && im...
[ "Gets a list of registered docker images from the images cache, if it has been\nregistered to the cache for a specific build-info ID and if a docker manifest has been captured for it\nby the build-info proxy.\n@param buildInfoId\n@return" ]
[ "Mark the given child resource as the post run dependent of the parent of this collection.\n\n@param childResource the child resource", "Given a partition ID, determine which replica of this partition is hosted by the\ncurrent node, if any.\n\nNote: This is an implementation detail of the READONLY_V2 naming schem...
public void addInterface(Class<?> newInterface) { if (!newInterface.isInterface()) { throw new IllegalArgumentException(newInterface + " is not an interface"); } additionalInterfaces.add(newInterface); }
[ "Adds an additional interface that the proxy should implement. The default\nimplementation will be to forward invocations to the bean instance.\n\n@param newInterface an interface" ]
[ "For recovery from the latest consistent snapshot, we should clean up the\nold files from the previous backup set, else we will fill the disk with\nuseless log files\n\n@param backupDir", "Reads the entity hosting the association from the datastore and applies any property changes from the server\nside.", "Comp...
private void lockDescriptor() throws CmsException { if ((null == m_descFile) && (null != m_desc)) { m_descFile = LockedFile.lockResource(m_cms, m_desc); } }
[ "Locks the bundle descriptor.\n@throws CmsException thrown if locking fails." ]
[ "don't run on main thread", "Starts the ephemeral node and waits for it to be created\n\n@param node Node to start\n@param maxWaitSec Maximum time in seconds to wait", "A disposer method is bound to a producer if the producer is assignable to the disposed parameter.\n\n@param enhancedDisposedParameter\n@return ...
public static nsrollbackcmd[] get(nitro_service service, nsrollbackcmd_args args) throws Exception{ nsrollbackcmd obj = new nsrollbackcmd(); options option = new options(); option.set_args(nitro_util.object_to_string_withoutquotes(args)); nsrollbackcmd[] response = (nsrollbackcmd[])obj.get_resources(service, op...
[ "Use this API to fetch all the nsrollbackcmd resources that are configured on netscaler.\nThis uses nsrollbackcmd_args which is a way to provide additional arguments while fetching the resources." ]
[ "Clear all beans and call the destruction callback.", "Locates the services in the context classloader of the current thread.\n\n@param serviceType the type of the services to locate\n@param <X> the type of the service\n@return the service type loader", "Execute a HTTP request and handle common error cases.\n\n...
private void populateMetaData() throws SQLException { m_meta.clear(); ResultSetMetaData meta = m_rs.getMetaData(); int columnCount = meta.getColumnCount() + 1; for (int loop = 1; loop < columnCount; loop++) { String name = meta.getColumnName(loop); Integer type = Inte...
[ "Retrieves basic meta data from the result set.\n\n@throws SQLException" ]
[ "Gets a SerialMessage with the SENSOR_ALARM_GET command\n@return the serial message", "Modifier method to set the unique ID of this calendar.\n\n@param uniqueID unique identifier", "Returns an integer array that contains the current values for all the\ntexture parameters.\n\n@return an integer array that contai...
WaveformPreview getWaveformPreview(int rekordboxId, SlotReference slot, Client client) throws IOException { final NumberField idField = new NumberField(rekordboxId); // First try to get the NXS2-style color waveform if we are supposed to. if (preferColor.get()) { try { ...
[ "Requests the waveform preview for a specific track ID, given a connection to a player that has already been\nset up.\n\n@param rekordboxId the track whose waveform preview is desired\n@param slot identifies the media slot we are querying\n@param client the dbserver client that is communicating with the appropriate...
[ "Checks the initialization-method of given class descriptor.\n\n@param classDef The class descriptor\n@param checkLevel The current check level (this constraint is only checked in strict)\n@exception ConstraintException If the constraint has been violated", "Chooses a single segment to be compressed, or null if...
private static List<Path> expandMultiAppInputDirs(List<Path> input) { List<Path> expanded = new LinkedList<>(); for (Path path : input) { if (Files.isRegularFile(path)) { expanded.add(path); continue; } if (!File...
[ "Expands the directories from the given list and and returns a list of subfiles.\nFiles from the original list are kept as is." ]
[ "Returns new boolean matrix with true or false values selected with equal probability.\n\n@param numRow Number of rows in the new matrix.\n@param numCol Number of columns in the new matrix.\n@param rand Random number generator used to fill the matrix.\n@return The randomly generated matrix.", "Release the broker ...
public Class getSearchClass() { Object obj = getExampleObject(); if (obj instanceof Identity) { return ((Identity) obj).getObjectsTopLevelClass(); } else { return obj.getClass(); } }
[ "Answer the search class.\nThis is the class of the example object or\nthe class represented by Identity.\n@return Class" ]
[ "This is needed when running on slaves.", "Instantiates the templates specified by @Template within @Templates", "Constructs the convex hull of a set of points.\n\n@param points\ninput points\n@param nump\nnumber of input points\n@throws IllegalArgumentException\nthe number of input points is less than four or ...
public static String formatTimeISO8601(TimeValue value) { StringBuilder builder = new StringBuilder(); DecimalFormat yearForm = new DecimalFormat(FORMAT_YEAR); DecimalFormat timeForm = new DecimalFormat(FORMAT_OTHER); if (value.getYear() > 0) { builder.append("+"); } builder.append(yearForm.format(value....
[ "Returns a representation of the date from the value attributes as ISO\n8601 encoding.\n\n@param value\n@return ISO 8601 value (String)" ]
[ "Recursively scan the provided path and return a list of all Java packages contained therein.", "Converts days of the week into a bit field.\n\n@param data recurring data\n@return bit field", "generate a select-Statement according to query\n\n@param query the Query\n@param cld the ClassDescriptor", "Use this ...
private void addErrorCorrection(StringBuilder adjustedString, int codewordSize, int dataBlocks, int eccBlocks) { int x, poly, startWeight; /* Split into codewords and calculate Reed-Solomon error correction codes */ switch (codewordSize) { case 6: x = 32; ...
[ "Adds error correction data to the specified binary string, which already contains the primary data" ]
[ "Adds a file to your assembly but automatically genarates the name of the file.\n\n@param inputStream {@link InputStream} the file to be uploaded.", "Exit reporting up to distributor, using information gained from status reports to the LineCountManager\n\n@return a boolean of whether this consumer should immediat...
public MaterializeBuilder withActivity(Activity activity) { this.mRootView = (ViewGroup) activity.findViewById(android.R.id.content); this.mActivity = activity; return this; }
[ "Pass the activity you use the drawer in ;)\nThis is required if you want to set any values by resource\n\n@param activity\n@return" ]
[ "Generates a schedule based on some meta data. The schedule generation\nconsiders short periods. Date rolling is ignored.\n\n@param referenceDate The date which is used in the schedule to internally convert dates to doubles, i.e., the date where t=0.\n@param startDate The start date of the first period.\n@param fre...
public Jar setListAttribute(String name, Collection<?> values) { return setAttribute(name, join(values)); }
[ "Sets an attribute in the main section of the manifest to a list.\nThe list elements will be joined with a single whitespace character.\n\n@param name the attribute's name\n@param values the attribute's value\n@return {@code this}\n@throws IllegalStateException if entries have been added or the JAR has been writt...
[ "Read an optional boolean value form a JSON value.\n@param val the JSON value that should represent the boolean.\n@return the boolean from the JSON or null if reading the boolean fails.", "Returns a name for the principal based upon one of the attributes\nof the main CommonProfile. The attribute name used to que...
public static String toJson(Date date) { if (date == null) { return NULL_VALUE; } CharBuf buffer = CharBuf.create(26); writeDate(date, buffer); return buffer.toString(); }
[ "Format a date that is parseable from JavaScript, according to ISO-8601.\n\n@param date the date to format to a JSON string\n@return a formatted date in the form of a string" ]
[ "Adds the complex number with a scalar value.\n\n@param z1 Complex Number.\n@param scalar Scalar value.\n@return Returns new ComplexNumber instance containing the add of specified complex number with scalar value.", "Gets fully-qualified name of a table or sequence.\n\n@param localName local table name.\n@par...
public static String nextWord(String string) { int index = 0; while (index < string.length() && !Character.isWhitespace(string.charAt(index))) { index++; } return string.substring(0, index); }
[ "Return the next word of the string, in other words it stops when a space is encountered." ]
[ "Finds an ancestor of a specific type, if possible.\n\n<p>Example: (New York city target, {@link Type#COUNTRY}) returns (US country target)", "Use this API to Import sslfipskey resources.", "Use this API to unset the properties of lbsipparameters resource.\nProperties that need to be unset are specified in args...
public void deleteObject(Object object) { PersistenceBroker broker = null; try { broker = getBroker(); broker.delete(object); } finally { if (broker != null) broker.close(); } }
[ "Delete an object." ]
[ "Shut down the input manager.\n\nAfter this call, GearVRf will not be able to access IO devices.", "Finish initialization of state object.\n\n@param geoService geo service\n@param converterService converter service\n@throws GeomajasException oops", "change server state between OFFLINE_SERVER and NORMAL_SERVER\n...
public WebSocketContext sendJsonToUser(Object data, String username) { return sendToTagged(JSON.toJSONString(data), username); }
[ "Send JSON representation of a data object to all connections of a certain user\n\n@param data the data to be sent\n@param username the username\n@return this context" ]
[ "Method used to write the name of the scenarios\n\n@param word\n@return the same word starting with capital letter", "Simple, high-level API to enable or disable eye picking for this scene\nobject.\n\nThe {@linkplain #attachCollider low-level\nAPI} gives you a lot of control over eye picking, but it does involve ...
public static List<ClassReference> analyze(WildcardImportResolver importResolver, Set<String> libraryPaths, Set<String> sourcePaths, Path sourceFile) { ASTParser parser = ASTParser.newParser(AST.JLS11); parser.setEnvironment(libraryPaths.toArray(new String[libraryPaths.size()]), sour...
[ "Parses the provided file, using the given libraryPaths and sourcePaths as context. The libraries may be either\njar files or references to directories containing class files.\n\nThe sourcePaths must be a reference to the top level directory for sources (eg, for a file\nsrc/main/java/org/example/Foo.java, the sourc...
[ "a small static helper to set the color to a GradientDrawable null save\n\n@param colorHolder\n@param ctx\n@param gradientDrawable", "Pause the current entry point, and invoke the provided listener when all current requests have finished.\n\nIf individual control point tracking is not enabled then the listener wi...
public static String subscriptionFromResourceId(String id) { return (id != null) ? ResourceId.fromString(id).subscriptionId() : null; }
[ "Extract the subscription ID from a resource ID string.\n@param id the resource ID string\n@return the subscription ID" ]
[ "We have identified that we have a SQLite file. This could be a Primavera Project database\nor an Asta database. Open the database and use the table names present to determine\nwhich type this is.\n\n@param stream schedule data\n@return ProjectFile instance", "Set a range of the colormap to a single color.\n@para...
public double distanceFrom(LatLong end) { double dLat = (end.getLatitude() - getLatitude()) * Math.PI / 180; double dLon = (end.getLongitude() - getLongitude()) * Math.PI / 180; double a = Math.sin(dLat / 2) * Math.sin(dLat / 2) + Math.cos(getLatitude() * Math.PI / 180) ...
[ "From v3_epoly.js, calculates the distance between this LatLong point and\nanother.\n\n@param end The end point to calculate the distance to.\n@return The distance, in metres, to the end point." ]
[ "Deserializes a variable, checking whether the datatype is custom or not\n@param s\n@param variableType\n@param dataTypes\n@return", "Sets the distance from the origin to the far clipping plane for the\nwhole camera rig.\n\n@param far\nDistance to the far clipping plane.", "True if deleted, false if not found."...
public boolean hasRequiredMiniFluoProps() { boolean valid = true; if (getMiniStartAccumulo()) { // ensure that client properties are not set since we are using MiniAccumulo valid &= verifyStringPropNotSet(ACCUMULO_USER_PROP, CLIENT_ACCUMULO_USER_PROP); valid &= verifyStringPropNotSet(ACCUMULO_...
[ "Returns true if required properties for MiniFluo are set" ]
[ "Creates an InputObjectStream and an OutputObjectStream from a Socket, and\npasses them to the closure. The streams will be closed after the closure\nreturns, even if an exception is thrown.\n\n@param socket this Socket\n@param closure a Closure\n@return the value returned by the closure\n@throws IOException if a...
public static String stringifyJavascriptObject(Object object) { StringBuilder bld = new StringBuilder(); stringify(object, bld); return bld.toString(); }
[ "Converts the provided javascript object to JSON string.\n\n<p>If the object is a Map instance, it is stringified as key-value pairs, if it is a list, it is stringified as\na list, otherwise the object is merely converted to string using the {@code toString()} method.\n\n@param object the object to stringify.\n\n@r...
[ "Translate the operation address.\n\n@param op the operation\n@return the new operation", "Retrieve the state object associated with the specified interceptor instance and property\nname on this request context.\n\n@param interceptor the interceptor instance\n@param stateName the name key that the state object ...
public double getValueAsPrice(double evaluationTime, AnalyticModel model) { ForwardCurve forwardCurve = model.getForwardCurve(forwardCurveName); DiscountCurve discountCurve = model.getDiscountCurve(discountCurveName); DiscountCurve discountCurveForForward = null; if(forwardCurve == null && forwardCurveName != ...
[ "Returns the value of this product under the given model.\n\n@param evaluationTime Evaluation time.\n@param model The model.\n@return Value of this product und the given model." ]
[ "Use this API to delete route6.", "Add a dependency to this node.\n\n@param node the dependency to add.", "Read the relationships for an individual GanttProject task.\n\n@param gpTask GanttProject task", "Update the background color of the mBgCircle image view.", "Construct a Libor index for a given curve a...
public static String getEncoding(CmsObject cms, CmsResource file) { CmsProperty encodingProperty = CmsProperty.getNullProperty(); try { encodingProperty = cms.readPropertyObject(file, CmsPropertyDefinition.PROPERTY_CONTENT_ENCODING, true); } catch (CmsException e) { LOG....
[ "Returns the encoding of the file.\nEncoding is read from the content-encoding property and defaults to the systems default encoding.\nSince properties can change without rewriting content, the actual encoding can differ.\n\n@param cms {@link CmsObject} used to read properties of the given file.\n@param file the fi...
[ "Returns a correlation matrix which has rank &lt; n and for which the first n factors agree with the factors of correlationMatrix.\n\n@param correlationMatrix The given correlation matrix.\n@param numberOfFactors The requested number of factors (Eigenvectors).\n@return Factor reduced correlation matrix.", "1-D Fo...
public String haikunate() { if (tokenHex) { tokenChars = "0123456789abcdef"; } String adjective = randomString(adjectives); String noun = randomString(nouns); StringBuilder token = new StringBuilder(); if (tokenChars != null && tokenChars.length() > 0) { ...
[ "Generate heroku-like random names\n\n@return String" ]
[ "Notification that a state transition failed.\n\n@param state the failed transition", "Use this API to export sslfipskey.", "Adds a directory to the collection of module paths.\n\n@param moduleDir the module directory to add\n\n@throws java.lang.IllegalArgumentException if the path is {@code null}", "Make sur...
public static final PatchOperationTarget createHost(final String hostName, final ModelControllerClient client) { final PathElement host = PathElement.pathElement(HOST, hostName); final PathAddress address = PathAddress.EMPTY_ADDRESS.append(host, CORE_SERVICES); return new RemotePatchOperationTar...
[ "Create a host target.\n\n@param hostName the host name\n@param client the connected controller client to the master host.\n@return the remote target" ]
[ "Returns list of files matches specified regex in specified directories\n\n@param regex to match file names\n@param directories to find\n@return list of files matches specified regex in specified directories", "Returns the undo collection representing the given namespace for recording documents that\nmay ne...
private String GCMGetFreshToken(final String senderID) { getConfigLogger().verbose(getAccountId(), "GcmManager: Requesting a GCM token for Sender ID - " + senderID); String token = null; try { token = InstanceID.getInstance(context) .getToken(senderID, GoogleCloud...
[ "request token from GCM" ]
[ "Retrieve the ordinal text for a given integer.\n\n@param value integer value\n@return ordinal text", "The transaction will be executed with caching enabled. However, all newly cached values will be discarded as soon\nas the transaction is over.\n@since 2.1", "Bulk delete clients from a profile.\n\n@param model...
public static base_response Force(nitro_service client, clustersync resource) throws Exception { clustersync Forceresource = new clustersync(); return Forceresource.perform_operation(client,"Force"); }
[ "Use this API to Force clustersync." ]
[ "Returns the log conditional likelihood of the given dataset.\n\n@return The log conditional likelihood of the given dataset.", "Returns a name for the principal based upon one of the attributes\nof the main CommonProfile. The attribute name used to query the CommonProfile\nis specified in the constructor.\n\n@r...
public void add(K key, V value) { if (treatCollectionsAsImmutable) { Collection<V> newC = cf.newCollection(); Collection<V> c = map.get(key); if (c != null) { newC.addAll(c); } newC.add(value); map.put(key, newC); // replacing the old collection } else { ...
[ "Adds the value to the Collection mapped to by the key." ]
[ "combines all the lists in a collection to a single list", "Merges this with the list of sections to produce the smallest array of sequential block subnets, going from smallest to largest\n\n@param sections the sections to merge with this\n@return", "Generates a usable test specification for a given test defini...
private void writeWorkWeeks(Project.Calendars.Calendar xmlCalendar, ProjectCalendar mpxjCalendar) { List<ProjectCalendarWeek> weeks = mpxjCalendar.getWorkWeeks(); if (!weeks.isEmpty()) { WorkWeeks xmlWorkWeeks = m_factory.createProjectCalendarsCalendarWorkWeeks(); xmlCalendar.setW...
[ "Write the work weeks associated with this calendar.\n\n@param xmlCalendar XML calendar instance\n@param mpxjCalendar MPXJ calendar instance" ]
[ "Flattens an option into its value or else null, which is not great but is usually more convenient in Java.\n@param option Optional value -- either Some(T) or None\n@param <T> Any type\n@return The value inside the option, or else null", "Calculates the next snapshot version based on the current release version\n...
private static void unpackFace(File outputDirectory) throws IOException { ClassLoader loader = AllureMain.class.getClassLoader(); for (ClassPath.ResourceInfo info : ClassPath.from(loader).getResources()) { Matcher matcher = REPORT_RESOURCE_PATTERN.matcher(info.getResourceName()); ...
[ "Unpack report face to given directory.\n\n@param outputDirectory the output directory to unpack face.\n@throws IOException if any occurs." ]
[ "Queries the running container and attempts to lookup the information from the running container.\n\n@param client the client used to execute the management operation\n\n@return the container description\n\n@throws IOException if an error occurs while executing the management operation\n@throws Oper...
private void resetStoreDefinitions(Set<String> storeNamesToDelete) { // Clear entries in the metadata cache for(String storeName: storeNamesToDelete) { this.metadataCache.remove(storeName); this.storeDefinitionsStorageEngine.delete(storeName, null); this.storeNames.re...
[ "Function to clear all the metadata related to the given store\ndefinitions. This is needed when a put on 'stores.xml' is called, thus\nreplacing the existing state.\n\nThis method is not thread safe. It is expected that the caller of this\nmethod will handle concurrency related issues.\n\n@param storeNamesToDelete...
[ "Returns a lazily generated map from site paths of resources to the available locales for the resource.\n\n@return a lazily generated map from site paths of resources to the available locales for the resource.", "Renders a given graphic into a new image, scaled to fit the new size and rotated.", "Check that the...
private int collectCandidates(Map<Long, Score> candidates, List<Bucket> buckets, int threshold) { int ix; for (ix = 0; ix < threshold && candidates.size() < (CUTOFF_FACTOR_1 * max_search_hits); ix++) { Bucket b = buckets.get(ix); ...
[ "Goes through the first buckets, picking out candidate records and\ntallying up their scores.\n@return the index of the first bucket we did not process" ]
[ "Returns the list of module dependencies regarding the provided filters\n\n@param moduleId String\n@param filters FiltersHolder\n@return List<Dependency>", "Write a Byte Order Mark at the beginning of the file\n\n@param stream the FileOutputStream to write the BOM to\n@param bigEndian true if UTF 16 Big Endian...
public static boolean intersectsPointWithRectF(RectF _Rect, float _X, float _Y) { return _X > _Rect.left && _X < _Rect.right && _Y > _Rect.top && _Y < _Rect.bottom; }
[ "Checks if a point is in the given rectangle.\n\n@param _Rect rectangle which is checked\n@param _X x-coordinate of the point\n@param _Y y-coordinate of the point\n@return True if the points intersects with the rectangle." ]
[ "Use this API to fetch nsrpcnode resource of given name .", "Writes batch of data to the source\n@param batch\n@throws InterruptedException", "Adds a data set to IIM file.\n\n@param ds\ndata set id (see constants in IIM class)\n@param value\ndata set value. Null values are silently ignored.\n@throws Serializati...
public static long getMaxId(PersistenceBroker brokerForClass, Class topLevel, FieldDescriptor original) throws PersistenceBrokerException { long max = 0; long tmp; ClassDescriptor cld = brokerForClass.getClassDescriptor(topLevel); // if class is not an interface / not abstract...
[ "Search down all extent classes and return max of all found\nPK values." ]
[ "Return the list of corporate GroupId prefix configured for an organization.\n\n@param organizationId String Organization name\n@return Response A list of corporate groupId prefix in HTML or JSON", "Attaches an arbitrary object to this context only if the object was not already attached. If a value has already\nb...
private static List<Class<?>> getClassHierarchy(Class<?> clazz) { List<Class<?>> hierarchy = new ArrayList<Class<?>>( 4 ); for ( Class<?> current = clazz; current != null; current = current.getSuperclass() ) { hierarchy.add( current ); } return hierarchy; }
[ "Returns the class hierarchy of the given type, from bottom to top, starting with the given class itself.\nInterfaces are not included.\n\n@param clazz the class of interest\n@return the class hierarchy of the given class" ]
[ "Gets the health memory.\n\n@return the health memory", "The fields returned by default. Typically the output is done via display formatters and hence nearly no\nfield is necessary. Returning all fields might cause performance problems.\n\n@return the default return fields.", "Return the number of days between ...
private final Object getObject(String name) { if (m_map.containsKey(name) == false) { throw new IllegalArgumentException("Invalid column name " + name); } Object result = m_map.get(name); return (result); }
[ "Retrieve a value from the map, ensuring that a key exists in the map\nwith the specified name.\n\n@param name column name\n@return column value" ]
[ "Applies the given codec registry to be used alongside the default codec registry.\n\n@param codecRegistry the codec registry to merge in.\n@return an {@link StitchObjectMapper} with the merged codec registries.", "Inserts the result of the migration into the migration table\n\n@param migration the migration ...
void parseWorkerThreadPool(final XMLExtendedStreamReader reader, final ModelNode subsystemAdd) throws XMLStreamException { final int count = reader.getAttributeCount(); for (int i = 0; i < count; i++) { requireNoNamespaceAttribute(reader, i); final String value = reader.getAttrib...
[ "Adds the worker thread pool attributes to the subysystem add method" ]
[ "Write the text to the Path, using the specified encoding.\n\n@param self a Path\n@param text the text to write to the Path\n@param charset the charset used\n@throws java.io.IOException if an IOException occurs.\n@since 2.3.0", "Delete the proxy history for the active profile\n\n@throws Exception exception"...
public static java.sql.Date getDate(Object value) { try { return toDate(value); } catch (ParseException pe) { pe.printStackTrace(); return null; } }
[ "Convert an Object to a Date, without an Exception" ]
[ "Set the color resources used in the progress animation from color resources.\nThe first color will also be the color of the bar that grows in response\nto a user swipe gesture.\n\n@param colorResIds", "Returns true if string starts and ends with double-quote\n@param str\n@return", "Returns true if this entity'...
public static cachepolicy_cacheglobal_binding[] get(nitro_service service, String policyname) throws Exception{ cachepolicy_cacheglobal_binding obj = new cachepolicy_cacheglobal_binding(); obj.set_policyname(policyname); cachepolicy_cacheglobal_binding response[] = (cachepolicy_cacheglobal_binding[]) obj.get_reso...
[ "Use this API to fetch cachepolicy_cacheglobal_binding resources of given name ." ]
[ "Check if there is an attribute which tells us which concrete class is to be instantiated.", "Turn json string into map\n\n@param json\n@return", "Stops all servers linked with the current camel context\n\n@param camelContext", "The user making this call must be a member of the team in order to add others.\nT...
public static List<Dependency> getAllDependencies(final Module module) { final Set<Dependency> dependencies = new HashSet<Dependency>(); final List<String> producedArtifacts = new ArrayList<String>(); for(final Artifact artifact: getAllArtifacts(module)){ producedArtifacts.add(artifa...
[ "Returns all the dependencies of a module\n\n@param module Module\n@return List<Dependency>" ]
[ "Match the Origin header with the allowed origins.\nIf it doesn't match then a 403 response code is set on the response and it returns null.\n@param exchange the current HttpExchange.\n@param allowedOrigins list of sanitized allowed origins.\n@return the first matching origin, null otherwise.\n@throws Exception", ...
public static String getVcsRevision(Map<String, String> env) { String revision = env.get("SVN_REVISION"); if (StringUtils.isBlank(revision)) { revision = env.get(GIT_COMMIT); } if (StringUtils.isBlank(revision)) { revision = env.get("P4_CHANGELIST"); } ...
[ "Get the VCS revision from the Jenkins build environment. The search will one of \"SVN_REVISION\", \"GIT_COMMIT\",\n\"P4_CHANGELIST\" in the environment.\n\n@param env Th Jenkins build environment.\n@return The vcs revision for supported VCS" ]
[ "Creates an attachment from a given array of bytes.\nThe bytes will be Base64 encoded.\n@throws java.lang.IllegalArgumentException if mediaType is not binary", "Compare two versions\n\n@param other\n@return an integer: 0 if equals, -1 if older, 1 if newer\n@throws IncomparableException is thrown when two versions...
private void readTableData(List<SynchroTable> tables, InputStream is) throws IOException { for (SynchroTable table : tables) { if (REQUIRED_TABLES.contains(table.getName())) { readTable(is, table); } } }
[ "Read the data for all of the tables we're interested in.\n\n@param tables list of all available tables\n@param is input stream" ]
[ "Use this API to clear bridgetable resources.", "Creates a new CRFDatum from the preprocessed allData format, given the\ndocument number, position number, and a List of Object labels.\n\n@return A new CRFDatum", "Creates the node mappings.\n\n@param mtasTokenIdFactory\nthe mtas token id factory\n@param level\nt...
private IndexedContainer createContainerForBundleWithDescriptor() throws IOException, CmsException { IndexedContainer container = new IndexedContainer(); // create properties container.addContainerProperty(TableProperty.KEY, String.class, ""); container.addContainerProperty(TableProper...
[ "Creates the container for a bundle with descriptor.\n@return the container for a bundle with descriptor.\n@throws IOException thrown if reading the bundle fails.\n@throws CmsException thrown if reading the bundle fails." ]
[ "Writes all auxiliary triples that have been buffered recently. This\nincludes OWL property restrictions but it also includes any auxiliary\ntriples required by complex values that were used in snaks.\n\n@throws RDFHandlerException\nif there was a problem writing the RDF triples", "Return a replica of this instan...
public void loadWithTimeout(int timeout) { for (String stylesheet : m_stylesheets) { boolean alreadyLoaded = checkStylesheet(stylesheet); if (alreadyLoaded) { m_loadCounter += 1; } else { appendStylesheet(stylesheet, m_jsCallback); ...
[ "Starts the loading process and creates a timer that sets of the callback after a given tiime if it hasn't already been triggered.\n\n@param timeout number of milliseconds after which the callback should be called if it hasn't already been" ]
[ "Encodes the given source into an encoded String using the rules specified\nby the given component and with the given options.\n@param source the source string\n@param encoding the encoding of the source string\n@param type the URI component for the source\n@return the encoded URI\n@throws IllegalArgumentException ...
private void addDependencyToGraph(final DbDependency dependency, final AbstractGraph graph, final int depth, final String parentId) { // In that case of Axway artifact we will add a module to the graph if (filters.getCorporateFilter().filter(dependency)) { final DbModule dbTarget = repoHandl...
[ "Add a dependency to the graph\n\n@param dependency\n@param graph\n@param depth\n@param parentId" ]
[ "Runs calls in a background thread so that the results will actually be asynchronous.\n\n@see com.google.appengine.tools.cloudstorage.RawGcsService#continueObjectCreationAsync(\ncom.google.appengine.tools.cloudstorage.RawGcsService.RawGcsCreationToken,\njava.nio.ByteBuffer, long)", "Recursively write tasks.\n\n@p...
private Integer getNullOnValue(Integer value, int nullValue) { return (NumberHelper.getInt(value) == nullValue ? null : value); }
[ "This method returns the value it is passed, or null if the value\nmatches the nullValue argument.\n\n@param value value under test\n@param nullValue return null if value under test matches this value\n@return value or null" ]
[ "Creates a Bytes object by copying the data of the given byte array", "Use this API to fetch Interface resource of given name .", "Loads the SPI backing bean.\n\n@return the instance of MonetaryFormatsSingletonSpi to be used by this singleton.", "Generates a column for the given field and adds it to the table...
private void readRelationships() { for (MapRow row : m_tables.get("REL")) { Task predecessor = m_activityMap.get(row.getString("PREDECESSOR_ACTIVITY_ID")); Task successor = m_activityMap.get(row.getString("SUCCESSOR_ACTIVITY_ID")); if (predecessor != null && successor != null) ...
[ "Read task relationships." ]
[ "Collects all the fields from columns and also the fields not bounds to columns\n@return List<ColumnProperty>", "Try to get a system property for obsolete keys. The value is automatically converted - a runtime exception may be thrown during conversion.\n\n@return all the properties whose system property keys were...
@Override public Iterator<? extends IPAddressSeqRange> prefixIterator(int prefixLength) { if(!isMultiple()) { return new Iterator<IPAddressSeqRange>() { IPAddressSeqRange orig = IPAddressSeqRange.this; @Override public boolean hasNext() { return orig != null; } @Override public I...
[ "Iterates through the range of prefixes in this range instance using the given prefix length.\n\n@param prefixLength\n@return" ]
[ "The digits were stored as a hex value, thix switches them to an octal value.\n\n@param currentHexValue\n@param digitCount\n@return", "Loads the localization for the current locale from a bundle of type xmlvfsbundle.\nIt assumes, the content has already been unmarshalled before.\n@param locale the locale for whic...
public static AssociationKeyMetadata getInverseAssociationKeyMetadata(OgmEntityPersister mainSidePersister, int propertyIndex) { Type propertyType = mainSidePersister.getPropertyTypes()[propertyIndex]; SessionFactoryImplementor factory = mainSidePersister.getFactory(); // property represents no association, so n...
[ "Returns the meta-data for the inverse side of the association represented by the given property on the given\npersister in case it represents the main side of a bi-directional one-to-many or many-to-many association.\n\n@param mainSidePersister persister of the entity hosting the property of interest\n@param prope...
[ "Processes the template for all foreignkeys of the current table.\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\"", "Attaches the menu drawer to the content view.", ...
public int executeUpdateSQL( String sqlStatement, ClassDescriptor cld, ValueContainer[] values1, ValueContainer[] values2) throws PersistenceBrokerException { if (logger.isDebugEnabled()) logger.debug("executeUpdateSQL: " + sqlStatement); ...
[ "performs a SQL UPDTE, INSERT or DELETE statement against RDBMS.\n@param sqlStatement the query string.\n@param cld ClassDescriptor providing meta-information.\n@return int returncode" ]
[ "This method retrieves the next token and returns a constant representing\nthe type of token found.\n\n@return token type value", "returns an Array with an Objects PK VALUES\n@throws PersistenceBrokerException if there is an erros accessing o field values", "Updates the image information.", "Validate the Comb...
public int getTotalCreatedConnections(){ int total=0; for (int i=0; i < this.partitionCount && this.partitions[i] != null; i++){ total+=this.partitions[i].getCreatedConnections(); } return total; }
[ "Return total number of connections created in all partitions.\n\n@return number of created connections" ]
[ "Compute morse.\n\n@param term the term\n@return the string", "Get the authorization uri, where the user logs in.\n\n@param redirectUri\nUri the user is redirected to, after successful authorization.\nThis must be the same as specified at the Eve Online developer\npage.\n@param scopes\nScopes of the Eve Online SS...
public static String padLeft(String str, int totalChars, char ch) { if (str == null) { str = "null"; } StringBuilder sb = new StringBuilder(); for (int i = 0, num = totalChars - str.length(); i < num; i++) { sb.append(ch); } sb.append(str); return sb.toString(); }
[ "Pads the given String to the left with the given character to ensure that\nit's at least totalChars long." ]
[ "Main method of this class related to RecyclerView widget. This method is the responsible of\ncreate a new Renderer instance with all the needed information to implement the rendering.\nThis method will validate all the attributes passed in the builder constructor and will create\na RendererViewHolder instance.\n\n...
public static BuildInfo appendBuildInfo(CpsScript cpsScript, Map<String, Object> stepVariables) { BuildInfo buildInfo = (BuildInfo) stepVariables.get(BUILD_INFO); if (buildInfo == null) { buildInfo = (BuildInfo) cpsScript.invokeMethod("newBuildInfo", Maps.newLinkedHashMap()); ste...
[ "Add the buildInfo to step variables if missing and set its cps script.\n\n@param cpsScript the cps script\n@param stepVariables step variables map\n@return the build info" ]
[ "adds a FIELDDESCRIPTOR to this ClassDescriptor.\n@param fld", "Removes the specified entry point\n\n@param controlPoint The entry point", "Use this API to add route6 resources.", "Checks constraints on this model.\n\n@param checkLevel The amount of checks to perform\n@throws ConstraintException If a constrai...
public static String notNullOrEmpty(String argument, String argumentName) { if (argument == null || argument.trim().isEmpty()) { throw new IllegalArgumentException("Argument " + argumentName + " must not be null or empty."); } return argument; }
[ "Checks if the given String is null or contains only whitespaces.\nThe String is trimmed before the empty check.\n\n@param argument the String to check for null or emptiness\n@param argumentName the name of the argument to check.\nThis is used in the exception message.\n@return the String that was given as argu...
[ "Read all task relationships from a ConceptDraw PROJECT file.\n\n@param cdp ConceptDraw PROJECT file", "returns IsolationLevel literal as matching\nto the corresponding id\n@return the IsolationLevel literal", "Add all headers in a header map.\n\n@param headers a map of headers.\n@return the interceptor instanc...
private void addDownloadButton(final CmsLogFileView view) { Button button = CmsToolBar.createButton( FontOpenCms.DOWNLOAD, CmsVaadinUtils.getMessageText(Messages.GUI_LOGFILE_DOWNLOAD_0)); button.addClickListener(new ClickListener() { private static final long serial...
[ "Adds the download button.\n\n@param view layout which displays the log file" ]
[ "Adds all rows from the TSV file specified, using the provided delimiter and null value.\n\n@param file The file to read the data from.\n@param delimiter A column delimiter.\n@param nullValue Value to be treated as null in the source data.\n@return {@code this}", "Creates a field map for tasks.\n\n@param props pr...
private List<ExpandableWrapper<P, C>> generateFlattenedParentChildList(List<P> parentList) { List<ExpandableWrapper<P, C>> flatItemList = new ArrayList<>(); int parentCount = parentList.size(); for (int i = 0; i < parentCount; i++) { P parent = parentList.get(i); generat...
[ "Generates a full list of all parents and their children, in order.\n\n@param parentList A list of the parents from\nthe {@link ExpandableRecyclerAdapter}\n@return A list of all parents and their children, expanded" ]
[ "Retrieve the request History based on the specified filters.\nIf no filter is specified, return the default size history.\n\n@param filters filters to be applied\n@return array of History items\n@throws Exception exception", "Support the subscript operator for String.\n\n@param text a String\n@param index the i...
private byte[] createErrorImage(int width, int height, Exception e) throws IOException { String error = e.getMessage(); if (null == error) { Writer result = new StringWriter(); PrintWriter printWriter = new PrintWriter(result); e.printStackTrace(printWriter); error = result.toString(); } BufferedIm...
[ "Create an error image should an error occur while fetching a WMS map.\n\n@param width image width\n@param height image height\n@param e exception\n@return error image\n@throws java.io.IOException oops" ]
[ "Use this API to update bridgetable.", "Set cached value for the attribute. Used for dynamically loaded values in the Acacia content editor.\n\n@param attribute the attribute for which the value should be cached\n@param value the value to cache", "Creates a map of metadata from json.\n@param jsonObject metadata...
public static appfwprofile_excluderescontenttype_binding[] get(nitro_service service, String name) throws Exception{ appfwprofile_excluderescontenttype_binding obj = new appfwprofile_excluderescontenttype_binding(); obj.set_name(name); appfwprofile_excluderescontenttype_binding response[] = (appfwprofile_excluder...
[ "Use this API to fetch appfwprofile_excluderescontenttype_binding resources of given name ." ]
[ "Displays text which shows the valid command line parameters, and then exits.", "Compares this value with the specified object for order. Returns a negative\ninteger, zero, or a positive integer as this value is less than, equal to, or\ngreater than the specified value.\n@param other Another Rational value.\n@ret...
public static Integer getDurationUnits(RecurringTask recurrence) { Duration duration = recurrence.getDuration(); Integer result = null; if (duration != null) { result = UNITS_MAP.get(duration.getUnits()); } return (result); }
[ "Converts a TimeUnit instance to an integer value suitable for\nwriting to an MPX file.\n\n@param recurrence RecurringTask instance\n@return integer value" ]
[ "Adds a constructor for the proxy for each constructor declared by the base\nbean type.\n\n@param proxyClassType the Javassist class for the proxy\n@param initialValueBytecode", "Answer the SQL-Clause for a SelectionCriteria\nIf the Criteria references a class with extents an OR-Clause is\nadded for each ex...
public static String packageNameOf(Class<?> clazz) { String name = clazz.getName(); int pos = name.lastIndexOf('.'); E.unexpectedIf(pos < 0, "Class does not have package: " + name); return name.substring(0, pos); }
[ "Returns package name of a class\n\n@param clazz\nthe class\n@return\nthe package name of the class" ]
[ "helper method to activate or deactivate a specific flag\n\n@param bits\n@param on", "Create a clone of the Renderer. This method is the base of the prototype mechanism implemented\nto avoid create new objects from RendererBuilder. Pay an special attention implementing clone\nmethod in Renderer subtypes.\n\n@retu...
public void randomize() { numKnots = 4 + (int)(6*Math.random()); xKnots = new int[numKnots]; yKnots = new int[numKnots]; knotTypes = new byte[numKnots]; for (int i = 0; i < numKnots; i++) { xKnots[i] = (int)(255 * Math.random()); yKnots[i] = 0xff000000 | ((int)(255 * Math.random()) << 16) | ((int)(255 *...
[ "Randomize the gradient." ]
[ "Print a resource type.\n\n@param value ResourceType instance\n@return resource type value", "Returns the smallest prefix length possible such that this address division grouping includes the block of addresses for that prefix.\n\n@return the prefix length", "Attaches a pre-existing set of hours to the correct\...
public void setTimeWarp(String l) { long warp = CmsContextInfo.CURRENT_TIME; try { warp = Long.parseLong(l); } catch (NumberFormatException e) { // if parsing the time warp fails, it will be set to -1 (i.e. disabled) } m_settings.setTimeWarp(warp); }
[ "Sets the time warp.\n\n@param l the new time warp" ]
[ "Create an error image.\n\n@param area The size of the image", "Process StepStartedEvent. New step will be created and added to\nstepStorage.\n\n@param event to process", "Copies all elements from input into output which are &gt; tol.\n@param input (Input) input matrix. Not modified.\n@param output (Output) Out...
public float getBoundsHeight(){ if (mSceneObject != null) { GVRSceneObject.BoundingVolume v = mSceneObject.getBoundingVolume(); return v.maxCorner.y - v.minCorner.y; } return 0f; }
[ "Gets Widget bounds height\n@return height" ]
[ "Creates AzureAsyncOperation from the given HTTP response.\n\n@param serializerAdapter the adapter to use for deserialization\n@param response the response\n@return the async operation object\n@throws CloudException if the deserialization fails or response contains invalid body", "Return a string representation o...
public PortComponentMetaData getPortComponentByWsdlPort(String name) { ArrayList<String> pcNames = new ArrayList<String>(); for (PortComponentMetaData pc : portComponents) { String wsdlPortName = pc.getWsdlPort().getLocalPart(); if (wsdlPortName.equals(name)) return pc...
[ "Lookup a PortComponentMetaData by wsdl-port local part\n\n@param name - the wsdl-port local part\n@return PortComponentMetaData if found, null otherwise" ]
[ "Notifies that multiple footer items are changed.\n\n@param positionStart the position.\n@param itemCount the item count.", "Parse the JSON string and return the object. The string is expected to be the JSON print data from the\nclient.\n\n@param spec the JSON formatted string.\n@return The encapsulated JSON...
public static base_responses add(nitro_service client, gslbservice resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { gslbservice addresources[] = new gslbservice[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new gslb...
[ "Use this API to add gslbservice resources." ]
[ "Updates the existing cluster such that we remove partitions mentioned\nfrom the stealer node and add them to the donor node\n\n@param currentCluster Existing cluster metadata. Both stealer and donor\nnode should already exist in this metadata\n@param stealerNodeId Id of node for which we are stealing the partition...
public static String[] sortStringArray(String[] array) { if (isEmpty(array)) { return new String[0]; } Arrays.sort(array); return array; }
[ "Turn given source String array into sorted array.\n\n@param array the source array\n@return the sorted array (never <code>null</code>)" ]
[ "Tests correctness.", "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.", "Convert an operation for deployment overlays to be executed on local servers.\nSince ...
private void readUDFTypes(FieldContainer mpxj, List<UDFAssignmentType> udfs) { for (UDFAssignmentType udf : udfs) { FieldType fieldType = m_fieldTypeMap.get(Integer.valueOf(udf.getTypeObjectId())); if (fieldType != null) { mpxj.set(fieldType, getUdfValue(udf)); ...
[ "Process UDFs for a specific object.\n\n@param mpxj field container\n@param udfs UDF values" ]
[ "Creates a span that covers an exact row", "Returns the type discriminator value for given Frames model class, extracted from the @TypeValue annotation.", "Helper xml end tag writer\n\n@param value the output stream to use in writing", "Cuts the string at the end if it's longer than maxLength and appends the ...
public SwaptionDataLattice convertLattice(QuotingConvention targetConvention, double displacement, AnalyticModel model) { if(displacement != 0 && targetConvention != QuotingConvention.PAYERVOLATILITYLOGNORMAL) { throw new IllegalArgumentException("SwaptionDataLattice only supports displacement, when using Quot...
[ "Convert this lattice to store data in the given convention.\nConversion involving receiver premium assumes zero wide collar.\n\n@param targetConvention The convention to store the data in.\n@param displacement The displacement to use, if applicable.\n@param model The model for context.\n\n@return The converted lat...
[ "This method extracts calendar data from a GanttProject file.\n\n@param ganttProject Root node of the GanttProject file", "Refactor the method into public CXF utility and reuse it from CXF instead copy&paste", "Handles subscription verification callback from Facebook.\n@param subscription The subscription name....
@Override public void updateStoreDefinition(StoreDefinition storeDef) { this.storeDef = storeDef; if(storeDef.hasRetentionPeriod()) this.retentionTimeMs = storeDef.getRetentionDays() * Time.MS_PER_DAY; }
[ "Updates the store definition object and the retention time based on the\nupdated store definition" ]
[ "Read custom property definitions for tasks.\n\n@param gpTasks GanttProject tasks", "Print the lead string followed by centered formatted string. The whole\nlength of the line is 80 chars.\n\nExample:\n\n```java\nprintCenterWithLead(\" *\", \"Hello %s\", \"World\");\n```\n\nwill print something like\n\n```\n* ...
void fileWritten() throws ConfigurationPersistenceException { if (!doneBootup.get() || interactionPolicy.isReadOnly()) { return; } try { FilePersistenceUtils.copyFile(mainFile, lastFile); } catch (IOException e) { throw ControllerLogger.ROOT_LOGGER.fai...
[ "Notification that the configuration has been written, and its current content should be stored to the .last file" ]
[ "This method writes data for a single calendar to an MSPDI file.\n\n@param bc Base calendar data\n@return New MSPDI calendar instance", "Read the given source byte array, then overwrite this buffer's contents\n\n@param src source byte array\n@param srcOffset offset in source byte array to read from\n@param destOf...
protected Map getAllVariables(){ try{ Iterator names = FreeMarkerTL.getEnvironment().getKnownVariableNames().iterator(); Map vars = new HashMap(); while (names.hasNext()) { Object name =names.next(); vars.put(name, get(name.toString())); ...
[ "Returns a map of all variables in scope.\n@return map of all variables in scope." ]
[ "Use this API to fetch all the dnsnsecrec resources that are configured on netscaler.", "Maps a duration unit value from a recurring task record in an MPX file\nto a TimeUnit instance. Defaults to days if any problems are encountered.\n\n@param value integer duration units value\n@return TimeUnit instance", "Ge...
public static <T extends Bean<?>> Set<T> removeDisabledBeans(Set<T> beans, final BeanManagerImpl beanManager) { if (beans.isEmpty()) { return beans; } else { for (Iterator<T> iterator = beans.iterator(); iterator.hasNext();) { if (!isBeanEnabled(iterator.next(), b...
[ "Retains only beans which are enabled.\n\n@param beans The mutable set of beans to filter\n@param beanManager The bean manager\n@return a mutable set of enabled beans" ]
[ "Use this API to fetch nslimitselector resource of given name .", "Check whether the URL contains one of the patterns.\n\n@param uri URI\n@param patterns possible patterns\n@return true when URL contains one of the patterns", "Convert subQuery to SQL\n@param subQuery the subQuery value of SelectionCriteria", ...
private static boolean isValidPropertyClass(final PropertyDescriptor _property) { final Class type = _property.getPropertyType(); return Number.class.isAssignableFrom(type) || type == String.class || Date.class.isAssignableFrom(type) || type == Boolean.class; }
[ "Checks if a property's type is valid to be included in the report.\n@param _property the property.\n@return true if the property is is of a valid type." ]
[ "Parses a raw WBS value from the database and breaks it into\ncomponent parts ready for formatting.\n\n@param value raw WBS value", "Mark the given child resource as the post run dependent of the parent of this collection.\n\n@param childResource the child resource", "Use this API to fetch sslocspresponder reso...
public static void registerDataPersisters(DataPersister... dataPersisters) { // we build the map and replace it to lower the chance of concurrency issues List<DataPersister> newList = new ArrayList<DataPersister>(); if (registeredPersisters != null) { newList.addAll(registeredPersisters); } for (DataPersis...
[ "Register a data type with the manager." ]
[ "Log a trace message with a throwable.", "Add server redirect to a profile, using current active ServerGroup\n\n@param region region\n@param srcUrl source URL\n@param destUrl destination URL\n@param hostHeader host header\n@param profileId profile ID\n@return ID of added ServerRedirect\n@throws Exception exceptio...
private void initExceptionsPanel() { m_exceptionsPanel.setLegend(Messages.get().key(Messages.GUI_SERIALDATE_PANEL_EXCEPTIONS_0)); m_exceptionsPanel.addCloseHandler(this); m_exceptionsPanel.setVisible(false); }
[ "Configure all UI elements in the exceptions panel." ]
[ "Calculate Euclidean distance between two points.\n\n@param anotherPoint Point to calculate distance to.\n@return Euclidean distance between this point and anotherPoint points.", "Extracts the java class name from the schema info\n\n@param schemaInfo the schema info, a string like: java=java.lang.String\n@return ...
public void generateWBS(Task parent) { String wbs; if (parent == null) { if (NumberHelper.getInt(getUniqueID()) == 0) { wbs = "0"; } else { wbs = Integer.toString(getParentFile().getChildTasks().size() + 1); } } ...
[ "This method is used to automatically generate a value\nfor the WBS field of this task.\n\n@param parent Parent Task" ]
[ "Returns the directory of the URL.\n\n@param urlString URL of the file.\n@return The directory string.\n@throws IllegalArgumentException if URL is malformed", "Log a string.\n\n@param label label text\n@param data string data", "Add a task to the project.\n\n@return new task instance", "Returns the value of t...
private static int med3(int a, int b, int c, IntComparator comp) { int ab = comp.compare(a,b); int ac = comp.compare(a,c); int bc = comp.compare(b,c); return (ab<0 ? (bc<0 ? b : ac<0 ? c : a) : (bc>0 ? b : ac>0 ? c : a)); }
[ "Returns the index of the median of the three indexed chars." ]
[ "Returns a new instance of the class with the given qualified name using the constructor with\nthe specified parameter.\n\n@param className The qualified name of the class to instantiate\n@param type The types of the single parameter of the constructor\n@param arg The argument\n@return The instance", "...
public static Attachment writeAttachmentWithErrorMessage(Throwable throwable, String title) { String message = throwable.getMessage(); try { return writeAttachment(message.getBytes(CONFIG.getAttachmentsEncoding()), title); } catch (Exception e) { e.addSuppressed(throwable...
[ "Write throwable as attachment.\n\n@param throwable to write\n@param title title of attachment\n@return Created {@link ru.yandex.qatools.allure.model.Attachment}" ]
[ "Log a fatal message with a throwable.", "Converts the List to PagedList.\n@param list list to be converted in to paged list\n@param <InnerT> the wrapper inner type\n@return the Paged list for the inner type.", "Update the list of buildpacks installed on an app\n\n@param appName See {@link #listApps} for a list...
public DockerContainerObjectBuilder<T> withContainerObjectClass(Class<T> containerObjectClass) { if (containerObjectClass == null) { throw new IllegalArgumentException("container object class cannot be null"); } this.containerObjectClass = containerObjectClass; //First we ch...
[ "Specifies the container object class to be instantiated\n\n@param containerObjectClass\ncontainer object class to be instantiated\n\n@return the current builder instance" ]
[ "Returns the full record for a single team.\n\n@param team Globally unique identifier for the team.\n@return Request object", "Adds the basic sentence.\n\n@param s the s\n@throws ParseException the parse exception", "Obtains a local date in Pax calendar system from the\nproleptic-year, month-of-year and day-of...