repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
11
218
func_name
stringlengths
4
140
whole_func_string
stringlengths
153
5.32k
language
stringclasses
1 value
func_code_string
stringlengths
72
4k
func_code_tokens
listlengths
20
832
func_documentation_string
stringlengths
61
2k
func_documentation_tokens
listlengths
1
647
split_name
stringclasses
1 value
func_code_url
stringlengths
102
339
virgo47/javasimon
console-embed/src/main/java/org/javasimon/console/reflect/GetterFactory.java
GetterFactory.getGetter
@SuppressWarnings("unchecked") public static Getter getGetter(Class type, String name) { """ Search getter for given class and property name. @param type Class @param name Property name @return Getter or null if not found """ return getGettersAsMap(type).get(name); }
java
@SuppressWarnings("unchecked") public static Getter getGetter(Class type, String name) { return getGettersAsMap(type).get(name); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "Getter", "getGetter", "(", "Class", "type", ",", "String", "name", ")", "{", "return", "getGettersAsMap", "(", "type", ")", ".", "get", "(", "name", ")", ";", "}" ]
Search getter for given class and property name. @param type Class @param name Property name @return Getter or null if not found
[ "Search", "getter", "for", "given", "class", "and", "property", "name", "." ]
train
https://github.com/virgo47/javasimon/blob/17dfaa93cded9ce8ef64a134b28ccbf4d0284d2f/console-embed/src/main/java/org/javasimon/console/reflect/GetterFactory.java#L112-L115
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/alg/misc/ImageMiscOps.java
ImageMiscOps.fillBorder
public static void fillBorder(GrayF64 input, double value, int radius ) { """ Fills the outside border with the specified value @param input An image. @param value The value that the image is being filled with. @param radius Border width. """ // top and bottom for (int y = 0; y < radius; y++) { in...
java
public static void fillBorder(GrayF64 input, double value, int radius ) { // top and bottom for (int y = 0; y < radius; y++) { int indexTop = input.startIndex + y * input.stride; int indexBottom = input.startIndex + (input.height-y-1) * input.stride; for (int x = 0; x < input.width; x++) { input.data[...
[ "public", "static", "void", "fillBorder", "(", "GrayF64", "input", ",", "double", "value", ",", "int", "radius", ")", "{", "// top and bottom", "for", "(", "int", "y", "=", "0", ";", "y", "<", "radius", ";", "y", "++", ")", "{", "int", "indexTop", "=...
Fills the outside border with the specified value @param input An image. @param value The value that the image is being filled with. @param radius Border width.
[ "Fills", "the", "outside", "border", "with", "the", "specified", "value" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/misc/ImageMiscOps.java#L2906-L2932
duracloud/duracloud
durastore/src/main/java/org/duracloud/durastore/rest/SpaceRest.java
SpaceRest.addSpacePropertiesToResponse
private Response addSpacePropertiesToResponse(ResponseBuilder response, String spaceID, String storeID) throws ResourceException { """ Adds the properties of a space as header values to the response """ ...
java
private Response addSpacePropertiesToResponse(ResponseBuilder response, String spaceID, String storeID) throws ResourceException { Map<String, String> properties = spaceResource.getSpaceProper...
[ "private", "Response", "addSpacePropertiesToResponse", "(", "ResponseBuilder", "response", ",", "String", "spaceID", ",", "String", "storeID", ")", "throws", "ResourceException", "{", "Map", "<", "String", ",", "String", ">", "properties", "=", "spaceResource", ".",...
Adds the properties of a space as header values to the response
[ "Adds", "the", "properties", "of", "a", "space", "as", "header", "values", "to", "the", "response" ]
train
https://github.com/duracloud/duracloud/blob/dc4f3a1716d43543cc3b2e1880605f9389849b66/durastore/src/main/java/org/duracloud/durastore/rest/SpaceRest.java#L171-L179
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/tasks/net/ExtSSHExec.java
ExtSSHExec.writeToFile
private void writeToFile(String from, boolean append, File to) throws IOException { """ Writes a string to a file. If destination file exists, it may be overwritten depending on the "append" value. @param from string to write @param to file to write to @param append if t...
java
private void writeToFile(String from, boolean append, File to) throws IOException { FileWriter out = null; try { out = new FileWriter(to.getAbsolutePath(), append); StringReader in = new StringReader(from); char[] buffer = new char[BUFFER_SIZE]; in...
[ "private", "void", "writeToFile", "(", "String", "from", ",", "boolean", "append", ",", "File", "to", ")", "throws", "IOException", "{", "FileWriter", "out", "=", "null", ";", "try", "{", "out", "=", "new", "FileWriter", "(", "to", ".", "getAbsolutePath", ...
Writes a string to a file. If destination file exists, it may be overwritten depending on the "append" value. @param from string to write @param to file to write to @param append if true, append to existing file, else overwrite @exception IOException on io error
[ "Writes", "a", "string", "to", "a", "file", ".", "If", "destination", "file", "exists", "it", "may", "be", "overwritten", "depending", "on", "the", "append", "value", "." ]
train
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/tasks/net/ExtSSHExec.java#L547-L568
bazaarvoice/emodb
common/client/src/main/java/com/bazaarvoice/emodb/client/uri/EmoUriComponent.java
EmoUriComponent.decodePath
public static List<PathSegment> decodePath(URI u, boolean decode) { """ Decode the path component of a URI as path segments. @param u the URI. If the path component is an absolute path component then the leading '/' is ignored and is not considered a delimiator of a path segment. @param decode true if t...
java
public static List<PathSegment> decodePath(URI u, boolean decode) { String rawPath = u.getRawPath(); if (rawPath != null && rawPath.length() > 0 && rawPath.charAt(0) == '/') { rawPath = rawPath.substring(1); } return decodePath(rawPath, decode); }
[ "public", "static", "List", "<", "PathSegment", ">", "decodePath", "(", "URI", "u", ",", "boolean", "decode", ")", "{", "String", "rawPath", "=", "u", ".", "getRawPath", "(", ")", ";", "if", "(", "rawPath", "!=", "null", "&&", "rawPath", ".", "length",...
Decode the path component of a URI as path segments. @param u the URI. If the path component is an absolute path component then the leading '/' is ignored and is not considered a delimiator of a path segment. @param decode true if the path segments of the path component should be in decoded form. @return the list...
[ "Decode", "the", "path", "component", "of", "a", "URI", "as", "path", "segments", "." ]
train
https://github.com/bazaarvoice/emodb/blob/97ec7671bc78b47fc2a1c11298c0c872bd5ec7fb/common/client/src/main/java/com/bazaarvoice/emodb/client/uri/EmoUriComponent.java#L590-L596
leancloud/java-sdk-all
core/src/main/java/cn/leancloud/upload/QiniuAccessor.java
QiniuAccessor.makeFile
public QiniuMKFileResponseData makeFile(int fileTotalSize, List<String> uploadFileCtxs, int retry) throws Exception { """ REST API POST /mkfile/<fileSize>/key/<encodedKey>/mimeType/<encodedMimeType>/x:user-var/<encodedUserVars> HTTP/1.1 Host: <UpHost> Content-Type: text/plain Content-Leng...
java
public QiniuMKFileResponseData makeFile(int fileTotalSize, List<String> uploadFileCtxs, int retry) throws Exception { try { String endPoint = String.format(QINIU_MKFILE_EP, this.uploadUrl, fileTotalSize, Base64.encodeToString(this.fileKey.getBytes(), Base64.URL_SAFE | Base64.NO_WRAP));...
[ "public", "QiniuMKFileResponseData", "makeFile", "(", "int", "fileTotalSize", ",", "List", "<", "String", ">", "uploadFileCtxs", ",", "int", "retry", ")", "throws", "Exception", "{", "try", "{", "String", "endPoint", "=", "String", ".", "format", "(", "QINIU_M...
REST API POST /mkfile/<fileSize>/key/<encodedKey>/mimeType/<encodedMimeType>/x:user-var/<encodedUserVars> HTTP/1.1 Host: <UpHost> Content-Type: text/plain Content-Length: <ctxListSize> Authorization: UpToken <UploadToken> <ctxList> Request params: - fileSize - encodeKey - encodedMimeType - encodedUserVars...
[ "REST", "API", "POST", "/", "mkfile", "/", "<fileSize", ">", "/", "key", "/", "<encodedKey", ">", "/", "mimeType", "/", "<encodedMimeType", ">", "/", "x", ":", "user", "-", "var", "/", "<encodedUserVars", ">", "HTTP", "/", "1", ".", "1", "Host", ":",...
train
https://github.com/leancloud/java-sdk-all/blob/323f8e7ee38051b1350790e5192304768c5c9f5f/core/src/main/java/cn/leancloud/upload/QiniuAccessor.java#L332-L356
google/closure-compiler
src/com/google/javascript/jscomp/ControlFlowAnalysis.java
ControlFlowAnalysis.getNextSiblingOfType
private static Node getNextSiblingOfType(Node first, Token ... types) { """ Get the next sibling (including itself) of one of the given types. """ for (Node c = first; c != null; c = c.getNext()) { for (Token type : types) { if (c.getToken() == type) { return c; } } ...
java
private static Node getNextSiblingOfType(Node first, Token ... types) { for (Node c = first; c != null; c = c.getNext()) { for (Token type : types) { if (c.getToken() == type) { return c; } } } return null; }
[ "private", "static", "Node", "getNextSiblingOfType", "(", "Node", "first", ",", "Token", "...", "types", ")", "{", "for", "(", "Node", "c", "=", "first", ";", "c", "!=", "null", ";", "c", "=", "c", ".", "getNext", "(", ")", ")", "{", "for", "(", ...
Get the next sibling (including itself) of one of the given types.
[ "Get", "the", "next", "sibling", "(", "including", "itself", ")", "of", "one", "of", "the", "given", "types", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/ControlFlowAnalysis.java#L913-L922
TheHortonMachine/hortonmachine
dbs/src/main/java/org/hortonmachine/dbs/utils/SerializationUtilities.java
SerializationUtilities.deSerialize
public static <T> T deSerialize( byte[] bytes, Class<T> adaptee ) throws Exception { """ Deserialize a byte array to a given object. @param bytes the byte array. @param adaptee the class to adapt to. @return the object. @throws Exception """ ObjectInputStream in = new ObjectInputStream(new Byte...
java
public static <T> T deSerialize( byte[] bytes, Class<T> adaptee ) throws Exception { ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(bytes)); Object readObject = in.readObject(); return adaptee.cast(readObject); }
[ "public", "static", "<", "T", ">", "T", "deSerialize", "(", "byte", "[", "]", "bytes", ",", "Class", "<", "T", ">", "adaptee", ")", "throws", "Exception", "{", "ObjectInputStream", "in", "=", "new", "ObjectInputStream", "(", "new", "ByteArrayInputStream", ...
Deserialize a byte array to a given object. @param bytes the byte array. @param adaptee the class to adapt to. @return the object. @throws Exception
[ "Deserialize", "a", "byte", "array", "to", "a", "given", "object", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/dbs/src/main/java/org/hortonmachine/dbs/utils/SerializationUtilities.java#L43-L47
cdk/cdk
base/standard/src/main/java/org/openscience/cdk/geometry/BondTools.java
BondTools.isLeft
public static boolean isLeft(IAtom whereIs, IAtom viewFrom, IAtom viewTo) { """ Says if an atom is on the left side of a another atom seen from a certain atom or not. @param whereIs The atom the position of which is returned @param viewFrom The atom from which to look @param viewTo The atom to which...
java
public static boolean isLeft(IAtom whereIs, IAtom viewFrom, IAtom viewTo) { double angle = giveAngleBothMethods(viewFrom, viewTo, whereIs, false); if (angle < 0) { return (false); } else { return (true); } }
[ "public", "static", "boolean", "isLeft", "(", "IAtom", "whereIs", ",", "IAtom", "viewFrom", ",", "IAtom", "viewTo", ")", "{", "double", "angle", "=", "giveAngleBothMethods", "(", "viewFrom", ",", "viewTo", ",", "whereIs", ",", "false", ")", ";", "if", "(",...
Says if an atom is on the left side of a another atom seen from a certain atom or not. @param whereIs The atom the position of which is returned @param viewFrom The atom from which to look @param viewTo The atom to which to look @return true=is left, false = is not
[ "Says", "if", "an", "atom", "is", "on", "the", "left", "side", "of", "a", "another", "atom", "seen", "from", "a", "certain", "atom", "or", "not", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/geometry/BondTools.java#L113-L120
OpenLiberty/open-liberty
dev/com.ibm.ws.kernel.service/src/com/ibm/wsspi/kernel/service/utils/OsgiPropertyUtils.java
OsgiPropertyUtils.getInteger
public static int getInteger(String propertyName, int defaultValue) { """ Retrieve the value of the specified property from framework/system properties. Value is converted and returned as an int. @param propertyName Name of property @param defaultValue Default value to return if property is not set @return P...
java
public static int getInteger(String propertyName, int defaultValue) { String tmpObj = get(propertyName); if (tmpObj != null) { try { return Integer.parseInt(tmpObj); } catch (NumberFormatException e) { } } return defaultValue; }
[ "public", "static", "int", "getInteger", "(", "String", "propertyName", ",", "int", "defaultValue", ")", "{", "String", "tmpObj", "=", "get", "(", "propertyName", ")", ";", "if", "(", "tmpObj", "!=", "null", ")", "{", "try", "{", "return", "Integer", "."...
Retrieve the value of the specified property from framework/system properties. Value is converted and returned as an int. @param propertyName Name of property @param defaultValue Default value to return if property is not set @return Property or default value as an int
[ "Retrieve", "the", "value", "of", "the", "specified", "property", "from", "framework", "/", "system", "properties", ".", "Value", "is", "converted", "and", "returned", "as", "an", "int", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.service/src/com/ibm/wsspi/kernel/service/utils/OsgiPropertyUtils.java#L97-L107
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/state/KeyGroupRangeOffsets.java
KeyGroupRangeOffsets.getIntersection
public KeyGroupRangeOffsets getIntersection(KeyGroupRange keyGroupRange) { """ Returns a key-group range with offsets which is the intersection of the internal key-group range with the given key-group range. @param keyGroupRange Key-group range to intersect with the internal key-group range. @return The key-g...
java
public KeyGroupRangeOffsets getIntersection(KeyGroupRange keyGroupRange) { Preconditions.checkNotNull(keyGroupRange); KeyGroupRange intersection = this.keyGroupRange.getIntersection(keyGroupRange); long[] subOffsets = new long[intersection.getNumberOfKeyGroups()]; if(subOffsets.length > 0) { System.arraycopy...
[ "public", "KeyGroupRangeOffsets", "getIntersection", "(", "KeyGroupRange", "keyGroupRange", ")", "{", "Preconditions", ".", "checkNotNull", "(", "keyGroupRange", ")", ";", "KeyGroupRange", "intersection", "=", "this", ".", "keyGroupRange", ".", "getIntersection", "(", ...
Returns a key-group range with offsets which is the intersection of the internal key-group range with the given key-group range. @param keyGroupRange Key-group range to intersect with the internal key-group range. @return The key-group range with offsets for the intersection of the internal key-group range with the gi...
[ "Returns", "a", "key", "-", "group", "range", "with", "offsets", "which", "is", "the", "intersection", "of", "the", "internal", "key", "-", "group", "range", "with", "the", "given", "key", "-", "group", "range", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/state/KeyGroupRangeOffsets.java#L115-L128
SvenEwald/xmlbeam
src/main/java/org/xmlbeam/XBProjector.java
XBProjector.autoMapEmptyDocument
public <T> XBAutoMap<T> autoMapEmptyDocument(final Class<T> valueType) { """ Create an empty document and bind an XBAutoMap to it. @param valueType component type of map @return an empty Map view to the document """ Document document = xMLFactoriesConfig.createDocumentBuilder().newDocument(); ...
java
public <T> XBAutoMap<T> autoMapEmptyDocument(final Class<T> valueType) { Document document = xMLFactoriesConfig.createDocumentBuilder().newDocument(); return createAutoMapForDocument(valueType, document); }
[ "public", "<", "T", ">", "XBAutoMap", "<", "T", ">", "autoMapEmptyDocument", "(", "final", "Class", "<", "T", ">", "valueType", ")", "{", "Document", "document", "=", "xMLFactoriesConfig", ".", "createDocumentBuilder", "(", ")", ".", "newDocument", "(", ")",...
Create an empty document and bind an XBAutoMap to it. @param valueType component type of map @return an empty Map view to the document
[ "Create", "an", "empty", "document", "and", "bind", "an", "XBAutoMap", "to", "it", "." ]
train
https://github.com/SvenEwald/xmlbeam/blob/acaac1b8fa28d246f17187f5e3c6696458a0b447/src/main/java/org/xmlbeam/XBProjector.java#L825-L828
Samsung/GearVRf
GVRf/Framework/framework/src/main/java/org/gearvrf/GVRShader.java
GVRShader.bindShader
public int bindShader(GVRContext context, GVRShaderData material, String vertexDesc) { """ Select the specific vertex and fragment shader to use with this material. The shader template is used to generate the sources for the vertex and fragment shader based on the material properties only. It will ignore the ...
java
public int bindShader(GVRContext context, GVRShaderData material, String vertexDesc) { String signature = getClass().getSimpleName(); GVRShaderManager shaderManager = context.getShaderManager(); synchronized (shaderManager) { int nativeShader = shaderManager.getShader(si...
[ "public", "int", "bindShader", "(", "GVRContext", "context", ",", "GVRShaderData", "material", ",", "String", "vertexDesc", ")", "{", "String", "signature", "=", "getClass", "(", ")", ".", "getSimpleName", "(", ")", ";", "GVRShaderManager", "shaderManager", "=",...
Select the specific vertex and fragment shader to use with this material. The shader template is used to generate the sources for the vertex and fragment shader based on the material properties only. It will ignore the mesh attributes and all lights. @param context GVRContext @param material material to use with the ...
[ "Select", "the", "specific", "vertex", "and", "fragment", "shader", "to", "use", "with", "this", "material", "." ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRShader.java#L340-L354
evernote/android-job
library/src/main/java/com/evernote/android/job/util/JobPreconditions.java
JobPreconditions.checkFlagsArgument
public static void checkFlagsArgument(final int requestedFlags, final int allowedFlags) { """ Check the requested flags, throwing if any requested flags are outside the allowed set. """ if ((requestedFlags & allowedFlags) != requestedFlags) { throw new IllegalArgumentException("Requested f...
java
public static void checkFlagsArgument(final int requestedFlags, final int allowedFlags) { if ((requestedFlags & allowedFlags) != requestedFlags) { throw new IllegalArgumentException("Requested flags 0x" + Integer.toHexString(requestedFlags) + ", but only 0x" +...
[ "public", "static", "void", "checkFlagsArgument", "(", "final", "int", "requestedFlags", ",", "final", "int", "allowedFlags", ")", "{", "if", "(", "(", "requestedFlags", "&", "allowedFlags", ")", "!=", "requestedFlags", ")", "{", "throw", "new", "IllegalArgument...
Check the requested flags, throwing if any requested flags are outside the allowed set.
[ "Check", "the", "requested", "flags", "throwing", "if", "any", "requested", "flags", "are", "outside", "the", "allowed", "set", "." ]
train
https://github.com/evernote/android-job/blob/5ae3d776ad9d80b5b7f60ae3e382d44d0d193faf/library/src/main/java/com/evernote/android/job/util/JobPreconditions.java#L101-L107
michael-rapp/AndroidMaterialValidation
library/src/main/java/de/mrapp/android/validation/Validators.java
Validators.minLength
public static Validator<CharSequence> minLength(@NonNull final CharSequence errorMessage, final int minLength) { """ Creates and returns a validator, which allows to validate texts to ensure, that they have at least a specific length. @param errorMessage The...
java
public static Validator<CharSequence> minLength(@NonNull final CharSequence errorMessage, final int minLength) { return new MinLengthValidator(errorMessage, minLength); }
[ "public", "static", "Validator", "<", "CharSequence", ">", "minLength", "(", "@", "NonNull", "final", "CharSequence", "errorMessage", ",", "final", "int", "minLength", ")", "{", "return", "new", "MinLengthValidator", "(", "errorMessage", ",", "minLength", ")", "...
Creates and returns a validator, which allows to validate texts to ensure, that they have at least a specific length. @param errorMessage The error message, which should be shown, if the validation fails, as an instance of the type {@link CharSequence}. The error message may not be null @param minLength The minimum le...
[ "Creates", "and", "returns", "a", "validator", "which", "allows", "to", "validate", "texts", "to", "ensure", "that", "they", "have", "at", "least", "a", "specific", "length", "." ]
train
https://github.com/michael-rapp/AndroidMaterialValidation/blob/ac8693baeac7abddf2e38a47da4c1849d4661a8b/library/src/main/java/de/mrapp/android/validation/Validators.java#L403-L406
Harium/keel
src/main/java/com/harium/keel/catalano/math/ComplexNumber.java
ComplexNumber.Add
public static ComplexNumber Add(ComplexNumber z1, double scalar) { """ Adds the complex number with a scalar value. @param z1 Complex Number. @param scalar Scalar value. @return Returns new ComplexNumber instance containing the add of specified complex number with scalar value. """ return new...
java
public static ComplexNumber Add(ComplexNumber z1, double scalar) { return new ComplexNumber(z1.real + scalar, z1.imaginary); }
[ "public", "static", "ComplexNumber", "Add", "(", "ComplexNumber", "z1", ",", "double", "scalar", ")", "{", "return", "new", "ComplexNumber", "(", "z1", ".", "real", "+", "scalar", ",", "z1", ".", "imaginary", ")", ";", "}" ]
Adds the complex number with a scalar value. @param z1 Complex Number. @param scalar Scalar value. @return Returns new ComplexNumber instance containing the add of specified complex number with scalar value.
[ "Adds", "the", "complex", "number", "with", "a", "scalar", "value", "." ]
train
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/ComplexNumber.java#L252-L254
structurizr/java
structurizr-core/src/com/structurizr/documentation/ViewpointsAndPerspectivesDocumentationTemplate.java
ViewpointsAndPerspectivesDocumentationTemplate.addSystemStakeholdersAndRequirementsSection
public Section addSystemStakeholdersAndRequirementsSection(SoftwareSystem softwareSystem, File... files) throws IOException { """ Adds a "System Stakeholders and Requirements" section relating to a {@link SoftwareSystem} from one or more files. @param softwareSystem the {@link SoftwareSystem} the documentati...
java
public Section addSystemStakeholdersAndRequirementsSection(SoftwareSystem softwareSystem, File... files) throws IOException { return addSection(softwareSystem, "System Stakeholders and Requirements", files); }
[ "public", "Section", "addSystemStakeholdersAndRequirementsSection", "(", "SoftwareSystem", "softwareSystem", ",", "File", "...", "files", ")", "throws", "IOException", "{", "return", "addSection", "(", "softwareSystem", ",", "\"System Stakeholders and Requirements\"", ",", ...
Adds a "System Stakeholders and Requirements" section relating to a {@link SoftwareSystem} from one or more files. @param softwareSystem the {@link SoftwareSystem} the documentation content relates to @param files one or more File objects that point to the documentation content @return ...
[ "Adds", "a", "System", "Stakeholders", "and", "Requirements", "section", "relating", "to", "a", "{", "@link", "SoftwareSystem", "}", "from", "one", "or", "more", "files", "." ]
train
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/documentation/ViewpointsAndPerspectivesDocumentationTemplate.java#L92-L94
landawn/AbacusUtil
src/com/landawn/abacus/util/HBaseExecutor.java
HBaseExecutor.delete
void delete(final String tableName, final Object rowKey) throws UncheckedIOException { """ And it may cause error because the "Object" is ambiguous to any type. """ delete(tableName, AnyDelete.of(rowKey)); }
java
void delete(final String tableName, final Object rowKey) throws UncheckedIOException { delete(tableName, AnyDelete.of(rowKey)); }
[ "void", "delete", "(", "final", "String", "tableName", ",", "final", "Object", "rowKey", ")", "throws", "UncheckedIOException", "{", "delete", "(", "tableName", ",", "AnyDelete", ".", "of", "(", "rowKey", ")", ")", ";", "}" ]
And it may cause error because the "Object" is ambiguous to any type.
[ "And", "it", "may", "cause", "error", "because", "the", "Object", "is", "ambiguous", "to", "any", "type", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/HBaseExecutor.java#L897-L899
OpenLiberty/open-liberty
dev/com.ibm.ws.jaxrs.2.0.common/src/org/apache/cxf/common/logging/LogUtils.java
LogUtils.getL7dLogger
public static Logger getL7dLogger(Class<?> cls) { """ Get a Logger with the associated default resource bundle for the class. @param cls the Class to contain the Logger @return an appropriate Logger """ //Liberty Change for CXF Begin return createLogger(cls, null, cls.getName() + getClassLo...
java
public static Logger getL7dLogger(Class<?> cls) { //Liberty Change for CXF Begin return createLogger(cls, null, cls.getName() + getClassLoader(cls)); //Liberty Change for CXF End }
[ "public", "static", "Logger", "getL7dLogger", "(", "Class", "<", "?", ">", "cls", ")", "{", "//Liberty Change for CXF Begin", "return", "createLogger", "(", "cls", ",", "null", ",", "cls", ".", "getName", "(", ")", "+", "getClassLoader", "(", "cls", ")", "...
Get a Logger with the associated default resource bundle for the class. @param cls the Class to contain the Logger @return an appropriate Logger
[ "Get", "a", "Logger", "with", "the", "associated", "default", "resource", "bundle", "for", "the", "class", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jaxrs.2.0.common/src/org/apache/cxf/common/logging/LogUtils.java#L201-L205
OpenLiberty/open-liberty
dev/com.ibm.ws.cdi.weld/src/com/ibm/ws/cdi/impl/weld/injection/EEValidationUtils.java
EEValidationUtils.validateJndiLookup
private static void validateJndiLookup(String lookupString, Annotated annotated, Class<?> declaringClass, CDIArchive cdiArchive) { """ Validates that the object referenced by a JNDI name has the given type <p> Validation is lenient, if we can't find the object for any reason, we won't fail validation. @throws...
java
private static void validateJndiLookup(String lookupString, Annotated annotated, Class<?> declaringClass, CDIArchive cdiArchive) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { Tr.entry(tc, "validateJndiLookup", new Object[] { Util.identity(annotated), declaringClass, cdiArchive...
[ "private", "static", "void", "validateJndiLookup", "(", "String", "lookupString", ",", "Annotated", "annotated", ",", "Class", "<", "?", ">", "declaringClass", ",", "CDIArchive", "cdiArchive", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(",...
Validates that the object referenced by a JNDI name has the given type <p> Validation is lenient, if we can't find the object for any reason, we won't fail validation. @throws DefinitionException if the object is found and does not have the correct type
[ "Validates", "that", "the", "object", "referenced", "by", "a", "JNDI", "name", "has", "the", "given", "type", "<p", ">", "Validation", "is", "lenient", "if", "we", "can", "t", "find", "the", "object", "for", "any", "reason", "we", "won", "t", "fail", "...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.cdi.weld/src/com/ibm/ws/cdi/impl/weld/injection/EEValidationUtils.java#L158-L180
basho/riak-java-client
src/main/java/com/basho/riak/client/api/convert/reflection/AnnotationUtil.java
AnnotationUtil.getIndexes
public static <T> RiakIndexes getIndexes(RiakIndexes container, T domainObject) { """ Attempts to get all the riak indexes from a domain object by looking for a {@literal @RiakIndexes} annotated member. <p> If no indexes are present, an empty RiakIndexes is returned.</p> @param <T> the type of the domain obj...
java
public static <T> RiakIndexes getIndexes(RiakIndexes container, T domainObject) { return AnnotationHelper.getInstance().getIndexes(container, domainObject); }
[ "public", "static", "<", "T", ">", "RiakIndexes", "getIndexes", "(", "RiakIndexes", "container", ",", "T", "domainObject", ")", "{", "return", "AnnotationHelper", ".", "getInstance", "(", ")", ".", "getIndexes", "(", "container", ",", "domainObject", ")", ";",...
Attempts to get all the riak indexes from a domain object by looking for a {@literal @RiakIndexes} annotated member. <p> If no indexes are present, an empty RiakIndexes is returned.</p> @param <T> the type of the domain object @param domainObject the domain object @return a RiakIndexes
[ "Attempts", "to", "get", "all", "the", "riak", "indexes", "from", "a", "domain", "object", "by", "looking", "for", "a", "{", "@literal", "@RiakIndexes", "}", "annotated", "member", ".", "<p", ">", "If", "no", "indexes", "are", "present", "an", "empty", "...
train
https://github.com/basho/riak-java-client/blob/bed6cd60f360bacf1b873ab92dd74f2526651e71/src/main/java/com/basho/riak/client/api/convert/reflection/AnnotationUtil.java#L209-L212
nohana/Amalgam
amalgam/src/main/java/com/amalgam/os/BundleUtils.java
BundleUtils.optInt
public static int optInt(@Nullable Bundle bundle, @Nullable String key) { """ Returns a optional int value. In other words, returns the value mapped by key if it exists and is a int. The bundle argument is allowed to be {@code null}. If the bundle is null, this method returns 0. @param bundle a bundle. If the bu...
java
public static int optInt(@Nullable Bundle bundle, @Nullable String key) { return optInt(bundle, key, 0); }
[ "public", "static", "int", "optInt", "(", "@", "Nullable", "Bundle", "bundle", ",", "@", "Nullable", "String", "key", ")", "{", "return", "optInt", "(", "bundle", ",", "key", ",", "0", ")", ";", "}" ]
Returns a optional int value. In other words, returns the value mapped by key if it exists and is a int. The bundle argument is allowed to be {@code null}. If the bundle is null, this method returns 0. @param bundle a bundle. If the bundle is null, this method will return 0. @param key a key for the value. @return a in...
[ "Returns", "a", "optional", "int", "value", ".", "In", "other", "words", "returns", "the", "value", "mapped", "by", "key", "if", "it", "exists", "and", "is", "a", "int", ".", "The", "bundle", "argument", "is", "allowed", "to", "be", "{" ]
train
https://github.com/nohana/Amalgam/blob/57809ddbfe7897e979cf507982ce0b3aa5e0ed8a/amalgam/src/main/java/com/amalgam/os/BundleUtils.java#L541-L543
groupon/odo
proxyui/src/main/java/com/groupon/odo/controllers/ServerMappingController.java
ServerMappingController.getCert
@RequestMapping(value = "/cert/ { """ Returns a X509 binary certificate for a given domain name if a certificate has been generated for it @param locale @param model @param response @param hostname @throws Exception """hostname:.+}", method = {RequestMethod.GET, RequestMethod.HEAD}) public @Resp...
java
@RequestMapping(value = "/cert/{hostname:.+}", method = {RequestMethod.GET, RequestMethod.HEAD}) public @ResponseBody void getCert(Locale locale, Model model, HttpServletResponse response, @PathVariable String hostname) throws Exception { // Set the appropriate headers so the browser thinks this is ...
[ "@", "RequestMapping", "(", "value", "=", "\"/cert/{hostname:.+}\"", ",", "method", "=", "{", "RequestMethod", ".", "GET", ",", "RequestMethod", ".", "HEAD", "}", ")", "public", "@", "ResponseBody", "void", "getCert", "(", "Locale", "locale", ",", "Model", "...
Returns a X509 binary certificate for a given domain name if a certificate has been generated for it @param locale @param model @param response @param hostname @throws Exception
[ "Returns", "a", "X509", "binary", "certificate", "for", "a", "given", "domain", "name", "if", "a", "certificate", "has", "been", "generated", "for", "it" ]
train
https://github.com/groupon/odo/blob/3bae43d5eca8ace036775e5b2d3ed9af1a9ff9b1/proxyui/src/main/java/com/groupon/odo/controllers/ServerMappingController.java#L399-L432
xiancloud/xian
xian-core/src/main/java/info/xiancloud/core/LocalUnitsManager.java
LocalUnitsManager.getLocalUnit
public static Unit getLocalUnit(String groupName, String unitName) { """ Get local cached unit singleton. the same as {@link #getLocalUnit(String)} """ return getLocalUnit(Unit.fullName(groupName, unitName)); }
java
public static Unit getLocalUnit(String groupName, String unitName) { return getLocalUnit(Unit.fullName(groupName, unitName)); }
[ "public", "static", "Unit", "getLocalUnit", "(", "String", "groupName", ",", "String", "unitName", ")", "{", "return", "getLocalUnit", "(", "Unit", ".", "fullName", "(", "groupName", ",", "unitName", ")", ")", ";", "}" ]
Get local cached unit singleton. the same as {@link #getLocalUnit(String)}
[ "Get", "local", "cached", "unit", "singleton", ".", "the", "same", "as", "{" ]
train
https://github.com/xiancloud/xian/blob/1948e088545553d2745b2c86d8b5a64988bb850e/xian-core/src/main/java/info/xiancloud/core/LocalUnitsManager.java#L253-L255
UrielCh/ovh-java-sdk
ovh-java-sdk-hostingprivateDatabase/src/main/java/net/minidev/ovh/api/ApiOvhHostingprivateDatabase.java
ApiOvhHostingprivateDatabase.serviceName_database_databaseName_extension_GET
public ArrayList<String> serviceName_database_databaseName_extension_GET(String serviceName, String databaseName, String extensionName, OvhStatus status) throws IOException { """ Extensions linked to your database REST: GET /hosting/privateDatabase/{serviceName}/database/{databaseName}/extension @param extensi...
java
public ArrayList<String> serviceName_database_databaseName_extension_GET(String serviceName, String databaseName, String extensionName, OvhStatus status) throws IOException { String qPath = "/hosting/privateDatabase/{serviceName}/database/{databaseName}/extension"; StringBuilder sb = path(qPath, serviceName, databa...
[ "public", "ArrayList", "<", "String", ">", "serviceName_database_databaseName_extension_GET", "(", "String", "serviceName", ",", "String", "databaseName", ",", "String", "extensionName", ",", "OvhStatus", "status", ")", "throws", "IOException", "{", "String", "qPath", ...
Extensions linked to your database REST: GET /hosting/privateDatabase/{serviceName}/database/{databaseName}/extension @param extensionName [required] Filter the value of extensionName property (like) @param status [required] Filter the value of status property (=) @param serviceName [required] The internal name of you...
[ "Extensions", "linked", "to", "your", "database" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-hostingprivateDatabase/src/main/java/net/minidev/ovh/api/ApiOvhHostingprivateDatabase.java#L461-L468
VoltDB/voltdb
src/frontend/org/voltdb/expressions/AbstractExpression.java
AbstractExpression.loadFromJSONArrayChild
public static List<AbstractExpression> loadFromJSONArrayChild( List<AbstractExpression> starter, JSONObject parent, String label, StmtTableScan tableScan) throws JSONException { """ For TVEs, it is only serialized column index and table index. In order to match expr...
java
public static List<AbstractExpression> loadFromJSONArrayChild( List<AbstractExpression> starter, JSONObject parent, String label, StmtTableScan tableScan) throws JSONException { if (parent.isNull(label)) { return null; } JSONArray jarr...
[ "public", "static", "List", "<", "AbstractExpression", ">", "loadFromJSONArrayChild", "(", "List", "<", "AbstractExpression", ">", "starter", ",", "JSONObject", "parent", ",", "String", "label", ",", "StmtTableScan", "tableScan", ")", "throws", "JSONException", "{",...
For TVEs, it is only serialized column index and table index. In order to match expression, there needs more information to revert back the table name, table alisa and column name. By adding @param tableScan, the TVE will load table name, table alias and column name for TVE. @param starter @param parent @param label @p...
[ "For", "TVEs", "it", "is", "only", "serialized", "column", "index", "and", "table", "index", ".", "In", "order", "to", "match", "expression", "there", "needs", "more", "information", "to", "revert", "back", "the", "table", "name", "table", "alisa", "and", ...
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/expressions/AbstractExpression.java#L812-L823
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/stat/network/inatsession_stats.java
inatsession_stats.get
public static inatsession_stats get(nitro_service service, inatsession_stats obj) throws Exception { """ Use this API to fetch statistics of inatsession_stats resource of the given information. """ options option = new options(); option.set_args(nitro_util.object_to_string_withoutquotes(obj)); inatsession_...
java
public static inatsession_stats get(nitro_service service, inatsession_stats obj) throws Exception{ options option = new options(); option.set_args(nitro_util.object_to_string_withoutquotes(obj)); inatsession_stats response = (inatsession_stats) obj.stat_resource(service,option); return response; }
[ "public", "static", "inatsession_stats", "get", "(", "nitro_service", "service", ",", "inatsession_stats", "obj", ")", "throws", "Exception", "{", "options", "option", "=", "new", "options", "(", ")", ";", "option", ".", "set_args", "(", "nitro_util", ".", "ob...
Use this API to fetch statistics of inatsession_stats resource of the given information.
[ "Use", "this", "API", "to", "fetch", "statistics", "of", "inatsession_stats", "resource", "of", "the", "given", "information", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/stat/network/inatsession_stats.java#L241-L246
undertow-io/undertow
core/src/main/java/io/undertow/util/FlexBase64.java
FlexBase64.createEncoderInputStream
public static EncoderInputStream createEncoderInputStream(InputStream source, int bufferSize, boolean wrap) { """ Creates an InputStream wrapper which encodes a source into base64 as it is read, until the source hits EOF. Upon hitting EOF, a standard base64 termination sequence will be readable. Clients can simpl...
java
public static EncoderInputStream createEncoderInputStream(InputStream source, int bufferSize, boolean wrap) { return new EncoderInputStream(source, bufferSize, wrap, false); }
[ "public", "static", "EncoderInputStream", "createEncoderInputStream", "(", "InputStream", "source", ",", "int", "bufferSize", ",", "boolean", "wrap", ")", "{", "return", "new", "EncoderInputStream", "(", "source", ",", "bufferSize", ",", "wrap", ",", "false", ")",...
Creates an InputStream wrapper which encodes a source into base64 as it is read, until the source hits EOF. Upon hitting EOF, a standard base64 termination sequence will be readable. Clients can simply treat this input stream as if they were reading from a base64 encoded file. This stream attempts to read and encode in...
[ "Creates", "an", "InputStream", "wrapper", "which", "encodes", "a", "source", "into", "base64", "as", "it", "is", "read", "until", "the", "source", "hits", "EOF", ".", "Upon", "hitting", "EOF", "a", "standard", "base64", "termination", "sequence", "will", "b...
train
https://github.com/undertow-io/undertow/blob/87de0b856a7a4ba8faf5b659537b9af07b763263/core/src/main/java/io/undertow/util/FlexBase64.java#L404-L406
pip-services3-java/pip-services3-commons-java
src/org/pipservices3/commons/reflect/TypeMatcher.java
TypeMatcher.matchValue
public static boolean matchValue(Object expectedType, Object actualValue) { """ Matches expected type to a type of a value. The expected type can be specified by a type, type name or TypeCode. @param expectedType an expected type to match. @param actualValue a value to match its type to the expected one. @r...
java
public static boolean matchValue(Object expectedType, Object actualValue) { if (expectedType == null) return true; if (actualValue == null) throw new NullPointerException("Actual value cannot be null"); return matchType(expectedType, actualValue.getClass()); }
[ "public", "static", "boolean", "matchValue", "(", "Object", "expectedType", ",", "Object", "actualValue", ")", "{", "if", "(", "expectedType", "==", "null", ")", "return", "true", ";", "if", "(", "actualValue", "==", "null", ")", "throw", "new", "NullPointer...
Matches expected type to a type of a value. The expected type can be specified by a type, type name or TypeCode. @param expectedType an expected type to match. @param actualValue a value to match its type to the expected one. @return true if types are matching and false if they don't. @see #matchType(Object, Class) ...
[ "Matches", "expected", "type", "to", "a", "type", "of", "a", "value", ".", "The", "expected", "type", "can", "be", "specified", "by", "a", "type", "type", "name", "or", "TypeCode", "." ]
train
https://github.com/pip-services3-java/pip-services3-commons-java/blob/a8a0c3e5ec58f0663c295aa855c6b3afad2af86a/src/org/pipservices3/commons/reflect/TypeMatcher.java#L30-L37
grails/grails-core
grails-bootstrap/src/main/groovy/grails/util/CollectionUtils.java
CollectionUtils.getOrCreateChildMap
public static Map getOrCreateChildMap(Map parent, String key) { """ Gets a child map of the given parent map or returns an empty map if it doesn't exist @param parent The parent map @param key The key that holds the child map @return The child map """ Object o = parent.get(key); if(o insta...
java
public static Map getOrCreateChildMap(Map parent, String key) { Object o = parent.get(key); if(o instanceof Map) { return (Map)o; } return new LinkedHashMap(); }
[ "public", "static", "Map", "getOrCreateChildMap", "(", "Map", "parent", ",", "String", "key", ")", "{", "Object", "o", "=", "parent", ".", "get", "(", "key", ")", ";", "if", "(", "o", "instanceof", "Map", ")", "{", "return", "(", "Map", ")", "o", "...
Gets a child map of the given parent map or returns an empty map if it doesn't exist @param parent The parent map @param key The key that holds the child map @return The child map
[ "Gets", "a", "child", "map", "of", "the", "given", "parent", "map", "or", "returns", "an", "empty", "map", "if", "it", "doesn", "t", "exist" ]
train
https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-bootstrap/src/main/groovy/grails/util/CollectionUtils.java#L70-L76
SonarSource/sonarqube
server/sonar-db-dao/src/main/java/org/sonar/db/MyBatis.java
MyBatis.newScrollingSingleRowSelectStatement
public PreparedStatement newScrollingSingleRowSelectStatement(DbSession session, String sql) { """ Create a PreparedStatement for SELECT requests with scrolling of results row by row (only one row in memory at a time) """ int fetchSize = database.getDialect().getScrollSingleRowFetchSize(); return newS...
java
public PreparedStatement newScrollingSingleRowSelectStatement(DbSession session, String sql) { int fetchSize = database.getDialect().getScrollSingleRowFetchSize(); return newScrollingSelectStatement(session, sql, fetchSize); }
[ "public", "PreparedStatement", "newScrollingSingleRowSelectStatement", "(", "DbSession", "session", ",", "String", "sql", ")", "{", "int", "fetchSize", "=", "database", ".", "getDialect", "(", ")", ".", "getScrollSingleRowFetchSize", "(", ")", ";", "return", "newScr...
Create a PreparedStatement for SELECT requests with scrolling of results row by row (only one row in memory at a time)
[ "Create", "a", "PreparedStatement", "for", "SELECT", "requests", "with", "scrolling", "of", "results", "row", "by", "row", "(", "only", "one", "row", "in", "memory", "at", "a", "time", ")" ]
train
https://github.com/SonarSource/sonarqube/blob/2fffa4c2f79ae3714844d7742796e82822b6a98a/server/sonar-db-dao/src/main/java/org/sonar/db/MyBatis.java#L321-L324
alkacon/opencms-core
src-gwt/org/opencms/ade/galleries/client/preview/util/CmsRectangle.java
CmsRectangle.fromLeftTopWidthHeight
public static CmsRectangle fromLeftTopWidthHeight(double left, double top, double width, double height) { """ Creates a new rectangle given its left, top coordinates and its width and height.<p> @param left the left side @param top the top side @param width the width @param height the height @return the n...
java
public static CmsRectangle fromLeftTopWidthHeight(double left, double top, double width, double height) { CmsRectangle result = new CmsRectangle(); result.m_left = left; result.m_top = top; result.m_width = width; result.m_height = height; return result; }
[ "public", "static", "CmsRectangle", "fromLeftTopWidthHeight", "(", "double", "left", ",", "double", "top", ",", "double", "width", ",", "double", "height", ")", "{", "CmsRectangle", "result", "=", "new", "CmsRectangle", "(", ")", ";", "result", ".", "m_left", ...
Creates a new rectangle given its left, top coordinates and its width and height.<p> @param left the left side @param top the top side @param width the width @param height the height @return the new rectangel
[ "Creates", "a", "new", "rectangle", "given", "its", "left", "top", "coordinates", "and", "its", "width", "and", "height", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/galleries/client/preview/util/CmsRectangle.java#L66-L74
hypercube1024/firefly
firefly-common/src/main/java/com/firefly/utils/function/Actions.java
Actions.toFunc
public static <T1, T2, T3, T4, T5, T6, T7, T8, T9> Func9<T1, T2, T3, T4, T5, T6, T7, T8, T9, Void> toFunc( final Action9<T1, T2, T3, T4, T5, T6, T7, T8, T9> action) { """ Converts an {@link Action9} to a function that calls the action and returns {@code null}. @param action the {@link Action9} to co...
java
public static <T1, T2, T3, T4, T5, T6, T7, T8, T9> Func9<T1, T2, T3, T4, T5, T6, T7, T8, T9, Void> toFunc( final Action9<T1, T2, T3, T4, T5, T6, T7, T8, T9> action) { return toFunc(action, (Void) null); }
[ "public", "static", "<", "T1", ",", "T2", ",", "T3", ",", "T4", ",", "T5", ",", "T6", ",", "T7", ",", "T8", ",", "T9", ">", "Func9", "<", "T1", ",", "T2", ",", "T3", ",", "T4", ",", "T5", ",", "T6", ",", "T7", ",", "T8", ",", "T9", ",",...
Converts an {@link Action9} to a function that calls the action and returns {@code null}. @param action the {@link Action9} to convert @return a {@link Func9} that calls {@code action} and returns {@code null}
[ "Converts", "an", "{", "@link", "Action9", "}", "to", "a", "function", "that", "calls", "the", "action", "and", "returns", "{", "@code", "null", "}", "." ]
train
https://github.com/hypercube1024/firefly/blob/ed3fc75b7c54a65b1e7d8141d01b49144bb423a3/firefly-common/src/main/java/com/firefly/utils/function/Actions.java#L179-L182
jbundle/jbundle
thin/base/db/base/src/main/java/org/jbundle/thin/base/db/FieldList.java
FieldList.makeScreen
public ScreenParent makeScreen(ScreenLoc itsLocation, ComponentParent parentScreen, int iDocMode, Map<String, Object> properties) { """ Create a default document for file maintenance or file display. Usually overidden in the file's record class. @param itsLocation The location of the screen in the parentScreen (...
java
public ScreenParent makeScreen(ScreenLoc itsLocation, ComponentParent parentScreen, int iDocMode, Map<String, Object> properties) { return null; // Not implemented in thin. }
[ "public", "ScreenParent", "makeScreen", "(", "ScreenLoc", "itsLocation", ",", "ComponentParent", "parentScreen", ",", "int", "iDocMode", ",", "Map", "<", "String", ",", "Object", ">", "properties", ")", "{", "return", "null", ";", "// Not implemented in thin.", "}...
Create a default document for file maintenance or file display. Usually overidden in the file's record class. @param itsLocation The location of the screen in the parentScreen (usually null here). @param parentScreen The parent screen. @param iDocMode The type of screen to create (MAINT/DISPLAY/SELECT/MENU/etc). @retur...
[ "Create", "a", "default", "document", "for", "file", "maintenance", "or", "file", "display", ".", "Usually", "overidden", "in", "the", "file", "s", "record", "class", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/db/base/src/main/java/org/jbundle/thin/base/db/FieldList.java#L876-L879
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/TrueTypeFontUnicode.java
TrueTypeFontUnicode.compare
public int compare(Object o1, Object o2) { """ The method used to sort the metrics array. @param o1 the first element @param o2 the second element @return the comparison """ int m1 = ((int[])o1)[0]; int m2 = ((int[])o2)[0]; if (m1 < m2) return -1; if (m1 == m2) ...
java
public int compare(Object o1, Object o2) { int m1 = ((int[])o1)[0]; int m2 = ((int[])o2)[0]; if (m1 < m2) return -1; if (m1 == m2) return 0; return 1; }
[ "public", "int", "compare", "(", "Object", "o1", ",", "Object", "o2", ")", "{", "int", "m1", "=", "(", "(", "int", "[", "]", ")", "o1", ")", "[", "0", "]", ";", "int", "m2", "=", "(", "(", "int", "[", "]", ")", "o2", ")", "[", "0", "]", ...
The method used to sort the metrics array. @param o1 the first element @param o2 the second element @return the comparison
[ "The", "method", "used", "to", "sort", "the", "metrics", "array", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/TrueTypeFontUnicode.java#L378-L386
evernote/android-intent
library/src/main/java/com/evernote/android/intent/CreateNewNoteIntentBuilder.java
CreateNewNoteIntentBuilder.setTags
public CreateNewNoteIntentBuilder setTags(@Nullable ArrayList<String> tags) { """ Set the tags for the new note. <b>Caution: </b>Any existing tags are overwritten. Use {@link #addTags(ArrayList)} to keep the already set tags in this builder. @param tags The tags which should be added to the new note. If {@code...
java
public CreateNewNoteIntentBuilder setTags(@Nullable ArrayList<String> tags) { return putStringArrayList(EvernoteIntent.EXTRA_TAG_NAME_LIST, tags); }
[ "public", "CreateNewNoteIntentBuilder", "setTags", "(", "@", "Nullable", "ArrayList", "<", "String", ">", "tags", ")", "{", "return", "putStringArrayList", "(", "EvernoteIntent", ".", "EXTRA_TAG_NAME_LIST", ",", "tags", ")", ";", "}" ]
Set the tags for the new note. <b>Caution: </b>Any existing tags are overwritten. Use {@link #addTags(ArrayList)} to keep the already set tags in this builder. @param tags The tags which should be added to the new note. If {@code null} then the current value gets removed. @return This Builder object to allow for chain...
[ "Set", "the", "tags", "for", "the", "new", "note", ".", "<b", ">", "Caution", ":", "<", "/", "b", ">", "Any", "existing", "tags", "are", "overwritten", ".", "Use", "{", "@link", "#addTags", "(", "ArrayList", ")", "}", "to", "keep", "the", "already", ...
train
https://github.com/evernote/android-intent/blob/5df1bec46b0a7d27be816d62f8fd2c10bda731ea/library/src/main/java/com/evernote/android/intent/CreateNewNoteIntentBuilder.java#L121-L123
Omertron/api-themoviedb
src/main/java/com/omertron/themoviedbapi/tools/HttpTools.java
HttpTools.validateResponse
private String validateResponse(final DigestedResponse response, final URL url) throws MovieDbException { """ Check the status codes of the response and throw exceptions if needed @param response DigestedResponse to process @param url URL for notification purposes @return String content @throws MovieDbExcept...
java
private String validateResponse(final DigestedResponse response, final URL url) throws MovieDbException { if (response.getStatusCode() == 0) { throw new MovieDbException(ApiExceptionType.CONNECTION_ERROR, response.getContent(), response.getStatusCode(), url, null); } else if (response.getSta...
[ "private", "String", "validateResponse", "(", "final", "DigestedResponse", "response", ",", "final", "URL", "url", ")", "throws", "MovieDbException", "{", "if", "(", "response", ".", "getStatusCode", "(", ")", "==", "0", ")", "{", "throw", "new", "MovieDbExcep...
Check the status codes of the response and throw exceptions if needed @param response DigestedResponse to process @param url URL for notification purposes @return String content @throws MovieDbException exception
[ "Check", "the", "status", "codes", "of", "the", "response", "and", "throw", "exceptions", "if", "needed" ]
train
https://github.com/Omertron/api-themoviedb/blob/bf132d7c7271734e13b58ba3bc92bba46f220118/src/main/java/com/omertron/themoviedbapi/tools/HttpTools.java#L149-L159
j256/simplemagic
src/main/java/com/j256/simplemagic/entries/MagicEntry.java
MagicEntry.matchBytes
ContentInfo matchBytes(byte[] bytes) { """ Returns the content type associated with the bytes or null if it does not match. """ ContentData data = matchBytes(bytes, 0, 0, null); if (data == null || data.name == MagicEntryParser.UNKNOWN_NAME) { return null; } else { return new ContentInfo(data.name,...
java
ContentInfo matchBytes(byte[] bytes) { ContentData data = matchBytes(bytes, 0, 0, null); if (data == null || data.name == MagicEntryParser.UNKNOWN_NAME) { return null; } else { return new ContentInfo(data.name, data.mimeType, data.sb.toString(), data.partial); } }
[ "ContentInfo", "matchBytes", "(", "byte", "[", "]", "bytes", ")", "{", "ContentData", "data", "=", "matchBytes", "(", "bytes", ",", "0", ",", "0", ",", "null", ")", ";", "if", "(", "data", "==", "null", "||", "data", ".", "name", "==", "MagicEntryPar...
Returns the content type associated with the bytes or null if it does not match.
[ "Returns", "the", "content", "type", "associated", "with", "the", "bytes", "or", "null", "if", "it", "does", "not", "match", "." ]
train
https://github.com/j256/simplemagic/blob/360362b52be76e31d01182abffe73f25e170221d/src/main/java/com/j256/simplemagic/entries/MagicEntry.java#L64-L71
pressgang-ccms/PressGangCCMSQuery
src/main/java/org/jboss/pressgang/ccms/filter/base/BaseFilterQueryBuilder.java
BaseFilterQueryBuilder.addEqualsCondition
protected void addEqualsCondition(final Expression<String> property, final String value) { """ Add a Field Search Condition that will search a field for a specified value using the following SQL logic: {@code field = 'value'} @param property The field property. @param value The value to search against. ...
java
protected void addEqualsCondition(final Expression<String> property, final String value) { fieldConditions.add(getCriteriaBuilder().equal(property, value)); }
[ "protected", "void", "addEqualsCondition", "(", "final", "Expression", "<", "String", ">", "property", ",", "final", "String", "value", ")", "{", "fieldConditions", ".", "add", "(", "getCriteriaBuilder", "(", ")", ".", "equal", "(", "property", ",", "value", ...
Add a Field Search Condition that will search a field for a specified value using the following SQL logic: {@code field = 'value'} @param property The field property. @param value The value to search against.
[ "Add", "a", "Field", "Search", "Condition", "that", "will", "search", "a", "field", "for", "a", "specified", "value", "using", "the", "following", "SQL", "logic", ":", "{", "@code", "field", "=", "value", "}" ]
train
https://github.com/pressgang-ccms/PressGangCCMSQuery/blob/2bb23430adab956737d0301cd2ea933f986dd85b/src/main/java/org/jboss/pressgang/ccms/filter/base/BaseFilterQueryBuilder.java#L452-L454
Azure/azure-sdk-for-java
appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServicePlansInner.java
AppServicePlansInner.listRoutesForVnetAsync
public Observable<List<VnetRouteInner>> listRoutesForVnetAsync(String resourceGroupName, String name, String vnetName) { """ Get all routes that are associated with a Virtual Network in an App Service plan. Get all routes that are associated with a Virtual Network in an App Service plan. @param resourceGroupNa...
java
public Observable<List<VnetRouteInner>> listRoutesForVnetAsync(String resourceGroupName, String name, String vnetName) { return listRoutesForVnetWithServiceResponseAsync(resourceGroupName, name, vnetName).map(new Func1<ServiceResponse<List<VnetRouteInner>>, List<VnetRouteInner>>() { @Override ...
[ "public", "Observable", "<", "List", "<", "VnetRouteInner", ">", ">", "listRoutesForVnetAsync", "(", "String", "resourceGroupName", ",", "String", "name", ",", "String", "vnetName", ")", "{", "return", "listRoutesForVnetWithServiceResponseAsync", "(", "resourceGroupName...
Get all routes that are associated with a Virtual Network in an App Service plan. Get all routes that are associated with a Virtual Network in an App Service plan. @param resourceGroupName Name of the resource group to which the resource belongs. @param name Name of the App Service plan. @param vnetName Name of the Vi...
[ "Get", "all", "routes", "that", "are", "associated", "with", "a", "Virtual", "Network", "in", "an", "App", "Service", "plan", ".", "Get", "all", "routes", "that", "are", "associated", "with", "a", "Virtual", "Network", "in", "an", "App", "Service", "plan",...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServicePlansInner.java#L3418-L3425
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/global/postprocessor/google/closure/ClosureGlobalPostProcessor.java
ClosureGlobalPostProcessor.generateBundleModuleArgs
private void generateBundleModuleArgs(List<String> args, Map<String, JoinableResourceBundle> bundleMap, Map<String, String> resultBundleMapping, JoinableResourceBundle bundle, List<String> dependencies) { """ Generates the bundle module arguments for the closure compiler @param args the current list of argu...
java
private void generateBundleModuleArgs(List<String> args, Map<String, JoinableResourceBundle> bundleMap, Map<String, String> resultBundleMapping, JoinableResourceBundle bundle, List<String> dependencies) { Set<String> bundleDependencies = getClosureModuleDependencies(bundle, dependencies); // Generate a module ...
[ "private", "void", "generateBundleModuleArgs", "(", "List", "<", "String", ">", "args", ",", "Map", "<", "String", ",", "JoinableResourceBundle", ">", "bundleMap", ",", "Map", "<", "String", ",", "String", ">", "resultBundleMapping", ",", "JoinableResourceBundle",...
Generates the bundle module arguments for the closure compiler @param args the current list of arguments @param bundleMap the bundle map @param resultBundleMapping the result bundle mapping @param bundle the current bundle @param dependencies the dependencies
[ "Generates", "the", "bundle", "module", "arguments", "for", "the", "closure", "compiler" ]
train
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/global/postprocessor/google/closure/ClosureGlobalPostProcessor.java#L470-L512
foundation-runtime/service-directory
1.2/sd-api/src/main/java/com/cisco/oss/foundation/directory/lookup/DirectoryLookupService.java
DirectoryLookupService.removeNotificationHandler
public void removeNotificationHandler(String serviceName, NotificationHandler handler) { """ Remove the NotificationHandler from the Service. @param serviceName the service name. @param handler the NotificationHandler for the service. """ ServiceInstanceUtils.validateServiceName(serviceName); ...
java
public void removeNotificationHandler(String serviceName, NotificationHandler handler) { ServiceInstanceUtils.validateServiceName(serviceName); if (handler == null) { throw new ServiceException(ErrorCode.SERVICE_DIRECTORY_NULL_ARGUMENT_ERROR, ErrorCode.SERVICE_DIRECTORY_...
[ "public", "void", "removeNotificationHandler", "(", "String", "serviceName", ",", "NotificationHandler", "handler", ")", "{", "ServiceInstanceUtils", ".", "validateServiceName", "(", "serviceName", ")", ";", "if", "(", "handler", "==", "null", ")", "{", "throw", "...
Remove the NotificationHandler from the Service. @param serviceName the service name. @param handler the NotificationHandler for the service.
[ "Remove", "the", "NotificationHandler", "from", "the", "Service", "." ]
train
https://github.com/foundation-runtime/service-directory/blob/a7bdefe173dc99e75eff4a24e07e6407e62f2ed4/1.2/sd-api/src/main/java/com/cisco/oss/foundation/directory/lookup/DirectoryLookupService.java#L497-L523
apache/groovy
src/main/java/org/codehaus/groovy/runtime/ResourceGroovyMethods.java
ResourceGroovyMethods.withWriter
public static <T> T withWriter(File file, @ClosureParams(value = SimpleType.class, options = "java.io.BufferedWriter") Closure<T> closure) throws IOException { """ Creates a new BufferedWriter for this file, passes it to the closure, and ensures the stream is flushed and closed after the closure returns. @para...
java
public static <T> T withWriter(File file, @ClosureParams(value = SimpleType.class, options = "java.io.BufferedWriter") Closure<T> closure) throws IOException { return IOGroovyMethods.withWriter(newWriter(file), closure); }
[ "public", "static", "<", "T", ">", "T", "withWriter", "(", "File", "file", ",", "@", "ClosureParams", "(", "value", "=", "SimpleType", ".", "class", ",", "options", "=", "\"java.io.BufferedWriter\"", ")", "Closure", "<", "T", ">", "closure", ")", "throws",...
Creates a new BufferedWriter for this file, passes it to the closure, and ensures the stream is flushed and closed after the closure returns. @param file a File @param closure a closure @return the value returned by the closure @throws IOException if an IOException occurs. @since 1.5.2
[ "Creates", "a", "new", "BufferedWriter", "for", "this", "file", "passes", "it", "to", "the", "closure", "and", "ensures", "the", "stream", "is", "flushed", "and", "closed", "after", "the", "closure", "returns", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/ResourceGroovyMethods.java#L1986-L1988
jtrfp/javamod
src/main/java/de/quippy/jflac/io/BitInputStream.java
BitInputStream.peekBitToInt
public int peekBitToInt(int val, int bit) throws IOException { """ peek at the next bit and add it to the input integer. The bits of the input integer are shifted left and the read bit is placed into bit 0. @param val The input integer @param bit The bit to peek at @return The updated integer value ...
java
public int peekBitToInt(int val, int bit) throws IOException { while (true) { if (bit < availBits) { val <<= 1; if ((getBit + bit) >= BITS_PER_BLURB) { bit = (getBit + bit) % BITS_PER_BLURB; val |= ((buffer[getByte + 1] & (0x80 ...
[ "public", "int", "peekBitToInt", "(", "int", "val", ",", "int", "bit", ")", "throws", "IOException", "{", "while", "(", "true", ")", "{", "if", "(", "bit", "<", "availBits", ")", "{", "val", "<<=", "1", ";", "if", "(", "(", "getBit", "+", "bit", ...
peek at the next bit and add it to the input integer. The bits of the input integer are shifted left and the read bit is placed into bit 0. @param val The input integer @param bit The bit to peek at @return The updated integer value @throws IOException Thrown if error reading input stream
[ "peek", "at", "the", "next", "bit", "and", "add", "it", "to", "the", "input", "integer", ".", "The", "bits", "of", "the", "input", "integer", "are", "shifted", "left", "and", "the", "read", "bit", "is", "placed", "into", "bit", "0", "." ]
train
https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/jflac/io/BitInputStream.java#L255-L270
joniles/mpxj
src/main/java/net/sf/mpxj/GenericCriteria.java
GenericCriteria.setRightValue
public void setRightValue(int index, Object value) { """ Add the value to list of values to be used as part of the evaluation of this indicator. @param index position in the list @param value evaluation value """ m_definedRightValues[index] = value; if (value instanceof FieldType) { ...
java
public void setRightValue(int index, Object value) { m_definedRightValues[index] = value; if (value instanceof FieldType) { m_symbolicValues = true; } else { if (value instanceof Duration) { if (((Duration) value).getUnits() != TimeUnit.HOUR...
[ "public", "void", "setRightValue", "(", "int", "index", ",", "Object", "value", ")", "{", "m_definedRightValues", "[", "index", "]", "=", "value", ";", "if", "(", "value", "instanceof", "FieldType", ")", "{", "m_symbolicValues", "=", "true", ";", "}", "els...
Add the value to list of values to be used as part of the evaluation of this indicator. @param index position in the list @param value evaluation value
[ "Add", "the", "value", "to", "list", "of", "values", "to", "be", "used", "as", "part", "of", "the", "evaluation", "of", "this", "indicator", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/GenericCriteria.java#L95-L115
lievendoclo/Valkyrie-RCP
valkyrie-rcp-core/src/main/java/org/valkyriercp/component/ShuttleList.java
ShuttleList.indexOf
protected int indexOf(final Object o) { """ Get the index of a given object in the underlying data model. @param o Object to locate @return index of object in model, -1 if not found """ final int size = dataModel.getSize(); for (int i = 0; i < size; i++) { if (comparator == null...
java
protected int indexOf(final Object o) { final int size = dataModel.getSize(); for (int i = 0; i < size; i++) { if (comparator == null) { if (o.equals(dataModel.getElementAt(i))) { return i; } } else if (comparator.compare(o, dat...
[ "protected", "int", "indexOf", "(", "final", "Object", "o", ")", "{", "final", "int", "size", "=", "dataModel", ".", "getSize", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "size", ";", "i", "++", ")", "{", "if", "(", "compar...
Get the index of a given object in the underlying data model. @param o Object to locate @return index of object in model, -1 if not found
[ "Get", "the", "index", "of", "a", "given", "object", "in", "the", "underlying", "data", "model", "." ]
train
https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/component/ShuttleList.java#L510-L523
aws/aws-sdk-java
aws-java-sdk-api-gateway/src/main/java/com/amazonaws/services/apigateway/model/UpdateMethodResponseResult.java
UpdateMethodResponseResult.withResponseModels
public UpdateMethodResponseResult withResponseModels(java.util.Map<String, String> responseModels) { """ <p> Specifies the <a>Model</a> resources used for the response's content-type. Response models are represented as a key/value map, with a content-type as the key and a <a>Model</a> name as the value. </p> ...
java
public UpdateMethodResponseResult withResponseModels(java.util.Map<String, String> responseModels) { setResponseModels(responseModels); return this; }
[ "public", "UpdateMethodResponseResult", "withResponseModels", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "responseModels", ")", "{", "setResponseModels", "(", "responseModels", ")", ";", "return", "this", ";", "}" ]
<p> Specifies the <a>Model</a> resources used for the response's content-type. Response models are represented as a key/value map, with a content-type as the key and a <a>Model</a> name as the value. </p> @param responseModels Specifies the <a>Model</a> resources used for the response's content-type. Response models a...
[ "<p", ">", "Specifies", "the", "<a", ">", "Model<", "/", "a", ">", "resources", "used", "for", "the", "response", "s", "content", "-", "type", ".", "Response", "models", "are", "represented", "as", "a", "key", "/", "value", "map", "with", "a", "content...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-api-gateway/src/main/java/com/amazonaws/services/apigateway/model/UpdateMethodResponseResult.java#L278-L281
Stratio/cassandra-lucene-index
plugin/src/main/java/com/stratio/cassandra/lucene/schema/mapping/GeoPointMapper.java
GeoPointMapper.readLongitude
private static Double readLongitude(Object o) { """ Returns the longitude contained in the specified {@link Object}. A valid longitude must in the range [-180, 180]. @param o the {@link Object} containing the latitude @return the longitude """ if (o == null) { return null; } ...
java
private static Double readLongitude(Object o) { if (o == null) { return null; } Double value; if (o instanceof Number) { value = ((Number) o).doubleValue(); } else { try { value = Double.valueOf(o.toString()); } catc...
[ "private", "static", "Double", "readLongitude", "(", "Object", "o", ")", "{", "if", "(", "o", "==", "null", ")", "{", "return", "null", ";", "}", "Double", "value", ";", "if", "(", "o", "instanceof", "Number", ")", "{", "value", "=", "(", "(", "Num...
Returns the longitude contained in the specified {@link Object}. A valid longitude must in the range [-180, 180]. @param o the {@link Object} containing the latitude @return the longitude
[ "Returns", "the", "longitude", "contained", "in", "the", "specified", "{", "@link", "Object", "}", "." ]
train
https://github.com/Stratio/cassandra-lucene-index/blob/a94a4d9af6c25d40e1108729974c35c27c54441c/plugin/src/main/java/com/stratio/cassandra/lucene/schema/mapping/GeoPointMapper.java#L174-L189
mongodb/stitch-android-sdk
core/sdk/src/main/java/com/mongodb/stitch/core/internal/common/BsonUtils.java
BsonUtils.parseValue
public static <T> T parseValue(final String json, final Decoder<T> valueDecoder) { """ Parses the provided extended JSON string and decodes it into a T value as specified by the provided {@link Decoder}. @param json the JSON string to parse. @param valueDecoder the {@link Decoder} to use to convert the BSON v...
java
public static <T> T parseValue(final String json, final Decoder<T> valueDecoder) { final JsonReader bsonReader = new JsonReader(json); bsonReader.readBsonType(); return valueDecoder.decode(bsonReader, DecoderContext.builder().build()); }
[ "public", "static", "<", "T", ">", "T", "parseValue", "(", "final", "String", "json", ",", "final", "Decoder", "<", "T", ">", "valueDecoder", ")", "{", "final", "JsonReader", "bsonReader", "=", "new", "JsonReader", "(", "json", ")", ";", "bsonReader", "....
Parses the provided extended JSON string and decodes it into a T value as specified by the provided {@link Decoder}. @param json the JSON string to parse. @param valueDecoder the {@link Decoder} to use to convert the BSON value into the type T. @param <T> the type into which the JSON string is decoded. @return the dec...
[ "Parses", "the", "provided", "extended", "JSON", "string", "and", "decodes", "it", "into", "a", "T", "value", "as", "specified", "by", "the", "provided", "{", "@link", "Decoder", "}", "." ]
train
https://github.com/mongodb/stitch-android-sdk/blob/159b9334b1f1a827285544be5ee20cdf7b04e4cc/core/sdk/src/main/java/com/mongodb/stitch/core/internal/common/BsonUtils.java#L63-L67
jenkinsci/jenkins
core/src/main/java/hudson/model/UpdateSite.java
UpdateSite.createInstallationJob
protected UpdateCenter.InstallationJob createInstallationJob(Plugin plugin, UpdateCenter uc, boolean dynamicLoad) { """ Extension point to allow implementations of {@link UpdateSite} to create a custom {@link UpdateCenter.InstallationJob}. @param plugin the plugin to create the {@link UpdateCenter.Install...
java
protected UpdateCenter.InstallationJob createInstallationJob(Plugin plugin, UpdateCenter uc, boolean dynamicLoad) { return uc.new InstallationJob(plugin, this, Jenkins.getAuthentication(), dynamicLoad); }
[ "protected", "UpdateCenter", ".", "InstallationJob", "createInstallationJob", "(", "Plugin", "plugin", ",", "UpdateCenter", "uc", ",", "boolean", "dynamicLoad", ")", "{", "return", "uc", ".", "new", "InstallationJob", "(", "plugin", ",", "this", ",", "Jenkins", ...
Extension point to allow implementations of {@link UpdateSite} to create a custom {@link UpdateCenter.InstallationJob}. @param plugin the plugin to create the {@link UpdateCenter.InstallationJob} for. @param uc the {@link UpdateCenter}. @param dynamicLoad {@code true} if the plugin should be attempted to...
[ "Extension", "point", "to", "allow", "implementations", "of", "{", "@link", "UpdateSite", "}", "to", "create", "a", "custom", "{", "@link", "UpdateCenter", ".", "InstallationJob", "}", "." ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/model/UpdateSite.java#L245-L247
Azure/azure-sdk-for-java
resources/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/DeploymentOperationsInner.java
DeploymentOperationsInner.listByResourceGroupAsync
public Observable<Page<DeploymentOperationInner>> listByResourceGroupAsync(final String resourceGroupName, final String deploymentName, final Integer top) { """ Gets all deployments operations for a deployment. @param resourceGroupName The name of the resource group. The name is case insensitive. @param deploy...
java
public Observable<Page<DeploymentOperationInner>> listByResourceGroupAsync(final String resourceGroupName, final String deploymentName, final Integer top) { return listByResourceGroupWithServiceResponseAsync(resourceGroupName, deploymentName, top) .map(new Func1<ServiceResponse<Page<DeploymentOperat...
[ "public", "Observable", "<", "Page", "<", "DeploymentOperationInner", ">", ">", "listByResourceGroupAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "deploymentName", ",", "final", "Integer", "top", ")", "{", "return", "listByResourceGroupW...
Gets all deployments operations for a deployment. @param resourceGroupName The name of the resource group. The name is case insensitive. @param deploymentName The name of the deployment with the operation to get. @param top The number of results to return. @throws IllegalArgumentException thrown if parameters fail the...
[ "Gets", "all", "deployments", "operations", "for", "a", "deployment", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/resources/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/DeploymentOperationsInner.java#L336-L344
jpaoletti/java-presentation-manager
modules/jpm-core/src/main/java/jpaoletti/jpm/core/monitor/FileMonitorSource.java
FileMonitorSource.getLinesFrom
@Override public List<MonitorLine> getLinesFrom(Object actual) throws Exception { """ Get the file lines since the actual until the last. @param actual Actual line identification @return The list of lines @throws Exception """ //TODO Enhance line retrieve to get last lines directly Str...
java
@Override public List<MonitorLine> getLinesFrom(Object actual) throws Exception { //TODO Enhance line retrieve to get last lines directly String line; Integer currentLineNo = 0; final List<MonitorLine> result = new ArrayList<MonitorLine>(); BufferedReader in = null; t...
[ "@", "Override", "public", "List", "<", "MonitorLine", ">", "getLinesFrom", "(", "Object", "actual", ")", "throws", "Exception", "{", "//TODO Enhance line retrieve to get last lines directly", "String", "line", ";", "Integer", "currentLineNo", "=", "0", ";", "final", ...
Get the file lines since the actual until the last. @param actual Actual line identification @return The list of lines @throws Exception
[ "Get", "the", "file", "lines", "since", "the", "actual", "until", "the", "last", "." ]
train
https://github.com/jpaoletti/java-presentation-manager/blob/d5aab55638383695db244744b4bfe27c5200e04f/modules/jpm-core/src/main/java/jpaoletti/jpm/core/monitor/FileMonitorSource.java#L26-L60
netty/netty
codec-http2/src/main/java/io/netty/handler/codec/http2/HttpConversionUtil.java
HttpConversionUtil.addHttp2ToHttpHeaders
public static void addHttp2ToHttpHeaders(int streamId, Http2Headers inputHeaders, HttpHeaders outputHeaders, HttpVersion httpVersion, boolean isTrailer, boolean isRequest) throws Http2Exception { """ Translate and add HTTP/2 headers to HTTP/1.x headers. @param streamId The stream associated with {@c...
java
public static void addHttp2ToHttpHeaders(int streamId, Http2Headers inputHeaders, HttpHeaders outputHeaders, HttpVersion httpVersion, boolean isTrailer, boolean isRequest) throws Http2Exception { Http2ToHttpHeaderTranslator translator = new Http2ToHttpHeaderTranslator(streamId, outputHeaders, isRequ...
[ "public", "static", "void", "addHttp2ToHttpHeaders", "(", "int", "streamId", ",", "Http2Headers", "inputHeaders", ",", "HttpHeaders", "outputHeaders", ",", "HttpVersion", "httpVersion", ",", "boolean", "isTrailer", ",", "boolean", "isRequest", ")", "throws", "Http2Exc...
Translate and add HTTP/2 headers to HTTP/1.x headers. @param streamId The stream associated with {@code sourceHeaders}. @param inputHeaders The HTTP/2 headers to convert. @param outputHeaders The object which will contain the resulting HTTP/1.x headers.. @param httpVersion What HTTP/1.x version {@code outputHeaders} s...
[ "Translate", "and", "add", "HTTP", "/", "2", "headers", "to", "HTTP", "/", "1", ".", "x", "headers", "." ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http2/src/main/java/io/netty/handler/codec/http2/HttpConversionUtil.java#L359-L378
VoltDB/voltdb
third_party/java/src/org/apache/zookeeper_voltpatches/ZooKeeper.java
ZooKeeper.getData
public byte[] getData(String path, boolean watch, Stat stat) throws KeeperException, InterruptedException { """ Return the data and the stat of the node of the given path. <p> If the watch is true and the call is successful (no exception is thrown), a watch will be left on the node with the given pa...
java
public byte[] getData(String path, boolean watch, Stat stat) throws KeeperException, InterruptedException { verbotenThreadCheck(); return getData(path, watch ? watchManager.defaultWatcher : null, stat); }
[ "public", "byte", "[", "]", "getData", "(", "String", "path", ",", "boolean", "watch", ",", "Stat", "stat", ")", "throws", "KeeperException", ",", "InterruptedException", "{", "verbotenThreadCheck", "(", ")", ";", "return", "getData", "(", "path", ",", "watc...
Return the data and the stat of the node of the given path. <p> If the watch is true and the call is successful (no exception is thrown), a watch will be left on the node with the given path. The watch will be triggered by a successful operation that sets data on the node, or deletes the node. <p> A KeeperException wit...
[ "Return", "the", "data", "and", "the", "stat", "of", "the", "node", "of", "the", "given", "path", ".", "<p", ">", "If", "the", "watch", "is", "true", "and", "the", "call", "is", "successful", "(", "no", "exception", "is", "thrown", ")", "a", "watch",...
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/ZooKeeper.java#L997-L1001
apache/incubator-gobblin
gobblin-compaction/src/main/java/org/apache/gobblin/compaction/source/CompactionSource.java
CompactionSource.initJobDir
private void initJobDir (SourceState state) throws IOException { """ Create a temporary job directory based on job id or (if not available) UUID """ String tmpBase = state.getProp(MRCompactor.COMPACTION_TMP_DEST_DIR, MRCompactor.DEFAULT_COMPACTION_TMP_DEST_DIR); String jobId; if (state instanceof ...
java
private void initJobDir (SourceState state) throws IOException { String tmpBase = state.getProp(MRCompactor.COMPACTION_TMP_DEST_DIR, MRCompactor.DEFAULT_COMPACTION_TMP_DEST_DIR); String jobId; if (state instanceof JobState) { jobId = ((JobState) state).getJobId(); } else { jobId = UUID.rand...
[ "private", "void", "initJobDir", "(", "SourceState", "state", ")", "throws", "IOException", "{", "String", "tmpBase", "=", "state", ".", "getProp", "(", "MRCompactor", ".", "COMPACTION_TMP_DEST_DIR", ",", "MRCompactor", ".", "DEFAULT_COMPACTION_TMP_DEST_DIR", ")", "...
Create a temporary job directory based on job id or (if not available) UUID
[ "Create", "a", "temporary", "job", "directory", "based", "on", "job", "id", "or", "(", "if", "not", "available", ")", "UUID" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-compaction/src/main/java/org/apache/gobblin/compaction/source/CompactionSource.java#L450-L464
davidmoten/rxjava-jdbc
src/main/java/com/github/davidmoten/rx/jdbc/Database.java
Database.beginTransactionOnNext_
public <T> Transformer<T, T> beginTransactionOnNext_() { """ Starts a database transaction for each onNext call. Following database calls will be subscribed on current thread (Schedulers.trampoline()) and share the same {@link Connection} until transaction is rolled back or committed. @return begin transacti...
java
public <T> Transformer<T, T> beginTransactionOnNext_() { return new Transformer<T, T>() { @Override public Observable<T> call(Observable<T> source) { return beginTransactionOnNext(Database.this, source); } }; }
[ "public", "<", "T", ">", "Transformer", "<", "T", ",", "T", ">", "beginTransactionOnNext_", "(", ")", "{", "return", "new", "Transformer", "<", "T", ",", "T", ">", "(", ")", "{", "@", "Override", "public", "Observable", "<", "T", ">", "call", "(", ...
Starts a database transaction for each onNext call. Following database calls will be subscribed on current thread (Schedulers.trampoline()) and share the same {@link Connection} until transaction is rolled back or committed. @return begin transaction Transformer
[ "Starts", "a", "database", "transaction", "for", "each", "onNext", "call", ".", "Following", "database", "calls", "will", "be", "subscribed", "on", "current", "thread", "(", "Schedulers", ".", "trampoline", "()", ")", "and", "share", "the", "same", "{", "@li...
train
https://github.com/davidmoten/rxjava-jdbc/blob/81e157d7071a825086bde81107b8694684cdff14/src/main/java/com/github/davidmoten/rx/jdbc/Database.java#L771-L778
cdk/cdk
storage/smiles/src/main/java/org/openscience/cdk/smiles/CDKToBeam.java
CDKToBeam.addTetrahedralConfiguration
private static void addTetrahedralConfiguration(ITetrahedralChirality tc, GraphBuilder gb, Map<IAtom, Integer> indices) { """ Add tetrahedral stereo configuration to the Beam GraphBuilder. @param tc stereo element specifying tetrahedral configuration @param gb the current graph builder @param indice...
java
private static void addTetrahedralConfiguration(ITetrahedralChirality tc, GraphBuilder gb, Map<IAtom, Integer> indices) { IAtom[] ligands = tc.getLigands(); int u = indices.get(tc.getChiralAtom()); int vs[] = new int[]{indices.get(ligands[0]), indices.get(ligands[1]), indices.get(ligands[2]), ...
[ "private", "static", "void", "addTetrahedralConfiguration", "(", "ITetrahedralChirality", "tc", ",", "GraphBuilder", "gb", ",", "Map", "<", "IAtom", ",", "Integer", ">", "indices", ")", "{", "IAtom", "[", "]", "ligands", "=", "tc", ".", "getLigands", "(", ")...
Add tetrahedral stereo configuration to the Beam GraphBuilder. @param tc stereo element specifying tetrahedral configuration @param gb the current graph builder @param indices atom indices
[ "Add", "tetrahedral", "stereo", "configuration", "to", "the", "Beam", "GraphBuilder", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/storage/smiles/src/main/java/org/openscience/cdk/smiles/CDKToBeam.java#L338-L348
BigBadaboom/androidsvg
androidsvg/src/main/java/com/caverock/androidsvg/SVG.java
SVG.getFromAsset
@SuppressWarnings( { """ Read and parse an SVG from the assets folder. @param assetManager the AssetManager instance to use when reading the file. @param filename the filename of the SVG document within assets. @return an SVG instance on which you can call one of the render methods. @throws SVGParseException...
java
@SuppressWarnings({"WeakerAccess", "unused"}) public static SVG getFromAsset(AssetManager assetManager, String filename) throws SVGParseException, IOException { SVGParser parser = new SVGParser(); InputStream is = assetManager.open(filename); try { return parser.parse(is, ena...
[ "@", "SuppressWarnings", "(", "{", "\"WeakerAccess\"", ",", "\"unused\"", "}", ")", "public", "static", "SVG", "getFromAsset", "(", "AssetManager", "assetManager", ",", "String", "filename", ")", "throws", "SVGParseException", ",", "IOException", "{", "SVGParser", ...
Read and parse an SVG from the assets folder. @param assetManager the AssetManager instance to use when reading the file. @param filename the filename of the SVG document within assets. @return an SVG instance on which you can call one of the render methods. @throws SVGParseException if there is an error parsing the d...
[ "Read", "and", "parse", "an", "SVG", "from", "the", "assets", "folder", "." ]
train
https://github.com/BigBadaboom/androidsvg/blob/0d1614dd1a4da10ea4afe3b0cea1361a4ac6b45a/androidsvg/src/main/java/com/caverock/androidsvg/SVG.java#L219-L233
pravega/pravega
common/src/main/java/io/pravega/common/util/ByteArraySegment.java
ByteArraySegment.subSegment
public ByteArraySegment subSegment(int offset, int length, boolean readOnly) { """ Returns a new ByteArraySegment that is a sub-segment of this ByteArraySegment. The new ByteArraySegment wraps the same underlying byte array that this ByteArraySegment does. @param offset The offset within this ByteArraySegmen...
java
public ByteArraySegment subSegment(int offset, int length, boolean readOnly) { Exceptions.checkArrayRange(offset, length, this.length, "offset", "length"); return new ByteArraySegment(this.array, this.startOffset + offset, length, readOnly || this.readOnly); }
[ "public", "ByteArraySegment", "subSegment", "(", "int", "offset", ",", "int", "length", ",", "boolean", "readOnly", ")", "{", "Exceptions", ".", "checkArrayRange", "(", "offset", ",", "length", ",", "this", ".", "length", ",", "\"offset\"", ",", "\"length\"", ...
Returns a new ByteArraySegment that is a sub-segment of this ByteArraySegment. The new ByteArraySegment wraps the same underlying byte array that this ByteArraySegment does. @param offset The offset within this ByteArraySegment where the new ByteArraySegment starts. @param length The length of the new ByteArraySeg...
[ "Returns", "a", "new", "ByteArraySegment", "that", "is", "a", "sub", "-", "segment", "of", "this", "ByteArraySegment", ".", "The", "new", "ByteArraySegment", "wraps", "the", "same", "underlying", "byte", "array", "that", "this", "ByteArraySegment", "does", "." ]
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/common/src/main/java/io/pravega/common/util/ByteArraySegment.java#L270-L273
grpc/grpc-java
alts/src/main/java/io/grpc/alts/GoogleDefaultChannelBuilder.java
GoogleDefaultChannelBuilder.forAddress
public static GoogleDefaultChannelBuilder forAddress(String name, int port) { """ "Overrides" the static method in {@link ManagedChannelBuilder}. """ return forTarget(GrpcUtil.authorityFromHostAndPort(name, port)); }
java
public static GoogleDefaultChannelBuilder forAddress(String name, int port) { return forTarget(GrpcUtil.authorityFromHostAndPort(name, port)); }
[ "public", "static", "GoogleDefaultChannelBuilder", "forAddress", "(", "String", "name", ",", "int", "port", ")", "{", "return", "forTarget", "(", "GrpcUtil", ".", "authorityFromHostAndPort", "(", "name", ",", "port", ")", ")", ";", "}" ]
"Overrides" the static method in {@link ManagedChannelBuilder}.
[ "Overrides", "the", "static", "method", "in", "{" ]
train
https://github.com/grpc/grpc-java/blob/973885457f9609de232d2553b82c67f6c3ff57bf/alts/src/main/java/io/grpc/alts/GoogleDefaultChannelBuilder.java#L77-L79
cdk/cdk
base/valencycheck/src/main/java/org/openscience/cdk/tools/SmilesValencyChecker.java
SmilesValencyChecker.isUnsaturated
public boolean isUnsaturated(IBond bond, IAtomContainer atomContainer) throws CDKException { """ Returns whether a bond is unsaturated. A bond is unsaturated if <b>all</b> Atoms in the bond are unsaturated. """ logger.debug("isBondUnsaturated?: ", bond); IAtom[] atoms = BondManipulator.getAtom...
java
public boolean isUnsaturated(IBond bond, IAtomContainer atomContainer) throws CDKException { logger.debug("isBondUnsaturated?: ", bond); IAtom[] atoms = BondManipulator.getAtomArray(bond); boolean isUnsaturated = true; for (int i = 0; i < atoms.length && isUnsaturated; i++) { ...
[ "public", "boolean", "isUnsaturated", "(", "IBond", "bond", ",", "IAtomContainer", "atomContainer", ")", "throws", "CDKException", "{", "logger", ".", "debug", "(", "\"isBondUnsaturated?: \"", ",", "bond", ")", ";", "IAtom", "[", "]", "atoms", "=", "BondManipula...
Returns whether a bond is unsaturated. A bond is unsaturated if <b>all</b> Atoms in the bond are unsaturated.
[ "Returns", "whether", "a", "bond", "is", "unsaturated", ".", "A", "bond", "is", "unsaturated", "if", "<b", ">", "all<", "/", "b", ">", "Atoms", "in", "the", "bond", "are", "unsaturated", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/valencycheck/src/main/java/org/openscience/cdk/tools/SmilesValencyChecker.java#L148-L157
joniles/mpxj
src/main/java/net/sf/mpxj/mpx/MPXReader.java
MPXReader.populateResourceAssignment
private void populateResourceAssignment(Record record, ResourceAssignment assignment) throws MPXJException { """ Populate a resource assignment. @param record MPX record @param assignment resource assignment @throws MPXJException """ // // Handle malformed MPX files - ensure that we can locate...
java
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...
[ "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 att...
Populate a resource assignment. @param record MPX record @param assignment resource assignment @throws MPXJException
[ "Populate", "a", "resource", "assignment", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXReader.java#L1403-L1449
dlemmermann/CalendarFX
CalendarFXRecurrence/src/main/java/com/google/ical/iter/Util.java
Util.invertWeekdayNum
static int invertWeekdayNum( WeekdayNum weekdayNum, Weekday dow0, int nDays) { """ Compute an absolute week number given a relative one. The day number -1SU refers to the last Sunday, so if there are 5 Sundays in a period that starts on dow0 with nDays, then -1SU is 5SU. Depending on where its used ...
java
static int invertWeekdayNum( WeekdayNum weekdayNum, Weekday dow0, int nDays) { assert weekdayNum.num < 0; // how many are there of that week? return countInPeriod(weekdayNum.wday, dow0, nDays) + weekdayNum.num + 1; }
[ "static", "int", "invertWeekdayNum", "(", "WeekdayNum", "weekdayNum", ",", "Weekday", "dow0", ",", "int", "nDays", ")", "{", "assert", "weekdayNum", ".", "num", "<", "0", ";", "// how many are there of that week?", "return", "countInPeriod", "(", "weekdayNum", "."...
Compute an absolute week number given a relative one. The day number -1SU refers to the last Sunday, so if there are 5 Sundays in a period that starts on dow0 with nDays, then -1SU is 5SU. Depending on where its used it may refer to the last Sunday of the year or of the month. @param weekdayNum -1SU in the example abo...
[ "Compute", "an", "absolute", "week", "number", "given", "a", "relative", "one", ".", "The", "day", "number", "-", "1SU", "refers", "to", "the", "last", "Sunday", "so", "if", "there", "are", "5", "Sundays", "in", "a", "period", "that", "starts", "on", "...
train
https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXRecurrence/src/main/java/com/google/ical/iter/Util.java#L124-L129
VoltDB/voltdb
src/frontend/org/voltdb/VoltDB.java
VoltDB.printStackTraces
public static void printStackTraces(PrintWriter writer, List<String> currentStacktrace) { """ /* Print stack traces for all threads in the process to the supplied writer. If a List is supplied then the stack frames for the current thread will be placed in it """ if (currentStacktrace == null) { ...
java
public static void printStackTraces(PrintWriter writer, List<String> currentStacktrace) { if (currentStacktrace == null) { currentStacktrace = new ArrayList<>(); } Map<Thread, StackTraceElement[]> traces = Thread.getAllStackTraces(); StackTraceElement[] myTrace = traces.get(...
[ "public", "static", "void", "printStackTraces", "(", "PrintWriter", "writer", ",", "List", "<", "String", ">", "currentStacktrace", ")", "{", "if", "(", "currentStacktrace", "==", "null", ")", "{", "currentStacktrace", "=", "new", "ArrayList", "<>", "(", ")", ...
/* Print stack traces for all threads in the process to the supplied writer. If a List is supplied then the stack frames for the current thread will be placed in it
[ "/", "*", "Print", "stack", "traces", "for", "all", "threads", "in", "the", "process", "to", "the", "supplied", "writer", ".", "If", "a", "List", "is", "supplied", "then", "the", "stack", "frames", "for", "the", "current", "thread", "will", "be", "placed...
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/VoltDB.java#L1176-L1205
bremersee/comparator
src/main/java/org/bremersee/comparator/ComparatorUtils.java
ComparatorUtils.doSetIgnoreCaseRecursively
public static void doSetIgnoreCaseRecursively(ComparatorItem comparatorItem, boolean ignoreCase) { """ Sets whether the sort is case sensitive or not to all items. @param comparatorItem the (root) item @param ignoreCase {@code true} if the sort is case sensitive, otherwise {@code false} """ Compara...
java
public static void doSetIgnoreCaseRecursively(ComparatorItem comparatorItem, boolean ignoreCase) { ComparatorItem tmp = comparatorItem; while (tmp != null) { tmp.setIgnoreCase(ignoreCase); tmp = tmp.getNextComparatorItem(); } }
[ "public", "static", "void", "doSetIgnoreCaseRecursively", "(", "ComparatorItem", "comparatorItem", ",", "boolean", "ignoreCase", ")", "{", "ComparatorItem", "tmp", "=", "comparatorItem", ";", "while", "(", "tmp", "!=", "null", ")", "{", "tmp", ".", "setIgnoreCase"...
Sets whether the sort is case sensitive or not to all items. @param comparatorItem the (root) item @param ignoreCase {@code true} if the sort is case sensitive, otherwise {@code false}
[ "Sets", "whether", "the", "sort", "is", "case", "sensitive", "or", "not", "to", "all", "items", "." ]
train
https://github.com/bremersee/comparator/blob/6958e6e28a62589106705062f8ffc201a87d9b2a/src/main/java/org/bremersee/comparator/ComparatorUtils.java#L52-L58
intive-FDV/DynamicJasper
src/main/java/ar/com/fdvs/dj/core/layout/CrossTabColorShema.java
CrossTabColorShema.setTotalColorForRow
public void setTotalColorForRow(int row, Color color) { """ * Sets the color for each total for the row @param row (starting from 1) @param color """ int map = (colors[0].length-1) - row; colors[colors.length-1][map]=color; }
java
public void setTotalColorForRow(int row, Color color){ int map = (colors[0].length-1) - row; colors[colors.length-1][map]=color; }
[ "public", "void", "setTotalColorForRow", "(", "int", "row", ",", "Color", "color", ")", "{", "int", "map", "=", "(", "colors", "[", "0", "]", ".", "length", "-", "1", ")", "-", "row", ";", "colors", "[", "colors", ".", "length", "-", "1", "]", "[...
* Sets the color for each total for the row @param row (starting from 1) @param color
[ "*", "Sets", "the", "color", "for", "each", "total", "for", "the", "row" ]
train
https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/core/layout/CrossTabColorShema.java#L92-L95
glyptodon/guacamole-client
guacamole-common/src/main/java/org/apache/guacamole/servlet/GuacamoleHTTPTunnelMap.java
GuacamoleHTTPTunnelMap.put
public void put(String uuid, GuacamoleTunnel tunnel) { """ Registers that a new connection has been established using HTTP via the given GuacamoleTunnel. @param uuid The UUID of the tunnel being added (registered). @param tunnel The GuacamoleTunnel being registered, its associated connection having just ...
java
public void put(String uuid, GuacamoleTunnel tunnel) { tunnelMap.put(uuid, new GuacamoleHTTPTunnel(tunnel)); }
[ "public", "void", "put", "(", "String", "uuid", ",", "GuacamoleTunnel", "tunnel", ")", "{", "tunnelMap", ".", "put", "(", "uuid", ",", "new", "GuacamoleHTTPTunnel", "(", "tunnel", ")", ")", ";", "}" ]
Registers that a new connection has been established using HTTP via the given GuacamoleTunnel. @param uuid The UUID of the tunnel being added (registered). @param tunnel The GuacamoleTunnel being registered, its associated connection having just been established via HTTP.
[ "Registers", "that", "a", "new", "connection", "has", "been", "established", "using", "HTTP", "via", "the", "given", "GuacamoleTunnel", "." ]
train
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole-common/src/main/java/org/apache/guacamole/servlet/GuacamoleHTTPTunnelMap.java#L179-L181
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/PdfStamperImp.java
PdfStamperImp.setPageAction
void setPageAction(PdfName actionType, PdfAction action, int page) throws PdfException { """ Sets the open and close page additional action. @param actionType the action type. It can be <CODE>PdfWriter.PAGE_OPEN</CODE> or <CODE>PdfWriter.PAGE_CLOSE</CODE> @param action the action to perform @param page the pag...
java
void setPageAction(PdfName actionType, PdfAction action, int page) throws PdfException { if (!actionType.equals(PAGE_OPEN) && !actionType.equals(PAGE_CLOSE)) throw new PdfException("Invalid page additional action type: " + actionType.toString()); PdfDictionary pg = reader.getPageN(page); ...
[ "void", "setPageAction", "(", "PdfName", "actionType", ",", "PdfAction", "action", ",", "int", "page", ")", "throws", "PdfException", "{", "if", "(", "!", "actionType", ".", "equals", "(", "PAGE_OPEN", ")", "&&", "!", "actionType", ".", "equals", "(", "PAG...
Sets the open and close page additional action. @param actionType the action type. It can be <CODE>PdfWriter.PAGE_OPEN</CODE> or <CODE>PdfWriter.PAGE_CLOSE</CODE> @param action the action to perform @param page the page where the action will be applied. The first page is 1 @throws PdfException if the action type is inv...
[ "Sets", "the", "open", "and", "close", "page", "additional", "action", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/PdfStamperImp.java#L1383-L1395
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/types/dsl/Expressions.java
Expressions.dateTimeTemplate
@Deprecated public static <T extends Comparable<?>> DateTimeTemplate<T> dateTimeTemplate(Class<? extends T> cl, String template, ImmutableList<?> args) { """ Create a new Template expression @deprecated Use {@link #dateTimeTemp...
java
@Deprecated public static <T extends Comparable<?>> DateTimeTemplate<T> dateTimeTemplate(Class<? extends T> cl, String template, ImmutableList<?> args) { return dateTimeTemplate(cl, createTemplate(template), args); }
[ "@", "Deprecated", "public", "static", "<", "T", "extends", "Comparable", "<", "?", ">", ">", "DateTimeTemplate", "<", "T", ">", "dateTimeTemplate", "(", "Class", "<", "?", "extends", "T", ">", "cl", ",", "String", "template", ",", "ImmutableList", "<", ...
Create a new Template expression @deprecated Use {@link #dateTimeTemplate(Class, String, List)} instead. @param cl type of expression @param template template @param args template parameters @return template expression
[ "Create", "a", "new", "Template", "expression" ]
train
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/types/dsl/Expressions.java#L577-L581
playn/playn
scene/src/playn/scene/Layer.java
Layer.debugPrint
public void debugPrint(final Log log) { """ Prints a debug representation of this layer and its children. @param log the output will go to this log (at the debug level). """ this.visit(new Visitor() { public void visit(Layer layer, int depth) { String prefix = repeat('.', depth); log...
java
public void debugPrint(final Log log) { this.visit(new Visitor() { public void visit(Layer layer, int depth) { String prefix = repeat('.', depth); log.debug(prefix + layer.toString()); } }); }
[ "public", "void", "debugPrint", "(", "final", "Log", "log", ")", "{", "this", ".", "visit", "(", "new", "Visitor", "(", ")", "{", "public", "void", "visit", "(", "Layer", "layer", ",", "int", "depth", ")", "{", "String", "prefix", "=", "repeat", "(",...
Prints a debug representation of this layer and its children. @param log the output will go to this log (at the debug level).
[ "Prints", "a", "debug", "representation", "of", "this", "layer", "and", "its", "children", "." ]
train
https://github.com/playn/playn/blob/7e7a9d048ba6afe550dc0cdeaca3e1d5b0d01c66/scene/src/playn/scene/Layer.java#L718-L725
amaembo/streamex
src/main/java/one/util/streamex/MoreCollectors.java
MoreCollectors.groupingByEnum
public static <T, K extends Enum<K>, A, D> Collector<T, ?, EnumMap<K, D>> groupingByEnum(Class<K> enumClass, Function<? super T, K> classifier, Collector<? super T, A, D> downstream) { """ Returns a {@code Collector} implementing a cascaded "group by" operation on input elements of type {@code T}, fo...
java
public static <T, K extends Enum<K>, A, D> Collector<T, ?, EnumMap<K, D>> groupingByEnum(Class<K> enumClass, Function<? super T, K> classifier, Collector<? super T, A, D> downstream) { return groupingBy(classifier, EnumSet.allOf(enumClass), () -> new EnumMap<>(enumClass), downstream); }
[ "public", "static", "<", "T", ",", "K", "extends", "Enum", "<", "K", ">", ",", "A", ",", "D", ">", "Collector", "<", "T", ",", "?", ",", "EnumMap", "<", "K", ",", "D", ">", ">", "groupingByEnum", "(", "Class", "<", "K", ">", "enumClass", ",", ...
Returns a {@code Collector} implementing a cascaded "group by" operation on input elements of type {@code T}, for classification function which maps input elements to the enum values. The downstream reduction for repeating keys is performed using the specified downstream {@code Collector}. <p> Unlike the {@link Collec...
[ "Returns", "a", "{", "@code", "Collector", "}", "implementing", "a", "cascaded", "group", "by", "operation", "on", "input", "elements", "of", "type", "{", "@code", "T", "}", "for", "classification", "function", "which", "maps", "input", "elements", "to", "th...
train
https://github.com/amaembo/streamex/blob/936bbd1b7dfbcf64a3b990682bfc848213441d14/src/main/java/one/util/streamex/MoreCollectors.java#L901-L904
elki-project/elki
elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/statistics/distribution/NormalDistribution.java
NormalDistribution.logpdf
public static double logpdf(double x, double mu, double sigma) { """ Log probability density function of the normal distribution. <p> \[\log\frac{1}{\sqrt{2\pi}} - \log\sigma - \tfrac{(x-\mu)^2}{2\sigma^2}\] @param x The value. @param mu The mean. @param sigma The standard deviation. @return PDF of the giv...
java
public static double logpdf(double x, double mu, double sigma) { x = (x - mu) / sigma; return MathUtil.LOG_ONE_BY_SQRTTWOPI - FastMath.log(sigma) - .5 * x * x; }
[ "public", "static", "double", "logpdf", "(", "double", "x", ",", "double", "mu", ",", "double", "sigma", ")", "{", "x", "=", "(", "x", "-", "mu", ")", "/", "sigma", ";", "return", "MathUtil", ".", "LOG_ONE_BY_SQRTTWOPI", "-", "FastMath", ".", "log", ...
Log probability density function of the normal distribution. <p> \[\log\frac{1}{\sqrt{2\pi}} - \log\sigma - \tfrac{(x-\mu)^2}{2\sigma^2}\] @param x The value. @param mu The mean. @param sigma The standard deviation. @return PDF of the given normal distribution at x.
[ "Log", "probability", "density", "function", "of", "the", "normal", "distribution", ".", "<p", ">", "\\", "[", "\\", "log", "\\", "frac", "{", "1", "}", "{", "\\", "sqrt", "{", "2", "\\", "pi", "}}", "-", "\\", "log", "\\", "sigma", "-", "\\", "t...
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/statistics/distribution/NormalDistribution.java#L412-L415
casmi/casmi
src/main/java/casmi/graphics/element/Element.java
Element.setRotation
public void setRotation(double angle, double x, double y, double z) { """ Sets the rotation angle of the Element. This method wraps the glRotate method. @param angle The angle of rotation @param x The rate of rotation angle round x-axis @param y The rate of rotation angle round x-axis @param z The rate ...
java
public void setRotation(double angle, double x, double y, double z) { this.rotateX = angle * x; this.rotateY = angle * y; this.rotate = angle * z; }
[ "public", "void", "setRotation", "(", "double", "angle", ",", "double", "x", ",", "double", "y", ",", "double", "z", ")", "{", "this", ".", "rotateX", "=", "angle", "*", "x", ";", "this", ".", "rotateY", "=", "angle", "*", "y", ";", "this", ".", ...
Sets the rotation angle of the Element. This method wraps the glRotate method. @param angle The angle of rotation @param x The rate of rotation angle round x-axis @param y The rate of rotation angle round x-axis @param z The rate of rotation angle round x-axis
[ "Sets", "the", "rotation", "angle", "of", "the", "Element", ".", "This", "method", "wraps", "the", "glRotate", "method", "." ]
train
https://github.com/casmi/casmi/blob/90f6514a9cbce0685186e7a92beb69e22a3b11c4/src/main/java/casmi/graphics/element/Element.java#L496-L500
OpenLiberty/open-liberty
dev/com.ibm.ws.monitor/src/com/ibm/ws/pmi/server/NLS.java
NLS.getString
public String getString(String key, String defaultString) { """ Overrides ResourceBundle.getString. Adds some error checking to ensure that we got a non-null key and resource bundle. Adds default string functionality. If the key for the resource was not found, return the default string passed in. This way so...
java
public String getString(String key, String defaultString) { if (key == null) { return defaultString; } try { String result = getString(key); return result; } catch (MissingResourceException e) { return defaultString; } }
[ "public", "String", "getString", "(", "String", "key", ",", "String", "defaultString", ")", "{", "if", "(", "key", "==", "null", ")", "{", "return", "defaultString", ";", "}", "try", "{", "String", "result", "=", "getString", "(", "key", ")", ";", "ret...
Overrides ResourceBundle.getString. Adds some error checking to ensure that we got a non-null key and resource bundle. Adds default string functionality. If the key for the resource was not found, return the default string passed in. This way something displays, even if it is in English. @param key Name portion of "n...
[ "Overrides", "ResourceBundle", ".", "getString", ".", "Adds", "some", "error", "checking", "to", "ensure", "that", "we", "got", "a", "non", "-", "null", "key", "and", "resource", "bundle", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.monitor/src/com/ibm/ws/pmi/server/NLS.java#L357-L367
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java
ModelsImpl.addCustomPrebuiltIntentAsync
public Observable<UUID> addCustomPrebuiltIntentAsync(UUID appId, String versionId, PrebuiltDomainModelCreateObject prebuiltDomainModelCreateObject) { """ Adds a custom prebuilt intent model to the application. @param appId The application ID. @param versionId The version ID. @param prebuiltDomainModelCreateOb...
java
public Observable<UUID> addCustomPrebuiltIntentAsync(UUID appId, String versionId, PrebuiltDomainModelCreateObject prebuiltDomainModelCreateObject) { return addCustomPrebuiltIntentWithServiceResponseAsync(appId, versionId, prebuiltDomainModelCreateObject).map(new Func1<ServiceResponse<UUID>, UUID>() { ...
[ "public", "Observable", "<", "UUID", ">", "addCustomPrebuiltIntentAsync", "(", "UUID", "appId", ",", "String", "versionId", ",", "PrebuiltDomainModelCreateObject", "prebuiltDomainModelCreateObject", ")", "{", "return", "addCustomPrebuiltIntentWithServiceResponseAsync", "(", "...
Adds a custom prebuilt intent model to the application. @param appId The application ID. @param versionId The version ID. @param prebuiltDomainModelCreateObject A model object containing the name of the custom prebuilt intent and the name of the domain to which this model belongs. @throws IllegalArgumentException thro...
[ "Adds", "a", "custom", "prebuilt", "intent", "model", "to", "the", "application", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java#L5740-L5747
geomajas/geomajas-project-client-gwt
client/src/main/java/org/geomajas/gwt/client/map/MapView.java
MapView.getWorldToViewTransformation
public Matrix getWorldToViewTransformation() { """ Return the world-to-view space transformation matrix. @return transformation matrix """ if (viewState.getScale() > 0) { double dX = -(viewState.getX() * viewState.getScale()) + width / 2; double dY = viewState.getY() * viewState.getScale() + height ...
java
public Matrix getWorldToViewTransformation() { if (viewState.getScale() > 0) { double dX = -(viewState.getX() * viewState.getScale()) + width / 2; double dY = viewState.getY() * viewState.getScale() + height / 2; return new Matrix(viewState.getScale(), 0, 0, -viewState.getScale(), dX, dY); } return new M...
[ "public", "Matrix", "getWorldToViewTransformation", "(", ")", "{", "if", "(", "viewState", ".", "getScale", "(", ")", ">", "0", ")", "{", "double", "dX", "=", "-", "(", "viewState", ".", "getX", "(", ")", "*", "viewState", ".", "getScale", "(", ")", ...
Return the world-to-view space transformation matrix. @return transformation matrix
[ "Return", "the", "world", "-", "to", "-", "view", "space", "transformation", "matrix", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/map/MapView.java#L141-L148
thorntail/wildfly-config-api
generator/src/main/java/org/wildfly/swarm/config/generator/generator/SupplierFactory.java
SupplierFactory.create
public JavaType create(ClassIndex index, ClassPlan plan) { """ Base template for a resource representation. Covers the resource attributes @param index @param plan @return """ // base class JavaInterfaceSource type = Roaster.parse( JavaInterfaceSource.class, ...
java
public JavaType create(ClassIndex index, ClassPlan plan) { // base class JavaInterfaceSource type = Roaster.parse( JavaInterfaceSource.class, "public interface " + plan.getClassName() + "Supplier<T extends " + plan.getClassName() + "> {}" ); type.setPack...
[ "public", "JavaType", "create", "(", "ClassIndex", "index", ",", "ClassPlan", "plan", ")", "{", "// base class", "JavaInterfaceSource", "type", "=", "Roaster", ".", "parse", "(", "JavaInterfaceSource", ".", "class", ",", "\"public interface \"", "+", "plan", ".", ...
Base template for a resource representation. Covers the resource attributes @param index @param plan @return
[ "Base", "template", "for", "a", "resource", "representation", ".", "Covers", "the", "resource", "attributes" ]
train
https://github.com/thorntail/wildfly-config-api/blob/ddb3f3bcb7b85b22c6371415546f567bc44493db/generator/src/main/java/org/wildfly/swarm/config/generator/generator/SupplierFactory.java#L28-L43
hawkular/hawkular-commons
hawkular-command-gateway/hawkular-command-gateway-war/src/main/java/org/hawkular/cmdgw/command/ws/server/WebSocketHelper.java
WebSocketHelper.sendBinarySync
public void sendBinarySync(Session session, InputStream inputStream) throws IOException { """ Sends binary data to a client synchronously. @param session the client where the message will be sent @param inputStream the binary data to send @throws IOException if a problem occurred during delivery of the data t...
java
public void sendBinarySync(Session session, InputStream inputStream) throws IOException { if (session == null) { return; } if (inputStream == null) { throw new IllegalArgumentException("inputStream must not be null"); } log.debugf("Attempting to send bin...
[ "public", "void", "sendBinarySync", "(", "Session", "session", ",", "InputStream", "inputStream", ")", "throws", "IOException", "{", "if", "(", "session", "==", "null", ")", "{", "return", ";", "}", "if", "(", "inputStream", "==", "null", ")", "{", "throw"...
Sends binary data to a client synchronously. @param session the client where the message will be sent @param inputStream the binary data to send @throws IOException if a problem occurred during delivery of the data to a session.
[ "Sends", "binary", "data", "to", "a", "client", "synchronously", "." ]
train
https://github.com/hawkular/hawkular-commons/blob/e4a832862b3446d7f4d629bb05790f2df578e035/hawkular-command-gateway/hawkular-command-gateway-war/src/main/java/org/hawkular/cmdgw/command/ws/server/WebSocketHelper.java#L143-L160
aws/aws-sdk-java
aws-java-sdk-core/src/main/java/com/amazonaws/util/RuntimeHttpUtils.java
RuntimeHttpUtils.toUri
public static URI toUri(String endpoint, Protocol protocol) { """ Returns an URI for the given endpoint. Prefixes the protocol if the endpoint given does not have it. @throws IllegalArgumentException if the inputs are null. """ if (endpoint == null) { throw new IllegalArgumentException(...
java
public static URI toUri(String endpoint, Protocol protocol) { if (endpoint == null) { throw new IllegalArgumentException("endpoint cannot be null"); } /* * If the endpoint doesn't explicitly specify a protocol to use, then * we'll defer to the default protocol spec...
[ "public", "static", "URI", "toUri", "(", "String", "endpoint", ",", "Protocol", "protocol", ")", "{", "if", "(", "endpoint", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"endpoint cannot be null\"", ")", ";", "}", "/*\n * If...
Returns an URI for the given endpoint. Prefixes the protocol if the endpoint given does not have it. @throws IllegalArgumentException if the inputs are null.
[ "Returns", "an", "URI", "for", "the", "given", "endpoint", ".", "Prefixes", "the", "protocol", "if", "the", "endpoint", "given", "does", "not", "have", "it", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/util/RuntimeHttpUtils.java#L180-L199
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/cache/impl/CacheProxyUtil.java
CacheProxyUtil.validateConfiguredValueType
public static <V> void validateConfiguredValueType(Class<V> valueType, V value) throws ClassCastException { """ Validates the value with value type. @param valueType value class. @param value value to be validated. @param <V> the type of value. @throws ClassCastException if the provided value do no...
java
public static <V> void validateConfiguredValueType(Class<V> valueType, V value) throws ClassCastException { if (Object.class != valueType) { // means that type checks is required if (!valueType.isAssignableFrom(value.getClass())) { throw new ClassCastException("Value '" +...
[ "public", "static", "<", "V", ">", "void", "validateConfiguredValueType", "(", "Class", "<", "V", ">", "valueType", ",", "V", "value", ")", "throws", "ClassCastException", "{", "if", "(", "Object", ".", "class", "!=", "valueType", ")", "{", "// means that ty...
Validates the value with value type. @param valueType value class. @param value value to be validated. @param <V> the type of value. @throws ClassCastException if the provided value do not match with valueType.
[ "Validates", "the", "value", "with", "value", "type", "." ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/cache/impl/CacheProxyUtil.java#L231-L238
aws/aws-sdk-java
aws-java-sdk-emr/src/main/java/com/amazonaws/services/elasticmapreduce/model/Configuration.java
Configuration.withProperties
public Configuration withProperties(java.util.Map<String, String> properties) { """ <p> A set of properties specified within a configuration classification. </p> @param properties A set of properties specified within a configuration classification. @return Returns a reference to this object so that method c...
java
public Configuration withProperties(java.util.Map<String, String> properties) { setProperties(properties); return this; }
[ "public", "Configuration", "withProperties", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "properties", ")", "{", "setProperties", "(", "properties", ")", ";", "return", "this", ";", "}" ]
<p> A set of properties specified within a configuration classification. </p> @param properties A set of properties specified within a configuration classification. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "A", "set", "of", "properties", "specified", "within", "a", "configuration", "classification", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-emr/src/main/java/com/amazonaws/services/elasticmapreduce/model/Configuration.java#L210-L213
javagl/ND
nd-arrays/src/main/java/de/javagl/nd/arrays/j/LongArraysND.java
LongArraysND.toFormattedString
public static String toFormattedString(LongArrayND array, String format) { """ Creates a formatted representation of the given array. After each dimension, a newline character will be inserted. @param array The array @param format The format for the array entries @return The hash code """ if (ar...
java
public static String toFormattedString(LongArrayND array, String format) { if (array == null) { return "null"; } StringBuilder sb = new StringBuilder(); Iterable<MutableIntTuple> iterable = IntTupleIterables.lexicographicalIterable(array.getSi...
[ "public", "static", "String", "toFormattedString", "(", "LongArrayND", "array", ",", "String", "format", ")", "{", "if", "(", "array", "==", "null", ")", "{", "return", "\"null\"", ";", "}", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";"...
Creates a formatted representation of the given array. After each dimension, a newline character will be inserted. @param array The array @param format The format for the array entries @return The hash code
[ "Creates", "a", "formatted", "representation", "of", "the", "given", "array", ".", "After", "each", "dimension", "a", "newline", "character", "will", "be", "inserted", "." ]
train
https://github.com/javagl/ND/blob/bcb655aaf5fc88af6194f73a27cca079186ff559/nd-arrays/src/main/java/de/javagl/nd/arrays/j/LongArraysND.java#L361-L386
haraldk/TwelveMonkeys
contrib/src/main/java/com/twelvemonkeys/contrib/tiff/TIFFUtilities.java
TIFFUtilities.rotatePages
public static void rotatePages(ImageInputStream imageInput, ImageOutputStream imageOutput, int degree) throws IOException { """ Rotates all pages of a TIFF file by changing TIFF.TAG_ORIENTATION. <p> NOTICE: TIFF.TAG_ORIENTATION is an advice how the image is meant do be displayed. Other metadata, suc...
java
public static void rotatePages(ImageInputStream imageInput, ImageOutputStream imageOutput, int degree) throws IOException { rotatePage(imageInput, imageOutput, degree, -1); }
[ "public", "static", "void", "rotatePages", "(", "ImageInputStream", "imageInput", ",", "ImageOutputStream", "imageOutput", ",", "int", "degree", ")", "throws", "IOException", "{", "rotatePage", "(", "imageInput", ",", "imageOutput", ",", "degree", ",", "-", "1", ...
Rotates all pages of a TIFF file by changing TIFF.TAG_ORIENTATION. <p> NOTICE: TIFF.TAG_ORIENTATION is an advice how the image is meant do be displayed. Other metadata, such as width and height, relate to the image as how it is stored. The ImageIO TIFF plugin does not handle orientation. Use {@link TIFFUtilities#applyO...
[ "Rotates", "all", "pages", "of", "a", "TIFF", "file", "by", "changing", "TIFF", ".", "TAG_ORIENTATION", ".", "<p", ">", "NOTICE", ":", "TIFF", ".", "TAG_ORIENTATION", "is", "an", "advice", "how", "the", "image", "is", "meant", "do", "be", "displayed", "....
train
https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/contrib/src/main/java/com/twelvemonkeys/contrib/tiff/TIFFUtilities.java#L159-L162
nguyenq/tess4j
src/main/java/net/sourceforge/tess4j/Tesseract.java
Tesseract.doOCR
@Override public String doOCR(List<IIOImage> imageList, String filename, Rectangle rect) throws TesseractException { """ Performs OCR operation. @param imageList a list of <code>IIOImage</code> objects @param filename input file name. Needed only for training and reading a UNLV zone file. @param rect th...
java
@Override public String doOCR(List<IIOImage> imageList, String filename, Rectangle rect) throws TesseractException { init(); setTessVariables(); try { StringBuilder sb = new StringBuilder(); int pageNum = 0; for (IIOImage oimage : imageList) { ...
[ "@", "Override", "public", "String", "doOCR", "(", "List", "<", "IIOImage", ">", "imageList", ",", "String", "filename", ",", "Rectangle", "rect", ")", "throws", "TesseractException", "{", "init", "(", ")", ";", "setTessVariables", "(", ")", ";", "try", "{...
Performs OCR operation. @param imageList a list of <code>IIOImage</code> objects @param filename input file name. Needed only for training and reading a UNLV zone file. @param rect the bounding rectangle defines the region of the image to be recognized. A rectangle of zero dimension or <code>null</code> indicates the ...
[ "Performs", "OCR", "operation", "." ]
train
https://github.com/nguyenq/tess4j/blob/cfcd4a8a44042f150b4aaf7bdf5ffc485a2236e1/src/main/java/net/sourceforge/tess4j/Tesseract.java#L308-L336
Omertron/api-themoviedb
src/main/java/com/omertron/themoviedbapi/TheMovieDbApi.java
TheMovieDbApi.getCollectionInfo
public CollectionInfo getCollectionInfo(int collectionId, String language) throws MovieDbException { """ This method is used to retrieve all of the basic information about a movie collection. You can get the ID needed for this method by making a getMovieInfo request for the belongs_to_collection. @param co...
java
public CollectionInfo getCollectionInfo(int collectionId, String language) throws MovieDbException { return tmdbCollections.getCollectionInfo(collectionId, language); }
[ "public", "CollectionInfo", "getCollectionInfo", "(", "int", "collectionId", ",", "String", "language", ")", "throws", "MovieDbException", "{", "return", "tmdbCollections", ".", "getCollectionInfo", "(", "collectionId", ",", "language", ")", ";", "}" ]
This method is used to retrieve all of the basic information about a movie collection. You can get the ID needed for this method by making a getMovieInfo request for the belongs_to_collection. @param collectionId collectionId @param language language @return CollectionInfo @throws MovieDbException exception
[ "This", "method", "is", "used", "to", "retrieve", "all", "of", "the", "basic", "information", "about", "a", "movie", "collection", "." ]
train
https://github.com/Omertron/api-themoviedb/blob/bf132d7c7271734e13b58ba3bc92bba46f220118/src/main/java/com/omertron/themoviedbapi/TheMovieDbApi.java#L512-L514
box/box-java-sdk
src/main/java/com/box/sdk/LargeFileUpload.java
LargeFileUpload.generateDigest
public String generateDigest(InputStream stream) { """ Generates the Base64 encoded SHA-1 hash for content available in the stream. It can be used to calculate the hash of a file. @param stream the input stream of the file or data. @return the Base64 encoded hash string. """ MessageDigest digest = n...
java
public String generateDigest(InputStream stream) { MessageDigest digest = null; try { digest = MessageDigest.getInstance(DIGEST_ALGORITHM_SHA1); } catch (NoSuchAlgorithmException ae) { throw new BoxAPIException("Digest algorithm not found", ae); } //Calcu...
[ "public", "String", "generateDigest", "(", "InputStream", "stream", ")", "{", "MessageDigest", "digest", "=", "null", ";", "try", "{", "digest", "=", "MessageDigest", ".", "getInstance", "(", "DIGEST_ALGORITHM_SHA1", ")", ";", "}", "catch", "(", "NoSuchAlgorithm...
Generates the Base64 encoded SHA-1 hash for content available in the stream. It can be used to calculate the hash of a file. @param stream the input stream of the file or data. @return the Base64 encoded hash string.
[ "Generates", "the", "Base64", "encoded", "SHA", "-", "1", "hash", "for", "content", "available", "in", "the", "stream", ".", "It", "can", "be", "used", "to", "calculate", "the", "hash", "of", "a", "file", "." ]
train
https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/LargeFileUpload.java#L220-L242
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/geo/MultiViewOps.java
MultiViewOps.fundamentalToProjective
public static DMatrixRMaj fundamentalToProjective(DMatrixRMaj F ) { """ <p> Given a fundamental matrix a pair of camera matrices P0 and P1 can be extracted. Same {@link #fundamentalToProjective(DMatrixRMaj, Point3D_F64, Vector3D_F64, double)} but with the suggested values for all variables filled in for you. <...
java
public static DMatrixRMaj fundamentalToProjective(DMatrixRMaj F ) { FundamentalToProjective f2p = new FundamentalToProjective(); DMatrixRMaj P = new DMatrixRMaj(3,4); f2p.twoView(F,P); return P; }
[ "public", "static", "DMatrixRMaj", "fundamentalToProjective", "(", "DMatrixRMaj", "F", ")", "{", "FundamentalToProjective", "f2p", "=", "new", "FundamentalToProjective", "(", ")", ";", "DMatrixRMaj", "P", "=", "new", "DMatrixRMaj", "(", "3", ",", "4", ")", ";", ...
<p> Given a fundamental matrix a pair of camera matrices P0 and P1 can be extracted. Same {@link #fundamentalToProjective(DMatrixRMaj, Point3D_F64, Vector3D_F64, double)} but with the suggested values for all variables filled in for you. </p> @see FundamentalToProjective @param F (Input) Fundamental Matrix @return Th...
[ "<p", ">", "Given", "a", "fundamental", "matrix", "a", "pair", "of", "camera", "matrices", "P0", "and", "P1", "can", "be", "extracted", ".", "Same", "{", "@link", "#fundamentalToProjective", "(", "DMatrixRMaj", "Point3D_F64", "Vector3D_F64", "double", ")", "}"...
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/MultiViewOps.java#L930-L935
Azure/azure-sdk-for-java
cognitiveservices/data-plane/search/bingcustomsearch/src/main/java/com/microsoft/azure/cognitiveservices/search/customsearch/implementation/BingCustomInstancesImpl.java
BingCustomInstancesImpl.searchWithServiceResponseAsync
public Observable<ServiceResponse<SearchResponse>> searchWithServiceResponseAsync(long customConfig, String query, SearchOptionalParameter searchOptionalParameter) { """ The Custom Search API lets you send a search query to Bing and get back web pages found in your custom view of the web. @param customConfig Th...
java
public Observable<ServiceResponse<SearchResponse>> searchWithServiceResponseAsync(long customConfig, String query, SearchOptionalParameter searchOptionalParameter) { if (query == null) { throw new IllegalArgumentException("Parameter query is required and cannot be null."); } final St...
[ "public", "Observable", "<", "ServiceResponse", "<", "SearchResponse", ">", ">", "searchWithServiceResponseAsync", "(", "long", "customConfig", ",", "String", "query", ",", "SearchOptionalParameter", "searchOptionalParameter", ")", "{", "if", "(", "query", "==", "null...
The Custom Search API lets you send a search query to Bing and get back web pages found in your custom view of the web. @param customConfig The identifier for the custom search configuration @param query The user's search query term. The term may not be empty. The term may contain Bing Advanced Operators. For example,...
[ "The", "Custom", "Search", "API", "lets", "you", "send", "a", "search", "query", "to", "Bing", "and", "get", "back", "web", "pages", "found", "in", "your", "custom", "view", "of", "the", "web", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/search/bingcustomsearch/src/main/java/com/microsoft/azure/cognitiveservices/search/customsearch/implementation/BingCustomInstancesImpl.java#L121-L140
GoogleCloudPlatform/appengine-gcs-client
java/example/src/main/java/com/google/appengine/demos/GcsExampleServlet.java
GcsExampleServlet.copy
private void copy(InputStream input, OutputStream output) throws IOException { """ Transfer the data from the inputStream to the outputStream. Then close both streams. """ try { byte[] buffer = new byte[BUFFER_SIZE]; int bytesRead = input.read(buffer); while (bytesRead != -1) { ou...
java
private void copy(InputStream input, OutputStream output) throws IOException { try { byte[] buffer = new byte[BUFFER_SIZE]; int bytesRead = input.read(buffer); while (bytesRead != -1) { output.write(buffer, 0, bytesRead); bytesRead = input.read(buffer); } } finally { ...
[ "private", "void", "copy", "(", "InputStream", "input", ",", "OutputStream", "output", ")", "throws", "IOException", "{", "try", "{", "byte", "[", "]", "buffer", "=", "new", "byte", "[", "BUFFER_SIZE", "]", ";", "int", "bytesRead", "=", "input", ".", "re...
Transfer the data from the inputStream to the outputStream. Then close both streams.
[ "Transfer", "the", "data", "from", "the", "inputStream", "to", "the", "outputStream", ".", "Then", "close", "both", "streams", "." ]
train
https://github.com/GoogleCloudPlatform/appengine-gcs-client/blob/d11078331ecd915d753c886e96a80133599f3f98/java/example/src/main/java/com/google/appengine/demos/GcsExampleServlet.java#L110-L122
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/util/SegmentsUtil.java
SegmentsUtil.getBoolean
public static boolean getBoolean(MemorySegment[] segments, int offset) { """ get boolean from segments. @param segments target segments. @param offset value offset. """ if (inFirstSegment(segments, offset, 1)) { return segments[0].getBoolean(offset); } else { return getBooleanMultiSegments(segmen...
java
public static boolean getBoolean(MemorySegment[] segments, int offset) { if (inFirstSegment(segments, offset, 1)) { return segments[0].getBoolean(offset); } else { return getBooleanMultiSegments(segments, offset); } }
[ "public", "static", "boolean", "getBoolean", "(", "MemorySegment", "[", "]", "segments", ",", "int", "offset", ")", "{", "if", "(", "inFirstSegment", "(", "segments", ",", "offset", ",", "1", ")", ")", "{", "return", "segments", "[", "0", "]", ".", "ge...
get boolean from segments. @param segments target segments. @param offset value offset.
[ "get", "boolean", "from", "segments", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/util/SegmentsUtil.java#L534-L540
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/stores/PEMKeyStore.java
PEMKeyStore.engineStore
@Override public void engineStore(OutputStream outputStream, char[] chars) throws IOException, NoSuchAlgorithmException, CertificateException { """ Persist the security material in this keystore. If the object has a path associated with it, the object will be persisted to that path. Otherwise it will be stor...
java
@Override public void engineStore(OutputStream outputStream, char[] chars) throws IOException, NoSuchAlgorithmException, CertificateException { for (SecurityObjectWrapper<?> object : this.aliasObjectMap.values()) { if (object instanceof Storable) { try { ((Storable) object).store(); } catch (Resou...
[ "@", "Override", "public", "void", "engineStore", "(", "OutputStream", "outputStream", ",", "char", "[", "]", "chars", ")", "throws", "IOException", ",", "NoSuchAlgorithmException", ",", "CertificateException", "{", "for", "(", "SecurityObjectWrapper", "<", "?", "...
Persist the security material in this keystore. If the object has a path associated with it, the object will be persisted to that path. Otherwise it will be stored in the default certificate directory. As a result, the parameters of this method are ignored. @param outputStream This parameter is ignored. @param chars T...
[ "Persist", "the", "security", "material", "in", "this", "keystore", ".", "If", "the", "object", "has", "a", "path", "associated", "with", "it", "the", "object", "will", "be", "persisted", "to", "that", "path", ".", "Otherwise", "it", "will", "be", "stored"...
train
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/stores/PEMKeyStore.java#L187-L199
geomajas/geomajas-project-client-gwt
common-gwt-smartgwt/src/main/java/org/geomajas/gwt/client/util/HtmlBuilder.java
HtmlBuilder.trStyleHtmlContent
public static String trStyleHtmlContent(String style, String... content) { """ Build a HTML TableRow with given CSS style attributes for a string. Use this method if given content contains HTML snippets, prepared with {@link HtmlBuilder#htmlEncode(String)}. @param style style for tr element @param content con...
java
public static String trStyleHtmlContent(String style, String... content) { return tagStyleHtmlContent(Html.Tag.TR, style, content); }
[ "public", "static", "String", "trStyleHtmlContent", "(", "String", "style", ",", "String", "...", "content", ")", "{", "return", "tagStyleHtmlContent", "(", "Html", ".", "Tag", ".", "TR", ",", "style", ",", "content", ")", ";", "}" ]
Build a HTML TableRow with given CSS style attributes for a string. Use this method if given content contains HTML snippets, prepared with {@link HtmlBuilder#htmlEncode(String)}. @param style style for tr element @param content content string @return HTML tr element as string
[ "Build", "a", "HTML", "TableRow", "with", "given", "CSS", "style", "attributes", "for", "a", "string", ".", "Use", "this", "method", "if", "given", "content", "contains", "HTML", "snippets", "prepared", "with", "{", "@link", "HtmlBuilder#htmlEncode", "(", "Str...
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/common-gwt-smartgwt/src/main/java/org/geomajas/gwt/client/util/HtmlBuilder.java#L127-L129
gallandarakhneorg/afc
core/text/src/main/java/org/arakhne/afc/text/TextUtil.java
TextUtil.formatDouble
@Pure public static String formatDouble(double amount, int decimalCount) { """ Format the given double value. @param amount the value to convert. @param decimalCount is the maximal count of decimal to put in the string. @return a string representation of the given value. """ final int dc = (decimalCoun...
java
@Pure public static String formatDouble(double amount, int decimalCount) { final int dc = (decimalCount < 0) ? 0 : decimalCount; final StringBuilder str = new StringBuilder("#0"); //$NON-NLS-1$ if (dc > 0) { str.append('.'); for (int i = 0; i < dc; ++i) { str.append('0'); } } final DecimalFor...
[ "@", "Pure", "public", "static", "String", "formatDouble", "(", "double", "amount", ",", "int", "decimalCount", ")", "{", "final", "int", "dc", "=", "(", "decimalCount", "<", "0", ")", "?", "0", ":", "decimalCount", ";", "final", "StringBuilder", "str", ...
Format the given double value. @param amount the value to convert. @param decimalCount is the maximal count of decimal to put in the string. @return a string representation of the given value.
[ "Format", "the", "given", "double", "value", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/text/src/main/java/org/arakhne/afc/text/TextUtil.java#L1639-L1654
playn/playn
core/src/playn/core/json/JsonParser.java
JsonParser.stringHexChar
private int stringHexChar() throws JsonParserException { """ Advances a character, throwing if it is illegal in the context of a JSON string hex unicode escape. """ // GWT-compatible Character.digit(char, int) int c = "0123456789abcdef0123456789ABCDEF".indexOf(advanceChar()) % 16; if (c == -1) ...
java
private int stringHexChar() throws JsonParserException { // GWT-compatible Character.digit(char, int) int c = "0123456789abcdef0123456789ABCDEF".indexOf(advanceChar()) % 16; if (c == -1) throw createParseException(null, "Expected unicode hex escape character", false); return c; }
[ "private", "int", "stringHexChar", "(", ")", "throws", "JsonParserException", "{", "// GWT-compatible Character.digit(char, int)", "int", "c", "=", "\"0123456789abcdef0123456789ABCDEF\"", ".", "indexOf", "(", "advanceChar", "(", ")", ")", "%", "16", ";", "if", "(", ...
Advances a character, throwing if it is illegal in the context of a JSON string hex unicode escape.
[ "Advances", "a", "character", "throwing", "if", "it", "is", "illegal", "in", "the", "context", "of", "a", "JSON", "string", "hex", "unicode", "escape", "." ]
train
https://github.com/playn/playn/blob/7e7a9d048ba6afe550dc0cdeaca3e1d5b0d01c66/core/src/playn/core/json/JsonParser.java#L386-L392
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.getDeletedCertificatesAsync
public Observable<Page<DeletedCertificateItem>> getDeletedCertificatesAsync(final String vaultBaseUrl, final Integer maxresults, final Boolean includePending) { """ Lists the deleted certificates in the specified vault currently available for recovery. The GetDeletedCertificates operation retrieves the certificat...
java
public Observable<Page<DeletedCertificateItem>> getDeletedCertificatesAsync(final String vaultBaseUrl, final Integer maxresults, final Boolean includePending) { return getDeletedCertificatesWithServiceResponseAsync(vaultBaseUrl, maxresults, includePending) .map(new Func1<ServiceResponse<Page<Deleted...
[ "public", "Observable", "<", "Page", "<", "DeletedCertificateItem", ">", ">", "getDeletedCertificatesAsync", "(", "final", "String", "vaultBaseUrl", ",", "final", "Integer", "maxresults", ",", "final", "Boolean", "includePending", ")", "{", "return", "getDeletedCertif...
Lists the deleted certificates in the specified vault currently available for recovery. The GetDeletedCertificates operation retrieves the certificates in the current vault which are in a deleted state and ready for recovery or purging. This operation includes deletion-specific information. This operation requires the ...
[ "Lists", "the", "deleted", "certificates", "in", "the", "specified", "vault", "currently", "available", "for", "recovery", ".", "The", "GetDeletedCertificates", "operation", "retrieves", "the", "certificates", "in", "the", "current", "vault", "which", "are", "in", ...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L8450-L8458
pravega/pravega
segmentstore/server/src/main/java/io/pravega/segmentstore/server/writer/SegmentAggregator.java
SegmentAggregator.mergeInStorage
private CompletableFuture<SegmentProperties> mergeInStorage(SegmentMetadata transactionMetadata, MergeSegmentOperation mergeOp, TimeoutTimer timer) { """ Executes the merge of the Source StreamSegment with given metadata into this one in Storage. """ return this.storage .getStreamSegmen...
java
private CompletableFuture<SegmentProperties> mergeInStorage(SegmentMetadata transactionMetadata, MergeSegmentOperation mergeOp, TimeoutTimer timer) { return this.storage .getStreamSegmentInfo(transactionMetadata.getName(), timer.getRemaining()) .thenAcceptAsync(transProperties ->...
[ "private", "CompletableFuture", "<", "SegmentProperties", ">", "mergeInStorage", "(", "SegmentMetadata", "transactionMetadata", ",", "MergeSegmentOperation", "mergeOp", ",", "TimeoutTimer", "timer", ")", "{", "return", "this", ".", "storage", ".", "getStreamSegmentInfo", ...
Executes the merge of the Source StreamSegment with given metadata into this one in Storage.
[ "Executes", "the", "merge", "of", "the", "Source", "StreamSegment", "with", "given", "metadata", "into", "this", "one", "in", "Storage", "." ]
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/segmentstore/server/src/main/java/io/pravega/segmentstore/server/writer/SegmentAggregator.java#L943-L982
JOML-CI/JOML
src/org/joml/Intersectiond.java
Intersectiond.intersectRayAar
public static int intersectRayAar(Vector2dc origin, Vector2dc dir, Vector2dc min, Vector2dc max, Vector2d result) { """ Determine whether the given ray with the given <code>origin</code> and direction <code>dir</code> intersects the axis-aligned rectangle given as its minimum corner <code>min</code> and maximum c...
java
public static int intersectRayAar(Vector2dc origin, Vector2dc dir, Vector2dc min, Vector2dc max, Vector2d result) { return intersectRayAar(origin.x(), origin.y(), dir.x(), dir.y(), min.x(), min.y(), max.x(), max.y(), result); }
[ "public", "static", "int", "intersectRayAar", "(", "Vector2dc", "origin", ",", "Vector2dc", "dir", ",", "Vector2dc", "min", ",", "Vector2dc", "max", ",", "Vector2d", "result", ")", "{", "return", "intersectRayAar", "(", "origin", ".", "x", "(", ")", ",", "...
Determine whether the given ray with the given <code>origin</code> and direction <code>dir</code> intersects the axis-aligned rectangle given as its minimum corner <code>min</code> and maximum corner <code>max</code>, and return the values of the parameter <i>t</i> in the ray equation <i>p(t) = origin + t * dir</i> of ...
[ "Determine", "whether", "the", "given", "ray", "with", "the", "given", "<code", ">", "origin<", "/", "code", ">", "and", "direction", "<code", ">", "dir<", "/", "code", ">", "intersects", "the", "axis", "-", "aligned", "rectangle", "given", "as", "its", ...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Intersectiond.java#L4441-L4443
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java
ModelsImpl.updatePatternAnyEntityModelAsync
public Observable<OperationStatus> updatePatternAnyEntityModelAsync(UUID appId, String versionId, UUID entityId, PatternAnyModelUpdateObject patternAnyUpdateObject) { """ Updates the name and explicit list of a Pattern.Any entity model. @param appId The application ID. @param versionId The version ID. @param ...
java
public Observable<OperationStatus> updatePatternAnyEntityModelAsync(UUID appId, String versionId, UUID entityId, PatternAnyModelUpdateObject patternAnyUpdateObject) { return updatePatternAnyEntityModelWithServiceResponseAsync(appId, versionId, entityId, patternAnyUpdateObject).map(new Func1<ServiceResponse<Oper...
[ "public", "Observable", "<", "OperationStatus", ">", "updatePatternAnyEntityModelAsync", "(", "UUID", "appId", ",", "String", "versionId", ",", "UUID", "entityId", ",", "PatternAnyModelUpdateObject", "patternAnyUpdateObject", ")", "{", "return", "updatePatternAnyEntityModel...
Updates the name and explicit list of a Pattern.Any entity model. @param appId The application ID. @param versionId The version ID. @param entityId The Pattern.Any entity extractor ID. @param patternAnyUpdateObject An object containing the explicit list of the Pattern.Any entity. @throws IllegalArgumentException throw...
[ "Updates", "the", "name", "and", "explicit", "list", "of", "a", "Pattern", ".", "Any", "entity", "model", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java#L10581-L10588
anotheria/configureme
src/main/java/org/configureme/parser/CompositeParsedAttribute.java
CompositeParsedAttribute.createCompositeValue
private static CompositeValue createCompositeValue(final String name, final Collection<? extends ParsedAttribute<?>> value) { """ Creates internal representation of the attribute value. @param name name of the attribute @param value list of child attribute values of the attribute within the environment @return ...
java
private static CompositeValue createCompositeValue(final String name, final Collection<? extends ParsedAttribute<?>> value) { final Map<String, Value> map = new HashMap<>(value.size()); for (final ParsedAttribute<?> attr : value) { map.put(attr.getName(), attr.getValue()); } return new CompositeValu...
[ "private", "static", "CompositeValue", "createCompositeValue", "(", "final", "String", "name", ",", "final", "Collection", "<", "?", "extends", "ParsedAttribute", "<", "?", ">", ">", "value", ")", "{", "final", "Map", "<", "String", ",", "Value", ">", "map",...
Creates internal representation of the attribute value. @param name name of the attribute @param value list of child attribute values of the attribute within the environment @return internal representation of the composite attribute value
[ "Creates", "internal", "representation", "of", "the", "attribute", "value", "." ]
train
https://github.com/anotheria/configureme/blob/1f52dd9109349623190586bdf5a592de8016e1fa/src/main/java/org/configureme/parser/CompositeParsedAttribute.java#L37-L43
google/closure-templates
java/src/com/google/template/soy/msgs/internal/ExtractMsgsVisitor.java
ExtractMsgsVisitor.exec
@Override public SoyMsgBundle exec(SoyNode node) { """ Returns a SoyMsgBundle containing all messages extracted from the given SoyFileSetNode or SoyFileNode (locale string is null). """ Preconditions.checkArgument(node instanceof SoyFileSetNode || node instanceof SoyFileNode); msgs = Lists.newArray...
java
@Override public SoyMsgBundle exec(SoyNode node) { Preconditions.checkArgument(node instanceof SoyFileSetNode || node instanceof SoyFileNode); msgs = Lists.newArrayList(); visit(node); Collections.sort(msgs, SOURCE_LOCATION_ORDERING); return new SoyMsgBundleImpl(null, msgs); }
[ "@", "Override", "public", "SoyMsgBundle", "exec", "(", "SoyNode", "node", ")", "{", "Preconditions", ".", "checkArgument", "(", "node", "instanceof", "SoyFileSetNode", "||", "node", "instanceof", "SoyFileNode", ")", ";", "msgs", "=", "Lists", ".", "newArrayList...
Returns a SoyMsgBundle containing all messages extracted from the given SoyFileSetNode or SoyFileNode (locale string is null).
[ "Returns", "a", "SoyMsgBundle", "containing", "all", "messages", "extracted", "from", "the", "given", "SoyFileSetNode", "or", "SoyFileNode", "(", "locale", "string", "is", "null", ")", "." ]
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/msgs/internal/ExtractMsgsVisitor.java#L65-L73