query stringlengths 74 6.1k | positive listlengths 1 1 | negative listlengths 9 9 |
|---|---|---|
public static void writeShort(byte[] bytes, short value, int offset) {
bytes[offset] = (byte) (0xFF & (value >> 8));
bytes[offset + 1] = (byte) (0xFF & value);
} | [
"Write a short to the byte array starting at the given offset\n\n@param bytes The byte array\n@param value The short to write\n@param offset The offset to begin writing at"
] | [
"Get the target file for misc items.\n\n@param item the misc item\n@return the target location",
"Check if the path to the property correspond to an association.\n\n@param targetTypeName the name of the entity containing the property\n@param pathWithoutAlias the path to the property WITHOUT aliases\n@return {@cod... |
private GVRCursorController getUniqueControllerId(int deviceId) {
GVRCursorController controller = controllerIds.get(deviceId);
if (controller != null) {
return controller;
}
return null;
} | [
"returns null if no device is found."
] | [
"Write exceptions into the format used by MSPDI files from\nProject 2007 onwards.\n\n@param calendar parent calendar\n@param exceptions list of exceptions",
"Rename an existing app.\n@param appName Existing app name. See {@link #listApps()} for names that can be used.\n@param newName New name to give the existing... |
public final List<MtasSolrStatus> checkForExceptions() {
List<MtasSolrStatus> statusWithException = null;
for (MtasSolrStatus item : data) {
if (item.checkResponseForException()) {
if (statusWithException == null) {
statusWithException = new ArrayList<>();
}
statusWithExc... | [
"Check for exceptions.\n\n@return the list"
] | [
"Creates a window visually showing the matrix's state. Block means an element is zero.\nRed positive and blue negative. More intense the color larger the element's absolute value\nis.\n\n@param A A matrix.\n@param title Name of the window.",
"Select a List of values from a Matcher using a Collection\nto identif... |
public void setTargetTranslator(TargetTranslator targetTranslator) {
if(targetTranslator!=null){
this.targetTranslator = targetTranslator;
this.charTranslator = null;
this.htmlElementTranslator = null;
}
} | [
"Sets the target translator.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param targetTranslator translator"
] | [
"Join the Collection of Strings using the specified delimter and optionally quoting each\n\n@param s\nThe String collection\n@param delimiter\nthe delimiter String\n@param doQuote\nwhether or not to quote the Strings\n@return The joined String",
"Get a collection of all of the user's groups.\n\n@return A Collecti... |
public String[] getMethods(String pluginClass) throws Exception {
ArrayList<String> methodNames = new ArrayList<String>();
Method[] methods = getClass(pluginClass).getDeclaredMethods();
for (Method method : methods) {
logger.info("Checking {}", method.getName());
com.gr... | [
"Returns a string array of the methods loaded for a class\n\n@param pluginClass name of class\n@return string array of the methods loaded for the class\n@throws Exception exception"
] | [
"Check that the parameter array has at least as many elements as it\nshould.\n\n@param parameterName\nThe name of the user-supplied parameter that we are validating\nso that the user can easily find the error in their code.\n@param actualLength\nThe actual array length\n@param minimumLength\nThe minimum array lengt... |
private void processColumns()
{
int fieldID = MPPUtility.getInt(m_data, m_headerOffset);
m_headerOffset += 4;
m_dataOffset = MPPUtility.getInt(m_data, m_headerOffset);
m_headerOffset += 4;
FieldType type = FieldTypeHelper.getInstance(fieldID);
if (type.getDataType() != null)
... | [
"Processes graphical indicator definitions for each column."
] | [
"Adds the position.\n\n@param position the position",
"capture center eye",
"Rename with retry.\n\n@param from\n@param to\n@return <tt>true</tt> if the file was successfully renamed.",
"Use this API to add gslbsite.",
"Searches for brackets which are only used to construct new matrices by concatenating\n1 o... |
private static Map<String, Set<String>> expand(Map<String, Set<String>> viewToPropNames) {
Set<String> baseProps = viewToPropNames.get(PropertyView.BASE_VIEW);
if (baseProps == null) {
baseProps = ImmutableSet.of();
}
if (!SquigglyConfig.isFilterImplicitlyIncludeBaseFields... | [
"apply the base fields to other views if configured to do so."
] | [
"Convert a wavelength to an RGB value.\n@param wavelength wavelength in nanometres\n@return the RGB value",
"Triggers expansion of the parent.",
"Create a JavadocComment, by formatting the text of the Javadoc using the given indentation.",
"Notifies that multiple header items are changed.\n\n@param positionSt... |
public Token add( Function function ) {
Token t = new Token(function);
push( t );
return t;
} | [
"Adds a function to the end of the token list\n@param function Function which is to be added\n@return The new Token created around function"
] | [
"Auto re-initialize external resourced\nif resources have been already released.",
"Removes double-quotes from around a string\n@param str\n@return",
"Handles an initial response from a PUT or PATCH operation response by polling the status of the operation\nasynchronously, once the operation finishes emits the ... |
private void validateAttributesToCreateANewRendererViewHolder() {
if (viewType == null) {
throw new NullContentException(
"RendererBuilder needs a view type to create a RendererViewHolder");
}
if (layoutInflater == null) {
throw new NullLayoutInflaterException(
"RendererBuild... | [
"Throws one RendererException if the viewType, layoutInflater or parent are null."
] | [
"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.\nObjectNameNotFoundException",
"Convert subQuery to SQL\n@param subQuery the subQuery value of SelectionCriteria",
"Returns ... |
public int checkIn() {
try {
synchronized (STATIC_LOCK) {
m_logStream = new PrintStream(new FileOutputStream(DEFAULT_LOGFILE_PATH, false));
CmsObject cms = getCmsObject();
if (cms != null) {
return checkInInternal();
... | [
"Start export and check in of the selected modules.\n@return The exit code of the check in procedure (like a script's exit code)."
] | [
"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.",
"replace the counter for K1-index o by new counter c",
"Record a prepared operation.\n\n@pa... |
public void setFrustum(float[] frustum)
{
Matrix4f projMatrix = new Matrix4f();
projMatrix.setFrustum(frustum[0], frustum[3], frustum[1], frustum[4], frustum[2], frustum[5]);
setFrustum(projMatrix);
} | [
"Set the view frustum to pick against from the minimum and maximum corners.\nThe viewpoint of the frustum is the center of the scene object\nthe picker is attached to. The view direction is the forward\ndirection of that scene object. The frustum will pick what a camera\nattached to the scene object with that view ... | [
"Creates an internal project and repositories such as a token storage.",
"Adds a member to this group with the specified role.\n@param user the member to be added to this group.\n@param role the role of the user in this group. Can be null to assign the default role.\n@return info about the new group member... |
private void processResourceAssignments(Task task, List<MapRow> assignments)
{
for (MapRow row : assignments)
{
processResourceAssignment(task, row);
}
} | [
"Extract resource assignments for a task.\n\n@param task parent task\n@param assignments list of Synchro resource assignment data"
] | [
"Add new control at the end of control bar with specified touch listener, control label and resource.\nSize of control bar is updated based on new number of controls.\n@param name name of the control to remove\n@param resId the control face\n@param label the control label\n@param listener touch listener",
"Do not... |
private List<Row> createExceptionAssignmentRowList(String exceptionData)
{
List<Row> list = new ArrayList<Row>();
String[] exceptions = exceptionData.split(",|:");
int index = 1;
while (index < exceptions.length)
{
Date startDate = DatatypeConverter.parseEpochTimestamp(exceptio... | [
"Extract a list of exception assignments.\n\n@param exceptionData string representation of exception assignments\n@return list of exception assignment rows"
] | [
"Check if a given string is a template path or template content\n\nIf the string contains anyone the following characters then we assume it\nis content, otherwise it is path:\n\n* space characters\n* non numeric-alphabetic characters except:\n** dot \".\"\n** dollar: \"$\"\n\n@param string\nthe string to be tested\... |
public static String getColumnSharedPrefix(String[] associationKeyColumns) {
String prefix = null;
for ( String column : associationKeyColumns ) {
String newPrefix = getPrefix( column );
if ( prefix == null ) { // first iteration
prefix = newPrefix;
if ( prefix == null ) { // no prefix, quit
brea... | [
"Returns the shared prefix of these columns. Null otherwise.\n\n@param associationKeyColumns the columns sharing a prefix\n@return the shared prefix of these columns. {@code null} otherwise."
] | [
"URLEncode a string\n@param s\n@return",
"Use this API to add sslocspresponder resources.",
"replaces the old with the new item. The new item will not be added when the old one is not\nfound.\n\n@param oldObject will be removed\n@param newObject is added only when hte old item is removed",
"Connects to the co... |
@Override
public final Optional<Boolean> tryOverrideValidation(final MatchInfo matchInfo) throws SocketException,
UnknownHostException, MalformedURLException {
for (AddressHostMatcher addressHostMatcher: this.matchersForHost) {
if (addressHostMatcher.matches(matchInfo)) {
... | [
"Check the given URI to see if it matches.\n\n@param matchInfo the matchInfo to validate.\n@return True if it matches."
] | [
"Find and return the appropriate getter method for field.\n\n@return Get method or null (or throws IllegalArgumentException) if none found.",
"This method is called to alert project listeners to the fact that\na calendar has been written to a project file.\n\n@param calendar calendar instance",
"Use this API to... |
public static BoxAPIConnection getTransactionConnection(String accessToken, String scope) {
return BoxTransactionalAPIConnection.getTransactionConnection(accessToken, scope, null);
} | [
"Request a scoped transactional token.\n@param accessToken application access token.\n@param scope scope of transactional token.\n@return a BoxAPIConnection which can be used to perform transactional requests."
] | [
"If users want to implement clone on all their objects, we can use this\nto make copies. This is hazardous as user may mess it up, but it is also\npotentially the fastest way of making a copy.\n\nUsually the OjbCloneable interface should just be delegating to the clone()\noperation that the user has implemented.\n\... |
private void populateResourceAssignment(Record record, ResourceAssignment assignment) throws MPXJException
{
//
// Handle malformed MPX files - ensure that we can locate the resource
// using either the Unique ID attribute or the ID attribute.
//
Resource resource = m_projectFile.getRes... | [
"Populate a resource assignment.\n\n@param record MPX record\n@param assignment resource assignment\n@throws MPXJException"
] | [
"Exports a single queue to an XML file.",
"Parse a string representation of password spec.\n\nA password spec string should be `<trait spec><length spec>`.\n\nWhere \"trait spec\" should be a composition of\n\n* `a` - indicate lowercase letter required\n* `A` - indicate uppercase letter required\n* `0` - indicate... |
public Iterator<K> tailIterator(@NotNull final K key) {
return new Iterator<K>() {
private Stack<TreePos<K>> stack;
private boolean hasNext;
private boolean hasNextValid;
@Override
public boolean hasNext() {
if (hasNextValid) {
... | [
"Returns an iterator that iterates over all elements greater or equal to key in ascending order\n\n@param key key\n@return iterator"
] | [
"Adds an item to the list box, specifying an initial value for the item.\n\n@param value the item's value, to be submitted if it is part of a\n{@link FormPanel}; cannot be <code>null</code>\n@param text the text of the item to be added\n@param reload perform a 'material select' reload to update the DOM.",
"Ret... |
public void ifMemberTagValueEquals(String template, Properties attributes) throws XDocletException
{
if (getCurrentField() != null) {
if (isTagValueEqual(attributes, FOR_FIELD)) {
generate(template);
}
}
else if (getCurrentMethod() != null) {
... | [
"Evaluates the body if value for the member tag equals the specified value.\n\n@param template The body of the block tag\n@param attributes The attributes of the template tag\n@exception XDocletException If an error occurs\n@doc.tag type=\"block\"\n@doc.param ... | [
"Processes the template for the object cache 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\"",
"Sets the replace var map to single tar... |
void resolveBootUpdates(final ModelController controller, final ActiveOperation.CompletedCallback<ModelNode> callback) throws Exception {
connection.openConnection(controller, callback);
// Keep a reference to the the controller
this.controller = controller;
} | [
"Resolve the boot updates and register at the local HC.\n\n@param controller the model controller\n@param callback the completed callback\n@throws Exception for any error"
] | [
"Delivers the correct JSON Object for the target\n\n@param target\n@throws org.json.JSONException",
"Converts an object into a tab delimited string with given fields\nRequires the object has public access for the specified fields\n\n@param object Object to convert\n@param delimiter delimiter\n@param fieldNames fi... |
public SimpleFeatureCollection areaToFeatureCollection(
@Nonnull final MapAttribute.MapAttributeValues mapAttributes) {
Assert.isTrue(mapAttributes.areaOfInterest == this,
"map attributes passed in does not contain this area of interest object");
final SimpleFeatureTyp... | [
"Return the area polygon as the only feature in the feature collection.\n\n@param mapAttributes the attributes that this aoi is part of."
] | [
"Deletes the disabled marker file in the directory of the specified version.\n\n@param version to enable\n@throws PersistenceFailureException if the marker file could not be deleted (can happen if\nthe storage system has become read-only or is otherwise\ninaccessible).",
"Decode the String from Base64 into a byte... |
public static base_response update(nitro_service client, aaaparameter resource) throws Exception {
aaaparameter updateresource = new aaaparameter();
updateresource.enablestaticpagecaching = resource.enablestaticpagecaching;
updateresource.enableenhancedauthfeedback = resource.enableenhancedauthfeedback;
updater... | [
"Use this API to update aaaparameter."
] | [
"Add a column to be set to a value for UPDATE statements. This will generate something like 'columnName =\nexpression' where the expression is built by the caller.\n\n<p>\nThe expression should have any strings escaped using the {@link #escapeValue(String)} or\n{@link #escapeValue(StringBuilder, String)} methods an... |
private void processKnownType(FieldType type)
{
//System.out.println("Header: " + type);
//System.out.println(ByteArrayHelper.hexdump(m_data, m_dataOffset, 36, false, 16, ""));
GraphicalIndicator indicator = m_container.getCustomField(type).getGraphicalIndicator();
indicator.setFieldType(typ... | [
"Process a graphical indicator definition for a known type.\n\n@param type field type"
] | [
"Sets the whole day flag.\n@param isWholeDay flag, indicating if the event lasts whole days.",
"Access an attribute.\n\n@param type the attribute's type, not {@code null}\n@param key the attribute's key, not {@code null}\n@return the attribute value, or {@code null}.",
"Builder method for specifying the stack ... |
private Properties parseFile(File file) throws InvalidDeclarationFileException {
Properties properties = new Properties();
InputStream is = null;
try {
is = new FileInputStream(file);
properties.load(is);
} catch (Exception e) {
throw new InvalidDeclar... | [
"Parse the given file to obtains a Properties object.\n\n@param file\n@return a properties object containing all the properties present in the file.\n@throws InvalidDeclarationFileException"
] | [
"Can be overridden if you want to replace or supplement the debug handling for responses.\n\n@param responseCode\n@param inputStream",
"Adds format information to eval.",
"A static method that provides an easy way to create a list of a\ncertain parametric type.\nThis static constructor works better with generic... |
public static Type[] getActualTypeArguments(Type type) {
Type resolvedType = Types.getCanonicalType(type);
if (resolvedType instanceof ParameterizedType) {
return ((ParameterizedType) resolvedType).getActualTypeArguments();
} else {
return EMPTY_TYPES;
}
} | [
"Gets the actual type arguments of a Type\n\n@param type The type to examine\n@return The type arguments"
] | [
"Appends the query part for the facet to the query string.\n@param query The current query string.\n@param name The name of the facet parameter, e.g. \"limit\", \"order\", ....\n@param value The value to set for the parameter specified by name.",
"Extracts the data for a single file from the input stream and writ... |
public TwoDHashMap<K2, K3, V> getAs2d(final K1 firstKey) {
final HashMap<K2, HashMap<K3, V>> innerMap1 = map.get(firstKey);
if( innerMap1 != null ) {
return new TwoDHashMap<K2, K3, V>(innerMap1);
} else {
return new TwoDHashMap<K2, K3, V>();
}
} | [
"Fetch the outermost Hashmap as a TwoDHashMap.\n\n@param firstKey\nfirst key\n@return the the innermost hashmap"
] | [
"Adds the basic sentence.\n\n@param s the s\n@throws ParseException the parse exception",
"Converts Observable of list to Observable of Inner.\n@param innerList list to be converted.\n@param <InnerT> type of inner.\n@return Observable for list of inner.",
"Use this API to fetch auditnslogpolicy_systemglobal_bin... |
private String formatRelationList(List<Relation> value)
{
String result = null;
if (value != null && value.size() != 0)
{
StringBuilder sb = new StringBuilder();
for (Relation relation : value)
{
if (sb.length() != 0)
{
sb.append(m_... | [
"This method is called to format a relation list.\n\n@param value relation list instance\n@return formatted relation list"
] | [
"Retrieve the currently cached value for the given document.",
"Allows this closeable to be used within the closure, ensuring that it\nis closed once the closure has been executed and before this method returns.\n\n@param self the Closeable\n@param action the closure taking the Closeable as parameter\n@return the... |
public com.groupon.odo.proxylib.models.Method getMethodForOverrideId(int overrideId) {
com.groupon.odo.proxylib.models.Method method = null;
// special case for IDs < 0
if (overrideId < 0) {
method = new com.groupon.odo.proxylib.models.Method();
method.setId(overrideId);... | [
"Gets a method based on data in the override_db table\n\n@param overrideId ID of override\n@return Method found"
] | [
"Main method of RendererAdapter. This method has the responsibility of update the\nRendererBuilder values and create or recycle a new Renderer. Once the renderer has been\nobtained the RendereBuilder will call the render method in the renderer and will return the\nRenderer root view to the ListView.\n\nIf rRenderer... |
public void process(File file) throws Exception
{
openLogFile();
int blockIndex = 0;
int length = (int) file.length();
m_buffer = new byte[length];
FileInputStream is = new FileInputStream(file);
try
{
int bytesRead = is.read(m_buffer);
if (bytesRead != le... | [
"Read a FastTrack file.\n\n@param file FastTrack file"
] | [
"Gets a property from system, environment or an external map.\nThe lookup order is system > env > map > defaultValue.\n\n@param name\nThe name of the property.\n@param map\nThe external map.\n@param defaultValue\nThe value that should be used if property is not found.",
"Wrap an existing setter.",
"Get all cate... |
private Envelope getBoundsLocal(Filter filter) throws LayerException {
try {
Session session = getSessionFactory().getCurrentSession();
Criteria criteria = session.createCriteria(getFeatureInfo().getDataSourceName());
CriteriaVisitor visitor = new CriteriaVisitor((HibernateFeatureModel) getFeatureModel(), da... | [
"Bounds are calculated locally, can use any filter, but slower than native.\n\n@param filter\nfilter which needs to be applied\n@return the bounds of the specified features\n@throws LayerException\noops"
] | [
"A loop driver for applying operations to all primary ClassNodes in\nour AST. Automatically skips units that have already been processed\nthrough the current phase.",
"Returns the scene graph root.\n\nThis method is part of the wrapped API (see {@link AiWrapperProvider}\nfor details on wrappers).<p>\n\nThe built... |
private static long asciidump(InputStream is, PrintWriter pw) throws Exception
{
byte[] buffer = new byte[BUFFER_SIZE];
long byteCount = 0;
char c;
int loop;
int count;
StringBuilder sb = new StringBuilder();
while (true)
{
count = is.read(buffer);
... | [
"This method dumps the entire contents of a file to an output\nprint writer as ascii data.\n\n@param is Input Stream\n@param pw Output PrintWriter\n@return number of bytes read\n@throws Exception Thrown on file read errors"
] | [
"Send a request that expects a single message as its response, then read and return that response.\n\n@param requestType identifies what kind of request to send\n@param responseType identifies the type of response we expect, or {@code null} if we’ll accept anything\n@param arguments The argument fields to send in t... |
private static JSONArray parseDockers(ArrayList<Point> dockers) throws JSONException {
if (dockers != null) {
JSONArray dockersArray = new JSONArray();
for (Point docker : dockers) {
JSONObject dockerObject = new JSONObject();
dockerObject.put("x",
... | [
"Delivers the correct JSON Object for the dockers\n\n@param dockers\n@throws org.json.JSONException"
] | [
"Creates a slice for directly a raw memory address. This is\ninherently unsafe as it may be used to access arbitrary memory.\n\n@param address the raw memory address base\n@param size the size of the slice\n@return the unsafe slice",
"After obtaining a connection, perform additional tasks.\n@param handle\n@param ... |
protected Object getMacroBeanValue(Object bean, String property) {
Object result = null;
if ((bean != null) && CmsStringUtil.isNotEmptyOrWhitespaceOnly(property)) {
try {
PropertyUtilsBean propBean = BeanUtilsBean.getInstance().getPropertyUtils();
result = pr... | [
"Returns the property value read from the given JavaBean.\n\n@param bean the JavaBean to read the property from\n@param property the property to read\n\n@return the property value read from the given JavaBean"
] | [
"Demonstrates obtaining the request history data from a test run",
"Creates the tables according to the schema files.\n\n@throws PlatformException If some error occurred",
"Checks if the required option exists.\n\n@param options OptionSet to checked\n@param opt Required option to check\n@throws VoldemortExcepti... |
public static base_response expire(nitro_service client, cachecontentgroup resource) throws Exception {
cachecontentgroup expireresource = new cachecontentgroup();
expireresource.name = resource.name;
return expireresource.perform_operation(client,"expire");
} | [
"Use this API to expire cachecontentgroup."
] | [
"Shutdown the container.\n\n@see Weld#initialize()",
"Produces a string in which the lower 4 bytes are expressed as an IPv4 address and the remaining upper bytes are expressed in IPv6 format.\n\nThis the mixed IPv6/IPv4 format described in RFC 1884 https://tools.ietf.org/html/rfc1884\n\n@return",
"Adds the file... |
public static double ratioSmallestOverLargest( double []sv ) {
if( sv.length == 0 )
return Double.NaN;
double min = sv[0];
double max = min;
for (int i = 1; i < sv.length; i++) {
double v = sv[i];
if( v > max )
max = v;
el... | [
"Computes the ratio of the smallest value to the largest. Does not assume\nthe array is sorted first\n@param sv array\n@return smallest / largest"
] | [
"Gets the positions.\n\n@return the positions",
"Set the TimeSensor's cycleInterval property\nCurrently, this does not change the duration of the animation.\n@param newCycleInterval",
"Read custom property definitions for resources.\n\n@param gpResources GanttProject resources",
"Check whether the value is ma... |
@Override
public void close() {
// Use monitor to avoid race between external close and handler thread run()
synchronized (closeMonitor) {
// Close and clear streams, sockets etc.
if (socket != null) {
try {
// Terminates thread bloc... | [
"Resets the handler data to a basic state."
] | [
"Adds new connections to the partition.\n@param connectionsToCreate number of connections to create\n@throws InterruptedException",
"Converts milliseconds into a calendar object.\n\n@param millis a time given in milliseconds after epoch\n@return the calendar object for the given time",
"Specify the artifact con... |
public void switchDataSource(BoneCPConfig newConfig) throws SQLException {
logger.info("Switch to new datasource requested. New Config: "+newConfig);
DataSource oldDS = getTargetDataSource();
if (!(oldDS instanceof BoneCPDataSource)){
throw new SQLException("Unknown datasource type! Was expecting BoneCPDataS... | [
"Switch to a new DataSource using the given configuration.\n@param newConfig BoneCP DataSource to use.\n@throws SQLException"
] | [
"This creates a new audit log file with default permissions.\n\n@param file File to create",
"For internal use, don't call the public API internally",
"Convert a url to a file object. No checks are made to see if file exists but there are some hacks that\nare needed to convert uris to files across platforms.\n... |
public void destroy() throws Exception {
if (_clientId == null) {
return;
}
// delete the clientId here
String uri = BASE_PROFILE + uriEncode(_profileName) + "/" + BASE_CLIENTS + "/" + _clientId;
try {
doDelete(uri, null);
} catch (Exception e) {
... | [
"Call when you are done with the client\n\n@throws Exception"
] | [
"The nullity of the decomposed matrix.\n\n@see SingularOps_DDRM#nullity(SingularValueDecomposition_F64, double)\n\n@return The matrix's nullity",
"Adds the parent package to the java.protocol.handler.pkgs system property.",
"Removes the given value to the set.\n\n@return true if the value was actually removed",... |
private static String getHostname() {
if (Hostname == null) {
try {
Hostname = InetAddress.getLocalHost().getHostName();
} catch (Exception e) {
Hostname = "default";
LOGGER.warn("Can not get current hostname", e);
}
}
... | [
"Save current hostname and reuse it.\n\n@return hostname as String"
] | [
"Reads input data from a JSON file in the output directory.",
"Use this API to fetch all the systemeventhistory resources that are configured on netscaler.\nThis uses systemeventhistory_args which is a way to provide additional arguments while fetching the resources.",
"Runs a Story with the given configuration... |
public Where<T, ID> between(String columnName, Object low, Object high) throws SQLException {
addClause(new Between(columnName, findColumnFieldType(columnName), low, high));
return this;
} | [
"Add a BETWEEN clause so the column must be between the low and high parameters."
] | [
"Converts an absolute rectangle to a relative one wrt to the current coordinate system.\n\n@param rect absolute rectangle\n@return relative rectangle",
"Returns all tags that designate this tag. E.g., for \"tesla-model3\", this would return \"car\", \"vehicle\", \"vendor-tesla\" etc.",
"Changes the given filena... |
private void writeExceptions9(List<Project.Calendars.Calendar.WeekDays.WeekDay> dayList, List<ProjectCalendarException> exceptions)
{
for (ProjectCalendarException exception : exceptions)
{
boolean working = exception.getWorking();
Project.Calendars.Calendar.WeekDays.WeekDay day = m_fa... | [
"Write exceptions in the format used by MSPDI files prior to Project 2007.\n\n@param dayList list of calendar days\n@param exceptions list of exceptions"
] | [
"Checks if there's exactly one option that exists among all opts.\n\n@param options OptionSet to checked\n@param opts List of options to be checked\n@throws VoldemortException",
"Login the user and redirect back to original URL. If no\noriginal URL found then redirect to `defaultLandingUrl`.\n\n@param userIdentif... |
public void setFirstOccurence(int min, int max) throws ParseException {
if (fullCondition == null) {
if ((min < 0) || (min > max) || (max < 1)) {
throw new ParseException("Illegal number {" + min + "," + max + "}");
}
if (min == 0) {
firstOptional = true;
}
firstMinimum... | [
"Sets the first occurence.\n\n@param min the min\n@param max the max\n@throws ParseException the parse exception"
] | [
"Sets a JSON String as a request entity.\n\n@param connnection The request of {@link HttpConnection}\n@param body The JSON String to set.",
"Sets the SCXML model with an InputStream\n\n@param inputFileStream the model input stream",
"Create and return a new Violation for this rule and the specified value... |
private List<Event> filterEvents(List<Event> events) {
List<Event> filteredEvents = new ArrayList<Event>();
for (Event event : events) {
if (!filter(event)) {
filteredEvents.add(event);
}
}
return filteredEvents;
} | [
"Filter events.\n\n@param events the events\n@return the list of filtered events"
] | [
"Create a MfClientHttpRequestFactory for adding the specified headers.\n\n@param requestFactory the basic request factory. It should be unmodified and just wrapped with\na proxy class.\n@param matchers The matchers.\n@param headers The headers.\n@return",
"Get a System property by its name.\n\n@param name the na... |
public static base_response unset(nitro_service client, inatparam resource, String[] args) throws Exception{
inatparam unsetresource = new inatparam();
return unsetresource.unset_resource(client,args);
} | [
"Use this API to unset the properties of inatparam resource.\nProperties that need to be unset are specified in args array."
] | [
"Determine if a CharSequence can be parsed as a BigDecimal.\n\n@param self a CharSequence\n@return true if the CharSequence can be parsed\n@see #isBigDecimal(String)\n@since 1.8.2",
"Reopen the associated static logging stream. Set to null to redirect to System.out.",
"Use this API to fetch wisite_binding resou... |
protected void aliasGeneric( Object variable , String name ) {
if( variable.getClass() == Integer.class ) {
alias(((Integer)variable).intValue(),name);
} else if( variable.getClass() == Double.class ) {
alias(((Double)variable).doubleValue(),name);
} else if( variable.get... | [
"Aliases variables with an unknown type.\n@param variable The variable being aliased\n@param name Name of the variable"
] | [
"Returns a new analysis context builder that extracts the information about the available extensions from\nthe provided Revapi instance.\n\n<p>The extensions have to be known so that both old and new style of configuration can be usefully worked with.\n\n@param revapi the revapi instance to read the available exten... |
public static <T> void filterListToMap(final Map<String, T> destinationMap, final String[] nameMapping,
final List<? extends T> sourceList) {
if( destinationMap == null ) {
throw new NullPointerException("destinationMap should not be null");
} else if( nameMapping == null ) {
throw new NullPointerException(... | [
"Converts a List to a Map using the elements of the nameMapping array as the keys of the Map.\n\n@param destinationMap\nthe destination Map (which is cleared before it's populated)\n@param nameMapping\nthe keys of the Map (corresponding with the elements in the sourceList). Cannot contain duplicates.\n@param source... | [
"Add a value to this activity code.\n\n@param uniqueID value unique ID\n@param name value name\n@param description value description\n@return ActivityCodeValue instance",
"Use this API to expire cachecontentgroup resources.",
"Retrieves the members of the given type.\n\n@param memberNames Will receive th... |
public boolean hasUppercaseVariations(int base, boolean lowerOnly) {
if(base > 10) {
int count = getSegmentCount();
for(int i = 0; i < count; i++) {
IPv6AddressSegment seg = getSegment(i);
if(seg.hasUppercaseVariations(base, lowerOnly)) {
return true;
}
}
}
return false;
} | [
"Returns whether this subnet or address has alphabetic digits when printed.\n\nNote that this method does not indicate whether any address contained within this subnet has alphabetic digits,\nonly whether the subnet itself when printed has alphabetic digits.\n\n@return whether the section has alphabetic digits when... | [
"Computes A-B\n\n@param listA\n@param listB\n@return",
"Update the descriptor content with values from the editor.\n@throws CmsXmlException thrown if update fails due to a wrong XML structure (should never happen)",
"Use this API to update snmpuser resources.",
"Get the last non-white X point\n@param img Imag... |
private static char[] buildTable() {
char[] table = new char[26];
for (int ix = 0; ix < table.length; ix++)
table[ix] = '0';
table['B' - 'A'] = '1';
table['P' - 'A'] = '1';
table['F' - 'A'] = '1';
table['V' - 'A'] = '1';
table['C' - 'A'] = '2';
table['S' - 'A'] = '2';
table['K'... | [
"Builds the mapping table."
] | [
"Populates the project header.\n\n@param record MPX record\n@param properties project properties\n@throws MPXJException",
"Merges the immutable container types of this Configuration with the given\nConfiguration.\n\nThe resultant immutable container types results will be the union of the two sets of\nimmutable co... |
private void onChangedImpl(final int preferableCenterPosition) {
for (ListOnChangedListener listener: mOnChangedListeners) {
listener.onChangedStart(this);
}
Log.d(Log.SUBSYSTEM.LAYOUT, TAG, "onChangedImpl(%s): items [%d] views [%d] mLayouts.size() = %d " +
"... | [
"This method is called if the data set has been changed. Subclasses might want to override\nthis method to add some extra logic.\n\nGo through all items in the list:\n- reuse the existing views in the list\n- add new views in the list if needed\n- trim the unused views\n- request re-layout\n\n@param preferableCente... | [
"Throws one RendererException if the viewType, layoutInflater or parent are null.",
"Retrieve the result produced by a task with the given id in the group.\n\nThis method can be used to retrieve the result of invocation of both dependency\nand \"post-run\" dependent tasks. If task with the given id does not exist... |
public static BMatrixRMaj randomBinary(int numRow , int numCol , Random rand ) {
BMatrixRMaj mat = new BMatrixRMaj(numRow,numCol);
setRandomB(mat, rand);
return mat;
} | [
"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."
] | [
"Flush this log file to the physical disk\n\n@throws IOException file read error",
"Do not call directly.\n@deprecated",
"Creates the next permutation in the sequence.\n\n@return An array containing the permutation. The returned array is modified each time this function is called.",
"Find the scheme to use t... |
private List<ResourceField> getAllResourceExtendedAttributes()
{
ArrayList<ResourceField> result = new ArrayList<ResourceField>();
result.addAll(Arrays.asList(ResourceFieldLists.CUSTOM_TEXT));
result.addAll(Arrays.asList(ResourceFieldLists.CUSTOM_START));
result.addAll(Arrays.asList(ResourceF... | [
"Retrieve list of resource extended attributes.\n\n@return list of extended attributes"
] | [
"Use this API to Import responderhtmlpage.",
"Converts this update description to its document representation as it would appear in a\nMongoDB Change Event.\n\n@return the update description document as it would appear in a change event",
"Returns an iterator over the items in this collection.\n@return an itera... |
public static void applyDecidedIconOrSetGone(ImageHolder imageHolder, ImageView imageView, int iconColor, boolean tint) {
if (imageHolder != null && imageView != null) {
Drawable drawable = ImageHolder.decideIcon(imageHolder, imageView.getContext(), iconColor, tint);
if (drawable != null... | [
"decides which icon to apply or hide this view\n\n@param imageHolder\n@param imageView\n@param iconColor\n@param tint"
] | [
"Adds a shutdown hook for the process.\n\n@param process the process to add a shutdown hook for\n\n@return the thread set as the shutdown hook\n\n@throws java.lang.SecurityException If a security manager is present and it denies {@link\njava.lang.RuntimePermission <code>RuntimePermission(\"shutdownHooks\")</code>}"... |
private static Interval parseStartExtended(CharSequence startStr, CharSequence endStr) {
Instant start = Instant.parse(startStr);
if (endStr.length() > 0) {
char c = endStr.charAt(0);
if (c == 'P' || c == 'p') {
PeriodDuration amount = PeriodDuration.parse(endStr)... | [
"handle case where Instant is outside the bounds of OffsetDateTime"
] | [
"Sets the ssh password.\n\n@param password\nthe password\n@return the parallel task builder",
"Attachments are only structurally different if one step has an inline attachment\nand the other step either has no inline attachment or the inline attachment is\ndifferent.",
"The Cost Variance field shows the differe... |
private void waitForOutstandingRequest() throws IOException {
if (outstandingRequest == null) {
return;
}
try {
RetryHelper.runWithRetries(new Callable<Void>() {
@Override
public Void call() throws IOException, InterruptedException {
if (RetryHelper.getContext().getAtte... | [
"Waits for the current outstanding request retrying it with exponential backoff if it fails.\n\n@throws ClosedByInterruptException if request was interrupted\n@throws IOException In the event of FileNotFoundException, MalformedURLException\n@throws RetriesExhaustedException if exceeding the number of retries"
] | [
"Reads a row of a CSV file and populates the bean, using the supplied name mapping to map column values to the\nappropriate fields. If processors are supplied then they are used, otherwise the raw String values will be used.\n\n@param bean\nthe bean to populate\n@param nameMapping\nthe name mapping array\n@param pr... |
private NodeList getNodeList(String document, XPathExpression expression) throws Exception
{
Document doc = m_documentBuilder.parse(new InputSource(new StringReader(document)));
return (NodeList) expression.evaluate(doc, XPathConstants.NODESET);
} | [
"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"
] | [
"Remove an active operation.\n\n@param id the operation id\n@return the removed active operation, {@code null} if there was no registered operation",
"When creating barcode columns\n@return",
"Returns whether this host should ignore operations from the master domain controller that target\nthe given address.\n\... |
public void setTargetDirectory(String directory) {
if (directory != null && directory.length() > 0) {
this.targetDirectory = new File(directory);
} else {
this.targetDirectory = null;
}
} | [
"Sets the target directory."
] | [
"Retrieves the project start date. If an explicit start date has not been\nset, this method calculates the start date by looking for\nthe earliest task start date.\n\n@return project start date",
"Serialize a map of objects to a JSON String.\n\n@param map The map of objects to serialize.\n@param jsonObjectClass T... |
protected void onNewParentObject(GVRSceneObject parent) {
for (GVRComponent comp : mComponents.values()) {
comp.onNewOwnersParent(parent);
}
} | [
"Called when the scene object gets a new parent.\n\n@param parent New parent of this scene object."
] | [
"Calculate the value of a CMS option using the Black-Scholes model for the swap rate together with\nthe Hunt-Kennedy convexity adjustment.\n\n@param forwardSwaprate The forward swap rate\n@param volatility Volatility of the log of the swap rate\n@param swapAnnuity The swap annuity\n@param optionMaturity The option ... |
public static rsskeytype get(nitro_service service) throws Exception{
rsskeytype obj = new rsskeytype();
rsskeytype[] response = (rsskeytype[])obj.get_resources(service);
return response[0];
} | [
"Use this API to fetch all the rsskeytype resources that are configured on netscaler."
] | [
"Attempts to detect the provided pattern as an exact match.\n@param pattern the pattern to find in the reader stream\n@return the number of times the pattern is found,\nor an error code\n@throws MalformedPatternException if the pattern is invalid\n@throws Exception if a generic error is encountered",
"Synchronize... |
private void sendOneAsyncHint(final ByteArray slopKey,
final Versioned<byte[]> slopVersioned,
final List<Node> nodesToTry) {
Node nodeToHostHint = null;
boolean foundNode = false;
while(nodesToTry.size() > 0) {
nodeT... | [
"A callback that handles requestComplete event from NIO selector manager\nWill try any possible nodes and pass itself as callback util all nodes\nare exhausted\n\n@param slopKey\n@param slopVersioned\n@param nodesToTry List of nodes to try to contact. Will become shorter\nafter each callback"
] | [
"Adds an ORDER BY item with a direction indicator.\n\n@param name\nName of the column by which to sort.\n@param ascending\nIf true, specifies the direction \"asc\", otherwise, specifies\nthe direction \"desc\".",
"Access all of the elements of the collection that evaluate to true for the\nprovided query predicate... |
public static Cluster cloneCluster(Cluster cluster) {
// Could add a better .clone() implementation that clones the derived
// data structures. The constructor invoked by this clone implementation
// can be slow for large numbers of partitions. Probably faster to copy
// all the maps and... | [
"Clones the cluster by constructing a new one with same name, partition\nlayout, and nodes.\n\n@param cluster\n@return clone of Cluster cluster."
] | [
"Processes an anonymous field definition specified at the class level.\n\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\n@doc.tag type=\"content\"\n@doc.param name=\"attributes\" optional=\"true\" description=\"Attribute... |
public Project dependsOnArtifact(Artifact artifact)
{
Project project = new Project();
project.setArtifact(artifact);
project.setInputVariablesName(inputVarName);
return project;
} | [
"Specify the artifact configuration to be searched for\n@param artifact configured artifact object\n@return"
] | [
"Resize the given mesh keeping its aspect ration.\n@param mesh Mesh to be resized.\n@param size Max size for the axis.",
"Use this API to fetch vpnvserver_appcontroller_binding resources of given name .",
"Stop finding beat grids for all active players.",
"Returns true if\n- includeTags is not empty and tag i... |
static void produceInputStreamWithEntry( final DataConsumer consumer,
final InputStream inputStream,
final TarArchiveEntry entry ) throws IOException {
try {
consumer.onEachFile(inputStream, entry);
} f... | [
"Feeds input stream to data consumer using metadata from tar entry.\n@param consumer the consumer\n@param inputStream the stream to feed\n@param entry the entry to use for metadata\n@throws IOException on consume error"
] | [
"Determines storage overhead and returns pretty printed summary.\n\n@param finalNodeToOverhead Map of node IDs from final cluster to number\nof partition-stores to be moved to the node.\n@return pretty printed string summary of storage overhead.",
"Log an audit record of this operation.",
"Inserts an array of P... |
public GeoPolygon addHoles(List<List<GeoPoint>> holes) {
Contracts.assertNotNull( holes, "holes" );
this.rings.addAll( holes );
return this;
} | [
"Adds new holes to the polygon.\n\n@param holes holes, must be contained in the exterior ring and must not overlap or\nintersect another hole\n@return this for chaining"
] | [
"Dumps an animation channel to stdout.\n\n@param nodeAnim the channel",
"Summarizes balance for the given nodeId to PartitionCount.\n\n@param nodeIdToPartitionCount\n@param title for use in pretty string\n@return Pair: getFirst() is utility value to be minimized, getSecond() is\npretty summary string of balance",... |
public static void checkFloatNotNaNOrInfinity(String parameterName,
float data) {
if (Float.isNaN(data) || Float.isInfinite(data)) {
throw Exceptions.IllegalArgument(
"%s should never be NaN or Infinite.", parameterName);
}
} | [
"In common shader cases, NaN makes little sense. Correspondingly, GVRF is\ngoing to use Float.NaN as illegal flag in many cases. Therefore, we need\na function to check if there is any setX that is using NaN as input.\n\n@param parameterName\nThe name of the user-supplied parameter that we are validating\nso that t... | [
"Gets a collection of photo counts for the given date ranges for the calling user.\n\nThis method requires authentication with 'read' permission.\n\n@param dates\nAn array of dates, denoting the periods to return counts for. They should be specified smallest first.\n@param takenDates\nAn array of dates, denoting th... |
private double getExpectedProbability(double x)
{
double y = 1 / (standardDeviation * Math.sqrt(Math.PI * 2));
double z = -(Math.pow(x - mean, 2) / (2 * Math.pow(standardDeviation, 2)));
return y * Math.exp(z);
} | [
"This is the probability density function for the Gaussian\ndistribution."
] | [
"Function to go through all the store definitions contained in the STORES\ndirectory and\n\n1. Update metadata cache.\n\n2. Update STORES_KEY by stitching together all these keys.\n\n3. Update 'storeNames' list.\n\nThis method is not thread safe. It is expected that the caller of this\nmethod will correctly handle ... |
private boolean checkConverged(DMatrixRMaj A) {
double worst = 0;
double worst2 = 0;
for( int j = 0; j < A.numRows; j++ ) {
double val = Math.abs(q2.data[j] - q0.data[j]);
if( val > worst ) worst = val;
val = Math.abs(q2.data[j] + q0.data[j]);
if( ... | [
"Test for convergence by seeing if the element with the largest change\nis smaller than the tolerance. In some test cases it alternated between\nthe + and - values of the eigen vector. When this happens it seems to have \"converged\"\nto a non-dominant eigen vector. At least in the case I looked at. I haven't... | [
"Adds a node to this graph.\n\n@param node the node",
"Appends the query part for the facet to the query string.\n@param query The current query string.\n@param name The name of the facet parameter, e.g. \"limit\", \"order\", ....\n@param value The value to set for the parameter specified by name.",
"Returns IM... |
public FilePath getModuleRoot(Map<String, String> globalEnv) throws IOException, InterruptedException {
FilePath someWorkspace = project.getSomeWorkspace();
if (someWorkspace == null) {
throw new IllegalStateException("Couldn't find workspace");
}
Map<String, String> workspa... | [
"Get the root path where the build is located, the project may be checked out to\na sub-directory from the root workspace location.\n\n@param globalEnv EnvVars to take the workspace from, if workspace is not found\nthen it is take from project.getSomeWorkspace()\n@return The location of the root of the Gradle build... | [
"Converts this object to JSON.\n\n@return the JSON representation\n\n@throws JSONException if JSON operations fail",
"Set the horizontal and vertical alignment for the image when image gets cropped by resizing.\n\n@param valign Vertical alignment.\n@param halign Horizontal alignment.\n@throws IllegalStateExceptio... |
public T addModule(final String moduleName, final String slot, final byte[] newHash) {
final ContentItem item = createModuleItem(moduleName, slot, newHash);
addContentModification(createContentModification(item, ModificationType.ADD, NO_CONTENT));
return returnThis();
} | [
"Add a module.\n\n@param moduleName the module name\n@param slot the module slot\n@param newHash the new hash of the added content\n@return the builder"
] | [
"Lock the given region. Does not report failures.",
"Returns a list of resource wrappers created from the input list of resources.\n\n@param cms the current OpenCms user context\n@param list the list to create the resource wrapper list from\n\n@return the list of wrapped resources.",
"Logs an error message for... |
@Override
@SuppressWarnings("unchecked")
public ChronoZonedDateTime<Symmetry454Date> zonedDateTime(TemporalAccessor temporal) {
return (ChronoZonedDateTime<Symmetry454Date>) super.zonedDateTime(temporal);
} | [
"Obtains a Symmetry454 zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Symmetry454 zoned date-time, not null\n@throws DateTimeException if unable to create the date-time"
] | [
"Ensures that the element is child element of the parent element.\n\n@param parentElement the parent xml dom element\n@param childElement the child element\n@throws SpinXmlElementException if the element is not child of the parent element",
"Use this API to fetch sslcertkey_crldistribution_binding resources of gi... |
private boolean isDescriptorProperty(Object property) {
return (getBundleType().equals(BundleType.DESCRIPTOR)
|| (hasDescriptor()
&& (property.equals(TableProperty.KEY)
|| property.equals(TableProperty.DEFAULT)
|| property.equals(TableProperty... | [
"Check if values in the column \"property\" are written to the bundle descriptor.\n@param property the property id of the table column.\n@return a flag, indicating if values of the table column are stored to the bundle descriptor."
] | [
"Clear tmpData in subtree rooted in this node.",
"Determine the raw type for the given generic parameter type.\n@param genericType the generic type to resolve\n@param typeVariableMap the TypeVariable Map to resolved against\n@return the resolved raw type",
"Retrieve the details of a single project from the data... |
public static long getGcTimestamp(String zookeepers) {
ZooKeeper zk = null;
try {
zk = new ZooKeeper(zookeepers, 30000, null);
// wait until zookeeper is connected
long start = System.currentTimeMillis();
while (!zk.getState().isConnected() && System.currentTimeMillis() - start < 30000)... | [
"Retrieves the GC timestamp, set by the Oracle, from zookeeper\n\n@param zookeepers Zookeeper connection string\n@return Oldest active timestamp or oldest possible ts (-1) if not found"
] | [
"Log a warning for the given operation at the provided address for the given attributes, using the provided detail\nmessage.\n\n@param address where warning occurred\n@param operation where which problem occurred\n@param message custom error message to append\n@param attributes attributes we that have proble... |
public Collection<Method> getAllMethods(String name) {
final Map<ParamList, Map<Class<?>, Method>> nameMap = methods.get(name);
if (nameMap == null) {
return Collections.emptySet();
}
final Collection<Method> methods = new ArrayList<Method>();
for (Map<Class<?>, Metho... | [
"Get a collection of methods declared on this object by method name.\n\n@param name the name of the method\n@return the (possibly empty) collection of methods with the given name"
] | [
"Performs the conversion from standard XPath to xpath with parameterization support.",
"Helper function to create JsonArray from collection.\n\n@param values collection of values to convert to JsonArray\n@return JsonArray with collection values",
"Produces an IPv4 address section from any sequence of bytes in t... |
public void setAngularLowerLimits(float limitX, float limitY, float limitZ) {
Native3DGenericConstraint.setAngularLowerLimits(getNative(), limitX, limitY, limitZ);
} | [
"Sets the lower limits for the \"moving\" body rotation relative to joint point.\n\n@param limitX the X axis lower rotation limit (in radians)\n@param limitY the Y axis lower rotation limit (in radians)\n@param limitZ the Z axis lower rotation limit (in radians)"
] | [
"Returns the context menu for the table item.\n@param itemId the table item.\n@return the context menu for the given item.",
"This is an assertion method that can be used by a thread to confirm that\nthe thread isn't already holding lock for an object, before acquiring a\nlock\n\n@param object\nobject to test for... |
public void processStencilSet() throws IOException {
StringBuilder stencilSetFileContents = new StringBuilder();
Scanner scanner = null;
try {
scanner = new Scanner(new File(ssInFile),
"UTF-8");
String currentLine = "";
Strin... | [
"Processes a stencilset template file\n@throws IOException"
] | [
"Obtain the master partition for a given key\n\n@param key\n@return master partition id",
"Use this API to unset the properties of snmpmanager resource.\nProperties that need to be unset are specified in args array.",
"if |a11-a22| >> |a12+a21| there might be a better way. see pg371",
"Process StepStartedEve... |
public static String getStringOption(Map<String, String> configOptions, String optionKey, String defaultValue) {
String result = configOptions.get(optionKey);
return null != result ? result : defaultValue;
} | [
"Returns the value of an option, or the default if the value is null or the key is not part of the map.\n@param configOptions the map with the config options.\n@param optionKey the option to get the value of\n@param defaultValue the default value to return if the option is not set.\n@return the value of an option, ... | [
"Invert by solving for against an identity matrix.\n\n@param A_inv Where the inverted matrix saved. Modified.",
"Add the string representation of the given object to this sequence at the given index. The given indentation will\nbe prepended to each line except the first one if the object has a multi-line string r... |
public DockerContainerObjectBuilder<T> withEnrichers(Collection<TestEnricher> enrichers) {
if (enrichers == null) {
throw new IllegalArgumentException("enrichers cannot be null");
}
this.enrichers = enrichers;
return this;
} | [
"Specifies the list of enrichers that will be used to enrich the container object.\n\n@param enrichers\nlist of enrichers that will be used to enrich the container object\n\n@return the current builder instance"
] | [
"Removes a set of calendar hours from the day to which they\nare currently attached.\n\n@param hours calendar hours instance",
"Sets the final transform of the bone during animation.\n\n@param finalTransform The transform matrix representing\nthe bone's pose after computing the skeleton.",
"Use this API to upda... |
protected void processDeletions(CmsObject cms, List<CmsResource> toDelete) throws CmsException {
Collections.sort(toDelete, (a, b) -> b.getRootPath().compareTo(a.getRootPath()));
for (CmsResource deleteRes : toDelete) {
m_report.print(
org.opencms.importexport.Messages.get()... | [
"Handles the file deletions.\n\n@param cms the CMS context to use\n@param toDelete the resources to delete\n\n@throws CmsException if something goes wrong"
] | [
"Reconnect to the HC.\n\n@return whether the server is still in sync\n@throws IOException",
"compares two AST nodes",
"Check position type.\n\n@param type the type\n@return the boolean",
"converts Map of data to json string\n\n@param data map data to converted to json\n@return {@link String}",
"Start with s... |
public String calculateCacheKey(String sql, int[] columnIndexes) {
StringBuilder tmp = new StringBuilder(sql.length()+4);
tmp.append(sql);
for (int i=0; i < columnIndexes.length; i++){
tmp.append(columnIndexes[i]);
tmp.append("CI,");
}
return tmp.toString();
} | [
"Calculate a cache key.\n@param sql to use\n@param columnIndexes to use\n@return cache key to use."
] | [
"Use this API to fetch statistics of tunnelip_stats resource of given name .",
"Test the list of TimephasedWork instances to see\nif any of them have been modified.\n\n@param list list of TimephasedWork instances\n@return boolean flag",
"Use this API to fetch aaapreauthenticationpolicy_aaaglobal_binding resourc... |
public static String retrieveVendorId() {
if (MapboxTelemetry.applicationContext == null) {
return updateVendorId();
}
SharedPreferences sharedPreferences = obtainSharedPreferences(MapboxTelemetry.applicationContext);
String mapboxVendorId = sharedPreferences.getString(MAPBOX_SHARED_PREFERENCE_KE... | [
"Do not call this method outside of activity!!!"
] | [
"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.",
"Generate an IKVM map file.\n\n@param mapFileName map file ... |
public static void main(String[] args) throws IOException, ClassNotFoundException {
CoNLLDocumentReaderAndWriter f = new CoNLLDocumentReaderAndWriter();
f.init(new SeqClassifierFlags());
int numDocs = 0;
int numTokens = 0;
int numEntities = 0;
String lastAnsBase = "";
for (Iterator<Li... | [
"Count some stats on what occurs in a file."
] | [
"Find the next match of the pattern on the tree\n\n@return whether there is a match somewhere in the tree",
"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} valu... |
public ParallelTaskBuilder prepareHttpGet(String url) {
reinitIfClosed();
ParallelTaskBuilder cb = new ParallelTaskBuilder();
cb.getHttpMeta().setHttpMethod(HttpMethod.GET);
cb.getHttpMeta().setRequestUrlPostfix(url);
return cb;
} | [
"Prepare a parallel HTTP GET Task.\n\n@param url\nthe UrlPostfix: e.g. in http://localhost:8080/index.html.,the url is \"/index.html\"\n@return the parallel task builder"
] | [
"Given an array of variable names, returns an Xml String\nof values.\n\n@param dataMap an map containing variable names and their corresponding values\nnames.\n@param dataMap\n@return values in Xml format",
"Get a store definition from the given list of store definitions\n\n@param list A list of store definitions... |
public static boolean isSuccess(JsonRtn jsonRtn) {
if (jsonRtn == null) {
return false;
}
String errCode = jsonRtn.getErrCode();
if (StringUtils.isEmpty(errCode) || StringUtils.equals(WECHAT_JSON_RTN_SUCCESS_CODE, errCode)) {
return true;
}
retur... | [
"return request is success by JsonRtn object\n\n@param jsonRtn\n@return"
] | [
"Get the Operation metadata for an MBean by name.\n@return the {@link Map} of {@link String} operation names to {@link MBeanOperationInfo} values.",
"Removes all items from the list box.",
"Return all scripts of a given type\n\n@param type integer value of type\n@return Array of scripts of the given type",
"M... |
public static final Long date2utc(Date date) {
// use null for a null date
if (date == null) return null;
long time = date.getTime();
// remove the timezone offset
time -= timezoneOffsetMillis(date);
return time;
} | [
"Converts a gwt Date in the timezone of the current browser to a time in\nUTC.\n\n@return A Long corresponding to the number of milliseconds since January\n1, 1970, 00:00:00 GMT or null if the specified Date is null."
] | [
"Use this API to delete gslbservice of given name.",
"Calls the specified Stitch function, and decodes the response into an instance of the specified\ntype. The response will be decoded using the codec registry given.\n\n@param name the name of the Stitch function to call.\n@param args the arguments to pass to th... |
@Override
public CrawlSession call() {
Injector injector = Guice.createInjector(new CoreModule(config));
controller = injector.getInstance(CrawlController.class);
CrawlSession session = controller.call();
reason = controller.getReason();
return session;
} | [
"Runs Crawljax with the given configuration.\n\n@return The {@link CrawlSession} once the Crawl is done."
] | [
"Get the bean if it exists in the contexts.\n\n@return An instance of the bean\n@throws ContextNotActiveException if the context is not active\n@see javax.enterprise.context.spi.Context#get(BaseBean, boolean)",
"Stop a timer of the given string name for the current thread. If no such\ntimer exists, -1 will be ret... |
public static void normalizeF( DMatrixRMaj A ) {
double val = normF(A);
if( val == 0 )
return;
int size = A.getNumElements();
for( int i = 0; i < size; i++) {
A.div(i , val);
}
} | [
"Normalizes the matrix such that the Frobenius norm is equal to one.\n\n@param A The matrix that is to be normalized."
] | [
"Update which options are shown.\n@param showModeSwitch flag, indicating if the mode switch should be shown.\n@param showAddKeyOption flag, indicating if the \"Add key\" row should be shown.",
"Dump data for all non-summary tasks to stdout.\n\n@param name file name",
"Returns all the Artifacts of the module\n\n... |
private float max(float x, float y, float z) {
if (x > y) {
// not y
if (x > z) {
return x;
}
else {
return z;
}
}
else {
// not x
if (y > z) {
return y;
... | [
"misc utility methods"
] | [
"adds the qualified names to the export-package attribute, if not already\npresent.\n\n@param packages - passing parameterized packages is not supported",
"Calculates Tangent value of the complex number.\n\n@param z1 A ComplexNumber instance.\n@return Returns new ComplexNumber instance containing the Tangent valu... |
private void readTasks(Project gpProject)
{
Tasks tasks = gpProject.getTasks();
readTaskCustomPropertyDefinitions(tasks);
for (net.sf.mpxj.ganttproject.schema.Task task : tasks.getTask())
{
readTask(m_projectFile, task);
}
} | [
"Read the top level tasks from GanttProject.\n\n@param gpProject GanttProject project"
] | [
"Isn't there a method for this in GeoTools?\n\n@param crs\nCRS string in the form of 'EPSG:<srid>'.\n@return SRID as integer.",
"rollback the transaction",
"Use this API to fetch appfwpolicylabel_binding resource of given name .",
"Inserts a CharSequence array value into the mapping of the underlying Bundle, ... |
public static double I(int n, double x) {
if (n < 0)
throw new IllegalArgumentException("the variable n out of range.");
else if (n == 0)
return I0(x);
else if (n == 1)
return I(x);
if (x == 0.0)
return 0.0;
double ACC ... | [
"Bessel function of the first kind, of order n.\n\n@param n Order.\n@param x Value.\n@return I value."
] | [
"Updates the information about the user status for this terms of service with any info fields that have\nbeen modified locally.\n@param info the updated info.",
"parse the stencil out of a JSONObject and set it to the current shape\n@param modelJSON\n@param current\n@throws org.json.JSONException",
"Returns all... |
public <T> T convert(Object source, TypeReference<T> typeReference)
throws ConverterException {
return (T) convert(new ConversionContext(), source, typeReference);
} | [
"Convert an object to another object with given type\n\n@param <T>\n@param source\nobject to convert\n@param typeReference\nreference to {@link java.lang.reflect.Type}\n@return the converted object if conversion failed\n@throws ConverterException"
] | [
"Writes the specified double to the stream, formatted according to the format specified in the constructor.\n\n@param d the double to write to the stream\n@return this writer\n@throws IOException if an I/O error occurs",
"Changes the vertex buffer associated with this mesh.\n@param vbuf new vertex buffer to use\n... |
@Override
public void checkin(K key, V resource) {
super.checkin(key, resource);
// NB: Blocking checkout calls for synchronous requests get the resource
// checked in above before processQueueLoop() attempts checkout below.
// There is therefore a risk that asynchronous requests wil... | [
"Check the given resource back into the pool\n\n@param key The key for the resource\n@param resource The resource"
] | [
"Use this API to count dnszone_domain_binding resources configued on NetScaler.",
"Get a property as a string or defaultValue.\n\n@param key the property name\n@param defaultValue the default value",
"Mark content as obsolete. If content was already marked for obsolescenceTimeout ms then it is removed.\n\n@para... |
public static List<Integer> checkKeyBelongsToPartition(byte[] key,
Set<Pair<Integer, HashMap<Integer, List<Integer>>>> stealerNodeToMappingTuples,
Cluster cluster,
... | [
"Given a key and a list of steal infos give back a list of stealer node\nids which will steal this.\n\n@param key Byte array of key\n@param stealerNodeToMappingTuples Pairs of stealer node id to their\ncorresponding [ partition - replica ] tuples\n@param cluster Cluster metadata\n@param storeDef Store definitions\n... | [
"Filters all exceptions from the provided dates.\n@param dates the dates to filter.\n@return the provided dates, except the ones that match some exception.",
"Stops the background stream thread.",
"Flush the in-memory data to the file",
"rollback the transaction",
"Read all task relationships from a Concept... |
public boolean accept(String str) {
int k = str.length() - 1;
char c = str.charAt(k);
while (k >= 0 && !Character.isDigit(c)) {
k--;
if (k >= 0) {
c = str.charAt(k);
}
}
if (k < 0) {
return false;
}
int j = k;
c = str.charAt(j);
while (j ... | [
"Checks whether a String satisfies the number range selection filter.\nThe test is evaluated based on the rightmost natural number found in\nthe String. Note that this is just evaluated on the String as given.\nIt is not trying to interpret it as a filename and to decide whether\nthe file exists, is a directory o... | [
"If the user has not specified a project ID, this method\nretrieves the ID of the first project in the file.",
"Simple info message for status\n\n@param tag Message to print out at start of info message",
"Returns all factory instances that match the query.\n\n@param query the factory query, not null.\n@return ... |
@JsonIgnore
public void setUnknownFields(final Map<String,Object> unknownFields) {
this.unknownFields.clear();
this.unknownFields.putAll(unknownFields);
} | [
"Set all unknown fields\n@param unknownFields the new unknown fields"
] | [
"Given a GanttProject priority value, turn this into an MPXJ Priority instance.\n\n@param gpPriority GanttProject priority\n@return Priority instance",
"Read the values from the output object and write them to the values object.\n\n@param output the output object from a processor\n@param processor the processor t... |
protected static JSONObject getDefaultProfile() throws Exception {
String uri = DEFAULT_BASE_URL + BASE_PROFILE;
try {
JSONObject response = new JSONObject(doGet(uri, 60000));
JSONArray profiles = response.getJSONArray("profiles");
if (profiles.length() > 0) {
... | [
"get the default profile\n\n@return representation of default profile\n@throws Exception exception"
] | [
"Retrieves the constructor that is used by OJB to create instances of the given collection proxy\nclass.\n\n@param proxyClass The proxy class\n@param baseType The required base type of the proxy class\n@param typeDesc The type of collection proxy\n@return The constructor",
"Queues up a callback to be removed and ... |
static InternationalFixedDate create(int prolepticYear, int month, int dayOfMonth) {
YEAR_RANGE.checkValidValue(prolepticYear, ChronoField.YEAR_OF_ERA);
MONTH_OF_YEAR_RANGE.checkValidValue(month, ChronoField.MONTH_OF_YEAR);
DAY_OF_MONTH_RANGE.checkValidValue(dayOfMonth, ChronoField.DAY_OF_MONTH)... | [
"Factory method, validates the given triplet year, month and dayOfMonth.\n\n@param prolepticYear the International fixed proleptic-year\n@param month the International fixed month, from 1 to 13\n@param dayOfMonth the International fixed day-of-month, from 1 to 28 (29 for Leap Day or Year Day)\n@return the Intern... | [
"For the DC to check whether an operation should be ignored on the slave, if the slave is set up to ignore config not relevant to it\n\n@param domainResource the domain root resource\n@param serverConfigs the server configs the slave is known to have\n@param pathAddress the address of the operation to check if shou... |
private void readWeekDay(ProjectCalendar mpxjCalendar, WeekDay day)
{
if (day.isIsDayWorking())
{
ProjectCalendarHours hours = mpxjCalendar.addCalendarHours(day.getDay());
for (Document.Calendars.Calendar.WeekDays.WeekDay.TimePeriods.TimePeriod period : day.getTimePeriods().getTimePerio... | [
"Reads a single day for a calendar.\n\n@param mpxjCalendar ProjectCalendar instance\n@param day ConceptDraw PROJECT week day"
] | [
"Sets the node meta data.\n\n@param key - the meta data key\n@param value - the meta data value\n@throws GroovyBugError if key is null or there is already meta\ndata under that key",
"Returns the position for a given number of occurrences or NOT_FOUND if\nthis value is not found.\n\n@param nOccurrence\nnumber of ... |
public static base_responses export(nitro_service client, sslfipskey resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
sslfipskey exportresources[] = new sslfipskey[resources.length];
for (int i=0;i<resources.length;i++){
exportresources[i] = ne... | [
"Use this API to export sslfipskey resources."
] | [
"Gets fully-qualified name of a table or sequence.\n\n@param localName local table name.\n@param params params.\n@return fully-qualified table name.",
"Generates a comment regarding the parameters.\n\n@param entityId - id of the commented entity\n@param entityType - type of the entity\n@param action - the acti... |
public float getNormalZ(int vertex) {
if (!hasNormals()) {
throw new IllegalStateException("mesh has no normals");
}
checkVertexIndexBounds(vertex);
return m_normals.getFloat((vertex * 3 + 2) * SIZEOF_FLOAT);
} | [
"Returns the z-coordinate of a vertex normal.\n\n@param vertex the vertex index\n@return the z coordinate"
] | [
"Searches the model for all variable assignments and makes a default map of those variables, setting them to \"\"\n\n@return the default variable assignment map",
"Use this API to fetch nstrafficdomain_binding resources of given names .",
"Given a class configures the binding between a class and a Renderer clas... |
public GVRAndroidResource openResource(String filePath) throws IOException {
// Error tolerance: Remove initial '/' introduced by file::///filename
// In this case, the path is interpreted as relative to defaultPath,
// which is the root of the filesystem.
if (filePath.startsWith(File.se... | [
"Opens a file from the volume. The filePath is relative to the\ndefaultPath.\n\n@param filePath\nFile path of the resource to open.\n\n@throws IOException"
] | [
"Get the aggregated result human readable string for easy display.\n\n\n@param aggregateResultMap the aggregate result map\n@return the aggregated result human",
"Get the domain controller data from the given byte buffer.\n\n@param buffer the byte buffer\n@return the domain controller data\n@throws Exception",
... |
private static String handleRichError(final Response response, final String body) {
if (!response.getHeaders().containsKey(Headers.CONTENT_TYPE)
|| !response.getHeaders().get(Headers.CONTENT_TYPE).equals(ContentTypes.APPLICATION_JSON)) {
return body;
}
final Document doc;
try {
doc ... | [
"Private helper method which decodes the Stitch error from the body of an HTTP `Response`\nobject. If the error is successfully decoded, this function will throw the error for the end\nuser to eventually consume. If the error cannot be decoded, this is likely not an error from\nthe Stitch server, and this function ... | [
"Output the SQL type for a Java String.",
"Sets the proxy class to be used.\n@param newProxyClass java.lang.Class",
"Retrieve any task field value lists defined in the MPP file.",
"Add UDFType objects to a PM XML file.\n\n@author kmahan\n@date 2014-09-24\n@author lsong\n@date 2015-7-24",
"Clears all scopes.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.