repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
18
201
func_name
stringlengths
4
126
whole_func_string
stringlengths
75
3.57k
language
stringclasses
1 value
func_code_string
stringlengths
75
3.57k
func_code_tokens
listlengths
21
599
func_documentation_string
stringlengths
61
1.95k
func_documentation_tokens
listlengths
1
478
split_name
stringclasses
1 value
func_code_url
stringlengths
111
308
alkacon/opencms-core
src-gwt/org/opencms/acacia/client/CmsUndoRedoHandler.java
CmsUndoRedoHandler.addChange
public void addChange(String valuePath, String attributeName, int valueIndex, ChangeType changeType) { if (ChangeType.value.equals(changeType)) { if (m_changeTimer != null) { if (!m_changeTimer.matches(valuePath, attributeName, valueIndex)) { // only in case the ...
java
public void addChange(String valuePath, String attributeName, int valueIndex, ChangeType changeType) { if (ChangeType.value.equals(changeType)) { if (m_changeTimer != null) { if (!m_changeTimer.matches(valuePath, attributeName, valueIndex)) { // only in case the ...
[ "public", "void", "addChange", "(", "String", "valuePath", ",", "String", "attributeName", ",", "int", "valueIndex", ",", "ChangeType", "changeType", ")", "{", "if", "(", "ChangeType", ".", "value", ".", "equals", "(", "changeType", ")", ")", "{", "if", "(...
Adds a change to the undo stack.<p> @param valuePath the entity value path @param attributeName the attribute name @param valueIndex the value index @param changeType the change type
[ "Adds", "a", "change", "to", "the", "undo", "stack", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/CmsUndoRedoHandler.java#L317-L340
actorapp/actor-platform
actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java
Messenger.sendDocument
@ObjectiveCName("sendDocumentWithPeer:withName:withMime:withDescriptor:") public void sendDocument(Peer peer, String fileName, String mimeType, String descriptor) { sendDocument(peer, fileName, mimeType, null, descriptor); }
java
@ObjectiveCName("sendDocumentWithPeer:withName:withMime:withDescriptor:") public void sendDocument(Peer peer, String fileName, String mimeType, String descriptor) { sendDocument(peer, fileName, mimeType, null, descriptor); }
[ "@", "ObjectiveCName", "(", "\"sendDocumentWithPeer:withName:withMime:withDescriptor:\"", ")", "public", "void", "sendDocument", "(", "Peer", "peer", ",", "String", "fileName", ",", "String", "mimeType", ",", "String", "descriptor", ")", "{", "sendDocument", "(", "pee...
Send document without preview @param peer destination peer @param fileName File name (without path) @param mimeType mimetype of document @param descriptor File Descriptor
[ "Send", "document", "without", "preview" ]
train
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java#L943-L946
Whiley/WhileyCompiler
src/main/java/wyc/io/WhileyFileParser.java
WhileyFileParser.parseFunctionOrMethodDeclaration
private Decl.FunctionOrMethod parseFunctionOrMethodDeclaration(Tuple<Modifier> modifiers, boolean isFunction) { int start = index; // Create appropriate enclosing scope EnclosingScope scope = new EnclosingScope(); // if (isFunction) { match(Function); } else { match(Method); } Identifier name =...
java
private Decl.FunctionOrMethod parseFunctionOrMethodDeclaration(Tuple<Modifier> modifiers, boolean isFunction) { int start = index; // Create appropriate enclosing scope EnclosingScope scope = new EnclosingScope(); // if (isFunction) { match(Function); } else { match(Method); } Identifier name =...
[ "private", "Decl", ".", "FunctionOrMethod", "parseFunctionOrMethodDeclaration", "(", "Tuple", "<", "Modifier", ">", "modifiers", ",", "boolean", "isFunction", ")", "{", "int", "start", "=", "index", ";", "// Create appropriate enclosing scope", "EnclosingScope", "scope"...
Parse a <i>function declaration</i> or <i>method declaration</i>, which have the form: <pre> FunctionDeclaration ::= "function" TypePattern "->" TypePattern (FunctionMethodClause)* ':' NewLine Block MethodDeclaration ::= "method" TypePattern "->" TypePattern (FunctionMethodClause)* ':' NewLine Block FunctionMethodCl...
[ "Parse", "a", "<i", ">", "function", "declaration<", "/", "i", ">", "or", "<i", ">", "method", "declaration<", "/", "i", ">", "which", "have", "the", "form", ":" ]
train
https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyc/io/WhileyFileParser.java#L292-L349
knightliao/disconf
disconf-client/src/main/java/com/baidu/disconf/client/support/utils/StringUtil.java
StringUtil.bytesToString
public static String bytesToString(byte[] bytes, boolean noCase) { char[] digits = noCase ? DIGITS_NOCASE : DIGITS; int digitsLength = digits.length; if (ArrayUtils.isEmpty(bytes)) { return String.valueOf(digits[0]); } StringBuilder strValue = new StringBuilder(); ...
java
public static String bytesToString(byte[] bytes, boolean noCase) { char[] digits = noCase ? DIGITS_NOCASE : DIGITS; int digitsLength = digits.length; if (ArrayUtils.isEmpty(bytes)) { return String.valueOf(digits[0]); } StringBuilder strValue = new StringBuilder(); ...
[ "public", "static", "String", "bytesToString", "(", "byte", "[", "]", "bytes", ",", "boolean", "noCase", ")", "{", "char", "[", "]", "digits", "=", "noCase", "?", "DIGITS_NOCASE", ":", "DIGITS", ";", "int", "digitsLength", "=", "digits", ".", "length", "...
将一个byte数组转换成62进制的字符串。 @param bytes 二进制数组 @param noCase 区分大小写 @return 62进制的字符串
[ "将一个byte数组转换成62进制的字符串。" ]
train
https://github.com/knightliao/disconf/blob/d413cbce9334fe38a5a24982ce4db3a6ed8e98ea/disconf-client/src/main/java/com/baidu/disconf/client/support/utils/StringUtil.java#L487-L516
inferred/FreeBuilder
src/main/java/org/inferred/freebuilder/processor/source/FunctionalType.java
FunctionalType.unboxedUnaryOperator
public static FunctionalType unboxedUnaryOperator(TypeMirror type, Types types) { switch (type.getKind()) { case INT: case LONG: case DOUBLE: return primitiveUnaryOperator((PrimitiveType) type); case BOOLEAN: case BYTE: case CHAR: case SHORT: case FLOAT: ...
java
public static FunctionalType unboxedUnaryOperator(TypeMirror type, Types types) { switch (type.getKind()) { case INT: case LONG: case DOUBLE: return primitiveUnaryOperator((PrimitiveType) type); case BOOLEAN: case BYTE: case CHAR: case SHORT: case FLOAT: ...
[ "public", "static", "FunctionalType", "unboxedUnaryOperator", "(", "TypeMirror", "type", ",", "Types", "types", ")", "{", "switch", "(", "type", ".", "getKind", "(", ")", ")", "{", "case", "INT", ":", "case", "LONG", ":", "case", "DOUBLE", ":", "return", ...
Returns a unary operator that will accept {@code type}, without autoboxing if possible.
[ "Returns", "a", "unary", "operator", "that", "will", "accept", "{" ]
train
https://github.com/inferred/FreeBuilder/blob/d5a222f90648aece135da4b971c55a60afe8649c/src/main/java/org/inferred/freebuilder/processor/source/FunctionalType.java#L109-L126
OpenLiberty/open-liberty
dev/com.ibm.ws.product.utility/src/com/ibm/ws/product/utility/extension/IFixUtils.java
IFixUtils.equalsHashes
private static boolean equalsHashes(File fileToHash, String hashToCompare) throws IOException { boolean result = false; // Now calculate the new hash and compare the 2. If they are NOT the same the ifix needs to be re-applied. String fileHash = MD5Utils.getFileMD5String(fileToHash); if ...
java
private static boolean equalsHashes(File fileToHash, String hashToCompare) throws IOException { boolean result = false; // Now calculate the new hash and compare the 2. If they are NOT the same the ifix needs to be re-applied. String fileHash = MD5Utils.getFileMD5String(fileToHash); if ...
[ "private", "static", "boolean", "equalsHashes", "(", "File", "fileToHash", ",", "String", "hashToCompare", ")", "throws", "IOException", "{", "boolean", "result", "=", "false", ";", "// Now calculate the new hash and compare the 2. If they are NOT the same the ifix needs to be ...
This method calculates a hash of the required file and compares it against the supplied hash. It then returns true if both hashes are equals. @param fileToHash - The file to calculate the hash for. @param hashToCompare - The hash to compare. @return - A boolean indicating whether the hashes are equal.
[ "This", "method", "calculates", "a", "hash", "of", "the", "required", "file", "and", "compares", "it", "against", "the", "supplied", "hash", ".", "It", "then", "returns", "true", "if", "both", "hashes", "are", "equals", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.product.utility/src/com/ibm/ws/product/utility/extension/IFixUtils.java#L305-L314
RobotiumTech/robotium
robotium-solo/src/main/java/com/robotium/solo/WebElementCreator.java
WebElementCreator.createWebElementAndSetLocation
private WebElement createWebElementAndSetLocation(String information, WebView webView){ String[] data = information.split(";,"); String[] elements = null; int x = 0; int y = 0; int width = 0; int height = 0; Hashtable<String, String> attributes = new Hashtable<String, String>(); try{ x = Math.round(F...
java
private WebElement createWebElementAndSetLocation(String information, WebView webView){ String[] data = information.split(";,"); String[] elements = null; int x = 0; int y = 0; int width = 0; int height = 0; Hashtable<String, String> attributes = new Hashtable<String, String>(); try{ x = Math.round(F...
[ "private", "WebElement", "createWebElementAndSetLocation", "(", "String", "information", ",", "WebView", "webView", ")", "{", "String", "[", "]", "data", "=", "information", ".", "split", "(", "\";,\"", ")", ";", "String", "[", "]", "elements", "=", "null", ...
Creates a {@code WebView} object @param information the data of the web element @param webView the web view the text is shown in @return a {@code WebElement} object with a given text and location
[ "Creates", "a", "{", "@code", "WebView", "}", "object" ]
train
https://github.com/RobotiumTech/robotium/blob/75e567c38f26a6a87dc8bef90b3886a20e28d291/robotium-solo/src/main/java/com/robotium/solo/WebElementCreator.java#L124-L159
puniverse/galaxy
src/main/java/co/paralleluniverse/galaxy/Grid.java
Grid.getInstance
public static Grid getInstance(String configFile, String propertiesFile) throws InterruptedException { return getInstance(configFile == null ? null : new FileSystemResource(configFile), propertiesFile); }
java
public static Grid getInstance(String configFile, String propertiesFile) throws InterruptedException { return getInstance(configFile == null ? null : new FileSystemResource(configFile), propertiesFile); }
[ "public", "static", "Grid", "getInstance", "(", "String", "configFile", ",", "String", "propertiesFile", ")", "throws", "InterruptedException", "{", "return", "getInstance", "(", "configFile", "==", "null", "?", "null", ":", "new", "FileSystemResource", "(", "conf...
Retrieves the grid instance, as defined in the given configuration file. @param configFile The name of the configuration file containing the grid definition. @param propertiesFile The name of the properties file containing the grid's properties. You may, of course use Spring's {@code <context:property-placeholder loca...
[ "Retrieves", "the", "grid", "instance", "as", "defined", "in", "the", "given", "configuration", "file", "." ]
train
https://github.com/puniverse/galaxy/blob/1d077532c4a5bcd6c52ff670770c31e98420ff63/src/main/java/co/paralleluniverse/galaxy/Grid.java#L59-L61
banq/jdonframework
src/main/java/com/jdon/util/jdom/XMLProperties.java
XMLProperties.setProperty
public void setProperty(String name, String value) { // Set cache correctly with prop name and value. propertyCache.put(name, value); String[] propName = parsePropertyName(name); // Search for this property by traversing down the XML heirarchy. Element element = doc.getRootElement(); for (int i = 0;...
java
public void setProperty(String name, String value) { // Set cache correctly with prop name and value. propertyCache.put(name, value); String[] propName = parsePropertyName(name); // Search for this property by traversing down the XML heirarchy. Element element = doc.getRootElement(); for (int i = 0;...
[ "public", "void", "setProperty", "(", "String", "name", ",", "String", "value", ")", "{", "// Set cache correctly with prop name and value.\r", "propertyCache", ".", "put", "(", "name", ",", "value", ")", ";", "String", "[", "]", "propName", "=", "parsePropertyNam...
Sets the value of the specified property. If the property doesn't currently exist, it will be automatically created. @param name the name of the property to set. @param value the new value for the property.
[ "Sets", "the", "value", "of", "the", "specified", "property", ".", "If", "the", "property", "doesn", "t", "currently", "exist", "it", "will", "be", "automatically", "created", "." ]
train
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/jdom/XMLProperties.java#L188-L206
apptentive/apptentive-android
apptentive/src/main/java/com/apptentive/android/sdk/Apptentive.java
Apptentive.queryCanShowInteraction
public static synchronized void queryCanShowInteraction(final String event, BooleanCallback callback) { dispatchConversationTask(new ConversationDispatchTask(callback, DispatchQueue.mainQueue()) { @Override protected boolean execute(Conversation conversation) { return canShowLocalAppInteraction(conversation...
java
public static synchronized void queryCanShowInteraction(final String event, BooleanCallback callback) { dispatchConversationTask(new ConversationDispatchTask(callback, DispatchQueue.mainQueue()) { @Override protected boolean execute(Conversation conversation) { return canShowLocalAppInteraction(conversation...
[ "public", "static", "synchronized", "void", "queryCanShowInteraction", "(", "final", "String", "event", ",", "BooleanCallback", "callback", ")", "{", "dispatchConversationTask", "(", "new", "ConversationDispatchTask", "(", "callback", ",", "DispatchQueue", ".", "mainQue...
This method can be used to determine if a call to one of the <strong><code>engage()</code></strong> methods such as {@link #engage(Context, String)} using the same event name will result in the display of an Interaction. This is useful if you need to know whether an Interaction will be displayed before you create a UI...
[ "This", "method", "can", "be", "used", "to", "determine", "if", "a", "call", "to", "one", "of", "the", "<strong", ">", "<code", ">", "engage", "()", "<", "/", "code", ">", "<", "/", "strong", ">", "methods", "such", "as", "{", "@link", "#engage", "...
train
https://github.com/apptentive/apptentive-android/blob/887c08d7bd5ae6488a90366dfb58f58938861a93/apptentive/src/main/java/com/apptentive/android/sdk/Apptentive.java#L1378-L1385
HeidelTime/heideltime
src/jflexcrf/Feature.java
Feature.eFeature1Init
public void eFeature1Init(int y, int yp, Map fmap) { eFeature1Init(y, yp); strId2IdxAdd(fmap); }
java
public void eFeature1Init(int y, int yp, Map fmap) { eFeature1Init(y, yp); strId2IdxAdd(fmap); }
[ "public", "void", "eFeature1Init", "(", "int", "y", ",", "int", "yp", ",", "Map", "fmap", ")", "{", "eFeature1Init", "(", "y", ",", "yp", ")", ";", "strId2IdxAdd", "(", "fmap", ")", ";", "}" ]
E feature1 init. @param y the y @param yp the yp @param fmap the fmap
[ "E", "feature1", "init", "." ]
train
https://github.com/HeidelTime/heideltime/blob/4ef5002eb5ecfeb818086ff7e394e792ee360335/src/jflexcrf/Feature.java#L96-L99
alkacon/opencms-core
src/org/opencms/ade/publish/CmsDirectPublishProject.java
CmsDirectPublishProject.shouldIncludeContents
protected boolean shouldIncludeContents(Map<String, String> params) { String includeContentsStr = params.get(CmsPublishOptions.PARAM_INCLUDE_CONTENTS); boolean includeContents = false; try { includeContents = Boolean.parseBoolean(includeContentsStr); } catch (Exception e) { ...
java
protected boolean shouldIncludeContents(Map<String, String> params) { String includeContentsStr = params.get(CmsPublishOptions.PARAM_INCLUDE_CONTENTS); boolean includeContents = false; try { includeContents = Boolean.parseBoolean(includeContentsStr); } catch (Exception e) { ...
[ "protected", "boolean", "shouldIncludeContents", "(", "Map", "<", "String", ",", "String", ">", "params", ")", "{", "String", "includeContentsStr", "=", "params", ".", "get", "(", "CmsPublishOptions", ".", "PARAM_INCLUDE_CONTENTS", ")", ";", "boolean", "includeCon...
Returns true if the folder contents should be included.<p> @param params the publish parameters @return true if the folder contents should be included
[ "Returns", "true", "if", "the", "folder", "contents", "should", "be", "included", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/publish/CmsDirectPublishProject.java#L173-L183
synchronoss/cpo-api
cpo-cassandra/src/main/java/org/synchronoss/cpo/cassandra/CassandraCpoAdapter.java
CassandraCpoAdapter.getWriteSession
protected Session getWriteSession() throws CpoException { Session session; try { session = getWriteDataSource().getSession(); } catch (Throwable t) { String msg = "getWriteConnection(): failed"; logger.error(msg, t); throw new CpoException(msg, t); } return session; }
java
protected Session getWriteSession() throws CpoException { Session session; try { session = getWriteDataSource().getSession(); } catch (Throwable t) { String msg = "getWriteConnection(): failed"; logger.error(msg, t); throw new CpoException(msg, t); } return session; }
[ "protected", "Session", "getWriteSession", "(", ")", "throws", "CpoException", "{", "Session", "session", ";", "try", "{", "session", "=", "getWriteDataSource", "(", ")", ".", "getSession", "(", ")", ";", "}", "catch", "(", "Throwable", "t", ")", "{", "Str...
getWriteSession returns the write session for Cassandra @return A Session object for writing @throws CpoException
[ "getWriteSession", "returns", "the", "write", "session", "for", "Cassandra" ]
train
https://github.com/synchronoss/cpo-api/blob/dc745aca3b3206abf80b85d9689b0132f5baa694/cpo-cassandra/src/main/java/org/synchronoss/cpo/cassandra/CassandraCpoAdapter.java#L1954-L1966
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/AbstractWComponent.java
AbstractWComponent.switchFlag
private static int switchFlag(final int flags, final int mask, final boolean value) { int newFlags = value ? flags | mask : flags & ~mask; return newFlags; }
java
private static int switchFlag(final int flags, final int mask, final boolean value) { int newFlags = value ? flags | mask : flags & ~mask; return newFlags; }
[ "private", "static", "int", "switchFlag", "(", "final", "int", "flags", ",", "final", "int", "mask", ",", "final", "boolean", "value", ")", "{", "int", "newFlags", "=", "value", "?", "flags", "|", "mask", ":", "flags", "&", "~", "mask", ";", "return", ...
A utility method to set or clear one or more bits in the given set of flags. @param flags the current set of flags. @param mask the bit mask for the flags to set/clear. @param value true to set the flag(s), false to clear. @return the new set of flags.
[ "A", "utility", "method", "to", "set", "or", "clear", "one", "or", "more", "bits", "in", "the", "given", "set", "of", "flags", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/AbstractWComponent.java#L993-L996
alkacon/opencms-core
src/org/opencms/ade/configuration/CmsConfigurationReader.java
CmsConfigurationReader.parseProperty
public static CmsPropertyConfig parseProperty(CmsObject cms, I_CmsXmlContentLocation field) { String name = getString(cms, field.getSubValue(N_PROPERTY_NAME)); String includeName = getString(cms, field.getSubValue(N_INCLUDE_NAME)); String widget = getString(cms, field.getSubValue(N_WIDGET)); ...
java
public static CmsPropertyConfig parseProperty(CmsObject cms, I_CmsXmlContentLocation field) { String name = getString(cms, field.getSubValue(N_PROPERTY_NAME)); String includeName = getString(cms, field.getSubValue(N_INCLUDE_NAME)); String widget = getString(cms, field.getSubValue(N_WIDGET)); ...
[ "public", "static", "CmsPropertyConfig", "parseProperty", "(", "CmsObject", "cms", ",", "I_CmsXmlContentLocation", "field", ")", "{", "String", "name", "=", "getString", "(", "cms", ",", "field", ".", "getSubValue", "(", "N_PROPERTY_NAME", ")", ")", ";", "String...
Helper method to parse a property.<p> @param cms the CMS context to use @param field the location of the parent value @return the parsed property configuration
[ "Helper", "method", "to", "parse", "a", "property", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/configuration/CmsConfigurationReader.java#L297-L353
truward/metrics4j
metrics4j-json-log/src/main/java/com/truward/metrics/json/internal/appender/RollingJacksonMapAppender.java
RollingJacksonMapAppender.rollLog
private void rollLog() { final File file = currentFile; if (file == null) { throw new IllegalStateException("currentFile is null"); // shouldn't happen } final OutputStream stream = currentStream; if (stream == null) { throw new IllegalStateException("currentStream is null"); // shouldn...
java
private void rollLog() { final File file = currentFile; if (file == null) { throw new IllegalStateException("currentFile is null"); // shouldn't happen } final OutputStream stream = currentStream; if (stream == null) { throw new IllegalStateException("currentStream is null"); // shouldn...
[ "private", "void", "rollLog", "(", ")", "{", "final", "File", "file", "=", "currentFile", ";", "if", "(", "file", "==", "null", ")", "{", "throw", "new", "IllegalStateException", "(", "\"currentFile is null\"", ")", ";", "// shouldn't happen", "}", "final", ...
Writes older log into the file and updates current output stream
[ "Writes", "older", "log", "into", "the", "file", "and", "updates", "current", "output", "stream" ]
train
https://github.com/truward/metrics4j/blob/6e81c00ce24e008c029cce875d44f667e2bc978c/metrics4j-json-log/src/main/java/com/truward/metrics/json/internal/appender/RollingJacksonMapAppender.java#L142-L184
jbossws/jbossws-common
src/main/java/org/jboss/ws/common/configuration/ConfigHelper.java
ConfigHelper.setupConfigHandlers
@SuppressWarnings("rawtypes") public void setupConfigHandlers(Binding binding, CommonConfig config) { if (config != null) { //start with the use handlers only to remove the previously set configuration List<Handler> userHandlers = getNonConfigHandlers(binding.getHandlerChain()); L...
java
@SuppressWarnings("rawtypes") public void setupConfigHandlers(Binding binding, CommonConfig config) { if (config != null) { //start with the use handlers only to remove the previously set configuration List<Handler> userHandlers = getNonConfigHandlers(binding.getHandlerChain()); L...
[ "@", "SuppressWarnings", "(", "\"rawtypes\"", ")", "public", "void", "setupConfigHandlers", "(", "Binding", "binding", ",", "CommonConfig", "config", ")", "{", "if", "(", "config", "!=", "null", ")", "{", "//start with the use handlers only to remove the previously set ...
Setups a given Binding instance using a specified CommonConfig @param binding the Binding instance to setup @param config the CommonConfig with the input configuration
[ "Setups", "a", "given", "Binding", "instance", "using", "a", "specified", "CommonConfig" ]
train
https://github.com/jbossws/jbossws-common/blob/fcff8a3ef9bfe046d6fa8c855a3fe4f62841add7/src/main/java/org/jboss/ws/common/configuration/ConfigHelper.java#L176-L187
apache/groovy
src/main/java/org/apache/groovy/ast/tools/ClassNodeUtils.java
ClassNodeUtils.samePackageName
public static boolean samePackageName(ClassNode first, ClassNode second) { return Objects.equals(first.getPackageName(), second.getPackageName()); }
java
public static boolean samePackageName(ClassNode first, ClassNode second) { return Objects.equals(first.getPackageName(), second.getPackageName()); }
[ "public", "static", "boolean", "samePackageName", "(", "ClassNode", "first", ",", "ClassNode", "second", ")", "{", "return", "Objects", ".", "equals", "(", "first", ".", "getPackageName", "(", ")", ",", "second", ".", "getPackageName", "(", ")", ")", ";", ...
Determine if the given ClassNode values have the same package name. @param first a ClassNode @param second a ClassNode @return true if both given nodes have the same package name @throws NullPointerException if either of the given nodes are null
[ "Determine", "if", "the", "given", "ClassNode", "values", "have", "the", "same", "package", "name", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/apache/groovy/ast/tools/ClassNodeUtils.java#L385-L387
headius/invokebinder
src/main/java/com/headius/invokebinder/SmartBinder.java
SmartBinder.invokeVirtualQuiet
public SmartHandle invokeVirtualQuiet(Lookup lookup, String name) { return new SmartHandle(start, binder.invokeVirtualQuiet(lookup, name)); }
java
public SmartHandle invokeVirtualQuiet(Lookup lookup, String name) { return new SmartHandle(start, binder.invokeVirtualQuiet(lookup, name)); }
[ "public", "SmartHandle", "invokeVirtualQuiet", "(", "Lookup", "lookup", ",", "String", "name", ")", "{", "return", "new", "SmartHandle", "(", "start", ",", "binder", ".", "invokeVirtualQuiet", "(", "lookup", ",", "name", ")", ")", ";", "}" ]
Terminate this binder by looking up the named virtual method on the first argument's type. Perform the actual method lookup using the given Lookup object. If the lookup fails, a RuntimeException will be raised, containing the actual reason. This method is for convenience in (for example) field declarations, where check...
[ "Terminate", "this", "binder", "by", "looking", "up", "the", "named", "virtual", "method", "on", "the", "first", "argument", "s", "type", ".", "Perform", "the", "actual", "method", "lookup", "using", "the", "given", "Lookup", "object", ".", "If", "the", "l...
train
https://github.com/headius/invokebinder/blob/ce6bfeb8e33265480daa7b797989dd915d51238d/src/main/java/com/headius/invokebinder/SmartBinder.java#L1001-L1003
Azure/azure-sdk-for-java
network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/RouteFiltersInner.java
RouteFiltersInner.createOrUpdate
public RouteFilterInner createOrUpdate(String resourceGroupName, String routeFilterName, RouteFilterInner routeFilterParameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, routeFilterName, routeFilterParameters).toBlocking().last().body(); }
java
public RouteFilterInner createOrUpdate(String resourceGroupName, String routeFilterName, RouteFilterInner routeFilterParameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, routeFilterName, routeFilterParameters).toBlocking().last().body(); }
[ "public", "RouteFilterInner", "createOrUpdate", "(", "String", "resourceGroupName", ",", "String", "routeFilterName", ",", "RouteFilterInner", "routeFilterParameters", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", "(", "resourceGroupName", ",", "routeFilterName"...
Creates or updates a route filter in a specified resource group. @param resourceGroupName The name of the resource group. @param routeFilterName The name of the route filter. @param routeFilterParameters Parameters supplied to the create or update route filter operation. @throws IllegalArgumentException thrown if para...
[ "Creates", "or", "updates", "a", "route", "filter", "in", "a", "specified", "resource", "group", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/RouteFiltersInner.java#L443-L445
jbundle/jbundle
base/screen/control/servlet/src/main/java/org/jbundle/base/screen/control/servlet/BaseHttpTask.java
BaseHttpTask.getRealPath
public String getRealPath(HttpServletRequest request, String path) { if (m_servlet != null) return m_servlet.getRealPath(request, path); return path; }
java
public String getRealPath(HttpServletRequest request, String path) { if (m_servlet != null) return m_servlet.getRealPath(request, path); return path; }
[ "public", "String", "getRealPath", "(", "HttpServletRequest", "request", ",", "String", "path", ")", "{", "if", "(", "m_servlet", "!=", "null", ")", "return", "m_servlet", ".", "getRealPath", "(", "request", ",", "path", ")", ";", "return", "path", ";", "}...
Get the physical path for this internet path. @param request The request
[ "Get", "the", "physical", "path", "for", "this", "internet", "path", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/control/servlet/src/main/java/org/jbundle/base/screen/control/servlet/BaseHttpTask.java#L901-L906
UrielCh/ovh-java-sdk
ovh-java-sdk-ipLoadbalancing/src/main/java/net/minidev/ovh/api/ApiOvhIpLoadbalancing.java
ApiOvhIpLoadbalancing.serviceName_udp_frontend_POST
public OvhFrontendUdp serviceName_udp_frontend_POST(String serviceName, String[] dedicatedIpfo, Long defaultFarmId, Boolean disabled, String displayName, String port, String zone) throws IOException { String qPath = "/ipLoadbalancing/{serviceName}/udp/frontend"; StringBuilder sb = path(qPath, serviceName); HashMa...
java
public OvhFrontendUdp serviceName_udp_frontend_POST(String serviceName, String[] dedicatedIpfo, Long defaultFarmId, Boolean disabled, String displayName, String port, String zone) throws IOException { String qPath = "/ipLoadbalancing/{serviceName}/udp/frontend"; StringBuilder sb = path(qPath, serviceName); HashMa...
[ "public", "OvhFrontendUdp", "serviceName_udp_frontend_POST", "(", "String", "serviceName", ",", "String", "[", "]", "dedicatedIpfo", ",", "Long", "defaultFarmId", ",", "Boolean", "disabled", ",", "String", "displayName", ",", "String", "port", ",", "String", "zone",...
Add a new UDP frontend on your IP Load Balancing REST: POST /ipLoadbalancing/{serviceName}/udp/frontend @param zone [required] Zone of your frontend. Use "all" for all owned zone. @param dedicatedIpfo [required] Only attach frontend on these ip. No restriction if null @param disabled [required] Disable your frontend. ...
[ "Add", "a", "new", "UDP", "frontend", "on", "your", "IP", "Load", "Balancing" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-ipLoadbalancing/src/main/java/net/minidev/ovh/api/ApiOvhIpLoadbalancing.java#L829-L841
ehcache/ehcache3
impl/src/main/java/org/ehcache/impl/internal/resilience/RobustLoaderWriterResilienceStrategy.java
RobustLoaderWriterResilienceStrategy.removeFailure
@Override public boolean removeFailure(K key, V value, StoreAccessException e) { try { V loadedValue; try { loadedValue = loaderWriter.load(key); } catch (Exception e1) { throw ExceptionFactory.newCacheLoadingException(e1, e); } if (loadedValue == null) { re...
java
@Override public boolean removeFailure(K key, V value, StoreAccessException e) { try { V loadedValue; try { loadedValue = loaderWriter.load(key); } catch (Exception e1) { throw ExceptionFactory.newCacheLoadingException(e1, e); } if (loadedValue == null) { re...
[ "@", "Override", "public", "boolean", "removeFailure", "(", "K", "key", ",", "V", "value", ",", "StoreAccessException", "e", ")", "{", "try", "{", "V", "loadedValue", ";", "try", "{", "loadedValue", "=", "loaderWriter", ".", "load", "(", "key", ")", ";",...
Delete the key from the loader-writer if it is found with a matching value. Note that the load and write pair is not atomic. This atomicity, if needed, should be handled by the something else. @param key the key being removed @param value the value being removed @param e the triggered failure @return if the value was...
[ "Delete", "the", "key", "from", "the", "loader", "-", "writer", "if", "it", "is", "found", "with", "a", "matching", "value", ".", "Note", "that", "the", "load", "and", "write", "pair", "is", "not", "atomic", ".", "This", "atomicity", "if", "needed", "s...
train
https://github.com/ehcache/ehcache3/blob/3cceda57185e522f8d241ddb75146d67ee2af898/impl/src/main/java/org/ehcache/impl/internal/resilience/RobustLoaderWriterResilienceStrategy.java#L165-L192
alkacon/opencms-core
src/org/opencms/db/CmsSecurityManager.java
CmsSecurityManager.checkSystemLocks
protected void checkSystemLocks(CmsDbContext dbc, CmsResource resource) throws CmsException { if (m_lockManager.hasSystemLocks(dbc, resource)) { throw new CmsLockException( Messages.get().container( Messages.ERR_RESOURCE_SYSTEM_LOCKED_1, dbc.r...
java
protected void checkSystemLocks(CmsDbContext dbc, CmsResource resource) throws CmsException { if (m_lockManager.hasSystemLocks(dbc, resource)) { throw new CmsLockException( Messages.get().container( Messages.ERR_RESOURCE_SYSTEM_LOCKED_1, dbc.r...
[ "protected", "void", "checkSystemLocks", "(", "CmsDbContext", "dbc", ",", "CmsResource", "resource", ")", "throws", "CmsException", "{", "if", "(", "m_lockManager", ".", "hasSystemLocks", "(", "dbc", ",", "resource", ")", ")", "{", "throw", "new", "CmsLockExcept...
Checks if the given resource contains a resource that has a system lock.<p> @param dbc the current database context @param resource the resource to check @throws CmsException in case there is a system lock contained in the given resource
[ "Checks", "if", "the", "given", "resource", "contains", "a", "resource", "that", "has", "a", "system", "lock", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsSecurityManager.java#L7123-L7131
geomajas/geomajas-project-hammer-gwt
hammer-gwt/src/main/java/org/geomajas/hammergwt/client/HammerGwt.java
HammerGwt.off
public static void off(HammerTime hammerTime, EventType eventType, NativeHammmerHandler callback) { off(hammerTime, callback, eventType.getText()); }
java
public static void off(HammerTime hammerTime, EventType eventType, NativeHammmerHandler callback) { off(hammerTime, callback, eventType.getText()); }
[ "public", "static", "void", "off", "(", "HammerTime", "hammerTime", ",", "EventType", "eventType", ",", "NativeHammmerHandler", "callback", ")", "{", "off", "(", "hammerTime", ",", "callback", ",", "eventType", ".", "getText", "(", ")", ")", ";", "}" ]
Unregister hammer event. @param hammerTime {@link HammerTime} hammer gwt instance. @param eventType {@link org.geomajas.hammergwt.client.event.EventType} @param callback {@link org.geomajas.hammergwt.client.handler.NativeHammmerHandler} of the event that needs to be unregistered.
[ "Unregister", "hammer", "event", "." ]
train
https://github.com/geomajas/geomajas-project-hammer-gwt/blob/bc764171bed55e5a9eced72f0078ec22b8105b62/hammer-gwt/src/main/java/org/geomajas/hammergwt/client/HammerGwt.java#L58-L60
landawn/AbacusUtil
src/com/landawn/abacus/util/N.java
N.mapToLong
public static <T, E extends Exception> LongList mapToLong(final T[] a, final int fromIndex, final int toIndex, final Try.ToLongFunction<? super T, E> func) throws E { checkFromToIndex(fromIndex, toIndex, len(a)); N.checkArgNotNull(func); if (N.isNullOrEmpty(a)) { r...
java
public static <T, E extends Exception> LongList mapToLong(final T[] a, final int fromIndex, final int toIndex, final Try.ToLongFunction<? super T, E> func) throws E { checkFromToIndex(fromIndex, toIndex, len(a)); N.checkArgNotNull(func); if (N.isNullOrEmpty(a)) { r...
[ "public", "static", "<", "T", ",", "E", "extends", "Exception", ">", "LongList", "mapToLong", "(", "final", "T", "[", "]", "a", ",", "final", "int", "fromIndex", ",", "final", "int", "toIndex", ",", "final", "Try", ".", "ToLongFunction", "<", "?", "sup...
Mostly it's designed for one-step operation to complete the operation in one step. <code>java.util.stream.Stream</code> is preferred for multiple phases operation. @param a @param fromIndex @param toIndex @param func @return
[ "Mostly", "it", "s", "designed", "for", "one", "-", "step", "operation", "to", "complete", "the", "operation", "in", "one", "step", ".", "<code", ">", "java", ".", "util", ".", "stream", ".", "Stream<", "/", "code", ">", "is", "preferred", "for", "mult...
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/N.java#L14977-L14993
spotbugs/spotbugs
eclipsePlugin/src/de/tobject/findbugs/builder/ResourceUtils.java
ResourceUtils.mapResource
private static void mapResource(WorkItem resource, Map<IProject, List<WorkItem>> projectsMap, boolean checkJavaProject) { IProject project = resource.getProject(); if (checkJavaProject && !ProjectUtilities.isJavaProject(project)) { // non java projects: can happen only for changesets ...
java
private static void mapResource(WorkItem resource, Map<IProject, List<WorkItem>> projectsMap, boolean checkJavaProject) { IProject project = resource.getProject(); if (checkJavaProject && !ProjectUtilities.isJavaProject(project)) { // non java projects: can happen only for changesets ...
[ "private", "static", "void", "mapResource", "(", "WorkItem", "resource", ",", "Map", "<", "IProject", ",", "List", "<", "WorkItem", ">", ">", "projectsMap", ",", "boolean", "checkJavaProject", ")", "{", "IProject", "project", "=", "resource", ".", "getProject"...
Maps the resource into its project @param resource @param projectsMap
[ "Maps", "the", "resource", "into", "its", "project" ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/eclipsePlugin/src/de/tobject/findbugs/builder/ResourceUtils.java#L257-L274
rundeck/rundeck
rundeck-storage/rundeck-storage-data/src/main/java/org/rundeck/storage/data/DataUtil.java
DataUtil.lazyStream
public static HasInputStream lazyStream(final InputStream data) { return new HasInputStream() { @Override public InputStream getInputStream() throws IOException { return data; } @Override public long writeContent(OutputStream outputStr...
java
public static HasInputStream lazyStream(final InputStream data) { return new HasInputStream() { @Override public InputStream getInputStream() throws IOException { return data; } @Override public long writeContent(OutputStream outputStr...
[ "public", "static", "HasInputStream", "lazyStream", "(", "final", "InputStream", "data", ")", "{", "return", "new", "HasInputStream", "(", ")", "{", "@", "Override", "public", "InputStream", "getInputStream", "(", ")", "throws", "IOException", "{", "return", "da...
Lazy mechanism for stream loading @param data file @return lazy stream
[ "Lazy", "mechanism", "for", "stream", "loading" ]
train
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/rundeck-storage/rundeck-storage-data/src/main/java/org/rundeck/storage/data/DataUtil.java#L113-L125
voldemort/voldemort
src/java/voldemort/tools/admin/AdminToolUtils.java
AdminToolUtils.assertServerInNormalState
public static void assertServerInNormalState(AdminClient adminClient, Integer nodeId) { assertServerInNormalState(adminClient, Lists.newArrayList(new Integer[]{nodeId})); }
java
public static void assertServerInNormalState(AdminClient adminClient, Integer nodeId) { assertServerInNormalState(adminClient, Lists.newArrayList(new Integer[]{nodeId})); }
[ "public", "static", "void", "assertServerInNormalState", "(", "AdminClient", "adminClient", ",", "Integer", "nodeId", ")", "{", "assertServerInNormalState", "(", "adminClient", ",", "Lists", ".", "newArrayList", "(", "new", "Integer", "[", "]", "{", "nodeId", "}",...
Utility function that checks the execution state of the server by checking the state of {@link VoldemortState} <br> This function checks if a node is in normal state ( {@link VoldemortState#NORMAL_SERVER}). @param adminClient An instance of AdminClient points to given cluster @param nodeId Node id to be checked @thro...
[ "Utility", "function", "that", "checks", "the", "execution", "state", "of", "the", "server", "by", "checking", "the", "state", "of", "{", "@link", "VoldemortState", "}", "<br", ">" ]
train
https://github.com/voldemort/voldemort/blob/a7dbdea58032021361680faacf2782cf981c5332/src/java/voldemort/tools/admin/AdminToolUtils.java#L354-L356
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/symmetry/axis/RotationAxisAligner.java
RotationAxisAligner.calcPrincipalRotationVector
private void calcPrincipalRotationVector() { Rotation rotation = rotationGroup.getRotation(0); // the rotation around the principal axis is the first rotation AxisAngle4d axisAngle = rotation.getAxisAngle(); principalRotationVector = new Vector3d(axisAngle.x, axisAngle.y, axisAngle.z); }
java
private void calcPrincipalRotationVector() { Rotation rotation = rotationGroup.getRotation(0); // the rotation around the principal axis is the first rotation AxisAngle4d axisAngle = rotation.getAxisAngle(); principalRotationVector = new Vector3d(axisAngle.x, axisAngle.y, axisAngle.z); }
[ "private", "void", "calcPrincipalRotationVector", "(", ")", "{", "Rotation", "rotation", "=", "rotationGroup", ".", "getRotation", "(", "0", ")", ";", "// the rotation around the principal axis is the first rotation", "AxisAngle4d", "axisAngle", "=", "rotation", ".", "get...
Returns a vector along the principal rotation axis for the alignment of structures along the z-axis @return principal rotation vector
[ "Returns", "a", "vector", "along", "the", "principal", "rotation", "axis", "for", "the", "alignment", "of", "structures", "along", "the", "z", "-", "axis" ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/symmetry/axis/RotationAxisAligner.java#L661-L665
svenkubiak/mangooio
mangooio-core/src/main/java/io/mangoo/crypto/Crypto.java
Crypto.getPublicKeyFromString
public PublicKey getPublicKeyFromString(String key) throws MangooEncryptionException { Objects.requireNonNull(key, Required.KEY.toString()); try { return KeyFactory.getInstance(ALGORITHM).generatePublic(new X509EncodedKeySpec(decodeBase64(key))); } catch (InvalidKeySpecExcep...
java
public PublicKey getPublicKeyFromString(String key) throws MangooEncryptionException { Objects.requireNonNull(key, Required.KEY.toString()); try { return KeyFactory.getInstance(ALGORITHM).generatePublic(new X509EncodedKeySpec(decodeBase64(key))); } catch (InvalidKeySpecExcep...
[ "public", "PublicKey", "getPublicKeyFromString", "(", "String", "key", ")", "throws", "MangooEncryptionException", "{", "Objects", ".", "requireNonNull", "(", "key", ",", "Required", ".", "KEY", ".", "toString", "(", ")", ")", ";", "try", "{", "return", "KeyFa...
Generates Public Key from Base64 encoded string @param key Base64 encoded string which represents the key @return The PublicKey @throws MangooEncryptionException if getting public key from string fails
[ "Generates", "Public", "Key", "from", "Base64", "encoded", "string" ]
train
https://github.com/svenkubiak/mangooio/blob/b3beb6d09510dbbab0ed947d5069c463e1fda6e7/mangooio-core/src/main/java/io/mangoo/crypto/Crypto.java#L311-L319
hector-client/hector
object-mapper/src/main/java/me/prettyprint/hom/EntityManagerImpl.java
EntityManagerImpl.find
@Override public <T> T find(Class<T> clazz, Object id) { if (null == clazz) { throw new IllegalArgumentException("clazz cannot be null"); } if (null == id) { throw new IllegalArgumentException("id cannot be null"); } CFMappingDef<T> cfMapDef = cacheMgr.getCfMapDef(clazz, false); i...
java
@Override public <T> T find(Class<T> clazz, Object id) { if (null == clazz) { throw new IllegalArgumentException("clazz cannot be null"); } if (null == id) { throw new IllegalArgumentException("id cannot be null"); } CFMappingDef<T> cfMapDef = cacheMgr.getCfMapDef(clazz, false); i...
[ "@", "Override", "public", "<", "T", ">", "T", "find", "(", "Class", "<", "T", ">", "clazz", ",", "Object", "id", ")", "{", "if", "(", "null", "==", "clazz", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"clazz cannot be null\"", ")", ";...
Load an entity instance. If the ID does not map to a persisted entity, then null is returned. @param <T> The type of entity to load for compile time type checking @param clazz The type of entity to load for runtime instance creation @param id ID of the instance to load @return instance of Entity or null if can't ...
[ "Load", "an", "entity", "instance", ".", "If", "the", "ID", "does", "not", "map", "to", "a", "persisted", "entity", "then", "null", "is", "returned", "." ]
train
https://github.com/hector-client/hector/blob/a302e68ca8d91b45d332e8c9afd7d98030b54de1/object-mapper/src/main/java/me/prettyprint/hom/EntityManagerImpl.java#L147-L163
amaembo/streamex
src/main/java/one/util/streamex/LongStreamEx.java
LongStreamEx.of
public static LongStreamEx of(LongStream stream) { return stream instanceof LongStreamEx ? (LongStreamEx) stream : new LongStreamEx(stream, StreamContext.of(stream)); }
java
public static LongStreamEx of(LongStream stream) { return stream instanceof LongStreamEx ? (LongStreamEx) stream : new LongStreamEx(stream, StreamContext.of(stream)); }
[ "public", "static", "LongStreamEx", "of", "(", "LongStream", "stream", ")", "{", "return", "stream", "instanceof", "LongStreamEx", "?", "(", "LongStreamEx", ")", "stream", ":", "new", "LongStreamEx", "(", "stream", ",", "StreamContext", ".", "of", "(", "stream...
Returns a {@code LongStreamEx} object which wraps given {@link LongStream}. <p> The supplied stream must not be consumed or closed when this method is called. No operation must be performed on the supplied stream after it's wrapped. @param stream original stream @return the wrapped stream @since 0.0.8
[ "Returns", "a", "{", "@code", "LongStreamEx", "}", "object", "which", "wraps", "given", "{", "@link", "LongStream", "}", "." ]
train
https://github.com/amaembo/streamex/blob/936bbd1b7dfbcf64a3b990682bfc848213441d14/src/main/java/one/util/streamex/LongStreamEx.java#L1637-L1640
Netflix/karyon
karyon2-governator/src/main/java/netflix/karyon/Karyon.java
Karyon.forWebSocketServer
public static KaryonServer forWebSocketServer(RxServer<? extends WebSocketFrame, ? extends WebSocketFrame> server, BootstrapModule... bootstrapModules) { return new RxNettyServerBackedServer(server, bootstrapModules); }
java
public static KaryonServer forWebSocketServer(RxServer<? extends WebSocketFrame, ? extends WebSocketFrame> server, BootstrapModule... bootstrapModules) { return new RxNettyServerBackedServer(server, bootstrapModules); }
[ "public", "static", "KaryonServer", "forWebSocketServer", "(", "RxServer", "<", "?", "extends", "WebSocketFrame", ",", "?", "extends", "WebSocketFrame", ">", "server", ",", "BootstrapModule", "...", "bootstrapModules", ")", "{", "return", "new", "RxNettyServerBackedSe...
Creates a new {@link KaryonServer} which combines lifecycle of the passed WebSockets {@link RxServer} with it's own lifecycle. @param server WebSocket server @param bootstrapModules Additional bootstrapModules if any. @return {@link KaryonServer} which is to be used to start the created server.
[ "Creates", "a", "new", "{", "@link", "KaryonServer", "}", "which", "combines", "lifecycle", "of", "the", "passed", "WebSockets", "{", "@link", "RxServer", "}", "with", "it", "s", "own", "lifecycle", "." ]
train
https://github.com/Netflix/karyon/blob/d50bc0ff37693ef3fbda373e90a109d1f92e0b9a/karyon2-governator/src/main/java/netflix/karyon/Karyon.java#L217-L220
OpenLiberty/open-liberty
dev/com.ibm.ws.jmx.connector.client.rest/src/com/ibm/ws/jmx/connector/converter/JSONConverter.java
JSONConverter.writeCreateMBean
public void writeCreateMBean(OutputStream out, CreateMBean value) throws IOException { writeStartObject(out); writeStringField(out, OM_CLASSNAME, value.className); writeObjectNameField(out, OM_OBJECTNAME, value.objectName); writeObjectNameField(out, OM_LOADERNAME, value.loaderName); ...
java
public void writeCreateMBean(OutputStream out, CreateMBean value) throws IOException { writeStartObject(out); writeStringField(out, OM_CLASSNAME, value.className); writeObjectNameField(out, OM_OBJECTNAME, value.objectName); writeObjectNameField(out, OM_LOADERNAME, value.loaderName); ...
[ "public", "void", "writeCreateMBean", "(", "OutputStream", "out", ",", "CreateMBean", "value", ")", "throws", "IOException", "{", "writeStartObject", "(", "out", ")", ";", "writeStringField", "(", "out", ",", "OM_CLASSNAME", ",", "value", ".", "className", ")", ...
Encode a CreateMBean instance as JSON: { "className" : String, "objectName" : ObjectName, "loaderName" : ObjectName, "params" : [ POJO* ], "signature" : [ String* ], "useLoader" : Boolean, "useSignatue" : Boolean } @param out The stream to write JSON to @param value The CreateMBean instance to encode. Can't be null. @...
[ "Encode", "a", "CreateMBean", "instance", "as", "JSON", ":", "{", "className", ":", "String", "objectName", ":", "ObjectName", "loaderName", ":", "ObjectName", "params", ":", "[", "POJO", "*", "]", "signature", ":", "[", "String", "*", "]", "useLoader", ":...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jmx.connector.client.rest/src/com/ibm/ws/jmx/connector/converter/JSONConverter.java#L1143-L1153
Azure/azure-sdk-for-java
appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/DiagnosticsInner.java
DiagnosticsInner.listSiteDiagnosticCategoriesWithServiceResponseAsync
public Observable<ServiceResponse<Page<DiagnosticCategoryInner>>> listSiteDiagnosticCategoriesWithServiceResponseAsync(final String resourceGroupName, final String siteName) { return listSiteDiagnosticCategoriesSinglePageAsync(resourceGroupName, siteName) .concatMap(new Func1<ServiceResponse<Page<Di...
java
public Observable<ServiceResponse<Page<DiagnosticCategoryInner>>> listSiteDiagnosticCategoriesWithServiceResponseAsync(final String resourceGroupName, final String siteName) { return listSiteDiagnosticCategoriesSinglePageAsync(resourceGroupName, siteName) .concatMap(new Func1<ServiceResponse<Page<Di...
[ "public", "Observable", "<", "ServiceResponse", "<", "Page", "<", "DiagnosticCategoryInner", ">", ">", ">", "listSiteDiagnosticCategoriesWithServiceResponseAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "siteName", ")", "{", "return", "list...
Get Diagnostics Categories. Get Diagnostics Categories. @param resourceGroupName Name of the resource group to which the resource belongs. @param siteName Site Name @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the PagedList&lt;DiagnosticCategoryInner&gt; object
[ "Get", "Diagnostics", "Categories", ".", "Get", "Diagnostics", "Categories", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/DiagnosticsInner.java#L231-L243
haraldk/TwelveMonkeys
imageio/imageio-jpeg/src/main/java/com/twelvemonkeys/imageio/plugins/jpeg/JPEGLosslessDecoderWrapper.java
JPEGLosslessDecoderWrapper.to24Bit3ComponentRGB
private BufferedImage to24Bit3ComponentRGB(int[][] decoded, int width, int height) { BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_3BYTE_BGR); byte[] imageBuffer = ((DataBufferByte) image.getRaster().getDataBuffer()).getData(); for (int i = 0; i < imageBuffer.length ...
java
private BufferedImage to24Bit3ComponentRGB(int[][] decoded, int width, int height) { BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_3BYTE_BGR); byte[] imageBuffer = ((DataBufferByte) image.getRaster().getDataBuffer()).getData(); for (int i = 0; i < imageBuffer.length ...
[ "private", "BufferedImage", "to24Bit3ComponentRGB", "(", "int", "[", "]", "[", "]", "decoded", ",", "int", "width", ",", "int", "height", ")", "{", "BufferedImage", "image", "=", "new", "BufferedImage", "(", "width", ",", "height", ",", "BufferedImage", ".",...
Converts the decoded buffer into a BufferedImage. precision: 8 bit, componentCount = 3 @param decoded data buffer @param width of the image @param height of the image @return a BufferedImage.TYPE_3BYTE_RGB
[ "Converts", "the", "decoded", "buffer", "into", "a", "BufferedImage", ".", "precision", ":", "8", "bit", "componentCount", "=", "3" ]
train
https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/imageio/imageio-jpeg/src/main/java/com/twelvemonkeys/imageio/plugins/jpeg/JPEGLosslessDecoderWrapper.java#L180-L192
google/closure-compiler
src/com/google/javascript/rhino/jstype/UnionType.java
UnionType.anyMatch
private static boolean anyMatch(Predicate<JSType> predicate, ImmutableList<JSType> universe) { for (int i = 0; i < universe.size(); i++) { if (predicate.test(universe.get(i))) { return true; } } return false; }
java
private static boolean anyMatch(Predicate<JSType> predicate, ImmutableList<JSType> universe) { for (int i = 0; i < universe.size(); i++) { if (predicate.test(universe.get(i))) { return true; } } return false; }
[ "private", "static", "boolean", "anyMatch", "(", "Predicate", "<", "JSType", ">", "predicate", ",", "ImmutableList", "<", "JSType", ">", "universe", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "universe", ".", "size", "(", ")", ";", "i...
Returns whether anything in {@code universe} matches {@code predicate}. <p>This method is designed to minimize allocations since it is expected to be called <em>very</em> often. That's why is doesn't: <ul> <li>instantiate {@link Iterator}s <li>instantiate {@link Stream}s <li>(un)box primitives <li>expect closure gene...
[ "Returns", "whether", "anything", "in", "{", "@code", "universe", "}", "matches", "{", "@code", "predicate", "}", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/rhino/jstype/UnionType.java#L675-L682
Waikato/jclasslocator
src/main/java/nz/ac/waikato/cms/locator/ClassLister.java
ClassLister.updateClasses
protected void updateClasses(HashMap<String,HashSet<Class>> cache, String superclass, HashSet<Class> names) { if (!cache.containsKey(superclass)) cache.put(superclass, names); else cache.get(superclass).addAll(names); }
java
protected void updateClasses(HashMap<String,HashSet<Class>> cache, String superclass, HashSet<Class> names) { if (!cache.containsKey(superclass)) cache.put(superclass, names); else cache.get(superclass).addAll(names); }
[ "protected", "void", "updateClasses", "(", "HashMap", "<", "String", ",", "HashSet", "<", "Class", ">", ">", "cache", ",", "String", "superclass", ",", "HashSet", "<", "Class", ">", "names", ")", "{", "if", "(", "!", "cache", ".", "containsKey", "(", "...
Updates cache for the superclass. @param cache the cache to update @param superclass the superclass @param names the names to add
[ "Updates", "cache", "for", "the", "superclass", "." ]
train
https://github.com/Waikato/jclasslocator/blob/c899072fff607a56ee7f8c2d01fbeb15157ad144/src/main/java/nz/ac/waikato/cms/locator/ClassLister.java#L252-L257
landawn/AbacusUtil
src/com/landawn/abacus/util/N.java
N.bucketSort
public static <T extends Comparable<T>> void bucketSort(final List<T> c, final int fromIndex, final int toIndex) { Array.bucketSort(c, fromIndex, toIndex); }
java
public static <T extends Comparable<T>> void bucketSort(final List<T> c, final int fromIndex, final int toIndex) { Array.bucketSort(c, fromIndex, toIndex); }
[ "public", "static", "<", "T", "extends", "Comparable", "<", "T", ">", ">", "void", "bucketSort", "(", "final", "List", "<", "T", ">", "c", ",", "final", "int", "fromIndex", ",", "final", "int", "toIndex", ")", "{", "Array", ".", "bucketSort", "(", "c...
Note: All the objects with same value will be replaced with first element with the same value. @param c @param fromIndex @param toIndex
[ "Note", ":", "All", "the", "objects", "with", "same", "value", "will", "be", "replaced", "with", "first", "element", "with", "the", "same", "value", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/N.java#L12044-L12046
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/thread/RemoteRecordOwner.java
RemoteRecordOwner.handleRemoteCommand
public Object handleRemoteCommand(String strCommand, Map<String,Object> properties, Object sourceSession) throws RemoteException, DBException { if (m_sessionObjectParent != null) if (m_sessionObjectParent != sourceSession) return ((RemoteRecordOwner)m_sessionObjectParent).handleR...
java
public Object handleRemoteCommand(String strCommand, Map<String,Object> properties, Object sourceSession) throws RemoteException, DBException { if (m_sessionObjectParent != null) if (m_sessionObjectParent != sourceSession) return ((RemoteRecordOwner)m_sessionObjectParent).handleR...
[ "public", "Object", "handleRemoteCommand", "(", "String", "strCommand", ",", "Map", "<", "String", ",", "Object", ">", "properties", ",", "Object", "sourceSession", ")", "throws", "RemoteException", ",", "DBException", "{", "if", "(", "m_sessionObjectParent", "!="...
Process the command. Step 1 - Process the command if possible and return true if processed. Step 2 - If I can't process, pass to all children (with me as the source). Step 3 - If children didn't process, pass to parent (with me as the source). Note: Never pass to a parent or child that matches the source (to avoid an e...
[ "Process", "the", "command", ".", "Step", "1", "-", "Process", "the", "command", "if", "possible", "and", "return", "true", "if", "processed", ".", "Step", "2", "-", "If", "I", "can", "t", "process", "pass", "to", "all", "children", "(", "with", "me", ...
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/thread/RemoteRecordOwner.java#L473-L479
Azure/azure-sdk-for-java
edgegateway/resource-manager/v2019_03_01/src/main/java/com/microsoft/azure/management/edgegateway/v2019_03_01/implementation/DevicesInner.java
DevicesInner.getByResourceGroupAsync
public Observable<DataBoxEdgeDeviceInner> getByResourceGroupAsync(String deviceName, String resourceGroupName) { return getByResourceGroupWithServiceResponseAsync(deviceName, resourceGroupName).map(new Func1<ServiceResponse<DataBoxEdgeDeviceInner>, DataBoxEdgeDeviceInner>() { @Override p...
java
public Observable<DataBoxEdgeDeviceInner> getByResourceGroupAsync(String deviceName, String resourceGroupName) { return getByResourceGroupWithServiceResponseAsync(deviceName, resourceGroupName).map(new Func1<ServiceResponse<DataBoxEdgeDeviceInner>, DataBoxEdgeDeviceInner>() { @Override p...
[ "public", "Observable", "<", "DataBoxEdgeDeviceInner", ">", "getByResourceGroupAsync", "(", "String", "deviceName", ",", "String", "resourceGroupName", ")", "{", "return", "getByResourceGroupWithServiceResponseAsync", "(", "deviceName", ",", "resourceGroupName", ")", ".", ...
Gets the properties of the data box edge/gateway device. @param deviceName The device name. @param resourceGroupName The resource group name. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the DataBoxEdgeDeviceInner object
[ "Gets", "the", "properties", "of", "the", "data", "box", "edge", "/", "gateway", "device", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/edgegateway/resource-manager/v2019_03_01/src/main/java/com/microsoft/azure/management/edgegateway/v2019_03_01/implementation/DevicesInner.java#L641-L648
pravega/pravega
segmentstore/server/src/main/java/io/pravega/segmentstore/server/reading/StreamSegmentReadIndex.java
StreamSegmentReadIndex.getMultiReadResultEntry
private CompletableReadResultEntry getMultiReadResultEntry(long resultStartOffset, int maxLength) { int readLength = 0; CompletableReadResultEntry nextEntry = getSingleReadResultEntry(resultStartOffset, maxLength); if (nextEntry == null || !(nextEntry instanceof CacheReadResultEntry)) { ...
java
private CompletableReadResultEntry getMultiReadResultEntry(long resultStartOffset, int maxLength) { int readLength = 0; CompletableReadResultEntry nextEntry = getSingleReadResultEntry(resultStartOffset, maxLength); if (nextEntry == null || !(nextEntry instanceof CacheReadResultEntry)) { ...
[ "private", "CompletableReadResultEntry", "getMultiReadResultEntry", "(", "long", "resultStartOffset", ",", "int", "maxLength", ")", "{", "int", "readLength", "=", "0", ";", "CompletableReadResultEntry", "nextEntry", "=", "getSingleReadResultEntry", "(", "resultStartOffset",...
Returns a ReadResultEntry that matches the specified search parameters. <p> Compared to getSingleMemoryReadResultEntry(), this method may return a direct entry or a collection of entries. If the first entry to be returned would constitute a cache hit, then this method will attempt to return data from subsequent (congru...
[ "Returns", "a", "ReadResultEntry", "that", "matches", "the", "specified", "search", "parameters", ".", "<p", ">", "Compared", "to", "getSingleMemoryReadResultEntry", "()", "this", "method", "may", "return", "a", "direct", "entry", "or", "a", "collection", "of", ...
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/segmentstore/server/src/main/java/io/pravega/segmentstore/server/reading/StreamSegmentReadIndex.java#L799-L824
b3log/latke
latke-core/src/main/java/org/b3log/latke/servlet/renderer/AbstractFreeMarkerRenderer.java
AbstractFreeMarkerRenderer.genHTML
protected String genHTML(final HttpServletRequest request, final Map<String, Object> dataModel, final Template template) throws Exception { final StringWriter stringWriter = new StringWriter(); template.setOutputEncoding("UTF-8"); template.process(dataModel, stringWriter); f...
java
protected String genHTML(final HttpServletRequest request, final Map<String, Object> dataModel, final Template template) throws Exception { final StringWriter stringWriter = new StringWriter(); template.setOutputEncoding("UTF-8"); template.process(dataModel, stringWriter); f...
[ "protected", "String", "genHTML", "(", "final", "HttpServletRequest", "request", ",", "final", "Map", "<", "String", ",", "Object", ">", "dataModel", ",", "final", "Template", "template", ")", "throws", "Exception", "{", "final", "StringWriter", "stringWriter", ...
Processes the specified FreeMarker template with the specified request, data model. @param request the specified request @param dataModel the specified data model @param template the specified FreeMarker template @return generated HTML @throws Exception exception
[ "Processes", "the", "specified", "FreeMarker", "template", "with", "the", "specified", "request", "data", "model", "." ]
train
https://github.com/b3log/latke/blob/f7e08a47eeecea5f7c94006382c24f353585de33/latke-core/src/main/java/org/b3log/latke/servlet/renderer/AbstractFreeMarkerRenderer.java#L150-L165
twitter/hraven
hraven-etl/src/main/java/com/twitter/hraven/etl/FileLister.java
FileLister.getListFilesToProcess
public static FileStatus[] getListFilesToProcess(long maxFileSize, boolean recurse, FileSystem hdfs, Path inputPath, JobFileModifiedRangePathFilter pathFilter) throws IOException { LOG.info(" in getListFilesToProcess maxFileSize=" + maxFileSize + " inputPath= " + inputPath.toUri()); FileSta...
java
public static FileStatus[] getListFilesToProcess(long maxFileSize, boolean recurse, FileSystem hdfs, Path inputPath, JobFileModifiedRangePathFilter pathFilter) throws IOException { LOG.info(" in getListFilesToProcess maxFileSize=" + maxFileSize + " inputPath= " + inputPath.toUri()); FileSta...
[ "public", "static", "FileStatus", "[", "]", "getListFilesToProcess", "(", "long", "maxFileSize", ",", "boolean", "recurse", ",", "FileSystem", "hdfs", ",", "Path", "inputPath", ",", "JobFileModifiedRangePathFilter", "pathFilter", ")", "throws", "IOException", "{", "...
looks at the src path and fetches the list of files to process confirms that the size of files is less than the maxFileSize hbase cell can't store files bigger than maxFileSize, hence no need to consider them for rawloading Reference: {@link https://github.com/twitter/hraven/issues/59} @param maxFileSize - max #bytes t...
[ "looks", "at", "the", "src", "path", "and", "fetches", "the", "list", "of", "files", "to", "process", "confirms", "that", "the", "size", "of", "files", "is", "less", "than", "the", "maxFileSize", "hbase", "cell", "can", "t", "store", "files", "bigger", "...
train
https://github.com/twitter/hraven/blob/e35996b6e2f016bcd18db0bad320be7c93d95208/hraven-etl/src/main/java/com/twitter/hraven/etl/FileLister.java#L115-L127
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/cr/crvserver_binding.java
crvserver_binding.get
public static crvserver_binding get(nitro_service service, String name) throws Exception{ crvserver_binding obj = new crvserver_binding(); obj.set_name(name); crvserver_binding response = (crvserver_binding) obj.get_resource(service); return response; }
java
public static crvserver_binding get(nitro_service service, String name) throws Exception{ crvserver_binding obj = new crvserver_binding(); obj.set_name(name); crvserver_binding response = (crvserver_binding) obj.get_resource(service); return response; }
[ "public", "static", "crvserver_binding", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "crvserver_binding", "obj", "=", "new", "crvserver_binding", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", ...
Use this API to fetch crvserver_binding resource of given name .
[ "Use", "this", "API", "to", "fetch", "crvserver_binding", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/cr/crvserver_binding.java#L158-L163
UrielCh/ovh-java-sdk
ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java
ApiOvhTelephony.billingAccount_line_serviceName_lastRegistrations_GET
public ArrayList<OvhRegistrationInformations> billingAccount_line_serviceName_lastRegistrations_GET(String billingAccount, String serviceName) throws IOException { String qPath = "/telephony/{billingAccount}/line/{serviceName}/lastRegistrations"; StringBuilder sb = path(qPath, billingAccount, serviceName); String...
java
public ArrayList<OvhRegistrationInformations> billingAccount_line_serviceName_lastRegistrations_GET(String billingAccount, String serviceName) throws IOException { String qPath = "/telephony/{billingAccount}/line/{serviceName}/lastRegistrations"; StringBuilder sb = path(qPath, billingAccount, serviceName); String...
[ "public", "ArrayList", "<", "OvhRegistrationInformations", ">", "billingAccount_line_serviceName_lastRegistrations_GET", "(", "String", "billingAccount", ",", "String", "serviceName", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/telephony/{billingAccount}/line...
List the informations about the last registrations (i.e. IP, port, User-Agent...) REST: GET /telephony/{billingAccount}/line/{serviceName}/lastRegistrations @param billingAccount [required] The name of your billingAccount @param serviceName [required]
[ "List", "the", "informations", "about", "the", "last", "registrations", "(", "i", ".", "e", ".", "IP", "port", "User", "-", "Agent", "...", ")" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L2145-L2150
datoin/http-requests
src/main/java/org/datoin/net/http/Request.java
Request.setHeader
public Request setHeader(String name, String value) { this.headers.put(name, value); return this; }
java
public Request setHeader(String name, String value) { this.headers.put(name, value); return this; }
[ "public", "Request", "setHeader", "(", "String", "name", ",", "String", "value", ")", "{", "this", ".", "headers", ".", "put", "(", "name", ",", "value", ")", ";", "return", "this", ";", "}" ]
seat a header and return modified request @param name : header name @param value : header value @return : Request Object with header value set
[ "seat", "a", "header", "and", "return", "modified", "request" ]
train
https://github.com/datoin/http-requests/blob/660a4bc516c594f321019df94451fead4dea19b6/src/main/java/org/datoin/net/http/Request.java#L183-L186
JOML-CI/JOML
src/org/joml/Matrix4f.java
Matrix4f.setFrustumLH
public Matrix4f setFrustumLH(float left, float right, float bottom, float top, float zNear, float zFar, boolean zZeroToOne) { if ((properties & PROPERTY_IDENTITY) == 0) MemUtil.INSTANCE.identity(this); this._m00((zNear + zNear) / (right - left)); this._m11((zNear + zNear) / (top - bo...
java
public Matrix4f setFrustumLH(float left, float right, float bottom, float top, float zNear, float zFar, boolean zZeroToOne) { if ((properties & PROPERTY_IDENTITY) == 0) MemUtil.INSTANCE.identity(this); this._m00((zNear + zNear) / (right - left)); this._m11((zNear + zNear) / (top - bo...
[ "public", "Matrix4f", "setFrustumLH", "(", "float", "left", ",", "float", "right", ",", "float", "bottom", ",", "float", "top", ",", "float", "zNear", ",", "float", "zFar", ",", "boolean", "zZeroToOne", ")", "{", "if", "(", "(", "properties", "&", "PROPE...
Set this matrix to be an arbitrary perspective projection frustum transformation for a left-handed coordinate system using OpenGL's NDC z range of <code>[-1..+1]</code>. <p> In order to apply the perspective frustum transformation to an existing transformation, use {@link #frustumLH(float, float, float, float, float, f...
[ "Set", "this", "matrix", "to", "be", "an", "arbitrary", "perspective", "projection", "frustum", "transformation", "for", "a", "left", "-", "handed", "coordinate", "system", "using", "OpenGL", "s", "NDC", "z", "range", "of", "<code", ">", "[", "-", "1", ".....
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix4f.java#L10818-L10844
neoremind/fluent-validator
fluent-validator/src/main/java/com/baidu/unbiz/fluentvalidator/util/ReflectionUtil.java
ReflectionUtil.getMethod
public static Method getMethod(Class<?> clazz, String methodName, Class<?>... parameterTypes) { if (clazz == null || methodName == null || methodName.length() == 0) { return null; } for (Class<?> itr = clazz; hasSuperClass(itr); ) { Method[] methods = itr.getDeclaredMeth...
java
public static Method getMethod(Class<?> clazz, String methodName, Class<?>... parameterTypes) { if (clazz == null || methodName == null || methodName.length() == 0) { return null; } for (Class<?> itr = clazz; hasSuperClass(itr); ) { Method[] methods = itr.getDeclaredMeth...
[ "public", "static", "Method", "getMethod", "(", "Class", "<", "?", ">", "clazz", ",", "String", "methodName", ",", "Class", "<", "?", ">", "...", "parameterTypes", ")", "{", "if", "(", "clazz", "==", "null", "||", "methodName", "==", "null", "||", "met...
获取方法 @param clazz 类 @param methodName 方法名 @param parameterTypes 方法参数 @return 方法
[ "获取方法" ]
train
https://github.com/neoremind/fluent-validator/blob/b516970591aa9468b44ba63938b98ec341fd6ead/fluent-validator/src/main/java/com/baidu/unbiz/fluentvalidator/util/ReflectionUtil.java#L142-L159
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/NumberUtil.java
NumberUtil.appendRange
public static Collection<Integer> appendRange(int start, int stop, Collection<Integer> values) { return appendRange(start, stop, 1, values); }
java
public static Collection<Integer> appendRange(int start, int stop, Collection<Integer> values) { return appendRange(start, stop, 1, values); }
[ "public", "static", "Collection", "<", "Integer", ">", "appendRange", "(", "int", "start", ",", "int", "stop", ",", "Collection", "<", "Integer", ">", "values", ")", "{", "return", "appendRange", "(", "start", ",", "stop", ",", "1", ",", "values", ")", ...
将给定范围内的整数添加到已有集合中,步进为1 @param start 开始(包含) @param stop 结束(包含) @param values 集合 @return 集合
[ "将给定范围内的整数添加到已有集合中,步进为1" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/NumberUtil.java#L1343-L1345
btrplace/scheduler
json/src/main/java/org/btrplace/json/JSONs.java
JSONs.requiredBoolean
public static boolean requiredBoolean(JSONObject o, String id) throws JSONConverterException { checkKeys(o, id); Object x = o.get(id); if (!(x instanceof Boolean)) { throw new JSONConverterException("Boolean expected at key '" + id + "' but was '" + x.getClass() + "'."); } ...
java
public static boolean requiredBoolean(JSONObject o, String id) throws JSONConverterException { checkKeys(o, id); Object x = o.get(id); if (!(x instanceof Boolean)) { throw new JSONConverterException("Boolean expected at key '" + id + "' but was '" + x.getClass() + "'."); } ...
[ "public", "static", "boolean", "requiredBoolean", "(", "JSONObject", "o", ",", "String", "id", ")", "throws", "JSONConverterException", "{", "checkKeys", "(", "o", ",", "id", ")", ";", "Object", "x", "=", "o", ".", "get", "(", "id", ")", ";", "if", "("...
Read an expected boolean. @param o the object to parse @param id the id in the map that should point to the boolean @return the boolean @throws org.btrplace.json.JSONConverterException if the key does not point to a boolean
[ "Read", "an", "expected", "boolean", "." ]
train
https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/json/src/main/java/org/btrplace/json/JSONs.java#L175-L182
b3log/latke
latke-core/src/main/java/org/b3log/latke/servlet/RequestContext.java
RequestContext.renderJSONValue
public RequestContext renderJSONValue(final String name, final Object obj) { if (renderer instanceof JsonRenderer) { final JsonRenderer r = (JsonRenderer) renderer; final JSONObject ret = r.getJSONObject(); ret.put(name, obj); } return this; }
java
public RequestContext renderJSONValue(final String name, final Object obj) { if (renderer instanceof JsonRenderer) { final JsonRenderer r = (JsonRenderer) renderer; final JSONObject ret = r.getJSONObject(); ret.put(name, obj); } return this; }
[ "public", "RequestContext", "renderJSONValue", "(", "final", "String", "name", ",", "final", "Object", "obj", ")", "{", "if", "(", "renderer", "instanceof", "JsonRenderer", ")", "{", "final", "JsonRenderer", "r", "=", "(", "JsonRenderer", ")", "renderer", ";",...
Renders with {"name", obj}. @param name the specified name @param obj the specified object @return this context
[ "Renders", "with", "{", "name", "obj", "}", "." ]
train
https://github.com/b3log/latke/blob/f7e08a47eeecea5f7c94006382c24f353585de33/latke-core/src/main/java/org/b3log/latke/servlet/RequestContext.java#L528-L537
awltech/org.parallelj
parallelj-launching-parent/parallelj-launching-api/src/main/java/org/parallelj/launching/Launcher.java
Launcher.newLaunch
public <T> Launch<T> newLaunch(Class<? extends T> programClass) throws LaunchException { return newLaunch(programClass, null); }
java
public <T> Launch<T> newLaunch(Class<? extends T> programClass) throws LaunchException { return newLaunch(programClass, null); }
[ "public", "<", "T", ">", "Launch", "<", "T", ">", "newLaunch", "(", "Class", "<", "?", "extends", "T", ">", "programClass", ")", "throws", "LaunchException", "{", "return", "newLaunch", "(", "programClass", ",", "null", ")", ";", "}" ]
Create a new instance of {@link Launch} for a {@link org.parallelj.Program Program} execution. @param programClass The class of the {@link org.parallelj.Program Program}. @return a {@link Launch} instance. @throws LaunchException
[ "Create", "a", "new", "instance", "of", "{", "@link", "Launch", "}", "for", "a", "{", "@link", "org", ".", "parallelj", ".", "Program", "Program", "}", "execution", "." ]
train
https://github.com/awltech/org.parallelj/blob/2a2498cc4ac6227df6f45d295ec568cad3cffbc4/parallelj-launching-parent/parallelj-launching-api/src/main/java/org/parallelj/launching/Launcher.java#L69-L72
Impetus/Kundera
src/jpa-engine/core/src/main/java/com/impetus/kundera/property/PropertyAccessorHelper.java
PropertyAccessorHelper.getString
public static String getString(Object from, Field field) { PropertyAccessor<?> accessor = PropertyAccessorFactory.getPropertyAccessor(field); Object object = getObject(from, field); return object != null ? accessor.toString(object) : null; }
java
public static String getString(Object from, Field field) { PropertyAccessor<?> accessor = PropertyAccessorFactory.getPropertyAccessor(field); Object object = getObject(from, field); return object != null ? accessor.toString(object) : null; }
[ "public", "static", "String", "getString", "(", "Object", "from", ",", "Field", "field", ")", "{", "PropertyAccessor", "<", "?", ">", "accessor", "=", "PropertyAccessorFactory", ".", "getPropertyAccessor", "(", "field", ")", ";", "Object", "object", "=", "getO...
Gets the string. @param from the from @param field the field @return the string @throws PropertyAccessException the property access exception
[ "Gets", "the", "string", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/jpa-engine/core/src/main/java/com/impetus/kundera/property/PropertyAccessorHelper.java#L193-L198
geomajas/geomajas-project-server
plugin/print/print/src/main/java/org/geomajas/plugin/printing/component/PdfContext.java
PdfContext.drawImage
public void drawImage(Image img, Rectangle rect, Rectangle clipRect) { drawImage(img, rect, clipRect, 1); }
java
public void drawImage(Image img, Rectangle rect, Rectangle clipRect) { drawImage(img, rect, clipRect, 1); }
[ "public", "void", "drawImage", "(", "Image", "img", ",", "Rectangle", "rect", ",", "Rectangle", "clipRect", ")", "{", "drawImage", "(", "img", ",", "rect", ",", "clipRect", ",", "1", ")", ";", "}" ]
Draws the specified image with the first rectangle's bounds, clipping with the second one and adding transparency. @param img image @param rect rectangle @param clipRect clipping bounds
[ "Draws", "the", "specified", "image", "with", "the", "first", "rectangle", "s", "bounds", "clipping", "with", "the", "second", "one", "and", "adding", "transparency", "." ]
train
https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/plugin/print/print/src/main/java/org/geomajas/plugin/printing/component/PdfContext.java#L389-L391
kite-sdk/kite
kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/HBaseUtils.java
HBaseUtils.mergePutActions
public static PutAction mergePutActions(byte[] keyBytes, List<PutAction> putActionList) { VersionCheckAction checkAction = null; List<Put> putsToMerge = new ArrayList<Put>(); for (PutAction putActionToMerge : putActionList) { putsToMerge.add(putActionToMerge.getPut()); VersionCheckAction c...
java
public static PutAction mergePutActions(byte[] keyBytes, List<PutAction> putActionList) { VersionCheckAction checkAction = null; List<Put> putsToMerge = new ArrayList<Put>(); for (PutAction putActionToMerge : putActionList) { putsToMerge.add(putActionToMerge.getPut()); VersionCheckAction c...
[ "public", "static", "PutAction", "mergePutActions", "(", "byte", "[", "]", "keyBytes", ",", "List", "<", "PutAction", ">", "putActionList", ")", "{", "VersionCheckAction", "checkAction", "=", "null", ";", "List", "<", "Put", ">", "putsToMerge", "=", "new", "...
Given a list of PutActions, create a new PutAction with the values in each put merged together. It is expected that no puts have a value for the same fully qualified column. Return the new PutAction. @param key The key of the new put. @param putActionList The list of PutActions to merge @return the new PutAction insta...
[ "Given", "a", "list", "of", "PutActions", "create", "a", "new", "PutAction", "with", "the", "values", "in", "each", "put", "merged", "together", ".", "It", "is", "expected", "that", "no", "puts", "have", "a", "value", "for", "the", "same", "fully", "qual...
train
https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/HBaseUtils.java#L93-L106
Azure/azure-sdk-for-java
compute/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/compute/v2017_12_01/implementation/VirtualMachineExtensionsInner.java
VirtualMachineExtensionsInner.createOrUpdateAsync
public Observable<VirtualMachineExtensionInner> createOrUpdateAsync(String resourceGroupName, String vmName, String vmExtensionName, VirtualMachineExtensionInner extensionParameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName, extensionParameters).map(new Func1<Se...
java
public Observable<VirtualMachineExtensionInner> createOrUpdateAsync(String resourceGroupName, String vmName, String vmExtensionName, VirtualMachineExtensionInner extensionParameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName, extensionParameters).map(new Func1<Se...
[ "public", "Observable", "<", "VirtualMachineExtensionInner", ">", "createOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "vmName", ",", "String", "vmExtensionName", ",", "VirtualMachineExtensionInner", "extensionParameters", ")", "{", "return", "createOrU...
The operation to create or update the extension. @param resourceGroupName The name of the resource group. @param vmName The name of the virtual machine where the extension should be created or updated. @param vmExtensionName The name of the virtual machine extension. @param extensionParameters Parameters supplied to t...
[ "The", "operation", "to", "create", "or", "update", "the", "extension", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/compute/v2017_12_01/implementation/VirtualMachineExtensionsInner.java#L131-L138
Netflix/Nicobar
nicobar-core/src/main/java/com/netflix/nicobar/core/module/GraphUtils.java
GraphUtils.swapVertices
public static <V> void swapVertices(DirectedGraph<V, DefaultEdge> graph, Map<V, Set<V>> alternates) { Objects.requireNonNull(graph,"graph"); Objects.requireNonNull(alternates, "alternates"); // add all of the new vertices to prep for linking addAllVertices(graph, alternates.keySet()); ...
java
public static <V> void swapVertices(DirectedGraph<V, DefaultEdge> graph, Map<V, Set<V>> alternates) { Objects.requireNonNull(graph,"graph"); Objects.requireNonNull(alternates, "alternates"); // add all of the new vertices to prep for linking addAllVertices(graph, alternates.keySet()); ...
[ "public", "static", "<", "V", ">", "void", "swapVertices", "(", "DirectedGraph", "<", "V", ",", "DefaultEdge", ">", "graph", ",", "Map", "<", "V", ",", "Set", "<", "V", ">", ">", "alternates", ")", "{", "Objects", ".", "requireNonNull", "(", "graph", ...
replace the vertices in the graph with an alternate set of vertices. @param graph graph to be mutated @param alternates alternate vertices to insert into the graph. map of vertices to their direct dependents.
[ "replace", "the", "vertices", "in", "the", "graph", "with", "an", "alternate", "set", "of", "vertices", "." ]
train
https://github.com/Netflix/Nicobar/blob/507173dcae4a86a955afc3df222a855862fab8d7/nicobar-core/src/main/java/com/netflix/nicobar/core/module/GraphUtils.java#L43-L71
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/TableWorks.java
TableWorks.setColDefaultExpression
void setColDefaultExpression(int colIndex, Expression def) { if (def == null) { table.checkColumnInFKConstraint(colIndex, Constraint.SET_DEFAULT); } table.setDefaultExpression(colIndex, def); }
java
void setColDefaultExpression(int colIndex, Expression def) { if (def == null) { table.checkColumnInFKConstraint(colIndex, Constraint.SET_DEFAULT); } table.setDefaultExpression(colIndex, def); }
[ "void", "setColDefaultExpression", "(", "int", "colIndex", ",", "Expression", "def", ")", "{", "if", "(", "def", "==", "null", ")", "{", "table", ".", "checkColumnInFKConstraint", "(", "colIndex", ",", "Constraint", ".", "SET_DEFAULT", ")", ";", "}", "table"...
performs the work for changing the default value of a column @param colIndex int @param def Expression
[ "performs", "the", "work", "for", "changing", "the", "default", "value", "of", "a", "column" ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/TableWorks.java#L1066-L1073
tvesalainen/util
util/src/main/java/org/vesalainen/util/AbstractProvisioner.java
AbstractProvisioner.setValue
public void setValue(String name, Object value) { map.get(name).stream().forEach((im) -> { im.invoke(value); }
java
public void setValue(String name, Object value) { map.get(name).stream().forEach((im) -> { im.invoke(value); }
[ "public", "void", "setValue", "(", "String", "name", ",", "Object", "value", ")", "{", "map", ".", "get", "(", "name", ")", ".", "stream", "(", ")", ".", "forEach", "(", "(", "im", ")", "-", ">", "{", "im", ".", "invoke", "(", "value", ")", "",...
Provides value for attached method @param name From @Setting @param value
[ "Provides", "value", "for", "attached", "method" ]
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/AbstractProvisioner.java#L153-L158
WiQuery/wiquery
wiquery-core/src/main/java/org/odlabs/wiquery/core/options/Options.java
Options.putShort
public Options putShort(String key, IModel<Short> value) { putOption(key, new ShortOption(value)); return this; }
java
public Options putShort(String key, IModel<Short> value) { putOption(key, new ShortOption(value)); return this; }
[ "public", "Options", "putShort", "(", "String", "key", ",", "IModel", "<", "Short", ">", "value", ")", "{", "putOption", "(", "key", ",", "new", "ShortOption", "(", "value", ")", ")", ";", "return", "this", ";", "}" ]
<p> Puts an short value for the given option name. </p> @param key the option name. @param value the short value.
[ "<p", ">", "Puts", "an", "short", "value", "for", "the", "given", "option", "name", ".", "<", "/", "p", ">" ]
train
https://github.com/WiQuery/wiquery/blob/1b8d60c7a3c37b90fd68c9cd0ff97178fcbcbb08/wiquery-core/src/main/java/org/odlabs/wiquery/core/options/Options.java#L532-L536
Impetus/Kundera
src/kundera-couchbase/src/main/java/com/impetus/client/couchbase/CouchbaseClient.java
CouchbaseClient.validateQueryResults
private void validateQueryResults(String query, N1qlQueryResult result) { LOGGER.debug("Query output status: " + result.finalSuccess()); if (!result.finalSuccess()) { StringBuilder errorBuilder = new StringBuilder(); for (JsonObject obj : result.errors()) ...
java
private void validateQueryResults(String query, N1qlQueryResult result) { LOGGER.debug("Query output status: " + result.finalSuccess()); if (!result.finalSuccess()) { StringBuilder errorBuilder = new StringBuilder(); for (JsonObject obj : result.errors()) ...
[ "private", "void", "validateQueryResults", "(", "String", "query", ",", "N1qlQueryResult", "result", ")", "{", "LOGGER", ".", "debug", "(", "\"Query output status: \"", "+", "result", ".", "finalSuccess", "(", ")", ")", ";", "if", "(", "!", "result", ".", "f...
Validate query results. @param query the query @param result the result
[ "Validate", "query", "results", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-couchbase/src/main/java/com/impetus/client/couchbase/CouchbaseClient.java#L376-L393
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/BoardsApi.java
BoardsApi.deleteBoardList
public void deleteBoardList(Object projectIdOrPath, Integer boardId, Integer listId) throws GitLabApiException { delete(Response.Status.NO_CONTENT, null, "projects", getProjectIdOrPath(projectIdOrPath), "boards", boardId, "lists", listId); }
java
public void deleteBoardList(Object projectIdOrPath, Integer boardId, Integer listId) throws GitLabApiException { delete(Response.Status.NO_CONTENT, null, "projects", getProjectIdOrPath(projectIdOrPath), "boards", boardId, "lists", listId); }
[ "public", "void", "deleteBoardList", "(", "Object", "projectIdOrPath", ",", "Integer", "boardId", ",", "Integer", "listId", ")", "throws", "GitLabApiException", "{", "delete", "(", "Response", ".", "Status", ".", "NO_CONTENT", ",", "null", ",", "\"projects\"", "...
Soft deletes an existing Issue Board list. Only for admins and project owners. <pre><code>GitLab Endpoint: DELETE /projects/:id/boards/:board_id/lists/:list_id</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @param boardId the ID of the board @param lis...
[ "Soft", "deletes", "an", "existing", "Issue", "Board", "list", ".", "Only", "for", "admins", "and", "project", "owners", "." ]
train
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/BoardsApi.java#L326-L328
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/GJGeometryReader.java
GJGeometryReader.parsePoint
private Point parsePoint(JsonParser jp) throws IOException, SQLException { jp.nextToken(); // FIELD_NAME coordinates String coordinatesField = jp.getText(); if (coordinatesField.equalsIgnoreCase(GeoJsonField.COORDINATES)) { jp.nextToken(); // START_ARRAY [ to parse the coordi...
java
private Point parsePoint(JsonParser jp) throws IOException, SQLException { jp.nextToken(); // FIELD_NAME coordinates String coordinatesField = jp.getText(); if (coordinatesField.equalsIgnoreCase(GeoJsonField.COORDINATES)) { jp.nextToken(); // START_ARRAY [ to parse the coordi...
[ "private", "Point", "parsePoint", "(", "JsonParser", "jp", ")", "throws", "IOException", ",", "SQLException", "{", "jp", ".", "nextToken", "(", ")", ";", "// FIELD_NAME coordinates ", "String", "coordinatesField", "=", "jp", ".", "getText", "(", ")", ";",...
Parses one position Syntax: { "type": "Point", "coordinates": [100.0, 0.0] } @param jsParser @throws IOException @return Point
[ "Parses", "one", "position" ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/GJGeometryReader.java#L91-L102
ZuInnoTe/hadoopcryptoledger
inputformat/src/main/java/org/zuinnote/hadoop/ethereum/format/common/EthereumUtil.java
EthereumUtil.calculateChainId
public static Long calculateChainId(EthereumTransaction eTrans) { Long result=null; long rawResult=EthereumUtil.convertVarNumberToLong(new RLPElement(new byte[0],eTrans.getSig_v())); if (!((rawResult == EthereumUtil.LOWER_REAL_V) || (rawResult== (LOWER_REAL_V+1)))) { result = (rawResult-EthereumUtil.CHAIN_ID_IN...
java
public static Long calculateChainId(EthereumTransaction eTrans) { Long result=null; long rawResult=EthereumUtil.convertVarNumberToLong(new RLPElement(new byte[0],eTrans.getSig_v())); if (!((rawResult == EthereumUtil.LOWER_REAL_V) || (rawResult== (LOWER_REAL_V+1)))) { result = (rawResult-EthereumUtil.CHAIN_ID_IN...
[ "public", "static", "Long", "calculateChainId", "(", "EthereumTransaction", "eTrans", ")", "{", "Long", "result", "=", "null", ";", "long", "rawResult", "=", "EthereumUtil", ".", "convertVarNumberToLong", "(", "new", "RLPElement", "(", "new", "byte", "[", "0", ...
Calculates the chain Id @param eTrans Ethereum Transaction of which the chain id should be calculated @return chainId: 0, Ethereum testnet (aka Olympic); 1: Ethereum mainet (aka Frontier, Homestead, Metropolis) - also Classic (from fork) -also Expanse (alternative Ethereum implementation), 2 Morden (Ethereum testnet, ...
[ "Calculates", "the", "chain", "Id" ]
train
https://github.com/ZuInnoTe/hadoopcryptoledger/blob/5c9bfb61dd1a82374cd0de8413a7c66391ee4414/inputformat/src/main/java/org/zuinnote/hadoop/ethereum/format/common/EthereumUtil.java#L364-L371
jbehave/jbehave-core
jbehave-guice/src/main/java/org/jbehave/core/configuration/guice/GuiceAnnotationBuilder.java
GuiceAnnotationBuilder.findBinding
private boolean findBinding(Injector injector, Class<?> type) { boolean found = false; for (Key<?> key : injector.getBindings().keySet()) { if (key.getTypeLiteral().getRawType().equals(type)) { found = true; break; } } if (!found &&...
java
private boolean findBinding(Injector injector, Class<?> type) { boolean found = false; for (Key<?> key : injector.getBindings().keySet()) { if (key.getTypeLiteral().getRawType().equals(type)) { found = true; break; } } if (!found &&...
[ "private", "boolean", "findBinding", "(", "Injector", "injector", ",", "Class", "<", "?", ">", "type", ")", "{", "boolean", "found", "=", "false", ";", "for", "(", "Key", "<", "?", ">", "key", ":", "injector", ".", "getBindings", "(", ")", ".", "keyS...
Finds binding for a type in the given injector and, if not found, recurses to its parent @param injector the current Injector @param type the Class representing the type @return A boolean flag, <code>true</code> if binding found
[ "Finds", "binding", "for", "a", "type", "in", "the", "given", "injector", "and", "if", "not", "found", "recurses", "to", "its", "parent" ]
train
https://github.com/jbehave/jbehave-core/blob/bdd6a6199528df3c35087e72d4644870655b23e6/jbehave-guice/src/main/java/org/jbehave/core/configuration/guice/GuiceAnnotationBuilder.java#L165-L178
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCResultSet.java
JDBCResultSet.updateTime
public void updateTime(int columnIndex, Time x) throws SQLException { startUpdate(columnIndex); preparedStatement.setParameter(columnIndex, x); }
java
public void updateTime(int columnIndex, Time x) throws SQLException { startUpdate(columnIndex); preparedStatement.setParameter(columnIndex, x); }
[ "public", "void", "updateTime", "(", "int", "columnIndex", ",", "Time", "x", ")", "throws", "SQLException", "{", "startUpdate", "(", "columnIndex", ")", ";", "preparedStatement", ".", "setParameter", "(", "columnIndex", ",", "x", ")", ";", "}" ]
<!-- start generic documentation --> Updates the designated column with a <code>java.sql.Time</code> value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code> ...
[ "<!", "--", "start", "generic", "documentation", "--", ">", "Updates", "the", "designated", "column", "with", "a", "<code", ">", "java", ".", "sql", ".", "Time<", "/", "code", ">", "value", ".", "The", "updater", "methods", "are", "used", "to", "update",...
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCResultSet.java#L3013-L3016
xdcrafts/flower
flower-tools/src/main/java/com/github/xdcrafts/flower/tools/ClassApi.java
ClassApi.classDistance
private static int classDistance(Class<?> from, Class<?> to, int current) { return to.isAssignableFrom(from) ? to.equals(from) ? current : classDistance(findAssignableAncestor(from, to), to, current + 1) : -1; }
java
private static int classDistance(Class<?> from, Class<?> to, int current) { return to.isAssignableFrom(from) ? to.equals(from) ? current : classDistance(findAssignableAncestor(from, to), to, current + 1) : -1; }
[ "private", "static", "int", "classDistance", "(", "Class", "<", "?", ">", "from", ",", "Class", "<", "?", ">", "to", ",", "int", "current", ")", "{", "return", "to", ".", "isAssignableFrom", "(", "from", ")", "?", "to", ".", "equals", "(", "from", ...
Calculates distance between from and to classes, counting from current.
[ "Calculates", "distance", "between", "from", "and", "to", "classes", "counting", "from", "current", "." ]
train
https://github.com/xdcrafts/flower/blob/96a8e49102fea434bd383a3c7852f0ee9545f999/flower-tools/src/main/java/com/github/xdcrafts/flower/tools/ClassApi.java#L90-L94
carewebframework/carewebframework-core
org.carewebframework.messaging-parent/org.carewebframework.messaging.jms-parent/org.carewebframework.messaging.jms.core/src/main/java/org/carewebframework/messaging/jms/JMSUtil.java
JMSUtil.addRecipientSelector
private static void addRecipientSelector(String value, StringBuilder sb) { if (value != null) { sb.append(" OR Recipients LIKE '%,").append(value).append(",%'"); } }
java
private static void addRecipientSelector(String value, StringBuilder sb) { if (value != null) { sb.append(" OR Recipients LIKE '%,").append(value).append(",%'"); } }
[ "private", "static", "void", "addRecipientSelector", "(", "String", "value", ",", "StringBuilder", "sb", ")", "{", "if", "(", "value", "!=", "null", ")", "{", "sb", ".", "append", "(", "\" OR Recipients LIKE '%,\"", ")", ".", "append", "(", "value", ")", "...
Add a recipient selector for the given value. @param value Recipient value. @param sb String builder to receive value.
[ "Add", "a", "recipient", "selector", "for", "the", "given", "value", "." ]
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.messaging-parent/org.carewebframework.messaging.jms-parent/org.carewebframework.messaging.jms.core/src/main/java/org/carewebframework/messaging/jms/JMSUtil.java#L117-L121
lessthanoptimal/ddogleg
src/org/ddogleg/solver/PolynomialSolver.java
PolynomialSolver.createRootFinder
public static PolynomialRoots createRootFinder( RootFinderType type , int maxDegree ) { switch ( type ) { case EVD: return new RootFinderCompanion(); case STURM: FindRealRootsSturm sturm = new FindRealRootsSturm(maxDegree,-1,1e-10,30,20); return new WrapRealRootsSturm(sturm); } throw new Illeg...
java
public static PolynomialRoots createRootFinder( RootFinderType type , int maxDegree ) { switch ( type ) { case EVD: return new RootFinderCompanion(); case STURM: FindRealRootsSturm sturm = new FindRealRootsSturm(maxDegree,-1,1e-10,30,20); return new WrapRealRootsSturm(sturm); } throw new Illeg...
[ "public", "static", "PolynomialRoots", "createRootFinder", "(", "RootFinderType", "type", ",", "int", "maxDegree", ")", "{", "switch", "(", "type", ")", "{", "case", "EVD", ":", "return", "new", "RootFinderCompanion", "(", ")", ";", "case", "STURM", ":", "Fi...
Creates a generic polynomial root finding class which will return all real or all real and complex roots depending on the algorithm selected. @param type Which algorithm is to be returned. @param maxDegree Maximum degree of the polynomial being considered. @return Root finding algorithm.
[ "Creates", "a", "generic", "polynomial", "root", "finding", "class", "which", "will", "return", "all", "real", "or", "all", "real", "and", "complex", "roots", "depending", "on", "the", "algorithm", "selected", "." ]
train
https://github.com/lessthanoptimal/ddogleg/blob/3786bf448ba23d0e04962dd08c34fa68de276029/src/org/ddogleg/solver/PolynomialSolver.java#L44-L55
apache/incubator-heron
heron/api/src/java/org/apache/heron/api/topology/TopologyBuilder.java
TopologyBuilder.setBolt
public BoltDeclarer setBolt(String id, IWindowedBolt bolt, Number parallelismHint) throws IllegalArgumentException { return setBolt(id, new WindowedBoltExecutor(bolt), parallelismHint); }
java
public BoltDeclarer setBolt(String id, IWindowedBolt bolt, Number parallelismHint) throws IllegalArgumentException { return setBolt(id, new WindowedBoltExecutor(bolt), parallelismHint); }
[ "public", "BoltDeclarer", "setBolt", "(", "String", "id", ",", "IWindowedBolt", "bolt", ",", "Number", "parallelismHint", ")", "throws", "IllegalArgumentException", "{", "return", "setBolt", "(", "id", ",", "new", "WindowedBoltExecutor", "(", "bolt", ")", ",", "...
Define a new bolt in this topology. This defines a windowed bolt, intended for windowing operations. The {@link IWindowedBolt#execute(TupleWindow)} method is triggered for each window interval with the list of current events in the window. @param id the id of this component. This id is referenced by other components t...
[ "Define", "a", "new", "bolt", "in", "this", "topology", ".", "This", "defines", "a", "windowed", "bolt", "intended", "for", "windowing", "operations", ".", "The", "{", "@link", "IWindowedBolt#execute", "(", "TupleWindow", ")", "}", "method", "is", "triggered",...
train
https://github.com/apache/incubator-heron/blob/776abe2b5a45b93a0eb957fd65cbc149d901a92a/heron/api/src/java/org/apache/heron/api/topology/TopologyBuilder.java#L191-L194
apache/incubator-gobblin
gobblin-runtime/src/main/java/org/apache/gobblin/runtime/std/FilteredJobLifecycleListener.java
FilteredJobLifecycleListener.onDeleteJob
@Override public void onDeleteJob(URI deletedJobURI, String deletedJobVersion) { JobSpec fakeJobSpec = JobSpec.builder(deletedJobURI).withVersion(deletedJobVersion).build(); if (this.filter.apply(fakeJobSpec)) { this.delegate.onDeleteJob(deletedJobURI, deletedJobVersion); } }
java
@Override public void onDeleteJob(URI deletedJobURI, String deletedJobVersion) { JobSpec fakeJobSpec = JobSpec.builder(deletedJobURI).withVersion(deletedJobVersion).build(); if (this.filter.apply(fakeJobSpec)) { this.delegate.onDeleteJob(deletedJobURI, deletedJobVersion); } }
[ "@", "Override", "public", "void", "onDeleteJob", "(", "URI", "deletedJobURI", ",", "String", "deletedJobVersion", ")", "{", "JobSpec", "fakeJobSpec", "=", "JobSpec", ".", "builder", "(", "deletedJobURI", ")", ".", "withVersion", "(", "deletedJobVersion", ")", "...
{@inheritDoc} NOTE: For this callback only conditions on the URI and version will be used.
[ "{", "@inheritDoc", "}" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-runtime/src/main/java/org/apache/gobblin/runtime/std/FilteredJobLifecycleListener.java#L54-L59
googleapis/google-cloud-java
google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminClient.java
BigtableTableAdminClient.getTableAsync
@SuppressWarnings("WeakerAccess") public ApiFuture<Table> getTableAsync(String tableId) { return getTableAsync(tableId, com.google.bigtable.admin.v2.Table.View.SCHEMA_VIEW); }
java
@SuppressWarnings("WeakerAccess") public ApiFuture<Table> getTableAsync(String tableId) { return getTableAsync(tableId, com.google.bigtable.admin.v2.Table.View.SCHEMA_VIEW); }
[ "@", "SuppressWarnings", "(", "\"WeakerAccess\"", ")", "public", "ApiFuture", "<", "Table", ">", "getTableAsync", "(", "String", "tableId", ")", "{", "return", "getTableAsync", "(", "tableId", ",", "com", ".", "google", ".", "bigtable", ".", "admin", ".", "v...
Asynchronously gets the table metadata by tableId. <p>Sample code: <pre>{@code ApiFuture<Table> tableFuture = client.getTableAsync("my-table"); ApiFutures.addCallback( tableFuture, new ApiFutureCallback<Table>() { public void onSuccess(Table table) { System.out.println("Got metadata for table: " + table.getId()); Sy...
[ "Asynchronously", "gets", "the", "table", "metadata", "by", "tableId", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminClient.java#L484-L487
alkacon/opencms-core
src/org/opencms/file/CmsLinkRewriter.java
CmsLinkRewriter.rewriteContentString
protected String rewriteContentString(String originalContent) { Pattern uuidPattern = Pattern.compile(CmsUUID.UUID_REGEX); I_CmsRegexSubstitution substitution = new I_CmsRegexSubstitution() { public String substituteMatch(String text, Matcher matcher) { String uuidString =...
java
protected String rewriteContentString(String originalContent) { Pattern uuidPattern = Pattern.compile(CmsUUID.UUID_REGEX); I_CmsRegexSubstitution substitution = new I_CmsRegexSubstitution() { public String substituteMatch(String text, Matcher matcher) { String uuidString =...
[ "protected", "String", "rewriteContentString", "(", "String", "originalContent", ")", "{", "Pattern", "uuidPattern", "=", "Pattern", ".", "compile", "(", "CmsUUID", ".", "UUID_REGEX", ")", ";", "I_CmsRegexSubstitution", "substitution", "=", "new", "I_CmsRegexSubstitut...
Replaces structure ids of resources in the source subtree with the structure ids of the corresponding resources in the target subtree inside a content string.<p> @param originalContent the original content @return the content with the new structure ids
[ "Replaces", "structure", "ids", "of", "resources", "in", "the", "source", "subtree", "with", "the", "structure", "ids", "of", "the", "corresponding", "resources", "in", "the", "target", "subtree", "inside", "a", "content", "string", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/file/CmsLinkRewriter.java#L654-L671
sarl/sarl
main/internalmaven/sarl-maven-plugin/src/main/java/io/sarl/maven/compiler/MavenHelper.java
MavenHelper.getPluginDependencyVersion
public String getPluginDependencyVersion(String groupId, String artifactId) throws MojoExecutionException { final Map<String, Dependency> deps = getPluginDependencies(); final String key = ArtifactUtils.versionlessKey(groupId, artifactId); this.log.debug("COMPONENT DEPENDENCIES(getPluginVersionFromDependencies):"...
java
public String getPluginDependencyVersion(String groupId, String artifactId) throws MojoExecutionException { final Map<String, Dependency> deps = getPluginDependencies(); final String key = ArtifactUtils.versionlessKey(groupId, artifactId); this.log.debug("COMPONENT DEPENDENCIES(getPluginVersionFromDependencies):"...
[ "public", "String", "getPluginDependencyVersion", "(", "String", "groupId", ",", "String", "artifactId", ")", "throws", "MojoExecutionException", "{", "final", "Map", "<", "String", ",", "Dependency", ">", "deps", "=", "getPluginDependencies", "(", ")", ";", "fina...
Replies the version of the given plugin that is specified in the POM of the plugin in which this mojo is located. @param groupId the identifier of the group. @param artifactId thidentifier of the artifact. @return the version, never <code>null</code> @throws MojoExecutionException if the plugin was not found.
[ "Replies", "the", "version", "of", "the", "given", "plugin", "that", "is", "specified", "in", "the", "POM", "of", "the", "plugin", "in", "which", "this", "mojo", "is", "located", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/internalmaven/sarl-maven-plugin/src/main/java/io/sarl/maven/compiler/MavenHelper.java#L349-L363
OpenLiberty/open-liberty
dev/com.ibm.ws.security.authorization.jacc.web/src/com/ibm/ws/security/authorization/jacc/web/impl/WebSecurityPropagatorImpl.java
WebSecurityPropagatorImpl.isUnqualified
private boolean isUnqualified(String url, String urlPattern) { boolean unqualified = false; if (urlPattern.indexOf(":") != -1) { int idx = urlPattern.indexOf(":"); StringTokenizer st = new StringTokenizer(urlPattern.substring(idx + 1), ":"); while (st.hasMoreTokens())...
java
private boolean isUnqualified(String url, String urlPattern) { boolean unqualified = false; if (urlPattern.indexOf(":") != -1) { int idx = urlPattern.indexOf(":"); StringTokenizer st = new StringTokenizer(urlPattern.substring(idx + 1), ":"); while (st.hasMoreTokens())...
[ "private", "boolean", "isUnqualified", "(", "String", "url", ",", "String", "urlPattern", ")", "{", "boolean", "unqualified", "=", "false", ";", "if", "(", "urlPattern", ".", "indexOf", "(", "\":\"", ")", "!=", "-", "1", ")", "{", "int", "idx", "=", "u...
*********************************************************************** Any pattern, qualified by a pattern that matches it, is overridden and made irrelevant (in the translation) by the qualifying pattern. Specifically, all extension patterns and the default pattern are made irrelevant by the presence of the path pref...
[ "***********************************************************************", "Any", "pattern", "qualified", "by", "a", "pattern", "that", "matches", "it", "is", "overridden", "and", "made", "irrelevant", "(", "in", "the", "translation", ")", "by", "the", "qualifying", "pa...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.authorization.jacc.web/src/com/ibm/ws/security/authorization/jacc/web/impl/WebSecurityPropagatorImpl.java#L462-L475
diffplug/durian
src/com/diffplug/common/base/TreeComparison.java
TreeComparison.assertEqualMappedBy
public void assertEqualMappedBy(Function<? super E, ?> expectedMapper, Function<? super A, ?> actualMapper) { if (!isEqualMappedBy(expectedMapper, actualMapper)) { throwAssertionError(); } }
java
public void assertEqualMappedBy(Function<? super E, ?> expectedMapper, Function<? super A, ?> actualMapper) { if (!isEqualMappedBy(expectedMapper, actualMapper)) { throwAssertionError(); } }
[ "public", "void", "assertEqualMappedBy", "(", "Function", "<", "?", "super", "E", ",", "?", ">", "expectedMapper", ",", "Function", "<", "?", "super", "A", ",", "?", ">", "actualMapper", ")", "{", "if", "(", "!", "isEqualMappedBy", "(", "expectedMapper", ...
Asserts that the trees are equal, by calling {@link Objects#equals(Object, Object)} on the results of both mappers. @see #isEqualMappedBy(Function, Function)
[ "Asserts", "that", "the", "trees", "are", "equal", "by", "calling", "{", "@link", "Objects#equals", "(", "Object", "Object", ")", "}", "on", "the", "results", "of", "both", "mappers", "." ]
train
https://github.com/diffplug/durian/blob/10631a3480e5491eb6eb6ee06e752d8596914232/src/com/diffplug/common/base/TreeComparison.java#L84-L88
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/olap/ParsedQuery.java
ParsedQuery.getBoolean
public boolean getBoolean(String key, boolean defaultValue) { String value = get(key); if(value == null) return defaultValue; return XType.getBoolean(value); }
java
public boolean getBoolean(String key, boolean defaultValue) { String value = get(key); if(value == null) return defaultValue; return XType.getBoolean(value); }
[ "public", "boolean", "getBoolean", "(", "String", "key", ",", "boolean", "defaultValue", ")", "{", "String", "value", "=", "get", "(", "key", ")", ";", "if", "(", "value", "==", "null", ")", "return", "defaultValue", ";", "return", "XType", ".", "getBool...
Returns a boolean value by the key specified or defaultValue if the key was not provided
[ "Returns", "a", "boolean", "value", "by", "the", "key", "specified", "or", "defaultValue", "if", "the", "key", "was", "not", "provided" ]
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/olap/ParsedQuery.java#L136-L140
amaembo/streamex
src/main/java/one/util/streamex/StreamEx.java
StreamEx.toNavigableMap
public <K, V> NavigableMap<K, V> toNavigableMap(Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valMapper, BinaryOperator<V> mergeFunction) { return rawCollect(Collectors.toMap(keyMapper, valMapper, mergeFunction, TreeMap::new)); }
java
public <K, V> NavigableMap<K, V> toNavigableMap(Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valMapper, BinaryOperator<V> mergeFunction) { return rawCollect(Collectors.toMap(keyMapper, valMapper, mergeFunction, TreeMap::new)); }
[ "public", "<", "K", ",", "V", ">", "NavigableMap", "<", "K", ",", "V", ">", "toNavigableMap", "(", "Function", "<", "?", "super", "T", ",", "?", "extends", "K", ">", "keyMapper", ",", "Function", "<", "?", "super", "T", ",", "?", "extends", "V", ...
Returns a {@link NavigableMap} whose keys and values are the result of applying the provided mapping functions to the input elements. <p> This is a <a href="package-summary.html#StreamOps">terminal</a> operation. <p> If the mapped keys contains duplicates (according to {@link Object#equals(Object)}), the value mappin...
[ "Returns", "a", "{", "@link", "NavigableMap", "}", "whose", "keys", "and", "values", "are", "the", "result", "of", "applying", "the", "provided", "mapping", "functions", "to", "the", "input", "elements", "." ]
train
https://github.com/amaembo/streamex/blob/936bbd1b7dfbcf64a3b990682bfc848213441d14/src/main/java/one/util/streamex/StreamEx.java#L1258-L1261
pip-services3-java/pip-services3-commons-java
src/org/pipservices3/commons/refer/Referencer.java
Referencer.setReferences
public static void setReferences(IReferences references, Iterable<Object> components) throws ReferenceException, ConfigException { for (Object component : components) setReferencesForOne(references, component); } /** * Unsets references in specific component. * * To unset references components must i...
java
public static void setReferences(IReferences references, Iterable<Object> components) throws ReferenceException, ConfigException { for (Object component : components) setReferencesForOne(references, component); } /** * Unsets references in specific component. * * To unset references components must i...
[ "public", "static", "void", "setReferences", "(", "IReferences", "references", ",", "Iterable", "<", "Object", ">", "components", ")", "throws", "ReferenceException", ",", "ConfigException", "{", "for", "(", "Object", "component", ":", "components", ")", "setRefer...
Sets references to multiple components. To set references components must implement IReferenceable interface. If they don't the call to this method has no effect. @param references the references to be set. @param components a list of components to set the references to. @throws ReferenceException when no references ...
[ "Sets", "references", "to", "multiple", "components", "." ]
train
https://github.com/pip-services3-java/pip-services3-commons-java/blob/a8a0c3e5ec58f0663c295aa855c6b3afad2af86a/src/org/pipservices3/commons/refer/Referencer.java#L45-L81
jeremylong/DependencyCheck
cli/src/main/java/org/owasp/dependencycheck/CliParser.java
CliParser.isNodeAuditDisabled
public boolean isNodeAuditDisabled() { if (hasDisableOption("disableNSP", Settings.KEYS.ANALYZER_NODE_AUDIT_ENABLED)) { LOGGER.error("The disableNSP argument has been deprecated and replaced by disableNodeAudit"); LOGGER.error("The disableNSP argument will be removed in the next version"...
java
public boolean isNodeAuditDisabled() { if (hasDisableOption("disableNSP", Settings.KEYS.ANALYZER_NODE_AUDIT_ENABLED)) { LOGGER.error("The disableNSP argument has been deprecated and replaced by disableNodeAudit"); LOGGER.error("The disableNSP argument will be removed in the next version"...
[ "public", "boolean", "isNodeAuditDisabled", "(", ")", "{", "if", "(", "hasDisableOption", "(", "\"disableNSP\"", ",", "Settings", ".", "KEYS", ".", "ANALYZER_NODE_AUDIT_ENABLED", ")", ")", "{", "LOGGER", ".", "error", "(", "\"The disableNSP argument has been deprecate...
Returns true if the disableNodeAudit command line argument was specified. @return true if the disableNodeAudit command line argument was specified; otherwise false
[ "Returns", "true", "if", "the", "disableNodeAudit", "command", "line", "argument", "was", "specified", "." ]
train
https://github.com/jeremylong/DependencyCheck/blob/6cc7690ea12e4ca1454210ceaa2e9a5523f0926c/cli/src/main/java/org/owasp/dependencycheck/CliParser.java#L766-L773
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/jdbc/DBInitializerHelper.java
DBInitializerHelper.prepareScripts
public static String prepareScripts(WorkspaceEntry wsEntry, String dialect) throws IOException, RepositoryConfigurationException { String itemTableSuffix = getItemTableSuffix(wsEntry); String valueTableSuffix = getValueTableSuffix(wsEntry); String refTableSuffix = getRefTableSuffix(wsEntry); ...
java
public static String prepareScripts(WorkspaceEntry wsEntry, String dialect) throws IOException, RepositoryConfigurationException { String itemTableSuffix = getItemTableSuffix(wsEntry); String valueTableSuffix = getValueTableSuffix(wsEntry); String refTableSuffix = getRefTableSuffix(wsEntry); ...
[ "public", "static", "String", "prepareScripts", "(", "WorkspaceEntry", "wsEntry", ",", "String", "dialect", ")", "throws", "IOException", ",", "RepositoryConfigurationException", "{", "String", "itemTableSuffix", "=", "getItemTableSuffix", "(", "wsEntry", ")", ";", "S...
Returns SQL scripts for initialization database for defined {@link WorkspaceEntry}. @param wsEntry workspace configuration @param dialect database dialect which is used, since {@link JDBCWorkspaceDataContainer#DB_DIALECT} parameter can contain {@link DialectConstants#DB_DIALECT_AUTO} value it is necessary to resolve d...
[ "Returns", "SQL", "scripts", "for", "initialization", "database", "for", "defined", "{", "@link", "WorkspaceEntry", "}", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/jdbc/DBInitializerHelper.java#L79-L92
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/user/UserCoreDao.java
UserCoreDao.queryForValueFieldValues
public TResult queryForValueFieldValues(Map<String, ColumnValue> fieldValues) { String where = buildValueWhere(fieldValues.entrySet()); String[] whereArgs = buildValueWhereArgs(fieldValues.values()); TResult result = userDb.query(getTableName(), table.getColumnNames(), where, whereArgs, null, null, null); p...
java
public TResult queryForValueFieldValues(Map<String, ColumnValue> fieldValues) { String where = buildValueWhere(fieldValues.entrySet()); String[] whereArgs = buildValueWhereArgs(fieldValues.values()); TResult result = userDb.query(getTableName(), table.getColumnNames(), where, whereArgs, null, null, null); p...
[ "public", "TResult", "queryForValueFieldValues", "(", "Map", "<", "String", ",", "ColumnValue", ">", "fieldValues", ")", "{", "String", "where", "=", "buildValueWhere", "(", "fieldValues", ".", "entrySet", "(", ")", ")", ";", "String", "[", "]", "whereArgs", ...
Query for the row where all fields match their values @param fieldValues field values @return result
[ "Query", "for", "the", "row", "where", "all", "fields", "match", "their", "values" ]
train
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/user/UserCoreDao.java#L370-L377
alibaba/jstorm
jstorm-core/src/main/java/com/alibaba/jstorm/utils/LoadConf.java
LoadConf.dumpYaml
public static void dumpYaml(Map conf, String file) { Yaml yaml = new Yaml(); try { Writer writer = new OutputStreamWriter(new FileOutputStream(file), "UTF-8"); yaml.dump(conf, writer); } catch (Exception ex) { LOG.error("Error:", ex); } }
java
public static void dumpYaml(Map conf, String file) { Yaml yaml = new Yaml(); try { Writer writer = new OutputStreamWriter(new FileOutputStream(file), "UTF-8"); yaml.dump(conf, writer); } catch (Exception ex) { LOG.error("Error:", ex); } }
[ "public", "static", "void", "dumpYaml", "(", "Map", "conf", ",", "String", "file", ")", "{", "Yaml", "yaml", "=", "new", "Yaml", "(", ")", ";", "try", "{", "Writer", "writer", "=", "new", "OutputStreamWriter", "(", "new", "FileOutputStream", "(", "file",...
dumps a conf map into a file, note that the output yaml file uses a compact format e.g., for a list, it uses key: [xx, xx] instead of multiple lines.
[ "dumps", "a", "conf", "map", "into", "a", "file", "note", "that", "the", "output", "yaml", "file", "uses", "a", "compact", "format", "e", ".", "g", ".", "for", "a", "list", "it", "uses", "key", ":", "[", "xx", "xx", "]", "instead", "of", "multiple"...
train
https://github.com/alibaba/jstorm/blob/5d6cde22dbca7df3d6e6830bf94f98a6639ab559/jstorm-core/src/main/java/com/alibaba/jstorm/utils/LoadConf.java#L174-L182
Mangopay/mangopay2-java-sdk
src/main/java/com/mangopay/core/UrlTool.java
UrlTool.getRestUrl
public String getRestUrl(String urlKey) throws UnsupportedEncodingException { return getRestUrl(urlKey, true, null, null); }
java
public String getRestUrl(String urlKey) throws UnsupportedEncodingException { return getRestUrl(urlKey, true, null, null); }
[ "public", "String", "getRestUrl", "(", "String", "urlKey", ")", "throws", "UnsupportedEncodingException", "{", "return", "getRestUrl", "(", "urlKey", ",", "true", ",", "null", ",", "null", ")", ";", "}" ]
Gets REST url. @param urlKey Url key. @return Final REST url. @throws UnsupportedEncodingException
[ "Gets", "REST", "url", "." ]
train
https://github.com/Mangopay/mangopay2-java-sdk/blob/037cecb44ea62def63b507817fd9961649151157/src/main/java/com/mangopay/core/UrlTool.java#L46-L48
apereo/cas
support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/authenticator/OAuth20CasAuthenticationBuilder.java
OAuth20CasAuthenticationBuilder.build
public Authentication build(final UserProfile profile, final OAuthRegisteredService registeredService, final J2EContext context, final Service service) { val profileAttributes = CoreAuthenticationUtils.convertAttrib...
java
public Authentication build(final UserProfile profile, final OAuthRegisteredService registeredService, final J2EContext context, final Service service) { val profileAttributes = CoreAuthenticationUtils.convertAttrib...
[ "public", "Authentication", "build", "(", "final", "UserProfile", "profile", ",", "final", "OAuthRegisteredService", "registeredService", ",", "final", "J2EContext", "context", ",", "final", "Service", "service", ")", "{", "val", "profileAttributes", "=", "CoreAuthent...
Create an authentication from a user profile. @param profile the given user profile @param registeredService the registered service @param context the context @param service the service @return the built authentication
[ "Create", "an", "authentication", "from", "a", "user", "profile", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/authenticator/OAuth20CasAuthenticationBuilder.java#L91-L126
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/parser/lexparser/Options.java
Options.setOptionsOrWarn
public void setOptionsOrWarn(final String[] flags, final int startIndex, final int endIndexPlusOne) { for (int i = startIndex; i < endIndexPlusOne;) { i = setOptionOrWarn(flags, i); } }
java
public void setOptionsOrWarn(final String[] flags, final int startIndex, final int endIndexPlusOne) { for (int i = startIndex; i < endIndexPlusOne;) { i = setOptionOrWarn(flags, i); } }
[ "public", "void", "setOptionsOrWarn", "(", "final", "String", "[", "]", "flags", ",", "final", "int", "startIndex", ",", "final", "int", "endIndexPlusOne", ")", "{", "for", "(", "int", "i", "=", "startIndex", ";", "i", "<", "endIndexPlusOne", ";", ")", "...
Set options based on a String array in the style of commandline flags. This method goes through the array until it ends, processing options, as for {@link #setOption}. @param flags Array of options. The options passed in should be specified like command-line arguments, including with an initial minus sign for exampl...
[ "Set", "options", "based", "on", "a", "String", "array", "in", "the", "style", "of", "commandline", "flags", ".", "This", "method", "goes", "through", "the", "array", "until", "it", "ends", "processing", "options", "as", "for", "{", "@link", "#setOption", ...
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/parser/lexparser/Options.java#L100-L104
Azure/azure-sdk-for-java
sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ExtendedServerBlobAuditingPoliciesInner.java
ExtendedServerBlobAuditingPoliciesInner.beginCreateOrUpdateAsync
public Observable<ExtendedServerBlobAuditingPolicyInner> beginCreateOrUpdateAsync(String resourceGroupName, String serverName, ExtendedServerBlobAuditingPolicyInner parameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, parameters).map(new Func1<ServiceResponse<ExtendedS...
java
public Observable<ExtendedServerBlobAuditingPolicyInner> beginCreateOrUpdateAsync(String resourceGroupName, String serverName, ExtendedServerBlobAuditingPolicyInner parameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, parameters).map(new Func1<ServiceResponse<ExtendedS...
[ "public", "Observable", "<", "ExtendedServerBlobAuditingPolicyInner", ">", "beginCreateOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "ExtendedServerBlobAuditingPolicyInner", "parameters", ")", "{", "return", "beginCreateOrUpdateWithServiceR...
Creates or updates an extended server's blob auditing policy. @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 parameters Properties of extended blob auditing...
[ "Creates", "or", "updates", "an", "extended", "server", "s", "blob", "auditing", "policy", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ExtendedServerBlobAuditingPoliciesInner.java#L274-L281
aws/aws-sdk-java
aws-java-sdk-cloudformation/src/main/java/com/amazonaws/services/cloudformation/model/DescribeStackResourceDriftsResult.java
DescribeStackResourceDriftsResult.getStackResourceDrifts
public java.util.List<StackResourceDrift> getStackResourceDrifts() { if (stackResourceDrifts == null) { stackResourceDrifts = new com.amazonaws.internal.SdkInternalList<StackResourceDrift>(); } return stackResourceDrifts; }
java
public java.util.List<StackResourceDrift> getStackResourceDrifts() { if (stackResourceDrifts == null) { stackResourceDrifts = new com.amazonaws.internal.SdkInternalList<StackResourceDrift>(); } return stackResourceDrifts; }
[ "public", "java", ".", "util", ".", "List", "<", "StackResourceDrift", ">", "getStackResourceDrifts", "(", ")", "{", "if", "(", "stackResourceDrifts", "==", "null", ")", "{", "stackResourceDrifts", "=", "new", "com", ".", "amazonaws", ".", "internal", ".", "...
<p> Drift information for the resources that have been checked for drift in the specified stack. This includes actual and expected configuration values for resources where AWS CloudFormation detects drift. </p> <p> For a given stack, there will be one <code>StackResourceDrift</code> for each stack resource that has bee...
[ "<p", ">", "Drift", "information", "for", "the", "resources", "that", "have", "been", "checked", "for", "drift", "in", "the", "specified", "stack", ".", "This", "includes", "actual", "and", "expected", "configuration", "values", "for", "resources", "where", "A...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-cloudformation/src/main/java/com/amazonaws/services/cloudformation/model/DescribeStackResourceDriftsResult.java#L77-L82
plaid/plaid-java
src/main/java/com/plaid/client/internal/Util.java
Util.arrayToMap
public static Map<String, String> arrayToMap(String[] args) { if (args.length % 2 != 0) { throw new IllegalArgumentException("Must pass in an even number of args, one key per value."); } Map<String, String> ret = new HashMap<>(); for (int i = 0; i < args.length; i += 2) { ret.put(args[i], ...
java
public static Map<String, String> arrayToMap(String[] args) { if (args.length % 2 != 0) { throw new IllegalArgumentException("Must pass in an even number of args, one key per value."); } Map<String, String> ret = new HashMap<>(); for (int i = 0; i < args.length; i += 2) { ret.put(args[i], ...
[ "public", "static", "Map", "<", "String", ",", "String", ">", "arrayToMap", "(", "String", "[", "]", "args", ")", "{", "if", "(", "args", ".", "length", "%", "2", "!=", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Must pass in an ev...
Helper to convert an alternating key1,value1,key2,value2,... array into a map. @param args Alternating arguments. @return Resulting map.
[ "Helper", "to", "convert", "an", "alternating", "key1", "value1", "key2", "value2", "...", "array", "into", "a", "map", "." ]
train
https://github.com/plaid/plaid-java/blob/360f1f8a5178fa0c3c2c2e07a58f8ccec5f33117/src/main/java/com/plaid/client/internal/Util.java#L107-L119
jbossws/jbossws-cxf
modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/addressing/map/CXFMAPBuilder.java
CXFMAPBuilder.inboundMap
public MAP inboundMap(Map<String, Object> ctx) { AddressingProperties implementation = (AddressingProperties)ctx.get(CXFMAPConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND); return newMap(implementation); }
java
public MAP inboundMap(Map<String, Object> ctx) { AddressingProperties implementation = (AddressingProperties)ctx.get(CXFMAPConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND); return newMap(implementation); }
[ "public", "MAP", "inboundMap", "(", "Map", "<", "String", ",", "Object", ">", "ctx", ")", "{", "AddressingProperties", "implementation", "=", "(", "AddressingProperties", ")", "ctx", ".", "get", "(", "CXFMAPConstants", ".", "SERVER_ADDRESSING_PROPERTIES_INBOUND", ...
retrieve the inbound server message address properties attached to a message context @param ctx the server message context @return
[ "retrieve", "the", "inbound", "server", "message", "address", "properties", "attached", "to", "a", "message", "context" ]
train
https://github.com/jbossws/jbossws-cxf/blob/e1d5df3664cbc2482ebc83cafd355a4d60d12150/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/addressing/map/CXFMAPBuilder.java#L71-L75
jenkinsci/artifactory-plugin
src/main/java/org/jfrog/hudson/util/IssuesTrackerHelper.java
IssuesTrackerHelper.setIssueTrackerInfo
public void setIssueTrackerInfo(BuildInfoBuilder builder) { Issues issues = new Issues(); issues.setAggregateBuildIssues(aggregateBuildIssues); issues.setAggregationBuildStatus(aggregationBuildStatus); issues.setTracker(new IssueTracker("JIRA", issueTrackerVersion)); Set<Issue> a...
java
public void setIssueTrackerInfo(BuildInfoBuilder builder) { Issues issues = new Issues(); issues.setAggregateBuildIssues(aggregateBuildIssues); issues.setAggregationBuildStatus(aggregationBuildStatus); issues.setTracker(new IssueTracker("JIRA", issueTrackerVersion)); Set<Issue> a...
[ "public", "void", "setIssueTrackerInfo", "(", "BuildInfoBuilder", "builder", ")", "{", "Issues", "issues", "=", "new", "Issues", "(", ")", ";", "issues", ".", "setAggregateBuildIssues", "(", "aggregateBuildIssues", ")", ";", "issues", ".", "setAggregationBuildStatus...
Apply issues tracker info to a build info builder (used by generic tasks and maven2 which doesn't use the extractor
[ "Apply", "issues", "tracker", "info", "to", "a", "build", "info", "builder", "(", "used", "by", "generic", "tasks", "and", "maven2", "which", "doesn", "t", "use", "the", "extractor" ]
train
https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/util/IssuesTrackerHelper.java#L103-L113
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Hierarchy.java
Hierarchy.isSubtype
public static boolean isSubtype(@DottedClassName String clsName, @DottedClassName String possibleSupertypeClassName) throws ClassNotFoundException { Subtypes2 subtypes2 = Global.getAnalysisCache().getDatabase(Subtypes2.class); return subtypes2.isSubtype(DescriptorFactory.createClassDescriptorFromDottedC...
java
public static boolean isSubtype(@DottedClassName String clsName, @DottedClassName String possibleSupertypeClassName) throws ClassNotFoundException { Subtypes2 subtypes2 = Global.getAnalysisCache().getDatabase(Subtypes2.class); return subtypes2.isSubtype(DescriptorFactory.createClassDescriptorFromDottedC...
[ "public", "static", "boolean", "isSubtype", "(", "@", "DottedClassName", "String", "clsName", ",", "@", "DottedClassName", "String", "possibleSupertypeClassName", ")", "throws", "ClassNotFoundException", "{", "Subtypes2", "subtypes2", "=", "Global", ".", "getAnalysisCac...
Determine whether one class (or reference type) is a subtype of another. @param clsName the name of the class or reference type @param possibleSupertypeClassName the name of the possible superclass @return true if clsName is a subtype of possibleSupertypeClassName, false if not
[ "Determine", "whether", "one", "class", "(", "or", "reference", "type", ")", "is", "a", "subtype", "of", "another", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Hierarchy.java#L95-L98
netty/netty
codec/src/main/java/io/netty/handler/codec/compression/Snappy.java
Snappy.encodeLiteral
static void encodeLiteral(ByteBuf in, ByteBuf out, int length) { if (length < 61) { out.writeByte(length - 1 << 2); } else { int bitLength = bitsToEncode(length - 1); int bytesToEncode = 1 + bitLength / 8; out.writeByte(59 + bytesToEncode << 2); ...
java
static void encodeLiteral(ByteBuf in, ByteBuf out, int length) { if (length < 61) { out.writeByte(length - 1 << 2); } else { int bitLength = bitsToEncode(length - 1); int bytesToEncode = 1 + bitLength / 8; out.writeByte(59 + bytesToEncode << 2); ...
[ "static", "void", "encodeLiteral", "(", "ByteBuf", "in", ",", "ByteBuf", "out", ",", "int", "length", ")", "{", "if", "(", "length", "<", "61", ")", "{", "out", ".", "writeByte", "(", "length", "-", "1", "<<", "2", ")", ";", "}", "else", "{", "in...
Writes a literal to the supplied output buffer by directly copying from the input buffer. The literal is taken from the current readerIndex up to the supplied length. @param in The input buffer to copy from @param out The output buffer to copy to @param length The length of the literal to copy
[ "Writes", "a", "literal", "to", "the", "supplied", "output", "buffer", "by", "directly", "copying", "from", "the", "input", "buffer", ".", "The", "literal", "is", "taken", "from", "the", "current", "readerIndex", "up", "to", "the", "supplied", "length", "." ...
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec/src/main/java/io/netty/handler/codec/compression/Snappy.java#L223-L236
OpenLiberty/open-liberty
dev/com.ibm.ws.org.apache.cxf.cxf.core.3.2/src/org/apache/cxf/staxutils/StaxUtils.java
StaxUtils.readQName
public static QName readQName(XMLStreamReader reader) throws XMLStreamException { String value = reader.getElementText(); if (value == null) { return null; } value = value.trim(); int index = value.indexOf(":"); if (index == -1) { return new QNam...
java
public static QName readQName(XMLStreamReader reader) throws XMLStreamException { String value = reader.getElementText(); if (value == null) { return null; } value = value.trim(); int index = value.indexOf(":"); if (index == -1) { return new QNam...
[ "public", "static", "QName", "readQName", "(", "XMLStreamReader", "reader", ")", "throws", "XMLStreamException", "{", "String", "value", "=", "reader", ".", "getElementText", "(", ")", ";", "if", "(", "value", "==", "null", ")", "{", "return", "null", ";", ...
Reads a QName from the element text. Reader must be positioned at the start tag.
[ "Reads", "a", "QName", "from", "the", "element", "text", ".", "Reader", "must", "be", "positioned", "at", "the", "start", "tag", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.org.apache.cxf.cxf.core.3.2/src/org/apache/cxf/staxutils/StaxUtils.java#L1851-L1877
OpenLiberty/open-liberty
dev/com.ibm.ws.repository/src/com/ibm/ws/repository/transport/client/AbstractRepositoryClient.java
AbstractRepositoryClient.getAssetsWithUnboundedMaxVersion
@Override public Collection<Asset> getAssetsWithUnboundedMaxVersion(final Collection<ResourceType> types, final Collection<String> rightProductIds, final Visibility visibility) throws IOException, RequestFailureException { return getFilteredAsset...
java
@Override public Collection<Asset> getAssetsWithUnboundedMaxVersion(final Collection<ResourceType> types, final Collection<String> rightProductIds, final Visibility visibility) throws IOException, RequestFailureException { return getFilteredAsset...
[ "@", "Override", "public", "Collection", "<", "Asset", ">", "getAssetsWithUnboundedMaxVersion", "(", "final", "Collection", "<", "ResourceType", ">", "types", ",", "final", "Collection", "<", "String", ">", "rightProductIds", ",", "final", "Visibility", "visibility"...
This method will return all of the assets matching specific filters in Massive that do not have a maximum version in their applies to filter info. It will just return a summary of each asset and not include any {@link Attachment}s. @param types The types to look for or <code>null</code> will return all types @param pr...
[ "This", "method", "will", "return", "all", "of", "the", "assets", "matching", "specific", "filters", "in", "Massive", "that", "do", "not", "have", "a", "maximum", "version", "in", "their", "applies", "to", "filter", "info", ".", "It", "will", "just", "retu...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.repository/src/com/ibm/ws/repository/transport/client/AbstractRepositoryClient.java#L67-L71
netscaler/sdx_nitro
src/main/java/com/citrix/sdx/nitro/resource/config/mps/ping.java
ping.get_nitro_bulk_response
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { ping_responses result = (ping_responses) service.get_payload_formatter().string_to_resource(ping_responses.class, response); if(result.errorcode != 0) { if (result.errorcode == SESSION_NOT_EXISTS)...
java
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { ping_responses result = (ping_responses) service.get_payload_formatter().string_to_resource(ping_responses.class, response); if(result.errorcode != 0) { if (result.errorcode == SESSION_NOT_EXISTS)...
[ "protected", "base_resource", "[", "]", "get_nitro_bulk_response", "(", "nitro_service", "service", ",", "String", "response", ")", "throws", "Exception", "{", "ping_responses", "result", "=", "(", "ping_responses", ")", "service", ".", "get_payload_formatter", "(", ...
<pre> Converts API response of bulk operation into object and returns the object array in case of get request. </pre>
[ "<pre", ">", "Converts", "API", "response", "of", "bulk", "operation", "into", "object", "and", "returns", "the", "object", "array", "in", "case", "of", "get", "request", ".", "<", "/", "pre", ">" ]
train
https://github.com/netscaler/sdx_nitro/blob/c840919f1a8f7c0a5634c0f23d34fa14d1765ff1/src/main/java/com/citrix/sdx/nitro/resource/config/mps/ping.java#L203-L220
threerings/nenya
core/src/main/java/com/threerings/media/util/AStarPathUtil.java
AStarPathUtil.considerStep
protected static void considerStep (Info info, Node n, int x, int y, int cost) { // skip node if it's outside the map bounds or otherwise impassable if (!info.isStepValid(n.x, n.y, x, y)) { return; } // calculate the new cost for this node int newg = n.g + cost; ...
java
protected static void considerStep (Info info, Node n, int x, int y, int cost) { // skip node if it's outside the map bounds or otherwise impassable if (!info.isStepValid(n.x, n.y, x, y)) { return; } // calculate the new cost for this node int newg = n.g + cost; ...
[ "protected", "static", "void", "considerStep", "(", "Info", "info", ",", "Node", "n", ",", "int", "x", ",", "int", "y", ",", "int", "cost", ")", "{", "// skip node if it's outside the map bounds or otherwise impassable", "if", "(", "!", "info", ".", "isStepValid...
Consider the step <code>(n.x, n.y)</code> to <code>(x, y)</code> for possible inclusion in the path. @param info the info object. @param n the originating node for the step. @param x the x-coordinate for the destination step. @param y the y-coordinate for the destination step.
[ "Consider", "the", "step", "<code", ">", "(", "n", ".", "x", "n", ".", "y", ")", "<", "/", "code", ">", "to", "<code", ">", "(", "x", "y", ")", "<", "/", "code", ">", "for", "possible", "inclusion", "in", "the", "path", "." ]
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/util/AStarPathUtil.java#L226-L267
alkacon/opencms-core
src/org/opencms/flex/CmsFlexCache.java
CmsFlexCache.getCachedKey
public CmsFlexCacheKey getCachedKey(String key, CmsObject cms) { if (!isEnabled() || !OpenCms.getRoleManager().hasRole(cms, CmsRole.WORKPLACE_MANAGER)) { return null; } Object o = m_keyCache.get(key); if (o != null) { return ((CmsFlexCacheVariation)o).m_key; ...
java
public CmsFlexCacheKey getCachedKey(String key, CmsObject cms) { if (!isEnabled() || !OpenCms.getRoleManager().hasRole(cms, CmsRole.WORKPLACE_MANAGER)) { return null; } Object o = m_keyCache.get(key); if (o != null) { return ((CmsFlexCacheVariation)o).m_key; ...
[ "public", "CmsFlexCacheKey", "getCachedKey", "(", "String", "key", ",", "CmsObject", "cms", ")", "{", "if", "(", "!", "isEnabled", "(", ")", "||", "!", "OpenCms", ".", "getRoleManager", "(", ")", ".", "hasRole", "(", "cms", ",", "CmsRole", ".", "WORKPLAC...
Returns the CmsFlexCacheKey data structure for a given key (i.e. resource name).<p> Useful if you want to show the cache key for a resources, like on the FlexCache administration page.<p> Only users with administrator permissions are allowed to perform this operation.<p> @param key the resource name for which to loo...
[ "Returns", "the", "CmsFlexCacheKey", "data", "structure", "for", "a", "given", "key", "(", "i", ".", "e", ".", "resource", "name", ")", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/flex/CmsFlexCache.java#L504-L514