repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
11
218
func_name
stringlengths
4
140
whole_func_string
stringlengths
153
5.32k
language
stringclasses
1 value
func_code_string
stringlengths
72
4k
func_code_tokens
listlengths
20
832
func_documentation_string
stringlengths
61
2k
func_documentation_tokens
listlengths
1
647
split_name
stringclasses
1 value
func_code_url
stringlengths
102
339
HiddenStage/divide
Shared/src/main/java/io/divide/shared/transitory/TransientObject.java
TransientObject.put
public void put(String key, Object object) { """ Add a specific key value pair to this object. @param key key to identify this element by. @param object object to be added. """ // canWrite() TODO disabled for now; updateModifiedDate(); user_data.put(key,object); // if(isCollec...
java
public void put(String key, Object object) { // canWrite() TODO disabled for now; updateModifiedDate(); user_data.put(key,object); // if(isCollection(object)){ // Object[] array = ((Collection) object).toArray(new Object[0]); // user_data.put(key, array); // ...
[ "public", "void", "put", "(", "String", "key", ",", "Object", "object", ")", "{", "// canWrite() TODO disabled for now;", "updateModifiedDate", "(", ")", ";", "user_data", ".", "put", "(", "key", ",", "object", ")", ";", "// if(isCollection(object)){",...
Add a specific key value pair to this object. @param key key to identify this element by. @param object object to be added.
[ "Add", "a", "specific", "key", "value", "pair", "to", "this", "object", "." ]
train
https://github.com/HiddenStage/divide/blob/14e36598c50d92b4393e6649915e32b86141c598/Shared/src/main/java/io/divide/shared/transitory/TransientObject.java#L179-L195
tobykurien/Xtendroid
Xtendroid/src/asia/sonix/android/orm/AbatisService.java
AbatisService.getInstance
protected static AbatisService getInstance(Context context, String dbName, int version) { """ 指定DB file nameを利用する外部Constructor @param context 呼び出し元Contextオブジェクト @param dbName 生成するDB file name """ if (instance == null) { instance = new AbatisService(context, dbName, version); } ...
java
protected static AbatisService getInstance(Context context, String dbName, int version) { if (instance == null) { instance = new AbatisService(context, dbName, version); } return instance; }
[ "protected", "static", "AbatisService", "getInstance", "(", "Context", "context", ",", "String", "dbName", ",", "int", "version", ")", "{", "if", "(", "instance", "==", "null", ")", "{", "instance", "=", "new", "AbatisService", "(", "context", ",", "dbName",...
指定DB file nameを利用する外部Constructor @param context 呼び出し元Contextオブジェクト @param dbName 生成するDB file name
[ "指定DB", "file", "nameを利用する外部Constructor" ]
train
https://github.com/tobykurien/Xtendroid/blob/758bf1d06f4cf3b64f9c10632fe9c6fb30bcebd4/Xtendroid/src/asia/sonix/android/orm/AbatisService.java#L137-L142
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/query/dsl/functions/DateFunctions.java
DateFunctions.millisToZone
public static Expression millisToZone(Expression expression, String timeZoneName, String format) { """ Returned expression results in a convertion of the UNIX time stamp to a string in the named time zone. """ if (format == null || format.isEmpty()) { return x("MILLIS_TO_ZONE(" + expression...
java
public static Expression millisToZone(Expression expression, String timeZoneName, String format) { if (format == null || format.isEmpty()) { return x("MILLIS_TO_ZONE(" + expression.toString() + ", \"" + timeZoneName + "\")"); } return x("MILLIS_TO_ZONE(" + expression.toString() + ", ...
[ "public", "static", "Expression", "millisToZone", "(", "Expression", "expression", ",", "String", "timeZoneName", ",", "String", "format", ")", "{", "if", "(", "format", "==", "null", "||", "format", ".", "isEmpty", "(", ")", ")", "{", "return", "x", "(", ...
Returned expression results in a convertion of the UNIX time stamp to a string in the named time zone.
[ "Returned", "expression", "results", "in", "a", "convertion", "of", "the", "UNIX", "time", "stamp", "to", "a", "string", "in", "the", "named", "time", "zone", "." ]
train
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/query/dsl/functions/DateFunctions.java#L269-L275
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/accesslayer/ConnectionFactoryAbstractImpl.java
ConnectionFactoryAbstractImpl.initializeJdbcConnection
protected void initializeJdbcConnection(Connection con, JdbcConnectionDescriptor jcd) throws LookupException { """ Initialize the connection with the specified properties in OJB configuration files and platform depended properties. Invoke this method after a NEW connection is created, not if re-usin...
java
protected void initializeJdbcConnection(Connection con, JdbcConnectionDescriptor jcd) throws LookupException { try { PlatformFactory.getPlatformFor(jcd).initializeJdbcConnection(jcd, con); } catch (PlatformException e) { throw new ...
[ "protected", "void", "initializeJdbcConnection", "(", "Connection", "con", ",", "JdbcConnectionDescriptor", "jcd", ")", "throws", "LookupException", "{", "try", "{", "PlatformFactory", ".", "getPlatformFor", "(", "jcd", ")", ".", "initializeJdbcConnection", "(", "jcd"...
Initialize the connection with the specified properties in OJB configuration files and platform depended properties. Invoke this method after a NEW connection is created, not if re-using from pool. @see org.apache.ojb.broker.platforms.PlatformFactory @see org.apache.ojb.broker.platforms.Platform
[ "Initialize", "the", "connection", "with", "the", "specified", "properties", "in", "OJB", "configuration", "files", "and", "platform", "depended", "properties", ".", "Invoke", "this", "method", "after", "a", "NEW", "connection", "is", "created", "not", "if", "re...
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/ConnectionFactoryAbstractImpl.java#L153-L164
keenlabs/KeenClient-Java
core/src/main/java/io/keen/client/java/KeenClient.java
KeenClient.addEvent
public void addEvent(String eventCollection, Map<String, Object> event) { """ Adds an event to the default project with default Keen properties and no callbacks. @see #addEvent(KeenProject, String, java.util.Map, java.util.Map, KeenCallback) @param eventCollection The name of the collection in which to publish...
java
public void addEvent(String eventCollection, Map<String, Object> event) { addEvent(eventCollection, event, null); }
[ "public", "void", "addEvent", "(", "String", "eventCollection", ",", "Map", "<", "String", ",", "Object", ">", "event", ")", "{", "addEvent", "(", "eventCollection", ",", "event", ",", "null", ")", ";", "}" ]
Adds an event to the default project with default Keen properties and no callbacks. @see #addEvent(KeenProject, String, java.util.Map, java.util.Map, KeenCallback) @param eventCollection The name of the collection in which to publish the event. @param event A Map that consists of key/value pairs. Keen naming...
[ "Adds", "an", "event", "to", "the", "default", "project", "with", "default", "Keen", "properties", "and", "no", "callbacks", "." ]
train
https://github.com/keenlabs/KeenClient-Java/blob/2ea021547b5338257c951a2596bd49749038d018/core/src/main/java/io/keen/client/java/KeenClient.java#L113-L115
intuit/QuickBooks-V3-Java-SDK
ipp-v3-java-devkit/src/main/java/com/intuit/ipp/services/DataService.java
DataService.findAllAsync
public <T extends IEntity> void findAllAsync(T entity, CallbackHandler callbackHandler) throws FMSException { """ Method to retrieve all records for the given entity in asynchronous fashion Note, without pagination this will return only 100 records Use query API to add pagintion and obtain additional records ...
java
public <T extends IEntity> void findAllAsync(T entity, CallbackHandler callbackHandler) throws FMSException { //findall is to be called as query String query = "SELECT * FROM " + entity.getClass().getSimpleName(); executeQueryAsync(query, callbackHandler); }
[ "public", "<", "T", "extends", "IEntity", ">", "void", "findAllAsync", "(", "T", "entity", ",", "CallbackHandler", "callbackHandler", ")", "throws", "FMSException", "{", "//findall is to be called as query", "String", "query", "=", "\"SELECT * FROM \"", "+", "entity",...
Method to retrieve all records for the given entity in asynchronous fashion Note, without pagination this will return only 100 records Use query API to add pagintion and obtain additional records @param entity the entity @param callbackHandler the callback handler @throws FMSException throws FMSException
[ "Method", "to", "retrieve", "all", "records", "for", "the", "given", "entity", "in", "asynchronous", "fashion", "Note", "without", "pagination", "this", "will", "return", "only", "100", "records", "Use", "query", "API", "to", "add", "pagintion", "and", "obtain...
train
https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/services/DataService.java#L740-L745
atomix/atomix
protocols/raft/src/main/java/io/atomix/protocols/raft/storage/snapshot/SnapshotStore.java
SnapshotStore.newTemporarySnapshot
public Snapshot newTemporarySnapshot(long index, WallClockTimestamp timestamp) { """ Creates a temporary in-memory snapshot. @param index The snapshot index. @param timestamp The snapshot timestamp. @return The snapshot. """ SnapshotDescriptor descriptor = SnapshotDescriptor.builder() .wit...
java
public Snapshot newTemporarySnapshot(long index, WallClockTimestamp timestamp) { SnapshotDescriptor descriptor = SnapshotDescriptor.builder() .withIndex(index) .withTimestamp(timestamp.unixTimestamp()) .build(); return newSnapshot(descriptor, StorageLevel.MEMORY); }
[ "public", "Snapshot", "newTemporarySnapshot", "(", "long", "index", ",", "WallClockTimestamp", "timestamp", ")", "{", "SnapshotDescriptor", "descriptor", "=", "SnapshotDescriptor", ".", "builder", "(", ")", ".", "withIndex", "(", "index", ")", ".", "withTimestamp", ...
Creates a temporary in-memory snapshot. @param index The snapshot index. @param timestamp The snapshot timestamp. @return The snapshot.
[ "Creates", "a", "temporary", "in", "-", "memory", "snapshot", "." ]
train
https://github.com/atomix/atomix/blob/3a94b7c80576d762dd0d396d4645df07a0b37c31/protocols/raft/src/main/java/io/atomix/protocols/raft/storage/snapshot/SnapshotStore.java#L156-L162
alipay/sofa-rpc
core/common/src/main/java/com/alipay/sofa/rpc/common/utils/CommonUtils.java
CommonUtils.parseBoolean
public static boolean parseBoolean(String bool, boolean defaultInt) { """ 字符串转布尔 @param bool 数字 @param defaultInt 默认值 @return int """ if (bool == null) { return defaultInt; } else { return Boolean.parseBoolean(bool); } }
java
public static boolean parseBoolean(String bool, boolean defaultInt) { if (bool == null) { return defaultInt; } else { return Boolean.parseBoolean(bool); } }
[ "public", "static", "boolean", "parseBoolean", "(", "String", "bool", ",", "boolean", "defaultInt", ")", "{", "if", "(", "bool", "==", "null", ")", "{", "return", "defaultInt", ";", "}", "else", "{", "return", "Boolean", ".", "parseBoolean", "(", "bool", ...
字符串转布尔 @param bool 数字 @param defaultInt 默认值 @return int
[ "字符串转布尔" ]
train
https://github.com/alipay/sofa-rpc/blob/a31406410291e56696185a29c3ba4bd1f54488fd/core/common/src/main/java/com/alipay/sofa/rpc/common/utils/CommonUtils.java#L204-L210
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/utils/PermissionUtil.java
PermissionUtil.getExplicitOverrides
private static void getExplicitOverrides(Channel channel, Member member, AtomicLong allow, AtomicLong deny) { """ Pushes all deny/allow values to the specified BiConsumer <br>First parameter is allow, second is deny """ PermissionOverride override = channel.getPermissionOverride(member.getGuild().getP...
java
private static void getExplicitOverrides(Channel channel, Member member, AtomicLong allow, AtomicLong deny) { PermissionOverride override = channel.getPermissionOverride(member.getGuild().getPublicRole()); long allowRaw = 0; long denyRaw = 0; if (override != null) { ...
[ "private", "static", "void", "getExplicitOverrides", "(", "Channel", "channel", ",", "Member", "member", ",", "AtomicLong", "allow", ",", "AtomicLong", "deny", ")", "{", "PermissionOverride", "override", "=", "channel", ".", "getPermissionOverride", "(", "member", ...
Pushes all deny/allow values to the specified BiConsumer <br>First parameter is allow, second is deny
[ "Pushes", "all", "deny", "/", "allow", "values", "to", "the", "specified", "BiConsumer", "<br", ">", "First", "parameter", "is", "allow", "second", "is", "deny" ]
train
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/utils/PermissionUtil.java#L578-L619
Azure/azure-sdk-for-java
policyinsights/resource-manager/v2018_04_04/src/main/java/com/microsoft/azure/management/policyinsights/v2018_04_04/implementation/PolicyStatesInner.java
PolicyStatesInner.listQueryResultsForPolicySetDefinitionAsync
public Observable<PolicyStatesQueryResultsInner> listQueryResultsForPolicySetDefinitionAsync(PolicyStatesResource policyStatesResource, String subscriptionId, String policySetDefinitionName) { """ Queries policy states for the subscription level policy set definition. @param policyStatesResource The virtual res...
java
public Observable<PolicyStatesQueryResultsInner> listQueryResultsForPolicySetDefinitionAsync(PolicyStatesResource policyStatesResource, String subscriptionId, String policySetDefinitionName) { return listQueryResultsForPolicySetDefinitionWithServiceResponseAsync(policyStatesResource, subscriptionId, policySetDe...
[ "public", "Observable", "<", "PolicyStatesQueryResultsInner", ">", "listQueryResultsForPolicySetDefinitionAsync", "(", "PolicyStatesResource", "policyStatesResource", ",", "String", "subscriptionId", ",", "String", "policySetDefinitionName", ")", "{", "return", "listQueryResultsF...
Queries policy states for the subscription level policy set definition. @param policyStatesResource The virtual resource under PolicyStates resource type. In a given time range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy state(s). Possible values include: 'default', 'latest...
[ "Queries", "policy", "states", "for", "the", "subscription", "level", "policy", "set", "definition", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/policyinsights/resource-manager/v2018_04_04/src/main/java/com/microsoft/azure/management/policyinsights/v2018_04_04/implementation/PolicyStatesInner.java#L1691-L1698
cdapio/tigon
tigon-flow/src/main/java/co/cask/tigon/internal/app/runtime/flow/FlowletProgramRunner.java
FlowletProgramRunner.getConsumerConfig
private ConsumerConfig getConsumerConfig(BasicFlowletContext flowletContext, Method method) { """ Creates a {@link ConsumerConfig} based on the method annotation and the flowlet context. @param flowletContext Runtime context of the flowlet. @param method The process method to inspect. @return A new instance of ...
java
private ConsumerConfig getConsumerConfig(BasicFlowletContext flowletContext, Method method) { // Determine input queue partition type HashPartition hashPartition = method.getAnnotation(HashPartition.class); RoundRobin roundRobin = method.getAnnotation(RoundRobin.class); DequeueStrategy strategy = Dequeu...
[ "private", "ConsumerConfig", "getConsumerConfig", "(", "BasicFlowletContext", "flowletContext", ",", "Method", "method", ")", "{", "// Determine input queue partition type", "HashPartition", "hashPartition", "=", "method", ".", "getAnnotation", "(", "HashPartition", ".", "c...
Creates a {@link ConsumerConfig} based on the method annotation and the flowlet context. @param flowletContext Runtime context of the flowlet. @param method The process method to inspect. @return A new instance of {@link ConsumerConfig}.
[ "Creates", "a", "{" ]
train
https://github.com/cdapio/tigon/blob/5be6dffd7c79519d1211bb08f75be7dcfbbad392/tigon-flow/src/main/java/co/cask/tigon/internal/app/runtime/flow/FlowletProgramRunner.java#L351-L371
EvidentSolutions/dalesbred
dalesbred/src/main/java/org/dalesbred/internal/instantiation/InstantiatorProvider.java
InstantiatorProvider.implicitInstantiatorFrom
private @NotNull <T> Optional<Instantiator<T>> implicitInstantiatorFrom(@NotNull Constructor<T> constructor, @NotNull NamedTypeList types) { """ Returns an instantiator that uses given constructor and given types to create instances, or empty if there are no conversions that can be made to instantiate the type. ...
java
private @NotNull <T> Optional<Instantiator<T>> implicitInstantiatorFrom(@NotNull Constructor<T> constructor, @NotNull NamedTypeList types) { if (!isPublic(constructor.getModifiers())) return Optional.empty(); List<String> columnNames = types.getNames(); return findTargetTypes(constr...
[ "private", "@", "NotNull", "<", "T", ">", "Optional", "<", "Instantiator", "<", "T", ">", ">", "implicitInstantiatorFrom", "(", "@", "NotNull", "Constructor", "<", "T", ">", "constructor", ",", "@", "NotNull", "NamedTypeList", "types", ")", "{", "if", "(",...
Returns an instantiator that uses given constructor and given types to create instances, or empty if there are no conversions that can be made to instantiate the type.
[ "Returns", "an", "instantiator", "that", "uses", "given", "constructor", "and", "given", "types", "to", "create", "instances", "or", "empty", "if", "there", "are", "no", "conversions", "that", "can", "be", "made", "to", "instantiate", "the", "type", "." ]
train
https://github.com/EvidentSolutions/dalesbred/blob/713f5b6e152d97e1672ca68b9ff9c7c6c288ceb1/dalesbred/src/main/java/org/dalesbred/internal/instantiation/InstantiatorProvider.java#L152-L160
samskivert/samskivert
src/main/java/com/samskivert/jdbc/JDBCUtil.java
JDBCUtil.getColumnDefaultValue
public static String getColumnDefaultValue (Connection conn, String table, String column) throws SQLException { """ Returns a string representation of the default value for the specified column in the specified table. This may be null. """ ResultSet rs = getColumnMetaData(conn, table, column);...
java
public static String getColumnDefaultValue (Connection conn, String table, String column) throws SQLException { ResultSet rs = getColumnMetaData(conn, table, column); try { return rs.getString("COLUMN_DEF"); } finally { rs.close(); } }
[ "public", "static", "String", "getColumnDefaultValue", "(", "Connection", "conn", ",", "String", "table", ",", "String", "column", ")", "throws", "SQLException", "{", "ResultSet", "rs", "=", "getColumnMetaData", "(", "conn", ",", "table", ",", "column", ")", "...
Returns a string representation of the default value for the specified column in the specified table. This may be null.
[ "Returns", "a", "string", "representation", "of", "the", "default", "value", "for", "the", "specified", "column", "in", "the", "specified", "table", ".", "This", "may", "be", "null", "." ]
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/jdbc/JDBCUtil.java#L466-L475
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGHyperCube.java
SVGHyperCube.drawFilled
public static Element drawFilled(SVGPlot svgp, String cls, Projection2D proj, NumberVector min, NumberVector max) { """ Filled hypercube. @param svgp SVG Plot @param cls CSS class to use. @param proj Visualization projection @param min First corner @param max Opposite corner @return group element """ ...
java
public static Element drawFilled(SVGPlot svgp, String cls, Projection2D proj, NumberVector min, NumberVector max) { Element group = svgp.svgElement(SVGConstants.SVG_G_TAG); ArrayList<double[]> edges = getVisibleEdges(proj, min, max); double[] rv_min = proj.fastProjectDataToRenderSpace(min); recDrawSides...
[ "public", "static", "Element", "drawFilled", "(", "SVGPlot", "svgp", ",", "String", "cls", ",", "Projection2D", "proj", ",", "NumberVector", "min", ",", "NumberVector", "max", ")", "{", "Element", "group", "=", "svgp", ".", "svgElement", "(", "SVGConstants", ...
Filled hypercube. @param svgp SVG Plot @param cls CSS class to use. @param proj Visualization projection @param min First corner @param max Opposite corner @return group element
[ "Filled", "hypercube", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGHyperCube.java#L135-L141
apache/flink
flink-libraries/flink-gelly-examples/src/main/java/org/apache/flink/graph/drivers/EdgeList.java
EdgeList.hasNullValueEdges
private static <T, ET> boolean hasNullValueEdges(DataSet<Edge<T, ET>> edges) { """ Check whether the edge type of the {@link DataSet} is {@link NullValue}. @param edges data set for introspection @param <T> graph ID type @param <ET> edge value type @return whether the edge type of the {@link DataSet} is {@li...
java
private static <T, ET> boolean hasNullValueEdges(DataSet<Edge<T, ET>> edges) { TypeInformation<?> genericTypeInfo = edges.getType(); @SuppressWarnings("unchecked") TupleTypeInfo<Tuple3<T, T, ET>> tupleTypeInfo = (TupleTypeInfo<Tuple3<T, T, ET>>) genericTypeInfo; return tupleTypeInfo.getTypeAt(2).equals(ValueTy...
[ "private", "static", "<", "T", ",", "ET", ">", "boolean", "hasNullValueEdges", "(", "DataSet", "<", "Edge", "<", "T", ",", "ET", ">", ">", "edges", ")", "{", "TypeInformation", "<", "?", ">", "genericTypeInfo", "=", "edges", ".", "getType", "(", ")", ...
Check whether the edge type of the {@link DataSet} is {@link NullValue}. @param edges data set for introspection @param <T> graph ID type @param <ET> edge value type @return whether the edge type of the {@link DataSet} is {@link NullValue}
[ "Check", "whether", "the", "edge", "type", "of", "the", "{", "@link", "DataSet", "}", "is", "{", "@link", "NullValue", "}", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly-examples/src/main/java/org/apache/flink/graph/drivers/EdgeList.java#L73-L79
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/trees/tregex/tsurgeon/Tsurgeon.java
Tsurgeon.processPattern
public static Tree processPattern(TregexPattern matchPattern, TsurgeonPattern p, Tree t) { """ Tries to match a pattern against a tree. If it succeeds, apply the surgical operations contained in a {@link TsurgeonPattern}. @param matchPattern A {@link TregexPattern} to be matched against a {@link Tree}. @param p...
java
public static Tree processPattern(TregexPattern matchPattern, TsurgeonPattern p, Tree t) { TregexMatcher m = matchPattern.matcher(t); while(m.find()) { t = p.evaluate(t,m); if(t==null) break; m = matchPattern.matcher(t); } return t; }
[ "public", "static", "Tree", "processPattern", "(", "TregexPattern", "matchPattern", ",", "TsurgeonPattern", "p", ",", "Tree", "t", ")", "{", "TregexMatcher", "m", "=", "matchPattern", ".", "matcher", "(", "t", ")", ";", "while", "(", "m", ".", "find", "(",...
Tries to match a pattern against a tree. If it succeeds, apply the surgical operations contained in a {@link TsurgeonPattern}. @param matchPattern A {@link TregexPattern} to be matched against a {@link Tree}. @param p A {@link TsurgeonPattern} to apply. @param t the {@link Tree} to match against and perform surgery on...
[ "Tries", "to", "match", "a", "pattern", "against", "a", "tree", ".", "If", "it", "succeeds", "apply", "the", "surgical", "operations", "contained", "in", "a", "{" ]
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/trees/tregex/tsurgeon/Tsurgeon.java#L435-L444
Azure/azure-sdk-for-java
applicationinsights/resource-manager/v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ComponentFeatureCapabilitiesInner.java
ComponentFeatureCapabilitiesInner.getAsync
public Observable<ApplicationInsightsComponentFeatureCapabilitiesInner> getAsync(String resourceGroupName, String resourceName) { """ Returns feature capabilites of the application insights component. @param resourceGroupName The name of the resource group. @param resourceName The name of the Application Insig...
java
public Observable<ApplicationInsightsComponentFeatureCapabilitiesInner> getAsync(String resourceGroupName, String resourceName) { return getWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1<ServiceResponse<ApplicationInsightsComponentFeatureCapabilitiesInner>, ApplicationInsightsComponentF...
[ "public", "Observable", "<", "ApplicationInsightsComponentFeatureCapabilitiesInner", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "resourceName", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ",", "resourceName", ")", "....
Returns feature capabilites of the application insights component. @param resourceGroupName The name of the resource group. @param resourceName The name of the Application Insights component resource. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the ApplicationIns...
[ "Returns", "feature", "capabilites", "of", "the", "application", "insights", "component", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/applicationinsights/resource-manager/v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ComponentFeatureCapabilitiesInner.java#L95-L102
datasalt/pangool
core/src/main/java/com/datasalt/pangool/PangoolDriver.java
PangoolDriver.addClass
@SuppressWarnings("rawtypes") public void addClass(String name, Class mainClass, String description) throws Throwable { """ This is the method that adds the classed to the repository @param name The name of the string you want the class instance to be called with @param mainClass The class that you want to...
java
@SuppressWarnings("rawtypes") public void addClass(String name, Class mainClass, String description) throws Throwable { programs.put(name, new ProgramDescription(mainClass, description)); }
[ "@", "SuppressWarnings", "(", "\"rawtypes\"", ")", "public", "void", "addClass", "(", "String", "name", ",", "Class", "mainClass", ",", "String", "description", ")", "throws", "Throwable", "{", "programs", ".", "put", "(", "name", ",", "new", "ProgramDescripti...
This is the method that adds the classed to the repository @param name The name of the string you want the class instance to be called with @param mainClass The class that you want to add to the repository @param description The description of the class @throws NoSuchMethodException @throws SecurityException
[ "This", "is", "the", "method", "that", "adds", "the", "classed", "to", "the", "repository" ]
train
https://github.com/datasalt/pangool/blob/bfd312dd78cba03febaf7988ae96a3d4bc585408/core/src/main/java/com/datasalt/pangool/PangoolDriver.java#L88-L91
beangle/beangle3
commons/core/src/main/java/org/beangle/commons/collection/FastHashMap.java
FastHashMap.addEntry
private void addEntry(K key, V value) { """ Adds a new entry for the specified key and value. @param key the entry's key. @param value the entry's value. """ EntryImpl<K, V> entry = _poolFirst; if (entry != null) { _poolFirst = entry._after; entry._after = null; } else { // Pool emp...
java
private void addEntry(K key, V value) { EntryImpl<K, V> entry = _poolFirst; if (entry != null) { _poolFirst = entry._after; entry._after = null; } else { // Pool empty. entry = new EntryImpl<K, V>(); } // Setup entry paramters. entry._key = key; entry._value = value; i...
[ "private", "void", "addEntry", "(", "K", "key", ",", "V", "value", ")", "{", "EntryImpl", "<", "K", ",", "V", ">", "entry", "=", "_poolFirst", ";", "if", "(", "entry", "!=", "null", ")", "{", "_poolFirst", "=", "entry", ".", "_after", ";", "entry",...
Adds a new entry for the specified key and value. @param key the entry's key. @param value the entry's value.
[ "Adds", "a", "new", "entry", "for", "the", "specified", "key", "and", "value", "." ]
train
https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/core/src/main/java/org/beangle/commons/collection/FastHashMap.java#L648-L683
Pi4J/pi4j
pi4j-gpio-extension/src/main/java/com/pi4j/gpio/extension/base/DacGpioProviderBase.java
DacGpioProviderBase.setPercentValue
@Override public void setPercentValue(GpioPinAnalogOutput pin, Number percent) { """ Set the current analog value as a percentage of the available range instead of a raw value. Thr framework will automatically convert the percentage to a scaled number in the ADC's value range. @return percentage value betw...
java
@Override public void setPercentValue(GpioPinAnalogOutput pin, Number percent){ setPercentValue(pin.getPin(), percent); }
[ "@", "Override", "public", "void", "setPercentValue", "(", "GpioPinAnalogOutput", "pin", ",", "Number", "percent", ")", "{", "setPercentValue", "(", "pin", ".", "getPin", "(", ")", ",", "percent", ")", ";", "}" ]
Set the current analog value as a percentage of the available range instead of a raw value. Thr framework will automatically convert the percentage to a scaled number in the ADC's value range. @return percentage value between 0 and 100.
[ "Set", "the", "current", "analog", "value", "as", "a", "percentage", "of", "the", "available", "range", "instead", "of", "a", "raw", "value", ".", "Thr", "framework", "will", "automatically", "convert", "the", "percentage", "to", "a", "scaled", "number", "in...
train
https://github.com/Pi4J/pi4j/blob/03cacc62223cc59b3118bfcefadabab979fd84c7/pi4j-gpio-extension/src/main/java/com/pi4j/gpio/extension/base/DacGpioProviderBase.java#L100-L103
JadiraOrg/jadira
cloning/src/main/java/org/jadira/reflection/access/unsafe/UnsafeOperations.java
UnsafeOperations.deepCopyArrayAtOffset
public final void deepCopyArrayAtOffset(Object source, Object copy, Class<?> fieldClass, long offset, IdentityHashMap<Object, Object> referencesToReuse) { """ Copies the array of the specified type from the given field offset in the source object to the same location in the copy, visiting the array during the cop...
java
public final void deepCopyArrayAtOffset(Object source, Object copy, Class<?> fieldClass, long offset, IdentityHashMap<Object, Object> referencesToReuse) { Object origFieldValue = THE_UNSAFE.getObject(source, offset); if (origFieldValue == null) { putNullObject(copy, offset); } else { final Object copyFi...
[ "public", "final", "void", "deepCopyArrayAtOffset", "(", "Object", "source", ",", "Object", "copy", ",", "Class", "<", "?", ">", "fieldClass", ",", "long", "offset", ",", "IdentityHashMap", "<", "Object", ",", "Object", ">", "referencesToReuse", ")", "{", "O...
Copies the array of the specified type from the given field offset in the source object to the same location in the copy, visiting the array during the copy so that its contents are also copied @param source The object to copy from @param copy The target object @param fieldClass The declared type of array at the given ...
[ "Copies", "the", "array", "of", "the", "specified", "type", "from", "the", "given", "field", "offset", "in", "the", "source", "object", "to", "the", "same", "location", "in", "the", "copy", "visiting", "the", "array", "during", "the", "copy", "so", "that",...
train
https://github.com/JadiraOrg/jadira/blob/d55d0238395f0cb900531f1f08b4b2d87fa9a4f6/cloning/src/main/java/org/jadira/reflection/access/unsafe/UnsafeOperations.java#L468-L480
craftercms/deployer
src/main/java/org/craftercms/deployer/utils/ConfigUtils.java
ConfigUtils.getStringArrayProperty
public static String[] getStringArrayProperty(Configuration config, String key) throws DeployerConfigurationException { """ Returns the specified String array property from the configuration. A String array property is normally specified as a String with values s...
java
public static String[] getStringArrayProperty(Configuration config, String key) throws DeployerConfigurationException { try { return config.getStringArray(key); } catch (Exception e) { throw new DeployerConfigurationException("Fai...
[ "public", "static", "String", "[", "]", "getStringArrayProperty", "(", "Configuration", "config", ",", "String", "key", ")", "throws", "DeployerConfigurationException", "{", "try", "{", "return", "config", ".", "getStringArray", "(", "key", ")", ";", "}", "catch...
Returns the specified String array property from the configuration. A String array property is normally specified as a String with values separated by commas in the configuration. @param config the configuration @param key the key of the property @return the String array value of the property, or null if not found ...
[ "Returns", "the", "specified", "String", "array", "property", "from", "the", "configuration", ".", "A", "String", "array", "property", "is", "normally", "specified", "as", "a", "String", "with", "values", "separated", "by", "commas", "in", "the", "configuration"...
train
https://github.com/craftercms/deployer/blob/3ed446e3cc8af1055de2de6f871907f90ef27f63/src/main/java/org/craftercms/deployer/utils/ConfigUtils.java#L232-L239
buschmais/jqa-maven3-plugin
src/main/java/com/buschmais/jqassistant/plugin/maven3/impl/scanner/MavenModelScannerPlugin.java
MavenModelScannerPlugin.addActivation
private void addActivation(MavenProfileDescriptor mavenProfileDescriptor, Activation activation, Store store) { """ Adds activation information for the given profile. @param mavenProfileDescriptor The profile descriptor. @param activation The activation information. @param store The database. """ ...
java
private void addActivation(MavenProfileDescriptor mavenProfileDescriptor, Activation activation, Store store) { if (null == activation) { return; } MavenProfileActivationDescriptor profileActivationDescriptor = store.create(MavenProfileActivationDescriptor.class); mavenProfil...
[ "private", "void", "addActivation", "(", "MavenProfileDescriptor", "mavenProfileDescriptor", ",", "Activation", "activation", ",", "Store", "store", ")", "{", "if", "(", "null", "==", "activation", ")", "{", "return", ";", "}", "MavenProfileActivationDescriptor", "p...
Adds activation information for the given profile. @param mavenProfileDescriptor The profile descriptor. @param activation The activation information. @param store The database.
[ "Adds", "activation", "information", "for", "the", "given", "profile", "." ]
train
https://github.com/buschmais/jqa-maven3-plugin/blob/6c6e2dca56de6d5b8ceeb2f28982fb6d7c98778f/src/main/java/com/buschmais/jqassistant/plugin/maven3/impl/scanner/MavenModelScannerPlugin.java#L191-L224
aspectran/aspectran
core/src/main/java/com/aspectran/core/util/MethodUtils.java
MethodUtils.invokeExactStaticMethod
public static Object invokeExactStaticMethod(Class<?> objectClass, String methodName) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { """ Invoke a static method that has no parameters. @param objectClass invoke static method on this class @param methodName get meth...
java
public static Object invokeExactStaticMethod(Class<?> objectClass, String methodName) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { return invokeExactStaticMethod(objectClass, methodName, EMPTY_OBJECT_ARRAY, EMPTY_CLASS_PARAMETERS); }
[ "public", "static", "Object", "invokeExactStaticMethod", "(", "Class", "<", "?", ">", "objectClass", ",", "String", "methodName", ")", "throws", "NoSuchMethodException", ",", "IllegalAccessException", ",", "InvocationTargetException", "{", "return", "invokeExactStaticMeth...
Invoke a static method that has no parameters. @param objectClass invoke static method on this class @param methodName get method with this name @return the value returned by the invoked method @throws NoSuchMethodException if there is no such accessible method @throws InvocationTargetException wraps an exception thro...
[ "Invoke", "a", "static", "method", "that", "has", "no", "parameters", "." ]
train
https://github.com/aspectran/aspectran/blob/2d758a2a28b71ee85b42823c12dc44674d7f2c70/core/src/main/java/com/aspectran/core/util/MethodUtils.java#L518-L521
taskadapter/redmine-java-api
src/main/java/com/taskadapter/redmineapi/internal/comm/betterssl/BetterSSLFactory.java
BetterSSLFactory.addX509Managers
private static void addX509Managers(final Collection<X509TrustManager> managers, KeyStore ks) throws KeyStoreException, Error { """ Adds X509 keystore-backed trust manager into the list of managers. @param managers list of the managers to add to. @param ks key store with target keys. @throws KeyStoreExceptio...
java
private static void addX509Managers(final Collection<X509TrustManager> managers, KeyStore ks) throws KeyStoreException, Error { try { final TrustManagerFactory tmf = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); tmf.init(ks); for (TrustManager tm : tmf.getTrustManagers()) { ...
[ "private", "static", "void", "addX509Managers", "(", "final", "Collection", "<", "X509TrustManager", ">", "managers", ",", "KeyStore", "ks", ")", "throws", "KeyStoreException", ",", "Error", "{", "try", "{", "final", "TrustManagerFactory", "tmf", "=", "TrustManage...
Adds X509 keystore-backed trust manager into the list of managers. @param managers list of the managers to add to. @param ks key store with target keys. @throws KeyStoreException if key store could not be accessed.
[ "Adds", "X509", "keystore", "-", "backed", "trust", "manager", "into", "the", "list", "of", "managers", "." ]
train
https://github.com/taskadapter/redmine-java-api/blob/0bb65f27ee806ec3bd4007e1641f3e996261a04e/src/main/java/com/taskadapter/redmineapi/internal/comm/betterssl/BetterSSLFactory.java#L61-L74
Viascom/groundwork
foxhttp/src/main/java/ch/viascom/groundwork/foxhttp/query/FoxHttpRequestQuery.java
FoxHttpRequestQuery.parseObjectAsQueryMap
public void parseObjectAsQueryMap(List<String> params, Object o) throws FoxHttpRequestException { """ Parse an object as query map @param params list of attribute names which will be included @param o object with the attributes @throws FoxHttpRequestException can throw an exception if a field does not ex...
java
public void parseObjectAsQueryMap(List<String> params, Object o) throws FoxHttpRequestException { try { Class clazz = o.getClass(); HashMap<String, String> paramMap = new HashMap<>(); for (String param : params) { Field field = clazz.getDeclaredField(param); ...
[ "public", "void", "parseObjectAsQueryMap", "(", "List", "<", "String", ">", "params", ",", "Object", "o", ")", "throws", "FoxHttpRequestException", "{", "try", "{", "Class", "clazz", "=", "o", ".", "getClass", "(", ")", ";", "HashMap", "<", "String", ",", ...
Parse an object as query map @param params list of attribute names which will be included @param o object with the attributes @throws FoxHttpRequestException can throw an exception if a field does not exist
[ "Parse", "an", "object", "as", "query", "map" ]
train
https://github.com/Viascom/groundwork/blob/d3f7d0df65e2e75861fc7db938090683f2cdf919/foxhttp/src/main/java/ch/viascom/groundwork/foxhttp/query/FoxHttpRequestQuery.java#L78-L95
sarl/sarl
contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyExpressionGenerator.java
PyExpressionGenerator._generate
protected XExpression _generate(XReturnExpression returnStatement, IAppendable it, IExtraLanguageGeneratorContext context) { """ Generate the given object. @param returnStatement the return statement. @param it the target for the generated content. @param context the context. @return the statement. """ ...
java
protected XExpression _generate(XReturnExpression returnStatement, IAppendable it, IExtraLanguageGeneratorContext context) { it.append("return "); //$NON-NLS-1$ generate(returnStatement.getExpression(), it, context); return returnStatement; }
[ "protected", "XExpression", "_generate", "(", "XReturnExpression", "returnStatement", ",", "IAppendable", "it", ",", "IExtraLanguageGeneratorContext", "context", ")", "{", "it", ".", "append", "(", "\"return \"", ")", ";", "//$NON-NLS-1$", "generate", "(", "returnStat...
Generate the given object. @param returnStatement the return statement. @param it the target for the generated content. @param context the context. @return the statement.
[ "Generate", "the", "given", "object", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyExpressionGenerator.java#L812-L816
aws/aws-sdk-java
aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/JmesPathCodeGenVisitor.java
JmesPathCodeGenVisitor.visit
@Override public String visit(final Comparator op, final Void aVoid) throws InvalidTypeException { """ Generates the code for a new Comparator. @param op JmesPath comparison operator type @param aVoid void @return String that represents a call to the new comparator expression @throws Inva...
java
@Override public String visit(final Comparator op, final Void aVoid) throws InvalidTypeException { String lhs = op.getLhsExpr().accept(this, aVoid); String rhs = op.getRhsExpr().accept(this, aVoid); return String.format("new %s(%s, %s)", op.getClass() .getSimpleN...
[ "@", "Override", "public", "String", "visit", "(", "final", "Comparator", "op", ",", "final", "Void", "aVoid", ")", "throws", "InvalidTypeException", "{", "String", "lhs", "=", "op", ".", "getLhsExpr", "(", ")", ".", "accept", "(", "this", ",", "aVoid", ...
Generates the code for a new Comparator. @param op JmesPath comparison operator type @param aVoid void @return String that represents a call to the new comparator expression @throws InvalidTypeException
[ "Generates", "the", "code", "for", "a", "new", "Comparator", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/JmesPathCodeGenVisitor.java#L195-L203
ops4j/org.ops4j.pax.web
pax-web-spi/src/main/java/org/ops4j/pax/web/service/spi/model/ServerModel.java
ServerModel.getFullPath
private static String getFullPath(final ContextModel model, final String path) { """ Returns the full path (including the context name if set) @param model a context model @param path path to be prepended @return full path """ String fullPath = path.trim(); if (model.getContextName().length() > 0) ...
java
private static String getFullPath(final ContextModel model, final String path) { String fullPath = path.trim(); if (model.getContextName().length() > 0) { fullPath = "/" + model.getContextName(); if (!"/".equals(path.trim())) { if ((!(fullPath.endsWith("/"))) && (!(path.startsWith("/")))) { ful...
[ "private", "static", "String", "getFullPath", "(", "final", "ContextModel", "model", ",", "final", "String", "path", ")", "{", "String", "fullPath", "=", "path", ".", "trim", "(", ")", ";", "if", "(", "model", ".", "getContextName", "(", ")", ".", "lengt...
Returns the full path (including the context name if set) @param model a context model @param path path to be prepended @return full path
[ "Returns", "the", "full", "path", "(", "including", "the", "context", "name", "if", "set", ")" ]
train
https://github.com/ops4j/org.ops4j.pax.web/blob/9ecf3676c1d316be0d43ea7fcfdc8f0defffc2a2/pax-web-spi/src/main/java/org/ops4j/pax/web/service/spi/model/ServerModel.java#L546-L558
jfinal/jfinal
src/main/java/com/jfinal/template/expr/ExprParser.java
ExprParser.buildMapEntry
void buildMapEntry(LinkedHashMap<Object, Expr> map) { """ mapEntry : (ID | STR | INT | LONG | FLOAT | DOUBLE | TRUE | FALSE | NULL) ':' expr 设计目标为 map 定义与初始化,所以 ID 仅当成 STR 不进行求值 """ Expr keyExpr = expr(); Object key; if (keyExpr instanceof Id) { key = ((Id)keyExpr).getId(); } else if (keyExpr ...
java
void buildMapEntry(LinkedHashMap<Object, Expr> map) { Expr keyExpr = expr(); Object key; if (keyExpr instanceof Id) { key = ((Id)keyExpr).getId(); } else if (keyExpr instanceof Const) { key = ((Const)keyExpr).getValue(); } else { throw new ParseException("Expression error: the value of map ke...
[ "void", "buildMapEntry", "(", "LinkedHashMap", "<", "Object", ",", "Expr", ">", "map", ")", "{", "Expr", "keyExpr", "=", "expr", "(", ")", ";", "Object", "key", ";", "if", "(", "keyExpr", "instanceof", "Id", ")", "{", "key", "=", "(", "(", "Id", ")...
mapEntry : (ID | STR | INT | LONG | FLOAT | DOUBLE | TRUE | FALSE | NULL) ':' expr 设计目标为 map 定义与初始化,所以 ID 仅当成 STR 不进行求值
[ "mapEntry", ":", "(", "ID", "|", "STR", "|", "INT", "|", "LONG", "|", "FLOAT", "|", "DOUBLE", "|", "TRUE", "|", "FALSE", "|", "NULL", ")", ":", "expr", "设计目标为", "map", "定义与初始化,所以", "ID", "仅当成", "STR", "不进行求值" ]
train
https://github.com/jfinal/jfinal/blob/fc07f0f5d56e85ccd3cfcdd587b56b8dd9c663e9/src/main/java/com/jfinal/template/expr/ExprParser.java#L453-L470
apptik/jus
jus-java/src/main/java/io/apptik/comm/jus/http/HttpUrl.java
HttpUrl.encodedPathSegments
public List<String> encodedPathSegments() { """ Returns a list of encoded path segments like {@code ["a", "b", "c"]} for the URL {@code http://host/a/b/c}. This list is never empty though it may contain a single empty string. <p><table summary=""> <tr><th>URL</th><th>{@code encodedPathSegments()}</th></tr> <...
java
public List<String> encodedPathSegments() { int pathStart = url.indexOf('/', scheme.length() + 3); int pathEnd = delimiterOffset(url, pathStart, url.length(), "?#"); List<String> result = new ArrayList<>(); for (int i = pathStart; i < pathEnd; ) { i++; // Skip the '/'. ...
[ "public", "List", "<", "String", ">", "encodedPathSegments", "(", ")", "{", "int", "pathStart", "=", "url", ".", "indexOf", "(", "'", "'", ",", "scheme", ".", "length", "(", ")", "+", "3", ")", ";", "int", "pathEnd", "=", "delimiterOffset", "(", "url...
Returns a list of encoded path segments like {@code ["a", "b", "c"]} for the URL {@code http://host/a/b/c}. This list is never empty though it may contain a single empty string. <p><table summary=""> <tr><th>URL</th><th>{@code encodedPathSegments()}</th></tr> <tr><td>{@code http://host/}</td><td>{@code [""]}</td></tr>...
[ "Returns", "a", "list", "of", "encoded", "path", "segments", "like", "{", "@code", "[", "a", "b", "c", "]", "}", "for", "the", "URL", "{", "@code", "http", ":", "//", "host", "/", "a", "/", "b", "/", "c", "}", ".", "This", "list", "is", "never"...
train
https://github.com/apptik/jus/blob/8a37a21b41f897d68eaeaab07368ec22a1e5a60e/jus-java/src/main/java/io/apptik/comm/jus/http/HttpUrl.java#L566-L577
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java
CoverageDataCore.getUnsignedPixelValue
public int getUnsignedPixelValue(GriddedTile griddedTile, Double value) { """ Get the unsigned 16 bit integer pixel value of the coverage data value @param griddedTile gridded tile @param value coverage data value @return 16 bit integer pixel value """ int unsignedPixelValue = 0; if (value == null...
java
public int getUnsignedPixelValue(GriddedTile griddedTile, Double value) { int unsignedPixelValue = 0; if (value == null) { if (griddedCoverage != null) { unsignedPixelValue = griddedCoverage.getDataNull().intValue(); } } else { double pixelValue = valueToPixelValue(griddedTile, value); unsignedP...
[ "public", "int", "getUnsignedPixelValue", "(", "GriddedTile", "griddedTile", ",", "Double", "value", ")", "{", "int", "unsignedPixelValue", "=", "0", ";", "if", "(", "value", "==", "null", ")", "{", "if", "(", "griddedCoverage", "!=", "null", ")", "{", "un...
Get the unsigned 16 bit integer pixel value of the coverage data value @param griddedTile gridded tile @param value coverage data value @return 16 bit integer pixel value
[ "Get", "the", "unsigned", "16", "bit", "integer", "pixel", "value", "of", "the", "coverage", "data", "value" ]
train
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java#L1544-L1558
devnied/EMV-NFC-Paycard-Enrollment
library/src/main/java/com/github/devnied/emvnfccard/parser/impl/GeldKarteParser.java
GeldKarteParser.readEfBetrag
protected void readEfBetrag(final Application pApplication) throws CommunicationException { """ read EF_BETRAG @param pApplication EMV application @throws CommunicationException communication error """ // 00 B2 01 C4 00 byte[] data = template.get().getProvider() .transceive(new CommandApdu(CommandE...
java
protected void readEfBetrag(final Application pApplication) throws CommunicationException { // 00 B2 01 C4 00 byte[] data = template.get().getProvider() .transceive(new CommandApdu(CommandEnum.READ_RECORD, 0x01, 0xC4, 0).toBytes()); // Check response if (ResponseUtils.isSucceed(data)) { pApplication.setA...
[ "protected", "void", "readEfBetrag", "(", "final", "Application", "pApplication", ")", "throws", "CommunicationException", "{", "// 00 B2 01 C4 00", "byte", "[", "]", "data", "=", "template", ".", "get", "(", ")", ".", "getProvider", "(", ")", ".", "transceive",...
read EF_BETRAG @param pApplication EMV application @throws CommunicationException communication error
[ "read", "EF_BETRAG" ]
train
https://github.com/devnied/EMV-NFC-Paycard-Enrollment/blob/bfbd3960708689154a7a75c8a9a934197d738a5b/library/src/main/java/com/github/devnied/emvnfccard/parser/impl/GeldKarteParser.java#L178-L186
loldevs/riotapi
rtmp/src/main/java/net/boreeas/riotapi/rtmp/RtmpClient.java
RtmpClient.sendRpc
@Deprecated public int sendRpc(String endpoint, String service, String method, Object... args) { """ Send a remote procedure call. @param endpoint The endpoint of the call @param service The service handling the call @param method The method to call @param args Optional args to the call @return The id of ...
java
@Deprecated public int sendRpc(String endpoint, String service, String method, Object... args) { RemotingMessage message = createRemotingMessage(endpoint, service, method, args); Invoke invoke = createAmf3InvokeSkeleton(null, message); send(invoke); return invoke.getInvokeId(); ...
[ "@", "Deprecated", "public", "int", "sendRpc", "(", "String", "endpoint", ",", "String", "service", ",", "String", "method", ",", "Object", "...", "args", ")", "{", "RemotingMessage", "message", "=", "createRemotingMessage", "(", "endpoint", ",", "service", ",...
Send a remote procedure call. @param endpoint The endpoint of the call @param service The service handling the call @param method The method to call @param args Optional args to the call @return The id of the callback @deprecated Due to method resolution ambiguities, this method is due to be removed within the next cou...
[ "Send", "a", "remote", "procedure", "call", "." ]
train
https://github.com/loldevs/riotapi/blob/0b8aac407aa5289845f249024f9732332855544f/rtmp/src/main/java/net/boreeas/riotapi/rtmp/RtmpClient.java#L612-L619
JadiraOrg/jadira
bindings/src/main/java/org/jadira/bindings/core/binder/BasicBinder.java
BasicBinder.registerConverter
public final <S, T> void registerConverter(Class<S> input, Class<T> output, Converter<S, T> converter, Class<? extends Annotation> qualifier) { """ Register a Converter with the given input and output classes. Instances of the input class can be converted into instances of the output class @param input The input...
java
public final <S, T> void registerConverter(Class<S> input, Class<T> output, Converter<S, T> converter, Class<? extends Annotation> qualifier) { registerConverter(new ConverterKey<S,T>(input, output, qualifier == null ? DefaultBinding.class : qualifier), converter); }
[ "public", "final", "<", "S", ",", "T", ">", "void", "registerConverter", "(", "Class", "<", "S", ">", "input", ",", "Class", "<", "T", ">", "output", ",", "Converter", "<", "S", ",", "T", ">", "converter", ",", "Class", "<", "?", "extends", "Annota...
Register a Converter with the given input and output classes. Instances of the input class can be converted into instances of the output class @param input The input class @param output The output class @param converter The Converter to be registered @param qualifier The qualifier for which the converter must be regist...
[ "Register", "a", "Converter", "with", "the", "given", "input", "and", "output", "classes", ".", "Instances", "of", "the", "input", "class", "can", "be", "converted", "into", "instances", "of", "the", "output", "class" ]
train
https://github.com/JadiraOrg/jadira/blob/d55d0238395f0cb900531f1f08b4b2d87fa9a4f6/bindings/src/main/java/org/jadira/bindings/core/binder/BasicBinder.java#L667-L669
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/GridFTPClient.java
GridFTPClient.setChecksum
public void setChecksum(ChecksumAlgorithm algorithm, String value) throws IOException, ServerException { """ Sets the checksum values ahead of the transfer @param algorithm the checksume algorithm @param value the checksum value as hexadecimal number @exception ServerExceptio...
java
public void setChecksum(ChecksumAlgorithm algorithm, String value) throws IOException, ServerException { String arguments = algorithm.toFtpCmdArgument() + " " + value; Command cmd = new Command("SCKS", arguments); try { controlChannel.execute(cmd)...
[ "public", "void", "setChecksum", "(", "ChecksumAlgorithm", "algorithm", ",", "String", "value", ")", "throws", "IOException", ",", "ServerException", "{", "String", "arguments", "=", "algorithm", ".", "toFtpCmdArgument", "(", ")", "+", "\" \"", "+", "value", ";"...
Sets the checksum values ahead of the transfer @param algorithm the checksume algorithm @param value the checksum value as hexadecimal number @exception ServerException if an error occured.
[ "Sets", "the", "checksum", "values", "ahead", "of", "the", "transfer" ]
train
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/GridFTPClient.java#L968-L981
michaelliao/jsonstream
src/main/java/com/itranswarp/jsonstream/JsonBuilder.java
JsonBuilder.createWriter
public JsonWriter createWriter(OutputStream output) { """ Create a JsonWriter that write JSON to specified OutputStream. @param output The OutputStream object. @return JsonWriter object. """ Writer writer = null; try { writer = new OutputStreamWriter(output, "UTF-8"); } ...
java
public JsonWriter createWriter(OutputStream output) { Writer writer = null; try { writer = new OutputStreamWriter(output, "UTF-8"); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } return new JsonWriter(writer, typeAdapte...
[ "public", "JsonWriter", "createWriter", "(", "OutputStream", "output", ")", "{", "Writer", "writer", "=", "null", ";", "try", "{", "writer", "=", "new", "OutputStreamWriter", "(", "output", ",", "\"UTF-8\"", ")", ";", "}", "catch", "(", "UnsupportedEncodingExc...
Create a JsonWriter that write JSON to specified OutputStream. @param output The OutputStream object. @return JsonWriter object.
[ "Create", "a", "JsonWriter", "that", "write", "JSON", "to", "specified", "OutputStream", "." ]
train
https://github.com/michaelliao/jsonstream/blob/50adcff2e1293e655462eef5fc5f1b59277de514/src/main/java/com/itranswarp/jsonstream/JsonBuilder.java#L136-L145
alkacon/opencms-core
src/org/opencms/file/CmsProperty.java
CmsProperty.rebuildDelimiter
private String rebuildDelimiter(String value, char delimiter, String delimiterReplacement) { """ Rebuilds the given delimiter character from the replacement string.<p> @param value the string that is scanned @param delimiter the delimiter character to rebuild @param delimiterReplacement the replacement string...
java
private String rebuildDelimiter(String value, char delimiter, String delimiterReplacement) { return CmsStringUtil.substitute(value, delimiterReplacement, String.valueOf(delimiter)); }
[ "private", "String", "rebuildDelimiter", "(", "String", "value", ",", "char", "delimiter", ",", "String", "delimiterReplacement", ")", "{", "return", "CmsStringUtil", ".", "substitute", "(", "value", ",", "delimiterReplacement", ",", "String", ".", "valueOf", "(",...
Rebuilds the given delimiter character from the replacement string.<p> @param value the string that is scanned @param delimiter the delimiter character to rebuild @param delimiterReplacement the replacement string for the delimiter character @return the substituted string
[ "Rebuilds", "the", "given", "delimiter", "character", "from", "the", "replacement", "string", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/file/CmsProperty.java#L1337-L1340
xhsun/gw2wrapper
src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java
AsynchronousRequest.getWvWMatchStat
public void getWvWMatchStat(String[] ids, Callback<List<WvWMatchStat>> callback) throws GuildWars2Exception, NullPointerException { """ For more info on WvW matches API go <a href="https://wiki.guildwars2.com/wiki/API:2/wvw/matches">here</a><br/> Give user the access to {@link Callback#onResponse(Call, Response)}...
java
public void getWvWMatchStat(String[] ids, Callback<List<WvWMatchStat>> callback) throws GuildWars2Exception, NullPointerException { isParamValid(new ParamChecker(ids)); gw2API.getWvWMatchStatUsingID(processIds(ids)).enqueue(callback); }
[ "public", "void", "getWvWMatchStat", "(", "String", "[", "]", "ids", ",", "Callback", "<", "List", "<", "WvWMatchStat", ">", ">", "callback", ")", "throws", "GuildWars2Exception", ",", "NullPointerException", "{", "isParamValid", "(", "new", "ParamChecker", "(",...
For more info on WvW matches API go <a href="https://wiki.guildwars2.com/wiki/API:2/wvw/matches">here</a><br/> Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions @param ids list of wvw match id(s) @param callback call...
[ "For", "more", "info", "on", "WvW", "matches", "API", "go", "<a", "href", "=", "https", ":", "//", "wiki", ".", "guildwars2", ".", "com", "/", "wiki", "/", "API", ":", "2", "/", "wvw", "/", "matches", ">", "here<", "/", "a", ">", "<br", "/", ">...
train
https://github.com/xhsun/gw2wrapper/blob/c8a43b51f363b032074fb152ee6efe657e33e525/src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java#L2708-L2711
onelogin/onelogin-java-sdk
src/main/java/com/onelogin/sdk/conn/Client.java
Client.removeFactor
public Boolean removeFactor(long userId, long deviceId) throws OAuthSystemException, OAuthProblemException, URISyntaxException { """ Remove an enrolled factor from a user. @param userId The id of the user. @param deviceId The device_id of the MFA device. @return Boolean True if action succeed @throws O...
java
public Boolean removeFactor(long userId, long deviceId) throws OAuthSystemException, OAuthProblemException, URISyntaxException { cleanError(); prepareToken(); URIBuilder url = new URIBuilder(settings.getURL(Constants.REMOVE_FACTOR_URL, userId, deviceId)); OneloginURLConnectionClient httpClient = new Onelo...
[ "public", "Boolean", "removeFactor", "(", "long", "userId", ",", "long", "deviceId", ")", "throws", "OAuthSystemException", ",", "OAuthProblemException", ",", "URISyntaxException", "{", "cleanError", "(", ")", ";", "prepareToken", "(", ")", ";", "URIBuilder", "url...
Remove an enrolled factor from a user. @param userId The id of the user. @param deviceId The device_id of the MFA device. @return Boolean True if action succeed @throws OAuthSystemException - if there is a IOException reading parameters of the httpURLConnection @throws OAuthProblemException - if there are errors val...
[ "Remove", "an", "enrolled", "factor", "from", "a", "user", "." ]
train
https://github.com/onelogin/onelogin-java-sdk/blob/1570b78033dcc1c7387099e77fe41b6b0638df8c/src/main/java/com/onelogin/sdk/conn/Client.java#L2940-L2963
netty/netty
codec/src/main/java/io/netty/handler/codec/compression/Bzip2HuffmanAllocator.java
Bzip2HuffmanAllocator.findNodesToRelocate
private static int findNodesToRelocate(final int[] array, final int maximumLength) { """ Finds the number of nodes to relocate in order to achieve a given code length limit. @param array The code length array @param maximumLength The maximum bit length for the generated codes @return The number of nodes to relo...
java
private static int findNodesToRelocate(final int[] array, final int maximumLength) { int currentNode = array.length - 2; for (int currentDepth = 1; currentDepth < maximumLength - 1 && currentNode > 1; currentDepth++) { currentNode = first(array, currentNode - 1, 0); } return...
[ "private", "static", "int", "findNodesToRelocate", "(", "final", "int", "[", "]", "array", ",", "final", "int", "maximumLength", ")", "{", "int", "currentNode", "=", "array", ".", "length", "-", "2", ";", "for", "(", "int", "currentDepth", "=", "1", ";",...
Finds the number of nodes to relocate in order to achieve a given code length limit. @param array The code length array @param maximumLength The maximum bit length for the generated codes @return The number of nodes to relocate
[ "Finds", "the", "number", "of", "nodes", "to", "relocate", "in", "order", "to", "achieve", "a", "given", "code", "length", "limit", "." ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec/src/main/java/io/netty/handler/codec/compression/Bzip2HuffmanAllocator.java#L88-L94
elki-project/elki
elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/io/ByteArrayUtil.java
ByteArrayUtil.writeUnsignedVarint
public static void writeUnsignedVarint(ByteBuffer buffer, int val) { """ Write an unsigned integer using a variable-length encoding. Data is always written in 7-bit little-endian, where the 8th bit is the continuation flag. @param buffer Buffer to write to @param val number to write """ // Extra by...
java
public static void writeUnsignedVarint(ByteBuffer buffer, int val) { // Extra bytes have the high bit set while((val & 0x7F) != val) { buffer.put((byte) ((val & 0x7F) | 0x80)); val >>>= 7; } // Last byte doesn't have high bit set buffer.put((byte) (val & 0x7F)); }
[ "public", "static", "void", "writeUnsignedVarint", "(", "ByteBuffer", "buffer", ",", "int", "val", ")", "{", "// Extra bytes have the high bit set", "while", "(", "(", "val", "&", "0x7F", ")", "!=", "val", ")", "{", "buffer", ".", "put", "(", "(", "byte", ...
Write an unsigned integer using a variable-length encoding. Data is always written in 7-bit little-endian, where the 8th bit is the continuation flag. @param buffer Buffer to write to @param val number to write
[ "Write", "an", "unsigned", "integer", "using", "a", "variable", "-", "length", "encoding", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/io/ByteArrayUtil.java#L647-L655
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/tasks/net/ThreadBoundJschLogger.java
ThreadBoundJschLogger.setThreadLogger
private void setThreadLogger(PluginLogger logger, int loggingLevel) { """ Set the thread-inherited logger with a loglevel on Jsch @param logger logger @param loggingLevel level """ pluginLogger.set(logger); logLevel.set(loggingLevel); JSch.setLogger(this); }
java
private void setThreadLogger(PluginLogger logger, int loggingLevel) { pluginLogger.set(logger); logLevel.set(loggingLevel); JSch.setLogger(this); }
[ "private", "void", "setThreadLogger", "(", "PluginLogger", "logger", ",", "int", "loggingLevel", ")", "{", "pluginLogger", ".", "set", "(", "logger", ")", ";", "logLevel", ".", "set", "(", "loggingLevel", ")", ";", "JSch", ".", "setLogger", "(", "this", ")...
Set the thread-inherited logger with a loglevel on Jsch @param logger logger @param loggingLevel level
[ "Set", "the", "thread", "-", "inherited", "logger", "with", "a", "loglevel", "on", "Jsch" ]
train
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/tasks/net/ThreadBoundJschLogger.java#L89-L93
twilio/authy-java
src/main/java/com/authy/AuthyUtil.java
AuthyUtil.validateSignature
private static boolean validateSignature(Map<String, String> parameters, Map<String, String> headers, String method, String url, String apiKey) throws OneTouchException, UnsupportedEncodingException { """ Validates the request information to @param parameters The request parameters(all of them) @param headers ...
java
private static boolean validateSignature(Map<String, String> parameters, Map<String, String> headers, String method, String url, String apiKey) throws OneTouchException, UnsupportedEncodingException { if (headers == null) throw new OneTouchException("No headers sent"); if (!headers.contain...
[ "private", "static", "boolean", "validateSignature", "(", "Map", "<", "String", ",", "String", ">", "parameters", ",", "Map", "<", "String", ",", "String", ">", "headers", ",", "String", "method", ",", "String", "url", ",", "String", "apiKey", ")", "throws...
Validates the request information to @param parameters The request parameters(all of them) @param headers The headers of the request @param url The url of the request. @param apiKey the security token from the authy library @return true if the signature ios valid, false otherwise @throws UnsupportedEncod...
[ "Validates", "the", "request", "information", "to" ]
train
https://github.com/twilio/authy-java/blob/55e3a5ff57a93b3eb36f5b59e8824e60af2b8b91/src/main/java/com/authy/AuthyUtil.java#L55-L81
OpenLiberty/open-liberty
dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/shared/util/WebConfigParamUtils.java
WebConfigParamUtils.getIntegerInitParameter
public static int getIntegerInitParameter(ExternalContext context, String[] names, int defaultValue) { """ Gets the int init parameter value from the specified context. If the parameter was not specified, the default value is used instead. @param context the application's external context @param names the i...
java
public static int getIntegerInitParameter(ExternalContext context, String[] names, int defaultValue) { if (names == null) { throw new NullPointerException(); } String param = null; for (String name : names) { if (name == null) ...
[ "public", "static", "int", "getIntegerInitParameter", "(", "ExternalContext", "context", ",", "String", "[", "]", "names", ",", "int", "defaultValue", ")", "{", "if", "(", "names", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", ")", ";"...
Gets the int init parameter value from the specified context. If the parameter was not specified, the default value is used instead. @param context the application's external context @param names the init parameter's names @param defaultValue the default value to return in case the parameter was not set @return the i...
[ "Gets", "the", "int", "init", "parameter", "value", "from", "the", "specified", "context", ".", "If", "the", "parameter", "was", "not", "specified", "the", "default", "value", "is", "used", "instead", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/shared/util/WebConfigParamUtils.java#L511-L540
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/CategoryUrl.java
CategoryUrl.addCategoryUrl
public static MozuUrl addCategoryUrl(Boolean incrementSequence, String responseFields, Boolean useProvidedId) { """ Get Resource Url for AddCategory @param incrementSequence If true, when adding a new product category, set the sequence number of the new category to an increment of one integer greater than the max...
java
public static MozuUrl addCategoryUrl(Boolean incrementSequence, String responseFields, Boolean useProvidedId) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/categories/?incrementSequence={incrementSequence}&useProvidedId={useProvidedId}&responseFields={responseFields}"); formatter.form...
[ "public", "static", "MozuUrl", "addCategoryUrl", "(", "Boolean", "incrementSequence", ",", "String", "responseFields", ",", "Boolean", "useProvidedId", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/catalog/admin/categories/?increme...
Get Resource Url for AddCategory @param incrementSequence If true, when adding a new product category, set the sequence number of the new category to an increment of one integer greater than the maximum available sequence number across all product categories. If false, set the sequence number to zero. @param responseFi...
[ "Get", "Resource", "Url", "for", "AddCategory" ]
train
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/CategoryUrl.java#L71-L78
mebigfatguy/fb-contrib
src/main/java/com/mebigfatguy/fbcontrib/utils/RegisterUtils.java
RegisterUtils.getAStoreReg
public static int getAStoreReg(final DismantleBytecode dbc, final int seen) { """ returns the register used to store a reference @param dbc the dismantle byte code parsing the class @param seen the opcode of the store @return the register stored into """ if (seen == Const.ASTORE) { r...
java
public static int getAStoreReg(final DismantleBytecode dbc, final int seen) { if (seen == Const.ASTORE) { return dbc.getRegisterOperand(); } if (OpcodeUtils.isAStore(seen)) { return seen - Const.ASTORE_0; } return -1; }
[ "public", "static", "int", "getAStoreReg", "(", "final", "DismantleBytecode", "dbc", ",", "final", "int", "seen", ")", "{", "if", "(", "seen", "==", "Const", ".", "ASTORE", ")", "{", "return", "dbc", ".", "getRegisterOperand", "(", ")", ";", "}", "if", ...
returns the register used to store a reference @param dbc the dismantle byte code parsing the class @param seen the opcode of the store @return the register stored into
[ "returns", "the", "register", "used", "to", "store", "a", "reference" ]
train
https://github.com/mebigfatguy/fb-contrib/blob/3b5203196f627b399fbcea3c2ab2b1f4e56cc7b8/src/main/java/com/mebigfatguy/fbcontrib/utils/RegisterUtils.java#L49-L58
kuali/ojb-1.0.4
src/java/org/apache/ojb/odmg/ObjectEnvelopeTable.java
ObjectEnvelopeTable.get
public ObjectEnvelope get(Object pKey, boolean isNew) { """ retrieve an objects ObjectEnvelope state from the hashtable. If no ObjectEnvelope is found, a new one is created and returned. @return the resulting ObjectEnvelope """ PersistenceBroker broker = transaction.getBroker(); Identity ...
java
public ObjectEnvelope get(Object pKey, boolean isNew) { PersistenceBroker broker = transaction.getBroker(); Identity oid = broker.serviceIdentity().buildIdentity(pKey); return get(oid, pKey, isNew); }
[ "public", "ObjectEnvelope", "get", "(", "Object", "pKey", ",", "boolean", "isNew", ")", "{", "PersistenceBroker", "broker", "=", "transaction", ".", "getBroker", "(", ")", ";", "Identity", "oid", "=", "broker", ".", "serviceIdentity", "(", ")", ".", "buildId...
retrieve an objects ObjectEnvelope state from the hashtable. If no ObjectEnvelope is found, a new one is created and returned. @return the resulting ObjectEnvelope
[ "retrieve", "an", "objects", "ObjectEnvelope", "state", "from", "the", "hashtable", ".", "If", "no", "ObjectEnvelope", "is", "found", "a", "new", "one", "is", "created", "and", "returned", "." ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/odmg/ObjectEnvelopeTable.java#L413-L418
code4everything/util
src/main/java/com/zhazhapan/util/Checker.java
Checker.checkNull
public static String checkNull(String value, String elseValue) { """ 检测字符串是否为NULL @param value 需要检测的字符串 @param elseValue string为null返回的字符串 @return {@link String} @since 1.0.8 """ return isNull(value) ? elseValue : value; }
java
public static String checkNull(String value, String elseValue) { return isNull(value) ? elseValue : value; }
[ "public", "static", "String", "checkNull", "(", "String", "value", ",", "String", "elseValue", ")", "{", "return", "isNull", "(", "value", ")", "?", "elseValue", ":", "value", ";", "}" ]
检测字符串是否为NULL @param value 需要检测的字符串 @param elseValue string为null返回的字符串 @return {@link String} @since 1.0.8
[ "检测字符串是否为NULL" ]
train
https://github.com/code4everything/util/blob/1fc9f0ead1108f4d7208ba7c000df4244f708418/src/main/java/com/zhazhapan/util/Checker.java#L1157-L1159
nguillaumin/slick2d-maven
slick2d-core/src/main/java/org/newdawn/slick/Graphics.java
Graphics.fillRect
public void fillRect(float x1, float y1, float width, float height) { """ Fill a rectangle on the canvas in the current color @param x1 The x coordinate of the top left corner @param y1 The y coordinate of the top left corner @param width The width of the rectangle to fill @param height The height of the...
java
public void fillRect(float x1, float y1, float width, float height) { predraw(); TextureImpl.bindNone(); currentColor.bind(); GL.glBegin(SGL.GL_QUADS); GL.glVertex2f(x1, y1); GL.glVertex2f(x1 + width, y1); GL.glVertex2f(x1 + width, y1 + height); GL.glVertex2f(x1, y1 + height); GL.glEnd(); ...
[ "public", "void", "fillRect", "(", "float", "x1", ",", "float", "y1", ",", "float", "width", ",", "float", "height", ")", "{", "predraw", "(", ")", ";", "TextureImpl", ".", "bindNone", "(", ")", ";", "currentColor", ".", "bind", "(", ")", ";", "GL", ...
Fill a rectangle on the canvas in the current color @param x1 The x coordinate of the top left corner @param y1 The y coordinate of the top left corner @param width The width of the rectangle to fill @param height The height of the rectangle to fill
[ "Fill", "a", "rectangle", "on", "the", "canvas", "in", "the", "current", "color" ]
train
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/Graphics.java#L887-L899
forge/core
javaee/impl/src/main/java/org/jboss/forge/addon/javaee/rest/generator/dto/DTOCollection.java
DTOCollection.addNestedDTO
public void addNestedDTO(JavaClass<?> entity, JavaClassSource nestedDTO) { """ Registers the nested DTO created for a JPA entity @param entity The JPA entity @param nestedDTO The nested DTO created for the JPA entity """ DTOPair dtoPair = dtos.containsKey(entity) ? dtos.get(entity) : new DTOPair(); ...
java
public void addNestedDTO(JavaClass<?> entity, JavaClassSource nestedDTO) { DTOPair dtoPair = dtos.containsKey(entity) ? dtos.get(entity) : new DTOPair(); dtoPair.nestedDTO = nestedDTO; dtos.put(entity, dtoPair); }
[ "public", "void", "addNestedDTO", "(", "JavaClass", "<", "?", ">", "entity", ",", "JavaClassSource", "nestedDTO", ")", "{", "DTOPair", "dtoPair", "=", "dtos", ".", "containsKey", "(", "entity", ")", "?", "dtos", ".", "get", "(", "entity", ")", ":", "new"...
Registers the nested DTO created for a JPA entity @param entity The JPA entity @param nestedDTO The nested DTO created for the JPA entity
[ "Registers", "the", "nested", "DTO", "created", "for", "a", "JPA", "entity" ]
train
https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/javaee/impl/src/main/java/org/jboss/forge/addon/javaee/rest/generator/dto/DTOCollection.java#L69-L74
SteelBridgeLabs/neo4j-gremlin-bolt
src/main/java/com/steelbridgelabs/oss/neo4j/structure/providers/DatabaseSequenceElementIdProvider.java
DatabaseSequenceElementIdProvider.processIdentifier
@Override public Long processIdentifier(Object id) { """ Process the given identifier converting it to the correct type if necessary. @param id The {@link org.apache.tinkerpop.gremlin.structure.Element} identifier. @return The {@link org.apache.tinkerpop.gremlin.structure.Element} identifier converted to t...
java
@Override public Long processIdentifier(Object id) { Objects.requireNonNull(id, "Element identifier cannot be null"); // check for Long if (id instanceof Long) return (Long)id; // check for numeric types if (id instanceof Number) return ((Number)id).lo...
[ "@", "Override", "public", "Long", "processIdentifier", "(", "Object", "id", ")", "{", "Objects", ".", "requireNonNull", "(", "id", ",", "\"Element identifier cannot be null\"", ")", ";", "// check for Long", "if", "(", "id", "instanceof", "Long", ")", "return", ...
Process the given identifier converting it to the correct type if necessary. @param id The {@link org.apache.tinkerpop.gremlin.structure.Element} identifier. @return The {@link org.apache.tinkerpop.gremlin.structure.Element} identifier converted to the correct type if necessary.
[ "Process", "the", "given", "identifier", "converting", "it", "to", "the", "correct", "type", "if", "necessary", "." ]
train
https://github.com/SteelBridgeLabs/neo4j-gremlin-bolt/blob/df3ab429e0c83affae6cd43d41edd90de80c032e/src/main/java/com/steelbridgelabs/oss/neo4j/structure/providers/DatabaseSequenceElementIdProvider.java#L173-L187
apache/incubator-heron
heron/scheduler-core/src/java/org/apache/heron/scheduler/utils/LauncherUtils.java
LauncherUtils.getSchedulerInstance
public IScheduler getSchedulerInstance(Config config, Config runtime) throws SchedulerException { """ Creates and initializes scheduler instance @return initialized scheduler instances """ String schedulerClass = Context.schedulerClass(config); IScheduler scheduler; try { // create a...
java
public IScheduler getSchedulerInstance(Config config, Config runtime) throws SchedulerException { String schedulerClass = Context.schedulerClass(config); IScheduler scheduler; try { // create an instance of scheduler scheduler = ReflectionUtils.newInstance(schedulerClass); } catch (Ill...
[ "public", "IScheduler", "getSchedulerInstance", "(", "Config", "config", ",", "Config", "runtime", ")", "throws", "SchedulerException", "{", "String", "schedulerClass", "=", "Context", ".", "schedulerClass", "(", "config", ")", ";", "IScheduler", "scheduler", ";", ...
Creates and initializes scheduler instance @return initialized scheduler instances
[ "Creates", "and", "initializes", "scheduler", "instance" ]
train
https://github.com/apache/incubator-heron/blob/776abe2b5a45b93a0eb957fd65cbc149d901a92a/heron/scheduler-core/src/java/org/apache/heron/scheduler/utils/LauncherUtils.java#L117-L131
ModeShape/modeshape
sequencers/modeshape-sequencer-ddl/src/main/java/org/modeshape/sequencer/ddl/datatype/DataTypeParser.java
DataTypeParser.parseExactNumericType
protected DataType parseExactNumericType( DdlTokenStream tokens ) throws ParsingException { """ Parses SQL-92 Exact numeric data types. <exact numeric type> ::= NUMERIC [ <left paren> <precision> [ <comma> <scale> ] <right paren> ] | DECIMAL [ <left paren> <precision> [ <comma> <scale> ] <right paren> ] | DEC [ <...
java
protected DataType parseExactNumericType( DdlTokenStream tokens ) throws ParsingException { DataType dataType = null; String typeName = null; if (tokens.matchesAnyOf("INTEGER", "INT", "SMALLINT")) { dataType = new DataType(); typeName = consume(tokens, dataType, false); ...
[ "protected", "DataType", "parseExactNumericType", "(", "DdlTokenStream", "tokens", ")", "throws", "ParsingException", "{", "DataType", "dataType", "=", "null", ";", "String", "typeName", "=", "null", ";", "if", "(", "tokens", ".", "matchesAnyOf", "(", "\"INTEGER\"...
Parses SQL-92 Exact numeric data types. <exact numeric type> ::= NUMERIC [ <left paren> <precision> [ <comma> <scale> ] <right paren> ] | DECIMAL [ <left paren> <precision> [ <comma> <scale> ] <right paren> ] | DEC [ <left paren> <precision> [ <comma> <scale> ] <right paren> ] | INTEGER | INT | SMALLINT @param tokens ...
[ "Parses", "SQL", "-", "92", "Exact", "numeric", "data", "types", ".", "<exact", "numeric", "type", ">", "::", "=", "NUMERIC", "[", "<left", "paren", ">", "<precision", ">", "[", "<comma", ">", "<scale", ">", "]", "<right", "paren", ">", "]", "|", "DE...
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/sequencers/modeshape-sequencer-ddl/src/main/java/org/modeshape/sequencer/ddl/datatype/DataTypeParser.java#L451-L485
elki-project/elki
elki/src/main/java/de/lmu/ifi/dbs/elki/result/LogResultStructureResultHandler.java
LogResultStructureResultHandler.recursiveLogResult
private void recursiveLogResult(StringBuilder buf, Hierarchy<Result> hier, Result result, int depth) { """ Recursively walk through the result tree. @param buf Output buffer @param result Current result @param depth Depth """ if(result == null) { buf.append("null"); LOG.warning("null resul...
java
private void recursiveLogResult(StringBuilder buf, Hierarchy<Result> hier, Result result, int depth) { if(result == null) { buf.append("null"); LOG.warning("null result!"); return; } if(depth > 50) { LOG.warning("Probably infinitely nested results, aborting!"); return; } ...
[ "private", "void", "recursiveLogResult", "(", "StringBuilder", "buf", ",", "Hierarchy", "<", "Result", ">", "hier", ",", "Result", "result", ",", "int", "depth", ")", "{", "if", "(", "result", "==", "null", ")", "{", "buf", ".", "append", "(", "\"null\""...
Recursively walk through the result tree. @param buf Output buffer @param result Current result @param depth Depth
[ "Recursively", "walk", "through", "the", "result", "tree", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki/src/main/java/de/lmu/ifi/dbs/elki/result/LogResultStructureResultHandler.java#L67-L87
googleapis/google-http-java-client
google-http-client/src/main/java/com/google/api/client/json/JsonParser.java
JsonParser.parseMap
private void parseMap( Field fieldContext, Map<String, Object> destinationMap, Type valueType, ArrayList<Type> context, CustomizeJsonParser customizeParser) throws IOException { """ Parse a JSON Object from the given JSON parser into the given destination map, optionally using ...
java
private void parseMap( Field fieldContext, Map<String, Object> destinationMap, Type valueType, ArrayList<Type> context, CustomizeJsonParser customizeParser) throws IOException { JsonToken curToken = startParsingObjectOrArray(); while (curToken == JsonToken.FIELD_NAME) { ...
[ "private", "void", "parseMap", "(", "Field", "fieldContext", ",", "Map", "<", "String", ",", "Object", ">", "destinationMap", ",", "Type", "valueType", ",", "ArrayList", "<", "Type", ">", "context", ",", "CustomizeJsonParser", "customizeParser", ")", "throws", ...
Parse a JSON Object from the given JSON parser into the given destination map, optionally using the given parser customizer. @param fieldContext field context or {@code null} for none @param destinationMap destination map @param valueType valueType of the map value type parameter @param context destination context sta...
[ "Parse", "a", "JSON", "Object", "from", "the", "given", "JSON", "parser", "into", "the", "given", "destination", "map", "optionally", "using", "the", "given", "parser", "customizer", "." ]
train
https://github.com/googleapis/google-http-java-client/blob/0988ae4e0f26a80f579b6adb2b276dd8254928de/google-http-client/src/main/java/com/google/api/client/json/JsonParser.java#L665-L685
b3dgs/lionengine
lionengine-core/src/main/java/com/b3dgs/lionengine/XmlReader.java
XmlReader.readDouble
public double readDouble(double defaultValue, String attribute) { """ Read a double. @param defaultValue The value returned if attribute not found. @param attribute The double name (must not be <code>null</code>). @return The double value. @throws LionEngineException If invalid argument. """ retu...
java
public double readDouble(double defaultValue, String attribute) { return Double.parseDouble(getValue(String.valueOf(defaultValue), attribute)); }
[ "public", "double", "readDouble", "(", "double", "defaultValue", ",", "String", "attribute", ")", "{", "return", "Double", ".", "parseDouble", "(", "getValue", "(", "String", ".", "valueOf", "(", "defaultValue", ")", ",", "attribute", ")", ")", ";", "}" ]
Read a double. @param defaultValue The value returned if attribute not found. @param attribute The double name (must not be <code>null</code>). @return The double value. @throws LionEngineException If invalid argument.
[ "Read", "a", "double", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-core/src/main/java/com/b3dgs/lionengine/XmlReader.java#L285-L288
ironjacamar/ironjacamar
validator/src/main/java/org/ironjacamar/validator/Validation.java
Validation.createManagedConnectionFactory
private static List<Validate> createManagedConnectionFactory(Connector cmd, List<Failure> failures, ResourceBundle rb, ClassLoader cl) { """ createManagedConnectionFactory @param cmd connector metadata @param failures list of failures @param rb ResourceBundle @param cl classloador @return list of val...
java
private static List<Validate> createManagedConnectionFactory(Connector cmd, List<Failure> failures, ResourceBundle rb, ClassLoader cl) { List<Validate> result = new ArrayList<Validate>(); if (cmd.getVersion() != Version.V_10 && cmd.getResourceadapter() != null && cmd.getReso...
[ "private", "static", "List", "<", "Validate", ">", "createManagedConnectionFactory", "(", "Connector", "cmd", ",", "List", "<", "Failure", ">", "failures", ",", "ResourceBundle", "rb", ",", "ClassLoader", "cl", ")", "{", "List", "<", "Validate", ">", "result",...
createManagedConnectionFactory @param cmd connector metadata @param failures list of failures @param rb ResourceBundle @param cl classloador @return list of validate objects
[ "createManagedConnectionFactory" ]
train
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/validator/src/main/java/org/ironjacamar/validator/Validation.java#L335-L376
OpenLiberty/open-liberty
dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/CacheProviderWrapper.java
CacheProviderWrapper.invalidateById
@Override public void invalidateById(Object id, int causeOfInvalidation, boolean waitOnInvalidation, boolean checkPreInvalidationListener) { """ This invalidates all entries in this Cache having a dependency on this id. @param id cache id or dependency id. @param causeOfInvalidation The cause of invalidat...
java
@Override public void invalidateById(Object id, int causeOfInvalidation, boolean waitOnInvalidation, boolean checkPreInvalidationListener) { final String methodName = "invalidateById()-1"; if (tc.isDebugEnabled()) { Tr.debug(tc, methodName + " cacheName=" + cacheName + " id=" + id); ...
[ "@", "Override", "public", "void", "invalidateById", "(", "Object", "id", ",", "int", "causeOfInvalidation", ",", "boolean", "waitOnInvalidation", ",", "boolean", "checkPreInvalidationListener", ")", "{", "final", "String", "methodName", "=", "\"invalidateById()-1\"", ...
This invalidates all entries in this Cache having a dependency on this id. @param id cache id or dependency id. @param causeOfInvalidation The cause of invalidation (No effect on CoreCache) @param waitOnInvalidation True indicates that this method should not return until the invalidations have taken effect on all cach...
[ "This", "invalidates", "all", "entries", "in", "this", "Cache", "having", "a", "dependency", "on", "this", "id", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/CacheProviderWrapper.java#L489-L497
eclipse/xtext-lib
org.eclipse.xtext.xbase.lib/src/org/eclipse/xtext/xbase/lib/IterableExtensions.java
IterableExtensions.forEach
public static <T> void forEach(Iterable<T> iterable, Procedure2<? super T, ? super Integer> procedure) { """ Applies {@code procedure} for each element of the given iterable. The procedure takes the element and a loop counter. If the counter would overflow, {@link Integer#MAX_VALUE} is returned for all subsequen...
java
public static <T> void forEach(Iterable<T> iterable, Procedure2<? super T, ? super Integer> procedure) { IteratorExtensions.forEach(iterable.iterator(), procedure); }
[ "public", "static", "<", "T", ">", "void", "forEach", "(", "Iterable", "<", "T", ">", "iterable", ",", "Procedure2", "<", "?", "super", "T", ",", "?", "super", "Integer", ">", "procedure", ")", "{", "IteratorExtensions", ".", "forEach", "(", "iterable", ...
Applies {@code procedure} for each element of the given iterable. The procedure takes the element and a loop counter. If the counter would overflow, {@link Integer#MAX_VALUE} is returned for all subsequent elements. The first element is at index zero. @param iterable the iterable. May not be <code>null</code>. @param ...
[ "Applies", "{", "@code", "procedure", "}", "for", "each", "element", "of", "the", "given", "iterable", ".", "The", "procedure", "takes", "the", "element", "and", "a", "loop", "counter", ".", "If", "the", "counter", "would", "overflow", "{", "@link", "Integ...
train
https://github.com/eclipse/xtext-lib/blob/7063572e1f1bd713a3aa53bdf3a8dc60e25c169a/org.eclipse.xtext.xbase.lib/src/org/eclipse/xtext/xbase/lib/IterableExtensions.java#L412-L414
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/mappings/BundlePathMappingBuilder.java
BundlePathMappingBuilder.asPath
private String asPath(String path, boolean generatedResource) { """ Normalizes a path and adds a separator at its start, if it's not a generated resource. @param path the path @param generatedResource the flag indicating if the resource has been generated @return the normalized path """ String resul...
java
private String asPath(String path, boolean generatedResource) { String result = path; if (!generatedResource) { result = PathNormalizer.asPath(path); } return result; }
[ "private", "String", "asPath", "(", "String", "path", ",", "boolean", "generatedResource", ")", "{", "String", "result", "=", "path", ";", "if", "(", "!", "generatedResource", ")", "{", "result", "=", "PathNormalizer", ".", "asPath", "(", "path", ")", ";",...
Normalizes a path and adds a separator at its start, if it's not a generated resource. @param path the path @param generatedResource the flag indicating if the resource has been generated @return the normalized path
[ "Normalizes", "a", "path", "and", "adds", "a", "separator", "at", "its", "start", "if", "it", "s", "not", "a", "generated", "resource", "." ]
train
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/mappings/BundlePathMappingBuilder.java#L313-L320
UrielCh/ovh-java-sdk
ovh-java-sdk-dedicatedCloud/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedCloud.java
ApiOvhDedicatedCloud.serviceName_datacenter_datacenterId_PUT
public void serviceName_datacenter_datacenterId_PUT(String serviceName, Long datacenterId, OvhDatacenter body) throws IOException { """ Alter this object properties REST: PUT /dedicatedCloud/{serviceName}/datacenter/{datacenterId} @param body [required] New object properties @param serviceName [required] Doma...
java
public void serviceName_datacenter_datacenterId_PUT(String serviceName, Long datacenterId, OvhDatacenter body) throws IOException { String qPath = "/dedicatedCloud/{serviceName}/datacenter/{datacenterId}"; StringBuilder sb = path(qPath, serviceName, datacenterId); exec(qPath, "PUT", sb.toString(), body); }
[ "public", "void", "serviceName_datacenter_datacenterId_PUT", "(", "String", "serviceName", ",", "Long", "datacenterId", ",", "OvhDatacenter", "body", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/dedicatedCloud/{serviceName}/datacenter/{datacenterId}\"", ";",...
Alter this object properties REST: PUT /dedicatedCloud/{serviceName}/datacenter/{datacenterId} @param body [required] New object properties @param serviceName [required] Domain of the service @param datacenterId [required]
[ "Alter", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dedicatedCloud/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedCloud.java#L1944-L1948
samskivert/pythagoras
src/main/java/pythagoras/d/RectangularShape.java
RectangularShape.setFrameFromDiagonal
public void setFrameFromDiagonal (XY p1, XY p2) { """ Sets the location and size of the framing rectangle of this shape based on the supplied diagonal line. """ setFrameFromDiagonal(p1.x(), p1.y(), p2.x(), p2.y()); }
java
public void setFrameFromDiagonal (XY p1, XY p2) { setFrameFromDiagonal(p1.x(), p1.y(), p2.x(), p2.y()); }
[ "public", "void", "setFrameFromDiagonal", "(", "XY", "p1", ",", "XY", "p2", ")", "{", "setFrameFromDiagonal", "(", "p1", ".", "x", "(", ")", ",", "p1", ".", "y", "(", ")", ",", "p2", ".", "x", "(", ")", ",", "p2", ".", "y", "(", ")", ")", ";"...
Sets the location and size of the framing rectangle of this shape based on the supplied diagonal line.
[ "Sets", "the", "location", "and", "size", "of", "the", "framing", "rectangle", "of", "this", "shape", "based", "on", "the", "supplied", "diagonal", "line", "." ]
train
https://github.com/samskivert/pythagoras/blob/b8fea743ee8a7d742ad9c06ee4f11f50571fbd32/src/main/java/pythagoras/d/RectangularShape.java#L60-L62
apache/fluo
modules/api/src/main/java/org/apache/fluo/api/data/Bytes.java
Bytes.contentEqualsUnchecked
private boolean contentEqualsUnchecked(byte[] bytes, int offset, int len) { """ Returns true if this Bytes object equals another. This method doesn't check it's arguments. @since 1.2.0 """ if (length != len) { return false; } return compareToUnchecked(bytes, offset, len) == 0; }
java
private boolean contentEqualsUnchecked(byte[] bytes, int offset, int len) { if (length != len) { return false; } return compareToUnchecked(bytes, offset, len) == 0; }
[ "private", "boolean", "contentEqualsUnchecked", "(", "byte", "[", "]", "bytes", ",", "int", "offset", ",", "int", "len", ")", "{", "if", "(", "length", "!=", "len", ")", "{", "return", "false", ";", "}", "return", "compareToUnchecked", "(", "bytes", ",",...
Returns true if this Bytes object equals another. This method doesn't check it's arguments. @since 1.2.0
[ "Returns", "true", "if", "this", "Bytes", "object", "equals", "another", ".", "This", "method", "doesn", "t", "check", "it", "s", "arguments", "." ]
train
https://github.com/apache/fluo/blob/8e06204d4167651e2d3b5219b8c1397644e6ba6e/modules/api/src/main/java/org/apache/fluo/api/data/Bytes.java#L308-L314
bitcoinj/bitcoinj
core/src/main/java/org/bitcoinj/script/ScriptBuilder.java
ScriptBuilder.smallNum
public ScriptBuilder smallNum(int index, int num) { """ Adds the given number as a OP_N opcode to the given index in the program. Only handles values 0-16 inclusive. @see #number(long) """ checkArgument(num >= 0, "Cannot encode negative numbers with smallNum"); checkArgument(num <= 16, "Can...
java
public ScriptBuilder smallNum(int index, int num) { checkArgument(num >= 0, "Cannot encode negative numbers with smallNum"); checkArgument(num <= 16, "Cannot encode numbers larger than 16 with smallNum"); return addChunk(index, new ScriptChunk(Script.encodeToOpN(num), null)); }
[ "public", "ScriptBuilder", "smallNum", "(", "int", "index", ",", "int", "num", ")", "{", "checkArgument", "(", "num", ">=", "0", ",", "\"Cannot encode negative numbers with smallNum\"", ")", ";", "checkArgument", "(", "num", "<=", "16", ",", "\"Cannot encode numbe...
Adds the given number as a OP_N opcode to the given index in the program. Only handles values 0-16 inclusive. @see #number(long)
[ "Adds", "the", "given", "number", "as", "a", "OP_N", "opcode", "to", "the", "given", "index", "in", "the", "program", ".", "Only", "handles", "values", "0", "-", "16", "inclusive", "." ]
train
https://github.com/bitcoinj/bitcoinj/blob/9cf13d29315014ed59cf4fc5944e5f227e8df9a6/core/src/main/java/org/bitcoinj/script/ScriptBuilder.java#L167-L171
Azure/azure-sdk-for-java
network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/NetworkInterfaceTapConfigurationsInner.java
NetworkInterfaceTapConfigurationsInner.createOrUpdate
public NetworkInterfaceTapConfigurationInner createOrUpdate(String resourceGroupName, String networkInterfaceName, String tapConfigurationName, NetworkInterfaceTapConfigurationInner tapConfigurationParameters) { """ Creates or updates a Tap configuration in the specified NetworkInterface. @param resourceGroupNa...
java
public NetworkInterfaceTapConfigurationInner createOrUpdate(String resourceGroupName, String networkInterfaceName, String tapConfigurationName, NetworkInterfaceTapConfigurationInner tapConfigurationParameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, networkInterfaceName, tapConfigurat...
[ "public", "NetworkInterfaceTapConfigurationInner", "createOrUpdate", "(", "String", "resourceGroupName", ",", "String", "networkInterfaceName", ",", "String", "tapConfigurationName", ",", "NetworkInterfaceTapConfigurationInner", "tapConfigurationParameters", ")", "{", "return", "...
Creates or updates a Tap configuration in the specified NetworkInterface. @param resourceGroupName The name of the resource group. @param networkInterfaceName The name of the network interface. @param tapConfigurationName The name of the tap configuration. @param tapConfigurationParameters Parameters supplied to the c...
[ "Creates", "or", "updates", "a", "Tap", "configuration", "in", "the", "specified", "NetworkInterface", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/NetworkInterfaceTapConfigurationsInner.java#L362-L364
OpenLiberty/open-liberty
dev/com.ibm.ws.webcontainer/src/com/ibm/wsspi/webcontainer/util/BufferedWriter.java
BufferedWriter.writeOut
protected void writeOut(String str, int offset, int len) throws IOException { """ /* Writes to the underlying stream Any changes to this method should also be made to the writeOut(char[], int, int) method """ if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { // 306998.15 ...
java
protected void writeOut(String str, int offset, int len) throws IOException { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { // 306998.15 Tr.debug(tc, "writeOut(String) --> " + len); } try { out.write(str, offset, len); ...
[ "protected", "void", "writeOut", "(", "String", "str", ",", "int", "offset", ",", "int", "len", ")", "throws", "IOException", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isDebugEnabled", "(", ")", ")", "{", "...
/* Writes to the underlying stream Any changes to this method should also be made to the writeOut(char[], int, int) method
[ "/", "*", "Writes", "to", "the", "underlying", "stream" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webcontainer/src/com/ibm/wsspi/webcontainer/util/BufferedWriter.java#L646-L679
Azure/azure-sdk-for-java
automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/ModulesInner.java
ModulesInner.createOrUpdate
public ModuleInner createOrUpdate(String resourceGroupName, String automationAccountName, String moduleName, ModuleCreateOrUpdateParameters parameters) { """ Create or Update the module identified by module name. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of...
java
public ModuleInner createOrUpdate(String resourceGroupName, String automationAccountName, String moduleName, ModuleCreateOrUpdateParameters parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, automationAccountName, moduleName, parameters).toBlocking().single().body(); }
[ "public", "ModuleInner", "createOrUpdate", "(", "String", "resourceGroupName", ",", "String", "automationAccountName", ",", "String", "moduleName", ",", "ModuleCreateOrUpdateParameters", "parameters", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", "(", "resourc...
Create or Update the module identified by module name. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automation account. @param moduleName The name of module. @param parameters The create or update parameters for module. @throws IllegalArgumentException thrown i...
[ "Create", "or", "Update", "the", "module", "identified", "by", "module", "name", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/ModulesInner.java#L286-L288
apache/reef
lang/java/reef-common/src/main/java/org/apache/reef/runtime/common/evaluator/context/ContextRuntime.java
ContextRuntime.spawnChildContext
ContextRuntime spawnChildContext( final Configuration contextConfiguration) throws ContextClientCodeException { """ Spawns a new context without services of its own. <p> The new context will have a serviceInjector that is created by forking the one in this object. The contextConfiguration is used to fork ...
java
ContextRuntime spawnChildContext( final Configuration contextConfiguration) throws ContextClientCodeException { synchronized (this.contextLifeCycle) { if (this.task.isPresent()) { throw new IllegalStateException( "Attempting to to spawn a child context while a Task with id '" + ...
[ "ContextRuntime", "spawnChildContext", "(", "final", "Configuration", "contextConfiguration", ")", "throws", "ContextClientCodeException", "{", "synchronized", "(", "this", ".", "contextLifeCycle", ")", "{", "if", "(", "this", ".", "task", ".", "isPresent", "(", ")"...
Spawns a new context without services of its own. <p> The new context will have a serviceInjector that is created by forking the one in this object. The contextConfiguration is used to fork the contextInjector from that new serviceInjector. @param contextConfiguration the new context's context (local) Configuration. @...
[ "Spawns", "a", "new", "context", "without", "services", "of", "its", "own", ".", "<p", ">", "The", "new", "context", "will", "have", "a", "serviceInjector", "that", "is", "created", "by", "forking", "the", "one", "in", "this", "object", ".", "The", "cont...
train
https://github.com/apache/reef/blob/e2c47121cde21108a602c560cf76565a40d0e916/lang/java/reef-common/src/main/java/org/apache/reef/runtime/common/evaluator/context/ContextRuntime.java#L200-L223
jeppetto/jeppetto
jeppetto-dao-mongo/src/main/java/org/iternine/jeppetto/dao/mongodb/MongoDBQueryModelDAO.java
MongoDBQueryModelDAO.buildIdCondition
private Condition buildIdCondition(Object argument) { """ Special case for 'id' queries as it maps to _id within MongoDB. """ if (argument instanceof String && ObjectId.isValid((String) argument)) { return new Condition(ID_FIELD, new ObjectId((String) argument)); } else if (Itera...
java
private Condition buildIdCondition(Object argument) { if (argument instanceof String && ObjectId.isValid((String) argument)) { return new Condition(ID_FIELD, new ObjectId((String) argument)); } else if (Iterable.class.isAssignableFrom(argument.getClass())) { List<Object> obje...
[ "private", "Condition", "buildIdCondition", "(", "Object", "argument", ")", "{", "if", "(", "argument", "instanceof", "String", "&&", "ObjectId", ".", "isValid", "(", "(", "String", ")", "argument", ")", ")", "{", "return", "new", "Condition", "(", "ID_FIELD...
Special case for 'id' queries as it maps to _id within MongoDB.
[ "Special", "case", "for", "id", "queries", "as", "it", "maps", "to", "_id", "within", "MongoDB", "." ]
train
https://github.com/jeppetto/jeppetto/blob/bd2796dcf53376052f590e727931990a2902a933/jeppetto-dao-mongo/src/main/java/org/iternine/jeppetto/dao/mongodb/MongoDBQueryModelDAO.java#L1041-L1060
couchbase/couchbase-jvm-core
src/main/java/com/couchbase/client/core/config/refresher/CarrierRefresher.java
CarrierRefresher.isValidCarrierNode
private static boolean isValidCarrierNode(final boolean sslEnabled, final NodeInfo nodeInfo) { """ Helper method to detect if the given node can actually perform carrier refresh. @param sslEnabled true if ssl enabled, false otherwise. @param nodeInfo the node info for the given node. @return true if it is a v...
java
private static boolean isValidCarrierNode(final boolean sslEnabled, final NodeInfo nodeInfo) { if (sslEnabled && nodeInfo.sslServices().containsKey(ServiceType.BINARY)) { return true; } else if (nodeInfo.services().containsKey(ServiceType.BINARY)) { return true; } ...
[ "private", "static", "boolean", "isValidCarrierNode", "(", "final", "boolean", "sslEnabled", ",", "final", "NodeInfo", "nodeInfo", ")", "{", "if", "(", "sslEnabled", "&&", "nodeInfo", ".", "sslServices", "(", ")", ".", "containsKey", "(", "ServiceType", ".", "...
Helper method to detect if the given node can actually perform carrier refresh. @param sslEnabled true if ssl enabled, false otherwise. @param nodeInfo the node info for the given node. @return true if it is a valid carrier node, false otherwise.
[ "Helper", "method", "to", "detect", "if", "the", "given", "node", "can", "actually", "perform", "carrier", "refresh", "." ]
train
https://github.com/couchbase/couchbase-jvm-core/blob/97f0427112c2168fee1d6499904f5fa0e24c6797/src/main/java/com/couchbase/client/core/config/refresher/CarrierRefresher.java#L309-L316
Jasig/uPortal
uPortal-rendering/src/main/java/org/apereo/portal/url/UrlSyntaxProviderImpl.java
UrlSyntaxProviderImpl.determineUrlState
protected UrlState determineUrlState( final IPortletWindow portletWindow, final IPortletUrlBuilder targetedPortletUrlBuilder) { """ Determine the {@link UrlState} to use for the targeted portlet window """ final WindowState requestedWindowState; if (targetedPortletUrlBui...
java
protected UrlState determineUrlState( final IPortletWindow portletWindow, final IPortletUrlBuilder targetedPortletUrlBuilder) { final WindowState requestedWindowState; if (targetedPortletUrlBuilder == null) { requestedWindowState = null; } else { r...
[ "protected", "UrlState", "determineUrlState", "(", "final", "IPortletWindow", "portletWindow", ",", "final", "IPortletUrlBuilder", "targetedPortletUrlBuilder", ")", "{", "final", "WindowState", "requestedWindowState", ";", "if", "(", "targetedPortletUrlBuilder", "==", "null...
Determine the {@link UrlState} to use for the targeted portlet window
[ "Determine", "the", "{" ]
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-rendering/src/main/java/org/apereo/portal/url/UrlSyntaxProviderImpl.java#L1402-L1413
wisdom-framework/wisdom
core/wisdom-maven-plugin/src/main/java/org/wisdom/maven/utils/DependencyFinder.java
DependencyFinder.getArtifactFile
public static File getArtifactFile(AbstractWisdomMojo mojo, String artifactId, String type) { """ Gets the file of the dependency with the given artifact id from the project dependencies and if not found from the plugin dependencies. This method also check the extension. @param mojo the mojo @param arti...
java
public static File getArtifactFile(AbstractWisdomMojo mojo, String artifactId, String type) { File file = getArtifactFileFromProjectDependencies(mojo, artifactId, type); if (file == null) { file = getArtifactFileFromPluginDependencies(mojo, artifactId, type); } return file; ...
[ "public", "static", "File", "getArtifactFile", "(", "AbstractWisdomMojo", "mojo", ",", "String", "artifactId", ",", "String", "type", ")", "{", "File", "file", "=", "getArtifactFileFromProjectDependencies", "(", "mojo", ",", "artifactId", ",", "type", ")", ";", ...
Gets the file of the dependency with the given artifact id from the project dependencies and if not found from the plugin dependencies. This method also check the extension. @param mojo the mojo @param artifactId the name of the artifact to find @param type the extension of the artifact to find @return the arti...
[ "Gets", "the", "file", "of", "the", "dependency", "with", "the", "given", "artifact", "id", "from", "the", "project", "dependencies", "and", "if", "not", "found", "from", "the", "plugin", "dependencies", ".", "This", "method", "also", "check", "the", "extens...
train
https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/core/wisdom-maven-plugin/src/main/java/org/wisdom/maven/utils/DependencyFinder.java#L97-L103
apache/groovy
src/main/java/org/apache/groovy/ast/tools/ClassNodeUtils.java
ClassNodeUtils.addGeneratedConstructor
public static ConstructorNode addGeneratedConstructor(ClassNode classNode, int modifiers, Parameter[] parameters, ClassNode[] exceptions, Statement code) { """ Add a method that is marked as @Generated. @see ClassNode#addConstructor(int, Parameter[], ClassNode[], Statement) """ ConstructorNode consN...
java
public static ConstructorNode addGeneratedConstructor(ClassNode classNode, int modifiers, Parameter[] parameters, ClassNode[] exceptions, Statement code) { ConstructorNode consNode = classNode.addConstructor(modifiers, parameters, exceptions, code); markAsGenerated(classNode, consNode); return c...
[ "public", "static", "ConstructorNode", "addGeneratedConstructor", "(", "ClassNode", "classNode", ",", "int", "modifiers", ",", "Parameter", "[", "]", "parameters", ",", "ClassNode", "[", "]", "exceptions", ",", "Statement", "code", ")", "{", "ConstructorNode", "co...
Add a method that is marked as @Generated. @see ClassNode#addConstructor(int, Parameter[], ClassNode[], Statement)
[ "Add", "a", "method", "that", "is", "marked", "as", "@Generated", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/apache/groovy/ast/tools/ClassNodeUtils.java#L121-L125
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/customvision/training/src/main/java/com/microsoft/azure/cognitiveservices/vision/customvision/training/implementation/TrainingsImpl.java
TrainingsImpl.getImagesByIdsAsync
public Observable<List<Image>> getImagesByIdsAsync(UUID projectId, GetImagesByIdsOptionalParameter getImagesByIdsOptionalParameter) { """ Get images by id for a given project iteration. This API will return a set of Images for the specified tags and optionally iteration. If no iteration is specified the current ...
java
public Observable<List<Image>> getImagesByIdsAsync(UUID projectId, GetImagesByIdsOptionalParameter getImagesByIdsOptionalParameter) { return getImagesByIdsWithServiceResponseAsync(projectId, getImagesByIdsOptionalParameter).map(new Func1<ServiceResponse<List<Image>>, List<Image>>() { @Override ...
[ "public", "Observable", "<", "List", "<", "Image", ">", ">", "getImagesByIdsAsync", "(", "UUID", "projectId", ",", "GetImagesByIdsOptionalParameter", "getImagesByIdsOptionalParameter", ")", "{", "return", "getImagesByIdsWithServiceResponseAsync", "(", "projectId", ",", "g...
Get images by id for a given project iteration. This API will return a set of Images for the specified tags and optionally iteration. If no iteration is specified the current workspace is used. @param projectId The project id @param getImagesByIdsOptionalParameter the object representing the optional parameters to be ...
[ "Get", "images", "by", "id", "for", "a", "given", "project", "iteration", ".", "This", "API", "will", "return", "a", "set", "of", "Images", "for", "the", "specified", "tags", "and", "optionally", "iteration", ".", "If", "no", "iteration", "is", "specified"...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/customvision/training/src/main/java/com/microsoft/azure/cognitiveservices/vision/customvision/training/implementation/TrainingsImpl.java#L4312-L4319
cfg4j/cfg4j
cfg4j-core/src/main/java/org/cfg4j/source/context/propertiesprovider/PropertyBasedPropertiesProvider.java
PropertyBasedPropertiesProvider.getProperties
@Override public Properties getProperties(InputStream inputStream) { """ Get {@link Properties} for a given {@code inputStream} treating it as a properties file. @param inputStream input stream representing properties file @return properties representing values from {@code inputStream} @throws IllegalStateE...
java
@Override public Properties getProperties(InputStream inputStream) { Properties properties = new Properties(); try { properties.load(inputStream); } catch (IOException | IllegalArgumentException e) { throw new IllegalStateException("Unable to load properties from provided stream", e); } ...
[ "@", "Override", "public", "Properties", "getProperties", "(", "InputStream", "inputStream", ")", "{", "Properties", "properties", "=", "new", "Properties", "(", ")", ";", "try", "{", "properties", ".", "load", "(", "inputStream", ")", ";", "}", "catch", "("...
Get {@link Properties} for a given {@code inputStream} treating it as a properties file. @param inputStream input stream representing properties file @return properties representing values from {@code inputStream} @throws IllegalStateException when unable to read properties
[ "Get", "{", "@link", "Properties", "}", "for", "a", "given", "{", "@code", "inputStream", "}", "treating", "it", "as", "a", "properties", "file", "." ]
train
https://github.com/cfg4j/cfg4j/blob/47d4f63e5fc820c62631e557adc34a29d8ab396d/cfg4j-core/src/main/java/org/cfg4j/source/context/propertiesprovider/PropertyBasedPropertiesProvider.java#L35-L46
wisdom-framework/wisdom
core/content-manager/src/main/java/org/wisdom/content/jackson/JacksonSingleton.java
JacksonSingleton.toJsonP
public String toJsonP(final String callback, final Object data) { """ Gets the JSONP response for the given callback and value. @param callback the callback name @param data the data to transform to json @return the String built as follows: "callback(json(data))" """ synchronized (lock) { ...
java
public String toJsonP(final String callback, final Object data) { synchronized (lock) { try { return callback + "(" + stringify((JsonNode) mapper.valueToTree(data)) + ");"; } catch (Exception e) { throw new RuntimeException(e); } } ...
[ "public", "String", "toJsonP", "(", "final", "String", "callback", ",", "final", "Object", "data", ")", "{", "synchronized", "(", "lock", ")", "{", "try", "{", "return", "callback", "+", "\"(\"", "+", "stringify", "(", "(", "JsonNode", ")", "mapper", "."...
Gets the JSONP response for the given callback and value. @param callback the callback name @param data the data to transform to json @return the String built as follows: "callback(json(data))"
[ "Gets", "the", "JSONP", "response", "for", "the", "given", "callback", "and", "value", "." ]
train
https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/core/content-manager/src/main/java/org/wisdom/content/jackson/JacksonSingleton.java#L154-L162
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/XSLTAttributeDef.java
XSLTAttributeDef.processAVT_QNAME
Object processAVT_QNAME( StylesheetHandler handler, String uri, String name, String rawName, String value, ElemTemplateElement owner) throws org.xml.sax.SAXException { """ Process an attribute string of type T_QNAME into a QName value. @param handler non-null reference to current Styleshee...
java
Object processAVT_QNAME( StylesheetHandler handler, String uri, String name, String rawName, String value, ElemTemplateElement owner) throws org.xml.sax.SAXException { AVT avt = null; try { avt = new AVT(handler, uri, name, rawName, value, owner); /...
[ "Object", "processAVT_QNAME", "(", "StylesheetHandler", "handler", ",", "String", "uri", ",", "String", "name", ",", "String", "rawName", ",", "String", "value", ",", "ElemTemplateElement", "owner", ")", "throws", "org", ".", "xml", ".", "sax", ".", "SAXExcept...
Process an attribute string of type T_QNAME into a QName value. @param handler non-null reference to current StylesheetHandler that is constructing the Templates. @param uri The Namespace URI, or an empty string. @param name The local name (without prefix), or empty string if not namespace processing. @param rawName T...
[ "Process", "an", "attribute", "string", "of", "type", "T_QNAME", "into", "a", "QName", "value", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/XSLTAttributeDef.java#L969-L1012
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/Hdf5Archive.java
Hdf5Archive.getGroups
public List<String> getGroups(String... groups) { """ Get list of groups from group path. @param groups Array of zero or more ancestor groups from root to parent. @return List of HDF5 groups """ synchronized (Hdf5Archive.LOCK_OBJECT) { if (groups.length == 0) return getO...
java
public List<String> getGroups(String... groups) { synchronized (Hdf5Archive.LOCK_OBJECT) { if (groups.length == 0) return getObjects(this.file, H5O_TYPE_GROUP); Group[] groupArray = openGroups(groups); List<String> ls = getObjects(groupArray[groupArray.length ...
[ "public", "List", "<", "String", ">", "getGroups", "(", "String", "...", "groups", ")", "{", "synchronized", "(", "Hdf5Archive", ".", "LOCK_OBJECT", ")", "{", "if", "(", "groups", ".", "length", "==", "0", ")", "return", "getObjects", "(", "this", ".", ...
Get list of groups from group path. @param groups Array of zero or more ancestor groups from root to parent. @return List of HDF5 groups
[ "Get", "list", "of", "groups", "from", "group", "path", "." ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/Hdf5Archive.java#L211-L220
alibaba/Tangram-Android
tangram/src/main/java/com/tmall/wireless/tangram/core/adapter/GroupBasicAdapter.java
GroupBasicAdapter.replaceGroup
public void replaceGroup(int replaced, @Nullable List<L> groups) { """ replace group in position replaced with new groups @param replaced index that will be replaced @param groups new groups """ if (replaced < 0 || replaced >= mCards.size() || groups == null || groups.size() == 0) //...
java
public void replaceGroup(int replaced, @Nullable List<L> groups) { if (replaced < 0 || replaced >= mCards.size() || groups == null || groups.size() == 0) // invalid index return; List<L> cards = getGroups(); boolean changed = cards.addAll(replaced + 1, groups); ...
[ "public", "void", "replaceGroup", "(", "int", "replaced", ",", "@", "Nullable", "List", "<", "L", ">", "groups", ")", "{", "if", "(", "replaced", "<", "0", "||", "replaced", ">=", "mCards", ".", "size", "(", ")", "||", "groups", "==", "null", "||", ...
replace group in position replaced with new groups @param replaced index that will be replaced @param groups new groups
[ "replace", "group", "in", "position", "replaced", "with", "new", "groups" ]
train
https://github.com/alibaba/Tangram-Android/blob/caa57f54e009c8dacd34a2322d5761956ebed321/tangram/src/main/java/com/tmall/wireless/tangram/core/adapter/GroupBasicAdapter.java#L521-L535
alipay/sofa-hessian
src/main/java/com/caucho/hessian/io/HessianOutput.java
HessianOutput.writeListBegin
public boolean writeListBegin(int length, String type) throws IOException { """ Writes the list header to the stream. List writers will call <code>writeListBegin</code> followed by the list contents and then call <code>writeListEnd</code>. <code><pre> V t b16 b8 type l b32 b24 b16 b8 </pre></code...
java
public boolean writeListBegin(int length, String type) throws IOException { os.write('V'); if (type != null) { os.write('t'); printLenString(type); } if (length >= 0) { os.write('l'); os.write(length >> 24); os.wri...
[ "public", "boolean", "writeListBegin", "(", "int", "length", ",", "String", "type", ")", "throws", "IOException", "{", "os", ".", "write", "(", "'", "'", ")", ";", "if", "(", "type", "!=", "null", ")", "{", "os", ".", "write", "(", "'", "'", ")", ...
Writes the list header to the stream. List writers will call <code>writeListBegin</code> followed by the list contents and then call <code>writeListEnd</code>. <code><pre> V t b16 b8 type l b32 b24 b16 b8 </pre></code>
[ "Writes", "the", "list", "header", "to", "the", "stream", ".", "List", "writers", "will", "call", "<code", ">", "writeListBegin<", "/", "code", ">", "followed", "by", "the", "list", "contents", "and", "then", "call", "<code", ">", "writeListEnd<", "/", "co...
train
https://github.com/alipay/sofa-hessian/blob/89e4f5af28602101dab7b498995018871616357b/src/main/java/com/caucho/hessian/io/HessianOutput.java#L338-L357
h2oai/h2o-3
h2o-automl/src/main/java/ai/h2o/automl/AutoML.java
AutoML.startAutoML
public static void startAutoML(AutoML aml) { """ Takes in an AutoML instance and starts running it. Progress can be tracked via its job(). @param aml @return """ // Currently AutoML can only run one job at a time if (aml.job == null || !aml.job.isRunning()) { H2OJob j = new H2OJob(aml, aml._key...
java
public static void startAutoML(AutoML aml) { // Currently AutoML can only run one job at a time if (aml.job == null || !aml.job.isRunning()) { H2OJob j = new H2OJob(aml, aml._key, aml.runCountdown.remainingTime()); aml.job = j._job; j.start(aml.workAllocations.remainingWork()); DKV.put(a...
[ "public", "static", "void", "startAutoML", "(", "AutoML", "aml", ")", "{", "// Currently AutoML can only run one job at a time", "if", "(", "aml", ".", "job", "==", "null", "||", "!", "aml", ".", "job", ".", "isRunning", "(", ")", ")", "{", "H2OJob", "j", ...
Takes in an AutoML instance and starts running it. Progress can be tracked via its job(). @param aml @return
[ "Takes", "in", "an", "AutoML", "instance", "and", "starts", "running", "it", ".", "Progress", "can", "be", "tracked", "via", "its", "job", "()", "." ]
train
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-automl/src/main/java/ai/h2o/automl/AutoML.java#L166-L174
Azure/azure-sdk-for-java
iothub/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/iothub/v2018_04_01/implementation/CertificatesInner.java
CertificatesInner.listByIotHub
public CertificateListDescriptionInner listByIotHub(String resourceGroupName, String resourceName) { """ Get the certificate list. Returns the list of certificates. @param resourceGroupName The name of the resource group that contains the IoT hub. @param resourceName The name of the IoT hub. @throws IllegalA...
java
public CertificateListDescriptionInner listByIotHub(String resourceGroupName, String resourceName) { return listByIotHubWithServiceResponseAsync(resourceGroupName, resourceName).toBlocking().single().body(); }
[ "public", "CertificateListDescriptionInner", "listByIotHub", "(", "String", "resourceGroupName", ",", "String", "resourceName", ")", "{", "return", "listByIotHubWithServiceResponseAsync", "(", "resourceGroupName", ",", "resourceName", ")", ".", "toBlocking", "(", ")", "."...
Get the certificate list. Returns the list of certificates. @param resourceGroupName The name of the resource group that contains the IoT hub. @param resourceName The name of the IoT hub. @throws IllegalArgumentException thrown if parameters fail the validation @throws ErrorDetailsException thrown if the request is re...
[ "Get", "the", "certificate", "list", ".", "Returns", "the", "list", "of", "certificates", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/iothub/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/iothub/v2018_04_01/implementation/CertificatesInner.java#L97-L99
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCResultSet.java
JDBCResultSet.getBlob
public Blob getBlob(int columnIndex) throws SQLException { """ <!-- start generic documentation --> Retrieves the value of the designated column in the current row of this <code>ResultSet</code> object as a <code>Blob</code> object in the Java programming language. <!-- end generic documentation --> <!-- st...
java
public Blob getBlob(int columnIndex) throws SQLException { Object o = getObject(columnIndex); if (o == null) { return null; } if (o instanceof BlobDataID) { return new JDBCBlobClient(session, (BlobDataID) o); } else if (o instanceof Blob) { ...
[ "public", "Blob", "getBlob", "(", "int", "columnIndex", ")", "throws", "SQLException", "{", "Object", "o", "=", "getObject", "(", "columnIndex", ")", ";", "if", "(", "o", "==", "null", ")", "{", "return", "null", ";", "}", "if", "(", "o", "instanceof",...
<!-- start generic documentation --> Retrieves the value of the designated column in the current row of this <code>ResultSet</code> object as a <code>Blob</code> object in the Java programming language. <!-- end generic documentation --> <!-- start release-specific documentation --> <div class="ReleaseSpecificDocument...
[ "<!", "--", "start", "generic", "documentation", "--", ">", "Retrieves", "the", "value", "of", "the", "designated", "column", "in", "the", "current", "row", "of", "this", "<code", ">", "ResultSet<", "/", "code", ">", "object", "as", "a", "<code", ">", "B...
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCResultSet.java#L4218-L4237
google/error-prone-javac
src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/SerializedFormBuilder.java
SerializedFormBuilder.buildSerializableFields
public void buildSerializableFields(XMLNode node, Content classContentTree) { """ Build the summaries for the fields that belong to the given class. @param node the XML element that specifies which components to document @param classContentTree content tree to which the documentation will be added """ ...
java
public void buildSerializableFields(XMLNode node, Content classContentTree) { MemberDoc[] members = currentClass.serializableFields(); int membersLength = members.length; if (membersLength > 0) { Content serializableFieldsTree = fieldWriter.getSerializableFieldsHeader(); ...
[ "public", "void", "buildSerializableFields", "(", "XMLNode", "node", ",", "Content", "classContentTree", ")", "{", "MemberDoc", "[", "]", "members", "=", "currentClass", ".", "serializableFields", "(", ")", ";", "int", "membersLength", "=", "members", ".", "leng...
Build the summaries for the fields that belong to the given class. @param node the XML element that specifies which components to document @param classContentTree content tree to which the documentation will be added
[ "Build", "the", "summaries", "for", "the", "fields", "that", "belong", "to", "the", "given", "class", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/SerializedFormBuilder.java#L412-L433
Jasig/uPortal
uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/RDBMEntityGroupStore.java
RDBMEntityGroupStore.updateMembers
@Override public void updateMembers(IEntityGroup eg) throws GroupsException { """ Insert and delete group membership rows inside a transaction. @param eg IEntityGroup """ Connection conn = null; EntityGroupImpl egi = (EntityGroupImpl) eg; if (egi.isDirty()) try { ...
java
@Override public void updateMembers(IEntityGroup eg) throws GroupsException { Connection conn = null; EntityGroupImpl egi = (EntityGroupImpl) eg; if (egi.isDirty()) try { conn = RDBMServices.getConnection(); setAutoCommit(conn, false); ...
[ "@", "Override", "public", "void", "updateMembers", "(", "IEntityGroup", "eg", ")", "throws", "GroupsException", "{", "Connection", "conn", "=", "null", ";", "EntityGroupImpl", "egi", "=", "(", "EntityGroupImpl", ")", "eg", ";", "if", "(", "egi", ".", "isDir...
Insert and delete group membership rows inside a transaction. @param eg IEntityGroup
[ "Insert", "and", "delete", "group", "membership", "rows", "inside", "a", "transaction", "." ]
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/RDBMEntityGroupStore.java#L1496-L1525
bozaro/git-lfs-java
gitlfs-pointer/src/main/java/ru/bozaro/gitlfs/pointer/Pointer.java
Pointer.parsePointer
@Nullable public static Map<String, String> parsePointer(@NotNull byte[] blob) { """ Read pointer data. @param blob Blob data. @return Return pointer info or null if blob is not a pointer data. """ return parsePointer(blob, 0, blob.length); }
java
@Nullable public static Map<String, String> parsePointer(@NotNull byte[] blob) { return parsePointer(blob, 0, blob.length); }
[ "@", "Nullable", "public", "static", "Map", "<", "String", ",", "String", ">", "parsePointer", "(", "@", "NotNull", "byte", "[", "]", "blob", ")", "{", "return", "parsePointer", "(", "blob", ",", "0", ",", "blob", ".", "length", ")", ";", "}" ]
Read pointer data. @param blob Blob data. @return Return pointer info or null if blob is not a pointer data.
[ "Read", "pointer", "data", "." ]
train
https://github.com/bozaro/git-lfs-java/blob/ee05bf0472ee61bf362cf93d283e5ee5d44ef685/gitlfs-pointer/src/main/java/ru/bozaro/gitlfs/pointer/Pointer.java#L111-L114
bitcoinj/bitcoinj
core/src/main/java/org/bitcoinj/script/ScriptBuilder.java
ScriptBuilder.createInputScript
public static Script createInputScript(@Nullable TransactionSignature signature, ECKey pubKey) { """ Creates a scriptSig that can redeem a P2PKH output. If given signature is null, incomplete scriptSig will be created with OP_0 instead of signature """ byte[] pubkeyBytes = pubKey.getPubKey(); ...
java
public static Script createInputScript(@Nullable TransactionSignature signature, ECKey pubKey) { byte[] pubkeyBytes = pubKey.getPubKey(); byte[] sigBytes = signature != null ? signature.encodeToBitcoin() : new byte[]{}; return new ScriptBuilder().data(sigBytes).data(pubkeyBytes).build(); }
[ "public", "static", "Script", "createInputScript", "(", "@", "Nullable", "TransactionSignature", "signature", ",", "ECKey", "pubKey", ")", "{", "byte", "[", "]", "pubkeyBytes", "=", "pubKey", ".", "getPubKey", "(", ")", ";", "byte", "[", "]", "sigBytes", "="...
Creates a scriptSig that can redeem a P2PKH output. If given signature is null, incomplete scriptSig will be created with OP_0 instead of signature
[ "Creates", "a", "scriptSig", "that", "can", "redeem", "a", "P2PKH", "output", ".", "If", "given", "signature", "is", "null", "incomplete", "scriptSig", "will", "be", "created", "with", "OP_0", "instead", "of", "signature" ]
train
https://github.com/bitcoinj/bitcoinj/blob/9cf13d29315014ed59cf4fc5944e5f227e8df9a6/core/src/main/java/org/bitcoinj/script/ScriptBuilder.java#L288-L292
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/query/NodeSequence.java
NodeSequence.withNodeKeys
public static NodeSequence withNodeKeys( final Iterator<NodeKey> keys, final long keyCount, final float score, final String workspaceName, f...
java
public static NodeSequence withNodeKeys( final Iterator<NodeKey> keys, final long keyCount, final float score, final String workspaceName, f...
[ "public", "static", "NodeSequence", "withNodeKeys", "(", "final", "Iterator", "<", "NodeKey", ">", "keys", ",", "final", "long", "keyCount", ",", "final", "float", "score", ",", "final", "String", "workspaceName", ",", "final", "NodeCache", "cache", ")", "{", ...
Create a sequence of nodes that iterates over the supplied node keys. Note that the supplied iterator is accessed lazily as the resulting sequence's {@link #nextBatch() first batch} is {@link Batch#nextRow() used}. @param keys the iterator over the keys of the node keys to be returned; if null, an {@link #emptySequenc...
[ "Create", "a", "sequence", "of", "nodes", "that", "iterates", "over", "the", "supplied", "node", "keys", ".", "Note", "that", "the", "supplied", "iterator", "is", "accessed", "lazily", "as", "the", "resulting", "sequence", "s", "{", "@link", "#nextBatch", "(...
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/query/NodeSequence.java#L601-L609
zk1931/jzab
src/main/java/com/github/zk1931/jzab/FileUtils.java
FileUtils.readLongFromFile
public static long readLongFromFile(File file) throws IOException { """ Reads a long integer from a file that was created by the {@link #writeLongToFile(long, File) writeIntToFile} method. @param file file to read the integer value from. @return the long integer value in the file @throws IOException if an I/...
java
public static long readLongFromFile(File file) throws IOException { try (FileInputStream fis = new FileInputStream(file); BufferedReader br = new BufferedReader( new InputStreamReader(fis, Charset.forName("UTF-8")))) { long value = Long.parseLong(br.readLine()); return value; } ...
[ "public", "static", "long", "readLongFromFile", "(", "File", "file", ")", "throws", "IOException", "{", "try", "(", "FileInputStream", "fis", "=", "new", "FileInputStream", "(", "file", ")", ";", "BufferedReader", "br", "=", "new", "BufferedReader", "(", "new"...
Reads a long integer from a file that was created by the {@link #writeLongToFile(long, File) writeIntToFile} method. @param file file to read the integer value from. @return the long integer value in the file @throws IOException if an I/O error occurs.
[ "Reads", "a", "long", "integer", "from", "a", "file", "that", "was", "created", "by", "the", "{", "@link", "#writeLongToFile", "(", "long", "File", ")", "writeIntToFile", "}", "method", "." ]
train
https://github.com/zk1931/jzab/blob/2a8893bcc1a125f3aebdaddee80ad49c9761bba1/src/main/java/com/github/zk1931/jzab/FileUtils.java#L83-L90
cdk/cdk
base/standard/src/main/java/org/openscience/cdk/tools/manipulator/ChemModelManipulator.java
ChemModelManipulator.removeElectronContainer
public static void removeElectronContainer(IChemModel chemModel, IElectronContainer electrons) { """ Remove an ElectronContainer from all AtomContainers inside an IChemModel. @param chemModel The IChemModel object. @param electrons The ElectronContainer to remove. """ ICrystal crystal = chemMode...
java
public static void removeElectronContainer(IChemModel chemModel, IElectronContainer electrons) { ICrystal crystal = chemModel.getCrystal(); if (crystal != null) { if (crystal.contains(electrons)) { crystal.removeElectronContainer(electrons); } return; ...
[ "public", "static", "void", "removeElectronContainer", "(", "IChemModel", "chemModel", ",", "IElectronContainer", "electrons", ")", "{", "ICrystal", "crystal", "=", "chemModel", ".", "getCrystal", "(", ")", ";", "if", "(", "crystal", "!=", "null", ")", "{", "i...
Remove an ElectronContainer from all AtomContainers inside an IChemModel. @param chemModel The IChemModel object. @param electrons The ElectronContainer to remove.
[ "Remove", "an", "ElectronContainer", "from", "all", "AtomContainers", "inside", "an", "IChemModel", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/tools/manipulator/ChemModelManipulator.java#L135-L151
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/Normalizer.java
Normalizer.isNormalized
@Deprecated public static boolean isNormalized(int char32, Mode mode,int options) { """ Convenience Method @param char32 the input code point to be checked to see if it is normalized @param mode the normalization mode @param options Options for use with exclusion set and tailored Normalization T...
java
@Deprecated public static boolean isNormalized(int char32, Mode mode,int options) { return isNormalized(UTF16.valueOf(char32), mode, options); }
[ "@", "Deprecated", "public", "static", "boolean", "isNormalized", "(", "int", "char32", ",", "Mode", "mode", ",", "int", "options", ")", "{", "return", "isNormalized", "(", "UTF16", ".", "valueOf", "(", "char32", ")", ",", "mode", ",", "options", ")", ";...
Convenience Method @param char32 the input code point to be checked to see if it is normalized @param mode the normalization mode @param options Options for use with exclusion set and tailored Normalization The only option that is currently recognized is UNICODE_3_2 @see #isNormalized @deprecated ICU 56 Use ...
[ "Convenience", "Method", "@param", "char32", "the", "input", "code", "point", "to", "be", "checked", "to", "see", "if", "it", "is", "normalized", "@param", "mode", "the", "normalization", "mode", "@param", "options", "Options", "for", "use", "with", "exclusion...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/Normalizer.java#L1127-L1130
JavaMoney/jsr354-api
src/main/java/javax/money/CurrencyQueryBuilder.java
CurrencyQueryBuilder.setCountries
public CurrencyQueryBuilder setCountries(Locale... countries) { """ Sets the country for which currencies should be requested. @param countries The ISO countries. @return the query for chaining. """ return set(CurrencyQuery.KEY_QUERY_COUNTRIES, Arrays.asList(countries)); }
java
public CurrencyQueryBuilder setCountries(Locale... countries) { return set(CurrencyQuery.KEY_QUERY_COUNTRIES, Arrays.asList(countries)); }
[ "public", "CurrencyQueryBuilder", "setCountries", "(", "Locale", "...", "countries", ")", "{", "return", "set", "(", "CurrencyQuery", ".", "KEY_QUERY_COUNTRIES", ",", "Arrays", ".", "asList", "(", "countries", ")", ")", ";", "}" ]
Sets the country for which currencies should be requested. @param countries The ISO countries. @return the query for chaining.
[ "Sets", "the", "country", "for", "which", "currencies", "should", "be", "requested", "." ]
train
https://github.com/JavaMoney/jsr354-api/blob/49a7ae436eaf45cac1040879185531ef22de5525/src/main/java/javax/money/CurrencyQueryBuilder.java#L58-L60
VoltDB/voltdb
src/frontend/org/voltcore/utils/ssl/SSLConfiguration.java
SSLConfiguration.createKeyManagers
private static KeyManagerFactory createKeyManagers(String filepath, String keystorePassword, String keyPassword) throws FileNotFoundException, KeyStoreException, IOException, NoSuchAlgorithmException, CertificateException, UnrecoverableKeyException { """ Creates the key managers required to initiate th...
java
private static KeyManagerFactory createKeyManagers(String filepath, String keystorePassword, String keyPassword) throws FileNotFoundException, KeyStoreException, IOException, NoSuchAlgorithmException, CertificateException, UnrecoverableKeyException { KeyStore keyStore = KeyStore.getInstance("JKS"); ...
[ "private", "static", "KeyManagerFactory", "createKeyManagers", "(", "String", "filepath", ",", "String", "keystorePassword", ",", "String", "keyPassword", ")", "throws", "FileNotFoundException", ",", "KeyStoreException", ",", "IOException", ",", "NoSuchAlgorithmException", ...
Creates the key managers required to initiate the {@link SSLContext}, using a JKS keystore as an input. @param filepath - the path to the JKS keystore. @param keystorePassword - the keystore's password. @param keyPassword - the key's passsword. @return {@link KeyManager} array that will be used to initiate the {@link ...
[ "Creates", "the", "key", "managers", "required", "to", "initiate", "the", "{", "@link", "SSLContext", "}", "using", "a", "JKS", "keystore", "as", "an", "input", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/utils/ssl/SSLConfiguration.java#L132-L141
bartprokop/rxtx
src/main/java/gnu/io/RXTXPort.java
RXTXPort.staticSetSerialPortParams
public static void staticSetSerialPortParams(String f, int b, int d, int s, int p) throws UnsupportedCommOperationException { """ Extension to CommAPI This is an extension to CommAPI. It may not be supported on all operating systems. Set the SerialPort parameters 1.5 stop bits requires 5 databits @param f f...
java
public static void staticSetSerialPortParams(String f, int b, int d, int s, int p) throws UnsupportedCommOperationException { logger.fine( "RXTXPort:staticSetSerialPortParams( " + f + " " + b + " " + d + " " + s + " " + p); nativeStaticSetSerialPortParams(f, b, d, s, p);...
[ "public", "static", "void", "staticSetSerialPortParams", "(", "String", "f", ",", "int", "b", ",", "int", "d", ",", "int", "s", ",", "int", "p", ")", "throws", "UnsupportedCommOperationException", "{", "logger", ".", "fine", "(", "\"RXTXPort:staticSetSerialPortP...
Extension to CommAPI This is an extension to CommAPI. It may not be supported on all operating systems. Set the SerialPort parameters 1.5 stop bits requires 5 databits @param f filename @param b baudrate @param d databits @param s stopbits @param p parity @throws UnsupportedCommOperationException on error @see gnu.i...
[ "Extension", "to", "CommAPI", "This", "is", "an", "extension", "to", "CommAPI", ".", "It", "may", "not", "be", "supported", "on", "all", "operating", "systems", "." ]
train
https://github.com/bartprokop/rxtx/blob/7b2c7857c262743e9dd15e9779c880b93c650890/src/main/java/gnu/io/RXTXPort.java#L1721-L1727
wmdietl/jsr308-langtools
src/share/classes/com/sun/tools/doclets/formats/html/PackageIndexWriter.java
PackageIndexWriter.addPackagesList
protected void addPackagesList(PackageDoc[] packages, Content tbody) { """ Adds list of packages in the index table. Generate link to each package. @param packages Packages to which link is to be generated @param tbody the documentation tree to which the list will be added """ for (int i = 0; i < p...
java
protected void addPackagesList(PackageDoc[] packages, Content tbody) { for (int i = 0; i < packages.length; i++) { if (packages[i] != null && packages[i].name().length() > 0) { if (configuration.nodeprecated && Util.isDeprecated(packages[i])) continue; ...
[ "protected", "void", "addPackagesList", "(", "PackageDoc", "[", "]", "packages", ",", "Content", "tbody", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "packages", ".", "length", ";", "i", "++", ")", "{", "if", "(", "packages", "[", "i...
Adds list of packages in the index table. Generate link to each package. @param packages Packages to which link is to be generated @param tbody the documentation tree to which the list will be added
[ "Adds", "list", "of", "packages", "in", "the", "index", "table", ".", "Generate", "link", "to", "each", "package", "." ]
train
https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/doclets/formats/html/PackageIndexWriter.java#L168-L188
alibaba/jstorm
jstorm-core/src/main/java/com/alibaba/jstorm/utils/JStormUtils.java
JStormUtils.getSupervisorPortNum
public static int getSupervisorPortNum(Map conf, int sysCpuNum, Long physicalMemSize) { """ calculate port number from cpu number and physical memory size """ double cpuWeight = ConfigExtension.getSupervisorSlotsPortCpuWeight(conf); int cpuPortNum = (int) (sysCpuNum / cpuWeight); if (...
java
public static int getSupervisorPortNum(Map conf, int sysCpuNum, Long physicalMemSize) { double cpuWeight = ConfigExtension.getSupervisorSlotsPortCpuWeight(conf); int cpuPortNum = (int) (sysCpuNum / cpuWeight); if (cpuPortNum < 1) { LOG.info("Invalid supervisor.slots.port.cpu.weight...
[ "public", "static", "int", "getSupervisorPortNum", "(", "Map", "conf", ",", "int", "sysCpuNum", ",", "Long", "physicalMemSize", ")", "{", "double", "cpuWeight", "=", "ConfigExtension", ".", "getSupervisorSlotsPortCpuWeight", "(", "conf", ")", ";", "int", "cpuPortN...
calculate port number from cpu number and physical memory size
[ "calculate", "port", "number", "from", "cpu", "number", "and", "physical", "memory", "size" ]
train
https://github.com/alibaba/jstorm/blob/5d6cde22dbca7df3d6e6830bf94f98a6639ab559/jstorm-core/src/main/java/com/alibaba/jstorm/utils/JStormUtils.java#L1394-L1424
jbundle/jbundle
base/screen/view/xml/src/main/java/org/jbundle/base/screen/view/xml/report/XReportBreakScreen.java
XReportBreakScreen.printControlEndForm
public void printControlEndForm(PrintWriter out, int iPrintOptions) { """ Display the start form in input format. @param out The out stream. @param iPrintOptions The view specific attributes. """ out.println(Utility.endTag(XMLTags.CONTROLS)); if ((iPrintOptions & HtmlConstants.FOOTING_SCREEN)...
java
public void printControlEndForm(PrintWriter out, int iPrintOptions) { out.println(Utility.endTag(XMLTags.CONTROLS)); if ((iPrintOptions & HtmlConstants.FOOTING_SCREEN) == HtmlConstants.FOOTING_SCREEN) out.println(Utility.endTag(XMLTags.FOOTING)); else out.println(Util...
[ "public", "void", "printControlEndForm", "(", "PrintWriter", "out", ",", "int", "iPrintOptions", ")", "{", "out", ".", "println", "(", "Utility", ".", "endTag", "(", "XMLTags", ".", "CONTROLS", ")", ")", ";", "if", "(", "(", "iPrintOptions", "&", "HtmlCons...
Display the start form in input format. @param out The out stream. @param iPrintOptions The view specific attributes.
[ "Display", "the", "start", "form", "in", "input", "format", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/view/xml/src/main/java/org/jbundle/base/screen/view/xml/report/XReportBreakScreen.java#L79-L86
prestodb/presto
presto-main/src/main/java/com/facebook/presto/execution/scheduler/TopologyAwareNodeSelector.java
TopologyAwareNodeSelector.calculateMaxPendingSplits
private int calculateMaxPendingSplits(int splitAffinity, int totalDepth) { """ Computes how much of the queue can be filled by splits with the network topology distance to a node given by splitAffinity. A split with zero affinity can only fill half the queue, whereas one that matches exactly can fill the entire ...
java
private int calculateMaxPendingSplits(int splitAffinity, int totalDepth) { if (totalDepth == 0) { return maxPendingSplitsPerTask; } // Use half the queue for any split // Reserve the other half for splits that have some amount of network affinity double queueFract...
[ "private", "int", "calculateMaxPendingSplits", "(", "int", "splitAffinity", ",", "int", "totalDepth", ")", "{", "if", "(", "totalDepth", "==", "0", ")", "{", "return", "maxPendingSplitsPerTask", ";", "}", "// Use half the queue for any split", "// Reserve the other half...
Computes how much of the queue can be filled by splits with the network topology distance to a node given by splitAffinity. A split with zero affinity can only fill half the queue, whereas one that matches exactly can fill the entire queue.
[ "Computes", "how", "much", "of", "the", "queue", "can", "be", "filled", "by", "splits", "with", "the", "network", "topology", "distance", "to", "a", "node", "given", "by", "splitAffinity", ".", "A", "split", "with", "zero", "affinity", "can", "only", "fill...
train
https://github.com/prestodb/presto/blob/89de5e379d8f85e139d292b0add8c537a2a01a88/presto-main/src/main/java/com/facebook/presto/execution/scheduler/TopologyAwareNodeSelector.java#L209-L218
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/XmlWriter.java
XmlWriter.writeAttribute
public void writeAttribute(String name, Object ... values) { """ Write an attribute with multiple values, separated by space, if a value is null nothing is written. @throws IllegalStateException if the is no element is open """ if (!_isElementOpen) throw new IllegalStateException("no open element...
java
public void writeAttribute(String name, Object ... values) { if (!_isElementOpen) throw new IllegalStateException("no open element"); _isElementOpen = false; try { _strategy.writeAttribute(this, name, values); } finally { _isElementOpen = true; } }
[ "public", "void", "writeAttribute", "(", "String", "name", ",", "Object", "...", "values", ")", "{", "if", "(", "!", "_isElementOpen", ")", "throw", "new", "IllegalStateException", "(", "\"no open element\"", ")", ";", "_isElementOpen", "=", "false", ";", "try...
Write an attribute with multiple values, separated by space, if a value is null nothing is written. @throws IllegalStateException if the is no element is open
[ "Write", "an", "attribute", "with", "multiple", "values", "separated", "by", "space", "if", "a", "value", "is", "null", "nothing", "is", "written", "." ]
train
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/XmlWriter.java#L315-L329