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
OSSIndex/heuristic-version
src/main/java/net/ossindex/version/impl/SemanticVersion.java
SemanticVersion.getNextParentVersion
public SemanticVersion getNextParentVersion() { """ Strip the lowest number and increment the next one up. For example: 1.2.3 becomes 1.3.0 """ int major = head.getMajorVersion(); int minor = head.getMinorVersion(); int patch = head.getPatchVersion(); switch (significantDigits) { case...
java
public SemanticVersion getNextParentVersion() { int major = head.getMajorVersion(); int minor = head.getMinorVersion(); int patch = head.getPatchVersion(); switch (significantDigits) { case 1: throw new UnsupportedOperationException(); case 2: major++; minor = 0; ...
[ "public", "SemanticVersion", "getNextParentVersion", "(", ")", "{", "int", "major", "=", "head", ".", "getMajorVersion", "(", ")", ";", "int", "minor", "=", "head", ".", "getMinorVersion", "(", ")", ";", "int", "patch", "=", "head", ".", "getPatchVersion", ...
Strip the lowest number and increment the next one up. For example: 1.2.3 becomes 1.3.0
[ "Strip", "the", "lowest", "number", "and", "increment", "the", "next", "one", "up", ".", "For", "example", ":" ]
train
https://github.com/OSSIndex/heuristic-version/blob/9fe33a49d74acec54ddb91de9a3c3cd2f98fba40/src/main/java/net/ossindex/version/impl/SemanticVersion.java#L314-L334
wildfly/wildfly-core
controller/src/main/java/org/jboss/as/controller/SimpleAttributeDefinition.java
SimpleAttributeDefinition.marshallAsAttribute
public void marshallAsAttribute(final ModelNode resourceModel, final XMLStreamWriter writer) throws XMLStreamException { """ Marshalls the value from the given {@code resourceModel} as an xml attribute, if it {@link #isMarshallable(org.jboss.dmr.ModelNode, boolean) is marshallable}. <p> Invoking this method is ...
java
public void marshallAsAttribute(final ModelNode resourceModel, final XMLStreamWriter writer) throws XMLStreamException { marshallAsAttribute(resourceModel, true, writer); }
[ "public", "void", "marshallAsAttribute", "(", "final", "ModelNode", "resourceModel", ",", "final", "XMLStreamWriter", "writer", ")", "throws", "XMLStreamException", "{", "marshallAsAttribute", "(", "resourceModel", ",", "true", ",", "writer", ")", ";", "}" ]
Marshalls the value from the given {@code resourceModel} as an xml attribute, if it {@link #isMarshallable(org.jboss.dmr.ModelNode, boolean) is marshallable}. <p> Invoking this method is the same as calling {@code marshallAsAttribute(resourceModel, true, writer)} </p> @param resourceModel the model, a non-null node of...
[ "Marshalls", "the", "value", "from", "the", "given", "{", "@code", "resourceModel", "}", "as", "an", "xml", "attribute", "if", "it", "{", "@link", "#isMarshallable", "(", "org", ".", "jboss", ".", "dmr", ".", "ModelNode", "boolean", ")", "is", "marshallabl...
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/SimpleAttributeDefinition.java#L132-L134
akarnokd/akarnokd-xml
src/main/java/hu/akarnokd/xml/XNElement.java
XNElement.getInt
public int getInt(String attribute, String namespace) { """ Retrieve an integer attribute or the default value if not exists. @param attribute the attribute name @param namespace the attribute namespace URI @return the value """ return Integer.parseInt(get(attribute, namespace)); }
java
public int getInt(String attribute, String namespace) { return Integer.parseInt(get(attribute, namespace)); }
[ "public", "int", "getInt", "(", "String", "attribute", ",", "String", "namespace", ")", "{", "return", "Integer", ".", "parseInt", "(", "get", "(", "attribute", ",", "namespace", ")", ")", ";", "}" ]
Retrieve an integer attribute or the default value if not exists. @param attribute the attribute name @param namespace the attribute namespace URI @return the value
[ "Retrieve", "an", "integer", "attribute", "or", "the", "default", "value", "if", "not", "exists", "." ]
train
https://github.com/akarnokd/akarnokd-xml/blob/57466a5a9cb455a13d7121557c165287b31ee870/src/main/java/hu/akarnokd/xml/XNElement.java#L828-L830
TheHortonMachine/hortonmachine
gears/src/main/java/org/hortonmachine/gears/io/grasslegacy/io/GrassRasterReader.java
GrassRasterReader.readNullValueAtRowCol
private boolean readNullValueAtRowCol( int currentfilerow, int currentfilecol ) throws IOException { """ read the null value from the null file (if it exists) and returns the information about the particular cell (true if it is novalue, false if it is not a novalue @param currentfilerow @param currentfilecol ...
java
private boolean readNullValueAtRowCol( int currentfilerow, int currentfilecol ) throws IOException { /* * If the null file doesn't exist and the map is an integer, than it is an old integer-map * format, where the novalues are the cells that contain the values 0 */ if (nullFil...
[ "private", "boolean", "readNullValueAtRowCol", "(", "int", "currentfilerow", ",", "int", "currentfilecol", ")", "throws", "IOException", "{", "/*\n * If the null file doesn't exist and the map is an integer, than it is an old integer-map\n * format, where the novalues are t...
read the null value from the null file (if it exists) and returns the information about the particular cell (true if it is novalue, false if it is not a novalue @param currentfilerow @param currentfilecol @return
[ "read", "the", "null", "value", "from", "the", "null", "file", "(", "if", "it", "exists", ")", "and", "returns", "the", "information", "about", "the", "particular", "cell", "(", "true", "if", "it", "is", "novalue", "false", "if", "it", "is", "not", "a"...
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/io/grasslegacy/io/GrassRasterReader.java#L1265-L1317
libgdx/ashley
ashley/src/com/badlogic/ashley/core/Engine.java
Engine.addEntityListener
public void addEntityListener (Family family, int priority, EntityListener listener) { """ Adds an {@link EntityListener} for a specific {@link Family}. The listener will be notified every time an entity is added/removed to/from the given family. The priority determines in which order the entity listeners will be...
java
public void addEntityListener (Family family, int priority, EntityListener listener) { familyManager.addEntityListener(family, priority, listener); }
[ "public", "void", "addEntityListener", "(", "Family", "family", ",", "int", "priority", ",", "EntityListener", "listener", ")", "{", "familyManager", ".", "addEntityListener", "(", "family", ",", "priority", ",", "listener", ")", ";", "}" ]
Adds an {@link EntityListener} for a specific {@link Family}. The listener will be notified every time an entity is added/removed to/from the given family. The priority determines in which order the entity listeners will be called. Lower value means it will get executed first.
[ "Adds", "an", "{" ]
train
https://github.com/libgdx/ashley/blob/d53addc965d8a298336636943a157c04d12d583c/ashley/src/com/badlogic/ashley/core/Engine.java#L213-L215
b3dgs/lionengine
lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/WorldGame.java
WorldGame.saveToFile
public final void saveToFile(Media media) { """ Save world to the specified file. @param media The output media. @throws LionEngineException If error on saving to file. """ try (FileWriting writing = new FileWriting(media)) { saving(writing); } catch (final IOExc...
java
public final void saveToFile(Media media) { try (FileWriting writing = new FileWriting(media)) { saving(writing); } catch (final IOException exception) { throw new LionEngineException(exception, media, "Error on saving to file !"); } }
[ "public", "final", "void", "saveToFile", "(", "Media", "media", ")", "{", "try", "(", "FileWriting", "writing", "=", "new", "FileWriting", "(", "media", ")", ")", "{", "saving", "(", "writing", ")", ";", "}", "catch", "(", "final", "IOException", "except...
Save world to the specified file. @param media The output media. @throws LionEngineException If error on saving to file.
[ "Save", "world", "to", "the", "specified", "file", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/WorldGame.java#L141-L151
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDMath.java
SDMath.firstIndex
public SDVariable firstIndex(String name, SDVariable in, Condition condition, int... dimensions) { """ First index reduction operation.<br> Returns a variable that contains the index of the first element that matches the specified condition (for each slice along the specified dimensions) @param name Nam...
java
public SDVariable firstIndex(String name, SDVariable in, Condition condition, int... dimensions) { return firstIndex(name, in, condition, false, dimensions); }
[ "public", "SDVariable", "firstIndex", "(", "String", "name", ",", "SDVariable", "in", ",", "Condition", "condition", ",", "int", "...", "dimensions", ")", "{", "return", "firstIndex", "(", "name", ",", "in", ",", "condition", ",", "false", ",", "dimensions",...
First index reduction operation.<br> Returns a variable that contains the index of the first element that matches the specified condition (for each slice along the specified dimensions) @param name Name of the output variable @param in Input variable @param condition Condition to check on input variable...
[ "First", "index", "reduction", "operation", ".", "<br", ">", "Returns", "a", "variable", "that", "contains", "the", "index", "of", "the", "first", "element", "that", "matches", "the", "specified", "condition", "(", "for", "each", "slice", "along", "the", "sp...
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDMath.java#L1115-L1117
telly/groundy
library/src/main/java/com/telly/groundy/GroundyManager.java
GroundyManager.cancelAll
public static void cancelAll(Context context, Class<? extends GroundyService> groundyServiceClass) { """ Cancel all tasks: the ones running and parallel and future tasks. @param context used to interact with the service @param groundyServiceClass custom groundy service implementation """ new Grou...
java
public static void cancelAll(Context context, Class<? extends GroundyService> groundyServiceClass) { new GroundyServiceConnection(context, groundyServiceClass) { @Override protected void onGroundyServiceBound(GroundyService.GroundyServiceBinder binder) { binder.cancelAllTasks(); } ...
[ "public", "static", "void", "cancelAll", "(", "Context", "context", ",", "Class", "<", "?", "extends", "GroundyService", ">", "groundyServiceClass", ")", "{", "new", "GroundyServiceConnection", "(", "context", ",", "groundyServiceClass", ")", "{", "@", "Override",...
Cancel all tasks: the ones running and parallel and future tasks. @param context used to interact with the service @param groundyServiceClass custom groundy service implementation
[ "Cancel", "all", "tasks", ":", "the", "ones", "running", "and", "parallel", "and", "future", "tasks", "." ]
train
https://github.com/telly/groundy/blob/e90baf9901a8be20b348bd1575d5ad782560cec8/library/src/main/java/com/telly/groundy/GroundyManager.java#L57-L65
astrapi69/mystic-crypt
crypt-data/src/main/java/de/alpharogroup/crypto/factories/KeyPairFactory.java
KeyPairFactory.newKeyPair
public static KeyPair newKeyPair(final PublicKey publicKey, final PrivateKey privateKey) { """ Factory method for creating a new {@link KeyPair} from the given parameters. @param publicKey the public key @param privateKey the private key @return the new {@link KeyPair} from the given parameters. """ f...
java
public static KeyPair newKeyPair(final PublicKey publicKey, final PrivateKey privateKey) { final KeyPair keyPair = new KeyPair(publicKey, privateKey); return keyPair; }
[ "public", "static", "KeyPair", "newKeyPair", "(", "final", "PublicKey", "publicKey", ",", "final", "PrivateKey", "privateKey", ")", "{", "final", "KeyPair", "keyPair", "=", "new", "KeyPair", "(", "publicKey", ",", "privateKey", ")", ";", "return", "keyPair", "...
Factory method for creating a new {@link KeyPair} from the given parameters. @param publicKey the public key @param privateKey the private key @return the new {@link KeyPair} from the given parameters.
[ "Factory", "method", "for", "creating", "a", "new", "{", "@link", "KeyPair", "}", "from", "the", "given", "parameters", "." ]
train
https://github.com/astrapi69/mystic-crypt/blob/7f51ef5e4457e24de7ff391f10bfc5609e6f1a34/crypt-data/src/main/java/de/alpharogroup/crypto/factories/KeyPairFactory.java#L128-L132
alexcojocaru/elasticsearch-maven-plugin
src/main/java/com/github/alexcojocaru/mojo/elasticsearch/v2/step/ResolveElasticsearchStep.java
ResolveElasticsearchStep.resolveArtifact
private File resolveArtifact(ClusterConfiguration config) throws ArtifactException, IOException { """ Resolve the artifact and return a file reference to the local file. """ String flavour = config.getFlavour(); String version = config.getVersion(); String artifactId = getAr...
java
private File resolveArtifact(ClusterConfiguration config) throws ArtifactException, IOException { String flavour = config.getFlavour(); String version = config.getVersion(); String artifactId = getArtifactId(flavour, version); String classifier = getArtifactClassifier(ver...
[ "private", "File", "resolveArtifact", "(", "ClusterConfiguration", "config", ")", "throws", "ArtifactException", ",", "IOException", "{", "String", "flavour", "=", "config", ".", "getFlavour", "(", ")", ";", "String", "version", "=", "config", ".", "getVersion", ...
Resolve the artifact and return a file reference to the local file.
[ "Resolve", "the", "artifact", "and", "return", "a", "file", "reference", "to", "the", "local", "file", "." ]
train
https://github.com/alexcojocaru/elasticsearch-maven-plugin/blob/c283053cf99dc6b6d411b58629364b6aae62b7f8/src/main/java/com/github/alexcojocaru/mojo/elasticsearch/v2/step/ResolveElasticsearchStep.java#L59-L97
apache/flink
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/expressions/rules/ExpandColumnFunctionsRule.java
ExpandColumnFunctionsRule.indexOfName
private static int indexOfName(List<UnresolvedReferenceExpression> inputFieldReferences, String targetName) { """ Find the index of targetName in the list. Return -1 if not found. """ int i; for (i = 0; i < inputFieldReferences.size(); ++i) { if (inputFieldReferences.get(i).getName().equals(targetName))...
java
private static int indexOfName(List<UnresolvedReferenceExpression> inputFieldReferences, String targetName) { int i; for (i = 0; i < inputFieldReferences.size(); ++i) { if (inputFieldReferences.get(i).getName().equals(targetName)) { break; } } return i == inputFieldReferences.size() ? -1 : i; }
[ "private", "static", "int", "indexOfName", "(", "List", "<", "UnresolvedReferenceExpression", ">", "inputFieldReferences", ",", "String", "targetName", ")", "{", "int", "i", ";", "for", "(", "i", "=", "0", ";", "i", "<", "inputFieldReferences", ".", "size", ...
Find the index of targetName in the list. Return -1 if not found.
[ "Find", "the", "index", "of", "targetName", "in", "the", "list", ".", "Return", "-", "1", "if", "not", "found", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/expressions/rules/ExpandColumnFunctionsRule.java#L226-L234
Erudika/para
para-client/src/main/java/com/erudika/para/client/ParaClient.java
ParaClient.getChildren
@SuppressWarnings("unchecked") public <P extends ParaObject> List<P> getChildren(ParaObject obj, String type2, Pager... pager) { """ Returns all child objects linked to this object. @param <P> the type of children @param type2 the type of children to look for @param obj the object to execute this method on @p...
java
@SuppressWarnings("unchecked") public <P extends ParaObject> List<P> getChildren(ParaObject obj, String type2, Pager... pager) { if (obj == null || obj.getId() == null || type2 == null) { return Collections.emptyList(); } MultivaluedMap<String, String> params = new MultivaluedHashMap<>(); params.putSingle("...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "P", "extends", "ParaObject", ">", "List", "<", "P", ">", "getChildren", "(", "ParaObject", "obj", ",", "String", "type2", ",", "Pager", "...", "pager", ")", "{", "if", "(", "obj", "==", ...
Returns all child objects linked to this object. @param <P> the type of children @param type2 the type of children to look for @param obj the object to execute this method on @param pager a {@link com.erudika.para.utils.Pager} @return a list of {@link ParaObject} in a one-to-many relationship with this object
[ "Returns", "all", "child", "objects", "linked", "to", "this", "object", "." ]
train
https://github.com/Erudika/para/blob/5ba096c477042ea7b18e9a0e8b5b1ee0f5bd6ce9/para-client/src/main/java/com/erudika/para/client/ParaClient.java#L1093-L1103
JohnPersano/SuperToasts
library/src/main/java/com/github/johnpersano/supertoasts/library/utils/BackgroundUtils.java
BackgroundUtils.getBackground
public static Drawable getBackground(Style style, int color) { """ Returns a {@link GradientDrawable} with the desired background color. If no {@link Style.Frame} is set prior to calling this method, an appropriate {@link Style.Frame} will be chosen based on the device's SDK level. @param style The current {...
java
public static Drawable getBackground(Style style, int color) { // If a frame has been manually set, return the appropriate background if (style.frame > 0) { switch (style.frame) { case Style.FRAME_STANDARD: return BackgroundUtils.getStandardBackground(color); ...
[ "public", "static", "Drawable", "getBackground", "(", "Style", "style", ",", "int", "color", ")", "{", "// If a frame has been manually set, return the appropriate background", "if", "(", "style", ".", "frame", ">", "0", ")", "{", "switch", "(", "style", ".", "fra...
Returns a {@link GradientDrawable} with the desired background color. If no {@link Style.Frame} is set prior to calling this method, an appropriate {@link Style.Frame} will be chosen based on the device's SDK level. @param style The current {@link Style} @param color The desired color @return {@link GradientDrawable}
[ "Returns", "a", "{", "@link", "GradientDrawable", "}", "with", "the", "desired", "background", "color", ".", "If", "no", "{", "@link", "Style", ".", "Frame", "}", "is", "set", "prior", "to", "calling", "this", "method", "an", "appropriate", "{", "@link", ...
train
https://github.com/JohnPersano/SuperToasts/blob/5394db6a2f5c38410586d5d001d61f731da1132a/library/src/main/java/com/github/johnpersano/supertoasts/library/utils/BackgroundUtils.java#L44-L69
jayantk/jklol
src/com/jayantkrish/jklol/ccg/CcgUnaryRule.java
CcgUnaryRule.parseFrom
public static CcgUnaryRule parseFrom(String line) { """ Parses a unary rule from a line in comma-separated format. The expected fields, in order, are: <ul> <li>The headed syntactic categories to combine and return: <code>(input syntax) (return syntax)</code> <li>(optional) Additional unfilled dependencies, in...
java
public static CcgUnaryRule parseFrom(String line) { String[] chunks = new CsvParser(CsvParser.DEFAULT_SEPARATOR, CsvParser.DEFAULT_QUOTE, CsvParser.NULL_ESCAPE).parseLine(line.trim()); Preconditions.checkArgument(chunks.length >= 1, "Illegal unary rule string: %s", line); String[] syntacticParts = ...
[ "public", "static", "CcgUnaryRule", "parseFrom", "(", "String", "line", ")", "{", "String", "[", "]", "chunks", "=", "new", "CsvParser", "(", "CsvParser", ".", "DEFAULT_SEPARATOR", ",", "CsvParser", ".", "DEFAULT_QUOTE", ",", "CsvParser", ".", "NULL_ESCAPE", "...
Parses a unary rule from a line in comma-separated format. The expected fields, in order, are: <ul> <li>The headed syntactic categories to combine and return: <code>(input syntax) (return syntax)</code> <li>(optional) Additional unfilled dependencies, in standard format: <code>(predicate) (argument number) (argument va...
[ "Parses", "a", "unary", "rule", "from", "a", "line", "in", "comma", "-", "separated", "format", ".", "The", "expected", "fields", "in", "order", "are", ":", "<ul", ">", "<li", ">", "The", "headed", "syntactic", "categories", "to", "combine", "and", "retu...
train
https://github.com/jayantk/jklol/blob/d27532ca83e212d51066cf28f52621acc3fd44cc/src/com/jayantkrish/jklol/ccg/CcgUnaryRule.java#L53-L104
kumuluz/kumuluzee
components/cdi/weld/src/main/java/com/kumuluz/ee/configuration/cdi/interceptors/ConfigBundleInterceptor.java
ConfigBundleInterceptor.getKeyName
private String getKeyName(Class targetClass, String setter, String keyPrefix) throws Exception { """ Construct key name from prefix and field name or ConfigValue value (if present) @param targetClass target class @param setter name of the setter method @param keyPrefix prefix used for generation of a c...
java
private String getKeyName(Class targetClass, String setter, String keyPrefix) throws Exception { StringBuilder key = new StringBuilder(); key.append(keyPrefix); if (!key.toString().isEmpty()) { key.append("."); } // get ConfigValue Field field = targetClass....
[ "private", "String", "getKeyName", "(", "Class", "targetClass", ",", "String", "setter", ",", "String", "keyPrefix", ")", "throws", "Exception", "{", "StringBuilder", "key", "=", "new", "StringBuilder", "(", ")", ";", "key", ".", "append", "(", "keyPrefix", ...
Construct key name from prefix and field name or ConfigValue value (if present) @param targetClass target class @param setter name of the setter method @param keyPrefix prefix used for generation of a configuration key @return key in format prefix.key-name
[ "Construct", "key", "name", "from", "prefix", "and", "field", "name", "or", "ConfigValue", "value", "(", "if", "present", ")" ]
train
https://github.com/kumuluz/kumuluzee/blob/86fbce2acc04264f20d548173d5d9f28d79cb415/components/cdi/weld/src/main/java/com/kumuluz/ee/configuration/cdi/interceptors/ConfigBundleInterceptor.java#L261-L285
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/GridFTPClient.java
GridFTPClient.createSymbolicLink
public void createSymbolicLink(String link_target, String link_name) throws IOException, ServerException { """ Create a symbolic link on the FTP server. @param link_target the path to which the symbolic link should point @param link_name the path of the symbolic link to create @throws IOException @th...
java
public void createSymbolicLink(String link_target, String link_name) throws IOException, ServerException { String arguments = link_target.replaceAll(" ", "%20") + " " + link_name; Command cmd = new Command("SITE SYMLINK", arguments); try { controlChannel.execute(cmd); ...
[ "public", "void", "createSymbolicLink", "(", "String", "link_target", ",", "String", "link_name", ")", "throws", "IOException", ",", "ServerException", "{", "String", "arguments", "=", "link_target", ".", "replaceAll", "(", "\" \"", ",", "\"%20\"", ")", "+", "\"...
Create a symbolic link on the FTP server. @param link_target the path to which the symbolic link should point @param link_name the path of the symbolic link to create @throws IOException @throws ServerException if an error occurred.
[ "Create", "a", "symbolic", "link", "on", "the", "FTP", "server", "." ]
train
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/GridFTPClient.java#L1137-L1150
apache/incubator-heron
heron/common/src/java/org/apache/heron/common/basics/NIOLooper.java
NIOLooper.removeInterest
private void removeInterest(SelectableChannel channel, int operation) { """ Remove one operation interest on a SelectableChannel. The SelectableChannel has to be registered with Selector ahead. Otherwise, NullPointerExceptions would throw The key for SelectableChannel has to be valid. Otherwise, InvalidValid E...
java
private void removeInterest(SelectableChannel channel, int operation) { SelectionKey key = channel.keyFor(selector); // Exception would be thrown if key is null or key is inValid // We do not need double check it ahead key.interestOps(key.interestOps() & (~operation)); }
[ "private", "void", "removeInterest", "(", "SelectableChannel", "channel", ",", "int", "operation", ")", "{", "SelectionKey", "key", "=", "channel", ".", "keyFor", "(", "selector", ")", ";", "// Exception would be thrown if key is null or key is inValid", "// We do not nee...
Remove one operation interest on a SelectableChannel. The SelectableChannel has to be registered with Selector ahead. Otherwise, NullPointerExceptions would throw The key for SelectableChannel has to be valid. Otherwise, InvalidValid Exception would throw. @param channel the SelectableChannel to remove operation inter...
[ "Remove", "one", "operation", "interest", "on", "a", "SelectableChannel", ".", "The", "SelectableChannel", "has", "to", "be", "registered", "with", "Selector", "ahead", ".", "Otherwise", "NullPointerExceptions", "would", "throw", "The", "key", "for", "SelectableChan...
train
https://github.com/apache/incubator-heron/blob/776abe2b5a45b93a0eb957fd65cbc149d901a92a/heron/common/src/java/org/apache/heron/common/basics/NIOLooper.java#L254-L260
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-common/src/main/java/org/deeplearning4j/util/DL4JFileUtils.java
DL4JFileUtils.createTempFile
public static File createTempFile(String prefix, String suffix) { """ Create a temporary file in the location specified by {@link DL4JSystemProperties#DL4J_TEMP_DIR_PROPERTY} if set, or the default temporary directory (usually specified by java.io.tmpdir system property) @param prefix Prefix for generating file'...
java
public static File createTempFile(String prefix, String suffix) { String p = System.getProperty(DL4JSystemProperties.DL4J_TEMP_DIR_PROPERTY); try { if (p == null || p.isEmpty()) { return File.createTempFile(prefix, suffix); } else { return File.cre...
[ "public", "static", "File", "createTempFile", "(", "String", "prefix", ",", "String", "suffix", ")", "{", "String", "p", "=", "System", ".", "getProperty", "(", "DL4JSystemProperties", ".", "DL4J_TEMP_DIR_PROPERTY", ")", ";", "try", "{", "if", "(", "p", "=="...
Create a temporary file in the location specified by {@link DL4JSystemProperties#DL4J_TEMP_DIR_PROPERTY} if set, or the default temporary directory (usually specified by java.io.tmpdir system property) @param prefix Prefix for generating file's name; must be at least 3 characeters @param suffix Suffix for generating fi...
[ "Create", "a", "temporary", "file", "in", "the", "location", "specified", "by", "{" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-common/src/main/java/org/deeplearning4j/util/DL4JFileUtils.java#L40-L51
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/Channel.java
Channel.lifecycleQueryNamespaceDefinitions
public Collection<LifecycleQueryNamespaceDefinitionsProposalResponse> lifecycleQueryNamespaceDefinitions(LifecycleQueryNamespaceDefinitionsRequest queryNamespaceDefinitionsRequest, Collection<Peer> peers) throws InvalidArgumentException, ProposalException { """ Query namespaces. Takes no specific arguments return...
java
public Collection<LifecycleQueryNamespaceDefinitionsProposalResponse> lifecycleQueryNamespaceDefinitions(LifecycleQueryNamespaceDefinitionsRequest queryNamespaceDefinitionsRequest, Collection<Peer> peers) throws InvalidArgumentException, ProposalException { if (null == queryNamespaceDefinitionsRequest) { ...
[ "public", "Collection", "<", "LifecycleQueryNamespaceDefinitionsProposalResponse", ">", "lifecycleQueryNamespaceDefinitions", "(", "LifecycleQueryNamespaceDefinitionsRequest", "queryNamespaceDefinitionsRequest", ",", "Collection", "<", "Peer", ">", "peers", ")", "throws", "InvalidA...
Query namespaces. Takes no specific arguments returns namespaces including chaincode names that have been committed. @param queryNamespaceDefinitionsRequest the request see {@link LifecycleQueryNamespaceDefinitionsRequest} @param peers to send the request. @return A {@link LifecycleQueryNa...
[ "Query", "namespaces", ".", "Takes", "no", "specific", "arguments", "returns", "namespaces", "including", "chaincode", "names", "that", "have", "been", "committed", "." ]
train
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/Channel.java#L3701-L3725
alkacon/opencms-core
src/org/opencms/db/CmsSubscriptionManager.java
CmsSubscriptionManager.unsubscribeResourceForAll
public void unsubscribeResourceForAll(CmsObject cms, String resourcePath) throws CmsException { """ Unsubscribes all groups and users from the resource.<p> @param cms the current users context @param resourcePath the name of the resource to unsubscribe all groups and users from @throws CmsException if somet...
java
public void unsubscribeResourceForAll(CmsObject cms, String resourcePath) throws CmsException { CmsResource resource = cms.readResource(resourcePath, CmsResourceFilter.ALL); unsubscribeResourceForAll(cms, resource); }
[ "public", "void", "unsubscribeResourceForAll", "(", "CmsObject", "cms", ",", "String", "resourcePath", ")", "throws", "CmsException", "{", "CmsResource", "resource", "=", "cms", ".", "readResource", "(", "resourcePath", ",", "CmsResourceFilter", ".", "ALL", ")", "...
Unsubscribes all groups and users from the resource.<p> @param cms the current users context @param resourcePath the name of the resource to unsubscribe all groups and users from @throws CmsException if something goes wrong
[ "Unsubscribes", "all", "groups", "and", "users", "from", "the", "resource", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsSubscriptionManager.java#L491-L495
jbossws/jbossws-cxf
modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/addressing/map/CXFMAPBuilder.java
CXFMAPBuilder.outboundMap
public MAP outboundMap(Map<String, Object> ctx) { """ retrieve the outbound client message address properties attached to a message request map @param ctx the client request properties map @return """ AddressingProperties implementation = (AddressingProperties)ctx.get(CXFMAPConstants.CLIENT_ADDRESSING_...
java
public MAP outboundMap(Map<String, Object> ctx) { AddressingProperties implementation = (AddressingProperties)ctx.get(CXFMAPConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND); if (implementation == null) { implementation = new AddressingProperties(); ctx.put(CXFMAPConstants.CLIENT_A...
[ "public", "MAP", "outboundMap", "(", "Map", "<", "String", ",", "Object", ">", "ctx", ")", "{", "AddressingProperties", "implementation", "=", "(", "AddressingProperties", ")", "ctx", ".", "get", "(", "CXFMAPConstants", ".", "CLIENT_ADDRESSING_PROPERTIES_OUTBOUND", ...
retrieve the outbound client message address properties attached to a message request map @param ctx the client request properties map @return
[ "retrieve", "the", "outbound", "client", "message", "address", "properties", "attached", "to", "a", "message", "request", "map" ]
train
https://github.com/jbossws/jbossws-cxf/blob/e1d5df3664cbc2482ebc83cafd355a4d60d12150/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/addressing/map/CXFMAPBuilder.java#L82-L92
facebookarchive/hadoop-20
src/core/org/apache/hadoop/util/PriorityQueue.java
PriorityQueue.insert
public boolean insert(T element) { """ Adds element to the PriorityQueue in log(size) time if either the PriorityQueue is not full, or not lessThan(element, top()). @param element @return true if element is added, false otherwise. """ if (size < maxSize){ put(element); return true; } ...
java
public boolean insert(T element){ if (size < maxSize){ put(element); return true; } else if (size > 0 && !lessThan(element, top())){ heap[1] = element; adjustTop(); return true; } else return false; }
[ "public", "boolean", "insert", "(", "T", "element", ")", "{", "if", "(", "size", "<", "maxSize", ")", "{", "put", "(", "element", ")", ";", "return", "true", ";", "}", "else", "if", "(", "size", ">", "0", "&&", "!", "lessThan", "(", "element", ",...
Adds element to the PriorityQueue in log(size) time if either the PriorityQueue is not full, or not lessThan(element, top()). @param element @return true if element is added, false otherwise.
[ "Adds", "element", "to", "the", "PriorityQueue", "in", "log", "(", "size", ")", "time", "if", "either", "the", "PriorityQueue", "is", "not", "full", "or", "not", "lessThan", "(", "element", "top", "()", ")", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/util/PriorityQueue.java#L61-L73
dita-ot/dita-ot
src/main/java/org/dita/dost/reader/IndexTermReader.java
IndexTermReader.trimSpaceAtStart
private static String trimSpaceAtStart(final String temp, final String termName) { """ Trim whitespace from start of the string. If last character of termName and first character of temp is a space character, remove leading string from temp @return trimmed temp value """ if (termName != null && ter...
java
private static String trimSpaceAtStart(final String temp, final String termName) { if (termName != null && termName.charAt(termName.length() - 1) == ' ') { if (temp.charAt(0) == ' ') { return temp.substring(1); } } return temp; }
[ "private", "static", "String", "trimSpaceAtStart", "(", "final", "String", "temp", ",", "final", "String", "termName", ")", "{", "if", "(", "termName", "!=", "null", "&&", "termName", ".", "charAt", "(", "termName", ".", "length", "(", ")", "-", "1", ")"...
Trim whitespace from start of the string. If last character of termName and first character of temp is a space character, remove leading string from temp @return trimmed temp value
[ "Trim", "whitespace", "from", "start", "of", "the", "string", ".", "If", "last", "character", "of", "termName", "and", "first", "character", "of", "temp", "is", "a", "space", "character", "remove", "leading", "string", "from", "temp" ]
train
https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/reader/IndexTermReader.java#L505-L512
j-a-w-r/jawr-main-repo
jawr-dwr3.x/jawr-dwr3.x-webapp-sample/src/main/java/org/getahead/dwrdemo/asmg/Generator.java
Generator.generateAntiSpamMailto
public String generateAntiSpamMailto(String name, String email) { """ Generate an anti-spam mailto link from an email address @param name The person to contact @param email The address to generate a link from @return The HTML snippet """ StringTokenizer st = new StringTokenizer(email, "@"); ...
java
public String generateAntiSpamMailto(String name, String email) { StringTokenizer st = new StringTokenizer(email, "@"); if (Security.containsXssRiskyCharacters(email) || st.countTokens() != 2) { throw new IllegalArgumentException("Invalid email address: " + email); } ...
[ "public", "String", "generateAntiSpamMailto", "(", "String", "name", ",", "String", "email", ")", "{", "StringTokenizer", "st", "=", "new", "StringTokenizer", "(", "email", ",", "\"@\"", ")", ";", "if", "(", "Security", ".", "containsXssRiskyCharacters", "(", ...
Generate an anti-spam mailto link from an email address @param name The person to contact @param email The address to generate a link from @return The HTML snippet
[ "Generate", "an", "anti", "-", "spam", "mailto", "link", "from", "an", "email", "address" ]
train
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr-dwr3.x/jawr-dwr3.x-webapp-sample/src/main/java/org/getahead/dwrdemo/asmg/Generator.java#L44-L81
b3dgs/lionengine
lionengine-core/src/main/java/com/b3dgs/lionengine/graphic/engine/Sequence.java
Sequence.computeFrameRate
private void computeFrameRate(Timing updateFpsTimer, long lastTime, long currentTime) { """ Compute the frame rate depending of the game loop speed. @param updateFpsTimer The update timing @param lastTime The last time value before game loop in nano. @param currentTime The current time after game loop in nano...
java
private void computeFrameRate(Timing updateFpsTimer, long lastTime, long currentTime) { if (updateFpsTimer.elapsed(Constant.ONE_SECOND_IN_MILLI)) { currentFrameRate = (int) Math.round(Constant.ONE_SECOND_IN_NANO / (double) (currentTime - lastTime)); updateFpsTimer.restart(); ...
[ "private", "void", "computeFrameRate", "(", "Timing", "updateFpsTimer", ",", "long", "lastTime", ",", "long", "currentTime", ")", "{", "if", "(", "updateFpsTimer", ".", "elapsed", "(", "Constant", ".", "ONE_SECOND_IN_MILLI", ")", ")", "{", "currentFrameRate", "=...
Compute the frame rate depending of the game loop speed. @param updateFpsTimer The update timing @param lastTime The last time value before game loop in nano. @param currentTime The current time after game loop in nano (must be superior or equal to lastTime).
[ "Compute", "the", "frame", "rate", "depending", "of", "the", "game", "loop", "speed", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-core/src/main/java/com/b3dgs/lionengine/graphic/engine/Sequence.java#L190-L197
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/field/BaseField.java
BaseField.init
public void init(Record record, String strName, int iDataLength, String strDesc, Object strDefault) { """ Constructor. @param record The parent record. @param strName The field name. @param iDataLength The maximum string length (pass -1 for default). @param strDesc The string description (usually pass null, to...
java
public void init(Record record, String strName, int iDataLength, String strDesc, Object strDefault) { m_bJustChanged = false; m_DBObject = null; m_listener = null; m_bVirtual = false; m_bSelected = true; m_bNullable = true; super.init(record, strName, iDataLe...
[ "public", "void", "init", "(", "Record", "record", ",", "String", "strName", ",", "int", "iDataLength", ",", "String", "strDesc", ",", "Object", "strDefault", ")", "{", "m_bJustChanged", "=", "false", ";", "m_DBObject", "=", "null", ";", "m_listener", "=", ...
Constructor. @param record The parent record. @param strName The field name. @param iDataLength The maximum string length (pass -1 for default). @param strDesc The string description (usually pass null, to use the resource file desc). @param strDefault The default value (if object, this value is the default value, if s...
[ "Constructor", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/BaseField.java#L126-L138
JM-Lab/utils-java8
src/main/java/kr/jm/utils/datastructure/JMCollections.java
JMCollections.ifNotNullOrEmptyConsume
public static <T, C extends Collection<T>> void ifNotNullOrEmptyConsume(C collection, Consumer<C> consumer) { """ If not null or empty consume. @param <T> the type parameter @param <C> the type parameter @param collection the collection @param consumer the consumer """ JMOptio...
java
public static <T, C extends Collection<T>> void ifNotNullOrEmptyConsume(C collection, Consumer<C> consumer) { JMOptional.getOptional(collection).ifPresent(consumer); }
[ "public", "static", "<", "T", ",", "C", "extends", "Collection", "<", "T", ">", ">", "void", "ifNotNullOrEmptyConsume", "(", "C", "collection", ",", "Consumer", "<", "C", ">", "consumer", ")", "{", "JMOptional", ".", "getOptional", "(", "collection", ")", ...
If not null or empty consume. @param <T> the type parameter @param <C> the type parameter @param collection the collection @param consumer the consumer
[ "If", "not", "null", "or", "empty", "consume", "." ]
train
https://github.com/JM-Lab/utils-java8/blob/9e407b3f28a7990418a1e877229fa8344f4d78a5/src/main/java/kr/jm/utils/datastructure/JMCollections.java#L31-L34
webmetrics/browsermob-proxy
src/main/java/org/browsermob/proxy/jetty/jetty/servlet/WebApplicationContext.java
WebApplicationContext.setResourceAlias
public void setResourceAlias(String alias, String uri) { """ Set Resource Alias. Resource aliases map resource uri's within a context. They may optionally be used by a handler when looking for a resource. @param alias @param uri """ if (_resourceAliases == null) _resourceAliases= new H...
java
public void setResourceAlias(String alias, String uri) { if (_resourceAliases == null) _resourceAliases= new HashMap(5); _resourceAliases.put(alias, uri); }
[ "public", "void", "setResourceAlias", "(", "String", "alias", ",", "String", "uri", ")", "{", "if", "(", "_resourceAliases", "==", "null", ")", "_resourceAliases", "=", "new", "HashMap", "(", "5", ")", ";", "_resourceAliases", ".", "put", "(", "alias", ","...
Set Resource Alias. Resource aliases map resource uri's within a context. They may optionally be used by a handler when looking for a resource. @param alias @param uri
[ "Set", "Resource", "Alias", ".", "Resource", "aliases", "map", "resource", "uri", "s", "within", "a", "context", ".", "They", "may", "optionally", "be", "used", "by", "a", "handler", "when", "looking", "for", "a", "resource", "." ]
train
https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/jetty/servlet/WebApplicationContext.java#L738-L743
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/AppsImpl.java
AppsImpl.updatePublishSettings
public OperationStatus updatePublishSettings(UUID appId, PublishSettingUpdateObject publishSettingUpdateObject) { """ Updates the application publish settings. @param appId The application ID. @param publishSettingUpdateObject An object containing the new publish application settings. @throws IllegalArgumentE...
java
public OperationStatus updatePublishSettings(UUID appId, PublishSettingUpdateObject publishSettingUpdateObject) { return updatePublishSettingsWithServiceResponseAsync(appId, publishSettingUpdateObject).toBlocking().single().body(); }
[ "public", "OperationStatus", "updatePublishSettings", "(", "UUID", "appId", ",", "PublishSettingUpdateObject", "publishSettingUpdateObject", ")", "{", "return", "updatePublishSettingsWithServiceResponseAsync", "(", "appId", ",", "publishSettingUpdateObject", ")", ".", "toBlocki...
Updates the application publish settings. @param appId The application ID. @param publishSettingUpdateObject An object containing the new publish application settings. @throws IllegalArgumentException thrown if parameters fail the validation @throws ErrorResponseException thrown if the request is rejected by server @t...
[ "Updates", "the", "application", "publish", "settings", "." ]
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/AppsImpl.java#L1539-L1541
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/lss/LssClient.java
LssClient.getDomainStatistics
public GetDomainStatisticsResponse getDomainStatistics(GetDomainStatisticsRequest request) { """ get domain's statistics in the live stream service. @param request The request object containing all options for getting domain's statistics @return the response """ checkNotNull(request, "The parameter...
java
public GetDomainStatisticsResponse getDomainStatistics(GetDomainStatisticsRequest request) { checkNotNull(request, "The parameter request should NOT be null."); checkStringNotEmpty(request.getDomain(), "Domain should NOT be empty."); InternalRequest internalRequest = createRequest(HttpMethodNam...
[ "public", "GetDomainStatisticsResponse", "getDomainStatistics", "(", "GetDomainStatisticsRequest", "request", ")", "{", "checkNotNull", "(", "request", ",", "\"The parameter request should NOT be null.\"", ")", ";", "checkStringNotEmpty", "(", "request", ".", "getDomain", "("...
get domain's statistics in the live stream service. @param request The request object containing all options for getting domain's statistics @return the response
[ "get", "domain", "s", "statistics", "in", "the", "live", "stream", "service", "." ]
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/lss/LssClient.java#L1783-L1799
Alluxio/alluxio
core/server/common/src/main/java/alluxio/conf/ServerConfiguration.java
ServerConfiguration.getEnum
public static <T extends Enum<T>> T getEnum(PropertyKey key, Class<T> enumType) { """ Gets the value for the given key as an enum value. @param key the key to get the value for @param enumType the type of the enum @param <T> the type of the enum @return the value for the given key as an enum value """ ...
java
public static <T extends Enum<T>> T getEnum(PropertyKey key, Class<T> enumType) { return sConf.getEnum(key, enumType); }
[ "public", "static", "<", "T", "extends", "Enum", "<", "T", ">", ">", "T", "getEnum", "(", "PropertyKey", "key", ",", "Class", "<", "T", ">", "enumType", ")", "{", "return", "sConf", ".", "getEnum", "(", "key", ",", "enumType", ")", ";", "}" ]
Gets the value for the given key as an enum value. @param key the key to get the value for @param enumType the type of the enum @param <T> the type of the enum @return the value for the given key as an enum value
[ "Gets", "the", "value", "for", "the", "given", "key", "as", "an", "enum", "value", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/server/common/src/main/java/alluxio/conf/ServerConfiguration.java#L253-L255
xwiki/xwiki-rendering
xwiki-rendering-api/src/main/java/org/xwiki/rendering/internal/parser/XDOMBuilder.java
XDOMBuilder.addBlock
public void addBlock(Block block) { """ Add a block to the current block container. @param block the block to be added. """ try { this.stack.getFirst().add(block); } catch (NoSuchElementException e) { throw new IllegalStateException("All container blocks are closed, t...
java
public void addBlock(Block block) { try { this.stack.getFirst().add(block); } catch (NoSuchElementException e) { throw new IllegalStateException("All container blocks are closed, too many calls to endBlockList()."); } }
[ "public", "void", "addBlock", "(", "Block", "block", ")", "{", "try", "{", "this", ".", "stack", ".", "getFirst", "(", ")", ".", "add", "(", "block", ")", ";", "}", "catch", "(", "NoSuchElementException", "e", ")", "{", "throw", "new", "IllegalStateExc...
Add a block to the current block container. @param block the block to be added.
[ "Add", "a", "block", "to", "the", "current", "block", "container", "." ]
train
https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-api/src/main/java/org/xwiki/rendering/internal/parser/XDOMBuilder.java#L97-L104
influxdata/influxdb-java
src/main/java/org/influxdb/impl/InfluxDBResultMapper.java
InfluxDBResultMapper.toPOJO
public <T> List<T> toPOJO(final QueryResult queryResult, final Class<T> clazz) throws InfluxDBMapperException { """ <p> Process a {@link QueryResult} object returned by the InfluxDB client inspecting the internal data structure and creating the respective object instances based on the Class passed as parameter....
java
public <T> List<T> toPOJO(final QueryResult queryResult, final Class<T> clazz) throws InfluxDBMapperException { return toPOJO(queryResult, clazz, TimeUnit.MILLISECONDS); }
[ "public", "<", "T", ">", "List", "<", "T", ">", "toPOJO", "(", "final", "QueryResult", "queryResult", ",", "final", "Class", "<", "T", ">", "clazz", ")", "throws", "InfluxDBMapperException", "{", "return", "toPOJO", "(", "queryResult", ",", "clazz", ",", ...
<p> Process a {@link QueryResult} object returned by the InfluxDB client inspecting the internal data structure and creating the respective object instances based on the Class passed as parameter. </p> @param queryResult the InfluxDB result object @param clazz the Class that will be used to hold your measurement data ...
[ "<p", ">", "Process", "a", "{", "@link", "QueryResult", "}", "object", "returned", "by", "the", "InfluxDB", "client", "inspecting", "the", "internal", "data", "structure", "and", "creating", "the", "respective", "object", "instances", "based", "on", "the", "Cl...
train
https://github.com/influxdata/influxdb-java/blob/8ae777f34aa2e598f609208cf4fa12d4642f83f5/src/main/java/org/influxdb/impl/InfluxDBResultMapper.java#L86-L88
Azure/azure-sdk-for-java
sql/resource-manager/v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/SyncGroupsInner.java
SyncGroupsInner.beginUpdate
public SyncGroupInner beginUpdate(String resourceGroupName, String serverName, String databaseName, String syncGroupName, SyncGroupInner parameters) { """ Updates a sync group. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource M...
java
public SyncGroupInner beginUpdate(String resourceGroupName, String serverName, String databaseName, String syncGroupName, SyncGroupInner parameters) { return beginUpdateWithServiceResponseAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters).toBlocking().single().body(); }
[ "public", "SyncGroupInner", "beginUpdate", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "databaseName", ",", "String", "syncGroupName", ",", "SyncGroupInner", "parameters", ")", "{", "return", "beginUpdateWithServiceResponseAsync", "(", ...
Updates a sync group. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @param databaseName The name of the database on which the sync group is hosted. @param syncGro...
[ "Updates", "a", "sync", "group", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/SyncGroupsInner.java#L1691-L1693
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/query/dsl/functions/DateFunctions.java
DateFunctions.millisToZone
public static Expression millisToZone(String expression, String timeZoneName, String format) { """ Returned expression results in a convertion of the UNIX time stamp to a string in the named time zone. """ return millisToZone(x(expression), timeZoneName, format); }
java
public static Expression millisToZone(String expression, String timeZoneName, String format) { return millisToZone(x(expression), timeZoneName, format); }
[ "public", "static", "Expression", "millisToZone", "(", "String", "expression", ",", "String", "timeZoneName", ",", "String", "format", ")", "{", "return", "millisToZone", "(", "x", "(", "expression", ")", ",", "timeZoneName", ",", "format", ")", ";", "}" ]
Returned expression results in a convertion of the UNIX time stamp to a string in the named time zone.
[ "Returned", "expression", "results", "in", "a", "convertion", "of", "the", "UNIX", "time", "stamp", "to", "a", "string", "in", "the", "named", "time", "zone", "." ]
train
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/query/dsl/functions/DateFunctions.java#L280-L282
exoplatform/jcr
exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/lnkproducer/LinkGenerator.java
LinkGenerator.writeInts
private void writeInts(int[] bytes, OutputStream outStream) throws IOException { """ Writes int array into stream. @param bytes int array @param outStream stream @throws IOException {@link IOException} """ for (int i = 0; i < bytes.length; i++) { byte curByte = (byte)bytes[i]; ...
java
private void writeInts(int[] bytes, OutputStream outStream) throws IOException { for (int i = 0; i < bytes.length; i++) { byte curByte = (byte)bytes[i]; outStream.write(curByte); } }
[ "private", "void", "writeInts", "(", "int", "[", "]", "bytes", ",", "OutputStream", "outStream", ")", "throws", "IOException", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "bytes", ".", "length", ";", "i", "++", ")", "{", "byte", "curByte", ...
Writes int array into stream. @param bytes int array @param outStream stream @throws IOException {@link IOException}
[ "Writes", "int", "array", "into", "stream", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/lnkproducer/LinkGenerator.java#L384-L391
milaboratory/milib
src/main/java/com/milaboratory/primitivio/PrimitivIO.java
PrimitivIO.dummySerializer
public static <T> Serializer<T> dummySerializer() { """ Serializer that throws exception for any serialization. Use for known objects. """ return new Serializer<T>() { @Override public void write(PrimitivO output, T object) { throw new RuntimeException("Dummy ser...
java
public static <T> Serializer<T> dummySerializer() { return new Serializer<T>() { @Override public void write(PrimitivO output, T object) { throw new RuntimeException("Dummy serializer."); } @Override public T read(PrimitivI input) { ...
[ "public", "static", "<", "T", ">", "Serializer", "<", "T", ">", "dummySerializer", "(", ")", "{", "return", "new", "Serializer", "<", "T", ">", "(", ")", "{", "@", "Override", "public", "void", "write", "(", "PrimitivO", "output", ",", "T", "object", ...
Serializer that throws exception for any serialization. Use for known objects.
[ "Serializer", "that", "throws", "exception", "for", "any", "serialization", ".", "Use", "for", "known", "objects", "." ]
train
https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/primitivio/PrimitivIO.java#L25-L47
cdk/cdk
legacy/src/main/java/org/openscience/cdk/io/inchi/INChIContentProcessorTool.java
INChIContentProcessorTool.processConnections
public void processConnections(String bondsEncoding, IAtomContainer container, int source) { """ Processes the content from the connections field of the INChI. Typical values look like 1-2-4-6-5-3-1, from INChI=1.12Beta/C6H6/c1-2-4-6-5-3-1/h1-6H. @param bondsEncoding the content of the INChI connections field ...
java
public void processConnections(String bondsEncoding, IAtomContainer container, int source) { logger.debug("Parsing bond data: ", bondsEncoding); IBond bondToAdd = null; /* Fixme: treatment of branching is too limited! */ String remainder = bondsEncoding; while (remainder.length(...
[ "public", "void", "processConnections", "(", "String", "bondsEncoding", ",", "IAtomContainer", "container", ",", "int", "source", ")", "{", "logger", ".", "debug", "(", "\"Parsing bond data: \"", ",", "bondsEncoding", ")", ";", "IBond", "bondToAdd", "=", "null", ...
Processes the content from the connections field of the INChI. Typical values look like 1-2-4-6-5-3-1, from INChI=1.12Beta/C6H6/c1-2-4-6-5-3-1/h1-6H. @param bondsEncoding the content of the INChI connections field @param container the atomContainer parsed from the formula field @param source the atom to bui...
[ "Processes", "the", "content", "from", "the", "connections", "field", "of", "the", "INChI", ".", "Typical", "values", "look", "like", "1", "-", "2", "-", "4", "-", "6", "-", "5", "-", "3", "-", "1", "from", "INChI", "=", "1", ".", "12Beta", "/", ...
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/io/inchi/INChIContentProcessorTool.java#L93-L133
xiaosunzhu/resource-utils
src/main/java/net/sunyijun/resource/config/Configs.java
Configs.addSelfConfigs
public static void addSelfConfigs(String configAbsoluteClassPath, OneProperties configsObj) { """ <p>Add self define configs file.</p> Can use self configs path or self class extends {@link OneProperties}. @param configAbsoluteClassPath self configs absolute class path. This path also is a config file key str...
java
public static void addSelfConfigs(String configAbsoluteClassPath, OneProperties configsObj) { if (configAbsoluteClassPath == null) { return; } if (configsObj == null) { OneProperties configs = otherConfigs.get(configAbsoluteClassPath); if (configs == nul...
[ "public", "static", "void", "addSelfConfigs", "(", "String", "configAbsoluteClassPath", ",", "OneProperties", "configsObj", ")", "{", "if", "(", "configAbsoluteClassPath", "==", "null", ")", "{", "return", ";", "}", "if", "(", "configsObj", "==", "null", ")", ...
<p>Add self define configs file.</p> Can use self configs path or self class extends {@link OneProperties}. @param configAbsoluteClassPath self configs absolute class path. This path also is a config file key string. Can't be null, if null add nothing. @param configsObj self class extends {@link OneProper...
[ "<p", ">", "Add", "self", "define", "configs", "file", ".", "<", "/", "p", ">", "Can", "use", "self", "configs", "path", "or", "self", "class", "extends", "{", "@link", "OneProperties", "}", "." ]
train
https://github.com/xiaosunzhu/resource-utils/blob/4f2bf3f36df10195a978f122ed682ba1eb0462b5/src/main/java/net/sunyijun/resource/config/Configs.java#L527-L541
box/box-java-sdk
src/main/java/com/box/sdk/BoxFolder.java
BoxFolder.createWebLink
public BoxWebLink.Info createWebLink(String name, URL linkURL, String description) { """ Uploads a new weblink to this folder. @param name the filename for the weblink. @param linkURL the URL the weblink points to. @param description the weblink's description. @return the uploaded weblink's info. ...
java
public BoxWebLink.Info createWebLink(String name, URL linkURL, String description) { JsonObject parent = new JsonObject(); parent.add("id", this.getID()); JsonObject newWebLink = new JsonObject(); newWebLink.add("name", name); newWebLink.add("parent", parent); newWebLink...
[ "public", "BoxWebLink", ".", "Info", "createWebLink", "(", "String", "name", ",", "URL", "linkURL", ",", "String", "description", ")", "{", "JsonObject", "parent", "=", "new", "JsonObject", "(", ")", ";", "parent", ".", "add", "(", "\"id\"", ",", "this", ...
Uploads a new weblink to this folder. @param name the filename for the weblink. @param linkURL the URL the weblink points to. @param description the weblink's description. @return the uploaded weblink's info.
[ "Uploads", "a", "new", "weblink", "to", "this", "folder", "." ]
train
https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxFolder.java#L606-L627
kwon37xi/hibernate4-memcached
hibernate4-memcached-core/src/main/java/kr/pe/kwonnam/hibernate4memcached/strategies/NonstrictReadWriteEntityRegionAccessStrategy.java
NonstrictReadWriteEntityRegionAccessStrategy.afterUpdate
@Override public boolean afterUpdate(Object key, Object value, Object currentVersion, Object previousVersion, SoftLock lock) throws CacheException { """ need evict the key, after update. @see org.hibernate.cache.spi.access.EntityRegionAccessStrategy """ log.debug("region access strategy nonstric...
java
@Override public boolean afterUpdate(Object key, Object value, Object currentVersion, Object previousVersion, SoftLock lock) throws CacheException { log.debug("region access strategy nonstrict-read-write entity afterUpdate() {} {}", getInternalRegion().getCacheNamespace(), key); getInternalRegion()....
[ "@", "Override", "public", "boolean", "afterUpdate", "(", "Object", "key", ",", "Object", "value", ",", "Object", "currentVersion", ",", "Object", "previousVersion", ",", "SoftLock", "lock", ")", "throws", "CacheException", "{", "log", ".", "debug", "(", "\"re...
need evict the key, after update. @see org.hibernate.cache.spi.access.EntityRegionAccessStrategy
[ "need", "evict", "the", "key", "after", "update", "." ]
train
https://github.com/kwon37xi/hibernate4-memcached/blob/e0b2839ab257b2602344f54ca53c564044f3585d/hibernate4-memcached-core/src/main/java/kr/pe/kwonnam/hibernate4memcached/strategies/NonstrictReadWriteEntityRegionAccessStrategy.java#L49-L54
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/ConfigurationReader.java
ConfigurationReader.parseSQLConfig
private void parseSQLConfig(final Node node, final ConfigSettings config) { """ Parses the sql parameter section. @param node Reference to the current used xml node @param config Reference to the ConfigSettings """ String name, value; Node nnode; NodeList list = node.getChildNodes(); int length...
java
private void parseSQLConfig(final Node node, final ConfigSettings config) { String name, value; Node nnode; NodeList list = node.getChildNodes(); int length = list.getLength(); for (int i = 0; i < length; i++) { nnode = list.item(i); name = nnode.getNodeName().toUpperCase(); if (name.equals(KEY_H...
[ "private", "void", "parseSQLConfig", "(", "final", "Node", "node", ",", "final", "ConfigSettings", "config", ")", "{", "String", "name", ",", "value", ";", "Node", "nnode", ";", "NodeList", "list", "=", "node", ".", "getChildNodes", "(", ")", ";", "int", ...
Parses the sql parameter section. @param node Reference to the current used xml node @param config Reference to the ConfigSettings
[ "Parses", "the", "sql", "parameter", "section", "." ]
train
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/ConfigurationReader.java#L589-L625
undertow-io/undertow
core/src/main/java/io/undertow/util/ConnectionUtils.java
ConnectionUtils.cleanClose
public static void cleanClose(StreamConnection connection, Closeable... additional) { """ Cleanly close a connection, by shutting down and flushing writes and then draining reads. <p> If this fails the connection is forcibly closed. @param connection The connection @param additional Any additional resources ...
java
public static void cleanClose(StreamConnection connection, Closeable... additional) { try { connection.getSinkChannel().shutdownWrites(); if (!connection.getSinkChannel().flush()) { connection.getSinkChannel().setWriteListener(ChannelListeners.flushingChannelListener(new ...
[ "public", "static", "void", "cleanClose", "(", "StreamConnection", "connection", ",", "Closeable", "...", "additional", ")", "{", "try", "{", "connection", ".", "getSinkChannel", "(", ")", ".", "shutdownWrites", "(", ")", ";", "if", "(", "!", "connection", "...
Cleanly close a connection, by shutting down and flushing writes and then draining reads. <p> If this fails the connection is forcibly closed. @param connection The connection @param additional Any additional resources to close once the connection has been closed
[ "Cleanly", "close", "a", "connection", "by", "shutting", "down", "and", "flushing", "writes", "and", "then", "draining", "reads", ".", "<p", ">", "If", "this", "fails", "the", "connection", "is", "forcibly", "closed", "." ]
train
https://github.com/undertow-io/undertow/blob/87de0b856a7a4ba8faf5b659537b9af07b763263/core/src/main/java/io/undertow/util/ConnectionUtils.java#L55-L86
thorntail/thorntail
plugins/gradle/gradle-plugin/src/main/java/org/wildfly/swarm/plugin/gradle/GradleDependencyResolutionHelper.java
GradleDependencyResolutionHelper.asDescriptor
private static DependencyDescriptor asDescriptor(String scope, ResolvedArtifact artifact) { """ Translate the given {@link ResolvedArtifact resolved artifact} in to a {@link DependencyDescriptor} reference. @param scope the scope to assign to the descriptor. @param artifact the resolved artifact reference. ...
java
private static DependencyDescriptor asDescriptor(String scope, ResolvedArtifact artifact) { ModuleVersionIdentifier id = artifact.getModuleVersion().getId(); return new DefaultDependencyDescriptor(scope, id.getGroup(), id.getName(), id.getVersion(), artifac...
[ "private", "static", "DependencyDescriptor", "asDescriptor", "(", "String", "scope", ",", "ResolvedArtifact", "artifact", ")", "{", "ModuleVersionIdentifier", "id", "=", "artifact", ".", "getModuleVersion", "(", ")", ".", "getId", "(", ")", ";", "return", "new", ...
Translate the given {@link ResolvedArtifact resolved artifact} in to a {@link DependencyDescriptor} reference. @param scope the scope to assign to the descriptor. @param artifact the resolved artifact reference. @return an instance of {@link DependencyDescriptor}.
[ "Translate", "the", "given", "{", "@link", "ResolvedArtifact", "resolved", "artifact", "}", "in", "to", "a", "{", "@link", "DependencyDescriptor", "}", "reference", "." ]
train
https://github.com/thorntail/thorntail/blob/4a391b68ffae98c6e66d30a3bfb99dadc9509f14/plugins/gradle/gradle-plugin/src/main/java/org/wildfly/swarm/plugin/gradle/GradleDependencyResolutionHelper.java#L291-L295
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/customvision/training/src/main/java/com/microsoft/azure/cognitiveservices/vision/customvision/training/implementation/TrainingsImpl.java
TrainingsImpl.createImagesFromData
public ImageCreateSummary createImagesFromData(UUID projectId, byte[] imageData, CreateImagesFromDataOptionalParameter createImagesFromDataOptionalParameter) { """ Add the provided images to the set of training images. This API accepts body content as multipart/form-data and application/octet-stream. When using m...
java
public ImageCreateSummary createImagesFromData(UUID projectId, byte[] imageData, CreateImagesFromDataOptionalParameter createImagesFromDataOptionalParameter) { return createImagesFromDataWithServiceResponseAsync(projectId, imageData, createImagesFromDataOptionalParameter).toBlocking().single().body(); }
[ "public", "ImageCreateSummary", "createImagesFromData", "(", "UUID", "projectId", ",", "byte", "[", "]", "imageData", ",", "CreateImagesFromDataOptionalParameter", "createImagesFromDataOptionalParameter", ")", "{", "return", "createImagesFromDataWithServiceResponseAsync", "(", ...
Add the provided images to the set of training images. This API accepts body content as multipart/form-data and application/octet-stream. When using multipart multiple image files can be sent at once, with a maximum of 64 files. @param projectId The project id @param imageData the InputStream value @param createImages...
[ "Add", "the", "provided", "images", "to", "the", "set", "of", "training", "images", ".", "This", "API", "accepts", "body", "content", "as", "multipart", "/", "form", "-", "data", "and", "application", "/", "octet", "-", "stream", ".", "When", "using", "m...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/customvision/training/src/main/java/com/microsoft/azure/cognitiveservices/vision/customvision/training/implementation/TrainingsImpl.java#L4103-L4105
jtrfp/javamod
src/main/java/de/quippy/javamod/multimedia/mp3/id3/MP3FileID3Controller.java
MP3FileID3Controller.setUserDefinedURL
public void setUserDefinedURL(String desc, String url) { """ Add a link to this mp3 (id3v2 only). This includes a description of the url and the url itself. @param desc a description of the url @param url the url itself """ if (allow(ID3V2)) { id3v2.setUserDefinedURLFrame(desc, url); } }
java
public void setUserDefinedURL(String desc, String url) { if (allow(ID3V2)) { id3v2.setUserDefinedURLFrame(desc, url); } }
[ "public", "void", "setUserDefinedURL", "(", "String", "desc", ",", "String", "url", ")", "{", "if", "(", "allow", "(", "ID3V2", ")", ")", "{", "id3v2", ".", "setUserDefinedURLFrame", "(", "desc", ",", "url", ")", ";", "}", "}" ]
Add a link to this mp3 (id3v2 only). This includes a description of the url and the url itself. @param desc a description of the url @param url the url itself
[ "Add", "a", "link", "to", "this", "mp3", "(", "id3v2", "only", ")", ".", "This", "includes", "a", "description", "of", "the", "url", "and", "the", "url", "itself", "." ]
train
https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mp3/id3/MP3FileID3Controller.java#L319-L325
kiegroup/jbpm
jbpm-human-task/jbpm-human-task-jpa/src/main/java/org/jbpm/services/task/persistence/TaskSummaryQueryCriteriaUtil.java
TaskSummaryQueryCriteriaUtil.addUserRolesLimitCriteria
private void addUserRolesLimitCriteria( QueryWhere queryWhere, String userId, List<String> groupIds ) { """ Adds an (intersecting) {@link QueryCriteria} that limits the results to results that the user is allowed to see @param queryWhere The {@link QueryWhere} instance that defines the query criteria @param us...
java
private void addUserRolesLimitCriteria( QueryWhere queryWhere, String userId, List<String> groupIds ) { List<QueryCriteria> newBaseCriteriaList = new ArrayList<QueryCriteria>(2); // user role limiting criteria QueryCriteria userRolesLimitingCriteria = new QueryCriteria( QueryPar...
[ "private", "void", "addUserRolesLimitCriteria", "(", "QueryWhere", "queryWhere", ",", "String", "userId", ",", "List", "<", "String", ">", "groupIds", ")", "{", "List", "<", "QueryCriteria", ">", "newBaseCriteriaList", "=", "new", "ArrayList", "<", "QueryCriteria"...
Adds an (intersecting) {@link QueryCriteria} that limits the results to results that the user is allowed to see @param queryWhere The {@link QueryWhere} instance that defines the query criteria @param userId The user id @param groupIds The user's group ids
[ "Adds", "an", "(", "intersecting", ")", "{", "@link", "QueryCriteria", "}", "that", "limits", "the", "results", "to", "results", "that", "the", "user", "is", "allowed", "to", "see" ]
train
https://github.com/kiegroup/jbpm/blob/c3473c728aa382ebbea01e380c5e754a96647b82/jbpm-human-task/jbpm-human-task-jpa/src/main/java/org/jbpm/services/task/persistence/TaskSummaryQueryCriteriaUtil.java#L358-L380
ModeShape/modeshape
sequencers/modeshape-sequencer-ddl/src/main/java/org/modeshape/sequencer/ddl/StandardDdlParser.java
StandardDdlParser.parseColumnsAndConstraints
protected void parseColumnsAndConstraints( DdlTokenStream tokens, AstNode tableNode ) throws ParsingException { """ Utility method to parse columns and table constraints within either a CREATE TABLE statement. Method first parses and copies the text enclosed within t...
java
protected void parseColumnsAndConstraints( DdlTokenStream tokens, AstNode tableNode ) throws ParsingException { assert tokens != null; assert tableNode != null; if (!tokens.matches(L_PAREN)) { return; } String tableElem...
[ "protected", "void", "parseColumnsAndConstraints", "(", "DdlTokenStream", "tokens", ",", "AstNode", "tableNode", ")", "throws", "ParsingException", "{", "assert", "tokens", "!=", "null", ";", "assert", "tableNode", "!=", "null", ";", "if", "(", "!", "tokens", "....
Utility method to parse columns and table constraints within either a CREATE TABLE statement. Method first parses and copies the text enclosed within the bracketed "( xxxx )" statement. Then the individual column definition or table constraint definition sub-statements are parsed assuming they are comma delimited. @p...
[ "Utility", "method", "to", "parse", "columns", "and", "table", "constraints", "within", "either", "a", "CREATE", "TABLE", "statement", ".", "Method", "first", "parses", "and", "copies", "the", "text", "enclosed", "within", "the", "bracketed", "(", "xxxx", ")",...
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/sequencers/modeshape-sequencer-ddl/src/main/java/org/modeshape/sequencer/ddl/StandardDdlParser.java#L1343-L1376
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMManagerDefault.java
DTMManagerDefault.addDTM
synchronized public void addDTM(DTM dtm, int id, int offset) { """ Add a DTM to the DTM table. @param dtm Should be a valid reference to a DTM. @param id Integer DTM ID to be bound to this DTM. @param offset Integer addressing offset. The internal DTM Node ID is obtained by adding this offset to the node-num...
java
synchronized public void addDTM(DTM dtm, int id, int offset) { if(id>=IDENT_MAX_DTMS) { // TODO: %REVIEW% Not really the right error message. throw new DTMException(XMLMessages.createXMLMessage(XMLErrorResources.ER_NO_DTMIDS_AVAIL, null)); //"No more DTM IDs are available!"); } // We used to ju...
[ "synchronized", "public", "void", "addDTM", "(", "DTM", "dtm", ",", "int", "id", ",", "int", "offset", ")", "{", "if", "(", "id", ">=", "IDENT_MAX_DTMS", ")", "{", "// TODO: %REVIEW% Not really the right error message.", "throw", "new", "DTMException", "(", "XML...
Add a DTM to the DTM table. @param dtm Should be a valid reference to a DTM. @param id Integer DTM ID to be bound to this DTM. @param offset Integer addressing offset. The internal DTM Node ID is obtained by adding this offset to the node-number field of the public DTM Handle. For the first DTM ID accessing each DTM, ...
[ "Add", "a", "DTM", "to", "the", "DTM", "table", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMManagerDefault.java#L143-L179
joniles/mpxj
src/main/java/net/sf/mpxj/common/MultiDateFormat.java
MultiDateFormat.parseNonNullDate
protected Date parseNonNullDate(String str, ParsePosition pos) { """ We have a non-null date, try each format in turn to see if it can be parsed. @param str date to parse @param pos position at which to start parsing @return Date instance """ Date result = null; for (int index = 0; index < m_f...
java
protected Date parseNonNullDate(String str, ParsePosition pos) { Date result = null; for (int index = 0; index < m_formats.length; index++) { result = m_formats[index].parse(str, pos); if (pos.getIndex() != 0) { break; } result = null; ...
[ "protected", "Date", "parseNonNullDate", "(", "String", "str", ",", "ParsePosition", "pos", ")", "{", "Date", "result", "=", "null", ";", "for", "(", "int", "index", "=", "0", ";", "index", "<", "m_formats", ".", "length", ";", "index", "++", ")", "{",...
We have a non-null date, try each format in turn to see if it can be parsed. @param str date to parse @param pos position at which to start parsing @return Date instance
[ "We", "have", "a", "non", "-", "null", "date", "try", "each", "format", "in", "turn", "to", "see", "if", "it", "can", "be", "parsed", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/common/MultiDateFormat.java#L79-L92
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/quota/ChangesListener.java
ChangesListener.addPathsWithAsyncUpdate
private void addPathsWithAsyncUpdate(ChangesItem changesItem, String quotableParent) { """ Checks if data size for node is represented by <code>quotableParent</code> path should be updated asynchronously. If so that path is putting into respective collection. @param quotableParent absolute path to node for wh...
java
private void addPathsWithAsyncUpdate(ChangesItem changesItem, String quotableParent) { boolean isAsyncUpdate; try { isAsyncUpdate = quotaPersister.isNodeQuotaOrGroupOfNodesQuotaAsync(rName, wsName, quotableParent); } catch (UnknownQuotaLimitException e) { isAsync...
[ "private", "void", "addPathsWithAsyncUpdate", "(", "ChangesItem", "changesItem", ",", "String", "quotableParent", ")", "{", "boolean", "isAsyncUpdate", ";", "try", "{", "isAsyncUpdate", "=", "quotaPersister", ".", "isNodeQuotaOrGroupOfNodesQuotaAsync", "(", "rName", ","...
Checks if data size for node is represented by <code>quotableParent</code> path should be updated asynchronously. If so that path is putting into respective collection. @param quotableParent absolute path to node for which quota is set
[ "Checks", "if", "data", "size", "for", "node", "is", "represented", "by", "<code", ">", "quotableParent<", "/", "code", ">", "path", "should", "be", "updated", "asynchronously", ".", "If", "so", "that", "path", "is", "putting", "into", "respective", "collect...
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/quota/ChangesListener.java#L211-L227
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/contact/GroupContactSet.java
GroupContactSet.getContact
public GroupContact getContact(Group group1, Group group2) { """ Returns the corresponding GroupContact or null if no contact exists between the 2 given groups @param group1 @param group2 @return """ return contacts.get( new Pair<ResidueNumber>(group1.getResidueNumber(),group2.getResidueNumber())); }
java
public GroupContact getContact(Group group1, Group group2) { return contacts.get( new Pair<ResidueNumber>(group1.getResidueNumber(),group2.getResidueNumber())); }
[ "public", "GroupContact", "getContact", "(", "Group", "group1", ",", "Group", "group2", ")", "{", "return", "contacts", ".", "get", "(", "new", "Pair", "<", "ResidueNumber", ">", "(", "group1", ".", "getResidueNumber", "(", ")", ",", "group2", ".", "getRes...
Returns the corresponding GroupContact or null if no contact exists between the 2 given groups @param group1 @param group2 @return
[ "Returns", "the", "corresponding", "GroupContact", "or", "null", "if", "no", "contact", "exists", "between", "the", "2", "given", "groups" ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/contact/GroupContactSet.java#L140-L143
pip-services3-java/pip-services3-commons-java
src/org/pipservices3/commons/data/AnyValueMap.java
AnyValueMap.getAsFloatWithDefault
public float getAsFloatWithDefault(String key, float defaultValue) { """ Converts map element into a flot or returns default value if conversion is not possible. @param key a key of element to get. @param defaultValue the default value @return flot value of the element or default value if conversion...
java
public float getAsFloatWithDefault(String key, float defaultValue) { Object value = getAsObject(key); return FloatConverter.toFloatWithDefault(value, defaultValue); }
[ "public", "float", "getAsFloatWithDefault", "(", "String", "key", ",", "float", "defaultValue", ")", "{", "Object", "value", "=", "getAsObject", "(", "key", ")", ";", "return", "FloatConverter", ".", "toFloatWithDefault", "(", "value", ",", "defaultValue", ")", ...
Converts map element into a flot or returns default value if conversion is not possible. @param key a key of element to get. @param defaultValue the default value @return flot value of the element or default value if conversion is not supported. @see FloatConverter#toFloatWithDefault(Object, float)
[ "Converts", "map", "element", "into", "a", "flot", "or", "returns", "default", "value", "if", "conversion", "is", "not", "possible", "." ]
train
https://github.com/pip-services3-java/pip-services3-commons-java/blob/a8a0c3e5ec58f0663c295aa855c6b3afad2af86a/src/org/pipservices3/commons/data/AnyValueMap.java#L332-L335
groupon/odo
proxylib/src/main/java/com/groupon/odo/proxylib/OverrideService.java
OverrideService.updateResponseCode
public void updateResponseCode(int overrideId, int pathId, Integer ordinal, String responseCode, String clientUUID) { """ Update the response code for a given enabled override @param overrideId - override ID to update @param pathId - path ID to update @param ordinal - can be null, Index of the enabled overrid...
java
public void updateResponseCode(int overrideId, int pathId, Integer ordinal, String responseCode, String clientUUID) { if (ordinal == null) { ordinal = 1; } try { // get ID of the ordinal int enabledId = getEnabledEndpoint(pathId, overrideId, ordinal, clientUU...
[ "public", "void", "updateResponseCode", "(", "int", "overrideId", ",", "int", "pathId", ",", "Integer", "ordinal", ",", "String", "responseCode", ",", "String", "clientUUID", ")", "{", "if", "(", "ordinal", "==", "null", ")", "{", "ordinal", "=", "1", ";",...
Update the response code for a given enabled override @param overrideId - override ID to update @param pathId - path ID to update @param ordinal - can be null, Index of the enabled override to edit if multiple of the same are enabled @param responseCode - response code for the given response @param clientUUID - client...
[ "Update", "the", "response", "code", "for", "a", "given", "enabled", "override" ]
train
https://github.com/groupon/odo/blob/3bae43d5eca8ace036775e5b2d3ed9af1a9ff9b1/proxylib/src/main/java/com/groupon/odo/proxylib/OverrideService.java#L240-L252
shrinkwrap/resolver
maven/impl-maven-archive/src/main/java/org/jboss/shrinkwrap/resolver/impl/maven/archive/plugins/Validate.java
Validate.notNullAndNoNullValues
public static void notNullAndNoNullValues(final Object[] objects, final String message) { """ Checks that the specified array is not null or contain any null values. @param objects The object to check @param message The exception message """ notNull(objects, message); for (Object object : o...
java
public static void notNullAndNoNullValues(final Object[] objects, final String message) { notNull(objects, message); for (Object object : objects) { notNull(object, message); } }
[ "public", "static", "void", "notNullAndNoNullValues", "(", "final", "Object", "[", "]", "objects", ",", "final", "String", "message", ")", "{", "notNull", "(", "objects", ",", "message", ")", ";", "for", "(", "Object", "object", ":", "objects", ")", "{", ...
Checks that the specified array is not null or contain any null values. @param objects The object to check @param message The exception message
[ "Checks", "that", "the", "specified", "array", "is", "not", "null", "or", "contain", "any", "null", "values", "." ]
train
https://github.com/shrinkwrap/resolver/blob/e881a84b8cff5b0a014f2a5ebf612be3eb9db01f/maven/impl-maven-archive/src/main/java/org/jboss/shrinkwrap/resolver/impl/maven/archive/plugins/Validate.java#L170-L175
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/util/Environment.java
Environment.getMessageManager
public MessageManager getMessageManager(App application, boolean bCreateIfNotFound) { """ Get this Message Queue (or create one if this name doesn't exist). @param application The parent application @param bCreateIfNotFound Create the manager if not found? @return The message manager. """ if (applicati...
java
public MessageManager getMessageManager(App application, boolean bCreateIfNotFound) { if (application == null) application = this.getDefaultApplication(); if (this.getMessageApplication(bCreateIfNotFound, application.getProperties()) != null) return this.getMessageApplication(bCreateI...
[ "public", "MessageManager", "getMessageManager", "(", "App", "application", ",", "boolean", "bCreateIfNotFound", ")", "{", "if", "(", "application", "==", "null", ")", "application", "=", "this", ".", "getDefaultApplication", "(", ")", ";", "if", "(", "this", ...
Get this Message Queue (or create one if this name doesn't exist). @param application The parent application @param bCreateIfNotFound Create the manager if not found? @return The message manager.
[ "Get", "this", "Message", "Queue", "(", "or", "create", "one", "if", "this", "name", "doesn", "t", "exist", ")", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/util/Environment.java#L365-L372
matthewhorridge/owlapi-gwt
owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLDisjointDataPropertiesAxiomImpl_CustomFieldSerializer.java
OWLDisjointDataPropertiesAxiomImpl_CustomFieldSerializer.deserializeInstance
@Override public void deserializeInstance(SerializationStreamReader streamReader, OWLDisjointDataPropertiesAxiomImpl instance) throws SerializationException { """ Deserializes the content of the object from the {@link com.google.gwt.user.client.rpc.SerializationStreamReader}. @param streamReader the {@link...
java
@Override public void deserializeInstance(SerializationStreamReader streamReader, OWLDisjointDataPropertiesAxiomImpl instance) throws SerializationException { deserialize(streamReader, instance); }
[ "@", "Override", "public", "void", "deserializeInstance", "(", "SerializationStreamReader", "streamReader", ",", "OWLDisjointDataPropertiesAxiomImpl", "instance", ")", "throws", "SerializationException", "{", "deserialize", "(", "streamReader", ",", "instance", ")", ";", ...
Deserializes the content of the object from the {@link com.google.gwt.user.client.rpc.SerializationStreamReader}. @param streamReader the {@link com.google.gwt.user.client.rpc.SerializationStreamReader} to read the object's content from @param instance the object instance to deserialize @throws com.google.gwt.user...
[ "Deserializes", "the", "content", "of", "the", "object", "from", "the", "{", "@link", "com", ".", "google", ".", "gwt", ".", "user", ".", "client", ".", "rpc", ".", "SerializationStreamReader", "}", "." ]
train
https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLDisjointDataPropertiesAxiomImpl_CustomFieldSerializer.java#L95-L98
geomajas/geomajas-project-client-gwt
client/src/main/java/org/geomajas/gwt/client/action/menu/RemovePointAction.java
RemovePointAction.execute
public boolean execute(Canvas target, Menu menu, MenuItem item) { """ Implementation of the <code>MenuItemIfFunction</code> interface. This will determine if the menu action should be enabled or not. In essence, this action will be enabled when the context menu event occurred on a vertex of the painted <code>Fea...
java
public boolean execute(Canvas target, Menu menu, MenuItem item) { FeatureTransaction featureTransaction = mapWidget.getMapModel().getFeatureEditor().getFeatureTransaction(); if (featureTransaction != null) { MenuContext graphics = mapWidget.getMenuContext(); String targetId = graphics.getRightButtonName(); ...
[ "public", "boolean", "execute", "(", "Canvas", "target", ",", "Menu", "menu", ",", "MenuItem", "item", ")", "{", "FeatureTransaction", "featureTransaction", "=", "mapWidget", ".", "getMapModel", "(", ")", ".", "getFeatureEditor", "(", ")", ".", "getFeatureTransa...
Implementation of the <code>MenuItemIfFunction</code> interface. This will determine if the menu action should be enabled or not. In essence, this action will be enabled when the context menu event occurred on a vertex of the painted <code>FeatureTransaction</code>.
[ "Implementation", "of", "the", "<code", ">", "MenuItemIfFunction<", "/", "code", ">", "interface", ".", "This", "will", "determine", "if", "the", "menu", "action", "should", "be", "enabled", "or", "not", ".", "In", "essence", "this", "action", "will", "be", ...
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/action/menu/RemovePointAction.java#L74-L85
crnk-project/crnk-framework
crnk-data/crnk-data-jpa/src/main/java/io/crnk/data/jpa/JpaModule.java
JpaModule.newServerModule
@Deprecated public static JpaModule newServerModule(EntityManager em, TransactionRunner transactionRunner) { """ Creates a new JpaModule for a Crnk server. No entities are by default exposed as JSON API resources. Make use of {@link #addRepository(JpaRepositoryConfig)} to add resources. @param em ...
java
@Deprecated public static JpaModule newServerModule(EntityManager em, TransactionRunner transactionRunner) { return new JpaModule(new JpaModuleConfig(), null, () -> em, transactionRunner); }
[ "@", "Deprecated", "public", "static", "JpaModule", "newServerModule", "(", "EntityManager", "em", ",", "TransactionRunner", "transactionRunner", ")", "{", "return", "new", "JpaModule", "(", "new", "JpaModuleConfig", "(", ")", ",", "null", ",", "(", ")", "->", ...
Creates a new JpaModule for a Crnk server. No entities are by default exposed as JSON API resources. Make use of {@link #addRepository(JpaRepositoryConfig)} to add resources. @param em to use @param transactionRunner to use @return created module @deprecated use with JpaModuleConfig
[ "Creates", "a", "new", "JpaModule", "for", "a", "Crnk", "server", ".", "No", "entities", "are", "by", "default", "exposed", "as", "JSON", "API", "resources", ".", "Make", "use", "of", "{", "@link", "#addRepository", "(", "JpaRepositoryConfig", ")", "}", "t...
train
https://github.com/crnk-project/crnk-framework/blob/2fd3ef9a991788d46fd2e83b43c8ea37cbaf8681/crnk-data/crnk-data-jpa/src/main/java/io/crnk/data/jpa/JpaModule.java#L152-L155
apache/incubator-gobblin
gobblin-api/src/main/java/org/apache/gobblin/password/PasswordManager.java
PasswordManager.encryptPassword
public String encryptPassword(String plain) { """ Encrypt a password. A master password must have been provided in the constructor. @param plain A plain password to be encrypted. @return The encrypted password. """ Preconditions.checkArgument(this.encryptors.size() > 0, "A master password needs t...
java
public String encryptPassword(String plain) { Preconditions.checkArgument(this.encryptors.size() > 0, "A master password needs to be provided for encrypting passwords."); try { return this.encryptors.get(0).encrypt(plain); } catch (Exception e) { throw new RuntimeException("Failed to en...
[ "public", "String", "encryptPassword", "(", "String", "plain", ")", "{", "Preconditions", ".", "checkArgument", "(", "this", ".", "encryptors", ".", "size", "(", ")", ">", "0", ",", "\"A master password needs to be provided for encrypting passwords.\"", ")", ";", "t...
Encrypt a password. A master password must have been provided in the constructor. @param plain A plain password to be encrypted. @return The encrypted password.
[ "Encrypt", "a", "password", ".", "A", "master", "password", "must", "have", "been", "provided", "in", "the", "constructor", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-api/src/main/java/org/apache/gobblin/password/PasswordManager.java#L200-L209
matthewhorridge/owlapi-gwt
owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLLiteralImpl_CustomFieldSerializer.java
OWLLiteralImpl_CustomFieldSerializer.serializeInstance
@Override public void serializeInstance(SerializationStreamWriter streamWriter, OWLLiteralImpl instance) throws SerializationException { """ Serializes the content of the object into the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter}. @param streamWriter the {@link com.google.gwt.user.clien...
java
@Override public void serializeInstance(SerializationStreamWriter streamWriter, OWLLiteralImpl instance) throws SerializationException { serialize(streamWriter, instance); }
[ "@", "Override", "public", "void", "serializeInstance", "(", "SerializationStreamWriter", "streamWriter", ",", "OWLLiteralImpl", "instance", ")", "throws", "SerializationException", "{", "serialize", "(", "streamWriter", ",", "instance", ")", ";", "}" ]
Serializes the content of the object into the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter}. @param streamWriter the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter} to write the object's content to @param instance the object instance to serialize @throws com.google.gwt.user.client.rp...
[ "Serializes", "the", "content", "of", "the", "object", "into", "the", "{" ]
train
https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLLiteralImpl_CustomFieldSerializer.java#L67-L70
EdwardRaff/JSAT
JSAT/src/jsat/utils/GridDataGenerator.java
GridDataGenerator.addSamples
private void addSamples(int[] curClass, int curDim, int samples, List<DataPoint> dataPoints, int[] dim) { """ Helper function @param curClass used as a pointer to an integer so that we dont have to add class tracking logic @param curDim the current dimension to split on. If we are at the last dimension, we add d...
java
private void addSamples(int[] curClass, int curDim, int samples, List<DataPoint> dataPoints, int[] dim) { if(curDim < dimensions.length-1) for(int i = 0; i < dimensions[curDim+1]; i++ ) { int[] nextDim = Arrays.copyOf(dim, dim.length); nextDim[cu...
[ "private", "void", "addSamples", "(", "int", "[", "]", "curClass", ",", "int", "curDim", ",", "int", "samples", ",", "List", "<", "DataPoint", ">", "dataPoints", ",", "int", "[", "]", "dim", ")", "{", "if", "(", "curDim", "<", "dimensions", ".", "len...
Helper function @param curClass used as a pointer to an integer so that we dont have to add class tracking logic @param curDim the current dimension to split on. If we are at the last dimension, we add data points instead. @param samples the number of samples to take for each class @param dataPoints the location to put...
[ "Helper", "function" ]
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/utils/GridDataGenerator.java#L90-L110
threerings/nenya
core/src/main/java/com/threerings/media/util/LineSegmentPath.java
LineSegmentPath.headToNextNode
protected boolean headToNextNode (Pathable pable, long startstamp, long now) { """ Place the pathable moving along the path at the end of the previous path node, face it appropriately for the next node, and start it on its way. Returns whether the pathable position moved. """ if (_niter == null) { ...
java
protected boolean headToNextNode (Pathable pable, long startstamp, long now) { if (_niter == null) { throw new IllegalStateException("headToNextNode() called before init()"); } // check to see if we've completed our path if (!_niter.hasNext()) { // move the p...
[ "protected", "boolean", "headToNextNode", "(", "Pathable", "pable", ",", "long", "startstamp", ",", "long", "now", ")", "{", "if", "(", "_niter", "==", "null", ")", "{", "throw", "new", "IllegalStateException", "(", "\"headToNextNode() called before init()\"", ")"...
Place the pathable moving along the path at the end of the previous path node, face it appropriately for the next node, and start it on its way. Returns whether the pathable position moved.
[ "Place", "the", "pathable", "moving", "along", "the", "path", "at", "the", "end", "of", "the", "previous", "path", "node", "face", "it", "appropriately", "for", "the", "next", "node", "and", "start", "it", "on", "its", "way", ".", "Returns", "whether", "...
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/util/LineSegmentPath.java#L251-L291
googleapis/google-cloud-java
google-cloud-clients/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/ConfigClient.java
ConfigClient.updateSink
public final LogSink updateSink(String sinkName, LogSink sink) { """ Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: `destination`, and `filter`. The updated sink might also have a new `writer_identity`; see the `unique_writer_identity` field. <p>S...
java
public final LogSink updateSink(String sinkName, LogSink sink) { UpdateSinkRequest request = UpdateSinkRequest.newBuilder().setSinkName(sinkName).setSink(sink).build(); return updateSink(request); }
[ "public", "final", "LogSink", "updateSink", "(", "String", "sinkName", ",", "LogSink", "sink", ")", "{", "UpdateSinkRequest", "request", "=", "UpdateSinkRequest", ".", "newBuilder", "(", ")", ".", "setSinkName", "(", "sinkName", ")", ".", "setSink", "(", "sink...
Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: `destination`, and `filter`. The updated sink might also have a new `writer_identity`; see the `unique_writer_identity` field. <p>Sample code: <pre><code> try (ConfigClient configClient = ConfigClient.create(...
[ "Updates", "a", "sink", ".", "This", "method", "replaces", "the", "following", "fields", "in", "the", "existing", "sink", "with", "values", "from", "the", "new", "sink", ":", "destination", "and", "filter", ".", "The", "updated", "sink", "might", "also", "...
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/ConfigClient.java#L688-L693
sarl/sarl
main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/util/Jdt2Ecore.java
Jdt2Ecore.getJvmOperation
private JvmOperation getJvmOperation(IMethod method, JvmType context) throws JavaModelException { """ Create the JvmOperation for the given JDT method. @param method the JDT method. @param context the context of the constructor. @return the JvmOperation @throws JavaModelException if the Java model is inva...
java
private JvmOperation getJvmOperation(IMethod method, JvmType context) throws JavaModelException { if (context instanceof JvmDeclaredType) { final JvmDeclaredType declaredType = (JvmDeclaredType) context; final ActionParameterTypes jdtSignature = this.actionPrototypeProvider.createParameterTypes( Flags.i...
[ "private", "JvmOperation", "getJvmOperation", "(", "IMethod", "method", ",", "JvmType", "context", ")", "throws", "JavaModelException", "{", "if", "(", "context", "instanceof", "JvmDeclaredType", ")", "{", "final", "JvmDeclaredType", "declaredType", "=", "(", "JvmDe...
Create the JvmOperation for the given JDT method. @param method the JDT method. @param context the context of the constructor. @return the JvmOperation @throws JavaModelException if the Java model is invalid.
[ "Create", "the", "JvmOperation", "for", "the", "given", "JDT", "method", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/util/Jdt2Ecore.java#L414-L431
BoltsFramework/Bolts-Android
bolts-tasks/src/main/java/bolts/Task.java
Task.callInBackground
public static <TResult> Task<TResult> callInBackground(Callable<TResult> callable, CancellationToken ct) { """ Invokes the callable on a background thread, returning a Task to represent the operation. """ return call(callable, BACKGROUND_EXECUTOR, ct); }
java
public static <TResult> Task<TResult> callInBackground(Callable<TResult> callable, CancellationToken ct) { return call(callable, BACKGROUND_EXECUTOR, ct); }
[ "public", "static", "<", "TResult", ">", "Task", "<", "TResult", ">", "callInBackground", "(", "Callable", "<", "TResult", ">", "callable", ",", "CancellationToken", "ct", ")", "{", "return", "call", "(", "callable", ",", "BACKGROUND_EXECUTOR", ",", "ct", ")...
Invokes the callable on a background thread, returning a Task to represent the operation.
[ "Invokes", "the", "callable", "on", "a", "background", "thread", "returning", "a", "Task", "to", "represent", "the", "operation", "." ]
train
https://github.com/BoltsFramework/Bolts-Android/blob/54e9cb8bdd4950aa4d418dcbc0ea65414762aef5/bolts-tasks/src/main/java/bolts/Task.java#L324-L326
schallee/alib4j
core/src/main/java/net/darkmist/alib/io/Serializer.java
Serializer.deserializeFromStream
public static <T extends Serializable> T deserializeFromStream(InputStream in, Class<T> type) throws ClassNotFoundException, IOException { """ Read one serialized object from a input stream. @param in InputStream to read from. This will be closed! @param type The type that is to be read. @return The serialized ...
java
public static <T extends Serializable> T deserializeFromStream(InputStream in, Class<T> type) throws ClassNotFoundException, IOException { ObjectInputStream objIn; T obj; if(in instanceof ObjectInputStream) objIn = (ObjectInputStream)in; else objIn = new ObjectInputStream(in); obj = type.cast(objIn.r...
[ "public", "static", "<", "T", "extends", "Serializable", ">", "T", "deserializeFromStream", "(", "InputStream", "in", ",", "Class", "<", "T", ">", "type", ")", "throws", "ClassNotFoundException", ",", "IOException", "{", "ObjectInputStream", "objIn", ";", "T", ...
Read one serialized object from a input stream. @param in InputStream to read from. This will be closed! @param type The type that is to be read. @return The serialized object cast as type.
[ "Read", "one", "serialized", "object", "from", "a", "input", "stream", "." ]
train
https://github.com/schallee/alib4j/blob/0e0718aee574bbb62268e1cf58e99286529ce529/core/src/main/java/net/darkmist/alib/io/Serializer.java#L48-L64
Azure/azure-sdk-for-java
cognitiveservices/data-plane/search/bingcustomsearch/src/main/java/com/microsoft/azure/cognitiveservices/search/customsearch/implementation/BingCustomInstancesImpl.java
BingCustomInstancesImpl.searchAsync
public Observable<SearchResponse> searchAsync(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 The identifier for the custom search c...
java
public Observable<SearchResponse> searchAsync(long customConfig, String query, SearchOptionalParameter searchOptionalParameter) { return searchWithServiceResponseAsync(customConfig, query, searchOptionalParameter).map(new Func1<ServiceResponse<SearchResponse>, SearchResponse>() { @Override ...
[ "public", "Observable", "<", "SearchResponse", ">", "searchAsync", "(", "long", "customConfig", ",", "String", "query", ",", "SearchOptionalParameter", "searchOptionalParameter", ")", "{", "return", "searchWithServiceResponseAsync", "(", "customConfig", ",", "query", ",...
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#L103-L110
twitter/cloudhopper-commons
ch-jetty/src/main/java/com/cloudhopper/jetty/JettyHttpServer.java
JettyHttpServer.addServlet
public void addServlet(Servlet servlet, String uri) { """ Adds a servlet to this server. @param servlet The servlet to add @param uri The uri mapping (relative to root context /) to trigger this servlet to be executed. Wildcards are permitted. """ // create a holder and then add it to the mapping ...
java
public void addServlet(Servlet servlet, String uri) { // create a holder and then add it to the mapping ServletHolder servletHolder = new ServletHolder(servlet); rootServletContext.addServlet(servletHolder, uri); }
[ "public", "void", "addServlet", "(", "Servlet", "servlet", ",", "String", "uri", ")", "{", "// create a holder and then add it to the mapping", "ServletHolder", "servletHolder", "=", "new", "ServletHolder", "(", "servlet", ")", ";", "rootServletContext", ".", "addServle...
Adds a servlet to this server. @param servlet The servlet to add @param uri The uri mapping (relative to root context /) to trigger this servlet to be executed. Wildcards are permitted.
[ "Adds", "a", "servlet", "to", "this", "server", "." ]
train
https://github.com/twitter/cloudhopper-commons/blob/b5bc397dbec4537e8149e7ec0733c1d7ed477499/ch-jetty/src/main/java/com/cloudhopper/jetty/JettyHttpServer.java#L134-L138
geomajas/geomajas-project-server
plugin/staticsecurity/staticsecurity-ldap/src/main/java/org/geomajas/plugin/staticsecurity/ldap/LdapAuthenticationService.java
LdapAuthenticationService.setRoles
@Api public void setRoles(Map<String, List<AuthorizationInfo>> roles) { """ Set the authorizations for the roles which may be defined. If the keys are DN values, the application role names are taken from the leftmost RDN value. Use {@link LdapAuthenticationService#setNamedRoles(Map)} instead of this method to e...
java
@Api public void setRoles(Map<String, List<AuthorizationInfo>> roles) { Map<String, List<NamedRoleInfo>> namedRoles = new HashMap<String, List<NamedRoleInfo>>(); for (String ldapRole : roles.keySet()) { DN dn; List<AuthorizationInfo> auth = roles.get(ldapRole); NamedRoleInfo role = new NamedRoleInfo(); ...
[ "@", "Api", "public", "void", "setRoles", "(", "Map", "<", "String", ",", "List", "<", "AuthorizationInfo", ">", ">", "roles", ")", "{", "Map", "<", "String", ",", "List", "<", "NamedRoleInfo", ">", ">", "namedRoles", "=", "new", "HashMap", "<", "Strin...
Set the authorizations for the roles which may be defined. If the keys are DN values, the application role names are taken from the leftmost RDN value. Use {@link LdapAuthenticationService#setNamedRoles(Map)} instead of this method to explicitly define application role names. @param roles map with roles, keys are the ...
[ "Set", "the", "authorizations", "for", "the", "roles", "which", "may", "be", "defined", ".", "If", "the", "keys", "are", "DN", "values", "the", "application", "role", "names", "are", "taken", "from", "the", "leftmost", "RDN", "value", ".", "Use", "{", "@...
train
https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/plugin/staticsecurity/staticsecurity-ldap/src/main/java/org/geomajas/plugin/staticsecurity/ldap/LdapAuthenticationService.java#L259-L276
opencb/biodata
biodata-tools/src/main/java/org/opencb/biodata/tools/variant/metadata/VariantMetadataManager.java
VariantMetadataManager.removeFile
public void removeFile(String fileId, String studyId) { """ Remove a variant file metadata (from file ID) of a given variant study metadata (from study ID). @param fileId File ID @param studyId Study ID """ // Sanity check if (StringUtils.isEmpty(fileId)) { logger.error...
java
public void removeFile(String fileId, String studyId) { // Sanity check if (StringUtils.isEmpty(fileId)) { logger.error("Variant file metadata ID {} is null or empty.", fileId); return; } VariantStudyMetadata variantStudyMetadata = getVariantStudyMetadata(studyId...
[ "public", "void", "removeFile", "(", "String", "fileId", ",", "String", "studyId", ")", "{", "// Sanity check", "if", "(", "StringUtils", ".", "isEmpty", "(", "fileId", ")", ")", "{", "logger", ".", "error", "(", "\"Variant file metadata ID {} is null or empty.\""...
Remove a variant file metadata (from file ID) of a given variant study metadata (from study ID). @param fileId File ID @param studyId Study ID
[ "Remove", "a", "variant", "file", "metadata", "(", "from", "file", "ID", ")", "of", "a", "given", "variant", "study", "metadata", "(", "from", "study", "ID", ")", "." ]
train
https://github.com/opencb/biodata/blob/21b3d51d71f578efab908422aca4bab7a73097b1/biodata-tools/src/main/java/org/opencb/biodata/tools/variant/metadata/VariantMetadataManager.java#L298-L318
rhuss/jolokia
agent/jmx/src/main/java/org/jolokia/jmx/JolokiaMBeanServer.java
JolokiaMBeanServer.fromJson
Object fromJson(String type, String json) { """ Convert from a JSON or other string representation to real object. Used when preparing operation argument. If the JSON structure cannot be converted, an {@link IllegalArgumentException} is thrown. @param type type to convert to @param json string to deserialize ...
java
Object fromJson(String type, String json) { return converters.getToObjectConverter().convertFromString(type,json); }
[ "Object", "fromJson", "(", "String", "type", ",", "String", "json", ")", "{", "return", "converters", ".", "getToObjectConverter", "(", ")", ".", "convertFromString", "(", "type", ",", "json", ")", ";", "}" ]
Convert from a JSON or other string representation to real object. Used when preparing operation argument. If the JSON structure cannot be converted, an {@link IllegalArgumentException} is thrown. @param type type to convert to @param json string to deserialize @return the deserialized object
[ "Convert", "from", "a", "JSON", "or", "other", "string", "representation", "to", "real", "object", ".", "Used", "when", "preparing", "operation", "argument", ".", "If", "the", "JSON", "structure", "cannot", "be", "converted", "an", "{", "@link", "IllegalArgume...
train
https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/jmx/src/main/java/org/jolokia/jmx/JolokiaMBeanServer.java#L167-L169
MariaDB/mariadb-connector-j
src/main/java/org/mariadb/jdbc/MariaDbPooledConnection.java
MariaDbPooledConnection.fireStatementClosed
public void fireStatementClosed(Statement st) { """ Fire statement close event to listeners. @param st statement """ if (st instanceof PreparedStatement) { StatementEvent event = new StatementEvent(this, (PreparedStatement) st); for (StatementEventListener listener : statementEventListeners)...
java
public void fireStatementClosed(Statement st) { if (st instanceof PreparedStatement) { StatementEvent event = new StatementEvent(this, (PreparedStatement) st); for (StatementEventListener listener : statementEventListeners) { listener.statementClosed(event); } } }
[ "public", "void", "fireStatementClosed", "(", "Statement", "st", ")", "{", "if", "(", "st", "instanceof", "PreparedStatement", ")", "{", "StatementEvent", "event", "=", "new", "StatementEvent", "(", "this", ",", "(", "PreparedStatement", ")", "st", ")", ";", ...
Fire statement close event to listeners. @param st statement
[ "Fire", "statement", "close", "event", "to", "listeners", "." ]
train
https://github.com/MariaDB/mariadb-connector-j/blob/d148c7cd347c4680617be65d9e511b289d38a30b/src/main/java/org/mariadb/jdbc/MariaDbPooledConnection.java#L189-L196
inkstand-io/scribble
scribble-file/src/main/java/io/inkstand/scribble/rules/builder/ZipFileBuilder.java
ZipFileBuilder.addResource
public ZipFileBuilder addResource(String zipEntryPath, URL resource) { """ Adds a resource to the Zip File under the path specified. @param zipEntryPath the path to the entry in the zip file @param resource the resource providing the content for the path. If an empty directory should be added, this value mus...
java
public ZipFileBuilder addResource(String zipEntryPath, URL resource) { this.entryMap.put(zipEntryPath, resource); return this; }
[ "public", "ZipFileBuilder", "addResource", "(", "String", "zipEntryPath", ",", "URL", "resource", ")", "{", "this", ".", "entryMap", ".", "put", "(", "zipEntryPath", ",", "resource", ")", ";", "return", "this", ";", "}" ]
Adds a resource to the Zip File under the path specified. @param zipEntryPath the path to the entry in the zip file @param resource the resource providing the content for the path. If an empty directory should be added, this value must @return this builder
[ "Adds", "a", "resource", "to", "the", "Zip", "File", "under", "the", "path", "specified", "." ]
train
https://github.com/inkstand-io/scribble/blob/66e67553bad4b1ff817e1715fd1d3dd833406744/scribble-file/src/main/java/io/inkstand/scribble/rules/builder/ZipFileBuilder.java#L86-L90
joniles/mpxj
src/main/java/net/sf/mpxj/primavera/p3/P3DatabaseReader.java
P3DatabaseReader.defineField
private static void defineField(Map<String, FieldType> container, String name, FieldType type) { """ Configure the mapping between a database column and a field. @param container column to field map @param name column name @param type field type """ defineField(container, name, type, null); }
java
private static void defineField(Map<String, FieldType> container, String name, FieldType type) { defineField(container, name, type, null); }
[ "private", "static", "void", "defineField", "(", "Map", "<", "String", ",", "FieldType", ">", "container", ",", "String", "name", ",", "FieldType", "type", ")", "{", "defineField", "(", "container", ",", "name", ",", "type", ",", "null", ")", ";", "}" ]
Configure the mapping between a database column and a field. @param container column to field map @param name column name @param type field type
[ "Configure", "the", "mapping", "between", "a", "database", "column", "and", "a", "field", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/p3/P3DatabaseReader.java#L605-L608
kotcrab/vis-ui
ui/src/main/java/com/kotcrab/vis/ui/widget/VisDialog.java
VisDialog.text
public VisDialog text (String text) { """ Adds a label to the content table. The dialog must have been constructed with a skin to use this method. """ if (skin == null) throw new IllegalStateException("This method may only be used if the dialog was constructed with a Skin."); return text(text, skin.get(...
java
public VisDialog text (String text) { if (skin == null) throw new IllegalStateException("This method may only be used if the dialog was constructed with a Skin."); return text(text, skin.get(LabelStyle.class)); }
[ "public", "VisDialog", "text", "(", "String", "text", ")", "{", "if", "(", "skin", "==", "null", ")", "throw", "new", "IllegalStateException", "(", "\"This method may only be used if the dialog was constructed with a Skin.\"", ")", ";", "return", "text", "(", "text", ...
Adds a label to the content table. The dialog must have been constructed with a skin to use this method.
[ "Adds", "a", "label", "to", "the", "content", "table", ".", "The", "dialog", "must", "have", "been", "constructed", "with", "a", "skin", "to", "use", "this", "method", "." ]
train
https://github.com/kotcrab/vis-ui/blob/3b68f82d94ae32bffa2a3399c63f432e0f4908e0/ui/src/main/java/com/kotcrab/vis/ui/widget/VisDialog.java#L144-L148
andkulikov/Transitions-Everywhere
library(1.x)/src/main/java/com/transitionseverywhere/Transition.java
Transition.getTransitionValues
@Nullable public TransitionValues getTransitionValues(@NonNull View view, boolean start) { """ This method can be called by transitions to get the TransitionValues for any particular view during the transition-playing process. This might be necessary, for example, to query the before/after state of related v...
java
@Nullable public TransitionValues getTransitionValues(@NonNull View view, boolean start) { if (mParent != null) { return mParent.getTransitionValues(view, start); } TransitionValuesMaps valuesMaps = start ? mStartValues : mEndValues; return valuesMaps.viewValues.get(view)...
[ "@", "Nullable", "public", "TransitionValues", "getTransitionValues", "(", "@", "NonNull", "View", "view", ",", "boolean", "start", ")", "{", "if", "(", "mParent", "!=", "null", ")", "{", "return", "mParent", ".", "getTransitionValues", "(", "view", ",", "st...
This method can be called by transitions to get the TransitionValues for any particular view during the transition-playing process. This might be necessary, for example, to query the before/after state of related views for a given transition.
[ "This", "method", "can", "be", "called", "by", "transitions", "to", "get", "the", "TransitionValues", "for", "any", "particular", "view", "during", "the", "transition", "-", "playing", "process", ".", "This", "might", "be", "necessary", "for", "example", "to",...
train
https://github.com/andkulikov/Transitions-Everywhere/blob/828efe5f152a2f05e2bfeee6254b74ad2269d4f1/library(1.x)/src/main/java/com/transitionseverywhere/Transition.java#L1659-L1666
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/ui/SeaGlassButtonUI.java
SeaGlassButtonUI.getSynthIcon
private Icon getSynthIcon(AbstractButton b, int synthConstant) { """ DOCUMENT ME! @param b DOCUMENT ME! @param synthConstant DOCUMENT ME! @return DOCUMENT ME! """ return style.getIcon(getContext(b, synthConstant), getPropertyPrefix() + "icon"); }
java
private Icon getSynthIcon(AbstractButton b, int synthConstant) { return style.getIcon(getContext(b, synthConstant), getPropertyPrefix() + "icon"); }
[ "private", "Icon", "getSynthIcon", "(", "AbstractButton", "b", ",", "int", "synthConstant", ")", "{", "return", "style", ".", "getIcon", "(", "getContext", "(", "b", ",", "synthConstant", ")", ",", "getPropertyPrefix", "(", ")", "+", "\"icon\"", ")", ";", ...
DOCUMENT ME! @param b DOCUMENT ME! @param synthConstant DOCUMENT ME! @return DOCUMENT ME!
[ "DOCUMENT", "ME!" ]
train
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/ui/SeaGlassButtonUI.java#L439-L441
aspectran/aspectran
core/src/main/java/com/aspectran/core/activity/request/ParameterMap.java
ParameterMap.setAll
public void setAll(Map<String, String> params) { """ Set the given parameters under. @param params the other parameter map """ for (Map.Entry<String, String> entry : params.entrySet()) { setParameter(entry.getKey(), entry.getValue()); } }
java
public void setAll(Map<String, String> params) { for (Map.Entry<String, String> entry : params.entrySet()) { setParameter(entry.getKey(), entry.getValue()); } }
[ "public", "void", "setAll", "(", "Map", "<", "String", ",", "String", ">", "params", ")", "{", "for", "(", "Map", ".", "Entry", "<", "String", ",", "String", ">", "entry", ":", "params", ".", "entrySet", "(", ")", ")", "{", "setParameter", "(", "en...
Set the given parameters under. @param params the other parameter map
[ "Set", "the", "given", "parameters", "under", "." ]
train
https://github.com/aspectran/aspectran/blob/2d758a2a28b71ee85b42823c12dc44674d7f2c70/core/src/main/java/com/aspectran/core/activity/request/ParameterMap.java#L125-L129
VoltDB/voltdb
examples/callcenter/client/callcenter/DelayedQueue.java
DelayedQueue.add
public void add(long readyTs, T value) { """ Schedule an object to be available for polling at a given timestamp (ms). @param readyTs The ms timestamp when the event is safe to deliver. @param value Object to deliver. """ Object[] values = delayed.get(readyTs); // if one or more objects is...
java
public void add(long readyTs, T value) { Object[] values = delayed.get(readyTs); // if one or more objects is already scheduled for given time if (values != null) { // make a list Object[] values2 = new Object[values.length + 1]; values2[0] = value; ...
[ "public", "void", "add", "(", "long", "readyTs", ",", "T", "value", ")", "{", "Object", "[", "]", "values", "=", "delayed", ".", "get", "(", "readyTs", ")", ";", "// if one or more objects is already scheduled for given time", "if", "(", "values", "!=", "null"...
Schedule an object to be available for polling at a given timestamp (ms). @param readyTs The ms timestamp when the event is safe to deliver. @param value Object to deliver.
[ "Schedule", "an", "object", "to", "be", "available", "for", "polling", "at", "a", "given", "timestamp", "(", "ms", ")", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/examples/callcenter/client/callcenter/DelayedQueue.java#L52-L70
Azure/azure-sdk-for-java
network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/ExpressRouteCircuitsInner.java
ExpressRouteCircuitsInner.getStatsAsync
public Observable<ExpressRouteCircuitStatsInner> getStatsAsync(String resourceGroupName, String circuitName) { """ Gets all the stats from an express route circuit in a resource group. @param resourceGroupName The name of the resource group. @param circuitName The name of the express route circuit. @throws Il...
java
public Observable<ExpressRouteCircuitStatsInner> getStatsAsync(String resourceGroupName, String circuitName) { return getStatsWithServiceResponseAsync(resourceGroupName, circuitName).map(new Func1<ServiceResponse<ExpressRouteCircuitStatsInner>, ExpressRouteCircuitStatsInner>() { @Override ...
[ "public", "Observable", "<", "ExpressRouteCircuitStatsInner", ">", "getStatsAsync", "(", "String", "resourceGroupName", ",", "String", "circuitName", ")", "{", "return", "getStatsWithServiceResponseAsync", "(", "resourceGroupName", ",", "circuitName", ")", ".", "map", "...
Gets all the stats from an express route circuit in a resource group. @param resourceGroupName The name of the resource group. @param circuitName The name of the express route circuit. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the ExpressRouteCircuitStatsInner ...
[ "Gets", "all", "the", "stats", "from", "an", "express", "route", "circuit", "in", "a", "resource", "group", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/ExpressRouteCircuitsInner.java#L1441-L1448
joniles/mpxj
src/main/java/net/sf/mpxj/ganttproject/GanttProjectReader.java
GanttProjectReader.setExceptions
private void setExceptions(ProjectCalendar mpxjCalendar, Calendars gpCalendar) { """ Add exceptions to the calendar. @param mpxjCalendar MPXJ calendar @param gpCalendar GanttProject calendar """ List<net.sf.mpxj.ganttproject.schema.Date> dates = gpCalendar.getDate(); for (net.sf.mpxj.ganttproje...
java
private void setExceptions(ProjectCalendar mpxjCalendar, Calendars gpCalendar) { List<net.sf.mpxj.ganttproject.schema.Date> dates = gpCalendar.getDate(); for (net.sf.mpxj.ganttproject.schema.Date date : dates) { addException(mpxjCalendar, date); } }
[ "private", "void", "setExceptions", "(", "ProjectCalendar", "mpxjCalendar", ",", "Calendars", "gpCalendar", ")", "{", "List", "<", "net", ".", "sf", ".", "mpxj", ".", "ganttproject", ".", "schema", ".", "Date", ">", "dates", "=", "gpCalendar", ".", "getDate"...
Add exceptions to the calendar. @param mpxjCalendar MPXJ calendar @param gpCalendar GanttProject calendar
[ "Add", "exceptions", "to", "the", "calendar", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ganttproject/GanttProjectReader.java#L292-L299
twilio/authy-java
src/main/java/com/authy/api/Users.java
Users.createUser
public com.authy.api.User createUser(String email, String phone, String countryCode) throws AuthyException { """ Create a new user using his e-mail, phone and country code. @param email @param phone @param countryCode @return a User instance """ User user = new User(email, phone, countryCode); ...
java
public com.authy.api.User createUser(String email, String phone, String countryCode) throws AuthyException { User user = new User(email, phone, countryCode); final Response response = this.post(NEW_USER_PATH, user); return userFromJson(response.getStatus(), response.getBody()); }
[ "public", "com", ".", "authy", ".", "api", ".", "User", "createUser", "(", "String", "email", ",", "String", "phone", ",", "String", "countryCode", ")", "throws", "AuthyException", "{", "User", "user", "=", "new", "User", "(", "email", ",", "phone", ",",...
Create a new user using his e-mail, phone and country code. @param email @param phone @param countryCode @return a User instance
[ "Create", "a", "new", "user", "using", "his", "e", "-", "mail", "phone", "and", "country", "code", "." ]
train
https://github.com/twilio/authy-java/blob/55e3a5ff57a93b3eb36f5b59e8824e60af2b8b91/src/main/java/com/authy/api/Users.java#L46-L50
facebookarchive/hadoop-20
src/mapred/org/apache/hadoop/mapred/FileOutputFormat.java
FileOutputFormat.getUniqueName
public static String getUniqueName(JobConf conf, String name) { """ Helper function to generate a name that is unique for the task. <p>The generated name can be used to create custom files from within the different tasks for the job, the names for different tasks will not collide with each other.</p> <p>Th...
java
public static String getUniqueName(JobConf conf, String name) { int partition = conf.getInt("mapred.task.partition", -1); if (partition == -1) { throw new IllegalArgumentException( "This method can only be called from within a Job"); } String taskType = (conf.getBoolean("mapred.task.is.ma...
[ "public", "static", "String", "getUniqueName", "(", "JobConf", "conf", ",", "String", "name", ")", "{", "int", "partition", "=", "conf", ".", "getInt", "(", "\"mapred.task.partition\"", ",", "-", "1", ")", ";", "if", "(", "partition", "==", "-", "1", ")"...
Helper function to generate a name that is unique for the task. <p>The generated name can be used to create custom files from within the different tasks for the job, the names for different tasks will not collide with each other.</p> <p>The given name is postfixed with the task type, 'm' for maps, 'r' for reduces and...
[ "Helper", "function", "to", "generate", "a", "name", "that", "is", "unique", "for", "the", "task", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/mapred/org/apache/hadoop/mapred/FileOutputFormat.java#L268-L282
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ImageModerationsImpl.java
ImageModerationsImpl.oCRUrlInputAsync
public Observable<OCR> oCRUrlInputAsync(String language, String contentType, BodyModelModel imageUrl, OCRUrlInputOptionalParameter oCRUrlInputOptionalParameter) { """ Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English. @par...
java
public Observable<OCR> oCRUrlInputAsync(String language, String contentType, BodyModelModel imageUrl, OCRUrlInputOptionalParameter oCRUrlInputOptionalParameter) { return oCRUrlInputWithServiceResponseAsync(language, contentType, imageUrl, oCRUrlInputOptionalParameter).map(new Func1<ServiceResponse<OCR>, OCR>() ...
[ "public", "Observable", "<", "OCR", ">", "oCRUrlInputAsync", "(", "String", "language", ",", "String", "contentType", ",", "BodyModelModel", "imageUrl", ",", "OCRUrlInputOptionalParameter", "oCRUrlInputOptionalParameter", ")", "{", "return", "oCRUrlInputWithServiceResponseA...
Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English. @param language Language of the terms. @param contentType The content type. @param imageUrl The image url. @param oCRUrlInputOptionalParameter the object representing the optiona...
[ "Returns", "any", "text", "found", "in", "the", "image", "for", "the", "language", "specified", ".", "If", "no", "language", "is", "specified", "in", "input", "then", "the", "detection", "defaults", "to", "English", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ImageModerationsImpl.java#L1076-L1083
EdwardRaff/JSAT
JSAT/src/jsat/classifiers/neuralnetwork/BackPropagationNet.java
BackPropagationNet.setWeightDecay
public void setWeightDecay(double weightDecay) { """ Sets the weight decay used for each update. The weight decay must be in the range [0, 1). Weight decay values must often be very small, often 1e-8 or less. @param weightDecay the weight decay to apply when training """ if(weightDecay < 0 || weig...
java
public void setWeightDecay(double weightDecay) { if(weightDecay < 0 || weightDecay >= 1 || Double.isNaN(weightDecay)) throw new ArithmeticException("Weight decay must be in [0,1), not " + weightDecay); this.weightDecay = weightDecay; }
[ "public", "void", "setWeightDecay", "(", "double", "weightDecay", ")", "{", "if", "(", "weightDecay", "<", "0", "||", "weightDecay", ">=", "1", "||", "Double", ".", "isNaN", "(", "weightDecay", ")", ")", "throw", "new", "ArithmeticException", "(", "\"Weight ...
Sets the weight decay used for each update. The weight decay must be in the range [0, 1). Weight decay values must often be very small, often 1e-8 or less. @param weightDecay the weight decay to apply when training
[ "Sets", "the", "weight", "decay", "used", "for", "each", "update", ".", "The", "weight", "decay", "must", "be", "in", "the", "range", "[", "0", "1", ")", ".", "Weight", "decay", "values", "must", "often", "be", "very", "small", "often", "1e", "-", "8...
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/classifiers/neuralnetwork/BackPropagationNet.java#L397-L402
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/util/UserProperties.java
UserProperties.setProperties
public void setProperties(Map<String, Object> properties) { """ Set the properties. @param strProperties The properties to set. """ Record recUserRegistration = this.getUserRegistration(); ((PropertiesField)recUserRegistration.getField(UserRegistrationModel.PROPERTIES)).setProperties(propertie...
java
public void setProperties(Map<String, Object> properties) { Record recUserRegistration = this.getUserRegistration(); ((PropertiesField)recUserRegistration.getField(UserRegistrationModel.PROPERTIES)).setProperties(properties); }
[ "public", "void", "setProperties", "(", "Map", "<", "String", ",", "Object", ">", "properties", ")", "{", "Record", "recUserRegistration", "=", "this", ".", "getUserRegistration", "(", ")", ";", "(", "(", "PropertiesField", ")", "recUserRegistration", ".", "ge...
Set the properties. @param strProperties The properties to set.
[ "Set", "the", "properties", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/util/UserProperties.java#L197-L201
MenoData/Time4J
base/src/main/java/net/time4j/history/EraPreference.java
EraPreference.byzantineBetween
public static EraPreference byzantineBetween( PlainDate start, PlainDate end ) { """ /*[deutsch] <p>Legt fest, da&szlig; die &Auml;ra Anno Mundi innerhalb der angegebenen Datumsspanne bevorzugt wird. </p> @param start first date when the era Anno Mundi shall be used (inclusive) @pa...
java
public static EraPreference byzantineBetween( PlainDate start, PlainDate end ) { return new EraPreference(HistoricEra.BYZANTINE, start, end); }
[ "public", "static", "EraPreference", "byzantineBetween", "(", "PlainDate", "start", ",", "PlainDate", "end", ")", "{", "return", "new", "EraPreference", "(", "HistoricEra", ".", "BYZANTINE", ",", "start", ",", "end", ")", ";", "}" ]
/*[deutsch] <p>Legt fest, da&szlig; die &Auml;ra Anno Mundi innerhalb der angegebenen Datumsspanne bevorzugt wird. </p> @param start first date when the era Anno Mundi shall be used (inclusive) @param end last date when the era Anno Mundi shall be used (inclusive) @return EraPreference @see Hist...
[ "/", "*", "[", "deutsch", "]", "<p", ">", "Legt", "fest", "da&szlig", ";", "die", "&Auml", ";", "ra", "Anno", "Mundi", "innerhalb", "der", "angegebenen", "Datumsspanne", "bevorzugt", "wird", ".", "<", "/", "p", ">" ]
train
https://github.com/MenoData/Time4J/blob/08b2eda6b2dbb140b92011cf7071bb087edd46a5/base/src/main/java/net/time4j/history/EraPreference.java#L185-L192
linroid/FilterMenu
library/src/main/java/com/linroid/filtermenu/library/FilterMenuLayout.java
FilterMenuLayout.inArea
public static boolean inArea(Point point, Rect area, float offsetRatio) { """ judge if an point in the area or not @param point @param area @param offsetRatio @return """ int offset = (int) (area.width() * offsetRatio); return point.x >= area.left - offset && point.x <= area.right + offse...
java
public static boolean inArea(Point point, Rect area, float offsetRatio) { int offset = (int) (area.width() * offsetRatio); return point.x >= area.left - offset && point.x <= area.right + offset && point.y >= area.top - offset && point.y <= area.bottom + offset; }
[ "public", "static", "boolean", "inArea", "(", "Point", "point", ",", "Rect", "area", ",", "float", "offsetRatio", ")", "{", "int", "offset", "=", "(", "int", ")", "(", "area", ".", "width", "(", ")", "*", "offsetRatio", ")", ";", "return", "point", "...
judge if an point in the area or not @param point @param area @param offsetRatio @return
[ "judge", "if", "an", "point", "in", "the", "area", "or", "not" ]
train
https://github.com/linroid/FilterMenu/blob/5a6e5472631c2304b71a51034683f38271962ef5/library/src/main/java/com/linroid/filtermenu/library/FilterMenuLayout.java#L212-L216
apereo/cas
support/cas-server-support-saml-core-api/src/main/java/org/apereo/cas/support/saml/util/Saml10ObjectBuilder.java
Saml10ObjectBuilder.setInResponseToForSamlResponseIfNeeded
private static void setInResponseToForSamlResponseIfNeeded(final Service service, final Response samlResponse) { """ Sets in response to for saml 1 response. @param service the service @param samlResponse the saml 1 response """ if (service instanceof SamlService) { val samlService...
java
private static void setInResponseToForSamlResponseIfNeeded(final Service service, final Response samlResponse) { if (service instanceof SamlService) { val samlService = (SamlService) service; val requestId = samlService.getRequestId(); if (StringUtils.isNotBlank(requestId)) {...
[ "private", "static", "void", "setInResponseToForSamlResponseIfNeeded", "(", "final", "Service", "service", ",", "final", "Response", "samlResponse", ")", "{", "if", "(", "service", "instanceof", "SamlService", ")", "{", "val", "samlService", "=", "(", "SamlService",...
Sets in response to for saml 1 response. @param service the service @param samlResponse the saml 1 response
[ "Sets", "in", "response", "to", "for", "saml", "1", "response", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-saml-core-api/src/main/java/org/apereo/cas/support/saml/util/Saml10ObjectBuilder.java#L67-L75
grails/grails-core
grails-core/src/main/groovy/grails/util/GrailsClassUtils.java
GrailsClassUtils.getPropertyDescriptorForValue
public static PropertyDescriptor getPropertyDescriptorForValue(Object instance, Object propertyValue) { """ Retrieves a PropertyDescriptor for the specified instance and property value @param instance The instance @param propertyValue The value of the property @return The PropertyDescriptor """ if...
java
public static PropertyDescriptor getPropertyDescriptorForValue(Object instance, Object propertyValue) { if (instance == null || propertyValue == null) { return null; } PropertyDescriptor[] descriptors = BeanUtils.getPropertyDescriptors(instance.getClass()); for (PropertyDesc...
[ "public", "static", "PropertyDescriptor", "getPropertyDescriptorForValue", "(", "Object", "instance", ",", "Object", "propertyValue", ")", "{", "if", "(", "instance", "==", "null", "||", "propertyValue", "==", "null", ")", "{", "return", "null", ";", "}", "Prope...
Retrieves a PropertyDescriptor for the specified instance and property value @param instance The instance @param propertyValue The value of the property @return The PropertyDescriptor
[ "Retrieves", "a", "PropertyDescriptor", "for", "the", "specified", "instance", "and", "property", "value" ]
train
https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-core/src/main/groovy/grails/util/GrailsClassUtils.java#L264-L286
UrielCh/ovh-java-sdk
ovh-java-sdk-hostingprivateDatabase/src/main/java/net/minidev/ovh/api/ApiOvhHostingprivateDatabase.java
ApiOvhHostingprivateDatabase.serviceName_whitelist_GET
public ArrayList<String> serviceName_whitelist_GET(String serviceName, String ip, Boolean service, Boolean sftp) throws IOException { """ Whitelist allowed on your privatesql REST: GET /hosting/privateDatabase/{serviceName}/whitelist @param ip [required] Filter the value of ip property (contains or equals) @p...
java
public ArrayList<String> serviceName_whitelist_GET(String serviceName, String ip, Boolean service, Boolean sftp) throws IOException { String qPath = "/hosting/privateDatabase/{serviceName}/whitelist"; StringBuilder sb = path(qPath, serviceName); query(sb, "ip", ip); query(sb, "service", service); query(sb, "s...
[ "public", "ArrayList", "<", "String", ">", "serviceName_whitelist_GET", "(", "String", "serviceName", ",", "String", "ip", ",", "Boolean", "service", ",", "Boolean", "sftp", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/hosting/privateDatabase/{serv...
Whitelist allowed on your privatesql REST: GET /hosting/privateDatabase/{serviceName}/whitelist @param ip [required] Filter the value of ip property (contains or equals) @param service [required] Filter the value of service property (=) @param sftp [required] Filter the value of sftp property (=) @param serviceName [r...
[ "Whitelist", "allowed", "on", "your", "privatesql" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-hostingprivateDatabase/src/main/java/net/minidev/ovh/api/ApiOvhHostingprivateDatabase.java#L848-L856
VoltDB/voltdb
src/frontend/org/voltcore/messaging/ForeignHost.java
ForeignHost.deliverMessage
private void deliverMessage(long destinationHSId, VoltMessage message) { """ Deliver a deserialized message from the network to a local mailbox """ if (!m_hostMessenger.validateForeignHostId(m_hostId)) { hostLog.warn(String.format("Message (%s) sent to site id: %s @ (%s) at %d from %s " ...
java
private void deliverMessage(long destinationHSId, VoltMessage message) { if (!m_hostMessenger.validateForeignHostId(m_hostId)) { hostLog.warn(String.format("Message (%s) sent to site id: %s @ (%s) at %d from %s " + "which is a known failed host. The message will be dropped\n", ...
[ "private", "void", "deliverMessage", "(", "long", "destinationHSId", ",", "VoltMessage", "message", ")", "{", "if", "(", "!", "m_hostMessenger", ".", "validateForeignHostId", "(", "m_hostId", ")", ")", "{", "hostLog", ".", "warn", "(", "String", ".", "format",...
Deliver a deserialized message from the network to a local mailbox
[ "Deliver", "a", "deserialized", "message", "from", "the", "network", "to", "a", "local", "mailbox" ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/messaging/ForeignHost.java#L313-L347
alibaba/jstorm
jstorm-core/src/main/java/backtype/storm/topology/base/BaseWindowedBolt.java
BaseWindowedBolt.withWindow
public BaseWindowedBolt withWindow(Count windowLength, Duration slidingInterval) { """ Tuple count and time duration based sliding window configuration. @param windowLength the number of tuples in the window @param slidingInterval the time duration after which the window slides """ return withWi...
java
public BaseWindowedBolt withWindow(Count windowLength, Duration slidingInterval) { return withWindowLength(windowLength).withSlidingInterval(slidingInterval); }
[ "public", "BaseWindowedBolt", "withWindow", "(", "Count", "windowLength", ",", "Duration", "slidingInterval", ")", "{", "return", "withWindowLength", "(", "windowLength", ")", ".", "withSlidingInterval", "(", "slidingInterval", ")", ";", "}" ]
Tuple count and time duration based sliding window configuration. @param windowLength the number of tuples in the window @param slidingInterval the time duration after which the window slides
[ "Tuple", "count", "and", "time", "duration", "based", "sliding", "window", "configuration", "." ]
train
https://github.com/alibaba/jstorm/blob/5d6cde22dbca7df3d6e6830bf94f98a6639ab559/jstorm-core/src/main/java/backtype/storm/topology/base/BaseWindowedBolt.java#L100-L102
SahaginOrg/sahagin-java
src/main/java/org/sahagin/runlib/runresultsgen/RunResultsGenerateHookSetter.java
RunResultsGenerateHookSetter.afterHookInsertLine
private int afterHookInsertLine(TestMethod method, int codeLineIndex) { """ Returns -1 if afterHook for the codeLineIndex should not be inserted """ // if multiple statements exist in one line, afterHook is inserted only after the last statement, // since when multi-line statements are like: ...
java
private int afterHookInsertLine(TestMethod method, int codeLineIndex) { // if multiple statements exist in one line, afterHook is inserted only after the last statement, // since when multi-line statements are like: // method(1);method( // 2); // insertion to the middle o...
[ "private", "int", "afterHookInsertLine", "(", "TestMethod", "method", ",", "int", "codeLineIndex", ")", "{", "// if multiple statements exist in one line, afterHook is inserted only after the last statement,", "// since when multi-line statements are like:", "// method(1);method(", "// ...
Returns -1 if afterHook for the codeLineIndex should not be inserted
[ "Returns", "-", "1", "if", "afterHook", "for", "the", "codeLineIndex", "should", "not", "be", "inserted" ]
train
https://github.com/SahaginOrg/sahagin-java/blob/7ace428adebe3466ceb5826bc9681f8e3d52be68/src/main/java/org/sahagin/runlib/runresultsgen/RunResultsGenerateHookSetter.java#L149-L162
Impetus/Kundera
src/jpa-engine/core/src/main/java/com/impetus/kundera/metadata/processor/TableProcessor.java
TableProcessor.onBuildMetaModelSuperClass
private <X, T> void onBuildMetaModelSuperClass(Class<? super X> clazz, MetaModelBuilder<X, T> metaModelBuilder) { """ Populate metadata. @param <X> the generic type @param <T> the generic type @param metaModelBuilder the metaModelBuilder """ if (clazz != null && clazz.isAnnotationPresent(javax....
java
private <X, T> void onBuildMetaModelSuperClass(Class<? super X> clazz, MetaModelBuilder<X, T> metaModelBuilder) { if (clazz != null && clazz.isAnnotationPresent(javax.persistence.Entity.class)) { while (clazz != null && clazz.isAnnotationPresent(javax.persistence.Entity.class)) ...
[ "private", "<", "X", ",", "T", ">", "void", "onBuildMetaModelSuperClass", "(", "Class", "<", "?", "super", "X", ">", "clazz", ",", "MetaModelBuilder", "<", "X", ",", "T", ">", "metaModelBuilder", ")", "{", "if", "(", "clazz", "!=", "null", "&&", "clazz...
Populate metadata. @param <X> the generic type @param <T> the generic type @param metaModelBuilder the metaModelBuilder
[ "Populate", "metadata", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/jpa-engine/core/src/main/java/com/impetus/kundera/metadata/processor/TableProcessor.java#L193-L213
camunda/camunda-spin
core/src/main/java/org/camunda/spin/Spin.java
Spin.S
public static <T extends Spin<?>> T S(Object input, DataFormat<T> format) { """ Creates a spin wrapper for a data input of a given data format. @param input the input to wrap @param format the data format of the input @return the spin wrapper for the input @throws IllegalArgumentException in case an argume...
java
public static <T extends Spin<?>> T S(Object input, DataFormat<T> format) { return SpinFactory.INSTANCE.createSpin(input, format); }
[ "public", "static", "<", "T", "extends", "Spin", "<", "?", ">", ">", "T", "S", "(", "Object", "input", ",", "DataFormat", "<", "T", ">", "format", ")", "{", "return", "SpinFactory", ".", "INSTANCE", ".", "createSpin", "(", "input", ",", "format", ")"...
Creates a spin wrapper for a data input of a given data format. @param input the input to wrap @param format the data format of the input @return the spin wrapper for the input @throws IllegalArgumentException in case an argument of illegal type is provided (such as 'null')
[ "Creates", "a", "spin", "wrapper", "for", "a", "data", "input", "of", "a", "given", "data", "format", "." ]
train
https://github.com/camunda/camunda-spin/blob/cfe65161eb97fd5023a945cb97c47fbfe69e9fdd/core/src/main/java/org/camunda/spin/Spin.java#L41-L43
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.license_virtuozzo_new_duration_GET
public OvhOrder license_virtuozzo_new_duration_GET(String duration, OvhOrderableVirtuozzoContainerNumberEnum containerNumber, String ip, OvhLicenseTypeEnum serviceType, OvhOrderableVirtuozzoVersionEnum version) throws IOException { """ Get prices and contracts information REST: GET /order/license/virtuozzo/new/...
java
public OvhOrder license_virtuozzo_new_duration_GET(String duration, OvhOrderableVirtuozzoContainerNumberEnum containerNumber, String ip, OvhLicenseTypeEnum serviceType, OvhOrderableVirtuozzoVersionEnum version) throws IOException { String qPath = "/order/license/virtuozzo/new/{duration}"; StringBuilder sb = path(qP...
[ "public", "OvhOrder", "license_virtuozzo_new_duration_GET", "(", "String", "duration", ",", "OvhOrderableVirtuozzoContainerNumberEnum", "containerNumber", ",", "String", "ip", ",", "OvhLicenseTypeEnum", "serviceType", ",", "OvhOrderableVirtuozzoVersionEnum", "version", ")", "th...
Get prices and contracts information REST: GET /order/license/virtuozzo/new/{duration} @param version [required] This license version @param ip [required] Ip on which this license would be installed @param containerNumber [required] How much container is this license able to manage ... @param serviceType [required] # ...
[ "Get", "prices", "and", "contracts", "information" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L1117-L1126
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.mwdumper/src/main/java/de/tudarmstadt/ukp/wikipedia/mwdumper/importer/XmlWriter.java
XmlWriter.textElement
public void textElement(String element, String text) throws IOException { """ Write an element with a text node included, such as &lt;el/&gt;foo&lt;el/&gt;, on a standalone line. If the text is empty, an empty element will be output as &lt;el/&gt;. Takes an optional list of tuples with attribute names and value...
java
public void textElement(String element, String text) throws IOException { textElement(element, text, null); }
[ "public", "void", "textElement", "(", "String", "element", ",", "String", "text", ")", "throws", "IOException", "{", "textElement", "(", "element", ",", "text", ",", "null", ")", ";", "}" ]
Write an element with a text node included, such as &lt;el/&gt;foo&lt;el/&gt;, on a standalone line. If the text is empty, an empty element will be output as &lt;el/&gt;. Takes an optional list of tuples with attribute names and values. @throws IOException
[ "Write", "an", "element", "with", "a", "text", "node", "included", "such", "as", "&lt", ";", "el", "/", "&gt", ";", "foo&lt", ";", "el", "/", "&gt", ";", "on", "a", "standalone", "line", ".", "If", "the", "text", "is", "empty", "an", "empty", "elem...
train
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.mwdumper/src/main/java/de/tudarmstadt/ukp/wikipedia/mwdumper/importer/XmlWriter.java#L121-L123
apereo/cas
support/cas-server-support-saml-idp-metadata/src/main/java/org/apereo/cas/support/saml/services/idp/metadata/cache/resolver/BaseSamlRegisteredServiceMetadataResolver.java
BaseSamlRegisteredServiceMetadataResolver.buildMetadataResolverFrom
protected AbstractMetadataResolver buildMetadataResolverFrom(final SamlRegisteredService service, final SamlMetadataDocument metadataDocument) { """ Build metadata resolver from document. @param service the service @param metadataDocumen...
java
protected AbstractMetadataResolver buildMetadataResolverFrom(final SamlRegisteredService service, final SamlMetadataDocument metadataDocument) { try { val desc = StringUtils.defaultString(service.getDescription(), service.getName()); ...
[ "protected", "AbstractMetadataResolver", "buildMetadataResolverFrom", "(", "final", "SamlRegisteredService", "service", ",", "final", "SamlMetadataDocument", "metadataDocument", ")", "{", "try", "{", "val", "desc", "=", "StringUtils", ".", "defaultString", "(", "service",...
Build metadata resolver from document. @param service the service @param metadataDocument the metadata document @return the metadata resolver
[ "Build", "metadata", "resolver", "from", "document", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-saml-idp-metadata/src/main/java/org/apereo/cas/support/saml/services/idp/metadata/cache/resolver/BaseSamlRegisteredServiceMetadataResolver.java#L99-L117