repository_name
stringlengths
7
54
func_path_in_repository
stringlengths
18
218
func_name
stringlengths
5
140
whole_func_string
stringlengths
79
3.99k
language
stringclasses
1 value
func_code_string
stringlengths
79
3.99k
func_code_tokens
listlengths
20
624
func_documentation_string
stringlengths
61
1.96k
func_documentation_tokens
listlengths
1
478
split_name
stringclasses
1 value
func_code_url
stringlengths
107
339
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/impl/TrmMessageFactoryImpl.java
TrmMessageFactoryImpl.createInboundTrmFirstContactMessage
public TrmFirstContactMessage createInboundTrmFirstContactMessage(byte rawMessage[], int offset, int length) throws MessageDecodeFailedException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "createInboundTrmFir...
java
public TrmFirstContactMessage createInboundTrmFirstContactMessage(byte rawMessage[], int offset, int length) throws MessageDecodeFailedException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "createInboundTrmFir...
[ "public", "TrmFirstContactMessage", "createInboundTrmFirstContactMessage", "(", "byte", "rawMessage", "[", "]", ",", "int", "offset", ",", "int", "length", ")", "throws", "MessageDecodeFailedException", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ...
Create a TrmFirstContactMessage to represent an inbound message. @param rawMessage The inbound byte array containging a complete message @param offset The offset in the byte array at which the message begins @param length The length of the message within the byte array @return The new TrmFirstContactMessag...
[ "Create", "a", "TrmFirstContactMessage", "to", "represent", "an", "inbound", "message", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/impl/TrmMessageFactoryImpl.java#L336-L346
samskivert/pythagoras
src/main/java/pythagoras/f/Line.java
Line.setLine
public void setLine (float x1, float y1, float x2, float y2) { this.x1 = x1; this.y1 = y1; this.x2 = x2; this.y2 = y2; }
java
public void setLine (float x1, float y1, float x2, float y2) { this.x1 = x1; this.y1 = y1; this.x2 = x2; this.y2 = y2; }
[ "public", "void", "setLine", "(", "float", "x1", ",", "float", "y1", ",", "float", "x2", ",", "float", "y2", ")", "{", "this", ".", "x1", "=", "x1", ";", "this", ".", "y1", "=", "y1", ";", "this", ".", "x2", "=", "x2", ";", "this", ".", "y2",...
Sets the start and end point of this line to the specified values.
[ "Sets", "the", "start", "and", "end", "point", "of", "this", "line", "to", "the", "specified", "values", "." ]
train
https://github.com/samskivert/pythagoras/blob/b8fea743ee8a7d742ad9c06ee4f11f50571fbd32/src/main/java/pythagoras/f/Line.java#L51-L56
spring-projects/spring-android
spring-android-core/src/main/java/org/springframework/core/BridgeMethodResolver.java
BridgeMethodResolver.isBridgedCandidateFor
private static boolean isBridgedCandidateFor(Method candidateMethod, Method bridgeMethod) { return (!candidateMethod.isBridge() && !candidateMethod.equals(bridgeMethod) && candidateMethod.getName().equals(bridgeMethod.getName()) && candidateMethod.getParameterTypes().length == bridgeMethod.getParameterTypes()...
java
private static boolean isBridgedCandidateFor(Method candidateMethod, Method bridgeMethod) { return (!candidateMethod.isBridge() && !candidateMethod.equals(bridgeMethod) && candidateMethod.getName().equals(bridgeMethod.getName()) && candidateMethod.getParameterTypes().length == bridgeMethod.getParameterTypes()...
[ "private", "static", "boolean", "isBridgedCandidateFor", "(", "Method", "candidateMethod", ",", "Method", "bridgeMethod", ")", "{", "return", "(", "!", "candidateMethod", ".", "isBridge", "(", ")", "&&", "!", "candidateMethod", ".", "equals", "(", "bridgeMethod", ...
Returns {@code true} if the supplied '{@code candidateMethod}' can be consider a validate candidate for the {@link Method} that is {@link Method#isBridge() bridged} by the supplied {@link Method bridge Method}. This method performs inexpensive checks and can be used quickly filter for a set of possible matches.
[ "Returns", "{" ]
train
https://github.com/spring-projects/spring-android/blob/941296e152d49a40e0745a3e81628a974f72b7e4/spring-android-core/src/main/java/org/springframework/core/BridgeMethodResolver.java#L121-L125
b3log/latke
latke-core/src/main/java/org/b3log/latke/repository/jdbc/util/JdbcUtil.java
JdbcUtil.executeSql
public static boolean executeSql(final String sql, final Connection connection, final boolean isDebug) throws SQLException { if (isDebug || LOGGER.isTraceEnabled()) { LOGGER.log(Level.INFO, "Executing SQL [" + sql + "]"); } final Statement statement = connection.createStatement(); ...
java
public static boolean executeSql(final String sql, final Connection connection, final boolean isDebug) throws SQLException { if (isDebug || LOGGER.isTraceEnabled()) { LOGGER.log(Level.INFO, "Executing SQL [" + sql + "]"); } final Statement statement = connection.createStatement(); ...
[ "public", "static", "boolean", "executeSql", "(", "final", "String", "sql", ",", "final", "Connection", "connection", ",", "final", "boolean", "isDebug", ")", "throws", "SQLException", "{", "if", "(", "isDebug", "||", "LOGGER", ".", "isTraceEnabled", "(", ")",...
Executes the specified SQL with the specified connection. @param sql the specified SQL @param connection connection the specified connection @param isDebug the specified debug flag @return {@code true} if success, returns {@false} otherwise @throws SQLException SQLException
[ "Executes", "the", "specified", "SQL", "with", "the", "specified", "connection", "." ]
train
https://github.com/b3log/latke/blob/f7e08a47eeecea5f7c94006382c24f353585de33/latke-core/src/main/java/org/b3log/latke/repository/jdbc/util/JdbcUtil.java#L60-L70
johncarl81/transfuse
transfuse/src/main/java/org/androidtransfuse/analysis/module/ModuleTransactionWorker.java
ModuleTransactionWorker.createConfigurationsForModuleType
private void createConfigurationsForModuleType(ImmutableList.Builder<ModuleConfiguration> configurations, ASTType module, ASTType scanTarget, Set<MethodSignature> scanned, Map<String, Set<MethodSignature>> packagePrivateScanned) { configureModuleAnnotations(configurations, module, scanTarget, scanTarget.getAnn...
java
private void createConfigurationsForModuleType(ImmutableList.Builder<ModuleConfiguration> configurations, ASTType module, ASTType scanTarget, Set<MethodSignature> scanned, Map<String, Set<MethodSignature>> packagePrivateScanned) { configureModuleAnnotations(configurations, module, scanTarget, scanTarget.getAnn...
[ "private", "void", "createConfigurationsForModuleType", "(", "ImmutableList", ".", "Builder", "<", "ModuleConfiguration", ">", "configurations", ",", "ASTType", "module", ",", "ASTType", "scanTarget", ",", "Set", "<", "MethodSignature", ">", "scanned", ",", "Map", "...
Recursive method that finds module methods and annotations on all parents of moduleAncestor and moduleAncestor, but creates configuration based on the module. This allows any class in the module hierarchy to contribute annotations or providers that can be overridden by subclasses. @param configurations the holder for ...
[ "Recursive", "method", "that", "finds", "module", "methods", "and", "annotations", "on", "all", "parents", "of", "moduleAncestor", "and", "moduleAncestor", "but", "creates", "configuration", "based", "on", "the", "module", ".", "This", "allows", "any", "class", ...
train
https://github.com/johncarl81/transfuse/blob/a5f837504797a6c4f8628f7e1dde09b8e6368c8b/transfuse/src/main/java/org/androidtransfuse/analysis/module/ModuleTransactionWorker.java#L124-L148
phax/ph-oton
ph-oton-jscode/src/main/java/com/helger/html/jscode/AbstractJSBlock.java
AbstractJSBlock.staticInvoke
@Nonnull public JSInvocation staticInvoke (@Nullable final AbstractJSClass aType, @Nonnull final JSMethod aMethod) { final JSInvocation aInvocation = new JSInvocation (aType, aMethod); return addStatement (aInvocation); }
java
@Nonnull public JSInvocation staticInvoke (@Nullable final AbstractJSClass aType, @Nonnull final JSMethod aMethod) { final JSInvocation aInvocation = new JSInvocation (aType, aMethod); return addStatement (aInvocation); }
[ "@", "Nonnull", "public", "JSInvocation", "staticInvoke", "(", "@", "Nullable", "final", "AbstractJSClass", "aType", ",", "@", "Nonnull", "final", "JSMethod", "aMethod", ")", "{", "final", "JSInvocation", "aInvocation", "=", "new", "JSInvocation", "(", "aType", ...
Creates a static invocation statement. @param aType Type to use @param aMethod Method to invoke @return Never <code>null</code>.
[ "Creates", "a", "static", "invocation", "statement", "." ]
train
https://github.com/phax/ph-oton/blob/f3aaacbbc02a9f3e4f32fe8db8e4adf7b9c1d3ef/ph-oton-jscode/src/main/java/com/helger/html/jscode/AbstractJSBlock.java#L551-L556
knightliao/disconf
disconf-core/src/main/java/org/apache/zookeeper/recipes/lock/ProtocolSupport.java
ProtocolSupport.ensureExists
protected void ensureExists(final String path, final byte[] data, final List<ACL> acl, final CreateMode flags) { try { retryOperation(new ZooKeeperOperation() { public boolean execute() throws KeeperException, InterruptedException { Stat stat = zookeeper.exists(pa...
java
protected void ensureExists(final String path, final byte[] data, final List<ACL> acl, final CreateMode flags) { try { retryOperation(new ZooKeeperOperation() { public boolean execute() throws KeeperException, InterruptedException { Stat stat = zookeeper.exists(pa...
[ "protected", "void", "ensureExists", "(", "final", "String", "path", ",", "final", "byte", "[", "]", "data", ",", "final", "List", "<", "ACL", ">", "acl", ",", "final", "CreateMode", "flags", ")", "{", "try", "{", "retryOperation", "(", "new", "ZooKeeper...
Ensures that the given path exists with the given data, ACL and flags @param path @param acl @param flags
[ "Ensures", "that", "the", "given", "path", "exists", "with", "the", "given", "data", "ACL", "and", "flags" ]
train
https://github.com/knightliao/disconf/blob/d413cbce9334fe38a5a24982ce4db3a6ed8e98ea/disconf-core/src/main/java/org/apache/zookeeper/recipes/lock/ProtocolSupport.java#L155-L172
pgjdbc/pgjdbc
pgjdbc/src/main/java/org/postgresql/ds/PGConnectionPoolDataSource.java
PGConnectionPoolDataSource.getPooledConnection
public PooledConnection getPooledConnection(String user, String password) throws SQLException { return new PGPooledConnection(getConnection(user, password), defaultAutoCommit); }
java
public PooledConnection getPooledConnection(String user, String password) throws SQLException { return new PGPooledConnection(getConnection(user, password), defaultAutoCommit); }
[ "public", "PooledConnection", "getPooledConnection", "(", "String", "user", ",", "String", "password", ")", "throws", "SQLException", "{", "return", "new", "PGPooledConnection", "(", "getConnection", "(", "user", ",", "password", ")", ",", "defaultAutoCommit", ")", ...
Gets a connection which may be pooled by the app server or middleware implementation of DataSource. @throws java.sql.SQLException Occurs when the physical database connection cannot be established.
[ "Gets", "a", "connection", "which", "may", "be", "pooled", "by", "the", "app", "server", "or", "middleware", "implementation", "of", "DataSource", "." ]
train
https://github.com/pgjdbc/pgjdbc/blob/95ba7b261e39754674c5817695ae5ebf9a341fae/pgjdbc/src/main/java/org/postgresql/ds/PGConnectionPoolDataSource.java#L68-L70
intive-FDV/DynamicJasper
src/main/java/ar/com/fdvs/dj/domain/builders/CrosstabBuilder.java
CrosstabBuilder.setColumnStyles
public CrosstabBuilder setColumnStyles(Style headerStyle, Style totalStyle, Style totalHeaderStyle) { crosstab.setColumnHeaderStyle(headerStyle); crosstab.setColumnTotalheaderStyle(totalHeaderStyle); crosstab.setColumnTotalStyle(totalStyle); return this; }
java
public CrosstabBuilder setColumnStyles(Style headerStyle, Style totalStyle, Style totalHeaderStyle) { crosstab.setColumnHeaderStyle(headerStyle); crosstab.setColumnTotalheaderStyle(totalHeaderStyle); crosstab.setColumnTotalStyle(totalStyle); return this; }
[ "public", "CrosstabBuilder", "setColumnStyles", "(", "Style", "headerStyle", ",", "Style", "totalStyle", ",", "Style", "totalHeaderStyle", ")", "{", "crosstab", ".", "setColumnHeaderStyle", "(", "headerStyle", ")", ";", "crosstab", ".", "setColumnTotalheaderStyle", "(...
Should be called after all columns have been created @param headerStyle @param totalStyle @param totalHeaderStyle @return
[ "Should", "be", "called", "after", "all", "columns", "have", "been", "created" ]
train
https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/domain/builders/CrosstabBuilder.java#L399-L404
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShapeConverter.java
GoogleMapShapeConverter.toMultiLineStringFromOptions
public MultiLineString toMultiLineStringFromOptions( MultiPolylineOptions multiPolylineOptions, boolean hasZ, boolean hasM) { MultiLineString multiLineString = new MultiLineString(hasZ, hasM); for (PolylineOptions polyline : multiPolylineOptions .getPolylineOpti...
java
public MultiLineString toMultiLineStringFromOptions( MultiPolylineOptions multiPolylineOptions, boolean hasZ, boolean hasM) { MultiLineString multiLineString = new MultiLineString(hasZ, hasM); for (PolylineOptions polyline : multiPolylineOptions .getPolylineOpti...
[ "public", "MultiLineString", "toMultiLineStringFromOptions", "(", "MultiPolylineOptions", "multiPolylineOptions", ",", "boolean", "hasZ", ",", "boolean", "hasM", ")", "{", "MultiLineString", "multiLineString", "=", "new", "MultiLineString", "(", "hasZ", ",", "hasM", ")"...
Convert a {@link MultiPolylineOptions} to a {@link MultiLineString} @param multiPolylineOptions multi polyline options @param hasZ has z flag @param hasM has m flag @return multi line string
[ "Convert", "a", "{", "@link", "MultiPolylineOptions", "}", "to", "a", "{", "@link", "MultiLineString", "}" ]
train
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShapeConverter.java#L935-L948
biojava/biojava
biojava-core/src/main/java/org/biojava/nbio/core/sequence/template/SequenceMixin.java
SequenceMixin.countGC
public static int countGC(Sequence<NucleotideCompound> sequence) { CompoundSet<NucleotideCompound> cs = sequence.getCompoundSet(); NucleotideCompound G = cs.getCompoundForString("G"); NucleotideCompound C = cs.getCompoundForString("C"); NucleotideCompound g = cs.getCompoundForString("g"); NucleotideCompound c...
java
public static int countGC(Sequence<NucleotideCompound> sequence) { CompoundSet<NucleotideCompound> cs = sequence.getCompoundSet(); NucleotideCompound G = cs.getCompoundForString("G"); NucleotideCompound C = cs.getCompoundForString("C"); NucleotideCompound g = cs.getCompoundForString("g"); NucleotideCompound c...
[ "public", "static", "int", "countGC", "(", "Sequence", "<", "NucleotideCompound", ">", "sequence", ")", "{", "CompoundSet", "<", "NucleotideCompound", ">", "cs", "=", "sequence", ".", "getCompoundSet", "(", ")", ";", "NucleotideCompound", "G", "=", "cs", ".", ...
Returns the count of GC in the given sequence @param sequence The {@link NucleotideCompound} {@link Sequence} to perform the GC analysis on @return The number of GC compounds in the sequence
[ "Returns", "the", "count", "of", "GC", "in", "the", "given", "sequence" ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-core/src/main/java/org/biojava/nbio/core/sequence/template/SequenceMixin.java#L81-L88
haifengl/smile
plot/src/main/java/smile/swing/AlphaIcon.java
AlphaIcon.paintIcon
@Override public void paintIcon(Component c, Graphics g, int x, int y) { Graphics2D g2 = (Graphics2D) g.create(); g2.setComposite(AlphaComposite.SrcAtop.derive(alpha)); icon.paintIcon(c, g2, x, y); g2.dispose(); }
java
@Override public void paintIcon(Component c, Graphics g, int x, int y) { Graphics2D g2 = (Graphics2D) g.create(); g2.setComposite(AlphaComposite.SrcAtop.derive(alpha)); icon.paintIcon(c, g2, x, y); g2.dispose(); }
[ "@", "Override", "public", "void", "paintIcon", "(", "Component", "c", ",", "Graphics", "g", ",", "int", "x", ",", "int", "y", ")", "{", "Graphics2D", "g2", "=", "(", "Graphics2D", ")", "g", ".", "create", "(", ")", ";", "g2", ".", "setComposite", ...
Paints the wrapped icon with this <CODE>AlphaIcon</CODE>'s transparency. @param c The component to which the icon is painted @param g the graphics context @param x the X coordinate of the icon's top-left corner @param y the Y coordinate of the icon's top-left corner
[ "Paints", "the", "wrapped", "icon", "with", "this", "<CODE", ">", "AlphaIcon<", "/", "CODE", ">", "s", "transparency", "." ]
train
https://github.com/haifengl/smile/blob/e27e43e90fbaacce3f99d30120cf9dd6a764c33d/plot/src/main/java/smile/swing/AlphaIcon.java#L78-L84
adamfisk/littleshoot-commons-id
src/main/java/org/apache/commons/id/uuid/VersionFourGenerator.java
VersionFourGenerator.setPRNGProvider
public static void setPRNGProvider(String prngName, String packageName) { VersionFourGenerator.usePRNG = prngName; VersionFourGenerator.usePRNGPackage = packageName; VersionFourGenerator.secureRandom = null; }
java
public static void setPRNGProvider(String prngName, String packageName) { VersionFourGenerator.usePRNG = prngName; VersionFourGenerator.usePRNGPackage = packageName; VersionFourGenerator.secureRandom = null; }
[ "public", "static", "void", "setPRNGProvider", "(", "String", "prngName", ",", "String", "packageName", ")", "{", "VersionFourGenerator", ".", "usePRNG", "=", "prngName", ";", "VersionFourGenerator", ".", "usePRNGPackage", "=", "packageName", ";", "VersionFourGenerato...
<p>Allows clients to set the pseudo-random number generator implementation used when generating a version four uuid with the secure option. The secure option uses a <code>SecureRandom</code>. The packageName string may be null to specify no preferred package.</p> @param prngName the pseudo-random number generator impl...
[ "<p", ">", "Allows", "clients", "to", "set", "the", "pseudo", "-", "random", "number", "generator", "implementation", "used", "when", "generating", "a", "version", "four", "uuid", "with", "the", "secure", "option", ".", "The", "secure", "option", "uses", "a"...
train
https://github.com/adamfisk/littleshoot-commons-id/blob/49a8f5f2b10831c509876ca463bf1a87e1e49ae9/src/main/java/org/apache/commons/id/uuid/VersionFourGenerator.java#L156-L160
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/row/CommonOps_DDRM.java
CommonOps_DDRM.invertSPD
public static boolean invertSPD(DMatrixRMaj mat, DMatrixRMaj result ) { if( mat.numRows != mat.numCols ) throw new IllegalArgumentException("Must be a square matrix"); result.reshape(mat.numRows,mat.numRows); if( mat.numRows <= UnrolledCholesky_DDRM.MAX ) { // L*L' = A ...
java
public static boolean invertSPD(DMatrixRMaj mat, DMatrixRMaj result ) { if( mat.numRows != mat.numCols ) throw new IllegalArgumentException("Must be a square matrix"); result.reshape(mat.numRows,mat.numRows); if( mat.numRows <= UnrolledCholesky_DDRM.MAX ) { // L*L' = A ...
[ "public", "static", "boolean", "invertSPD", "(", "DMatrixRMaj", "mat", ",", "DMatrixRMaj", "result", ")", "{", "if", "(", "mat", ".", "numRows", "!=", "mat", ".", "numCols", ")", "throw", "new", "IllegalArgumentException", "(", "\"Must be a square matrix\"", ")"...
Matrix inverse for symmetric positive definite matrices. For small matrices an unrolled cholesky is used. Otherwise a standard decomposition. @see UnrolledCholesky_DDRM @see LinearSolverFactory_DDRM#chol(int) @param mat (Input) SPD matrix @param result (Output) Inverted matrix. @return true if it could invert the mat...
[ "Matrix", "inverse", "for", "symmetric", "positive", "definite", "matrices", ".", "For", "small", "matrices", "an", "unrolled", "cholesky", "is", "used", ".", "Otherwise", "a", "standard", "decomposition", "." ]
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/CommonOps_DDRM.java#L818-L842
elki-project/elki
elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/io/ByteArrayUtil.java
ByteArrayUtil.writeShort
public static int writeShort(byte[] array, int offset, int v) { array[offset + 0] = (byte) (v >>> 8); array[offset + 1] = (byte) (v >>> 0); return SIZE_SHORT; }
java
public static int writeShort(byte[] array, int offset, int v) { array[offset + 0] = (byte) (v >>> 8); array[offset + 1] = (byte) (v >>> 0); return SIZE_SHORT; }
[ "public", "static", "int", "writeShort", "(", "byte", "[", "]", "array", ",", "int", "offset", ",", "int", "v", ")", "{", "array", "[", "offset", "+", "0", "]", "=", "(", "byte", ")", "(", "v", ">>>", "8", ")", ";", "array", "[", "offset", "+",...
Write a short to the byte array at the given offset. @param array Array to write to @param offset Offset to write to @param v data @return number of bytes written
[ "Write", "a", "short", "to", "the", "byte", "array", "at", "the", "given", "offset", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/io/ByteArrayUtil.java#L106-L110
hawkular/hawkular-commons
hawkular-bus/hawkular-bus-common/src/main/java/org/hawkular/bus/common/MessageProcessor.java
MessageProcessor.createMessageWithBinaryData
protected Message createMessageWithBinaryData(ConnectionContext context, BasicMessage basicMessage, InputStream inputStream) throws JMSException { return createMessageWithBinaryData(context, basicMessage, inputStream, null); }
java
protected Message createMessageWithBinaryData(ConnectionContext context, BasicMessage basicMessage, InputStream inputStream) throws JMSException { return createMessageWithBinaryData(context, basicMessage, inputStream, null); }
[ "protected", "Message", "createMessageWithBinaryData", "(", "ConnectionContext", "context", ",", "BasicMessage", "basicMessage", ",", "InputStream", "inputStream", ")", "throws", "JMSException", "{", "return", "createMessageWithBinaryData", "(", "context", ",", "basicMessag...
Same as {@link #createMessage(ConnectionContext, BasicMessage, Map)} with <code>null</code> headers.
[ "Same", "as", "{" ]
train
https://github.com/hawkular/hawkular-commons/blob/e4a832862b3446d7f4d629bb05790f2df578e035/hawkular-bus/hawkular-bus-common/src/main/java/org/hawkular/bus/common/MessageProcessor.java#L418-L421
ops4j/org.ops4j.pax.logging
pax-logging-log4j2/src/main/java/org/apache/logging/log4j/core/impl/ThrowableProxy.java
ThrowableProxy.formatWrapper
public void formatWrapper(final StringBuilder sb, final ThrowableProxy cause, final String suffix) { this.formatWrapper(sb, cause, null, PlainTextRenderer.getInstance(), suffix); }
java
public void formatWrapper(final StringBuilder sb, final ThrowableProxy cause, final String suffix) { this.formatWrapper(sb, cause, null, PlainTextRenderer.getInstance(), suffix); }
[ "public", "void", "formatWrapper", "(", "final", "StringBuilder", "sb", ",", "final", "ThrowableProxy", "cause", ",", "final", "String", "suffix", ")", "{", "this", ".", "formatWrapper", "(", "sb", ",", "cause", ",", "null", ",", "PlainTextRenderer", ".", "g...
Formats the specified Throwable. @param sb StringBuilder to contain the formatted Throwable. @param cause The Throwable to format. @param suffix
[ "Formats", "the", "specified", "Throwable", "." ]
train
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-log4j2/src/main/java/org/apache/logging/log4j/core/impl/ThrowableProxy.java#L349-L351
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/string/StringParser.java
StringParser.parseByteObj
@Nullable public static Byte parseByteObj (@Nullable final Object aObject) { return parseByteObj (aObject, DEFAULT_RADIX, null); }
java
@Nullable public static Byte parseByteObj (@Nullable final Object aObject) { return parseByteObj (aObject, DEFAULT_RADIX, null); }
[ "@", "Nullable", "public", "static", "Byte", "parseByteObj", "(", "@", "Nullable", "final", "Object", "aObject", ")", "{", "return", "parseByteObj", "(", "aObject", ",", "DEFAULT_RADIX", ",", "null", ")", ";", "}" ]
Parse the given {@link Object} as {@link Byte} with radix {@value #DEFAULT_RADIX}. @param aObject The object to parse. May be <code>null</code>. @return <code>null</code> if the object does not represent a valid value.
[ "Parse", "the", "given", "{", "@link", "Object", "}", "as", "{", "@link", "Byte", "}", "with", "radix", "{", "@value", "#DEFAULT_RADIX", "}", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/string/StringParser.java#L338-L342
xcesco/kripton
kripton-orm/src/main/java/com/abubusoft/kripton/android/sqlite/SQLiteEvent.java
SQLiteEvent.createInsertWithId
public static SQLiteEvent createInsertWithId(Long result) { return new SQLiteEvent(SqlModificationType.INSERT, null, result, null); }
java
public static SQLiteEvent createInsertWithId(Long result) { return new SQLiteEvent(SqlModificationType.INSERT, null, result, null); }
[ "public", "static", "SQLiteEvent", "createInsertWithId", "(", "Long", "result", ")", "{", "return", "new", "SQLiteEvent", "(", "SqlModificationType", ".", "INSERT", ",", "null", ",", "result", ",", "null", ")", ";", "}" ]
Creates the insert. @param result the result @return the SQ lite event
[ "Creates", "the", "insert", "." ]
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-orm/src/main/java/com/abubusoft/kripton/android/sqlite/SQLiteEvent.java#L57-L59
SonarSource/sonarqube
server/sonar-server/src/main/java/org/sonar/server/util/ClassLoaderUtils.java
ClassLoaderUtils.listFiles
public static Collection<String> listFiles(ClassLoader classLoader, String rootPath) { return listResources(classLoader, rootPath, path -> !StringUtils.endsWith(path, "/")); }
java
public static Collection<String> listFiles(ClassLoader classLoader, String rootPath) { return listResources(classLoader, rootPath, path -> !StringUtils.endsWith(path, "/")); }
[ "public", "static", "Collection", "<", "String", ">", "listFiles", "(", "ClassLoader", "classLoader", ",", "String", "rootPath", ")", "{", "return", "listResources", "(", "classLoader", ",", "rootPath", ",", "path", "->", "!", "StringUtils", ".", "endsWith", "...
Finds files within a given directory and its subdirectories @param classLoader @param rootPath the root directory, for example org/sonar/sqale @return a list of relative paths, for example {"org/sonar/sqale/foo/bar.txt}. Never null.
[ "Finds", "files", "within", "a", "given", "directory", "and", "its", "subdirectories" ]
train
https://github.com/SonarSource/sonarqube/blob/2fffa4c2f79ae3714844d7742796e82822b6a98a/server/sonar-server/src/main/java/org/sonar/server/util/ClassLoaderUtils.java#L50-L52
phax/ph-commons
ph-jaxb/src/main/java/com/helger/jaxb/JAXBContextCache.java
JAXBContextCache.getFromCache
@Nullable public JAXBContext getFromCache (@Nonnull final Package aPackage) { return getFromCache (aPackage, (ClassLoader) null); }
java
@Nullable public JAXBContext getFromCache (@Nonnull final Package aPackage) { return getFromCache (aPackage, (ClassLoader) null); }
[ "@", "Nullable", "public", "JAXBContext", "getFromCache", "(", "@", "Nonnull", "final", "Package", "aPackage", ")", "{", "return", "getFromCache", "(", "aPackage", ",", "(", "ClassLoader", ")", "null", ")", ";", "}" ]
Special overload with package and default {@link ClassLoader}. @param aPackage Package to load. May not be <code>null</code>. @return <code>null</code> if package is <code>null</code>.
[ "Special", "overload", "with", "package", "and", "default", "{", "@link", "ClassLoader", "}", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-jaxb/src/main/java/com/helger/jaxb/JAXBContextCache.java#L115-L119
groupe-sii/ogham
ogham-core/src/main/java/fr/sii/ogham/core/util/EqualsBuilder.java
EqualsBuilder.reflectionsEquals
public static boolean reflectionsEquals(Object object, Object other, String... excludeFields) { return org.apache.commons.lang3.builder.EqualsBuilder.reflectionEquals(object, other, excludeFields); }
java
public static boolean reflectionsEquals(Object object, Object other, String... excludeFields) { return org.apache.commons.lang3.builder.EqualsBuilder.reflectionEquals(object, other, excludeFields); }
[ "public", "static", "boolean", "reflectionsEquals", "(", "Object", "object", ",", "Object", "other", ",", "String", "...", "excludeFields", ")", "{", "return", "org", ".", "apache", ".", "commons", ".", "lang3", ".", "builder", ".", "EqualsBuilder", ".", "re...
<p> This method uses reflection to determine if the two Objects are equal. </p> <p> It uses AccessibleObject.setAccessible to gain access to private fields. This means that it will throw a security exception if run under a security manager, if the permissions are not set up correctly. It is also not as efficient as te...
[ "<p", ">", "This", "method", "uses", "reflection", "to", "determine", "if", "the", "two", "Objects", "are", "equal", ".", "<", "/", "p", ">" ]
train
https://github.com/groupe-sii/ogham/blob/e273b845604add74b5a25dfd931cb3c166b1008f/ogham-core/src/main/java/fr/sii/ogham/core/util/EqualsBuilder.java#L245-L247
jbundle/jbundle
thin/base/message/src/main/java/org/jbundle/thin/base/message/BaseMessageRecordDesc.java
BaseMessageRecordDesc.setDataIndex
public Rec setDataIndex(int iNodeIndex, Rec record) { if (END_OF_NODES == iNodeIndex) iNodeIndex = 0; m_iNodeIndex = iNodeIndex; return record; }
java
public Rec setDataIndex(int iNodeIndex, Rec record) { if (END_OF_NODES == iNodeIndex) iNodeIndex = 0; m_iNodeIndex = iNodeIndex; return record; }
[ "public", "Rec", "setDataIndex", "(", "int", "iNodeIndex", ",", "Rec", "record", ")", "{", "if", "(", "END_OF_NODES", "==", "iNodeIndex", ")", "iNodeIndex", "=", "0", ";", "m_iNodeIndex", "=", "iNodeIndex", ";", "return", "record", ";", "}" ]
Position to this node in the tree. @param iNodeIndex The node to position to. @param record The record I am moving data to. If this is null, don't position/setup the data. @return An error code.
[ "Position", "to", "this", "node", "in", "the", "tree", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/message/src/main/java/org/jbundle/thin/base/message/BaseMessageRecordDesc.java#L328-L334
powermock/powermock
powermock-api/powermock-api-easymock/src/main/java/org/powermock/api/easymock/PowerMock.java
PowerMock.suppressMethod
@Deprecated public static synchronized void suppressMethod(Class<?> clazz, String methodName, Class<?>[] parameterTypes) { SuppressCode.suppressMethod(clazz, methodName, parameterTypes); }
java
@Deprecated public static synchronized void suppressMethod(Class<?> clazz, String methodName, Class<?>[] parameterTypes) { SuppressCode.suppressMethod(clazz, methodName, parameterTypes); }
[ "@", "Deprecated", "public", "static", "synchronized", "void", "suppressMethod", "(", "Class", "<", "?", ">", "clazz", ",", "String", "methodName", ",", "Class", "<", "?", ">", "[", "]", "parameterTypes", ")", "{", "SuppressCode", ".", "suppressMethod", "(",...
Suppress a specific method call. Use this for overloaded methods. @deprecated Use {@link #suppress(Method)} instead.
[ "Suppress", "a", "specific", "method", "call", ".", "Use", "this", "for", "overloaded", "methods", "." ]
train
https://github.com/powermock/powermock/blob/e8cd68026c284c6a7efe66959809eeebd8d1f9ad/powermock-api/powermock-api-easymock/src/main/java/org/powermock/api/easymock/PowerMock.java#L1912-L1915
fcrepo3/fcrepo
fcrepo-server/src/main/java/org/fcrepo/server/access/defaultdisseminator/DefaultDisseminatorImpl.java
DefaultDisseminatorImpl.viewDublinCore
public MIMETypedStream viewDublinCore() throws ServerException { // get dublin core record as xml Datastream dcmd = null; Reader in = null; try { ReadableCharArrayWriter out = new ReadableCharArrayWriter(512); dcmd = reader.GetDatastream("DC", ...
java
public MIMETypedStream viewDublinCore() throws ServerException { // get dublin core record as xml Datastream dcmd = null; Reader in = null; try { ReadableCharArrayWriter out = new ReadableCharArrayWriter(512); dcmd = reader.GetDatastream("DC", ...
[ "public", "MIMETypedStream", "viewDublinCore", "(", ")", "throws", "ServerException", "{", "// get dublin core record as xml", "Datastream", "dcmd", "=", "null", ";", "Reader", "in", "=", "null", ";", "try", "{", "ReadableCharArrayWriter", "out", "=", "new", "Readab...
Returns the Dublin Core record for the object, if one exists. The record is returned as HTML in a presentation-oriented format. @return html packaged as a MIMETypedStream @throws ServerException
[ "Returns", "the", "Dublin", "Core", "record", "for", "the", "object", "if", "one", "exists", ".", "The", "record", "is", "returned", "as", "HTML", "in", "a", "presentation", "-", "oriented", "format", "." ]
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/access/defaultdisseminator/DefaultDisseminatorImpl.java#L267-L309
rhuss/jolokia
agent/osgi/src/main/java/org/jolokia/osgi/util/LogHelper.java
LogHelper.logError
public static void logError(String pMessage, Throwable pThrowable) { final BundleContext bundleContext = FrameworkUtil .getBundle(ServiceAuthenticationHttpContext.class) .getBundleContext(); logError(bundleContext, pMessage, pThrowable); }
java
public static void logError(String pMessage, Throwable pThrowable) { final BundleContext bundleContext = FrameworkUtil .getBundle(ServiceAuthenticationHttpContext.class) .getBundleContext(); logError(bundleContext, pMessage, pThrowable); }
[ "public", "static", "void", "logError", "(", "String", "pMessage", ",", "Throwable", "pThrowable", ")", "{", "final", "BundleContext", "bundleContext", "=", "FrameworkUtil", ".", "getBundle", "(", "ServiceAuthenticationHttpContext", ".", "class", ")", ".", "getBundl...
Log error to a logging service (if available), otherwise log to std error @param pMessage message to log @param pThrowable an exception to log
[ "Log", "error", "to", "a", "logging", "service", "(", "if", "available", ")", "otherwise", "log", "to", "std", "error" ]
train
https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/osgi/src/main/java/org/jolokia/osgi/util/LogHelper.java#L24-L29
jenkinsci/jenkins
core/src/main/java/hudson/model/Job.java
Job.getEnvironment
public @Nonnull EnvVars getEnvironment(@CheckForNull Node node, @Nonnull TaskListener listener) throws IOException, InterruptedException { EnvVars env = new EnvVars(); if (node != null) { final Computer computer = node.toComputer(); if (computer != null) { // we ...
java
public @Nonnull EnvVars getEnvironment(@CheckForNull Node node, @Nonnull TaskListener listener) throws IOException, InterruptedException { EnvVars env = new EnvVars(); if (node != null) { final Computer computer = node.toComputer(); if (computer != null) { // we ...
[ "public", "@", "Nonnull", "EnvVars", "getEnvironment", "(", "@", "CheckForNull", "Node", "node", ",", "@", "Nonnull", "TaskListener", "listener", ")", "throws", "IOException", ",", "InterruptedException", "{", "EnvVars", "env", "=", "new", "EnvVars", "(", ")", ...
Creates an environment variable override for launching processes for this project. <p> This is for process launching outside the build execution (such as polling, tagging, deployment, etc.) that happens in a context of a specific job. @param node Node to eventually run a process on. The implementation must cope with ...
[ "Creates", "an", "environment", "variable", "override", "for", "launching", "processes", "for", "this", "project", "." ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/model/Job.java#L375-L400
Netflix/conductor
redis-persistence/src/main/java/com/netflix/conductor/jedis/JedisMock.java
JedisMock.expire
@Override public Long expire(final String key, final int seconds) { try { return redis.expire(key, seconds) ? 1L : 0L; } catch (Exception e) { throw new JedisException(e); } }
java
@Override public Long expire(final String key, final int seconds) { try { return redis.expire(key, seconds) ? 1L : 0L; } catch (Exception e) { throw new JedisException(e); } }
[ "@", "Override", "public", "Long", "expire", "(", "final", "String", "key", ",", "final", "int", "seconds", ")", "{", "try", "{", "return", "redis", ".", "expire", "(", "key", ",", "seconds", ")", "?", "1L", ":", "0L", ";", "}", "catch", "(", "Exce...
/* public Set<String> keys(final String pattern) { checkIsInMulti(); client.keys(pattern); return BuilderFactory.STRING_SET.build(client.getBinaryMultiBulkReply()); } public String randomKey() { checkIsInMulti(); client.randomKey(); return client.getBulkReply(); } public String rename(final String oldkey, final Strin...
[ "/", "*", "public", "Set<String", ">", "keys", "(", "final", "String", "pattern", ")", "{", "checkIsInMulti", "()", ";", "client", ".", "keys", "(", "pattern", ")", ";", "return", "BuilderFactory", ".", "STRING_SET", ".", "build", "(", "client", ".", "ge...
train
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/redis-persistence/src/main/java/com/netflix/conductor/jedis/JedisMock.java#L151-L158
overturetool/overture
core/interpreter/src/main/java/IO.java
IO.getFile
protected static File getFile(Value fval) { String path = stringOf(fval).replace('/', File.separatorChar); File file = new File(path); if (!file.isAbsolute()) { file = new File(Settings.baseDir, path); } return file; }
java
protected static File getFile(Value fval) { String path = stringOf(fval).replace('/', File.separatorChar); File file = new File(path); if (!file.isAbsolute()) { file = new File(Settings.baseDir, path); } return file; }
[ "protected", "static", "File", "getFile", "(", "Value", "fval", ")", "{", "String", "path", "=", "stringOf", "(", "fval", ")", ".", "replace", "(", "'", "'", ",", "File", ".", "separatorChar", ")", ";", "File", "file", "=", "new", "File", "(", "path"...
Gets the absolute path the file based on the filename parsed and the working dir of the IDE or the execution dir of VDMJ @param fval file name @return
[ "Gets", "the", "absolute", "path", "the", "file", "based", "on", "the", "filename", "parsed", "and", "the", "working", "dir", "of", "the", "IDE", "or", "the", "execution", "dir", "of", "VDMJ" ]
train
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/IO.java#L131-L141
super-csv/super-csv
super-csv/src/main/java/org/supercsv/cellprocessor/constraint/RequireSubStr.java
RequireSubStr.execute
public Object execute(final Object value, final CsvContext context) { validateInputNotNull(value, context); final String stringValue = value.toString(); for( final String required : requiredSubStrings ) { if( stringValue.contains(required) ) { return next.execute(value, context); // just need to matc...
java
public Object execute(final Object value, final CsvContext context) { validateInputNotNull(value, context); final String stringValue = value.toString(); for( final String required : requiredSubStrings ) { if( stringValue.contains(required) ) { return next.execute(value, context); // just need to matc...
[ "public", "Object", "execute", "(", "final", "Object", "value", ",", "final", "CsvContext", "context", ")", "{", "validateInputNotNull", "(", "value", ",", "context", ")", ";", "final", "String", "stringValue", "=", "value", ".", "toString", "(", ")", ";", ...
{@inheritDoc} @throws SuperCsvCellProcessorException if value is null @throws SuperCsvConstraintViolationException if value doesn't contain any of the required substrings
[ "{", "@inheritDoc", "}" ]
train
https://github.com/super-csv/super-csv/blob/f18db724674dc1c4116e25142c1b5403ebf43e96/super-csv/src/main/java/org/supercsv/cellprocessor/constraint/RequireSubStr.java#L184-L197
ansell/csvstream
src/main/java/com/github/ansell/csv/stream/CSVStream.java
CSVStream.parse
public static <T> void parse(final InputStream inputStream, final Consumer<List<String>> headersValidator, final BiFunction<List<String>, List<String>, T> lineConverter, final Consumer<T> resultConsumer) throws IOException, CSVStreamException { try (final Reader inputStreamReader = new BufferedReader( new I...
java
public static <T> void parse(final InputStream inputStream, final Consumer<List<String>> headersValidator, final BiFunction<List<String>, List<String>, T> lineConverter, final Consumer<T> resultConsumer) throws IOException, CSVStreamException { try (final Reader inputStreamReader = new BufferedReader( new I...
[ "public", "static", "<", "T", ">", "void", "parse", "(", "final", "InputStream", "inputStream", ",", "final", "Consumer", "<", "List", "<", "String", ">", ">", "headersValidator", ",", "final", "BiFunction", "<", "List", "<", "String", ">", ",", "List", ...
Stream a CSV file from the given InputStream through the header validator, line checker, and if the line checker succeeds, send the checked/converted line to the consumer. @param inputStream The {@link InputStream} containing the CSV file. @param headersValidator The validator of the header line. Throwing IllegalArgum...
[ "Stream", "a", "CSV", "file", "from", "the", "given", "InputStream", "through", "the", "header", "validator", "line", "checker", "and", "if", "the", "line", "checker", "succeeds", "send", "the", "checked", "/", "converted", "line", "to", "the", "consumer", "...
train
https://github.com/ansell/csvstream/blob/9468bfbd6997fbc4237eafc990ba811cd5905dc1/src/main/java/com/github/ansell/csv/stream/CSVStream.java#L95-L102
fcrepo3/fcrepo
fcrepo-server/src/main/java/org/fcrepo/server/journal/xmlhelpers/AbstractXmlReader.java
AbstractXmlReader.readCharactersUntilEndTag
protected String readCharactersUntilEndTag(XMLEventReader reader, QName tagName) throws XMLStreamException, JournalException { StringBuffer stringValue = new StringBuffer(); while (true) { XMLEvent event = reader.nextEvent(); ...
java
protected String readCharactersUntilEndTag(XMLEventReader reader, QName tagName) throws XMLStreamException, JournalException { StringBuffer stringValue = new StringBuffer(); while (true) { XMLEvent event = reader.nextEvent(); ...
[ "protected", "String", "readCharactersUntilEndTag", "(", "XMLEventReader", "reader", ",", "QName", "tagName", ")", "throws", "XMLStreamException", ",", "JournalException", "{", "StringBuffer", "stringValue", "=", "new", "StringBuffer", "(", ")", ";", "while", "(", "...
Loop through a series of character events, accumulating the data into a String. The character events should be terminated by an EndTagEvent with the expected tag name.
[ "Loop", "through", "a", "series", "of", "character", "events", "accumulating", "the", "data", "into", "a", "String", ".", "The", "character", "events", "should", "be", "terminated", "by", "an", "EndTagEvent", "with", "the", "expected", "tag", "name", "." ]
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/xmlhelpers/AbstractXmlReader.java#L103-L118
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/alg/shapes/ShapeFittingOps.java
ShapeFittingOps.fitEllipse_F64
public static FitData<EllipseRotated_F64> fitEllipse_F64( List<Point2D_F64> points, int iterations , boolean computeError , FitData<EllipseRotated_F64> outputStorage ) { if( outputStorage == null ) { outputStorage = new FitData<>(new EllipseRotated_F64()); } // Compute the o...
java
public static FitData<EllipseRotated_F64> fitEllipse_F64( List<Point2D_F64> points, int iterations , boolean computeError , FitData<EllipseRotated_F64> outputStorage ) { if( outputStorage == null ) { outputStorage = new FitData<>(new EllipseRotated_F64()); } // Compute the o...
[ "public", "static", "FitData", "<", "EllipseRotated_F64", ">", "fitEllipse_F64", "(", "List", "<", "Point2D_F64", ">", "points", ",", "int", "iterations", ",", "boolean", "computeError", ",", "FitData", "<", "EllipseRotated_F64", ">", "outputStorage", ")", "{", ...
Computes the best fit ellipse based on minimizing Euclidean distance. An estimate is initially provided using algebraic algorithm which is then refined using non-linear optimization. The amount of non-linear optimization can be controlled using 'iterations' parameter. Will work with partial and complete contours of ...
[ "Computes", "the", "best", "fit", "ellipse", "based", "on", "minimizing", "Euclidean", "distance", ".", "An", "estimate", "is", "initially", "provided", "using", "algebraic", "algorithm", "which", "is", "then", "refined", "using", "non", "-", "linear", "optimiza...
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/shapes/ShapeFittingOps.java#L104-L148
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/functions/SqlDateTimeUtils.java
SqlDateTimeUtils.timestampCeil
public static long timestampCeil(TimeUnitRange range, long ts, TimeZone tz) { // assume that we are at UTC timezone, just for algorithm performance long offset = tz.getOffset(ts); long utcTs = ts + offset; switch (range) { case HOUR: return ceil(utcTs, MILLIS_PER_HOUR) - offset; case DAY: return ...
java
public static long timestampCeil(TimeUnitRange range, long ts, TimeZone tz) { // assume that we are at UTC timezone, just for algorithm performance long offset = tz.getOffset(ts); long utcTs = ts + offset; switch (range) { case HOUR: return ceil(utcTs, MILLIS_PER_HOUR) - offset; case DAY: return ...
[ "public", "static", "long", "timestampCeil", "(", "TimeUnitRange", "range", ",", "long", "ts", ",", "TimeZone", "tz", ")", "{", "// assume that we are at UTC timezone, just for algorithm performance", "long", "offset", "=", "tz", ".", "getOffset", "(", "ts", ")", ";...
Keep the algorithm consistent with Calcite DateTimeUtils.julianDateFloor, but here we take time zone into account.
[ "Keep", "the", "algorithm", "consistent", "with", "Calcite", "DateTimeUtils", ".", "julianDateFloor", "but", "here", "we", "take", "time", "zone", "into", "account", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/functions/SqlDateTimeUtils.java#L627-L647
sebastiangraf/treetank
interfacemodules/jax-rx/src/main/java/org/treetank/service/jaxrx/util/RestXPathProcessor.java
RestXPathProcessor.doXPathRes
private void doXPathRes(final String resource, final Long revision, final OutputStream output, final boolean nodeid, final String xpath) throws TTException { // Storage connection to treetank ISession session = null; INodeReadTrx rtx = null; try { if (mDatabase.exists...
java
private void doXPathRes(final String resource, final Long revision, final OutputStream output, final boolean nodeid, final String xpath) throws TTException { // Storage connection to treetank ISession session = null; INodeReadTrx rtx = null; try { if (mDatabase.exists...
[ "private", "void", "doXPathRes", "(", "final", "String", "resource", ",", "final", "Long", "revision", ",", "final", "OutputStream", "output", ",", "final", "boolean", "nodeid", ",", "final", "String", "xpath", ")", "throws", "TTException", "{", "// Storage conn...
This method performs an XPath evaluation and writes it to a given output stream. @param resource The existing resource. @param revision The revision of the requested document. @param output The output stream where the results are written. @param nodeid <code>true</code> if node id's have to be delivered. <code>false</...
[ "This", "method", "performs", "an", "XPath", "evaluation", "and", "writes", "it", "to", "a", "given", "output", "stream", "." ]
train
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/jax-rx/src/main/java/org/treetank/service/jaxrx/util/RestXPathProcessor.java#L216-L242
cloudinary/cloudinary_java
cloudinary-core/src/main/java/com/cloudinary/Api.java
Api.createStreamingProfile
public ApiResponse createStreamingProfile(String name, String displayName, List<Map> representations, Map options) throws Exception { if (options == null) options = ObjectUtils.emptyMap(); List<Map> serializedRepresentations = new ArrayList<Map>(representations.size()); for (Map t : ...
java
public ApiResponse createStreamingProfile(String name, String displayName, List<Map> representations, Map options) throws Exception { if (options == null) options = ObjectUtils.emptyMap(); List<Map> serializedRepresentations = new ArrayList<Map>(representations.size()); for (Map t : ...
[ "public", "ApiResponse", "createStreamingProfile", "(", "String", "name", ",", "String", "displayName", ",", "List", "<", "Map", ">", "representations", ",", "Map", "options", ")", "throws", "Exception", "{", "if", "(", "options", "==", "null", ")", "options",...
Create a new streaming profile @param name the of the profile @param displayName the display name of the profile @param representations a collection of Maps with a transformation key @param options additional options @return the new streaming profile @throws Exception an exception
[ "Create", "a", "new", "streaming", "profile" ]
train
https://github.com/cloudinary/cloudinary_java/blob/58ee1823180da2dea6a2eb7e5cf00d5a760f8aef/cloudinary-core/src/main/java/com/cloudinary/Api.java#L347-L364
alkacon/opencms-core
src-setup/org/opencms/setup/db/update6to7/postgresql/CmsUpdateDBAlterTables.java
CmsUpdateDBAlterTables.initReplacer
private void initReplacer(Map<String, String> replacer, String tableName, String fieldName) { replacer.clear(); replacer.put(REPLACEMENT_TABLENAME, tableName); replacer.put(REPLACEMENT_FIELD_NAME, fieldName); }
java
private void initReplacer(Map<String, String> replacer, String tableName, String fieldName) { replacer.clear(); replacer.put(REPLACEMENT_TABLENAME, tableName); replacer.put(REPLACEMENT_FIELD_NAME, fieldName); }
[ "private", "void", "initReplacer", "(", "Map", "<", "String", ",", "String", ">", "replacer", ",", "String", "tableName", ",", "String", "fieldName", ")", "{", "replacer", ".", "clear", "(", ")", ";", "replacer", ".", "put", "(", "REPLACEMENT_TABLENAME", "...
Initializes the replacer.<p> @param replacer the replacer @param tableName the table name @param fieldName the field name
[ "Initializes", "the", "replacer", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-setup/org/opencms/setup/db/update6to7/postgresql/CmsUpdateDBAlterTables.java#L178-L183
googlegenomics/utils-java
src/main/java/com/google/cloud/genomics/utils/GenomicsFactory.java
GenomicsFactory.fromServiceAccount
public <T extends AbstractGoogleJsonClient.Builder> T fromServiceAccount(T builder, String serviceAccountId, File p12File) throws GeneralSecurityException, IOException { Preconditions.checkNotNull(builder); GoogleCredential creds = new GoogleCredential.Builder() .setTransport(httpTransport) ...
java
public <T extends AbstractGoogleJsonClient.Builder> T fromServiceAccount(T builder, String serviceAccountId, File p12File) throws GeneralSecurityException, IOException { Preconditions.checkNotNull(builder); GoogleCredential creds = new GoogleCredential.Builder() .setTransport(httpTransport) ...
[ "public", "<", "T", "extends", "AbstractGoogleJsonClient", ".", "Builder", ">", "T", "fromServiceAccount", "(", "T", "builder", ",", "String", "serviceAccountId", ",", "File", "p12File", ")", "throws", "GeneralSecurityException", ",", "IOException", "{", "Preconditi...
Prepare an AbstractGoogleJsonClient.Builder with the given service account ID and private key {@link File}. @param builder The builder to be prepared. @param serviceAccountId The service account ID (typically an email address) @param p12File The file on disk containing the private key @return The passed in builder, fo...
[ "Prepare", "an", "AbstractGoogleJsonClient", ".", "Builder", "with", "the", "given", "service", "account", "ID", "and", "private", "key", "{", "@link", "File", "}", "." ]
train
https://github.com/googlegenomics/utils-java/blob/7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612/src/main/java/com/google/cloud/genomics/utils/GenomicsFactory.java#L458-L470
jhunters/jprotobuf
v3/src/main/java/com/baidu/bjf/remoting/protobuf/ProtobufIDLProxy.java
ProtobufIDLProxy.generateProtobufDefinedForField
private static void generateProtobufDefinedForField(StringBuilder code, FieldElement field, Set<String> enumNames) { code.append("@").append(Protobuf.class.getSimpleName()).append("("); String fieldType = fieldTypeMapping.get(getTypeName(field)); if (fieldType == null) { if (en...
java
private static void generateProtobufDefinedForField(StringBuilder code, FieldElement field, Set<String> enumNames) { code.append("@").append(Protobuf.class.getSimpleName()).append("("); String fieldType = fieldTypeMapping.get(getTypeName(field)); if (fieldType == null) { if (en...
[ "private", "static", "void", "generateProtobufDefinedForField", "(", "StringBuilder", "code", ",", "FieldElement", "field", ",", "Set", "<", "String", ">", "enumNames", ")", "{", "code", ".", "append", "(", "\"@\"", ")", ".", "append", "(", "Protobuf", ".", ...
to generate @Protobuf defined code for target field. @param code the code @param field the field @param enumNames the enum names
[ "to", "generate", "@Protobuf", "defined", "code", "for", "target", "field", "." ]
train
https://github.com/jhunters/jprotobuf/blob/55832c9b4792afb128e5b35139d8a3891561d8a3/v3/src/main/java/com/baidu/bjf/remoting/protobuf/ProtobufIDLProxy.java#L1397-L1423
Tristan971/EasyFXML
easyfxml/src/main/java/moe/tristan/easyfxml/util/Nodes.java
Nodes.centerNode
public static void centerNode(final Node node, final Double marginSize) { AnchorPane.setTopAnchor(node, marginSize); AnchorPane.setBottomAnchor(node, marginSize); AnchorPane.setLeftAnchor(node, marginSize); AnchorPane.setRightAnchor(node, marginSize); }
java
public static void centerNode(final Node node, final Double marginSize) { AnchorPane.setTopAnchor(node, marginSize); AnchorPane.setBottomAnchor(node, marginSize); AnchorPane.setLeftAnchor(node, marginSize); AnchorPane.setRightAnchor(node, marginSize); }
[ "public", "static", "void", "centerNode", "(", "final", "Node", "node", ",", "final", "Double", "marginSize", ")", "{", "AnchorPane", ".", "setTopAnchor", "(", "node", ",", "marginSize", ")", ";", "AnchorPane", ".", "setBottomAnchor", "(", "node", ",", "marg...
Centers a node that is inside an enclosing {@link AnchorPane}. @param node The node to center @param marginSize The margins to keep on the sides
[ "Centers", "a", "node", "that", "is", "inside", "an", "enclosing", "{", "@link", "AnchorPane", "}", "." ]
train
https://github.com/Tristan971/EasyFXML/blob/f82cad1d54e62903ca5e4a250279ad315b028aef/easyfxml/src/main/java/moe/tristan/easyfxml/util/Nodes.java#L21-L26
alkacon/opencms-core
src/org/opencms/ui/components/extensions/CmsGwtDialogExtension.java
CmsGwtDialogExtension.getPublishData
protected CmsPublishData getPublishData(CmsProject project, List<CmsResource> directPublishResources) { CmsPublishService publishService = new CmsPublishService(); CmsObject cms = A_CmsUI.getCmsObject(); publishService.setCms(cms); List<String> pathList = new ArrayList<String>(); ...
java
protected CmsPublishData getPublishData(CmsProject project, List<CmsResource> directPublishResources) { CmsPublishService publishService = new CmsPublishService(); CmsObject cms = A_CmsUI.getCmsObject(); publishService.setCms(cms); List<String> pathList = new ArrayList<String>(); ...
[ "protected", "CmsPublishData", "getPublishData", "(", "CmsProject", "project", ",", "List", "<", "CmsResource", ">", "directPublishResources", ")", "{", "CmsPublishService", "publishService", "=", "new", "CmsPublishService", "(", ")", ";", "CmsObject", "cms", "=", "...
Gets the publish data for the given resources.<p> @param directPublishResources the resources to publish @param project the project for which to open the dialog @return the publish data for the resources
[ "Gets", "the", "publish", "data", "for", "the", "given", "resources", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/components/extensions/CmsGwtDialogExtension.java#L283-L308
ozimov/cirneco
hamcrest/hamcrest-matchers/src/main/java/it/ozimov/cirneco/hamcrest/throwable/ExpectedException.java
ExpectedException.exceptionWithMessage
public static Matcher<Throwable> exceptionWithMessage(Class<? extends Throwable> type, String expectedMessage) { return new ExpectedException(type, expectedMessage); }
java
public static Matcher<Throwable> exceptionWithMessage(Class<? extends Throwable> type, String expectedMessage) { return new ExpectedException(type, expectedMessage); }
[ "public", "static", "Matcher", "<", "Throwable", ">", "exceptionWithMessage", "(", "Class", "<", "?", "extends", "Throwable", ">", "type", ",", "String", "expectedMessage", ")", "{", "return", "new", "ExpectedException", "(", "type", ",", "expectedMessage", ")",...
Creates a matcher for a {@link Throwable} that matches when the provided {@code Throwable} instance is the same or a subtype of the given class and has the same message in the error message or the message is contained in the error message
[ "Creates", "a", "matcher", "for", "a", "{" ]
train
https://github.com/ozimov/cirneco/blob/78ad782da0a2256634cfbebb2f97ed78c993b999/hamcrest/hamcrest-matchers/src/main/java/it/ozimov/cirneco/hamcrest/throwable/ExpectedException.java#L40-L42
fuinorg/event-store-commons
spi/src/main/java/org/fuin/esc/spi/SimpleSerializerDeserializerRegistry.java
SimpleSerializerDeserializerRegistry.addDeserializer
public final void addDeserializer(@NotNull final SerializedDataType type, final String contentType, @NotNull final Deserializer deserializer) { Contract.requireArgNotNull("type", type); Contract.requireArgNotNull("contentType", contentType); Contract.requireArgNotNull("deserial...
java
public final void addDeserializer(@NotNull final SerializedDataType type, final String contentType, @NotNull final Deserializer deserializer) { Contract.requireArgNotNull("type", type); Contract.requireArgNotNull("contentType", contentType); Contract.requireArgNotNull("deserial...
[ "public", "final", "void", "addDeserializer", "(", "@", "NotNull", "final", "SerializedDataType", "type", ",", "final", "String", "contentType", ",", "@", "NotNull", "final", "Deserializer", "deserializer", ")", "{", "Contract", ".", "requireArgNotNull", "(", "\"t...
Adds a new deserializer to the registry. @param type Type of the data. @param contentType Content type like "application/xml" or "application/json" (without parameters - Only base type). @param deserializer Deserializer.
[ "Adds", "a", "new", "deserializer", "to", "the", "registry", "." ]
train
https://github.com/fuinorg/event-store-commons/blob/ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c/spi/src/main/java/org/fuin/esc/spi/SimpleSerializerDeserializerRegistry.java#L78-L88
OpenLiberty/open-liberty
dev/com.ibm.ws.org.apache.jasper.el/src/org/apache/el/util/ReflectionUtil.java
ReflectionUtil.isCoercibleFrom
private static boolean isCoercibleFrom(EvaluationContext ctx, Object src, Class<?> target) { // TODO: This isn't pretty but it works. Significant refactoring would // be required to avoid the exception. try { ELSupport.coerceToType(ctx, src, target); } catch (ELExceptio...
java
private static boolean isCoercibleFrom(EvaluationContext ctx, Object src, Class<?> target) { // TODO: This isn't pretty but it works. Significant refactoring would // be required to avoid the exception. try { ELSupport.coerceToType(ctx, src, target); } catch (ELExceptio...
[ "private", "static", "boolean", "isCoercibleFrom", "(", "EvaluationContext", "ctx", ",", "Object", "src", ",", "Class", "<", "?", ">", "target", ")", "{", "// TODO: This isn't pretty but it works. Significant refactoring would", "// be required to avoid the exception.", ...
/* This class duplicates code in javax.el.Util. When making changes keep the code in sync.
[ "/", "*", "This", "class", "duplicates", "code", "in", "javax", ".", "el", ".", "Util", ".", "When", "making", "changes", "keep", "the", "code", "in", "sync", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.org.apache.jasper.el/src/org/apache/el/util/ReflectionUtil.java#L401-L410
fcrepo3/fcrepo
fcrepo-common/src/main/java/org/fcrepo/common/policy/XacmlName.java
XacmlName.looselyMatches
public boolean looselyMatches(String in, boolean tryFirstLocalNameChar) { if (in == null || in.length() == 0) { return false; } if (in.equalsIgnoreCase(localName)) { return true; } if (in.equals(uri)) { return true; } if (tryFir...
java
public boolean looselyMatches(String in, boolean tryFirstLocalNameChar) { if (in == null || in.length() == 0) { return false; } if (in.equalsIgnoreCase(localName)) { return true; } if (in.equals(uri)) { return true; } if (tryFir...
[ "public", "boolean", "looselyMatches", "(", "String", "in", ",", "boolean", "tryFirstLocalNameChar", ")", "{", "if", "(", "in", "==", "null", "||", "in", ".", "length", "(", ")", "==", "0", ")", "{", "return", "false", ";", "}", "if", "(", "in", ".",...
Does the given string loosely match this name? Either: 1) It matches localName (case insensitive) 2) It matches uri (case sensitive) if (firstLocalNameChar == true): 3) It is one character long, and that character matches the first character of localName (case insensitive)
[ "Does", "the", "given", "string", "loosely", "match", "this", "name?", "Either", ":", "1", ")", "It", "matches", "localName", "(", "case", "insensitive", ")", "2", ")", "It", "matches", "uri", "(", "case", "sensitive", ")", "if", "(", "firstLocalNameChar",...
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-common/src/main/java/org/fcrepo/common/policy/XacmlName.java#L66-L83
alkacon/opencms-core
src/org/opencms/search/fields/CmsSearchFieldConfiguration.java
CmsSearchFieldConfiguration.getLocaleExtendedName
public static final String getLocaleExtendedName(String lookup, String locale) { StringBuffer result = new StringBuffer(32); result.append(lookup); result.append('_'); result.append(locale); return result.toString(); }
java
public static final String getLocaleExtendedName(String lookup, String locale) { StringBuffer result = new StringBuffer(32); result.append(lookup); result.append('_'); result.append(locale); return result.toString(); }
[ "public", "static", "final", "String", "getLocaleExtendedName", "(", "String", "lookup", ",", "String", "locale", ")", "{", "StringBuffer", "result", "=", "new", "StringBuffer", "(", "32", ")", ";", "result", ".", "append", "(", "lookup", ")", ";", "result",...
Returns the locale extended name for the given lookup String.<p> @param lookup the lookup String @param locale the locale @return the locale extended name for the given lookup String
[ "Returns", "the", "locale", "extended", "name", "for", "the", "given", "lookup", "String", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/search/fields/CmsSearchFieldConfiguration.java#L111-L118
magro/memcached-session-manager
core/src/main/java/de/javakaffee/web/msm/TranscoderService.java
TranscoderService.encodeNum
public static int encodeNum( final long num, final byte[] data, final int beginIndex, final int maxBytes ) { for ( int i = 0; i < maxBytes; i++ ) { final int pos = maxBytes - i - 1; // the position of the byte in the number final int idx = beginIndex + pos; // the index in the data array...
java
public static int encodeNum( final long num, final byte[] data, final int beginIndex, final int maxBytes ) { for ( int i = 0; i < maxBytes; i++ ) { final int pos = maxBytes - i - 1; // the position of the byte in the number final int idx = beginIndex + pos; // the index in the data array...
[ "public", "static", "int", "encodeNum", "(", "final", "long", "num", ",", "final", "byte", "[", "]", "data", ",", "final", "int", "beginIndex", ",", "final", "int", "maxBytes", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "maxBytes", ...
Convert a number to bytes (with length of maxBytes) and write bytes into the provided byte[] data starting at the specified beginIndex. @param num the number to encode @param data the byte array into that the number is encoded @param beginIndex the beginning index of data where to start encoding, inclusive. @param max...
[ "Convert", "a", "number", "to", "bytes", "(", "with", "length", "of", "maxBytes", ")", "and", "write", "bytes", "into", "the", "provided", "byte", "[]", "data", "starting", "at", "the", "specified", "beginIndex", "." ]
train
https://github.com/magro/memcached-session-manager/blob/716e147c9840ab10298c4d2b9edd0662058331e6/core/src/main/java/de/javakaffee/web/msm/TranscoderService.java#L500-L507
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/xtal/CrystalBuilder.java
CrystalBuilder.expandNcsOps
public static void expandNcsOps(Structure structure, Map<String,String> chainOrigNames, Map<String,Matrix4d> chainNcsOps) { PDBCrystallographicInfo xtalInfo = structure.getCrystallographicInfo(); if (xtalInfo ==null) return; if (xtalInfo.getNcsOperators()==null || xtalInfo.getNcsOperators().length==0) return;...
java
public static void expandNcsOps(Structure structure, Map<String,String> chainOrigNames, Map<String,Matrix4d> chainNcsOps) { PDBCrystallographicInfo xtalInfo = structure.getCrystallographicInfo(); if (xtalInfo ==null) return; if (xtalInfo.getNcsOperators()==null || xtalInfo.getNcsOperators().length==0) return;...
[ "public", "static", "void", "expandNcsOps", "(", "Structure", "structure", ",", "Map", "<", "String", ",", "String", ">", "chainOrigNames", ",", "Map", "<", "String", ",", "Matrix4d", ">", "chainNcsOps", ")", "{", "PDBCrystallographicInfo", "xtalInfo", "=", "s...
Apply the NCS operators in the given Structure adding new chains as needed. All chains are (re)assigned ids of the form: original_chain_id+ncs_operator_index+{@value #NCS_CHAINID_SUFFIX_CHAR}. @param structure the structure to expand @param chainOrigNames new chain names mapped to the original chain names @param chainN...
[ "Apply", "the", "NCS", "operators", "in", "the", "given", "Structure", "adding", "new", "chains", "as", "needed", ".", "All", "chains", "are", "(", "re", ")", "assigned", "ids", "of", "the", "form", ":", "original_chain_id", "+", "ncs_operator_index", "+", ...
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/xtal/CrystalBuilder.java#L569-L611
Baidu-AIP/java-sdk
src/main/java/com/baidu/aip/imagesearch/AipImageSearch.java
AipImageSearch.productAddUrl
public JSONObject productAddUrl(String url, HashMap<String, String> options) { AipRequest request = new AipRequest(); preOperation(request); request.addBody("url", url); if (options != null) { request.addBody(options); } request.setUri(ImageSearchCons...
java
public JSONObject productAddUrl(String url, HashMap<String, String> options) { AipRequest request = new AipRequest(); preOperation(request); request.addBody("url", url); if (options != null) { request.addBody(options); } request.setUri(ImageSearchCons...
[ "public", "JSONObject", "productAddUrl", "(", "String", "url", ",", "HashMap", "<", "String", ",", "String", ">", "options", ")", "{", "AipRequest", "request", "=", "new", "AipRequest", "(", ")", ";", "preOperation", "(", "request", ")", ";", "request", "....
商品检索—入库接口 **该接口实现单张图片入库,入库时需要同步提交图片及可关联至本地图库的摘要信息(具体变量为brief,具体可传入图片在本地标记id、图片url、图片名称等)。同时可提交分类维度信息(具体变量为class_id1、class_id2),方便对图库中的图片进行管理、分类检索。****注:重复添加完全相同的图片会返回错误。** @param url - 图片完整URL,URL长度不超过1024字节,URL对应的图片base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式,当image字段存在时url字段失效 @param options - 可选参数对象,key: ...
[ "商品检索—入库接口", "**", "该接口实现单张图片入库,入库时需要同步提交图片及可关联至本地图库的摘要信息(具体变量为brief,具体可传入图片在本地标记id、图片url、图片名称等)。同时可提交分类维度信息(具体变量为class_id1、class_id2),方便对图库中的图片进行管理、分类检索。", "****", "注:重复添加完全相同的图片会返回错误。", "**" ]
train
https://github.com/Baidu-AIP/java-sdk/blob/16bb8b7bb8f9bbcb7c8af62d0a67a1e79eecad90/src/main/java/com/baidu/aip/imagesearch/AipImageSearch.java#L744-L755
infinispan/infinispan
core/src/main/java/org/infinispan/remoting/transport/AbstractRequest.java
AbstractRequest.setTimeout
public void setTimeout(ScheduledExecutorService timeoutExecutor, long timeout, TimeUnit unit) { cancelTimeoutTask(); ScheduledFuture<Void> timeoutFuture = timeoutExecutor.schedule(this, timeout, unit); setTimeoutFuture(timeoutFuture); }
java
public void setTimeout(ScheduledExecutorService timeoutExecutor, long timeout, TimeUnit unit) { cancelTimeoutTask(); ScheduledFuture<Void> timeoutFuture = timeoutExecutor.schedule(this, timeout, unit); setTimeoutFuture(timeoutFuture); }
[ "public", "void", "setTimeout", "(", "ScheduledExecutorService", "timeoutExecutor", ",", "long", "timeout", ",", "TimeUnit", "unit", ")", "{", "cancelTimeoutTask", "(", ")", ";", "ScheduledFuture", "<", "Void", ">", "timeoutFuture", "=", "timeoutExecutor", ".", "s...
Schedule a timeout task on the given executor, and complete the request with a {@link org.infinispan.util.concurrent.TimeoutException} when the task runs. If a timeout task was already registered with this request, it is cancelled.
[ "Schedule", "a", "timeout", "task", "on", "the", "given", "executor", "and", "complete", "the", "request", "with", "a", "{", "@link", "org", ".", "infinispan", ".", "util", ".", "concurrent", ".", "TimeoutException", "}", "when", "the", "task", "runs", "."...
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/remoting/transport/AbstractRequest.java#L52-L56
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/FilesImpl.java
FilesImpl.listFromComputeNode
public PagedList<NodeFile> listFromComputeNode(final String poolId, final String nodeId, final Boolean recursive, final FileListFromComputeNodeOptions fileListFromComputeNodeOptions) { ServiceResponseWithHeaders<Page<NodeFile>, FileListFromComputeNodeHeaders> response = listFromComputeNodeSinglePageAsync(poolId...
java
public PagedList<NodeFile> listFromComputeNode(final String poolId, final String nodeId, final Boolean recursive, final FileListFromComputeNodeOptions fileListFromComputeNodeOptions) { ServiceResponseWithHeaders<Page<NodeFile>, FileListFromComputeNodeHeaders> response = listFromComputeNodeSinglePageAsync(poolId...
[ "public", "PagedList", "<", "NodeFile", ">", "listFromComputeNode", "(", "final", "String", "poolId", ",", "final", "String", "nodeId", ",", "final", "Boolean", "recursive", ",", "final", "FileListFromComputeNodeOptions", "fileListFromComputeNodeOptions", ")", "{", "S...
Lists all of the files in task directories on the specified compute node. @param poolId The ID of the pool that contains the compute node. @param nodeId The ID of the compute node whose files you want to list. @param recursive Whether to list children of a directory. @param fileListFromComputeNodeOptions Additional pa...
[ "Lists", "all", "of", "the", "files", "in", "task", "directories", "on", "the", "specified", "compute", "node", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/FilesImpl.java#L2049-L2064
qspin/qtaste
plugins_src/javagui-fx/src/main/java/com/qspin/qtaste/javaguifx/server/ComponentCommander.java
ComponentCommander.lookForComponent
protected Component lookForComponent(String name, ObservableList<Node> components) { for (int i = 0; i < components.size() && !mFindWithEqual; i++) { //String componentName = ComponentNamer.getInstance().getNameForComponent(components[c]); Node c = components.get(i); checkNam...
java
protected Component lookForComponent(String name, ObservableList<Node> components) { for (int i = 0; i < components.size() && !mFindWithEqual; i++) { //String componentName = ComponentNamer.getInstance().getNameForComponent(components[c]); Node c = components.get(i); checkNam...
[ "protected", "Component", "lookForComponent", "(", "String", "name", ",", "ObservableList", "<", "Node", ">", "components", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "components", ".", "size", "(", ")", "&&", "!", "mFindWithEqual", ";", ...
Browses recursively the components in order to find components with the name. @param name the component's name. @param components components to browse. @return the first component with the name.
[ "Browses", "recursively", "the", "components", "in", "order", "to", "find", "components", "with", "the", "name", "." ]
train
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/plugins_src/javagui-fx/src/main/java/com/qspin/qtaste/javaguifx/server/ComponentCommander.java#L105-L120
opencb/biodata
biodata-tools/src/main/java/org/opencb/biodata/tools/alignment/BamUtils.java
BamUtils.checkBamOrCramFile
public static void checkBamOrCramFile(InputStream is, String bamFileName, boolean checkSort) throws IOException { SamReaderFactory srf = SamReaderFactory.make(); srf.validationStringency(ValidationStringency.LENIENT); SamReader reader = srf.open(SamInputResource.of(is)); SAMFileHeader f...
java
public static void checkBamOrCramFile(InputStream is, String bamFileName, boolean checkSort) throws IOException { SamReaderFactory srf = SamReaderFactory.make(); srf.validationStringency(ValidationStringency.LENIENT); SamReader reader = srf.open(SamInputResource.of(is)); SAMFileHeader f...
[ "public", "static", "void", "checkBamOrCramFile", "(", "InputStream", "is", ",", "String", "bamFileName", ",", "boolean", "checkSort", ")", "throws", "IOException", "{", "SamReaderFactory", "srf", "=", "SamReaderFactory", ".", "make", "(", ")", ";", "srf", ".", ...
Check if the file is a sorted binary bam file. @param is Bam InputStream @param bamFileName Bam FileName @param checkSort @throws IOException
[ "Check", "if", "the", "file", "is", "a", "sorted", "binary", "bam", "file", "." ]
train
https://github.com/opencb/biodata/blob/21b3d51d71f578efab908422aca4bab7a73097b1/biodata-tools/src/main/java/org/opencb/biodata/tools/alignment/BamUtils.java#L134-L158
spring-projects/spring-boot
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/Bindable.java
Bindable.mapOf
public static <K, V> Bindable<Map<K, V>> mapOf(Class<K> keyType, Class<V> valueType) { return of(ResolvableType.forClassWithGenerics(Map.class, keyType, valueType)); }
java
public static <K, V> Bindable<Map<K, V>> mapOf(Class<K> keyType, Class<V> valueType) { return of(ResolvableType.forClassWithGenerics(Map.class, keyType, valueType)); }
[ "public", "static", "<", "K", ",", "V", ">", "Bindable", "<", "Map", "<", "K", ",", "V", ">", ">", "mapOf", "(", "Class", "<", "K", ">", "keyType", ",", "Class", "<", "V", ">", "valueType", ")", "{", "return", "of", "(", "ResolvableType", ".", ...
Create a new {@link Bindable} {@link Map} of the specified key and value type. @param <K> the key type @param <V> the value type @param keyType the map key type @param valueType the map value type @return a {@link Bindable} instance
[ "Create", "a", "new", "{" ]
train
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/Bindable.java#L235-L237
charithe/kafka-junit
src/main/java/com/github/charithe/kafka/KafkaHelper.java
KafkaHelper.produceStrings
public void produceStrings(String topic, String... values) { try (KafkaProducer<String, String> producer = createStringProducer()) { Map<String, String> data = Arrays.stream(values) .collect(Collectors.toMap(k -> String.valueOf(k.hashCode()), Function.identity())); pr...
java
public void produceStrings(String topic, String... values) { try (KafkaProducer<String, String> producer = createStringProducer()) { Map<String, String> data = Arrays.stream(values) .collect(Collectors.toMap(k -> String.valueOf(k.hashCode()), Function.identity())); pr...
[ "public", "void", "produceStrings", "(", "String", "topic", ",", "String", "...", "values", ")", "{", "try", "(", "KafkaProducer", "<", "String", ",", "String", ">", "producer", "=", "createStringProducer", "(", ")", ")", "{", "Map", "<", "String", ",", ...
Convenience method to produce a set of strings to the specified topic @param topic Topic to produce to @param values Values produce
[ "Convenience", "method", "to", "produce", "a", "set", "of", "strings", "to", "the", "specified", "topic" ]
train
https://github.com/charithe/kafka-junit/blob/b808b3d1dec8105346d316f92f68950f36aeb871/src/main/java/com/github/charithe/kafka/KafkaHelper.java#L190-L196
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/executiongraph/ExecutionGraph.java
ExecutionGraph.constructExecutionGraph
private void constructExecutionGraph(final JobGraph jobGraph, final InstanceManager instanceManager) throws GraphConversionException { // Clean up temporary data structures final HashMap<AbstractJobVertex, ExecutionVertex> temporaryVertexMap = new HashMap<AbstractJobVertex, ExecutionVertex>(); final HashMap<A...
java
private void constructExecutionGraph(final JobGraph jobGraph, final InstanceManager instanceManager) throws GraphConversionException { // Clean up temporary data structures final HashMap<AbstractJobVertex, ExecutionVertex> temporaryVertexMap = new HashMap<AbstractJobVertex, ExecutionVertex>(); final HashMap<A...
[ "private", "void", "constructExecutionGraph", "(", "final", "JobGraph", "jobGraph", ",", "final", "InstanceManager", "instanceManager", ")", "throws", "GraphConversionException", "{", "// Clean up temporary data structures", "final", "HashMap", "<", "AbstractJobVertex", ",", ...
Sets up an execution graph from a job graph. @param jobGraph the job graph to create the execution graph from @param instanceManager the instance manager @throws GraphConversionException thrown if the job graph is not valid and no execution graph can be constructed from it
[ "Sets", "up", "an", "execution", "graph", "from", "a", "job", "graph", "." ]
train
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/executiongraph/ExecutionGraph.java#L261-L292
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/db/GridTable.java
GridTable.addNewBookmark
public int addNewBookmark(Object bookmark, int iHandleType) { if (bookmark == null) return -1; if (iHandleType != DBConstants.DATA_SOURCE_HANDLE) { // The only thing that I know for sure is the bookmark is correct. DataRecord dataRecord = new DataRecord(null); ...
java
public int addNewBookmark(Object bookmark, int iHandleType) { if (bookmark == null) return -1; if (iHandleType != DBConstants.DATA_SOURCE_HANDLE) { // The only thing that I know for sure is the bookmark is correct. DataRecord dataRecord = new DataRecord(null); ...
[ "public", "int", "addNewBookmark", "(", "Object", "bookmark", ",", "int", "iHandleType", ")", "{", "if", "(", "bookmark", "==", "null", ")", "return", "-", "1", ";", "if", "(", "iHandleType", "!=", "DBConstants", ".", "DATA_SOURCE_HANDLE", ")", "{", "// Th...
Here is a bookmark for a brand new record, add it to the end of the list. @param bookmark The bookmark (usually a DataRecord) of the record to add. @param iHandleType The type of bookmark to add. @return the index of the new entry.
[ "Here", "is", "a", "bookmark", "for", "a", "brand", "new", "record", "add", "it", "to", "the", "end", "of", "the", "list", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/GridTable.java#L665-L688
google/error-prone
core/src/main/java/com/google/errorprone/bugpatterns/AbstractJUnit4InitMethodNotRun.java
AbstractJUnit4InitMethodNotRun.matchMethod
@Override public Description matchMethod(MethodTree methodTree, VisitorState state) { boolean matches = allOf( methodMatcher(), not(hasAnnotationOnAnyOverriddenMethod(JUNIT_TEST)), enclosingClass(isJUnit4TestClass)) .matches(methodTree, state); ...
java
@Override public Description matchMethod(MethodTree methodTree, VisitorState state) { boolean matches = allOf( methodMatcher(), not(hasAnnotationOnAnyOverriddenMethod(JUNIT_TEST)), enclosingClass(isJUnit4TestClass)) .matches(methodTree, state); ...
[ "@", "Override", "public", "Description", "matchMethod", "(", "MethodTree", "methodTree", ",", "VisitorState", "state", ")", "{", "boolean", "matches", "=", "allOf", "(", "methodMatcher", "(", ")", ",", "not", "(", "hasAnnotationOnAnyOverriddenMethod", "(", "JUNIT...
Matches if all of the following conditions are true: 1) The method matches {@link #methodMatcher()}, (looks like setUp() or tearDown(), and none of the overrides in the hierarchy of the method have the appropriate @Before or @After annotations) 2) The method is not annotated with @Test 3) The enclosing class has an @Ru...
[ "Matches", "if", "all", "of", "the", "following", "conditions", "are", "true", ":", "1", ")", "The", "method", "matches", "{" ]
train
https://github.com/google/error-prone/blob/fe2e3cc2cf1958cb7c487bfe89852bb4c225ba9d/core/src/main/java/com/google/errorprone/bugpatterns/AbstractJUnit4InitMethodNotRun.java#L84-L130
j256/ormlite-android
src/main/java/com/j256/ormlite/android/apptools/OrmLiteConfigUtil.java
OrmLiteConfigUtil.writeConfigFile
public static void writeConfigFile(String fileName, Class<?>[] classes, boolean sortClasses) throws SQLException, IOException { File rawDir = findRawDir(new File(".")); if (rawDir == null) { System.err.println("Could not find " + RAW_DIR_NAME + " directory which is typically in the " + RESOURCE_DIR_NAME ...
java
public static void writeConfigFile(String fileName, Class<?>[] classes, boolean sortClasses) throws SQLException, IOException { File rawDir = findRawDir(new File(".")); if (rawDir == null) { System.err.println("Could not find " + RAW_DIR_NAME + " directory which is typically in the " + RESOURCE_DIR_NAME ...
[ "public", "static", "void", "writeConfigFile", "(", "String", "fileName", ",", "Class", "<", "?", ">", "[", "]", "classes", ",", "boolean", "sortClasses", ")", "throws", "SQLException", ",", "IOException", "{", "File", "rawDir", "=", "findRawDir", "(", "new"...
Writes a configuration fileName in the raw directory with the configuration for classes. @param sortClasses Set to true to sort the classes by name before the file is generated.
[ "Writes", "a", "configuration", "fileName", "in", "the", "raw", "directory", "with", "the", "configuration", "for", "classes", "." ]
train
https://github.com/j256/ormlite-android/blob/e82327a868ae242f994730fe2389f79684d7bcab/src/main/java/com/j256/ormlite/android/apptools/OrmLiteConfigUtil.java#L134-L144
gosu-lang/gosu-lang
gosu-core-api/src/main/java/gw/util/GosuStringUtil.java
GosuStringUtil.getPrechomp
public static String getPrechomp(String str, String sep) { int idx = str.indexOf(sep); if (idx == -1) { return EMPTY; } return str.substring(0, idx + sep.length()); }
java
public static String getPrechomp(String str, String sep) { int idx = str.indexOf(sep); if (idx == -1) { return EMPTY; } return str.substring(0, idx + sep.length()); }
[ "public", "static", "String", "getPrechomp", "(", "String", "str", ",", "String", "sep", ")", "{", "int", "idx", "=", "str", ".", "indexOf", "(", "sep", ")", ";", "if", "(", "idx", "==", "-", "1", ")", "{", "return", "EMPTY", ";", "}", "return", ...
<p>Remove and return everything before the first value of a supplied String from another String.</p> @param str the String to chomp from, must not be null @param sep the String to chomp, must not be null @return String prechomped @throws NullPointerException if str or sep is <code>null</code> @deprecated Use {@link ...
[ "<p", ">", "Remove", "and", "return", "everything", "before", "the", "first", "value", "of", "a", "supplied", "String", "from", "another", "String", ".", "<", "/", "p", ">" ]
train
https://github.com/gosu-lang/gosu-lang/blob/d6e9261b137ce66fef3726cabe7826d4a1f946b7/gosu-core-api/src/main/java/gw/util/GosuStringUtil.java#L4090-L4096
aws/aws-sdk-java
aws-java-sdk-elasticsearch/src/main/java/com/amazonaws/services/elasticsearch/model/ElasticsearchDomainStatus.java
ElasticsearchDomainStatus.withAdvancedOptions
public ElasticsearchDomainStatus withAdvancedOptions(java.util.Map<String, String> advancedOptions) { setAdvancedOptions(advancedOptions); return this; }
java
public ElasticsearchDomainStatus withAdvancedOptions(java.util.Map<String, String> advancedOptions) { setAdvancedOptions(advancedOptions); return this; }
[ "public", "ElasticsearchDomainStatus", "withAdvancedOptions", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "advancedOptions", ")", "{", "setAdvancedOptions", "(", "advancedOptions", ")", ";", "return", "this", ";", "}" ]
<p> Specifies the status of the <code>AdvancedOptions</code> </p> @param advancedOptions Specifies the status of the <code>AdvancedOptions</code> @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "Specifies", "the", "status", "of", "the", "<code", ">", "AdvancedOptions<", "/", "code", ">", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-elasticsearch/src/main/java/com/amazonaws/services/elasticsearch/model/ElasticsearchDomainStatus.java#L1097-L1100
box/box-java-sdk
src/main/java/com/box/sdk/BoxFile.java
BoxFile.uploadVersion
@Deprecated public void uploadVersion(InputStream fileContent, Date modified, long fileSize, ProgressListener listener) { this.uploadVersion(fileContent, null, modified, fileSize, listener); }
java
@Deprecated public void uploadVersion(InputStream fileContent, Date modified, long fileSize, ProgressListener listener) { this.uploadVersion(fileContent, null, modified, fileSize, listener); }
[ "@", "Deprecated", "public", "void", "uploadVersion", "(", "InputStream", "fileContent", ",", "Date", "modified", ",", "long", "fileSize", ",", "ProgressListener", "listener", ")", "{", "this", ".", "uploadVersion", "(", "fileContent", ",", "null", ",", "modifie...
Uploads a new version of this file, replacing the current version, while reporting the progress to a ProgressListener. Note that only users with premium accounts will be able to view and recover previous versions of the file. @param fileContent a stream containing the new file contents. @param modified the date tha...
[ "Uploads", "a", "new", "version", "of", "this", "file", "replacing", "the", "current", "version", "while", "reporting", "the", "progress", "to", "a", "ProgressListener", ".", "Note", "that", "only", "users", "with", "premium", "accounts", "will", "be", "able",...
train
https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxFile.java#L767-L770
b3dgs/lionengine
lionengine-core/src/main/java/com/b3dgs/lionengine/UtilMath.java
UtilMath.isBetween
public static boolean isBetween(double value, double min, double max) { return Double.compare(value, min) >= 0 && Double.compare(value, max) <= 0; }
java
public static boolean isBetween(double value, double min, double max) { return Double.compare(value, min) >= 0 && Double.compare(value, max) <= 0; }
[ "public", "static", "boolean", "isBetween", "(", "double", "value", ",", "double", "min", ",", "double", "max", ")", "{", "return", "Double", ".", "compare", "(", "value", ",", "min", ")", ">=", "0", "&&", "Double", ".", "compare", "(", "value", ",", ...
Check if value is between an interval. @param value The value to check. @param min The minimum value. @param max The maximum value. @return <code>true</code> if between, <code>false</code> else.
[ "Check", "if", "value", "is", "between", "an", "interval", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-core/src/main/java/com/b3dgs/lionengine/UtilMath.java#L65-L68
lindar-open/well-rested-client
src/main/java/com/lindar/wellrested/vo/Result.java
Result.orElseDoAndReturnDefault
public T orElseDoAndReturnDefault(Consumer<Result<T>> consumer, T defaultVal) { if (isSuccessAndNotNull()) { return data; } consumer.accept(this); return defaultVal; }
java
public T orElseDoAndReturnDefault(Consumer<Result<T>> consumer, T defaultVal) { if (isSuccessAndNotNull()) { return data; } consumer.accept(this); return defaultVal; }
[ "public", "T", "orElseDoAndReturnDefault", "(", "Consumer", "<", "Result", "<", "T", ">", ">", "consumer", ",", "T", "defaultVal", ")", "{", "if", "(", "isSuccessAndNotNull", "(", ")", ")", "{", "return", "data", ";", "}", "consumer", ".", "accept", "(",...
The consumer function receives the entire result object as parameter in case you want to log or manage the error message or code in any way. @param consumer @param defaultVal @return
[ "The", "consumer", "function", "receives", "the", "entire", "result", "object", "as", "parameter", "in", "case", "you", "want", "to", "log", "or", "manage", "the", "error", "message", "or", "code", "in", "any", "way", "." ]
train
https://github.com/lindar-open/well-rested-client/blob/d87542f747cd624e3ce0cdc8230f51836326596b/src/main/java/com/lindar/wellrested/vo/Result.java#L138-L144
Azure/azure-sdk-for-java
mysql/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01/implementation/DatabasesInner.java
DatabasesInner.listByServerAsync
public Observable<List<DatabaseInner>> listByServerAsync(String resourceGroupName, String serverName) { return listByServerWithServiceResponseAsync(resourceGroupName, serverName).map(new Func1<ServiceResponse<List<DatabaseInner>>, List<DatabaseInner>>() { @Override public List<DatabaseIn...
java
public Observable<List<DatabaseInner>> listByServerAsync(String resourceGroupName, String serverName) { return listByServerWithServiceResponseAsync(resourceGroupName, serverName).map(new Func1<ServiceResponse<List<DatabaseInner>>, List<DatabaseInner>>() { @Override public List<DatabaseIn...
[ "public", "Observable", "<", "List", "<", "DatabaseInner", ">", ">", "listByServerAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ")", "{", "return", "listByServerWithServiceResponseAsync", "(", "resourceGroupName", ",", "serverName", ")", "."...
List all the databases in a given server. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @throws IllegalArgumentException thrown if parameters fail the validation ...
[ "List", "all", "the", "databases", "in", "a", "given", "server", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mysql/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01/implementation/DatabasesInner.java#L569-L576
b3dgs/lionengine
lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/collidable/CollidableConfig.java
CollidableConfig.imports
public static Integer imports(Configurer configurer) { Check.notNull(configurer); if (configurer.hasNode(NODE_GROUP)) { final String group = configurer.getText(NODE_GROUP); try { return Integer.valueOf(group); } ...
java
public static Integer imports(Configurer configurer) { Check.notNull(configurer); if (configurer.hasNode(NODE_GROUP)) { final String group = configurer.getText(NODE_GROUP); try { return Integer.valueOf(group); } ...
[ "public", "static", "Integer", "imports", "(", "Configurer", "configurer", ")", "{", "Check", ".", "notNull", "(", "configurer", ")", ";", "if", "(", "configurer", ".", "hasNode", "(", "NODE_GROUP", ")", ")", "{", "final", "String", "group", "=", "configur...
Create the collidable data from node. @param configurer The configurer reference (must not be <code>null</code>). @return The associated group, {@link #DEFAULT_GROUP} if not defined. @throws LionEngineException If unable to read node.
[ "Create", "the", "collidable", "data", "from", "node", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/collidable/CollidableConfig.java#L50-L68
to2mbn/JMCCC
jmccc/src/main/java/org/to2mbn/jmccc/version/parsing/Versions.java
Versions.resolveAssets
public static Set<Asset> resolveAssets(MinecraftDirectory minecraftDir, Version version) throws IOException { return resolveAssets(minecraftDir, version.getAssets()); }
java
public static Set<Asset> resolveAssets(MinecraftDirectory minecraftDir, Version version) throws IOException { return resolveAssets(minecraftDir, version.getAssets()); }
[ "public", "static", "Set", "<", "Asset", ">", "resolveAssets", "(", "MinecraftDirectory", "minecraftDir", ",", "Version", "version", ")", "throws", "IOException", "{", "return", "resolveAssets", "(", "minecraftDir", ",", "version", ".", "getAssets", "(", ")", ")...
Resolves the asset index. @param minecraftDir the minecraft directory @param version the owner version of the asset index @return the asset index, or null if the asset index does not exist @throws IOException if an I/O error occurs during resolving asset index @throws NullPointerException if <code>minecraftDir==null |...
[ "Resolves", "the", "asset", "index", "." ]
train
https://github.com/to2mbn/JMCCC/blob/17e5b1b56ff18255cfd60976dca1a24598946647/jmccc/src/main/java/org/to2mbn/jmccc/version/parsing/Versions.java#L86-L88
cdk/cdk
tool/forcefield/src/main/java/org/openscience/cdk/modeling/builder3d/MMFF94ParametersCall.java
MMFF94ParametersCall.getDefaultStretchBendData
public List getDefaultStretchBendData(int iR, int jR, int kR) throws Exception { String dfsbkey = ""; if (pSet.containsKey(("DFSB" + iR + ";" + jR + ";" + kR))) { dfsbkey = "DFSB" + iR + ";" + jR + ";" + kR; } /* * else { System.out.println( * "KEYErrorDefaultSt...
java
public List getDefaultStretchBendData(int iR, int jR, int kR) throws Exception { String dfsbkey = ""; if (pSet.containsKey(("DFSB" + iR + ";" + jR + ";" + kR))) { dfsbkey = "DFSB" + iR + ";" + jR + ";" + kR; } /* * else { System.out.println( * "KEYErrorDefaultSt...
[ "public", "List", "getDefaultStretchBendData", "(", "int", "iR", ",", "int", "jR", ",", "int", "kR", ")", "throws", "Exception", "{", "String", "dfsbkey", "=", "\"\"", ";", "if", "(", "pSet", ".", "containsKey", "(", "(", "\"DFSB\"", "+", "iR", "+", "\...
Gets the bond-angle interaction parameter set. @param iR ID from Atom 1. @param jR ID from Atom 2. @param kR ID from Atom 3. @return The bond-angle interaction data from the force field parameter set @exception Exception Description of the Exception
[ "Gets", "the", "bond", "-", "angle", "interaction", "parameter", "set", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/forcefield/src/main/java/org/openscience/cdk/modeling/builder3d/MMFF94ParametersCall.java#L124-L135
Mozu/mozu-java
mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/CouponSetUrl.java
CouponSetUrl.getCouponSetUrl
public static MozuUrl getCouponSetUrl(String couponSetCode, Boolean includeCounts, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/couponsets/{couponSetCode}?includeCounts={includeCounts}&responseFields={responseFields}"); formatter.formatUrl("couponSetCode", coup...
java
public static MozuUrl getCouponSetUrl(String couponSetCode, Boolean includeCounts, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/couponsets/{couponSetCode}?includeCounts={includeCounts}&responseFields={responseFields}"); formatter.formatUrl("couponSetCode", coup...
[ "public", "static", "MozuUrl", "getCouponSetUrl", "(", "String", "couponSetCode", ",", "Boolean", "includeCounts", ",", "String", "responseFields", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/catalog/admin/couponsets/{couponSetCo...
Get Resource Url for GetCouponSet @param couponSetCode The unique identifier of the coupon set. @param includeCounts Specifies whether to include the number of redeemed coupons, existing coupon codes, and assigned discounts in the response body. @param responseFields Filtering syntax appended to an API call to increase...
[ "Get", "Resource", "Url", "for", "GetCouponSet" ]
train
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/CouponSetUrl.java#L45-L52
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShapeConverter.java
GoogleMapShapeConverter.toCircularString
public CircularString toCircularString(List<LatLng> latLngs, boolean hasZ, boolean hasM) { CircularString circularString = new CircularString(hasZ, hasM); populateLineString(circularString, latLngs); return circularString; }
java
public CircularString toCircularString(List<LatLng> latLngs, boolean hasZ, boolean hasM) { CircularString circularString = new CircularString(hasZ, hasM); populateLineString(circularString, latLngs); return circularString; }
[ "public", "CircularString", "toCircularString", "(", "List", "<", "LatLng", ">", "latLngs", ",", "boolean", "hasZ", ",", "boolean", "hasM", ")", "{", "CircularString", "circularString", "=", "new", "CircularString", "(", "hasZ", ",", "hasM", ")", ";", "populat...
Convert a list of {@link LatLng} to a {@link CircularString} @param latLngs lat lngs @param hasZ has z flag @param hasM has m flag @return circular string
[ "Convert", "a", "list", "of", "{", "@link", "LatLng", "}", "to", "a", "{", "@link", "CircularString", "}" ]
train
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShapeConverter.java#L375-L383
aws/aws-sdk-java
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/model/SegmentDimensions.java
SegmentDimensions.withUserAttributes
public SegmentDimensions withUserAttributes(java.util.Map<String, AttributeDimension> userAttributes) { setUserAttributes(userAttributes); return this; }
java
public SegmentDimensions withUserAttributes(java.util.Map<String, AttributeDimension> userAttributes) { setUserAttributes(userAttributes); return this; }
[ "public", "SegmentDimensions", "withUserAttributes", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "AttributeDimension", ">", "userAttributes", ")", "{", "setUserAttributes", "(", "userAttributes", ")", ";", "return", "this", ";", "}" ]
Custom segment user attributes. @param userAttributes Custom segment user attributes. @return Returns a reference to this object so that method calls can be chained together.
[ "Custom", "segment", "user", "attributes", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/model/SegmentDimensions.java#L283-L286
eclipse/xtext-lib
org.eclipse.xtext.xbase.lib/src/org/eclipse/xtext/xbase/lib/IntegerExtensions.java
IntegerExtensions.shiftLeft
@Pure @Inline(value="($1 << $2)", constantExpression=true) @Deprecated public static int shiftLeft(int a, int distance) { return a << distance; }
java
@Pure @Inline(value="($1 << $2)", constantExpression=true) @Deprecated public static int shiftLeft(int a, int distance) { return a << distance; }
[ "@", "Pure", "@", "Inline", "(", "value", "=", "\"($1 << $2)\"", ",", "constantExpression", "=", "true", ")", "@", "Deprecated", "public", "static", "int", "shiftLeft", "(", "int", "a", ",", "int", "distance", ")", "{", "return", "a", "<<", "distance", "...
The binary <code>signed left shift</code> operator. This is the equivalent to the java <code>&lt;&lt;</code> operator. Fills in a zero as the least significant bit. @param a an integer. @param distance the number of times to shift. @return <code>a&lt;&lt;distance</code> @deprecated use {@link #operator_doubleLessThan(...
[ "The", "binary", "<code", ">", "signed", "left", "shift<", "/", "code", ">", "operator", ".", "This", "is", "the", "equivalent", "to", "the", "java", "<code", ">", "&lt", ";", "&lt", ";", "<", "/", "code", ">", "operator", ".", "Fills", "in", "a", ...
train
https://github.com/eclipse/xtext-lib/blob/7063572e1f1bd713a3aa53bdf3a8dc60e25c169a/org.eclipse.xtext.xbase.lib/src/org/eclipse/xtext/xbase/lib/IntegerExtensions.java#L136-L141
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/reflect/TypeUtility.java
TypeUtility.beginStringConversion
public static void beginStringConversion(Builder methodBuilder, ModelProperty property) { TypeName modelType = typeName(property.getElement().asType()); beginStringConversion(methodBuilder, modelType); }
java
public static void beginStringConversion(Builder methodBuilder, ModelProperty property) { TypeName modelType = typeName(property.getElement().asType()); beginStringConversion(methodBuilder, modelType); }
[ "public", "static", "void", "beginStringConversion", "(", "Builder", "methodBuilder", ",", "ModelProperty", "property", ")", "{", "TypeName", "modelType", "=", "typeName", "(", "property", ".", "getElement", "(", ")", ".", "asType", "(", ")", ")", ";", "beginS...
generate begin string to translate in code to used in content value or parameter need to be converted in string through String.valueOf @param methodBuilder the method builder @param property the property
[ "generate", "begin", "string", "to", "translate", "in", "code", "to", "used", "in", "content", "value", "or", "parameter", "need", "to", "be", "converted", "in", "string", "through", "String", ".", "valueOf" ]
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/reflect/TypeUtility.java#L376-L380
aws/aws-sdk-java
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/AmazonS3Client.java
AmazonS3Client.postProcessS3Object
private void postProcessS3Object(final S3Object s3Object, final boolean skipClientSideValidation, final ProgressListener listener) { InputStream is = s3Object.getObjectContent(); HttpRequestBase httpRequest = s3Object.getObjectContent().getHttpRequest(); ...
java
private void postProcessS3Object(final S3Object s3Object, final boolean skipClientSideValidation, final ProgressListener listener) { InputStream is = s3Object.getObjectContent(); HttpRequestBase httpRequest = s3Object.getObjectContent().getHttpRequest(); ...
[ "private", "void", "postProcessS3Object", "(", "final", "S3Object", "s3Object", ",", "final", "boolean", "skipClientSideValidation", ",", "final", "ProgressListener", "listener", ")", "{", "InputStream", "is", "=", "s3Object", ".", "getObjectContent", "(", ")", ";",...
Post processing the {@link S3Object} downloaded from S3. It includes wrapping the data with wrapper input streams, doing client side validation if possible etc.
[ "Post", "processing", "the", "{" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/AmazonS3Client.java#L1502-L1546
alipay/sofa-rpc
extension-impl/remoting-bolt/src/main/java/com/alipay/sofa/rpc/transport/bolt/BoltClientTransport.java
BoltClientTransport.doInvokeSync
protected SofaResponse doInvokeSync(SofaRequest request, InvokeContext invokeContext, int timeoutMillis) throws RemotingException, InterruptedException { return (SofaResponse) RPC_CLIENT.invokeSync(url, request, invokeContext, timeoutMillis); }
java
protected SofaResponse doInvokeSync(SofaRequest request, InvokeContext invokeContext, int timeoutMillis) throws RemotingException, InterruptedException { return (SofaResponse) RPC_CLIENT.invokeSync(url, request, invokeContext, timeoutMillis); }
[ "protected", "SofaResponse", "doInvokeSync", "(", "SofaRequest", "request", ",", "InvokeContext", "invokeContext", ",", "int", "timeoutMillis", ")", "throws", "RemotingException", ",", "InterruptedException", "{", "return", "(", "SofaResponse", ")", "RPC_CLIENT", ".", ...
同步调用 @param request 请求对象 @param invokeContext 调用上下文 @param timeoutMillis 超时时间(毫秒) @return 返回对象 @throws RemotingException 远程调用异常 @throws InterruptedException 中断异常 @since 5.2.0
[ "同步调用" ]
train
https://github.com/alipay/sofa-rpc/blob/a31406410291e56696185a29c3ba4bd1f54488fd/extension-impl/remoting-bolt/src/main/java/com/alipay/sofa/rpc/transport/bolt/BoltClientTransport.java#L273-L276
wildfly/wildfly-core
protocol/src/main/java/org/jboss/as/protocol/mgmt/AbstractMessageHandler.java
AbstractMessageHandler.handleMessage
@Override public void handleMessage(final Channel channel, final DataInput input, final ManagementProtocolHeader header) throws IOException { final byte type = header.getType(); if(type == ManagementProtocol.TYPE_RESPONSE) { // Handle response to local requests final Manageme...
java
@Override public void handleMessage(final Channel channel, final DataInput input, final ManagementProtocolHeader header) throws IOException { final byte type = header.getType(); if(type == ManagementProtocol.TYPE_RESPONSE) { // Handle response to local requests final Manageme...
[ "@", "Override", "public", "void", "handleMessage", "(", "final", "Channel", "channel", ",", "final", "DataInput", "input", ",", "final", "ManagementProtocolHeader", "header", ")", "throws", "IOException", "{", "final", "byte", "type", "=", "header", ".", "getTy...
Handle a message. @param channel the channel @param input the message @param header the management protocol header @throws IOException
[ "Handle", "a", "message", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/protocol/src/main/java/org/jboss/as/protocol/mgmt/AbstractMessageHandler.java#L221-L250
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientCustomImpl.java
KeyVaultClientCustomImpl.listCertificateVersionsAsync
public ServiceFuture<List<CertificateItem>> listCertificateVersionsAsync(final String vaultBaseUrl, final String certificateName, final ListOperationCallback<CertificateItem> serviceCallback) { return getCertificateVersionsAsync(vaultBaseUrl, certificateName, serviceCallback); }
java
public ServiceFuture<List<CertificateItem>> listCertificateVersionsAsync(final String vaultBaseUrl, final String certificateName, final ListOperationCallback<CertificateItem> serviceCallback) { return getCertificateVersionsAsync(vaultBaseUrl, certificateName, serviceCallback); }
[ "public", "ServiceFuture", "<", "List", "<", "CertificateItem", ">", ">", "listCertificateVersionsAsync", "(", "final", "String", "vaultBaseUrl", ",", "final", "String", "certificateName", ",", "final", "ListOperationCallback", "<", "CertificateItem", ">", "serviceCallb...
List the versions of a certificate. @param vaultBaseUrl The vault name, e.g. https://myvault.vault.azure.net @param certificateName The name of the certificate @param serviceCallback the async ServiceCallback to handle successful and failed responses. @return the {@link ServiceFuture} object
[ "List", "the", "versions", "of", "a", "certificate", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientCustomImpl.java#L1561-L1564
gallandarakhneorg/afc
core/vmutils/src/main/java/org/arakhne/afc/vmutil/FileSystem.java
FileSystem.zipFile
public static void zipFile(File input, File output) throws IOException { try (FileOutputStream fos = new FileOutputStream(output)) { zipFile(input, fos); } }
java
public static void zipFile(File input, File output) throws IOException { try (FileOutputStream fos = new FileOutputStream(output)) { zipFile(input, fos); } }
[ "public", "static", "void", "zipFile", "(", "File", "input", ",", "File", "output", ")", "throws", "IOException", "{", "try", "(", "FileOutputStream", "fos", "=", "new", "FileOutputStream", "(", "output", ")", ")", "{", "zipFile", "(", "input", ",", "fos",...
Create a zip file from the given input file. @param input the name of the file to compress. @param output the name of the ZIP file to create. @throws IOException when ziiping is failing. @since 6.2
[ "Create", "a", "zip", "file", "from", "the", "given", "input", "file", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/FileSystem.java#L2923-L2927
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/alg/feature/describe/DescribeSiftCommon.java
DescribeSiftCommon.normalizeDescriptor
public static void normalizeDescriptor(TupleDesc_F64 descriptor , double maxDescriptorElementValue ) { // normalize descriptor to unit length UtilFeature.normalizeL2(descriptor); // clip the values for (int i = 0; i < descriptor.size(); i++) { double value = descriptor.value[i]; if( value > maxDescriptor...
java
public static void normalizeDescriptor(TupleDesc_F64 descriptor , double maxDescriptorElementValue ) { // normalize descriptor to unit length UtilFeature.normalizeL2(descriptor); // clip the values for (int i = 0; i < descriptor.size(); i++) { double value = descriptor.value[i]; if( value > maxDescriptor...
[ "public", "static", "void", "normalizeDescriptor", "(", "TupleDesc_F64", "descriptor", ",", "double", "maxDescriptorElementValue", ")", "{", "// normalize descriptor to unit length", "UtilFeature", ".", "normalizeL2", "(", "descriptor", ")", ";", "// clip the values", "for"...
Adjusts the descriptor. This adds lighting invariance and reduces the affects of none-affine changes in lighting. 1) Apply L2 normalization 2) Clip using max descriptor value 3) Apply L2 normalization again
[ "Adjusts", "the", "descriptor", ".", "This", "adds", "lighting", "invariance", "and", "reduces", "the", "affects", "of", "none", "-", "affine", "changes", "in", "lighting", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/feature/describe/DescribeSiftCommon.java#L84-L98
apereo/cas
core/cas-server-core-web-api/src/main/java/org/apereo/cas/services/web/view/AbstractCasView.java
AbstractCasView.prepareCasResponseAttributesForViewModel
protected void prepareCasResponseAttributesForViewModel(final Map<String, Object> model) { val service = authenticationRequestServiceSelectionStrategies.resolveService(getServiceFrom(model)); val registeredService = this.servicesManager.findServiceBy(service); val principalAttributes = getCasPr...
java
protected void prepareCasResponseAttributesForViewModel(final Map<String, Object> model) { val service = authenticationRequestServiceSelectionStrategies.resolveService(getServiceFrom(model)); val registeredService = this.servicesManager.findServiceBy(service); val principalAttributes = getCasPr...
[ "protected", "void", "prepareCasResponseAttributesForViewModel", "(", "final", "Map", "<", "String", ",", "Object", ">", "model", ")", "{", "val", "service", "=", "authenticationRequestServiceSelectionStrategies", ".", "resolveService", "(", "getServiceFrom", "(", "mode...
Prepare cas response attributes for view model. @param model the model
[ "Prepare", "cas", "response", "attributes", "for", "view", "model", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-web-api/src/main/java/org/apereo/cas/services/web/view/AbstractCasView.java#L232-L245
eclipse/xtext-lib
org.eclipse.xtext.xbase.lib/src/org/eclipse/xtext/xbase/lib/ObjectExtensions.java
ObjectExtensions.operator_doubleArrow
public static <T> T operator_doubleArrow(T object, Procedure1<? super T> block) { block.apply(object); return object; }
java
public static <T> T operator_doubleArrow(T object, Procedure1<? super T> block) { block.apply(object); return object; }
[ "public", "static", "<", "T", ">", "T", "operator_doubleArrow", "(", "T", "object", ",", "Procedure1", "<", "?", "super", "T", ">", "block", ")", "{", "block", ".", "apply", "(", "object", ")", ";", "return", "object", ";", "}" ]
The <code>doubleArrow</code> operator is used as a 'with'- or 'let'-operation. It allows to bind an object to a local scope in order to do something on it. Example: <code> new Person => [ firstName = 'Han' lastName = 'Solo' ] </code> @param object an object. Can be <code>null</code>. @param block the block to execute...
[ "The", "<code", ">", "doubleArrow<", "/", "code", ">", "operator", "is", "used", "as", "a", "with", "-", "or", "let", "-", "operation", ".", "It", "allows", "to", "bind", "an", "object", "to", "a", "local", "scope", "in", "order", "to", "do", "someth...
train
https://github.com/eclipse/xtext-lib/blob/7063572e1f1bd713a3aa53bdf3a8dc60e25c169a/org.eclipse.xtext.xbase.lib/src/org/eclipse/xtext/xbase/lib/ObjectExtensions.java#L138-L141
line/armeria
grpc/src/main/java/com/linecorp/armeria/unsafe/grpc/GrpcUnsafeBufferUtil.java
GrpcUnsafeBufferUtil.releaseBuffer
public static void releaseBuffer(Object message, RequestContext ctx) { final IdentityHashMap<Object, ByteBuf> buffers = ctx.attr(BUFFERS).get(); checkState(buffers != null, "Releasing buffer even though storeBuffer has not been called."); final ByteBuf removed = buffers.remove...
java
public static void releaseBuffer(Object message, RequestContext ctx) { final IdentityHashMap<Object, ByteBuf> buffers = ctx.attr(BUFFERS).get(); checkState(buffers != null, "Releasing buffer even though storeBuffer has not been called."); final ByteBuf removed = buffers.remove...
[ "public", "static", "void", "releaseBuffer", "(", "Object", "message", ",", "RequestContext", "ctx", ")", "{", "final", "IdentityHashMap", "<", "Object", ",", "ByteBuf", ">", "buffers", "=", "ctx", ".", "attr", "(", "BUFFERS", ")", ".", "get", "(", ")", ...
Releases the {@link ByteBuf} backing the provided {@link Message}.
[ "Releases", "the", "{" ]
train
https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/grpc/src/main/java/com/linecorp/armeria/unsafe/grpc/GrpcUnsafeBufferUtil.java#L53-L62
citiususc/hipster
hipster-core/src/main/java/es/usc/citius/hipster/util/examples/maze/Maze2D.java
Maze2D.validLocationsFrom
public Collection<Point> validLocationsFrom(Point loc) { Collection<Point> validMoves = new HashSet<Point>(); // Check for all valid movements for (int row = -1; row <= 1; row++) { for (int column = -1; column <= 1; column++) { try { if (isFree(new...
java
public Collection<Point> validLocationsFrom(Point loc) { Collection<Point> validMoves = new HashSet<Point>(); // Check for all valid movements for (int row = -1; row <= 1; row++) { for (int column = -1; column <= 1; column++) { try { if (isFree(new...
[ "public", "Collection", "<", "Point", ">", "validLocationsFrom", "(", "Point", "loc", ")", "{", "Collection", "<", "Point", ">", "validMoves", "=", "new", "HashSet", "<", "Point", ">", "(", ")", ";", "// Check for all valid movements", "for", "(", "int", "ro...
Return all neighbor empty points from a specific location point. @param loc source point @return collection of empty neighbor points.
[ "Return", "all", "neighbor", "empty", "points", "from", "a", "specific", "location", "point", "." ]
train
https://github.com/citiususc/hipster/blob/9ab1236abb833a27641ae73ba9ca890d5c17598e/hipster-core/src/main/java/es/usc/citius/hipster/util/examples/maze/Maze2D.java#L382-L399
codeprimate-software/cp-elements
src/main/java/org/cp/elements/lang/Assert.java
Assert.notEmpty
public static void notEmpty(Object[] array, Supplier<String> message) { if (isEmpty(array)) { throw new IllegalArgumentException(message.get()); } }
java
public static void notEmpty(Object[] array, Supplier<String> message) { if (isEmpty(array)) { throw new IllegalArgumentException(message.get()); } }
[ "public", "static", "void", "notEmpty", "(", "Object", "[", "]", "array", ",", "Supplier", "<", "String", ">", "message", ")", "{", "if", "(", "isEmpty", "(", "array", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "message", ".", "get",...
Asserts that the {@link Object array} is not empty. The assertion holds if and only if the {@link Object array} is not {@literal null} and contains at least 1 element. @param array {@link Object array} to evaluate. @param message {@link Supplier} containing the message using in the {@link IllegalArgumentException} th...
[ "Asserts", "that", "the", "{", "@link", "Object", "array", "}", "is", "not", "empty", "." ]
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/lang/Assert.java#L973-L977
google/closure-compiler
src/com/google/javascript/jscomp/TypeCheck.java
TypeCheck.visitInterfacePropertyAssignment
private void visitInterfacePropertyAssignment(Node object, Node lvalue) { if (!lvalue.getParent().isAssign()) { // assignments to interface properties cannot be in destructuring patterns or for-of loops reportInvalidInterfaceMemberDeclaration(object); return; } Node assign = lvalue.getPare...
java
private void visitInterfacePropertyAssignment(Node object, Node lvalue) { if (!lvalue.getParent().isAssign()) { // assignments to interface properties cannot be in destructuring patterns or for-of loops reportInvalidInterfaceMemberDeclaration(object); return; } Node assign = lvalue.getPare...
[ "private", "void", "visitInterfacePropertyAssignment", "(", "Node", "object", ",", "Node", "lvalue", ")", "{", "if", "(", "!", "lvalue", ".", "getParent", "(", ")", ".", "isAssign", "(", ")", ")", "{", "// assignments to interface properties cannot be in destructuri...
Visits an lvalue node for cases such as <pre> interface.prototype.property = ...; </pre>
[ "Visits", "an", "lvalue", "node", "for", "cases", "such", "as" ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/TypeCheck.java#L1801-L1825
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/reflect/FieldUtils.java
FieldUtils.writeField
public static void writeField(final Field field, final Object target, final Object value, final boolean forceAccess) throws IllegalAccessException { Validate.isTrue(field != null, "The field must not be null"); if (forceAccess && !field.isAccessible()) { field.setAccessible(true)...
java
public static void writeField(final Field field, final Object target, final Object value, final boolean forceAccess) throws IllegalAccessException { Validate.isTrue(field != null, "The field must not be null"); if (forceAccess && !field.isAccessible()) { field.setAccessible(true)...
[ "public", "static", "void", "writeField", "(", "final", "Field", "field", ",", "final", "Object", "target", ",", "final", "Object", "value", ",", "final", "boolean", "forceAccess", ")", "throws", "IllegalAccessException", "{", "Validate", ".", "isTrue", "(", "...
Writes a {@link Field}. @param field to write @param target the object to call on, may be {@code null} for {@code static} fields @param value to set @param forceAccess whether to break scope restrictions using the {@link java.lang.reflect.AccessibleObject#setAccessible(boolean)} method. {@code false} will only match {...
[ "Writes", "a", "{", "@link", "Field", "}", "." ]
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/reflect/FieldUtils.java#L683-L692
joniles/mpxj
src/main/java/net/sf/mpxj/json/JsonWriter.java
JsonWriter.writeBooleanField
private void writeBooleanField(String fieldName, Object value) throws IOException { boolean val = ((Boolean) value).booleanValue(); if (val) { m_writer.writeNameValuePair(fieldName, val); } }
java
private void writeBooleanField(String fieldName, Object value) throws IOException { boolean val = ((Boolean) value).booleanValue(); if (val) { m_writer.writeNameValuePair(fieldName, val); } }
[ "private", "void", "writeBooleanField", "(", "String", "fieldName", ",", "Object", "value", ")", "throws", "IOException", "{", "boolean", "val", "=", "(", "(", "Boolean", ")", "value", ")", ".", "booleanValue", "(", ")", ";", "if", "(", "val", ")", "{", ...
Write a boolean field to the JSON file. @param fieldName field name @param value field value
[ "Write", "a", "boolean", "field", "to", "the", "JSON", "file", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/json/JsonWriter.java#L400-L407
Impetus/Kundera
src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/thrift/CQLTranslator.java
CQLTranslator.buildOrderByClause
public void buildOrderByClause(StringBuilder builder, String field, Object orderType, boolean useToken) { builder.append(SPACE_STRING); builder.append(SORT_CLAUSE); builder = ensureCase(builder, field, useToken); builder.append(SPACE_STRING); builder.append(orderType); }
java
public void buildOrderByClause(StringBuilder builder, String field, Object orderType, boolean useToken) { builder.append(SPACE_STRING); builder.append(SORT_CLAUSE); builder = ensureCase(builder, field, useToken); builder.append(SPACE_STRING); builder.append(orderType); }
[ "public", "void", "buildOrderByClause", "(", "StringBuilder", "builder", ",", "String", "field", ",", "Object", "orderType", ",", "boolean", "useToken", ")", "{", "builder", ".", "append", "(", "SPACE_STRING", ")", ";", "builder", ".", "append", "(", "SORT_CLA...
Builds the order by clause. @param builder the builder @param field the field @param orderType the order type @param useToken the use token
[ "Builds", "the", "order", "by", "clause", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/thrift/CQLTranslator.java#L1488-L1495
trellis-ldp/trellis
core/http/src/main/java/org/trellisldp/http/impl/HttpUtils.java
HttpUtils.checkIfUnmodifiedSince
public static void checkIfUnmodifiedSince(final String ifUnmodifiedSince, final Instant modified) { final Instant time = parseDate(ifUnmodifiedSince); if (time != null && modified.truncatedTo(SECONDS).isAfter(time)) { throw new ClientErrorException(status(PRECONDITION_FAILED).build()); ...
java
public static void checkIfUnmodifiedSince(final String ifUnmodifiedSince, final Instant modified) { final Instant time = parseDate(ifUnmodifiedSince); if (time != null && modified.truncatedTo(SECONDS).isAfter(time)) { throw new ClientErrorException(status(PRECONDITION_FAILED).build()); ...
[ "public", "static", "void", "checkIfUnmodifiedSince", "(", "final", "String", "ifUnmodifiedSince", ",", "final", "Instant", "modified", ")", "{", "final", "Instant", "time", "=", "parseDate", "(", "ifUnmodifiedSince", ")", ";", "if", "(", "time", "!=", "null", ...
Check for a conditional operation. @param ifUnmodifiedSince the If-Unmodified-Since header @param modified the resource modification date
[ "Check", "for", "a", "conditional", "operation", "." ]
train
https://github.com/trellis-ldp/trellis/blob/789fd7a3df86cab7ebba63e72bf4e58397e5f42d/core/http/src/main/java/org/trellisldp/http/impl/HttpUtils.java#L324-L329
BranchMetrics/android-branch-deep-linking
Branch-SDK/src/io/branch/referral/Branch.java
Branch.initSession
public boolean initSession(BranchUniversalReferralInitListener callback, Uri data, Activity activity) { readAndStripParam(data, activity); initSession(callback, activity); return true; }
java
public boolean initSession(BranchUniversalReferralInitListener callback, Uri data, Activity activity) { readAndStripParam(data, activity); initSession(callback, activity); return true; }
[ "public", "boolean", "initSession", "(", "BranchUniversalReferralInitListener", "callback", ",", "Uri", "data", ",", "Activity", "activity", ")", "{", "readAndStripParam", "(", "data", ",", "activity", ")", ";", "initSession", "(", "callback", ",", "activity", ")"...
<p>Initialises a session with the Branch API.</p> @param callback A {@link BranchUniversalReferralInitListener} instance that will be called following successful (or unsuccessful) initialisation of the session with the Branch API. @param data A {@link Uri} variable containing the details of the source link that l...
[ "<p", ">", "Initialises", "a", "session", "with", "the", "Branch", "API", ".", "<", "/", "p", ">" ]
train
https://github.com/BranchMetrics/android-branch-deep-linking/blob/e3bee2ccfcbf6d4bf1a5815b5b86666e4ff8f848/Branch-SDK/src/io/branch/referral/Branch.java#L1073-L1077
foundation-runtime/service-directory
2.0/sd-api/src/main/java/com/cisco/oss/foundation/directory/connect/DirectoryConnection.java
DirectoryConnection.submitAsyncRequest
public ServiceDirectoryFuture submitAsyncRequest(ProtocolHeader h, Protocol request, WatcherRegistration wr){ ServiceDirectoryFuture future = new ServiceDirectoryFuture(); queuePacket(h, request, null, null, future, wr); return future; }
java
public ServiceDirectoryFuture submitAsyncRequest(ProtocolHeader h, Protocol request, WatcherRegistration wr){ ServiceDirectoryFuture future = new ServiceDirectoryFuture(); queuePacket(h, request, null, null, future, wr); return future; }
[ "public", "ServiceDirectoryFuture", "submitAsyncRequest", "(", "ProtocolHeader", "h", ",", "Protocol", "request", ",", "WatcherRegistration", "wr", ")", "{", "ServiceDirectoryFuture", "future", "=", "new", "ServiceDirectoryFuture", "(", ")", ";", "queuePacket", "(", "...
Submit a Request in asynchronizing, it return a Future for the Request Response. @param h the ProtocolHeader. @param request the Protocol. @param wr the WatcherRegistration of the Service. @return the Future.
[ "Submit", "a", "Request", "in", "asynchronizing", "it", "return", "a", "Future", "for", "the", "Request", "Response", "." ]
train
https://github.com/foundation-runtime/service-directory/blob/a7bdefe173dc99e75eff4a24e07e6407e62f2ed4/2.0/sd-api/src/main/java/com/cisco/oss/foundation/directory/connect/DirectoryConnection.java#L401-L405
VoltDB/voltdb
src/frontend/org/voltdb/parser/JDBCParser.java
JDBCParser.parseJDBCCall
public static ParsedCall parseJDBCCall(String jdbcCall) throws SQLParser.Exception { Matcher m = PAT_CALL_WITH_PARAMETERS.matcher(jdbcCall); if (m.matches()) { String sql = m.group(1); int parameterCount = PAT_CLEAN_CALL_PARAMETERS.matcher(m.group(2)).replaceAll("").length();...
java
public static ParsedCall parseJDBCCall(String jdbcCall) throws SQLParser.Exception { Matcher m = PAT_CALL_WITH_PARAMETERS.matcher(jdbcCall); if (m.matches()) { String sql = m.group(1); int parameterCount = PAT_CLEAN_CALL_PARAMETERS.matcher(m.group(2)).replaceAll("").length();...
[ "public", "static", "ParsedCall", "parseJDBCCall", "(", "String", "jdbcCall", ")", "throws", "SQLParser", ".", "Exception", "{", "Matcher", "m", "=", "PAT_CALL_WITH_PARAMETERS", ".", "matcher", "(", "jdbcCall", ")", ";", "if", "(", "m", ".", "matches", "(", ...
Parse call statements for JDBC. @param jdbcCall statement to parse @return object with parsed data or null if it didn't parse @throws SQLParser.Exception
[ "Parse", "call", "statements", "for", "JDBC", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/parser/JDBCParser.java#L67-L80
bazaarvoice/emodb
table/src/main/java/com/bazaarvoice/emodb/table/db/astyanax/RowKeyUtils.java
RowKeyUtils.getRowKeyRaw
static ByteBuffer getRowKeyRaw(int shardId, long tableUuid, byte[] contentKeyBytes) { checkArgument(shardId >= 0 && shardId < 256); // Assemble a single array which is "1 byte shard id + 8 byte table uuid + n-byte content key". ByteBuffer rowKey = ByteBuffer.allocate(9 + contentKeyBytes.length)...
java
static ByteBuffer getRowKeyRaw(int shardId, long tableUuid, byte[] contentKeyBytes) { checkArgument(shardId >= 0 && shardId < 256); // Assemble a single array which is "1 byte shard id + 8 byte table uuid + n-byte content key". ByteBuffer rowKey = ByteBuffer.allocate(9 + contentKeyBytes.length)...
[ "static", "ByteBuffer", "getRowKeyRaw", "(", "int", "shardId", ",", "long", "tableUuid", ",", "byte", "[", "]", "contentKeyBytes", ")", "{", "checkArgument", "(", "shardId", ">=", "0", "&&", "shardId", "<", "256", ")", ";", "// Assemble a single array which is \...
Constructs a row key when the row's shard ID is already known, which is rare. Generally this is used for range queries to construct the lower or upper bound for a query, so it doesn't necessarily need to produce a valid row key.
[ "Constructs", "a", "row", "key", "when", "the", "row", "s", "shard", "ID", "is", "already", "known", "which", "is", "rare", ".", "Generally", "this", "is", "used", "for", "range", "queries", "to", "construct", "the", "lower", "or", "upper", "bound", "for...
train
https://github.com/bazaarvoice/emodb/blob/97ec7671bc78b47fc2a1c11298c0c872bd5ec7fb/table/src/main/java/com/bazaarvoice/emodb/table/db/astyanax/RowKeyUtils.java#L82-L93
google/closure-compiler
src/com/google/javascript/jscomp/CheckJSDoc.java
CheckJSDoc.isJSDocOnFunctionNode
private boolean isJSDocOnFunctionNode(Node n, JSDocInfo info) { switch (n.getToken()) { case FUNCTION: case GETTER_DEF: case SETTER_DEF: case MEMBER_FUNCTION_DEF: case STRING_KEY: case COMPUTED_PROP: case EXPORT: return true; case GETELEM: case GETPROP: ...
java
private boolean isJSDocOnFunctionNode(Node n, JSDocInfo info) { switch (n.getToken()) { case FUNCTION: case GETTER_DEF: case SETTER_DEF: case MEMBER_FUNCTION_DEF: case STRING_KEY: case COMPUTED_PROP: case EXPORT: return true; case GETELEM: case GETPROP: ...
[ "private", "boolean", "isJSDocOnFunctionNode", "(", "Node", "n", ",", "JSDocInfo", "info", ")", "{", "switch", "(", "n", ".", "getToken", "(", ")", ")", "{", "case", "FUNCTION", ":", "case", "GETTER_DEF", ":", "case", "SETTER_DEF", ":", "case", "MEMBER_FUN...
Whether this node's JSDoc may apply to a function <p>This has some false positive cases, to allow for patterns like goog.abstractMethod.
[ "Whether", "this", "node", "s", "JSDoc", "may", "apply", "to", "a", "function" ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/CheckJSDoc.java#L440-L476
OpenLiberty/open-liberty
dev/com.ibm.ws.channelfw/src/com/ibm/ws/channelfw/internal/ChannelFrameworkImpl.java
ChannelFrameworkImpl.getRunningChannel
public synchronized Channel getRunningChannel(String inputChannelName, Chain chain) { if (inputChannelName == null || chain == null) { return null; } Channel channel = null; // Ensure the chain is running. if (null != this.chainRunningMap.get(chain.getName())) { ...
java
public synchronized Channel getRunningChannel(String inputChannelName, Chain chain) { if (inputChannelName == null || chain == null) { return null; } Channel channel = null; // Ensure the chain is running. if (null != this.chainRunningMap.get(chain.getName())) { ...
[ "public", "synchronized", "Channel", "getRunningChannel", "(", "String", "inputChannelName", ",", "Chain", "chain", ")", "{", "if", "(", "inputChannelName", "==", "null", "||", "chain", "==", "null", ")", "{", "return", "null", ";", "}", "Channel", "channel", ...
Fetch the input channel from the runtime. @param inputChannelName of the (parent) channel requested. @param chain in which channel is running. @return Channel requested, or null if not found.
[ "Fetch", "the", "input", "channel", "from", "the", "runtime", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.channelfw/src/com/ibm/ws/channelfw/internal/ChannelFrameworkImpl.java#L4048-L4065
ThreeTen/threetenbp
src/main/java/org/threeten/bp/chrono/Chronology.java
Chronology.zonedDateTime
@SuppressWarnings({ "rawtypes", "unchecked" }) public ChronoZonedDateTime<?> zonedDateTime(TemporalAccessor temporal) { try { ZoneId zone = ZoneId.from(temporal); try { Instant instant = Instant.from(temporal); return zonedDateTime(instant, zone); ...
java
@SuppressWarnings({ "rawtypes", "unchecked" }) public ChronoZonedDateTime<?> zonedDateTime(TemporalAccessor temporal) { try { ZoneId zone = ZoneId.from(temporal); try { Instant instant = Instant.from(temporal); return zonedDateTime(instant, zone); ...
[ "@", "SuppressWarnings", "(", "{", "\"rawtypes\"", ",", "\"unchecked\"", "}", ")", "public", "ChronoZonedDateTime", "<", "?", ">", "zonedDateTime", "(", "TemporalAccessor", "temporal", ")", "{", "try", "{", "ZoneId", "zone", "=", "ZoneId", ".", "from", "(", ...
Obtains a zoned date-time in this chronology from another temporal object. <p> This creates a date-time in this chronology based on the specified {@code TemporalAccessor}. <p> This should obtain a {@code ZoneId} using {@link ZoneId#from(TemporalAccessor)}. The date-time should be obtained by obtaining an {@code Instant...
[ "Obtains", "a", "zoned", "date", "-", "time", "in", "this", "chronology", "from", "another", "temporal", "object", ".", "<p", ">", "This", "creates", "a", "date", "-", "time", "in", "this", "chronology", "based", "on", "the", "specified", "{", "@code", "...
train
https://github.com/ThreeTen/threetenbp/blob/5f05b649f89f205aabd96b2f83c36796ec616fe6/src/main/java/org/threeten/bp/chrono/Chronology.java#L598-L614
eserating/siren4j
src/main/java/com/google/code/siren4j/converter/ReflectingConverter.java
ReflectingConverter.handleSubEntity
private void handleSubEntity(EntityBuilder builder, Object obj, Field currentField, List<ReflectedInfo> fieldInfo) throws Siren4JException { Siren4JSubEntity subAnno = getSubEntityAnnotation(currentField, fieldInfo); if (subAnno != null) { if (isCollection(obj, currentField...
java
private void handleSubEntity(EntityBuilder builder, Object obj, Field currentField, List<ReflectedInfo> fieldInfo) throws Siren4JException { Siren4JSubEntity subAnno = getSubEntityAnnotation(currentField, fieldInfo); if (subAnno != null) { if (isCollection(obj, currentField...
[ "private", "void", "handleSubEntity", "(", "EntityBuilder", "builder", ",", "Object", "obj", ",", "Field", "currentField", ",", "List", "<", "ReflectedInfo", ">", "fieldInfo", ")", "throws", "Siren4JException", "{", "Siren4JSubEntity", "subAnno", "=", "getSubEntityA...
Handles sub entities. @param builder assumed not <code>null</code>. @param obj assumed not <code>null</code>. @param currentField assumed not <code>null</code>. @throws Siren4JException
[ "Handles", "sub", "entities", "." ]
train
https://github.com/eserating/siren4j/blob/f12e3185076ad920352ec4f6eb2a071a3683505f/src/main/java/com/google/code/siren4j/converter/ReflectingConverter.java#L474-L494
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-scaleout/spark/dl4j-spark/src/main/java/org/deeplearning4j/spark/util/MLLibUtil.java
MLLibUtil.fromLabeledPoint
public static JavaRDD<DataSet> fromLabeledPoint(JavaRDD<LabeledPoint> data, final long numPossibleLabels, boolean preCache) { if (preCache && !data.getStorageLevel().useMemory()) { data.cache(); } return data.map(new Function<LabeledPoint, DataSet>() { ...
java
public static JavaRDD<DataSet> fromLabeledPoint(JavaRDD<LabeledPoint> data, final long numPossibleLabels, boolean preCache) { if (preCache && !data.getStorageLevel().useMemory()) { data.cache(); } return data.map(new Function<LabeledPoint, DataSet>() { ...
[ "public", "static", "JavaRDD", "<", "DataSet", ">", "fromLabeledPoint", "(", "JavaRDD", "<", "LabeledPoint", ">", "data", ",", "final", "long", "numPossibleLabels", ",", "boolean", "preCache", ")", "{", "if", "(", "preCache", "&&", "!", "data", ".", "getStor...
Converts JavaRDD labeled points to JavaRDD DataSets. @param data JavaRDD LabeledPoints @param numPossibleLabels number of possible labels @param preCache boolean pre-cache rdd before operation @return
[ "Converts", "JavaRDD", "labeled", "points", "to", "JavaRDD", "DataSets", "." ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-scaleout/spark/dl4j-spark/src/main/java/org/deeplearning4j/spark/util/MLLibUtil.java#L358-L369
VoltDB/voltdb
src/frontend/org/voltcore/utils/ssl/SSLConfiguration.java
SSLConfiguration.createTrustManagers
private static TrustManagerFactory createTrustManagers(String filepath, String keystorePassword) throws KeyStoreException, FileNotFoundException, IOException, NoSuchAlgorithmException, CertificateException { KeyStore trustStore = KeyStore.getInstance("JKS"); try (InputStream trus...
java
private static TrustManagerFactory createTrustManagers(String filepath, String keystorePassword) throws KeyStoreException, FileNotFoundException, IOException, NoSuchAlgorithmException, CertificateException { KeyStore trustStore = KeyStore.getInstance("JKS"); try (InputStream trus...
[ "private", "static", "TrustManagerFactory", "createTrustManagers", "(", "String", "filepath", ",", "String", "keystorePassword", ")", "throws", "KeyStoreException", ",", "FileNotFoundException", ",", "IOException", ",", "NoSuchAlgorithmException", ",", "CertificateException",...
Creates the trust 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. @return {@link TrustManager} array, that will be used to initiate the {@link SSLContext}. @throws Exception
[ "Creates", "the", "trust", "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#L151-L161
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.summarizeForResourceGroupAsync
public Observable<SummarizeResultsInner> summarizeForResourceGroupAsync(String subscriptionId, String resourceGroupName) { return summarizeForResourceGroupWithServiceResponseAsync(subscriptionId, resourceGroupName).map(new Func1<ServiceResponse<SummarizeResultsInner>, SummarizeResultsInner>() { @Ove...
java
public Observable<SummarizeResultsInner> summarizeForResourceGroupAsync(String subscriptionId, String resourceGroupName) { return summarizeForResourceGroupWithServiceResponseAsync(subscriptionId, resourceGroupName).map(new Func1<ServiceResponse<SummarizeResultsInner>, SummarizeResultsInner>() { @Ove...
[ "public", "Observable", "<", "SummarizeResultsInner", ">", "summarizeForResourceGroupAsync", "(", "String", "subscriptionId", ",", "String", "resourceGroupName", ")", "{", "return", "summarizeForResourceGroupWithServiceResponseAsync", "(", "subscriptionId", ",", "resourceGroupN...
Summarizes policy states for the resources under the resource group. @param subscriptionId Microsoft Azure subscription ID. @param resourceGroupName Resource group name. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the SummarizeResultsInner object
[ "Summarizes", "policy", "states", "for", "the", "resources", "under", "the", "resource", "group", "." ]
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#L1128-L1135