repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
18
194
func_name
stringlengths
6
111
whole_func_string
stringlengths
80
3.8k
language
stringclasses
1 value
func_code_string
stringlengths
80
3.8k
func_code_tokens
listlengths
20
697
func_documentation_string
stringlengths
61
2k
func_documentation_tokens
listlengths
1
434
split_name
stringclasses
1 value
func_code_url
stringlengths
111
308
zaproxy/zaproxy
src/org/zaproxy/zap/extension/httpsessions/HttpSession.java
HttpSession.matchesToken
public boolean matchesToken(String tokenName, HttpCookie cookie) { // Check if the cookie is null if (cookie == null) { return tokenValues.containsKey(tokenName) ? false : true; } // Check the value of the token from the cookie String tokenValue = getTokenValue(tokenName); if (tokenValue != null && toke...
java
public boolean matchesToken(String tokenName, HttpCookie cookie) { // Check if the cookie is null if (cookie == null) { return tokenValues.containsKey(tokenName) ? false : true; } // Check the value of the token from the cookie String tokenValue = getTokenValue(tokenName); if (tokenValue != null && toke...
[ "public", "boolean", "matchesToken", "(", "String", "tokenName", ",", "HttpCookie", "cookie", ")", "{", "// Check if the cookie is null", "if", "(", "cookie", "==", "null", ")", "{", "return", "tokenValues", ".", "containsKey", "(", "tokenName", ")", "?", "false...
Checks if a particular cookie has the same value as one of the token values in the HTTP session. If the {@literal cookie} parameter is null, the session matches the token if it does not have a value for the corresponding token. @param tokenName the token name @param cookie the cookie @return true, if true
[ "Checks", "if", "a", "particular", "cookie", "has", "the", "same", "value", "as", "one", "of", "the", "token", "values", "in", "the", "HTTP", "session", ".", "If", "the", "{", "@literal", "cookie", "}", "parameter", "is", "null", "the", "session", "match...
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/httpsessions/HttpSession.java#L147-L159
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SimpleDateFormat.java
SimpleDateFormat.subParse
protected int subParse(String text, int start, char ch, int count, boolean obeyCount, boolean allowNegative, boolean[] ambiguousYear, Calendar cal) { return subParse(text, start, ch, count, obeyCount, allowNegative, ambiguousYear, cal, null, null); }
java
protected int subParse(String text, int start, char ch, int count, boolean obeyCount, boolean allowNegative, boolean[] ambiguousYear, Calendar cal) { return subParse(text, start, ch, count, obeyCount, allowNegative, ambiguousYear, cal, null, null); }
[ "protected", "int", "subParse", "(", "String", "text", ",", "int", "start", ",", "char", "ch", ",", "int", "count", ",", "boolean", "obeyCount", ",", "boolean", "allowNegative", ",", "boolean", "[", "]", "ambiguousYear", ",", "Calendar", "cal", ")", "{", ...
Protected method that converts one field of the input string into a numeric field value in <code>cal</code>. Returns -start (for ParsePosition) if failed. Subclasses may override this method to modify or add parsing capabilities. @param text the time text to be parsed. @param start where to start parsing. @param ch t...
[ "Protected", "method", "that", "converts", "one", "field", "of", "the", "input", "string", "into", "a", "numeric", "field", "value", "in", "<code", ">", "cal<", "/", "code", ">", ".", "Returns", "-", "start", "(", "for", "ParsePosition", ")", "if", "fail...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SimpleDateFormat.java#L3038-L3043
alkacon/opencms-core
src/org/opencms/db/CmsDriverManager.java
CmsDriverManager.getNumberedName
protected String getNumberedName(String name, int number) { if (number == 0) { return name; } PrintfFormat fmt = new PrintfFormat("%0.6d"); return name + "_" + fmt.sprintf(number); }
java
protected String getNumberedName(String name, int number) { if (number == 0) { return name; } PrintfFormat fmt = new PrintfFormat("%0.6d"); return name + "_" + fmt.sprintf(number); }
[ "protected", "String", "getNumberedName", "(", "String", "name", ",", "int", "number", ")", "{", "if", "(", "number", "==", "0", ")", "{", "return", "name", ";", "}", "PrintfFormat", "fmt", "=", "new", "PrintfFormat", "(", "\"%0.6d\"", ")", ";", "return"...
Adds a numeric suffix to the end of a string, unless the number passed as a parameter is 0.<p> @param name the base name @param number the number from which to form the suffix @return the concatenation of the base name and possibly the numeric suffix
[ "Adds", "a", "numeric", "suffix", "to", "the", "end", "of", "a", "string", "unless", "the", "number", "passed", "as", "a", "parameter", "is", "0", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsDriverManager.java#L10503-L10510
micronaut-projects/micronaut-core
inject/src/main/java/io/micronaut/context/AbstractBeanDefinition.java
AbstractBeanDefinition.getValueForField
@SuppressWarnings("WeakerAccess") @Internal @UsedByGeneratedCode protected final Object getValueForField(BeanResolutionContext resolutionContext, BeanContext context, int fieldIndex) { FieldInjectionPoint injectionPoint = fieldInjectionPoints.get(fieldIndex); BeanResolutionContext.Path path ...
java
@SuppressWarnings("WeakerAccess") @Internal @UsedByGeneratedCode protected final Object getValueForField(BeanResolutionContext resolutionContext, BeanContext context, int fieldIndex) { FieldInjectionPoint injectionPoint = fieldInjectionPoints.get(fieldIndex); BeanResolutionContext.Path path ...
[ "@", "SuppressWarnings", "(", "\"WeakerAccess\"", ")", "@", "Internal", "@", "UsedByGeneratedCode", "protected", "final", "Object", "getValueForField", "(", "BeanResolutionContext", "resolutionContext", ",", "BeanContext", "context", ",", "int", "fieldIndex", ")", "{", ...
Obtains a value for the given field from the bean context <p> Warning: this method is used by internal generated code and should not be called by user code. @param resolutionContext The resolution context @param context The context @param fieldIndex The index of the field @return The resolved bean
[ "Obtains", "a", "value", "for", "the", "given", "field", "from", "the", "bean", "context", "<p", ">", "Warning", ":", "this", "method", "is", "used", "by", "internal", "generated", "code", "and", "should", "not", "be", "called", "by", "user", "code", "."...
train
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/inject/src/main/java/io/micronaut/context/AbstractBeanDefinition.java#L1161-L1200
ops4j/org.ops4j.pax.swissbox
pax-swissbox-tracker/src/main/java/org/ops4j/pax/swissbox/tracker/ServiceLookup.java
ServiceLookup.getService
public static <T> T getService( BundleContext bc, Class<T> type, long timeout, String filter ) { return ServiceLookup.<T> getService( bc, type.getName(), timeout, filter ); }
java
public static <T> T getService( BundleContext bc, Class<T> type, long timeout, String filter ) { return ServiceLookup.<T> getService( bc, type.getName(), timeout, filter ); }
[ "public", "static", "<", "T", ">", "T", "getService", "(", "BundleContext", "bc", ",", "Class", "<", "T", ">", "type", ",", "long", "timeout", ",", "String", "filter", ")", "{", "return", "ServiceLookup", ".", "<", "T", ">", "getService", "(", "bc", ...
Returns a service matching the given criteria. @param <T> class implemented or extended by the service @param bc bundle context for accessing the OSGi registry @param type class implemented or extended by the service @param timeout maximum wait period in milliseconds @param filter LDAP filter to be matched by the serv...
[ "Returns", "a", "service", "matching", "the", "given", "criteria", "." ]
train
https://github.com/ops4j/org.ops4j.pax.swissbox/blob/00b0ee16cdbe8017984a4d7ba808b10d985c5b5c/pax-swissbox-tracker/src/main/java/org/ops4j/pax/swissbox/tracker/ServiceLookup.java#L134-L137
fhoeben/hsac-fitnesse-fixtures
src/main/java/nl/hsac/fitnesse/fixture/fit/OurColumnFixture.java
OurColumnFixture.getStringArg
protected String getStringArg(int index, String defaultValue) { String result = defaultValue; String[] arg = getArgs(); if (arg != null) { if (arg.length > index) { result = arg[index]; } } return result; }
java
protected String getStringArg(int index, String defaultValue) { String result = defaultValue; String[] arg = getArgs(); if (arg != null) { if (arg.length > index) { result = arg[index]; } } return result; }
[ "protected", "String", "getStringArg", "(", "int", "index", ",", "String", "defaultValue", ")", "{", "String", "result", "=", "defaultValue", ";", "String", "[", "]", "arg", "=", "getArgs", "(", ")", ";", "if", "(", "arg", "!=", "null", ")", "{", "if",...
Gets fixture parameter (i.e. extra column in header row). Please note this can not be called from a constructor, as the parameters will not have been initialized yet! @param index index (zero based) to get value from. @param defaultValue value to use if parameter is not present. @return parameter value, if present, def...
[ "Gets", "fixture", "parameter", "(", "i", ".", "e", ".", "extra", "column", "in", "header", "row", ")", ".", "Please", "note", "this", "can", "not", "be", "called", "from", "a", "constructor", "as", "the", "parameters", "will", "not", "have", "been", "...
train
https://github.com/fhoeben/hsac-fitnesse-fixtures/blob/4e9018d7386a9aa65bfcbf07eb28ae064edd1732/src/main/java/nl/hsac/fitnesse/fixture/fit/OurColumnFixture.java#L75-L84
blackducksoftware/blackduck-common
src/main/java/com/synopsys/integration/blackduck/service/PolicyRuleService.java
PolicyRuleService.createPolicyRuleForExternalId
public String createPolicyRuleForExternalId(ComponentService componentService, ExternalId externalId, String policyName) throws IntegrationException { Optional<ComponentVersionView> componentVersionView = componentService.getComponentVersion(externalId); if (!componentVersionView.isPresent()) { ...
java
public String createPolicyRuleForExternalId(ComponentService componentService, ExternalId externalId, String policyName) throws IntegrationException { Optional<ComponentVersionView> componentVersionView = componentService.getComponentVersion(externalId); if (!componentVersionView.isPresent()) { ...
[ "public", "String", "createPolicyRuleForExternalId", "(", "ComponentService", "componentService", ",", "ExternalId", "externalId", ",", "String", "policyName", ")", "throws", "IntegrationException", "{", "Optional", "<", "ComponentVersionView", ">", "componentVersionView", ...
This will create a policy rule that will be violated by the existence of a matching external id in the project's BOM.
[ "This", "will", "create", "a", "policy", "rule", "that", "will", "be", "violated", "by", "the", "existence", "of", "a", "matching", "external", "id", "in", "the", "project", "s", "BOM", "." ]
train
https://github.com/blackducksoftware/blackduck-common/blob/4ea4e90b52b75470b71c597b65cf4e2d73887bcc/src/main/java/com/synopsys/integration/blackduck/service/PolicyRuleService.java#L62-L79
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/ChunkedIntArray.java
ChunkedIntArray.appendSlot
int appendSlot(int w0, int w1, int w2, int w3) { /* try { int newoffset = (lastUsed+1)*slotsize; fastArray[newoffset] = w0; fastArray[newoffset+1] = w1; fastArray[newoffset+2] = w2; fastArray[newoffset+3] = w3; return ++lastUsed; } catch(ArrayIndexOutOfBoundsExc...
java
int appendSlot(int w0, int w1, int w2, int w3) { /* try { int newoffset = (lastUsed+1)*slotsize; fastArray[newoffset] = w0; fastArray[newoffset+1] = w1; fastArray[newoffset+2] = w2; fastArray[newoffset+3] = w3; return ++lastUsed; } catch(ArrayIndexOutOfBoundsExc...
[ "int", "appendSlot", "(", "int", "w0", ",", "int", "w1", ",", "int", "w2", ",", "int", "w3", ")", "{", "/*\n try\n {\n int newoffset = (lastUsed+1)*slotsize;\n fastArray[newoffset] = w0;\n fastArray[newoffset+1] = w1;\n fastArray[newoffset+2] = w2;\n fa...
Append a 4-integer record to the CIA, starting with record 1. (Since arrays are initialized to all-0, 0 has been reserved as the "unknown" value in DTM.) @return the index at which this record was inserted.
[ "Append", "a", "4", "-", "integer", "record", "to", "the", "CIA", "starting", "with", "record", "1", ".", "(", "Since", "arrays", "are", "initialized", "to", "all", "-", "0", "0", "has", "been", "reserved", "as", "the", "unknown", "value", "in", "DTM",...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/ChunkedIntArray.java#L71-L102
modelmapper/modelmapper
core/src/main/java/org/modelmapper/Conditions.java
Conditions.isType
public static Condition<?, ?> isType(final Class<?> type) { return new Condition<Object, Object>() { public boolean applies(MappingContext<Object, Object> context) { return type.isAssignableFrom(context.getSourceType()); } }; }
java
public static Condition<?, ?> isType(final Class<?> type) { return new Condition<Object, Object>() { public boolean applies(MappingContext<Object, Object> context) { return type.isAssignableFrom(context.getSourceType()); } }; }
[ "public", "static", "Condition", "<", "?", ",", "?", ">", "isType", "(", "final", "Class", "<", "?", ">", "type", ")", "{", "return", "new", "Condition", "<", "Object", ",", "Object", ">", "(", ")", "{", "public", "boolean", "applies", "(", "MappingC...
Returns a condition that applies when the mapping source is of the type {@code type}.
[ "Returns", "a", "condition", "that", "applies", "when", "the", "mapping", "source", "is", "of", "the", "type", "{" ]
train
https://github.com/modelmapper/modelmapper/blob/491d165ded9dc9aba7ce8b56984249e1a1363204/core/src/main/java/org/modelmapper/Conditions.java#L175-L181
icode/ameba
src/main/java/ameba/lib/Strands.java
Strands.printStackTrace
public static void printStackTrace(StackTraceElement[] trace, java.io.PrintStream out) { Strand.printStackTrace(trace, out); }
java
public static void printStackTrace(StackTraceElement[] trace, java.io.PrintStream out) { Strand.printStackTrace(trace, out); }
[ "public", "static", "void", "printStackTrace", "(", "StackTraceElement", "[", "]", "trace", ",", "java", ".", "io", ".", "PrintStream", "out", ")", "{", "Strand", ".", "printStackTrace", "(", "trace", ",", "out", ")", ";", "}" ]
This utility method prints a stack-trace into a {@link java.io.PrintStream} @param trace a stack trace (such as returned from {@link Strand#getStackTrace()}. @param out the {@link java.io.PrintStream} into which the stack trace will be printed.
[ "This", "utility", "method", "prints", "a", "stack", "-", "trace", "into", "a", "{", "@link", "java", ".", "io", ".", "PrintStream", "}" ]
train
https://github.com/icode/ameba/blob/9d4956e935898e41331b2745e400ef869cd265e0/src/main/java/ameba/lib/Strands.java#L527-L529
sirthias/parboiled
parboiled-core/src/main/java/org/parboiled/support/ParseTreeUtils.java
ParseTreeUtils.findNodeByLabel
public static <V> Node<V> findNodeByLabel(List<Node<V>> parents, String labelPrefix) { return findNode(parents, new LabelPrefixPredicate<V>(labelPrefix)); }
java
public static <V> Node<V> findNodeByLabel(List<Node<V>> parents, String labelPrefix) { return findNode(parents, new LabelPrefixPredicate<V>(labelPrefix)); }
[ "public", "static", "<", "V", ">", "Node", "<", "V", ">", "findNodeByLabel", "(", "List", "<", "Node", "<", "V", ">", ">", "parents", ",", "String", "labelPrefix", ")", "{", "return", "findNode", "(", "parents", ",", "new", "LabelPrefixPredicate", "<", ...
Returns the first node underneath the given parents which matches the given label prefix. If parents is null or empty or no node is found the method returns null. @param parents the parent Nodes to look through @param labelPrefix the label prefix to look for @return the Node if found or null if not found
[ "Returns", "the", "first", "node", "underneath", "the", "given", "parents", "which", "matches", "the", "given", "label", "prefix", ".", "If", "parents", "is", "null", "or", "empty", "or", "no", "node", "is", "found", "the", "method", "returns", "null", "."...
train
https://github.com/sirthias/parboiled/blob/84f3ed43e3e171b4c6ab5e6ca6297d264a9d686a/parboiled-core/src/main/java/org/parboiled/support/ParseTreeUtils.java#L194-L196
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/accesslayer/StatementManager.java
StatementManager.bindDelete
public void bindDelete(PreparedStatement stmt, ClassDescriptor cld, Object obj) throws SQLException { if (cld.getDeleteProcedure() != null) { this.bindProcedure(stmt, cld, obj, cld.getDeleteProcedure()); } else { int index = 1; Val...
java
public void bindDelete(PreparedStatement stmt, ClassDescriptor cld, Object obj) throws SQLException { if (cld.getDeleteProcedure() != null) { this.bindProcedure(stmt, cld, obj, cld.getDeleteProcedure()); } else { int index = 1; Val...
[ "public", "void", "bindDelete", "(", "PreparedStatement", "stmt", ",", "ClassDescriptor", "cld", ",", "Object", "obj", ")", "throws", "SQLException", "{", "if", "(", "cld", ".", "getDeleteProcedure", "(", ")", "!=", "null", ")", "{", "this", ".", "bindProced...
binds the objects primary key and locking values to the statement, BRJ
[ "binds", "the", "objects", "primary", "key", "and", "locking", "values", "to", "the", "statement", "BRJ" ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/StatementManager.java#L149-L177
kiegroup/drools
kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/runtime/decisiontables/DecisionTableImpl.java
DecisionTableImpl.matches
private boolean matches(EvaluationContext ctx, Object[] params, DTDecisionRule rule) { for( int i = 0; i < params.length; i++ ) { CompiledExpression compiledInput = inputs.get(i).getCompiledInput(); if ( compiledInput instanceof CompiledFEELExpression) { ctx.setValue("?",...
java
private boolean matches(EvaluationContext ctx, Object[] params, DTDecisionRule rule) { for( int i = 0; i < params.length; i++ ) { CompiledExpression compiledInput = inputs.get(i).getCompiledInput(); if ( compiledInput instanceof CompiledFEELExpression) { ctx.setValue("?",...
[ "private", "boolean", "matches", "(", "EvaluationContext", "ctx", ",", "Object", "[", "]", "params", ",", "DTDecisionRule", "rule", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "params", ".", "length", ";", "i", "++", ")", "{", "Compile...
Checks if the parameters match a single rule @param ctx @param params @param rule @return
[ "Checks", "if", "the", "parameters", "match", "a", "single", "rule" ]
train
https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/runtime/decisiontables/DecisionTableImpl.java#L269-L280
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/alg/misc/ImageBandMath.java
ImageBandMath.stdDev
public static void stdDev(Planar<GrayF32> input, GrayF32 output, @Nullable GrayF32 avg) { stdDev(input,output,avg,0,input.getNumBands() - 1); }
java
public static void stdDev(Planar<GrayF32> input, GrayF32 output, @Nullable GrayF32 avg) { stdDev(input,output,avg,0,input.getNumBands() - 1); }
[ "public", "static", "void", "stdDev", "(", "Planar", "<", "GrayF32", ">", "input", ",", "GrayF32", "output", ",", "@", "Nullable", "GrayF32", "avg", ")", "{", "stdDev", "(", "input", ",", "output", ",", "avg", ",", "0", ",", "input", ".", "getNumBands"...
Computes the standard deviation for each pixel across all bands in the {@link Planar} image. @param input Planar image - not modified @param output Gray scale image containing average pixel values - modified @param avg Input Gray scale image containing average image. Can be null
[ "Computes", "the", "standard", "deviation", "for", "each", "pixel", "across", "all", "bands", "in", "the", "{" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/misc/ImageBandMath.java#L1025-L1027
ludovicianul/selenium-on-steroids
src/main/java/com/insidecoding/sos/webdriver/WebDriverHelper.java
WebDriverHelper.isValuePresentInDropDown
public boolean isValuePresentInDropDown(final By by, final String value) { WebElement element = driver.findElement(by); StringBuilder builder = new StringBuilder(".//option[@value = "); builder.append(escapeQuotes(value)); builder.append("]"); List<WebElement> options = element.findElements(By.xpath(builder ...
java
public boolean isValuePresentInDropDown(final By by, final String value) { WebElement element = driver.findElement(by); StringBuilder builder = new StringBuilder(".//option[@value = "); builder.append(escapeQuotes(value)); builder.append("]"); List<WebElement> options = element.findElements(By.xpath(builder ...
[ "public", "boolean", "isValuePresentInDropDown", "(", "final", "By", "by", ",", "final", "String", "value", ")", "{", "WebElement", "element", "=", "driver", ".", "findElement", "(", "by", ")", ";", "StringBuilder", "builder", "=", "new", "StringBuilder", "(",...
Checks if the VALUE is present in the drop-down. This considers the VALUE attribute of the option, not the actual display text. <br/> For example if we have the following situation: &lt;select id="test"&gt; &lt;option value="4"&gt;June&lt;/option&gt; &lt;/select&gt; we will call the method as follows: isValuePresentInD...
[ "Checks", "if", "the", "VALUE", "is", "present", "in", "the", "drop", "-", "down", ".", "This", "considers", "the", "VALUE", "attribute", "of", "the", "option", "not", "the", "actual", "display", "text", ".", "<br", "/", ">", "For", "example", "if", "w...
train
https://github.com/ludovicianul/selenium-on-steroids/blob/f89d91c59f686114f94624bfc55712f278005bfa/src/main/java/com/insidecoding/sos/webdriver/WebDriverHelper.java#L583-L593
samskivert/samskivert
src/main/java/com/samskivert/util/PrefsConfig.java
PrefsConfig.setValue
public void setValue (String name, float value) { Float oldValue = null; if (_prefs.get(name, null) != null || _props.getProperty(name) != null) { oldValue = Float.valueOf(_prefs.getFloat(name, super.getValue(name, 0f))); } _prefs.putFloat(name, value); _propsup....
java
public void setValue (String name, float value) { Float oldValue = null; if (_prefs.get(name, null) != null || _props.getProperty(name) != null) { oldValue = Float.valueOf(_prefs.getFloat(name, super.getValue(name, 0f))); } _prefs.putFloat(name, value); _propsup....
[ "public", "void", "setValue", "(", "String", "name", ",", "float", "value", ")", "{", "Float", "oldValue", "=", "null", ";", "if", "(", "_prefs", ".", "get", "(", "name", ",", "null", ")", "!=", "null", "||", "_props", ".", "getProperty", "(", "name"...
Sets the value of the specified preference, overriding the value defined in the configuration files shipped with the application.
[ "Sets", "the", "value", "of", "the", "specified", "preference", "overriding", "the", "value", "defined", "in", "the", "configuration", "files", "shipped", "with", "the", "application", "." ]
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/util/PrefsConfig.java#L99-L108
remkop/picocli
src/main/java/picocli/CommandLine.java
CommandLine.setHelpSectionMap
public CommandLine setHelpSectionMap(Map<String, IHelpSectionRenderer> map) { getCommandSpec().usageMessage().sectionMap(map); for (CommandLine command : getCommandSpec().subcommands().values()) { command.setHelpSectionMap(map); } return this; }
java
public CommandLine setHelpSectionMap(Map<String, IHelpSectionRenderer> map) { getCommandSpec().usageMessage().sectionMap(map); for (CommandLine command : getCommandSpec().subcommands().values()) { command.setHelpSectionMap(map); } return this; }
[ "public", "CommandLine", "setHelpSectionMap", "(", "Map", "<", "String", ",", "IHelpSectionRenderer", ">", "map", ")", "{", "getCommandSpec", "(", ")", ".", "usageMessage", "(", ")", ".", "sectionMap", "(", "map", ")", ";", "for", "(", "CommandLine", "comman...
Sets the map of section keys and renderers used to construct the usage help message. <p>The specified setting will be registered with this {@code CommandLine} and the full hierarchy of its subcommands and nested sub-subcommands <em>at the moment this method is called</em>. Subcommands added later will have the default ...
[ "Sets", "the", "map", "of", "section", "keys", "and", "renderers", "used", "to", "construct", "the", "usage", "help", "message", ".", "<p", ">", "The", "specified", "setting", "will", "be", "registered", "with", "this", "{" ]
train
https://github.com/remkop/picocli/blob/3c5384f0d12817401d1921c3013c1282e2edcab2/src/main/java/picocli/CommandLine.java#L448-L454
phax/ph-commons
ph-xml/src/main/java/com/helger/xml/serialize/write/XMLCharHelper.java
XMLCharHelper.isInvalidXMLCDATAChar
public static boolean isInvalidXMLCDATAChar (@Nonnull final EXMLSerializeVersion eXMLVersion, final int c) { switch (eXMLVersion) { case XML_10: return INVALID_VALUE_CHAR_XML10.get (c); case XML_11: return INVALID_CDATA_VALUE_CHAR_XML11.get (c); case HTML: return INVA...
java
public static boolean isInvalidXMLCDATAChar (@Nonnull final EXMLSerializeVersion eXMLVersion, final int c) { switch (eXMLVersion) { case XML_10: return INVALID_VALUE_CHAR_XML10.get (c); case XML_11: return INVALID_CDATA_VALUE_CHAR_XML11.get (c); case HTML: return INVA...
[ "public", "static", "boolean", "isInvalidXMLCDATAChar", "(", "@", "Nonnull", "final", "EXMLSerializeVersion", "eXMLVersion", ",", "final", "int", "c", ")", "{", "switch", "(", "eXMLVersion", ")", "{", "case", "XML_10", ":", "return", "INVALID_VALUE_CHAR_XML10", "....
Check if the passed character is invalid for a CDATA node. @param eXMLVersion XML version to be used. May not be <code>null</code>. @param c char to check @return <code>true</code> if the char is invalid
[ "Check", "if", "the", "passed", "character", "is", "invalid", "for", "a", "CDATA", "node", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-xml/src/main/java/com/helger/xml/serialize/write/XMLCharHelper.java#L867-L880
twitter/cloudhopper-commons
ch-commons-xbean/src/main/java/com/cloudhopper/commons/xbean/util/PropertiesReplacementUtil.java
PropertiesReplacementUtil.loadProperties
static public Properties loadProperties(Properties base, File file) throws IOException { FileReader reader = new FileReader(file); Properties props = new Properties(); props.load(reader); if (base != null) props.putAll(base); reader.close(); return props; }
java
static public Properties loadProperties(Properties base, File file) throws IOException { FileReader reader = new FileReader(file); Properties props = new Properties(); props.load(reader); if (base != null) props.putAll(base); reader.close(); return props; }
[ "static", "public", "Properties", "loadProperties", "(", "Properties", "base", ",", "File", "file", ")", "throws", "IOException", "{", "FileReader", "reader", "=", "new", "FileReader", "(", "file", ")", ";", "Properties", "props", "=", "new", "Properties", "("...
Loads the given file into a Properties object. @param base Properties that should override those loaded from the file @param file The file to load @return Properties loaded from the file
[ "Loads", "the", "given", "file", "into", "a", "Properties", "object", "." ]
train
https://github.com/twitter/cloudhopper-commons/blob/b5bc397dbec4537e8149e7ec0733c1d7ed477499/ch-commons-xbean/src/main/java/com/cloudhopper/commons/xbean/util/PropertiesReplacementUtil.java#L170-L177
gondor/kbop
src/main/java/org/pacesys/kbop/internal/AbstractKeyedObjectPool.java
AbstractKeyedObjectPool.createFuture
protected PoolWaitFuture<E> createFuture(final PoolKey<K> key) { return new PoolWaitFuture<E>(lock) { protected E getPoolObject(long timeout, TimeUnit unit) throws IOException, InterruptedException, TimeoutException { return getBlockingUntilAvailableOrTimeout(key, timeout, unit, this); } }; }
java
protected PoolWaitFuture<E> createFuture(final PoolKey<K> key) { return new PoolWaitFuture<E>(lock) { protected E getPoolObject(long timeout, TimeUnit unit) throws IOException, InterruptedException, TimeoutException { return getBlockingUntilAvailableOrTimeout(key, timeout, unit, this); } }; }
[ "protected", "PoolWaitFuture", "<", "E", ">", "createFuture", "(", "final", "PoolKey", "<", "K", ">", "key", ")", "{", "return", "new", "PoolWaitFuture", "<", "E", ">", "(", "lock", ")", "{", "protected", "E", "getPoolObject", "(", "long", "timeout", ","...
Creates a Future which will wait for the Keyed Object to become available or timeout @param key the Pool Key @return PoolWaitFuture
[ "Creates", "a", "Future", "which", "will", "wait", "for", "the", "Keyed", "Object", "to", "become", "available", "or", "timeout" ]
train
https://github.com/gondor/kbop/blob/a176fd845f1e146610f03a1cb3cb0d661ebf4faa/src/main/java/org/pacesys/kbop/internal/AbstractKeyedObjectPool.java#L89-L95
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/config/Config.java
Config.setMultiMapConfigs
public Config setMultiMapConfigs(Map<String, MultiMapConfig> multiMapConfigs) { this.multiMapConfigs.clear(); this.multiMapConfigs.putAll(multiMapConfigs); for (final Entry<String, MultiMapConfig> entry : this.multiMapConfigs.entrySet()) { entry.getValue().setName(entry.getKey()); ...
java
public Config setMultiMapConfigs(Map<String, MultiMapConfig> multiMapConfigs) { this.multiMapConfigs.clear(); this.multiMapConfigs.putAll(multiMapConfigs); for (final Entry<String, MultiMapConfig> entry : this.multiMapConfigs.entrySet()) { entry.getValue().setName(entry.getKey()); ...
[ "public", "Config", "setMultiMapConfigs", "(", "Map", "<", "String", ",", "MultiMapConfig", ">", "multiMapConfigs", ")", "{", "this", ".", "multiMapConfigs", ".", "clear", "(", ")", ";", "this", ".", "multiMapConfigs", ".", "putAll", "(", "multiMapConfigs", ")...
Sets the map of {@link com.hazelcast.core.MultiMap} configurations, mapped by config name. The config name may be a pattern with which the configuration will be obtained in the future. @param multiMapConfigs the multimap configuration map to set @return this config instance
[ "Sets", "the", "map", "of", "{", "@link", "com", ".", "hazelcast", ".", "core", ".", "MultiMap", "}", "configurations", "mapped", "by", "config", "name", ".", "The", "config", "name", "may", "be", "a", "pattern", "with", "which", "the", "configuration", ...
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/config/Config.java#L1098-L1105
sprylab/texturevideoview
library/src/main/java/com/sprylab/android/widget/TextureVideoView.java
TextureVideoView.setVideoURI
public void setVideoURI(Uri uri, Map<String, String> headers) { mUri = uri; mHeaders = headers; mSeekWhenPrepared = 0; openVideo(); requestLayout(); invalidate(); }
java
public void setVideoURI(Uri uri, Map<String, String> headers) { mUri = uri; mHeaders = headers; mSeekWhenPrepared = 0; openVideo(); requestLayout(); invalidate(); }
[ "public", "void", "setVideoURI", "(", "Uri", "uri", ",", "Map", "<", "String", ",", "String", ">", "headers", ")", "{", "mUri", "=", "uri", ";", "mHeaders", "=", "headers", ";", "mSeekWhenPrepared", "=", "0", ";", "openVideo", "(", ")", ";", "requestLa...
Sets video URI using specific headers. @param uri the URI of the video. @param headers the headers for the URI request. Note that the cross domain redirection is allowed by default, but that can be changed with key/value pairs through the headers parameter with "android-allow-cross-domain-redirect" as the key and ...
[ "Sets", "video", "URI", "using", "specific", "headers", "." ]
train
https://github.com/sprylab/texturevideoview/blob/4c3665b8342f1d7c13f84acd1d628db88a2bedf6/library/src/main/java/com/sprylab/android/widget/TextureVideoView.java#L252-L259
OpenLiberty/open-liberty
dev/com.ibm.ws.channelfw/src/com/ibm/io/async/CompletionKey.java
CompletionKey.setBuffer
public void setBuffer(long address, long length, int index) { if ((index < 0) || (index >= this.bufferCount)) { throw new IllegalArgumentException(); } this.stagingByteBuffer.putLong((FIRST_BUFFER_INDEX + (2 * index)) * 8, address); this.stagingByteBuffer.putLong((FIRST_BUFF...
java
public void setBuffer(long address, long length, int index) { if ((index < 0) || (index >= this.bufferCount)) { throw new IllegalArgumentException(); } this.stagingByteBuffer.putLong((FIRST_BUFFER_INDEX + (2 * index)) * 8, address); this.stagingByteBuffer.putLong((FIRST_BUFF...
[ "public", "void", "setBuffer", "(", "long", "address", ",", "long", "length", ",", "int", "index", ")", "{", "if", "(", "(", "index", "<", "0", ")", "||", "(", "index", ">=", "this", ".", "bufferCount", ")", ")", "{", "throw", "new", "IllegalArgument...
Sets the address and length of a buffer with a specified index. @param address of the buffer @param length of the buffer in bytes @param index of the buffer to set, where 0 is the first buffer @throws IllegalArgumentException if the index value is <0 or >= bufferCount
[ "Sets", "the", "address", "and", "length", "of", "a", "buffer", "with", "a", "specified", "index", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.channelfw/src/com/ibm/io/async/CompletionKey.java#L182-L189
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/de/julielab/jules/types/Token.java
Token.setDepRel
public void setDepRel(int i, DependencyRelation v) { if (Token_Type.featOkTst && ((Token_Type)jcasType).casFeat_depRel == null) jcasType.jcas.throwFeatMissing("depRel", "de.julielab.jules.types.Token"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((Token_Type)jcasType).casFeatCode...
java
public void setDepRel(int i, DependencyRelation v) { if (Token_Type.featOkTst && ((Token_Type)jcasType).casFeat_depRel == null) jcasType.jcas.throwFeatMissing("depRel", "de.julielab.jules.types.Token"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((Token_Type)jcasType).casFeatCode...
[ "public", "void", "setDepRel", "(", "int", "i", ",", "DependencyRelation", "v", ")", "{", "if", "(", "Token_Type", ".", "featOkTst", "&&", "(", "(", "Token_Type", ")", "jcasType", ")", ".", "casFeat_depRel", "==", "null", ")", "jcasType", ".", "jcas", "....
indexed setter for depRel - sets an indexed value - Contains a list of syntactical dependencies, see DependencyRelation, O @generated @param i index in the array to set @param v value to set into the array
[ "indexed", "setter", "for", "depRel", "-", "sets", "an", "indexed", "value", "-", "Contains", "a", "list", "of", "syntactical", "dependencies", "see", "DependencyRelation", "O" ]
train
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/de/julielab/jules/types/Token.java#L248-L252
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/util/ClassHelper.java
ClassHelper.getMethod
public static Method getMethod(Object object, String methodName, Class[] params) { return getMethod(object.getClass(), methodName, params); }
java
public static Method getMethod(Object object, String methodName, Class[] params) { return getMethod(object.getClass(), methodName, params); }
[ "public", "static", "Method", "getMethod", "(", "Object", "object", ",", "String", "methodName", ",", "Class", "[", "]", "params", ")", "{", "return", "getMethod", "(", "object", ".", "getClass", "(", ")", ",", "methodName", ",", "params", ")", ";", "}" ...
Determines the method with the specified signature via reflection look-up. @param object The instance whose class is searched for the method @param methodName The method's name @param params The parameter types @return A method object or <code>null</code> if no matching method was found
[ "Determines", "the", "method", "with", "the", "specified", "signature", "via", "reflection", "look", "-", "up", "." ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/util/ClassHelper.java#L358-L361
wisdom-framework/wisdom
core/wisdom-maven-plugin/src/main/java/org/wisdom/maven/mojos/TypeScriptCompilerMojo.java
TypeScriptCompilerMojo.processDirectory
protected void processDirectory(File input, File destination) throws WatchingException { if (! input.isDirectory()) { return; } if (! destination.isDirectory()) { destination.mkdirs(); } // Now execute the compiler // We compute the set of argume...
java
protected void processDirectory(File input, File destination) throws WatchingException { if (! input.isDirectory()) { return; } if (! destination.isDirectory()) { destination.mkdirs(); } // Now execute the compiler // We compute the set of argume...
[ "protected", "void", "processDirectory", "(", "File", "input", ",", "File", "destination", ")", "throws", "WatchingException", "{", "if", "(", "!", "input", ".", "isDirectory", "(", ")", ")", "{", "return", ";", "}", "if", "(", "!", "destination", ".", "...
Process all typescripts file from the given directory. Output files are generated in the given destination. @param input the input directory @param destination the output directory @throws WatchingException if the compilation failed
[ "Process", "all", "typescripts", "file", "from", "the", "given", "directory", ".", "Output", "files", "are", "generated", "in", "the", "given", "destination", "." ]
train
https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/core/wisdom-maven-plugin/src/main/java/org/wisdom/maven/mojos/TypeScriptCompilerMojo.java#L167-L199
omadahealth/CircularBarPager
library/src/main/java/com/github/omadahealth/circularbarpager/library/viewpager/FadeViewPagerTransformer.java
FadeViewPagerTransformer.transformPage
@TargetApi(Build.VERSION_CODES.HONEYCOMB) public void transformPage(View view, float position) { //Calculate real position (with padding) position -= (float) ((ViewPager) view.getParent()).getPaddingRight() / (float) view.getWidth(); if (position <= -1.0f || position >= 1.0f) { v...
java
@TargetApi(Build.VERSION_CODES.HONEYCOMB) public void transformPage(View view, float position) { //Calculate real position (with padding) position -= (float) ((ViewPager) view.getParent()).getPaddingRight() / (float) view.getWidth(); if (position <= -1.0f || position >= 1.0f) { v...
[ "@", "TargetApi", "(", "Build", ".", "VERSION_CODES", ".", "HONEYCOMB", ")", "public", "void", "transformPage", "(", "View", "view", ",", "float", "position", ")", "{", "//Calculate real position (with padding)", "position", "-=", "(", "float", ")", "(", "(", ...
Used for adding a fadein/fadeout animation in the ViewPager transition. Must be used with {@link android.support.v4.view.ViewPager#setPageTransformer(boolean, android.support.v4.view.ViewPager.PageTransformer)}
[ "Used", "for", "adding", "a", "fadein", "/", "fadeout", "animation", "in", "the", "ViewPager", "transition", ".", "Must", "be", "used", "with", "{" ]
train
https://github.com/omadahealth/CircularBarPager/blob/3a43e8828849da727fd13345e83b8432f7271155/library/src/main/java/com/github/omadahealth/circularbarpager/library/viewpager/FadeViewPagerTransformer.java#L40-L59
devcon5io/common
passwords/src/main/java/io/devcon5/password/Passwords.java
Passwords.validatePassword
public static boolean validatePassword(char[] password, String goodHash) throws NoSuchAlgorithmException, InvalidKeySpecException { final String[] params = goodHash.split(":"); final int iterations = Integer.parseInt(params[ITERATION_INDEX]); final byte[] salt = fromHex(params[SALT_INDEX]); final byte[...
java
public static boolean validatePassword(char[] password, String goodHash) throws NoSuchAlgorithmException, InvalidKeySpecException { final String[] params = goodHash.split(":"); final int iterations = Integer.parseInt(params[ITERATION_INDEX]); final byte[] salt = fromHex(params[SALT_INDEX]); final byte[...
[ "public", "static", "boolean", "validatePassword", "(", "char", "[", "]", "password", ",", "String", "goodHash", ")", "throws", "NoSuchAlgorithmException", ",", "InvalidKeySpecException", "{", "final", "String", "[", "]", "params", "=", "goodHash", ".", "split", ...
Validates a password using a hash. @param password the password to check @param goodHash the hash of the valid password @return true if the password is correct, false if not
[ "Validates", "a", "password", "using", "a", "hash", "." ]
train
https://github.com/devcon5io/common/blob/363688e0dc904d559682bf796bd6c836b4e0efc7/passwords/src/main/java/io/devcon5/password/Passwords.java#L107-L119
unbescape/unbescape
src/main/java/org/unbescape/uri/UriEscape.java
UriEscape.escapeUriQueryParam
public static void escapeUriQueryParam(final Reader reader, final Writer writer) throws IOException { escapeUriQueryParam(reader, writer, DEFAULT_ENCODING); }
java
public static void escapeUriQueryParam(final Reader reader, final Writer writer) throws IOException { escapeUriQueryParam(reader, writer, DEFAULT_ENCODING); }
[ "public", "static", "void", "escapeUriQueryParam", "(", "final", "Reader", "reader", ",", "final", "Writer", "writer", ")", "throws", "IOException", "{", "escapeUriQueryParam", "(", "reader", ",", "writer", ",", "DEFAULT_ENCODING", ")", ";", "}" ]
<p> Perform am URI query parameter (name or value) <strong>escape</strong> operation on a <tt>Reader</tt> input using <tt>UTF-8</tt> as encoding, writing results to a <tt>Writer</tt>. </p> <p> The following are the only allowed chars in an URI query parameter (will not be escaped): </p> <ul> <li><tt>A-Z a-z 0-9</tt></l...
[ "<p", ">", "Perform", "am", "URI", "query", "parameter", "(", "name", "or", "value", ")", "<strong", ">", "escape<", "/", "strong", ">", "operation", "on", "a", "<tt", ">", "Reader<", "/", "tt", ">", "input", "using", "<tt", ">", "UTF", "-", "8<", ...
train
https://github.com/unbescape/unbescape/blob/ec5435fb3508c2eed25d8165dc27ded2602cae13/src/main/java/org/unbescape/uri/UriEscape.java#L969-L972
nmorel/gwt-jackson
gwt-jackson/src/main/java/com/github/nmorel/gwtjackson/client/JsonSerializationContext.java
JsonSerializationContext.traceError
public JsonSerializationException traceError( Object value, String message, JsonWriter writer ) { JsonSerializationException exception = traceError( value, message ); traceWriterInfo( value, writer ); return exception; }
java
public JsonSerializationException traceError( Object value, String message, JsonWriter writer ) { JsonSerializationException exception = traceError( value, message ); traceWriterInfo( value, writer ); return exception; }
[ "public", "JsonSerializationException", "traceError", "(", "Object", "value", ",", "String", "message", ",", "JsonWriter", "writer", ")", "{", "JsonSerializationException", "exception", "=", "traceError", "(", "value", ",", "message", ")", ";", "traceWriterInfo", "(...
Trace an error with current writer state and returns a corresponding exception. @param value current value @param message error message @param writer current writer @return a {@link JsonSerializationException} with the given message
[ "Trace", "an", "error", "with", "current", "writer", "state", "and", "returns", "a", "corresponding", "exception", "." ]
train
https://github.com/nmorel/gwt-jackson/blob/3fdc4350a27a9b64fc437d5fe516bf9191b74824/gwt-jackson/src/main/java/com/github/nmorel/gwtjackson/client/JsonSerializationContext.java#L519-L523
structurizr/java
structurizr-core/src/com/structurizr/view/ViewSet.java
ViewSet.createDeploymentView
public DeploymentView createDeploymentView(String key, String description) { assertThatTheViewKeyIsSpecifiedAndUnique(key); DeploymentView view = new DeploymentView(model, key, description); view.setViewSet(this); deploymentViews.add(view); return view; }
java
public DeploymentView createDeploymentView(String key, String description) { assertThatTheViewKeyIsSpecifiedAndUnique(key); DeploymentView view = new DeploymentView(model, key, description); view.setViewSet(this); deploymentViews.add(view); return view; }
[ "public", "DeploymentView", "createDeploymentView", "(", "String", "key", ",", "String", "description", ")", "{", "assertThatTheViewKeyIsSpecifiedAndUnique", "(", "key", ")", ";", "DeploymentView", "view", "=", "new", "DeploymentView", "(", "model", ",", "key", ",",...
Creates a deployment view. @param key the key for the deployment view (must be unique) @param description a description of the view @return a DeploymentView object @throws IllegalArgumentException if the key is not unique
[ "Creates", "a", "deployment", "view", "." ]
train
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/view/ViewSet.java#L197-L204
Stratio/bdt
src/main/java/com/stratio/qa/specs/DatabaseSpec.java
DatabaseSpec.insertOnMongoTable
@Given("^I insert into MongoDB database '(.+?)' and collection '(.+?)' the document from schema '(.+?)'$") public void insertOnMongoTable(String dataBase, String collection, String document) throws Exception { String retrievedDoc = commonspec.retrieveData(document, "json"); commonspec.getMongoDBClie...
java
@Given("^I insert into MongoDB database '(.+?)' and collection '(.+?)' the document from schema '(.+?)'$") public void insertOnMongoTable(String dataBase, String collection, String document) throws Exception { String retrievedDoc = commonspec.retrieveData(document, "json"); commonspec.getMongoDBClie...
[ "@", "Given", "(", "\"^I insert into MongoDB database '(.+?)' and collection '(.+?)' the document from schema '(.+?)'$\"", ")", "public", "void", "insertOnMongoTable", "(", "String", "dataBase", ",", "String", "collection", ",", "String", "document", ")", "throws", "Exception",...
Insert document in a MongoDB table. @param dataBase Mongo database @param collection Mongo collection @param document document used for schema
[ "Insert", "document", "in", "a", "MongoDB", "table", "." ]
train
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/DatabaseSpec.java#L338-L343
Drivemode/TypefaceHelper
TypefaceHelper/src/main/java/com/drivemode/android/typeface/TypefaceHelper.java
TypefaceHelper.setTypeface
public View setTypeface(Context context, @LayoutRes int layoutRes, ViewGroup parent, @StringRes int strResId) { return setTypeface(context, layoutRes, parent, mApplication.getString(strResId)); }
java
public View setTypeface(Context context, @LayoutRes int layoutRes, ViewGroup parent, @StringRes int strResId) { return setTypeface(context, layoutRes, parent, mApplication.getString(strResId)); }
[ "public", "View", "setTypeface", "(", "Context", "context", ",", "@", "LayoutRes", "int", "layoutRes", ",", "ViewGroup", "parent", ",", "@", "StringRes", "int", "strResId", ")", "{", "return", "setTypeface", "(", "context", ",", "layoutRes", ",", "parent", "...
Set the typeface to the all text views belong to the view group. @param context the context. @param layoutRes the layout resource id. @param parent the parent view group to attach the layout. @param strResId string resource containing typeface name. @return the view.
[ "Set", "the", "typeface", "to", "the", "all", "text", "views", "belong", "to", "the", "view", "group", "." ]
train
https://github.com/Drivemode/TypefaceHelper/blob/86bef9ce16b9626b7076559e846db1b9f043c008/TypefaceHelper/src/main/java/com/drivemode/android/typeface/TypefaceHelper.java#L253-L255
bbottema/simple-java-mail
modules/simple-java-mail/src/main/java/org/simplejavamail/converter/internal/mimemessage/MimeMessageHelper.java
MimeMessageHelper.setTexts
static void setTexts(final Email email, final MimePart messagePart) throws MessagingException { if (email.getPlainText() != null) { messagePart.setText(email.getPlainText(), CHARACTER_ENCODING); } if (email.getHTMLText() != null) { messagePart.setContent(email.getHTMLText(), "text/html; charset=\"" + CHA...
java
static void setTexts(final Email email, final MimePart messagePart) throws MessagingException { if (email.getPlainText() != null) { messagePart.setText(email.getPlainText(), CHARACTER_ENCODING); } if (email.getHTMLText() != null) { messagePart.setContent(email.getHTMLText(), "text/html; charset=\"" + CHA...
[ "static", "void", "setTexts", "(", "final", "Email", "email", ",", "final", "MimePart", "messagePart", ")", "throws", "MessagingException", "{", "if", "(", "email", ".", "getPlainText", "(", ")", "!=", "null", ")", "{", "messagePart", ".", "setText", "(", ...
Fills the {@link MimeBodyPart} instance with the content body content (text, html and calendar). @param email The message in which the content is defined. @param messagePart The {@link MimeBodyPart} that will contain the body content (either plain text, HTML text or iCalendar text) @throws MessagingException Se...
[ "Fills", "the", "{", "@link", "MimeBodyPart", "}", "instance", "with", "the", "content", "body", "content", "(", "text", "html", "and", "calendar", ")", "." ]
train
https://github.com/bbottema/simple-java-mail/blob/b03635328aeecd525e35eddfef8f5b9a184559d8/modules/simple-java-mail/src/main/java/org/simplejavamail/converter/internal/mimemessage/MimeMessageHelper.java#L124-L135
Whiley/WhileyCompiler
src/main/java/wyil/check/FlowTypeCheck.java
FlowTypeCheck.checkSwitch
private Environment checkSwitch(Stmt.Switch stmt, Environment environment, EnclosingScope scope) throws IOException { // Type check the expression being switched upon checkExpression(stmt.getCondition(), environment); // The final environment determines what flow continues after the switch // statement Env...
java
private Environment checkSwitch(Stmt.Switch stmt, Environment environment, EnclosingScope scope) throws IOException { // Type check the expression being switched upon checkExpression(stmt.getCondition(), environment); // The final environment determines what flow continues after the switch // statement Env...
[ "private", "Environment", "checkSwitch", "(", "Stmt", ".", "Switch", "stmt", ",", "Environment", "environment", ",", "EnclosingScope", "scope", ")", "throws", "IOException", "{", "// Type check the expression being switched upon", "checkExpression", "(", "stmt", ".", "g...
Type check a <code>switch</code> statement. This is similar, in some ways, to the handling of if-statements except that we have n code blocks instead of just two. Therefore, we check type information through each block, which produces n potentially different environments and these are all joined together to produce the...
[ "Type", "check", "a", "<code", ">", "switch<", "/", "code", ">", "statement", ".", "This", "is", "similar", "in", "some", "ways", "to", "the", "handling", "of", "if", "-", "statements", "except", "that", "we", "have", "n", "code", "blocks", "instead", ...
train
https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyil/check/FlowTypeCheck.java#L684-L722
tianjing/tgtools.web.develop
src/main/java/tgtools/web/develop/util/ValidHelper.java
ValidHelper.validDate
public static void validDate(Long pContent, String pParamName) throws APPErrorException { if(null==pContent||pContent.longValue()<minDate) { throw new APPErrorException(pParamName + " 错误的时间值"); } }
java
public static void validDate(Long pContent, String pParamName) throws APPErrorException { if(null==pContent||pContent.longValue()<minDate) { throw new APPErrorException(pParamName + " 错误的时间值"); } }
[ "public", "static", "void", "validDate", "(", "Long", "pContent", ",", "String", "pParamName", ")", "throws", "APPErrorException", "{", "if", "(", "null", "==", "pContent", "||", "pContent", ".", "longValue", "(", ")", "<", "minDate", ")", "{", "throw", "n...
验证日期格式 不能为空和必须正值最小值 @param pContent 文本 @param pParamName 参数名称 @throws APPErrorException
[ "验证日期格式", "不能为空和必须正值最小值" ]
train
https://github.com/tianjing/tgtools.web.develop/blob/a18567f3ccf877249f2e33028d1e7c479900e4eb/src/main/java/tgtools/web/develop/util/ValidHelper.java#L48-L53
ops4j/org.ops4j.pax.logging
pax-logging-service/src/main/java/org/ops4j/pax/logging/service/internal/PaxLoggingServiceImpl.java
PaxLoggingServiceImpl.setJULLevel
private static void setJULLevel( java.util.logging.Logger logger, String log4jLevelConfig ) { String crumb[] = log4jLevelConfig.split( "," ); if (crumb.length > 0) { Level level = log4jLevelToJULLevel( crumb[0].trim() ); logger.setLevel( level ); } }
java
private static void setJULLevel( java.util.logging.Logger logger, String log4jLevelConfig ) { String crumb[] = log4jLevelConfig.split( "," ); if (crumb.length > 0) { Level level = log4jLevelToJULLevel( crumb[0].trim() ); logger.setLevel( level ); } }
[ "private", "static", "void", "setJULLevel", "(", "java", ".", "util", ".", "logging", ".", "Logger", "logger", ",", "String", "log4jLevelConfig", ")", "{", "String", "crumb", "[", "]", "=", "log4jLevelConfig", ".", "split", "(", "\",\"", ")", ";", "if", ...
Set the log level to the specified JUL logger. @param logger The logger to configure @param log4jLevelConfig The value contained in the property file. (For example: "ERROR, file")
[ "Set", "the", "log", "level", "to", "the", "specified", "JUL", "logger", "." ]
train
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/ops4j/pax/logging/service/internal/PaxLoggingServiceImpl.java#L483-L491
mailin-api/sendinblue-java-mvn
src/main/java/com/sendinblue/Sendinblue.java
Sendinblue.delete_users_list
public String delete_users_list(Map<String, Object> data) { String id = data.get("id").toString(); Gson gson = new Gson(); String json = gson.toJson(data); return delete("list/" + id + "/delusers", json); }
java
public String delete_users_list(Map<String, Object> data) { String id = data.get("id").toString(); Gson gson = new Gson(); String json = gson.toJson(data); return delete("list/" + id + "/delusers", json); }
[ "public", "String", "delete_users_list", "(", "Map", "<", "String", ",", "Object", ">", "data", ")", "{", "String", "id", "=", "data", ".", "get", "(", "\"id\"", ")", ".", "toString", "(", ")", ";", "Gson", "gson", "=", "new", "Gson", "(", ")", ";"...
/* Delete already existing users in the SendinBlue contacts from the list. @param {Object} data contains json objects as a key value pair from HashMap. @options data {Integer} id: Id of list to unlink users from it [Mandatory] @options data {Array} users: Email address of the already existing user(s) in the SendinBlue ...
[ "/", "*", "Delete", "already", "existing", "users", "in", "the", "SendinBlue", "contacts", "from", "the", "list", "." ]
train
https://github.com/mailin-api/sendinblue-java-mvn/blob/3a186b004003450f18d619aa084adc8d75086183/src/main/java/com/sendinblue/Sendinblue.java#L666-L671
GenesysPureEngage/workspace-client-java
src/main/java/com/genesys/internal/workspace/api/ChatApi.java
ChatApi.consultByQueue
public ApiSuccessResponse consultByQueue(String id, ConsultData1 consultData) throws ApiException { ApiResponse<ApiSuccessResponse> resp = consultByQueueWithHttpInfo(id, consultData); return resp.getData(); }
java
public ApiSuccessResponse consultByQueue(String id, ConsultData1 consultData) throws ApiException { ApiResponse<ApiSuccessResponse> resp = consultByQueueWithHttpInfo(id, consultData); return resp.getData(); }
[ "public", "ApiSuccessResponse", "consultByQueue", "(", "String", "id", ",", "ConsultData1", "consultData", ")", "throws", "ApiException", "{", "ApiResponse", "<", "ApiSuccessResponse", ">", "resp", "=", "consultByQueueWithHttpInfo", "(", "id", ",", "consultData", ")",...
Consult with another agent via a queue Consult with another agent during a chat by sending an consult invitation to the specified queue. A consult occurs in the context of the specified chat, but the customer is not aware of the consulting agent. Messages and notifications from the consulting agent are only visible to ...
[ "Consult", "with", "another", "agent", "via", "a", "queue", "Consult", "with", "another", "agent", "during", "a", "chat", "by", "sending", "an", "consult", "invitation", "to", "the", "specified", "queue", ".", "A", "consult", "occurs", "in", "the", "context"...
train
https://github.com/GenesysPureEngage/workspace-client-java/blob/509fdd9e89b9359d012f9a72be95037a3cef53e6/src/main/java/com/genesys/internal/workspace/api/ChatApi.java#L795-L798
Ordinastie/MalisisCore
src/main/java/net/malisis/core/renderer/icon/provider/ConnectedIconsProvider.java
ConnectedIconsProvider.getConnections
private int getConnections(IBlockAccess world, BlockPos pos, EnumFacing facing) { Block block = world.getBlockState(pos).getBlock(); int connection = 0; for (int i = 0; i < 4; i++) { if (world.getBlockState(pos.offset(sides[facing.getIndex()][i])).getBlock() == block) connection |= (1 << i); } retur...
java
private int getConnections(IBlockAccess world, BlockPos pos, EnumFacing facing) { Block block = world.getBlockState(pos).getBlock(); int connection = 0; for (int i = 0; i < 4; i++) { if (world.getBlockState(pos.offset(sides[facing.getIndex()][i])).getBlock() == block) connection |= (1 << i); } retur...
[ "private", "int", "getConnections", "(", "IBlockAccess", "world", ",", "BlockPos", "pos", ",", "EnumFacing", "facing", ")", "{", "Block", "block", "=", "world", ".", "getBlockState", "(", "pos", ")", ".", "getBlock", "(", ")", ";", "int", "connection", "="...
Determines the connections available at this position for the specified <b>side</b>. @param world the world @param pos the pos @param facing the facing @return the connections
[ "Determines", "the", "connections", "available", "at", "this", "position", "for", "the", "specified", "<b", ">", "side<", "/", "b", ">", "." ]
train
https://github.com/Ordinastie/MalisisCore/blob/4f8e1fa462d5c372fc23414482ba9f429881cc54/src/main/java/net/malisis/core/renderer/icon/provider/ConnectedIconsProvider.java#L162-L172
pip-services3-java/pip-services3-commons-java
src/org/pipservices3/commons/config/ConfigParams.java
ConfigParams.addSection
public void addSection(String section, ConfigParams sectionParams) { if (section == null) throw new NullPointerException("Section name cannot be null"); if (sectionParams != null) { for (Map.Entry<String, String> entry : sectionParams.entrySet()) { String key = entry.getKey(); if (key.length() > 0 &...
java
public void addSection(String section, ConfigParams sectionParams) { if (section == null) throw new NullPointerException("Section name cannot be null"); if (sectionParams != null) { for (Map.Entry<String, String> entry : sectionParams.entrySet()) { String key = entry.getKey(); if (key.length() > 0 &...
[ "public", "void", "addSection", "(", "String", "section", ",", "ConfigParams", "sectionParams", ")", "{", "if", "(", "section", "==", "null", ")", "throw", "new", "NullPointerException", "(", "\"Section name cannot be null\"", ")", ";", "if", "(", "sectionParams",...
Adds parameters into this ConfigParams under specified section. Keys for the new parameters are appended with section dot prefix. @param section name of the section where add new parameters @param sectionParams new parameters to be added.
[ "Adds", "parameters", "into", "this", "ConfigParams", "under", "specified", "section", ".", "Keys", "for", "the", "new", "parameters", "are", "appended", "with", "section", "dot", "prefix", "." ]
train
https://github.com/pip-services3-java/pip-services3-commons-java/blob/a8a0c3e5ec58f0663c295aa855c6b3afad2af86a/src/org/pipservices3/commons/config/ConfigParams.java#L130-L148
nguillaumin/slick2d-maven
slick2d-core/src/main/java/org/newdawn/slick/tiled/TiledMap.java
TiledMap.getObjectImage
public String getObjectImage(int groupID, int objectID) { if (groupID >= 0 && groupID < objectGroups.size()) { ObjectGroup grp = (ObjectGroup) objectGroups.get(groupID); if (objectID >= 0 && objectID < grp.objects.size()) { GroupObject object = (GroupObject) grp.objects.get(objectID); if (object ...
java
public String getObjectImage(int groupID, int objectID) { if (groupID >= 0 && groupID < objectGroups.size()) { ObjectGroup grp = (ObjectGroup) objectGroups.get(groupID); if (objectID >= 0 && objectID < grp.objects.size()) { GroupObject object = (GroupObject) grp.objects.get(objectID); if (object ...
[ "public", "String", "getObjectImage", "(", "int", "groupID", ",", "int", "objectID", ")", "{", "if", "(", "groupID", ">=", "0", "&&", "groupID", "<", "objectGroups", ".", "size", "(", ")", ")", "{", "ObjectGroup", "grp", "=", "(", "ObjectGroup", ")", "...
Retrieve the image source property for a given object @param groupID Index of a group @param objectID Index of an object @return The image source reference or null if one isn't defined
[ "Retrieve", "the", "image", "source", "property", "for", "a", "given", "object" ]
train
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/tiled/TiledMap.java#L926-L941
elki-project/elki
elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/quality/AbstractKMeansQualityMeasure.java
AbstractKMeansQualityMeasure.logLikelihood
@Reference(authors = "D. Pelleg, A. Moore", // title = "X-means: Extending K-means with Efficient Estimation on the Number of Clusters", // booktitle = "Proc. 17th Int. Conf. on Machine Learning (ICML 2000)", // url = "http://www.pelleg.org/shared/hp/download/xmeans.ps", // bibkey = "DBLP:conf/i...
java
@Reference(authors = "D. Pelleg, A. Moore", // title = "X-means: Extending K-means with Efficient Estimation on the Number of Clusters", // booktitle = "Proc. 17th Int. Conf. on Machine Learning (ICML 2000)", // url = "http://www.pelleg.org/shared/hp/download/xmeans.ps", // bibkey = "DBLP:conf/i...
[ "@", "Reference", "(", "authors", "=", "\"D. Pelleg, A. Moore\"", ",", "//", "title", "=", "\"X-means: Extending K-means with Efficient Estimation on the Number of Clusters\"", ",", "//", "booktitle", "=", "\"Proc. 17th Int. Conf. on Machine Learning (ICML 2000)\"", ",", "//", "u...
Computes log likelihood of an entire clustering. <p> Version as used in the X-means publication. @param relation Data relation @param clustering Clustering @param distanceFunction Distance function @param <V> Vector type @return Log Likelihood.
[ "Computes", "log", "likelihood", "of", "an", "entire", "clustering", ".", "<p", ">", "Version", "as", "used", "in", "the", "X", "-", "means", "publication", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/quality/AbstractKMeansQualityMeasure.java#L124-L172
HeidelTime/heideltime
src/de/unihd/dbs/uima/annotator/heideltime/utilities/DateCalculator.java
DateCalculator.getXNextWeek
public static String getXNextWeek(String date, Integer x, Language language) { NormalizationManager nm = NormalizationManager.getInstance(language, false); String date_no_W = date.replace("W", ""); SimpleDateFormat formatter = new SimpleDateFormat("yyyy-w"); String newDate = ""; Calendar c = Calendar.getInsta...
java
public static String getXNextWeek(String date, Integer x, Language language) { NormalizationManager nm = NormalizationManager.getInstance(language, false); String date_no_W = date.replace("W", ""); SimpleDateFormat formatter = new SimpleDateFormat("yyyy-w"); String newDate = ""; Calendar c = Calendar.getInsta...
[ "public", "static", "String", "getXNextWeek", "(", "String", "date", ",", "Integer", "x", ",", "Language", "language", ")", "{", "NormalizationManager", "nm", "=", "NormalizationManager", ".", "getInstance", "(", "language", ",", "false", ")", ";", "String", "...
get the x-next week of date @param date current date @param x amount of weeks to go forward @return new week
[ "get", "the", "x", "-", "next", "week", "of", "date" ]
train
https://github.com/HeidelTime/heideltime/blob/4ef5002eb5ecfeb818086ff7e394e792ee360335/src/de/unihd/dbs/uima/annotator/heideltime/utilities/DateCalculator.java#L213-L229
versionone/VersionOne.SDK.Java.ObjectModel
src/main/java/com/versionone/om/V1InstanceGetter.java
V1InstanceGetter.byID
public <T extends Entity> T byID(Class<T> clazz, AssetID id) { return instance.getWrapperManager().create(clazz, id, true); }
java
public <T extends Entity> T byID(Class<T> clazz, AssetID id) { return instance.getWrapperManager().create(clazz, id, true); }
[ "public", "<", "T", "extends", "Entity", ">", "T", "byID", "(", "Class", "<", "T", ">", "clazz", ",", "AssetID", "id", ")", "{", "return", "instance", ".", "getWrapperManager", "(", ")", ".", "create", "(", "clazz", ",", "id", ",", "true", ")", ";"...
Returns an Entity of Type T with the given ID or null if the ID is invalid. @param <T> Entity Type to retrieve. @param clazz - T Class. @param id ID of the Entity to retrieve. @return an instance of an Entity of Type T or null if ID is invalid.
[ "Returns", "an", "Entity", "of", "Type", "T", "with", "the", "given", "ID", "or", "null", "if", "the", "ID", "is", "invalid", "." ]
train
https://github.com/versionone/VersionOne.SDK.Java.ObjectModel/blob/59d35b67c849299631bca45ee94143237eb2ae1a/src/main/java/com/versionone/om/V1InstanceGetter.java#L983-L985
JodaOrg/joda-time
src/main/java/org/joda/time/format/PeriodFormatterBuilder.java
PeriodFormatterBuilder.appendSeparatorIfFieldsAfter
public PeriodFormatterBuilder appendSeparatorIfFieldsAfter(String text) { return appendSeparator(text, text, null, false, true); }
java
public PeriodFormatterBuilder appendSeparatorIfFieldsAfter(String text) { return appendSeparator(text, text, null, false, true); }
[ "public", "PeriodFormatterBuilder", "appendSeparatorIfFieldsAfter", "(", "String", "text", ")", "{", "return", "appendSeparator", "(", "text", ",", "text", ",", "null", ",", "false", ",", "true", ")", ";", "}" ]
Append a separator, which is output only if fields are printed after the separator. <p> For example, <code>builder.appendDays().appendSeparatorIfFieldsAfter(",").appendHours()</code> will only output the comma if the hours fields is output. <p> The text will be parsed case-insensitively. <p> Note: appending a separator...
[ "Append", "a", "separator", "which", "is", "output", "only", "if", "fields", "are", "printed", "after", "the", "separator", ".", "<p", ">", "For", "example", "<code", ">", "builder", ".", "appendDays", "()", ".", "appendSeparatorIfFieldsAfter", "(", ")", "."...
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/format/PeriodFormatterBuilder.java#L747-L749
zeroturnaround/zt-zip
src/main/java/org/zeroturnaround/zip/ZipUtil.java
ZipUtil.pack
public static void pack(File sourceDir, OutputStream os, NameMapper mapper, int compressionLevel) { log.debug("Compressing '{}' into a stream.", sourceDir); if (!sourceDir.exists()) { throw new ZipException("Given file '" + sourceDir + "' doesn't exist!"); } ZipOutputStream out = null; IOExcep...
java
public static void pack(File sourceDir, OutputStream os, NameMapper mapper, int compressionLevel) { log.debug("Compressing '{}' into a stream.", sourceDir); if (!sourceDir.exists()) { throw new ZipException("Given file '" + sourceDir + "' doesn't exist!"); } ZipOutputStream out = null; IOExcep...
[ "public", "static", "void", "pack", "(", "File", "sourceDir", ",", "OutputStream", "os", ",", "NameMapper", "mapper", ",", "int", "compressionLevel", ")", "{", "log", ".", "debug", "(", "\"Compressing '{}' into a stream.\"", ",", "sourceDir", ")", ";", "if", "...
Compresses the given directory and all of its sub-directories into the passed in stream. It is the responsibility of the caller to close the passed in stream properly. @param sourceDir root directory. @param os output stream (will be buffered in this method). @param mapper call-back for renaming the entries. @param co...
[ "Compresses", "the", "given", "directory", "and", "all", "of", "its", "sub", "-", "directories", "into", "the", "passed", "in", "stream", ".", "It", "is", "the", "responsibility", "of", "the", "caller", "to", "close", "the", "passed", "in", "stream", "prop...
train
https://github.com/zeroturnaround/zt-zip/blob/abb4dc43583e4d19339c0c021035019798970a13/src/main/java/org/zeroturnaround/zip/ZipUtil.java#L1690-L1719
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.getKeyAsync
public Observable<KeyBundle> getKeyAsync(String vaultBaseUrl, String keyName, String keyVersion) { return getKeyWithServiceResponseAsync(vaultBaseUrl, keyName, keyVersion).map(new Func1<ServiceResponse<KeyBundle>, KeyBundle>() { @Override public KeyBundle call(ServiceResponse<KeyBundle> ...
java
public Observable<KeyBundle> getKeyAsync(String vaultBaseUrl, String keyName, String keyVersion) { return getKeyWithServiceResponseAsync(vaultBaseUrl, keyName, keyVersion).map(new Func1<ServiceResponse<KeyBundle>, KeyBundle>() { @Override public KeyBundle call(ServiceResponse<KeyBundle> ...
[ "public", "Observable", "<", "KeyBundle", ">", "getKeyAsync", "(", "String", "vaultBaseUrl", ",", "String", "keyName", ",", "String", "keyVersion", ")", "{", "return", "getKeyWithServiceResponseAsync", "(", "vaultBaseUrl", ",", "keyName", ",", "keyVersion", ")", "...
Gets the public part of a stored key. The get key operation is applicable to all key types. If the requested key is symmetric, then no key material is released in the response. This operation requires the keys/get permission. @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. @param keyNa...
[ "Gets", "the", "public", "part", "of", "a", "stored", "key", ".", "The", "get", "key", "operation", "is", "applicable", "to", "all", "key", "types", ".", "If", "the", "requested", "key", "is", "symmetric", "then", "no", "key", "material", "is", "released...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L1414-L1421
lucee/Lucee
core/src/main/java/lucee/transformer/library/tag/TagLibFactory.java
TagLibFactory.endElement
@Override public void endElement(String uri, String name, String qName) { setContent(content.toString().trim()); content = new StringBuffer(); inside = ""; /* * if(tag!=null && tag.getName().equalsIgnoreCase("input")) { * print.ln(tag.getName()+"-"+att.getName()+":"+inside+"-"+insideTag+"-"+insideAtt); * ...
java
@Override public void endElement(String uri, String name, String qName) { setContent(content.toString().trim()); content = new StringBuffer(); inside = ""; /* * if(tag!=null && tag.getName().equalsIgnoreCase("input")) { * print.ln(tag.getName()+"-"+att.getName()+":"+inside+"-"+insideTag+"-"+insideAtt); * ...
[ "@", "Override", "public", "void", "endElement", "(", "String", "uri", ",", "String", "name", ",", "String", "qName", ")", "{", "setContent", "(", "content", ".", "toString", "(", ")", ".", "trim", "(", ")", ")", ";", "content", "=", "new", "StringBuff...
Geerbte Methode von org.xml.sax.ContentHandler, wird bei durchparsen des XML, beim auftreten eines End-Tag aufgerufen. @see org.xml.sax.ContentHandler#endElement(String, String, String)
[ "Geerbte", "Methode", "von", "org", ".", "xml", ".", "sax", ".", "ContentHandler", "wird", "bei", "durchparsen", "des", "XML", "beim", "auftreten", "eines", "End", "-", "Tag", "aufgerufen", "." ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/transformer/library/tag/TagLibFactory.java#L209-L224
Erudika/para
para-server/src/main/java/com/erudika/para/security/filters/FacebookAuthFilter.java
FacebookAuthFilter.attemptAuthentication
@Override public Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response) throws IOException { final String requestURI = request.getRequestURI(); UserAuthentication userAuth = null; if (requestURI.endsWith(FACEBOOK_ACTION)) { String authCode = request.getParameter("co...
java
@Override public Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response) throws IOException { final String requestURI = request.getRequestURI(); UserAuthentication userAuth = null; if (requestURI.endsWith(FACEBOOK_ACTION)) { String authCode = request.getParameter("co...
[ "@", "Override", "public", "Authentication", "attemptAuthentication", "(", "HttpServletRequest", "request", ",", "HttpServletResponse", "response", ")", "throws", "IOException", "{", "final", "String", "requestURI", "=", "request", ".", "getRequestURI", "(", ")", ";",...
Handles an authentication request. @param request HTTP request @param response HTTP response @return an authentication object that contains the principal object if successful. @throws IOException ex
[ "Handles", "an", "authentication", "request", "." ]
train
https://github.com/Erudika/para/blob/5ba096c477042ea7b18e9a0e8b5b1ee0f5bd6ce9/para-server/src/main/java/com/erudika/para/security/filters/FacebookAuthFilter.java#L92-L119
VoltDB/voltdb
src/frontend/org/voltdb/AbstractTopology.java
AbstractTopology.getTopology
public static AbstractTopology getTopology(Map<Integer, HostInfo> hostInfos, Set<Integer> missingHosts, int kfactor, boolean restorePartition ) { TopologyBuilder builder = addPartitionsToHosts(hostInfos, missingHosts, kfactor, 0); AbstractTopology topo = new AbstractTopology(EMPTY_TOPOLOGY, ...
java
public static AbstractTopology getTopology(Map<Integer, HostInfo> hostInfos, Set<Integer> missingHosts, int kfactor, boolean restorePartition ) { TopologyBuilder builder = addPartitionsToHosts(hostInfos, missingHosts, kfactor, 0); AbstractTopology topo = new AbstractTopology(EMPTY_TOPOLOGY, ...
[ "public", "static", "AbstractTopology", "getTopology", "(", "Map", "<", "Integer", ",", "HostInfo", ">", "hostInfos", ",", "Set", "<", "Integer", ">", "missingHosts", ",", "int", "kfactor", ",", "boolean", "restorePartition", ")", "{", "TopologyBuilder", "builde...
Create a new topology using {@code hosts} @param hostInfos hosts to put in topology @param missingHosts set of missing host IDs @param kfactor for cluster @return {@link AbstractTopology} for cluster @throws RuntimeException if hosts are not valid for topology
[ "Create", "a", "new", "topology", "using", "{", "@code", "hosts", "}" ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/AbstractTopology.java#L975-L983
JodaOrg/joda-time
src/main/java/org/joda/time/DateTimeComparator.java
DateTimeComparator.getInstance
public static DateTimeComparator getInstance(DateTimeFieldType lowerLimit, DateTimeFieldType upperLimit) { if (lowerLimit == null && upperLimit == null) { return ALL_INSTANCE; } if (lowerLimit == DateTimeFieldType.dayOfYear() && upperLimit == null) { return DATE_INSTANCE;...
java
public static DateTimeComparator getInstance(DateTimeFieldType lowerLimit, DateTimeFieldType upperLimit) { if (lowerLimit == null && upperLimit == null) { return ALL_INSTANCE; } if (lowerLimit == DateTimeFieldType.dayOfYear() && upperLimit == null) { return DATE_INSTANCE;...
[ "public", "static", "DateTimeComparator", "getInstance", "(", "DateTimeFieldType", "lowerLimit", ",", "DateTimeFieldType", "upperLimit", ")", "{", "if", "(", "lowerLimit", "==", "null", "&&", "upperLimit", "==", "null", ")", "{", "return", "ALL_INSTANCE", ";", "}"...
Returns a DateTimeComparator with a lower and upper limit. Fields of a magnitude less than the lower limit are excluded from comparisons. Fields of a magnitude greater than or equal to the upper limit are also excluded from comparisons. Either limit may be specified as null, which indicates an unbounded limit. <p> The ...
[ "Returns", "a", "DateTimeComparator", "with", "a", "lower", "and", "upper", "limit", ".", "Fields", "of", "a", "magnitude", "less", "than", "the", "lower", "limit", "are", "excluded", "from", "comparisons", ".", "Fields", "of", "a", "magnitude", "greater", "...
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/DateTimeComparator.java#L105-L116
alkacon/opencms-core
src/org/opencms/db/CmsDriverManager.java
CmsDriverManager.removeResourceFromProject
public void removeResourceFromProject(CmsDbContext dbc, CmsResource resource) throws CmsException { // remove the resource to the project only if the resource is already in the project if (isInsideCurrentProject(dbc, resource.getRootPath())) { // check if there are already any subfolders of...
java
public void removeResourceFromProject(CmsDbContext dbc, CmsResource resource) throws CmsException { // remove the resource to the project only if the resource is already in the project if (isInsideCurrentProject(dbc, resource.getRootPath())) { // check if there are already any subfolders of...
[ "public", "void", "removeResourceFromProject", "(", "CmsDbContext", "dbc", ",", "CmsResource", "resource", ")", "throws", "CmsException", "{", "// remove the resource to the project only if the resource is already in the project", "if", "(", "isInsideCurrentProject", "(", "dbc", ...
Removes a resource from the current project of the user.<p> @param dbc the current database context @param resource the resource to apply this operation to @throws CmsException if something goes wrong @see CmsObject#copyResourceToProject(String) @see I_CmsResourceType#copyResourceToProject(CmsObject, CmsSecurityMana...
[ "Removes", "a", "resource", "from", "the", "current", "project", "of", "the", "user", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsDriverManager.java#L8218-L8247
languagetool-org/languagetool
languagetool-core/src/main/java/org/languagetool/ResourceBundleTools.java
ResourceBundleTools.getMessageBundle
public static ResourceBundle getMessageBundle() { try { ResourceBundle bundle = ResourceBundle.getBundle(MESSAGE_BUNDLE); ResourceBundle fallbackBundle = ResourceBundle.getBundle(MESSAGE_BUNDLE, Locale.ENGLISH); return new ResourceBundleWithFallback(bundle, fallbackBundle); } catch (MissingRes...
java
public static ResourceBundle getMessageBundle() { try { ResourceBundle bundle = ResourceBundle.getBundle(MESSAGE_BUNDLE); ResourceBundle fallbackBundle = ResourceBundle.getBundle(MESSAGE_BUNDLE, Locale.ENGLISH); return new ResourceBundleWithFallback(bundle, fallbackBundle); } catch (MissingRes...
[ "public", "static", "ResourceBundle", "getMessageBundle", "(", ")", "{", "try", "{", "ResourceBundle", "bundle", "=", "ResourceBundle", ".", "getBundle", "(", "MESSAGE_BUNDLE", ")", ";", "ResourceBundle", "fallbackBundle", "=", "ResourceBundle", ".", "getBundle", "(...
Gets the ResourceBundle (i18n strings) for the default language of the user's system.
[ "Gets", "the", "ResourceBundle", "(", "i18n", "strings", ")", "for", "the", "default", "language", "of", "the", "user", "s", "system", "." ]
train
https://github.com/languagetool-org/languagetool/blob/b7a3d63883d242fb2525877c6382681c57a0a142/languagetool-core/src/main/java/org/languagetool/ResourceBundleTools.java#L39-L47
hal/core
gui/src/main/java/org/jboss/as/console/client/v3/stores/domain/ServerStore.java
ServerStore.deriveGroups
private SortedSet<ServerGroup> deriveGroups(List<HostInfo> hosts) { serverGroups.clear(); for (HostInfo host : hosts) { List<ServerInstance> serverInstances = host.getServerInstances(); for (ServerInstance server : serverInstances) { String group = server.getGroup...
java
private SortedSet<ServerGroup> deriveGroups(List<HostInfo> hosts) { serverGroups.clear(); for (HostInfo host : hosts) { List<ServerInstance> serverInstances = host.getServerInstances(); for (ServerInstance server : serverInstances) { String group = server.getGroup...
[ "private", "SortedSet", "<", "ServerGroup", ">", "deriveGroups", "(", "List", "<", "HostInfo", ">", "hosts", ")", "{", "serverGroups", ".", "clear", "(", ")", ";", "for", "(", "HostInfo", "host", ":", "hosts", ")", "{", "List", "<", "ServerInstance", ">"...
Builds {@link ServerGroup} instances and populates the map {@link #serverGroups}
[ "Builds", "{" ]
train
https://github.com/hal/core/blob/d6d03f0bb128dc0470f5dc75fdb1ea1014400602/gui/src/main/java/org/jboss/as/console/client/v3/stores/domain/ServerStore.java#L181-L197
Azure/azure-sdk-for-java
datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/TrustedIdProvidersInner.java
TrustedIdProvidersInner.listByAccountAsync
public Observable<Page<TrustedIdProviderInner>> listByAccountAsync(final String resourceGroupName, final String accountName) { return listByAccountWithServiceResponseAsync(resourceGroupName, accountName) .map(new Func1<ServiceResponse<Page<TrustedIdProviderInner>>, Page<TrustedIdProviderInner>>() { ...
java
public Observable<Page<TrustedIdProviderInner>> listByAccountAsync(final String resourceGroupName, final String accountName) { return listByAccountWithServiceResponseAsync(resourceGroupName, accountName) .map(new Func1<ServiceResponse<Page<TrustedIdProviderInner>>, Page<TrustedIdProviderInner>>() { ...
[ "public", "Observable", "<", "Page", "<", "TrustedIdProviderInner", ">", ">", "listByAccountAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "accountName", ")", "{", "return", "listByAccountWithServiceResponseAsync", "(", "resourceGroupName", ...
Lists the Data Lake Store trusted identity providers within the specified Data Lake Store account. @param resourceGroupName The name of the Azure resource group. @param accountName The name of the Data Lake Store account. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable ...
[ "Lists", "the", "Data", "Lake", "Store", "trusted", "identity", "providers", "within", "the", "specified", "Data", "Lake", "Store", "account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/TrustedIdProvidersInner.java#L142-L150
Azure/azure-sdk-for-java
hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ConfigurationsInner.java
ConfigurationsInner.beginUpdateAsync
public Observable<Void> beginUpdateAsync(String resourceGroupName, String clusterName, String configurationName, Map<String, String> parameters) { return beginUpdateWithServiceResponseAsync(resourceGroupName, clusterName, configurationName, parameters).map(new Func1<ServiceResponse<Void>, Void>() { ...
java
public Observable<Void> beginUpdateAsync(String resourceGroupName, String clusterName, String configurationName, Map<String, String> parameters) { return beginUpdateWithServiceResponseAsync(resourceGroupName, clusterName, configurationName, parameters).map(new Func1<ServiceResponse<Void>, Void>() { ...
[ "public", "Observable", "<", "Void", ">", "beginUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "clusterName", ",", "String", "configurationName", ",", "Map", "<", "String", ",", "String", ">", "parameters", ")", "{", "return", "beginUpdateWithSer...
Configures the HTTP settings on the specified cluster. This API is deprecated, please use UpdateGatewaySettings in cluster endpoint instead. @param resourceGroupName The name of the resource group. @param clusterName The name of the cluster. @param configurationName The name of the cluster configuration. @param parame...
[ "Configures", "the", "HTTP", "settings", "on", "the", "specified", "cluster", ".", "This", "API", "is", "deprecated", "please", "use", "UpdateGatewaySettings", "in", "cluster", "endpoint", "instead", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ConfigurationsInner.java#L285-L292
terrestris/shogun-core
src/shogun-core-main/src/main/java/de/terrestris/shoguncore/security/access/entity/UserGroupPermissionEvaluator.java
UserGroupPermissionEvaluator.hasPermission
@Override public boolean hasPermission(User user, E userGroup, Permission permission) { // always grant READ access to groups in which the user itself is a member if (user != null && permission.equals(Permission.READ) && userGroup.getMembers().contains(user)) { LOG.trace("Gr...
java
@Override public boolean hasPermission(User user, E userGroup, Permission permission) { // always grant READ access to groups in which the user itself is a member if (user != null && permission.equals(Permission.READ) && userGroup.getMembers().contains(user)) { LOG.trace("Gr...
[ "@", "Override", "public", "boolean", "hasPermission", "(", "User", "user", ",", "E", "userGroup", ",", "Permission", "permission", ")", "{", "// always grant READ access to groups in which the user itself is a member", "if", "(", "user", "!=", "null", "&&", "permission...
Grants READ permission on groups where the user is a member. Uses default implementation otherwise.
[ "Grants", "READ", "permission", "on", "groups", "where", "the", "user", "is", "a", "member", ".", "Uses", "default", "implementation", "otherwise", "." ]
train
https://github.com/terrestris/shogun-core/blob/3dbabda35ae63235265913c865dba389b050b6e6/src/shogun-core-main/src/main/java/de/terrestris/shoguncore/security/access/entity/UserGroupPermissionEvaluator.java#L34-L46
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/factory/filter/kernel/FactoryKernel.java
FactoryKernel.random2D_F32
public static Kernel2D_F32 random2D_F32(int width , int offset, float min, float max, Random rand) { Kernel2D_F32 ret = new Kernel2D_F32(width,offset); float range = max - min; for (int i = 0; i < ret.data.length; i++) { ret.data[i] = rand.nextFloat() * range + min; } return ret; }
java
public static Kernel2D_F32 random2D_F32(int width , int offset, float min, float max, Random rand) { Kernel2D_F32 ret = new Kernel2D_F32(width,offset); float range = max - min; for (int i = 0; i < ret.data.length; i++) { ret.data[i] = rand.nextFloat() * range + min; } return ret; }
[ "public", "static", "Kernel2D_F32", "random2D_F32", "(", "int", "width", ",", "int", "offset", ",", "float", "min", ",", "float", "max", ",", "Random", "rand", ")", "{", "Kernel2D_F32", "ret", "=", "new", "Kernel2D_F32", "(", "width", ",", "offset", ")", ...
Creates a random 2D kernel drawn from a uniform distribution. @param width Kernel's width. @param offset Offset for element zero in the kernel @param min minimum value. @param max maximum value. @param rand Random number generator. @return Randomized kernel.
[ "Creates", "a", "random", "2D", "kernel", "drawn", "from", "a", "uniform", "distribution", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/factory/filter/kernel/FactoryKernel.java#L298-L307
mikepenz/FastAdapter
library-core/src/main/java/com/mikepenz/fastadapter/FastAdapter.java
FastAdapter.onBindViewHolder
@Override @SuppressWarnings("unchecked") public void onBindViewHolder(final RecyclerView.ViewHolder holder, int position) { if (mLegacyBindViewMode) { if (mVerbose) { Log.v(TAG, "onBindViewHolderLegacy: " + position + "/" + holder.getItemViewType() + " isLegacy: true"); ...
java
@Override @SuppressWarnings("unchecked") public void onBindViewHolder(final RecyclerView.ViewHolder holder, int position) { if (mLegacyBindViewMode) { if (mVerbose) { Log.v(TAG, "onBindViewHolderLegacy: " + position + "/" + holder.getItemViewType() + " isLegacy: true"); ...
[ "@", "Override", "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "void", "onBindViewHolder", "(", "final", "RecyclerView", ".", "ViewHolder", "holder", ",", "int", "position", ")", "{", "if", "(", "mLegacyBindViewMode", ")", "{", "if", "(", "mVer...
Binds the data to the created ViewHolder and sets the listeners to the holder.itemView Note that you should use the `onBindViewHolder(RecyclerView.ViewHolder holder, int position, List payloads` as it allows you to implement a more efficient adapter implementation @param holder the viewHolder we bind the data on @pa...
[ "Binds", "the", "data", "to", "the", "created", "ViewHolder", "and", "sets", "the", "listeners", "to", "the", "holder", ".", "itemView", "Note", "that", "you", "should", "use", "the", "onBindViewHolder", "(", "RecyclerView", ".", "ViewHolder", "holder", "int",...
train
https://github.com/mikepenz/FastAdapter/blob/3b2412abe001ba58422e0125846b704d4dba4ae9/library-core/src/main/java/com/mikepenz/fastadapter/FastAdapter.java#L712-L724
google/j2objc
jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java
MutableBigInteger.compareShifted
private int compareShifted(MutableBigInteger b, int ints) { int blen = b.intLen; int alen = intLen - ints; if (alen < blen) return -1; if (alen > blen) return 1; // Add Integer.MIN_VALUE to make the comparison act as unsigned integer // comparison....
java
private int compareShifted(MutableBigInteger b, int ints) { int blen = b.intLen; int alen = intLen - ints; if (alen < blen) return -1; if (alen > blen) return 1; // Add Integer.MIN_VALUE to make the comparison act as unsigned integer // comparison....
[ "private", "int", "compareShifted", "(", "MutableBigInteger", "b", ",", "int", "ints", ")", "{", "int", "blen", "=", "b", ".", "intLen", ";", "int", "alen", "=", "intLen", "-", "ints", ";", "if", "(", "alen", "<", "blen", ")", "return", "-", "1", "...
Returns a value equal to what {@code b.leftShift(32*ints); return compare(b);} would return, but doesn't change the value of {@code b}.
[ "Returns", "a", "value", "equal", "to", "what", "{" ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java#L284-L304
timols/java-gitlab-api
src/main/java/org/gitlab/api/GitlabAPI.java
GitlabAPI.getAward
public GitlabAward getAward(GitlabMergeRequest mergeRequest, Integer awardId) throws IOException { String tailUrl = GitlabProject.URL + "/" + mergeRequest.getProjectId() + GitlabMergeRequest.URL + "/" + mergeRequest.getIid() + GitlabAward.URL + "/" + awardId; return retrieve().to(tailUr...
java
public GitlabAward getAward(GitlabMergeRequest mergeRequest, Integer awardId) throws IOException { String tailUrl = GitlabProject.URL + "/" + mergeRequest.getProjectId() + GitlabMergeRequest.URL + "/" + mergeRequest.getIid() + GitlabAward.URL + "/" + awardId; return retrieve().to(tailUr...
[ "public", "GitlabAward", "getAward", "(", "GitlabMergeRequest", "mergeRequest", ",", "Integer", "awardId", ")", "throws", "IOException", "{", "String", "tailUrl", "=", "GitlabProject", ".", "URL", "+", "\"/\"", "+", "mergeRequest", ".", "getProjectId", "(", ")", ...
Get a specific award for a merge request @param mergeRequest @param awardId @throws IOException on gitlab api call error
[ "Get", "a", "specific", "award", "for", "a", "merge", "request" ]
train
https://github.com/timols/java-gitlab-api/blob/f03eedf952cfbb40306be3bf9234dcf78fab029e/src/main/java/org/gitlab/api/GitlabAPI.java#L3463-L3468
googleapis/google-cloud-java
google-cloud-clients/google-cloud-storage/src/main/java/com/google/cloud/storage/BlobInfo.java
BlobInfo.newBuilder
public static Builder newBuilder(String bucket, String name, Long generation) { return newBuilder(BlobId.of(bucket, name, generation)); }
java
public static Builder newBuilder(String bucket, String name, Long generation) { return newBuilder(BlobId.of(bucket, name, generation)); }
[ "public", "static", "Builder", "newBuilder", "(", "String", "bucket", ",", "String", "name", ",", "Long", "generation", ")", "{", "return", "newBuilder", "(", "BlobId", ".", "of", "(", "bucket", ",", "name", ",", "generation", ")", ")", ";", "}" ]
Returns a {@code BlobInfo} builder where blob identity is set using the provided values.
[ "Returns", "a", "{" ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-storage/src/main/java/com/google/cloud/storage/BlobInfo.java#L1019-L1021
geomajas/geomajas-project-client-gwt
client/src/main/java/org/geomajas/gwt/client/map/feature/Feature.java
Feature.setShortAttribute
public void setShortAttribute(String name, Short value) { Attribute attribute = getAttributes().get(name); if (!(attribute instanceof ShortAttribute)) { throw new IllegalStateException("Cannot set short value on attribute with different type, " + attribute.getClass().getName() + " setting value " + value); ...
java
public void setShortAttribute(String name, Short value) { Attribute attribute = getAttributes().get(name); if (!(attribute instanceof ShortAttribute)) { throw new IllegalStateException("Cannot set short value on attribute with different type, " + attribute.getClass().getName() + " setting value " + value); ...
[ "public", "void", "setShortAttribute", "(", "String", "name", ",", "Short", "value", ")", "{", "Attribute", "attribute", "=", "getAttributes", "(", ")", ".", "get", "(", "name", ")", ";", "if", "(", "!", "(", "attribute", "instanceof", "ShortAttribute", ")...
Set attribute value of given type. @param name attribute name @param value attribute value
[ "Set", "attribute", "value", "of", "given", "type", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/map/feature/Feature.java#L335-L342
VoltDB/voltdb
examples/voter/client/voter/JDBCBenchmark.java
JDBCBenchmark.runBenchmark
public void runBenchmark() throws Exception { System.out.print(HORIZONTAL_RULE); System.out.println(" Setup & Initialization"); System.out.println(HORIZONTAL_RULE); // connect to one or more servers, loop until success connect(config.servers); // initialize using synchr...
java
public void runBenchmark() throws Exception { System.out.print(HORIZONTAL_RULE); System.out.println(" Setup & Initialization"); System.out.println(HORIZONTAL_RULE); // connect to one or more servers, loop until success connect(config.servers); // initialize using synchr...
[ "public", "void", "runBenchmark", "(", ")", "throws", "Exception", "{", "System", ".", "out", ".", "print", "(", "HORIZONTAL_RULE", ")", ";", "System", ".", "out", ".", "println", "(", "\" Setup & Initialization\"", ")", ";", "System", ".", "out", ".", "pr...
Core benchmark code. Connect. Initialize. Run the loop. Cleanup. Print Results. @throws Exception if anything unexpected happens.
[ "Core", "benchmark", "code", ".", "Connect", ".", "Initialize", ".", "Run", "the", "loop", ".", "Cleanup", ".", "Print", "Results", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/examples/voter/client/voter/JDBCBenchmark.java#L391-L457
lucee/Lucee
core/src/main/java/lucee/runtime/schedule/StorageUtil.java
StorageUtil.toCredentials
public Credentials toCredentials(Element el, String attributeUser, String attributePassword, Credentials defaultCredentials) { String user = el.getAttribute(attributeUser); String pass = el.getAttribute(attributePassword); if (user == null) return defaultCredentials; if (pass == null) pass = ""; return Credentials...
java
public Credentials toCredentials(Element el, String attributeUser, String attributePassword, Credentials defaultCredentials) { String user = el.getAttribute(attributeUser); String pass = el.getAttribute(attributePassword); if (user == null) return defaultCredentials; if (pass == null) pass = ""; return Credentials...
[ "public", "Credentials", "toCredentials", "(", "Element", "el", ",", "String", "attributeUser", ",", "String", "attributePassword", ",", "Credentials", "defaultCredentials", ")", "{", "String", "user", "=", "el", ".", "getAttribute", "(", "attributeUser", ")", ";"...
reads 2 XML Element Attribute ans cast it to a Credential @param el XML Element to read Attribute from it @param attributeUser Name of the user Attribute to read @param attributePassword Name of the password Attribute to read @param defaultCredentials @return Attribute Value
[ "reads", "2", "XML", "Element", "Attribute", "ans", "cast", "it", "to", "a", "Credential" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/schedule/StorageUtil.java#L342-L348
kaazing/java.client
amqp-0-9-1/amqp/src/main/java/org/kaazing/net/ws/amqp/AmqpClient.java
AmqpClient.closeConnection
AmqpClient closeConnection(int replyCode, String replyText, int classId, int methodId1, Continuation callback, ErrorHandler error) { Object[] args = {replyCode, replyText, classId, methodId1}; AmqpBuffer bodyArg = null; String methodName = "closeConnection"; String methodId = "10" + "50...
java
AmqpClient closeConnection(int replyCode, String replyText, int classId, int methodId1, Continuation callback, ErrorHandler error) { Object[] args = {replyCode, replyText, classId, methodId1}; AmqpBuffer bodyArg = null; String methodName = "closeConnection"; String methodId = "10" + "50...
[ "AmqpClient", "closeConnection", "(", "int", "replyCode", ",", "String", "replyText", ",", "int", "classId", ",", "int", "methodId1", ",", "Continuation", "callback", ",", "ErrorHandler", "error", ")", "{", "Object", "[", "]", "args", "=", "{", "replyCode", ...
Closes the Amqp Server connection. @param replyCode @param replyText @param classId @param methodId1 @param callback @param error @return AmqpClient
[ "Closes", "the", "Amqp", "Server", "connection", "." ]
train
https://github.com/kaazing/java.client/blob/25ad2ae5bb24aa9d6b79400fce649b518dcfbe26/amqp-0-9-1/amqp/src/main/java/org/kaazing/net/ws/amqp/AmqpClient.java#L898-L908
pressgang-ccms/PressGangCCMSQuery
src/main/java/org/jboss/pressgang/ccms/filter/base/BaseFilterQueryBuilder.java
BaseFilterQueryBuilder.addNotLikeCondition
protected void addNotLikeCondition(final String propertyName, final String value) { final Expression<String> propertyNameField = getRootPath().get(propertyName).as(String.class); fieldConditions.add(getCriteriaBuilder().notLike(propertyNameField, "%" + cleanLikeCondition(value) + "%")); }
java
protected void addNotLikeCondition(final String propertyName, final String value) { final Expression<String> propertyNameField = getRootPath().get(propertyName).as(String.class); fieldConditions.add(getCriteriaBuilder().notLike(propertyNameField, "%" + cleanLikeCondition(value) + "%")); }
[ "protected", "void", "addNotLikeCondition", "(", "final", "String", "propertyName", ",", "final", "String", "value", ")", "{", "final", "Expression", "<", "String", ">", "propertyNameField", "=", "getRootPath", "(", ")", ".", "get", "(", "propertyName", ")", "...
Add a Field Search Condition that will search a field for values that aren't like a specified value using the following SQL logic: {@code field NOT LIKE '%value%'} @param propertyName The name of the field as defined in the Entity mapping class. @param value The value to search against.
[ "Add", "a", "Field", "Search", "Condition", "that", "will", "search", "a", "field", "for", "values", "that", "aren", "t", "like", "a", "specified", "value", "using", "the", "following", "SQL", "logic", ":", "{", "@code", "field", "NOT", "LIKE", "%value%", ...
train
https://github.com/pressgang-ccms/PressGangCCMSQuery/blob/2bb23430adab956737d0301cd2ea933f986dd85b/src/main/java/org/jboss/pressgang/ccms/filter/base/BaseFilterQueryBuilder.java#L211-L214
jlinn/quartz-redis-jobstore
src/main/java/net/joelinn/quartz/jobstore/RedisClusterStorage.java
RedisClusterStorage.getTriggerState
@Override public Trigger.TriggerState getTriggerState(TriggerKey triggerKey, JedisCluster jedis) { final String triggerHashKey = redisSchema.triggerHashKey(triggerKey); Map<RedisTriggerState, Double> scores = new HashMap<>(RedisTriggerState.values().length); for (RedisTriggerState redisTrigg...
java
@Override public Trigger.TriggerState getTriggerState(TriggerKey triggerKey, JedisCluster jedis) { final String triggerHashKey = redisSchema.triggerHashKey(triggerKey); Map<RedisTriggerState, Double> scores = new HashMap<>(RedisTriggerState.values().length); for (RedisTriggerState redisTrigg...
[ "@", "Override", "public", "Trigger", ".", "TriggerState", "getTriggerState", "(", "TriggerKey", "triggerKey", ",", "JedisCluster", "jedis", ")", "{", "final", "String", "triggerHashKey", "=", "redisSchema", ".", "triggerHashKey", "(", "triggerKey", ")", ";", "Map...
Get the current state of the identified <code>{@link Trigger}</code>. @param triggerKey the key of the desired trigger @param jedis a thread-safe Redis connection @return the state of the trigger
[ "Get", "the", "current", "state", "of", "the", "identified", "<code", ">", "{", "@link", "Trigger", "}", "<", "/", "code", ">", "." ]
train
https://github.com/jlinn/quartz-redis-jobstore/blob/be9a52ee776d8a09866fe99fd9718bc13a0cb992/src/main/java/net/joelinn/quartz/jobstore/RedisClusterStorage.java#L399-L412
amzn/ion-java
src/com/amazon/ion/impl/IonUTF8.java
IonUTF8.getScalarReadLengthFromBytes
public final static int getScalarReadLengthFromBytes(byte[] bytes, int offset, int maxLength) { int src = offset; int end = offset + maxLength; if (src >= end) throw new ArrayIndexOutOfBoundsException(); int c = bytes[src++] & 0xff; int utf8length = getUTF8LengthFromFirstByt...
java
public final static int getScalarReadLengthFromBytes(byte[] bytes, int offset, int maxLength) { int src = offset; int end = offset + maxLength; if (src >= end) throw new ArrayIndexOutOfBoundsException(); int c = bytes[src++] & 0xff; int utf8length = getUTF8LengthFromFirstByt...
[ "public", "final", "static", "int", "getScalarReadLengthFromBytes", "(", "byte", "[", "]", "bytes", ",", "int", "offset", ",", "int", "maxLength", ")", "{", "int", "src", "=", "offset", ";", "int", "end", "=", "offset", "+", "maxLength", ";", "if", "(", ...
this helper calculates the number of bytes it will consume from the supplied byte array (bytes) if getScalarFromBytes is called with the same parameters. This is in place of having getScalarFromBytes return an object with the bytes consumed and the resultant scalar. This will throw ArrayIndexOutOfBoundsException if th...
[ "this", "helper", "calculates", "the", "number", "of", "bytes", "it", "will", "consume", "from", "the", "supplied", "byte", "array", "(", "bytes", ")", "if", "getScalarFromBytes", "is", "called", "with", "the", "same", "parameters", ".", "This", "is", "in", ...
train
https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/IonUTF8.java#L319-L330
googleapis/google-http-java-client
google-http-client/src/main/java/com/google/api/client/json/JsonFactory.java
JsonFactory.fromInputStream
public final <T> T fromInputStream(InputStream inputStream, Class<T> destinationClass) throws IOException { return createJsonParser(inputStream).parseAndClose(destinationClass); }
java
public final <T> T fromInputStream(InputStream inputStream, Class<T> destinationClass) throws IOException { return createJsonParser(inputStream).parseAndClose(destinationClass); }
[ "public", "final", "<", "T", ">", "T", "fromInputStream", "(", "InputStream", "inputStream", ",", "Class", "<", "T", ">", "destinationClass", ")", "throws", "IOException", "{", "return", "createJsonParser", "(", "inputStream", ")", ".", "parseAndClose", "(", "...
Parse and close an input stream as a JSON object, array, or value into a new instance of the given destination class using {@link JsonParser#parseAndClose(Class)}. <p>Tries to detect the charset of the input stream automatically. @param inputStream JSON value in an input stream @param destinationClass destination cla...
[ "Parse", "and", "close", "an", "input", "stream", "as", "a", "JSON", "object", "array", "or", "value", "into", "a", "new", "instance", "of", "the", "given", "destination", "class", "using", "{", "@link", "JsonParser#parseAndClose", "(", "Class", ")", "}", ...
train
https://github.com/googleapis/google-http-java-client/blob/0988ae4e0f26a80f579b6adb2b276dd8254928de/google-http-client/src/main/java/com/google/api/client/json/JsonFactory.java#L197-L200
liferay/com-liferay-commerce
commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceAddressRestrictionPersistenceImpl.java
CommerceAddressRestrictionPersistenceImpl.fetchByC_C_C
@Override public CommerceAddressRestriction fetchByC_C_C(long classNameId, long classPK, long commerceCountryId) { return fetchByC_C_C(classNameId, classPK, commerceCountryId, true); }
java
@Override public CommerceAddressRestriction fetchByC_C_C(long classNameId, long classPK, long commerceCountryId) { return fetchByC_C_C(classNameId, classPK, commerceCountryId, true); }
[ "@", "Override", "public", "CommerceAddressRestriction", "fetchByC_C_C", "(", "long", "classNameId", ",", "long", "classPK", ",", "long", "commerceCountryId", ")", "{", "return", "fetchByC_C_C", "(", "classNameId", ",", "classPK", ",", "commerceCountryId", ",", "tru...
Returns the commerce address restriction where classNameId = &#63; and classPK = &#63; and commerceCountryId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache. @param classNameId the class name ID @param classPK the class pk @param commerceCountryId the commerce country ID @return th...
[ "Returns", "the", "commerce", "address", "restriction", "where", "classNameId", "=", "&#63", ";", "and", "classPK", "=", "&#63", ";", "and", "commerceCountryId", "=", "&#63", ";", "or", "returns", "<code", ">", "null<", "/", "code", ">", "if", "it", "could...
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceAddressRestrictionPersistenceImpl.java#L1247-L1251
iipc/openwayback
wayback-core/src/main/java/org/archive/wayback/util/ByteOp.java
ByteOp.cmp
public static boolean cmp(byte[] a, byte[] b) { if(a.length != b.length) { return false; } for(int i = 0; i < a.length; i++) { if(a[i] != b[i]) { return false; } } return true; }
java
public static boolean cmp(byte[] a, byte[] b) { if(a.length != b.length) { return false; } for(int i = 0; i < a.length; i++) { if(a[i] != b[i]) { return false; } } return true; }
[ "public", "static", "boolean", "cmp", "(", "byte", "[", "]", "a", ",", "byte", "[", "]", "b", ")", "{", "if", "(", "a", ".", "length", "!=", "b", ".", "length", ")", "{", "return", "false", ";", "}", "for", "(", "int", "i", "=", "0", ";", "...
Compare two byte arrays @param a byte array to compare @param b byte array to compare @return true if a and b have same length, and all the same values, false otherwise
[ "Compare", "two", "byte", "arrays" ]
train
https://github.com/iipc/openwayback/blob/da74c3a59a5b5a5c365bd4702dcb45d263535794/wayback-core/src/main/java/org/archive/wayback/util/ByteOp.java#L61-L71
MariaDB/mariadb-connector-j
src/main/java/org/mariadb/jdbc/internal/protocol/tls/MariaDbX509TrustManager.java
MariaDbX509TrustManager.checkClientTrusted
@Override public void checkClientTrusted(X509Certificate[] x509Certificates, String string) throws CertificateException { if (trustManager == null) { return; } trustManager.checkClientTrusted(x509Certificates, string); }
java
@Override public void checkClientTrusted(X509Certificate[] x509Certificates, String string) throws CertificateException { if (trustManager == null) { return; } trustManager.checkClientTrusted(x509Certificates, string); }
[ "@", "Override", "public", "void", "checkClientTrusted", "(", "X509Certificate", "[", "]", "x509Certificates", ",", "String", "string", ")", "throws", "CertificateException", "{", "if", "(", "trustManager", "==", "null", ")", "{", "return", ";", "}", "trustManag...
Check client trusted. @param x509Certificates certificate @param string string @throws CertificateException exception
[ "Check", "client", "trusted", "." ]
train
https://github.com/MariaDB/mariadb-connector-j/blob/d148c7cd347c4680617be65d9e511b289d38a30b/src/main/java/org/mariadb/jdbc/internal/protocol/tls/MariaDbX509TrustManager.java#L203-L210
RestComm/sip-servlets
sip-servlets-examples/facebook-c2c/src/main/java/com/facebook/api/FacebookSignatureUtil.java
FacebookSignatureUtil.verifySignature
public static boolean verifySignature(Map<String, CharSequence> params, String secret, String expected) { assert !(null == secret || "".equals(secret)); if (null == params || params.isEmpty() ) return false; if (null == expected || "".equals(expected)) { r...
java
public static boolean verifySignature(Map<String, CharSequence> params, String secret, String expected) { assert !(null == secret || "".equals(secret)); if (null == params || params.isEmpty() ) return false; if (null == expected || "".equals(expected)) { r...
[ "public", "static", "boolean", "verifySignature", "(", "Map", "<", "String", ",", "CharSequence", ">", "params", ",", "String", "secret", ",", "String", "expected", ")", "{", "assert", "!", "(", "null", "==", "secret", "||", "\"\"", ".", "equals", "(", "...
Verifies that a signature received matches the expected value. @param params a map of parameters and their values, such as one obtained from extractFacebookNamespaceParams @return a boolean indicating whether the calculated signature matched the expected signature
[ "Verifies", "that", "a", "signature", "received", "matches", "the", "expected", "value", "." ]
train
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-examples/facebook-c2c/src/main/java/com/facebook/api/FacebookSignatureUtil.java#L197-L208
wildfly/wildfly-maven-plugin
core/src/main/java/org/wildfly/plugin/core/Assertions.java
Assertions.requiresNotNullOrNotEmptyParameter
static String requiresNotNullOrNotEmptyParameter(final String name, final String value) throws IllegalArgumentException { Assert.checkNotNullParam(name, value); Assert.checkNotEmptyParam(name, value); return value; }
java
static String requiresNotNullOrNotEmptyParameter(final String name, final String value) throws IllegalArgumentException { Assert.checkNotNullParam(name, value); Assert.checkNotEmptyParam(name, value); return value; }
[ "static", "String", "requiresNotNullOrNotEmptyParameter", "(", "final", "String", "name", ",", "final", "String", "value", ")", "throws", "IllegalArgumentException", "{", "Assert", ".", "checkNotNullParam", "(", "name", ",", "value", ")", ";", "Assert", ".", "chec...
Checks if the parameter is {@code null} or empty and throws an {@link IllegalArgumentException} if it is. @param name the name of the parameter @param value the value to check @return the parameter value @throws IllegalArgumentException if the object representing the parameter is {@code null}
[ "Checks", "if", "the", "parameter", "is", "{", "@code", "null", "}", "or", "empty", "and", "throws", "an", "{", "@link", "IllegalArgumentException", "}", "if", "it", "is", "." ]
train
https://github.com/wildfly/wildfly-maven-plugin/blob/c0e2d7ee28e511092561801959eae253b2b56def/core/src/main/java/org/wildfly/plugin/core/Assertions.java#L41-L45
Samsung/GearVRf
GVRf/Extensions/gvrf-physics/src/main/java/org/gearvrf/physics/GVRGenericConstraint.java
GVRGenericConstraint.setLinearUpperLimits
public void setLinearUpperLimits(float limitX, float limitY, float limitZ) { Native3DGenericConstraint.setLinearUpperLimits(getNative(), limitX, limitY, limitZ); }
java
public void setLinearUpperLimits(float limitX, float limitY, float limitZ) { Native3DGenericConstraint.setLinearUpperLimits(getNative(), limitX, limitY, limitZ); }
[ "public", "void", "setLinearUpperLimits", "(", "float", "limitX", ",", "float", "limitY", ",", "float", "limitZ", ")", "{", "Native3DGenericConstraint", ".", "setLinearUpperLimits", "(", "getNative", "(", ")", ",", "limitX", ",", "limitY", ",", "limitZ", ")", ...
Sets the upper limits for the "moving" body translation relative to joint point. @param limitX the X upper lower translation limit @param limitY the Y upper lower translation limit @param limitZ the Z upper lower translation limit
[ "Sets", "the", "upper", "limits", "for", "the", "moving", "body", "translation", "relative", "to", "joint", "point", "." ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/gvrf-physics/src/main/java/org/gearvrf/physics/GVRGenericConstraint.java#L85-L87
alkacon/opencms-core
src/org/opencms/file/CmsObject.java
CmsObject.getPermissions
public CmsPermissionSet getPermissions(String resourceName, String userName) throws CmsException { // reading permissions is allowed even if the resource is marked as deleted CmsResource resource = readResource(resourceName, CmsResourceFilter.ALL); CmsUser user = readUser(userName); ret...
java
public CmsPermissionSet getPermissions(String resourceName, String userName) throws CmsException { // reading permissions is allowed even if the resource is marked as deleted CmsResource resource = readResource(resourceName, CmsResourceFilter.ALL); CmsUser user = readUser(userName); ret...
[ "public", "CmsPermissionSet", "getPermissions", "(", "String", "resourceName", ",", "String", "userName", ")", "throws", "CmsException", "{", "// reading permissions is allowed even if the resource is marked as deleted", "CmsResource", "resource", "=", "readResource", "(", "res...
Returns the set of permissions of a given user for a given resource.<p> @param resourceName the name of the resource @param userName the name of the user @return the current permissions on this resource @throws CmsException if something goes wrong
[ "Returns", "the", "set", "of", "permissions", "of", "a", "given", "user", "for", "a", "given", "resource", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/file/CmsObject.java#L1677-L1683
OpenLiberty/open-liberty
dev/com.ibm.ws.logging.hpel/src/com/ibm/ws/logging/hpel/impl/ServerInstanceLogRecordListImpl.java
ServerInstanceLogRecordListImpl.getNewIterator
protected Iterator<RepositoryLogRecord> getNewIterator(int offset, int length) { OnePidRecordListImpl logResult = getLogResult(); OnePidRecordListImpl traceResult = getTraceResult(); if (logResult == null && traceResult == null) { return EMPTY_ITERATOR; } else if (traceResult == null) { return logResult.g...
java
protected Iterator<RepositoryLogRecord> getNewIterator(int offset, int length) { OnePidRecordListImpl logResult = getLogResult(); OnePidRecordListImpl traceResult = getTraceResult(); if (logResult == null && traceResult == null) { return EMPTY_ITERATOR; } else if (traceResult == null) { return logResult.g...
[ "protected", "Iterator", "<", "RepositoryLogRecord", ">", "getNewIterator", "(", "int", "offset", ",", "int", "length", ")", "{", "OnePidRecordListImpl", "logResult", "=", "getLogResult", "(", ")", ";", "OnePidRecordListImpl", "traceResult", "=", "getTraceResult", "...
Creates new OnePidRecordIterator returning records in the range. @param offset the number of records skipped from the beginning of the list. @param length the number of records to return. @return OnePidRecordIterator instance.
[ "Creates", "new", "OnePidRecordIterator", "returning", "records", "in", "the", "range", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.logging.hpel/src/com/ibm/ws/logging/hpel/impl/ServerInstanceLogRecordListImpl.java#L221-L235
realexpayments/rxp-hpp-java
src/main/java/com/realexpayments/hpp/sdk/RealexHpp.java
RealexHpp.responseFromJson
public HppResponse responseFromJson(String json, boolean encoded) { LOGGER.info("Converting JSON to HppResponse."); //convert to HppResponse from JSON HppResponse hppResponse = JsonUtils.fromJsonHppResponse(json); //decode if necessary if (encoded) { LOGGER.debug("Decoding object."); try { hppRes...
java
public HppResponse responseFromJson(String json, boolean encoded) { LOGGER.info("Converting JSON to HppResponse."); //convert to HppResponse from JSON HppResponse hppResponse = JsonUtils.fromJsonHppResponse(json); //decode if necessary if (encoded) { LOGGER.debug("Decoding object."); try { hppRes...
[ "public", "HppResponse", "responseFromJson", "(", "String", "json", ",", "boolean", "encoded", ")", "{", "LOGGER", ".", "info", "(", "\"Converting JSON to HppResponse.\"", ")", ";", "//convert to HppResponse from JSON", "HppResponse", "hppResponse", "=", "JsonUtils", "....
<p> Method produces <code>HppResponse</code> object from JSON. Carries out the following actions: <ul> <li>Deserialises JSON to response object</li> <li>Decodes Base64 inputs</li> <li>Validates hash</li> </ul> </p> @param json @param encoded <code>true</code> if the JSON values have been encoded. @return HppRequest
[ "<p", ">", "Method", "produces", "<code", ">", "HppResponse<", "/", "code", ">", "object", "from", "JSON", ".", "Carries", "out", "the", "following", "actions", ":", "<ul", ">", "<li", ">", "Deserialises", "JSON", "to", "response", "object<", "/", "li", ...
train
https://github.com/realexpayments/rxp-hpp-java/blob/29cc5df036af09a6d8ea16ccd7e02e856f72620f/src/main/java/com/realexpayments/hpp/sdk/RealexHpp.java#L263-L286
opsmatters/newrelic-api
src/main/java/com/opsmatters/newrelic/api/services/MonitorService.java
MonitorService.list
public Collection<Monitor> list(String name, String type) { return list(name, type, 0, -1); }
java
public Collection<Monitor> list(String name, String type) { return list(name, type, 0, -1); }
[ "public", "Collection", "<", "Monitor", ">", "list", "(", "String", "name", ",", "String", "type", ")", "{", "return", "list", "(", "name", ",", "type", ",", "0", ",", "-", "1", ")", ";", "}" ]
Returns the set of monitors with the given type and where the name contains the given (partial) name. <P> Defaults to page size of 20 monitors with 0 offset. @param name The name of the monitors to return. Can be a partial name. A null value returns all monitors. @param type The type of the monitors to return. A null v...
[ "Returns", "the", "set", "of", "monitors", "with", "the", "given", "type", "and", "where", "the", "name", "contains", "the", "given", "(", "partial", ")", "name", ".", "<P", ">", "Defaults", "to", "page", "size", "of", "20", "monitors", "with", "0", "o...
train
https://github.com/opsmatters/newrelic-api/blob/5bc2ea62ec368db891e4fd5fe3dcdf529d086b5e/src/main/java/com/opsmatters/newrelic/api/services/MonitorService.java#L108-L111
yidongnan/grpc-spring-boot-starter
grpc-server-spring-boot-autoconfigure/src/main/java/net/devh/boot/grpc/server/autoconfigure/GrpcServerFactoryAutoConfiguration.java
GrpcServerFactoryAutoConfiguration.nettyGrpcServerFactory
@ConditionalOnMissingBean @ConditionalOnClass(name = {"io.netty.channel.Channel", "io.grpc.netty.NettyServerBuilder"}) @Bean public NettyGrpcServerFactory nettyGrpcServerFactory(final GrpcServerProperties properties, final GrpcServiceDiscoverer serviceDiscoverer, final List<GrpcServerConfigurer>...
java
@ConditionalOnMissingBean @ConditionalOnClass(name = {"io.netty.channel.Channel", "io.grpc.netty.NettyServerBuilder"}) @Bean public NettyGrpcServerFactory nettyGrpcServerFactory(final GrpcServerProperties properties, final GrpcServiceDiscoverer serviceDiscoverer, final List<GrpcServerConfigurer>...
[ "@", "ConditionalOnMissingBean", "@", "ConditionalOnClass", "(", "name", "=", "{", "\"io.netty.channel.Channel\"", ",", "\"io.grpc.netty.NettyServerBuilder\"", "}", ")", "@", "Bean", "public", "NettyGrpcServerFactory", "nettyGrpcServerFactory", "(", "final", "GrpcServerProper...
Creates a GrpcServerFactory using the non-shaded netty. This is the fallback, if the shaded one is not present. @param properties The properties used to configure the server. @param serviceDiscoverer The discoverer used to identify the services that should be served. @param serverConfigurers The server configurers tha...
[ "Creates", "a", "GrpcServerFactory", "using", "the", "non", "-", "shaded", "netty", ".", "This", "is", "the", "fallback", "if", "the", "shaded", "one", "is", "not", "present", "." ]
train
https://github.com/yidongnan/grpc-spring-boot-starter/blob/07f8853cfafc9707584f2371aff012e590217b85/grpc-server-spring-boot-autoconfigure/src/main/java/net/devh/boot/grpc/server/autoconfigure/GrpcServerFactoryAutoConfiguration.java#L94-L104
hibernate/hibernate-ogm
neo4j/src/main/java/org/hibernate/ogm/datastore/neo4j/BaseNeo4jDialect.java
BaseNeo4jDialect.isPartOfRegularEmbedded
public static boolean isPartOfRegularEmbedded(String[] keyColumnNames, String column) { return isPartOfEmbedded( column ) && !ArrayHelper.contains( keyColumnNames, column ); }
java
public static boolean isPartOfRegularEmbedded(String[] keyColumnNames, String column) { return isPartOfEmbedded( column ) && !ArrayHelper.contains( keyColumnNames, column ); }
[ "public", "static", "boolean", "isPartOfRegularEmbedded", "(", "String", "[", "]", "keyColumnNames", ",", "String", "column", ")", "{", "return", "isPartOfEmbedded", "(", "column", ")", "&&", "!", "ArrayHelper", ".", "contains", "(", "keyColumnNames", ",", "colu...
A regular embedded is an element that it is embedded but it is not a key or a collection. @param keyColumnNames the column names representing the identifier of the entity @param column the column we want to check @return {@code true} if the column represent an attribute of a regular embedded element, {@code false} oth...
[ "A", "regular", "embedded", "is", "an", "element", "that", "it", "is", "embedded", "but", "it", "is", "not", "a", "key", "or", "a", "collection", "." ]
train
https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/neo4j/src/main/java/org/hibernate/ogm/datastore/neo4j/BaseNeo4jDialect.java#L219-L221
apache/flink
flink-core/src/main/java/org/apache/flink/api/java/typeutils/runtime/PojoComparator.java
PojoComparator.accessField
public final Object accessField(Field field, Object object) { try { object = field.get(object); } catch (NullPointerException npex) { throw new NullKeyFieldException("Unable to access field "+field+" on object "+object); } catch (IllegalAccessException iaex) { throw new RuntimeException("This should not ...
java
public final Object accessField(Field field, Object object) { try { object = field.get(object); } catch (NullPointerException npex) { throw new NullKeyFieldException("Unable to access field "+field+" on object "+object); } catch (IllegalAccessException iaex) { throw new RuntimeException("This should not ...
[ "public", "final", "Object", "accessField", "(", "Field", "field", ",", "Object", "object", ")", "{", "try", "{", "object", "=", "field", ".", "get", "(", "object", ")", ";", "}", "catch", "(", "NullPointerException", "npex", ")", "{", "throw", "new", ...
This method is handling the IllegalAccess exceptions of Field.get()
[ "This", "method", "is", "handling", "the", "IllegalAccess", "exceptions", "of", "Field", ".", "get", "()" ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/java/typeutils/runtime/PojoComparator.java#L177-L187
Coveros/selenified
src/main/java/com/coveros/selenified/Selenified.java
Selenified.getAdditionalDesiredCapabilities
private static DesiredCapabilities getAdditionalDesiredCapabilities(String clazz, ITestContext context) { return (DesiredCapabilities) context.getAttribute(clazz + DESIRED_CAPABILITIES); }
java
private static DesiredCapabilities getAdditionalDesiredCapabilities(String clazz, ITestContext context) { return (DesiredCapabilities) context.getAttribute(clazz + DESIRED_CAPABILITIES); }
[ "private", "static", "DesiredCapabilities", "getAdditionalDesiredCapabilities", "(", "String", "clazz", ",", "ITestContext", "context", ")", "{", "return", "(", "DesiredCapabilities", ")", "context", ".", "getAttribute", "(", "clazz", "+", "DESIRED_CAPABILITIES", ")", ...
Retrieves the additional desired capabilities set by the current class for the browsers @param clazz - the test suite class, used for making threadsafe storage of application, allowing suites to have independent applications under test, run at the same time @param context - the TestNG context associated with the tes...
[ "Retrieves", "the", "additional", "desired", "capabilities", "set", "by", "the", "current", "class", "for", "the", "browsers" ]
train
https://github.com/Coveros/selenified/blob/396cc1f010dd69eed33cc5061c41253de246a4cd/src/main/java/com/coveros/selenified/Selenified.java#L228-L230
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/doc/DocClient.java
DocClient.createDocument
public CreateDocumentResponse createDocument(File file, String title) { CreateDocumentRequest request = new CreateDocumentRequest(); String format; String filename = file.getName(); if (filename.lastIndexOf(".") == -1) { throw new BceClientException("Cannot get file format fr...
java
public CreateDocumentResponse createDocument(File file, String title) { CreateDocumentRequest request = new CreateDocumentRequest(); String format; String filename = file.getName(); if (filename.lastIndexOf(".") == -1) { throw new BceClientException("Cannot get file format fr...
[ "public", "CreateDocumentResponse", "createDocument", "(", "File", "file", ",", "String", "title", ")", "{", "CreateDocumentRequest", "request", "=", "new", "CreateDocumentRequest", "(", ")", ";", "String", "format", ";", "String", "filename", "=", "file", ".", ...
Create a Document. @param file The document . @param title The document title. @return A CreateDocumentResponse object containing the information returned by Document.
[ "Create", "a", "Document", "." ]
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/doc/DocClient.java#L159-L171
structr/structr
structr-ui/src/main/java/org/structr/files/cmis/CMISAclService.java
CMISAclService.applyAcl
public Acl applyAcl(final String repositoryId, final String objectId, final Acl acl, final AclPropagation aclPropagation) { final App app = StructrApp.getInstance(securityContext); try (final Tx tx = app.tx()) { final AbstractNode node = app.get(AbstractNode.class, objectId); if (node != null) { node....
java
public Acl applyAcl(final String repositoryId, final String objectId, final Acl acl, final AclPropagation aclPropagation) { final App app = StructrApp.getInstance(securityContext); try (final Tx tx = app.tx()) { final AbstractNode node = app.get(AbstractNode.class, objectId); if (node != null) { node....
[ "public", "Acl", "applyAcl", "(", "final", "String", "repositoryId", ",", "final", "String", "objectId", ",", "final", "Acl", "acl", ",", "final", "AclPropagation", "aclPropagation", ")", "{", "final", "App", "app", "=", "StructrApp", ".", "getInstance", "(", ...
Applies the given Acl exclusively, i.e. removes all other permissions / grants first. @param repositoryId @param objectId @param acl @param aclPropagation @return the resulting Acl
[ "Applies", "the", "given", "Acl", "exclusively", "i", ".", "e", ".", "removes", "all", "other", "permissions", "/", "grants", "first", "." ]
train
https://github.com/structr/structr/blob/c111a1d0c0201c7fea5574ed69aa5a5053185a97/structr-ui/src/main/java/org/structr/files/cmis/CMISAclService.java#L88-L115
wildfly/wildfly-core
controller/src/main/java/org/jboss/as/controller/services/path/PathManagerService.java
PathManagerService.addHardcodedAbsolutePath
protected final ServiceController<?> addHardcodedAbsolutePath(final ServiceTarget serviceTarget, final String pathName, final String path) { ServiceController<?> controller = addAbsolutePathService(serviceTarget, pathName, path); addPathEntry(pathName, path, null, true); if (capabilityRegistry ...
java
protected final ServiceController<?> addHardcodedAbsolutePath(final ServiceTarget serviceTarget, final String pathName, final String path) { ServiceController<?> controller = addAbsolutePathService(serviceTarget, pathName, path); addPathEntry(pathName, path, null, true); if (capabilityRegistry ...
[ "protected", "final", "ServiceController", "<", "?", ">", "addHardcodedAbsolutePath", "(", "final", "ServiceTarget", "serviceTarget", ",", "final", "String", "pathName", ",", "final", "String", "path", ")", "{", "ServiceController", "<", "?", ">", "controller", "=...
Add a {@code PathEntry} and install a {@code Service<String>} for one of the standard read-only paths that are determined from this process' environment. Not to be used for paths stored in the persistent configuration. @param serviceTarget service target to use for the service installation @param pathName the logical n...
[ "Add", "a", "{" ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/services/path/PathManagerService.java#L159-L168
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/accesslayer/sql/SqlPkStatement.java
SqlPkStatement.appendWhereClause
protected void appendWhereClause(FieldDescriptor[] fields, StringBuffer stmt) throws PersistenceBrokerException { stmt.append(" WHERE "); for(int i = 0; i < fields.length; i++) { FieldDescriptor fmd = fields[i]; stmt.append(fmd.getColumnName()); ...
java
protected void appendWhereClause(FieldDescriptor[] fields, StringBuffer stmt) throws PersistenceBrokerException { stmt.append(" WHERE "); for(int i = 0; i < fields.length; i++) { FieldDescriptor fmd = fields[i]; stmt.append(fmd.getColumnName()); ...
[ "protected", "void", "appendWhereClause", "(", "FieldDescriptor", "[", "]", "fields", ",", "StringBuffer", "stmt", ")", "throws", "PersistenceBrokerException", "{", "stmt", ".", "append", "(", "\" WHERE \"", ")", ";", "for", "(", "int", "i", "=", "0", ";", "...
Generate a sql where-clause for the array of fields @param fields array containing all columns used in WHERE clause
[ "Generate", "a", "sql", "where", "-", "clause", "for", "the", "array", "of", "fields" ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/sql/SqlPkStatement.java#L82-L97
anotheria/configureme
src/main/java/org/configureme/util/StringUtils.java
StringUtils.getStringBefore
public static String getStringBefore(final String src, final String toSearch, final int start) { final int ind = src.indexOf(toSearch, start); if (ind == -1) return ""; return src.substring(start, ind); }
java
public static String getStringBefore(final String src, final String toSearch, final int start) { final int ind = src.indexOf(toSearch, start); if (ind == -1) return ""; return src.substring(start, ind); }
[ "public", "static", "String", "getStringBefore", "(", "final", "String", "src", ",", "final", "String", "toSearch", ",", "final", "int", "start", ")", "{", "final", "int", "ind", "=", "src", ".", "indexOf", "(", "toSearch", ",", "start", ")", ";", "if", ...
Get {@link java.lang.String} before given search {@link java.lang.String} from given start search index. @param src source string @param toSearch search string @param start start search index @return {@link java.lang.String}
[ "Get", "{", "@link", "java", ".", "lang", ".", "String", "}", "before", "given", "search", "{", "@link", "java", ".", "lang", ".", "String", "}", "from", "given", "start", "search", "index", "." ]
train
https://github.com/anotheria/configureme/blob/1f52dd9109349623190586bdf5a592de8016e1fa/src/main/java/org/configureme/util/StringUtils.java#L107-L113
OpenLiberty/open-liberty
dev/wlp.lib.extract/src/wlp/lib/extract/SelfExtractRun.java
SelfExtractRun.createTempDirectory
private static String createTempDirectory(String baseDir, String fileStem) { Long nano = new Long(System.nanoTime()); return baseDir + File.separator + fileStem + nano; }
java
private static String createTempDirectory(String baseDir, String fileStem) { Long nano = new Long(System.nanoTime()); return baseDir + File.separator + fileStem + nano; }
[ "private", "static", "String", "createTempDirectory", "(", "String", "baseDir", ",", "String", "fileStem", ")", "{", "Long", "nano", "=", "new", "Long", "(", "System", ".", "nanoTime", "(", ")", ")", ";", "return", "baseDir", "+", "File", ".", "separator",...
Generate unique directory name of form: basedir/fileStem<time-in-nanos> @param baseDir @param fileStem @return unique dir name
[ "Generate", "unique", "directory", "name", "of", "form", ":", "basedir", "/", "fileStem<time", "-", "in", "-", "nanos", ">" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/wlp.lib.extract/src/wlp/lib/extract/SelfExtractRun.java#L120-L123
mikepenz/MaterialDrawer
library/src/main/java/com/mikepenz/materialdrawer/Drawer.java
Drawer.switchDrawerContent
public void switchDrawerContent(@NonNull OnDrawerItemClickListener onDrawerItemClickListener, OnDrawerItemLongClickListener onDrawerItemLongClickListener, @NonNull List<IDrawerItem> drawerItems, int drawerSelection) { //just allow a single switched drawer if (!switchedDrawerContent()) { //sa...
java
public void switchDrawerContent(@NonNull OnDrawerItemClickListener onDrawerItemClickListener, OnDrawerItemLongClickListener onDrawerItemLongClickListener, @NonNull List<IDrawerItem> drawerItems, int drawerSelection) { //just allow a single switched drawer if (!switchedDrawerContent()) { //sa...
[ "public", "void", "switchDrawerContent", "(", "@", "NonNull", "OnDrawerItemClickListener", "onDrawerItemClickListener", ",", "OnDrawerItemLongClickListener", "onDrawerItemLongClickListener", ",", "@", "NonNull", "List", "<", "IDrawerItem", ">", "drawerItems", ",", "int", "d...
method to switch the drawer content to new elements @param onDrawerItemClickListener @param drawerItems @param drawerSelection
[ "method", "to", "switch", "the", "drawer", "content", "to", "new", "elements" ]
train
https://github.com/mikepenz/MaterialDrawer/blob/f4fb31635767edead0a01cee7b7588942b89d8d9/library/src/main/java/com/mikepenz/materialdrawer/Drawer.java#L1003-L1029
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/LongTermRetentionBackupsInner.java
LongTermRetentionBackupsInner.beginDeleteAsync
public Observable<Void> beginDeleteAsync(String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName) { return beginDeleteWithServiceResponseAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName).map(new Func1<ServiceRespo...
java
public Observable<Void> beginDeleteAsync(String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName) { return beginDeleteWithServiceResponseAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName).map(new Func1<ServiceRespo...
[ "public", "Observable", "<", "Void", ">", "beginDeleteAsync", "(", "String", "locationName", ",", "String", "longTermRetentionServerName", ",", "String", "longTermRetentionDatabaseName", ",", "String", "backupName", ")", "{", "return", "beginDeleteWithServiceResponseAsync",...
Deletes a long term retention backup. @param locationName The location of the database @param longTermRetentionServerName the String value @param longTermRetentionDatabaseName the String value @param backupName The backup name. @throws IllegalArgumentException thrown if parameters fail the validation @return the {@lin...
[ "Deletes", "a", "long", "term", "retention", "backup", "." ]
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/LongTermRetentionBackupsInner.java#L322-L329
igniterealtime/Smack
smack-core/src/main/java/org/jivesoftware/smack/provider/ProviderManager.java
ProviderManager.removeIQProvider
public static String removeIQProvider(String elementName, String namespace) { String key = getKey(elementName, namespace); iqProviders.remove(key); return key; }
java
public static String removeIQProvider(String elementName, String namespace) { String key = getKey(elementName, namespace); iqProviders.remove(key); return key; }
[ "public", "static", "String", "removeIQProvider", "(", "String", "elementName", ",", "String", "namespace", ")", "{", "String", "key", "=", "getKey", "(", "elementName", ",", "namespace", ")", ";", "iqProviders", ".", "remove", "(", "key", ")", ";", "return"...
Removes an IQ provider with the specified element name and namespace. This method is typically called to cleanup providers that are programmatically added using the {@link #addIQProvider(String, String, Object) addIQProvider} method. @param elementName the XML element name. @param namespace the XML namespace. @return ...
[ "Removes", "an", "IQ", "provider", "with", "the", "specified", "element", "name", "and", "namespace", ".", "This", "method", "is", "typically", "called", "to", "cleanup", "providers", "that", "are", "programmatically", "added", "using", "the", "{", "@link", "#...
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-core/src/main/java/org/jivesoftware/smack/provider/ProviderManager.java#L219-L223
lambdazen/bitsy
src/main/java/com/lambdazen/bitsy/index/BitsyIndexMap.java
BitsyIndexMap.get
public Collection<BeanType> get(String key, Object value) { IndexType index = indexMap.get(key); if (index == null) { throw new BitsyException(BitsyErrorCodes.MISSING_INDEX, "An index on " + key + " must be created before querying vertices/edges by that key. Defined indexes: " + ind...
java
public Collection<BeanType> get(String key, Object value) { IndexType index = indexMap.get(key); if (index == null) { throw new BitsyException(BitsyErrorCodes.MISSING_INDEX, "An index on " + key + " must be created before querying vertices/edges by that key. Defined indexes: " + ind...
[ "public", "Collection", "<", "BeanType", ">", "get", "(", "String", "key", ",", "Object", "value", ")", "{", "IndexType", "index", "=", "indexMap", ".", "get", "(", "key", ")", ";", "if", "(", "index", "==", "null", ")", "{", "throw", "new", "BitsyEx...
This method returns a copy of the edges/vertices held for the given key and value
[ "This", "method", "returns", "a", "copy", "of", "the", "edges", "/", "vertices", "held", "for", "the", "given", "key", "and", "value" ]
train
https://github.com/lambdazen/bitsy/blob/c0dd4b6c9d6dc9987d0168c91417eb04d80bf712/src/main/java/com/lambdazen/bitsy/index/BitsyIndexMap.java#L23-L31
GoogleCloudPlatform/appengine-pipelines
java/src/main/java/com/google/appengine/tools/pipeline/Job.java
Job.futureCall
public <T, T1, T2, T3, T4> FutureValue<T> futureCall(Job4<T, T1, T2, T3, T4> jobInstance, Value<? extends T1> v1, Value<? extends T2> v2, Value<? extends T3> v3, Value<? extends T4> v4, JobSetting... settings) { return futureCallUnchecked(settings, jobInstance, v1, v2, v3, v4); }
java
public <T, T1, T2, T3, T4> FutureValue<T> futureCall(Job4<T, T1, T2, T3, T4> jobInstance, Value<? extends T1> v1, Value<? extends T2> v2, Value<? extends T3> v3, Value<? extends T4> v4, JobSetting... settings) { return futureCallUnchecked(settings, jobInstance, v1, v2, v3, v4); }
[ "public", "<", "T", ",", "T1", ",", "T2", ",", "T3", ",", "T4", ">", "FutureValue", "<", "T", ">", "futureCall", "(", "Job4", "<", "T", ",", "T1", ",", "T2", ",", "T3", ",", "T4", ">", "jobInstance", ",", "Value", "<", "?", "extends", "T1", "...
Invoke this method from within the {@code run} method of a <b>generator job</b> in order to specify a job node in the generated child job graph. This version of the method is for child jobs that take four arguments. @param <T> The return type of the child job being specified @param <T1> The type of the first input to ...
[ "Invoke", "this", "method", "from", "within", "the", "{", "@code", "run", "}", "method", "of", "a", "<b", ">", "generator", "job<", "/", "b", ">", "in", "order", "to", "specify", "a", "job", "node", "in", "the", "generated", "child", "job", "graph", ...
train
https://github.com/GoogleCloudPlatform/appengine-pipelines/blob/277394648dac3e8214677af898935d07399ac8e1/java/src/main/java/com/google/appengine/tools/pipeline/Job.java#L291-L295
sd4324530/fastweixin
src/main/java/com/github/sd4324530/fastweixin/util/BeanUtil.java
BeanUtil.requireNonNull
public static Object requireNonNull(Object object, String errorMessage) { if (null == object) { throw new NullPointerException(errorMessage); } return object; }
java
public static Object requireNonNull(Object object, String errorMessage) { if (null == object) { throw new NullPointerException(errorMessage); } return object; }
[ "public", "static", "Object", "requireNonNull", "(", "Object", "object", ",", "String", "errorMessage", ")", "{", "if", "(", "null", "==", "object", ")", "{", "throw", "new", "NullPointerException", "(", "errorMessage", ")", ";", "}", "return", "object", ";"...
判断对象是否为空,如果为空,直接抛出异常 @param object 需要检查的对象 @param errorMessage 异常信息 @return 非空的对象
[ "判断对象是否为空,如果为空,直接抛出异常" ]
train
https://github.com/sd4324530/fastweixin/blob/6bc0a7abfa23aad0dbad4c3123a47a7fb53f3447/src/main/java/com/github/sd4324530/fastweixin/util/BeanUtil.java#L43-L48
BigBadaboom/androidsvg
androidsvg/src/main/java/com/caverock/androidsvg/SVGAndroidRenderer.java
SVGAndroidRenderer.extractRawText
private void extractRawText(TextContainer parent, StringBuilder str) { Iterator<SvgObject> iter = parent.children.iterator(); boolean isFirstChild = true; while (iter.hasNext()) { SvgObject child = iter.next(); if (child instanceof TextContainer) {...
java
private void extractRawText(TextContainer parent, StringBuilder str) { Iterator<SvgObject> iter = parent.children.iterator(); boolean isFirstChild = true; while (iter.hasNext()) { SvgObject child = iter.next(); if (child instanceof TextContainer) {...
[ "private", "void", "extractRawText", "(", "TextContainer", "parent", ",", "StringBuilder", "str", ")", "{", "Iterator", "<", "SvgObject", ">", "iter", "=", "parent", ".", "children", ".", "iterator", "(", ")", ";", "boolean", "isFirstChild", "=", "true", ";"...
/* Extract the raw text from a TextContainer. Used by <tref> handler code.
[ "/", "*", "Extract", "the", "raw", "text", "from", "a", "TextContainer", ".", "Used", "by", "<tref", ">", "handler", "code", "." ]
train
https://github.com/BigBadaboom/androidsvg/blob/0d1614dd1a4da10ea4afe3b0cea1361a4ac6b45a/androidsvg/src/main/java/com/caverock/androidsvg/SVGAndroidRenderer.java#L1816-L1832
aws/aws-sdk-java
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/model/Put.java
Put.withExpressionAttributeNames
public Put withExpressionAttributeNames(java.util.Map<String, String> expressionAttributeNames) { setExpressionAttributeNames(expressionAttributeNames); return this; }
java
public Put withExpressionAttributeNames(java.util.Map<String, String> expressionAttributeNames) { setExpressionAttributeNames(expressionAttributeNames); return this; }
[ "public", "Put", "withExpressionAttributeNames", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "expressionAttributeNames", ")", "{", "setExpressionAttributeNames", "(", "expressionAttributeNames", ")", ";", "return", "this", ";", "}" ]
<p> One or more substitution tokens for attribute names in an expression. </p> @param expressionAttributeNames One or more substitution tokens for attribute names in an expression. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "One", "or", "more", "substitution", "tokens", "for", "attribute", "names", "in", "an", "expression", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/model/Put.java#L265-L268
forge/core
javaee/impl/src/main/java/org/jboss/forge/addon/javaee/cdi/CDIOperations.java
CDIOperations.getProjectInjectionPointBeans
public List<JavaResource> getProjectInjectionPointBeans(Project project) { final List<JavaResource> beans = new ArrayList<>(); if (project != null) { project.getFacet(JavaSourceFacet.class).visitJavaSources(new JavaResourceVisitor() { @Override public void ...
java
public List<JavaResource> getProjectInjectionPointBeans(Project project) { final List<JavaResource> beans = new ArrayList<>(); if (project != null) { project.getFacet(JavaSourceFacet.class).visitJavaSources(new JavaResourceVisitor() { @Override public void ...
[ "public", "List", "<", "JavaResource", ">", "getProjectInjectionPointBeans", "(", "Project", "project", ")", "{", "final", "List", "<", "JavaResource", ">", "beans", "=", "new", "ArrayList", "<>", "(", ")", ";", "if", "(", "project", "!=", "null", ")", "{"...
Returns all the objects from the given {@link Project} that support injection point. Most of the Java EE components can use @Inject, except most of the JPA artifacts (entities, embeddable...)
[ "Returns", "all", "the", "objects", "from", "the", "given", "{" ]
train
https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/javaee/impl/src/main/java/org/jboss/forge/addon/javaee/cdi/CDIOperations.java#L109-L142