repository_name stringlengths 7 58 | func_path_in_repository stringlengths 11 218 | func_name stringlengths 4 140 | whole_func_string stringlengths 153 5.32k | language stringclasses 1
value | func_code_string stringlengths 72 4k | func_code_tokens listlengths 20 832 | func_documentation_string stringlengths 61 2k | func_documentation_tokens listlengths 1 647 | split_name stringclasses 1
value | func_code_url stringlengths 102 339 |
|---|---|---|---|---|---|---|---|---|---|---|
OpenLiberty/open-liberty | dev/com.ibm.ws.session/src/com/ibm/ws/session/SessionContext.java | SessionContext.remoteInvalidate | public void remoteInvalidate(String sessionId, boolean backendUpdate) {
"""
/*
For remote InvalidateAll processing...calls remoteInvalidate method on the
store
"""
IStore iStore = _coreHttpSessionManager.getIStore();
((MemoryStore) iStore).remoteInvalidate(sessionId, backendUpdate);
} | java | public void remoteInvalidate(String sessionId, boolean backendUpdate) {
IStore iStore = _coreHttpSessionManager.getIStore();
((MemoryStore) iStore).remoteInvalidate(sessionId, backendUpdate);
} | [
"public",
"void",
"remoteInvalidate",
"(",
"String",
"sessionId",
",",
"boolean",
"backendUpdate",
")",
"{",
"IStore",
"iStore",
"=",
"_coreHttpSessionManager",
".",
"getIStore",
"(",
")",
";",
"(",
"(",
"MemoryStore",
")",
"iStore",
")",
".",
"remoteInvalidate"... | /*
For remote InvalidateAll processing...calls remoteInvalidate method on the
store | [
"/",
"*",
"For",
"remote",
"InvalidateAll",
"processing",
"...",
"calls",
"remoteInvalidate",
"method",
"on",
"the",
"store"
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.session/src/com/ibm/ws/session/SessionContext.java#L1069-L1072 |
ujmp/universal-java-matrix-package | ujmp-core/src/main/java/org/ujmp/core/doublematrix/calculation/general/decomposition/Ginv.java | Ginv.swapRows | public static void swapRows(DenseDoubleMatrix2D matrix, long row1, long row2) {
"""
Swap components in the two rows.
@param matrix
the matrix to modify
@param row1
the first row
@param row2
the second row
"""
double temp = 0;
long cols = matrix.getColumnCount();
for (long col = 0; col < cols; col... | java | public static void swapRows(DenseDoubleMatrix2D matrix, long row1, long row2) {
double temp = 0;
long cols = matrix.getColumnCount();
for (long col = 0; col < cols; col++) {
temp = matrix.getDouble(row1, col);
matrix.setDouble(matrix.getDouble(row2, col), row1, col);
matrix.setDouble(temp, row2, col);
... | [
"public",
"static",
"void",
"swapRows",
"(",
"DenseDoubleMatrix2D",
"matrix",
",",
"long",
"row1",
",",
"long",
"row2",
")",
"{",
"double",
"temp",
"=",
"0",
";",
"long",
"cols",
"=",
"matrix",
".",
"getColumnCount",
"(",
")",
";",
"for",
"(",
"long",
... | Swap components in the two rows.
@param matrix
the matrix to modify
@param row1
the first row
@param row2
the second row | [
"Swap",
"components",
"in",
"the",
"two",
"rows",
"."
] | train | https://github.com/ujmp/universal-java-matrix-package/blob/b7e1d293adeadaf35d208ffe8884028d6c06b63b/ujmp-core/src/main/java/org/ujmp/core/doublematrix/calculation/general/decomposition/Ginv.java#L226-L234 |
zalando/riptide | riptide-opentracing/src/main/java/org/zalando/riptide/opentracing/OpenTracingPlugin.java | OpenTracingPlugin.withSpanDecorators | @CheckReturnValue
public OpenTracingPlugin withSpanDecorators(final SpanDecorator decorator, final SpanDecorator... decorators) {
"""
Creates a new {@link OpenTracingPlugin plugin} by <strong>replacing</strong> the {@link SpanDecorator decorator(s)} of
{@code this} plugin with the supplied ones.
@param dec... | java | @CheckReturnValue
public OpenTracingPlugin withSpanDecorators(final SpanDecorator decorator, final SpanDecorator... decorators) {
return new OpenTracingPlugin(tracer, SpanDecorator.composite(decorator, decorators));
} | [
"@",
"CheckReturnValue",
"public",
"OpenTracingPlugin",
"withSpanDecorators",
"(",
"final",
"SpanDecorator",
"decorator",
",",
"final",
"SpanDecorator",
"...",
"decorators",
")",
"{",
"return",
"new",
"OpenTracingPlugin",
"(",
"tracer",
",",
"SpanDecorator",
".",
"com... | Creates a new {@link OpenTracingPlugin plugin} by <strong>replacing</strong> the {@link SpanDecorator decorator(s)} of
{@code this} plugin with the supplied ones.
@param decorator first decorator
@param decorators optional, remaining decorators
@return a new {@link OpenTracingPlugin} | [
"Creates",
"a",
"new",
"{",
"@link",
"OpenTracingPlugin",
"plugin",
"}",
"by",
"<strong",
">",
"replacing<",
"/",
"strong",
">",
"the",
"{",
"@link",
"SpanDecorator",
"decorator",
"(",
"s",
")",
"}",
"of",
"{",
"@code",
"this",
"}",
"plugin",
"with",
"th... | train | https://github.com/zalando/riptide/blob/0f53529a69c864203ced5fa067dcf3d42dba0e26/riptide-opentracing/src/main/java/org/zalando/riptide/opentracing/OpenTracingPlugin.java#L103-L106 |
googleapis/google-cloud-java | google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/deprecated/DiskInfo.java | DiskInfo.of | public static DiskInfo of(DiskId diskId, DiskConfiguration configuration) {
"""
Returns a {@code DiskInfo} object given its identity and configuration. Use {@link
StandardDiskConfiguration} to create a simple disk given its type and size. Use {@link
SnapshotDiskConfiguration} to create a disk from a snapshot. Us... | java | public static DiskInfo of(DiskId diskId, DiskConfiguration configuration) {
return newBuilder(diskId, configuration).build();
} | [
"public",
"static",
"DiskInfo",
"of",
"(",
"DiskId",
"diskId",
",",
"DiskConfiguration",
"configuration",
")",
"{",
"return",
"newBuilder",
"(",
"diskId",
",",
"configuration",
")",
".",
"build",
"(",
")",
";",
"}"
] | Returns a {@code DiskInfo} object given its identity and configuration. Use {@link
StandardDiskConfiguration} to create a simple disk given its type and size. Use {@link
SnapshotDiskConfiguration} to create a disk from a snapshot. Use {@link ImageDiskConfiguration}
to create a disk from a disk image. | [
"Returns",
"a",
"{"
] | train | https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/deprecated/DiskInfo.java#L368-L370 |
Alluxio/alluxio | core/common/src/main/java/alluxio/util/io/FileUtils.java | FileUtils.createBlockPath | public static void createBlockPath(String path, String workerDataFolderPermissions)
throws IOException {
"""
Creates the local block path and all the parent directories. Also, sets the appropriate
permissions.
@param path the path of the block
@param workerDataFolderPermissions The permissions to set on... | java | public static void createBlockPath(String path, String workerDataFolderPermissions)
throws IOException {
try {
createStorageDirPath(PathUtils.getParent(path), workerDataFolderPermissions);
} catch (InvalidPathException e) {
throw new IOException("Failed to create block path, get parent path of... | [
"public",
"static",
"void",
"createBlockPath",
"(",
"String",
"path",
",",
"String",
"workerDataFolderPermissions",
")",
"throws",
"IOException",
"{",
"try",
"{",
"createStorageDirPath",
"(",
"PathUtils",
".",
"getParent",
"(",
"path",
")",
",",
"workerDataFolderPer... | Creates the local block path and all the parent directories. Also, sets the appropriate
permissions.
@param path the path of the block
@param workerDataFolderPermissions The permissions to set on the worker's data folder | [
"Creates",
"the",
"local",
"block",
"path",
"and",
"all",
"the",
"parent",
"directories",
".",
"Also",
"sets",
"the",
"appropriate",
"permissions",
"."
] | train | https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/common/src/main/java/alluxio/util/io/FileUtils.java#L187-L197 |
linkedin/dexmaker | dexmaker/src/main/java/com/android/dx/Code.java | Code.arrayLength | public <T> void arrayLength(Local<Integer> target, Local<T> array) {
"""
Sets {@code target} to the length of the array in {@code array}.
"""
addInstruction(new ThrowingInsn(Rops.ARRAY_LENGTH, sourcePosition,
RegisterSpecList.make(array.spec()), catches));
moveResult(target, tru... | java | public <T> void arrayLength(Local<Integer> target, Local<T> array) {
addInstruction(new ThrowingInsn(Rops.ARRAY_LENGTH, sourcePosition,
RegisterSpecList.make(array.spec()), catches));
moveResult(target, true);
} | [
"public",
"<",
"T",
">",
"void",
"arrayLength",
"(",
"Local",
"<",
"Integer",
">",
"target",
",",
"Local",
"<",
"T",
">",
"array",
")",
"{",
"addInstruction",
"(",
"new",
"ThrowingInsn",
"(",
"Rops",
".",
"ARRAY_LENGTH",
",",
"sourcePosition",
",",
"Regi... | Sets {@code target} to the length of the array in {@code array}. | [
"Sets",
"{"
] | train | https://github.com/linkedin/dexmaker/blob/c58ffebcbb2564c7d1fa6fb58b48f351c330296d/dexmaker/src/main/java/com/android/dx/Code.java#L784-L788 |
nguillaumin/slick2d-maven | slick2d-core/src/main/java/org/newdawn/slick/geom/GeomUtil.java | GeomUtil.getLine | public Line getLine(Shape shape, int s, int e) {
"""
Get a line between two points in a shape
@param shape The shape
@param s The index of the start point
@param e The index of the end point
@return The line between the two points
"""
float[] start = shape.getPoint(s);
float[] end = shape.getPoint(... | java | public Line getLine(Shape shape, int s, int e) {
float[] start = shape.getPoint(s);
float[] end = shape.getPoint(e);
Line line = new Line(start[0],start[1],end[0],end[1]);
return line;
} | [
"public",
"Line",
"getLine",
"(",
"Shape",
"shape",
",",
"int",
"s",
",",
"int",
"e",
")",
"{",
"float",
"[",
"]",
"start",
"=",
"shape",
".",
"getPoint",
"(",
"s",
")",
";",
"float",
"[",
"]",
"end",
"=",
"shape",
".",
"getPoint",
"(",
"e",
")... | Get a line between two points in a shape
@param shape The shape
@param s The index of the start point
@param e The index of the end point
@return The line between the two points | [
"Get",
"a",
"line",
"between",
"two",
"points",
"in",
"a",
"shape"
] | train | https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/geom/GeomUtil.java#L411-L417 |
Samsung/GearVRf | GVRf/Extensions/gvrf-physics/src/main/java/org/gearvrf/physics/GVRGenericConstraint.java | GVRGenericConstraint.setAngularUpperLimits | public void setAngularUpperLimits(float limitX, float limitY, float limitZ) {
"""
Sets the upper limits for the "moving" body rotation relative to joint point.
@param limitX the X axis upper rotation limit (in radians)
@param limitY the Y axis upper rotation limit (in radians)
@param limitZ the Z axis upper r... | java | public void setAngularUpperLimits(float limitX, float limitY, float limitZ) {
Native3DGenericConstraint.setAngularUpperLimits(getNative(), limitX, limitY, limitZ);
} | [
"public",
"void",
"setAngularUpperLimits",
"(",
"float",
"limitX",
",",
"float",
"limitY",
",",
"float",
"limitZ",
")",
"{",
"Native3DGenericConstraint",
".",
"setAngularUpperLimits",
"(",
"getNative",
"(",
")",
",",
"limitX",
",",
"limitY",
",",
"limitZ",
")",
... | Sets the upper limits for the "moving" body rotation relative to joint point.
@param limitX the X axis upper rotation limit (in radians)
@param limitY the Y axis upper rotation limit (in radians)
@param limitZ the Z axis upper rotation limit (in radians) | [
"Sets",
"the",
"upper",
"limits",
"for",
"the",
"moving",
"body",
"rotation",
"relative",
"to",
"joint",
"point",
"."
] | train | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/gvrf-physics/src/main/java/org/gearvrf/physics/GVRGenericConstraint.java#L125-L127 |
Mangopay/mangopay2-java-sdk | src/main/java/com/mangopay/core/APIs/ApiBase.java | ApiBase.createObject | protected <T extends Dto> T createObject(Class<T> classOfT, String idempotencyKey, String methodKey, T entity, String entityId, String secondEntityId) throws Exception {
"""
Creates the Dto instance.
@param <T> Type on behalf of which the request is being called.
@param classOfT Type on be... | java | protected <T extends Dto> T createObject(Class<T> classOfT, String idempotencyKey, String methodKey, T entity, String entityId, String secondEntityId) throws Exception {
String urlMethod;
if (entityId.length() == 0)
urlMethod = this.getRequestUrl(methodKey);
else if (secondEntityId... | [
"protected",
"<",
"T",
"extends",
"Dto",
">",
"T",
"createObject",
"(",
"Class",
"<",
"T",
">",
"classOfT",
",",
"String",
"idempotencyKey",
",",
"String",
"methodKey",
",",
"T",
"entity",
",",
"String",
"entityId",
",",
"String",
"secondEntityId",
")",
"t... | Creates the Dto instance.
@param <T> Type on behalf of which the request is being called.
@param classOfT Type on behalf of which the request is being called.
@param idempotencyKey idempotency key for this request.
@param methodKey Relevant method key.
@param entity Dto inst... | [
"Creates",
"the",
"Dto",
"instance",
"."
] | train | https://github.com/Mangopay/mangopay2-java-sdk/blob/037cecb44ea62def63b507817fd9961649151157/src/main/java/com/mangopay/core/APIs/ApiBase.java#L230-L246 |
Azure/azure-sdk-for-java | servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/ClientFactory.java | ClientFactory.acceptSessionFromEntityPathAsync | public static CompletableFuture<IMessageSession> acceptSessionFromEntityPathAsync(URI namespaceEndpointURI, String entityPath, String sessionId, ClientSettings clientSettings) {
"""
Asynchronously accepts a session in PeekLock mode from service bus using the client settings. Session Id can be null, if null, servic... | java | public static CompletableFuture<IMessageSession> acceptSessionFromEntityPathAsync(URI namespaceEndpointURI, String entityPath, String sessionId, ClientSettings clientSettings) {
return acceptSessionFromEntityPathAsync(namespaceEndpointURI, entityPath, sessionId, clientSettings, DEFAULTRECEIVEMODE);
} | [
"public",
"static",
"CompletableFuture",
"<",
"IMessageSession",
">",
"acceptSessionFromEntityPathAsync",
"(",
"URI",
"namespaceEndpointURI",
",",
"String",
"entityPath",
",",
"String",
"sessionId",
",",
"ClientSettings",
"clientSettings",
")",
"{",
"return",
"acceptSessi... | Asynchronously accepts a session in PeekLock mode from service bus using the client settings. Session Id can be null, if null, service will return the first available session.
@param namespaceEndpointURI endpoint uri of entity namespace
@param entityPath path of entity
@param sessionId session id, if null, service will... | [
"Asynchronously",
"accepts",
"a",
"session",
"in",
"PeekLock",
"mode",
"from",
"service",
"bus",
"using",
"the",
"client",
"settings",
".",
"Session",
"Id",
"can",
"be",
"null",
"if",
"null",
"service",
"will",
"return",
"the",
"first",
"available",
"session",... | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/ClientFactory.java#L697-L699 |
b3dgs/lionengine | lionengine-network/src/main/java/com/b3dgs/lionengine/network/ServerImpl.java | ServerImpl.receiveConnecting | private void receiveConnecting(ClientSocket client, DataInputStream buffer, byte from, StateConnection expected)
throws IOException {
"""
Update the receive connecting state.
@param client The current client.
@param buffer The data buffer.
@param from The id from.
@param expected The expected cli... | java | private void receiveConnecting(ClientSocket client, DataInputStream buffer, byte from, StateConnection expected)
throws IOException
{
if (ServerImpl.checkValidity(client, from, expected))
{
// Receive the name
final byte[] name = new byte[buffer.readByte()];
... | [
"private",
"void",
"receiveConnecting",
"(",
"ClientSocket",
"client",
",",
"DataInputStream",
"buffer",
",",
"byte",
"from",
",",
"StateConnection",
"expected",
")",
"throws",
"IOException",
"{",
"if",
"(",
"ServerImpl",
".",
"checkValidity",
"(",
"client",
",",
... | Update the receive connecting state.
@param client The current client.
@param buffer The data buffer.
@param from The id from.
@param expected The expected client state.
@throws IOException If error. | [
"Update",
"the",
"receive",
"connecting",
"state",
"."
] | train | https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-network/src/main/java/com/b3dgs/lionengine/network/ServerImpl.java#L206-L243 |
fcrepo3/fcrepo | fcrepo-security/fcrepo-security-pdp/src/main/java/org/fcrepo/server/security/xacml/pdp/decorator/PolicyIndexInvocationHandler.java | PolicyIndexInvocationHandler.invokeTarget | private Object invokeTarget(Object target, Method method, Object[] args) throws Throwable {
"""
Invoke the underlying method, catching any InvocationTargetException and rethrowing the target exception
"""
Object returnValue;
try {
returnValue = method.invoke(target, args);
}... | java | private Object invokeTarget(Object target, Method method, Object[] args) throws Throwable {
Object returnValue;
try {
returnValue = method.invoke(target, args);
} catch(InvocationTargetException ite) {
throw ite.getTargetException();
}
return returnValue;
... | [
"private",
"Object",
"invokeTarget",
"(",
"Object",
"target",
",",
"Method",
"method",
",",
"Object",
"[",
"]",
"args",
")",
"throws",
"Throwable",
"{",
"Object",
"returnValue",
";",
"try",
"{",
"returnValue",
"=",
"method",
".",
"invoke",
"(",
"target",
"... | Invoke the underlying method, catching any InvocationTargetException and rethrowing the target exception | [
"Invoke",
"the",
"underlying",
"method",
"catching",
"any",
"InvocationTargetException",
"and",
"rethrowing",
"the",
"target",
"exception"
] | train | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-security/fcrepo-security-pdp/src/main/java/org/fcrepo/server/security/xacml/pdp/decorator/PolicyIndexInvocationHandler.java#L313-L321 |
pryzach/midao | midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/utils/MappingUtils.java | MappingUtils.callSetter | public static void callSetter(Object target, PropertyDescriptor prop, Object value) {
"""
Invokes Property Descriptor Setter and sets value @value into it.
@param target Object Getter of which would be executed
@param prop Property Descriptor which would be used to invoke Getter
@param value Value which sh... | java | public static void callSetter(Object target, PropertyDescriptor prop, Object value) {
Method setter = prop.getWriteMethod();
if (setter == null) {
return;
}
try {
setter.invoke(target, new Object[]{value});
} catch (IllegalArgumentException ... | [
"public",
"static",
"void",
"callSetter",
"(",
"Object",
"target",
",",
"PropertyDescriptor",
"prop",
",",
"Object",
"value",
")",
"{",
"Method",
"setter",
"=",
"prop",
".",
"getWriteMethod",
"(",
")",
";",
"if",
"(",
"setter",
"==",
"null",
")",
"{",
"r... | Invokes Property Descriptor Setter and sets value @value into it.
@param target Object Getter of which would be executed
@param prop Property Descriptor which would be used to invoke Getter
@param value Value which should be set into @target | [
"Invokes",
"Property",
"Descriptor",
"Setter",
"and",
"sets",
"value",
"@value",
"into",
"it",
"."
] | train | https://github.com/pryzach/midao/blob/ed9048ed2c792a4794a2116a25779dfb84cd9447/midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/utils/MappingUtils.java#L152-L175 |
devnied/Bit-lib4j | src/main/java/fr/devnied/bitlib/BitUtils.java | BitUtils.getNextString | public String getNextString(final int pSize, final Charset pCharset) {
"""
This method is used to get the next String with the specified size
@param pSize
the length of the string int bit
@param pCharset
the charset
@return the string
"""
return new String(getNextByte(pSize, true), pCharset);
} | java | public String getNextString(final int pSize, final Charset pCharset) {
return new String(getNextByte(pSize, true), pCharset);
} | [
"public",
"String",
"getNextString",
"(",
"final",
"int",
"pSize",
",",
"final",
"Charset",
"pCharset",
")",
"{",
"return",
"new",
"String",
"(",
"getNextByte",
"(",
"pSize",
",",
"true",
")",
",",
"pCharset",
")",
";",
"}"
] | This method is used to get the next String with the specified size
@param pSize
the length of the string int bit
@param pCharset
the charset
@return the string | [
"This",
"method",
"is",
"used",
"to",
"get",
"the",
"next",
"String",
"with",
"the",
"specified",
"size"
] | train | https://github.com/devnied/Bit-lib4j/blob/bdfa79fd12e7e3d5cf1196291825ef1bb12a1ee0/src/main/java/fr/devnied/bitlib/BitUtils.java#L384-L386 |
apereo/cas | support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/web/OAuth20HandlerInterceptorAdapter.java | OAuth20HandlerInterceptorAdapter.isAccessTokenRequest | protected boolean isAccessTokenRequest(final HttpServletRequest request, final HttpServletResponse response) {
"""
Is access token request request.
@param request the request
@param response the response
@return the boolean
"""
val requestPath = request.getRequestURI();
val pattern = Stri... | java | protected boolean isAccessTokenRequest(final HttpServletRequest request, final HttpServletResponse response) {
val requestPath = request.getRequestURI();
val pattern = String.format("(%s|%s)", OAuth20Constants.ACCESS_TOKEN_URL, OAuth20Constants.TOKEN_URL);
return doesUriMatchPattern(requestPath,... | [
"protected",
"boolean",
"isAccessTokenRequest",
"(",
"final",
"HttpServletRequest",
"request",
",",
"final",
"HttpServletResponse",
"response",
")",
"{",
"val",
"requestPath",
"=",
"request",
".",
"getRequestURI",
"(",
")",
";",
"val",
"pattern",
"=",
"String",
".... | Is access token request request.
@param request the request
@param response the response
@return the boolean | [
"Is",
"access",
"token",
"request",
"request",
"."
] | train | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/web/OAuth20HandlerInterceptorAdapter.java#L62-L66 |
jenkinsci/java-client-api | jenkins-client/src/main/java/com/offbytwo/jenkins/JenkinsServer.java | JenkinsServer.updateJob | public JenkinsServer updateJob(String jobName, String jobXml, boolean crumbFlag) throws IOException {
"""
Update the xml description of an existing job
@param jobName name of the job to be updated.
@param jobXml the configuration to be used for updating.
@param crumbFlag true/false.
@throws IOException in ca... | java | public JenkinsServer updateJob(String jobName, String jobXml, boolean crumbFlag) throws IOException {
return updateJob(null, jobName, jobXml, crumbFlag);
} | [
"public",
"JenkinsServer",
"updateJob",
"(",
"String",
"jobName",
",",
"String",
"jobXml",
",",
"boolean",
"crumbFlag",
")",
"throws",
"IOException",
"{",
"return",
"updateJob",
"(",
"null",
",",
"jobName",
",",
"jobXml",
",",
"crumbFlag",
")",
";",
"}"
] | Update the xml description of an existing job
@param jobName name of the job to be updated.
@param jobXml the configuration to be used for updating.
@param crumbFlag true/false.
@throws IOException in case of an error. | [
"Update",
"the",
"xml",
"description",
"of",
"an",
"existing",
"job"
] | train | https://github.com/jenkinsci/java-client-api/blob/c4f5953d3d4dda92cd946ad3bf2b811524c32da9/jenkins-client/src/main/java/com/offbytwo/jenkins/JenkinsServer.java#L620-L622 |
Drivemode/TypefaceHelper | TypefaceHelper/src/main/java/com/drivemode/android/typeface/TypefaceHelper.java | TypefaceHelper.setTypeface | @TargetApi(Build.VERSION_CODES.HONEYCOMB)
public <F extends android.app.Fragment> void setTypeface(F fragment, @StringRes int strResId) {
"""
Set the typeface to the all text views belong to the fragment.
Make sure to call this method after fragment view creation.
If you use fragments in the support package,
c... | java | @TargetApi(Build.VERSION_CODES.HONEYCOMB)
public <F extends android.app.Fragment> void setTypeface(F fragment, @StringRes int strResId) {
setTypeface(fragment, mApplication.getString(strResId));
} | [
"@",
"TargetApi",
"(",
"Build",
".",
"VERSION_CODES",
".",
"HONEYCOMB",
")",
"public",
"<",
"F",
"extends",
"android",
".",
"app",
".",
"Fragment",
">",
"void",
"setTypeface",
"(",
"F",
"fragment",
",",
"@",
"StringRes",
"int",
"strResId",
")",
"{",
"set... | Set the typeface to the all text views belong to the fragment.
Make sure to call this method after fragment view creation.
If you use fragments in the support package,
call {@link com.drivemode.android.typeface.TypefaceHelper#supportSetTypeface(android.support.v4.app.Fragment, String)} instead.
@param fragment the frag... | [
"Set",
"the",
"typeface",
"to",
"the",
"all",
"text",
"views",
"belong",
"to",
"the",
"fragment",
".",
"Make",
"sure",
"to",
"call",
"this",
"method",
"after",
"fragment",
"view",
"creation",
".",
"If",
"you",
"use",
"fragments",
"in",
"the",
"support",
... | train | https://github.com/Drivemode/TypefaceHelper/blob/86bef9ce16b9626b7076559e846db1b9f043c008/TypefaceHelper/src/main/java/com/drivemode/android/typeface/TypefaceHelper.java#L372-L375 |
apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/concurrent/FutureUtils.java | FutureUtils.runAfterwards | public static CompletableFuture<Void> runAfterwards(CompletableFuture<?> future, RunnableWithException runnable) {
"""
Run the given action after the completion of the given future. The given future can be
completed normally or exceptionally. In case of an exceptional completion the, the
action's exception will ... | java | public static CompletableFuture<Void> runAfterwards(CompletableFuture<?> future, RunnableWithException runnable) {
return runAfterwardsAsync(future, runnable, Executors.directExecutor());
} | [
"public",
"static",
"CompletableFuture",
"<",
"Void",
">",
"runAfterwards",
"(",
"CompletableFuture",
"<",
"?",
">",
"future",
",",
"RunnableWithException",
"runnable",
")",
"{",
"return",
"runAfterwardsAsync",
"(",
"future",
",",
"runnable",
",",
"Executors",
"."... | Run the given action after the completion of the given future. The given future can be
completed normally or exceptionally. In case of an exceptional completion the, the
action's exception will be added to the initial exception.
@param future to wait for its completion
@param runnable action which is triggered after t... | [
"Run",
"the",
"given",
"action",
"after",
"the",
"completion",
"of",
"the",
"given",
"future",
".",
"The",
"given",
"future",
"can",
"be",
"completed",
"normally",
"or",
"exceptionally",
".",
"In",
"case",
"of",
"an",
"exceptional",
"completion",
"the",
"the... | train | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/concurrent/FutureUtils.java#L407-L409 |
atomix/atomix | protocols/raft/src/main/java/io/atomix/protocols/raft/session/RaftSession.java | RaftSession.registerIndexQuery | public void registerIndexQuery(long index, Runnable query) {
"""
Registers a session index query.
@param index The state machine index at which to execute the query.
@param query The query to execute.
"""
// Add a query to be run once the session's index reaches the given index.
List<Runnable> quer... | java | public void registerIndexQuery(long index, Runnable query) {
// Add a query to be run once the session's index reaches the given index.
List<Runnable> queries = this.indexQueries.computeIfAbsent(index, v -> new LinkedList<>());
queries.add(query);
} | [
"public",
"void",
"registerIndexQuery",
"(",
"long",
"index",
",",
"Runnable",
"query",
")",
"{",
"// Add a query to be run once the session's index reaches the given index.",
"List",
"<",
"Runnable",
">",
"queries",
"=",
"this",
".",
"indexQueries",
".",
"computeIfAbsent... | Registers a session index query.
@param index The state machine index at which to execute the query.
@param query The query to execute. | [
"Registers",
"a",
"session",
"index",
"query",
"."
] | train | https://github.com/atomix/atomix/blob/3a94b7c80576d762dd0d396d4645df07a0b37c31/protocols/raft/src/main/java/io/atomix/protocols/raft/session/RaftSession.java#L317-L321 |
Azure/azure-sdk-for-java | cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/implementation/BingAutoSuggestSearchImpl.java | BingAutoSuggestSearchImpl.autoSuggestAsync | public Observable<Suggestions> autoSuggestAsync(String query, AutoSuggestOptionalParameter autoSuggestOptionalParameter) {
"""
The AutoSuggest API lets you send a search query to Bing and get back a list of suggestions. This section provides technical details about the query parameters and headers that you use to ... | java | public Observable<Suggestions> autoSuggestAsync(String query, AutoSuggestOptionalParameter autoSuggestOptionalParameter) {
return autoSuggestWithServiceResponseAsync(query, autoSuggestOptionalParameter).map(new Func1<ServiceResponse<Suggestions>, Suggestions>() {
@Override
public Suggest... | [
"public",
"Observable",
"<",
"Suggestions",
">",
"autoSuggestAsync",
"(",
"String",
"query",
",",
"AutoSuggestOptionalParameter",
"autoSuggestOptionalParameter",
")",
"{",
"return",
"autoSuggestWithServiceResponseAsync",
"(",
"query",
",",
"autoSuggestOptionalParameter",
")",... | The AutoSuggest API lets you send a search query to Bing and get back a list of suggestions. This section provides technical details about the query parameters and headers that you use to request suggestions and the JSON response objects that contain them.
@param query The user's search term.
@param autoSuggestOptiona... | [
"The",
"AutoSuggest",
"API",
"lets",
"you",
"send",
"a",
"search",
"query",
"to",
"Bing",
"and",
"get",
"back",
"a",
"list",
"of",
"suggestions",
".",
"This",
"section",
"provides",
"technical",
"details",
"about",
"the",
"query",
"parameters",
"and",
"heade... | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/implementation/BingAutoSuggestSearchImpl.java#L103-L110 |
stapler/stapler | core/src/main/java/org/kohsuke/stapler/Facet.java | Facet.createRequestDispatcher | public RequestDispatcher createRequestDispatcher(RequestImpl request, Klass<?> type, Object it, String viewName) throws IOException {
"""
Creates a {@link RequestDispatcher} that handles the given view, or
return null if no such view was found.
@param type
If "it" is non-null, {@code it.getClass()}. Otherwise... | java | public RequestDispatcher createRequestDispatcher(RequestImpl request, Klass<?> type, Object it, String viewName) throws IOException {
return null; // should be really abstract, but not
} | [
"public",
"RequestDispatcher",
"createRequestDispatcher",
"(",
"RequestImpl",
"request",
",",
"Klass",
"<",
"?",
">",
"type",
",",
"Object",
"it",
",",
"String",
"viewName",
")",
"throws",
"IOException",
"{",
"return",
"null",
";",
"// should be really abstract, but... | Creates a {@link RequestDispatcher} that handles the given view, or
return null if no such view was found.
@param type
If "it" is non-null, {@code it.getClass()}. Otherwise the class
from which the view is searched. | [
"Creates",
"a",
"{",
"@link",
"RequestDispatcher",
"}",
"that",
"handles",
"the",
"given",
"view",
"or",
"return",
"null",
"if",
"no",
"such",
"view",
"was",
"found",
"."
] | train | https://github.com/stapler/stapler/blob/11ad5af185e062fb46e01bf9fbed66f3ebf2a8f7/core/src/main/java/org/kohsuke/stapler/Facet.java#L123-L125 |
trustathsh/ifmapj | src/main/java/de/hshannover/f4/trust/ifmapj/identifier/Identifiers.java | Identifiers.createOtherIdentity | public static Identity createOtherIdentity(String name, String admDom,
String otherTypeDef) {
"""
Create an other identity identifier.
<b>Note: The type is set to {@link IdentityType#other} by default.</b>
@param name the name of the identity identifier
@param admDom the administrative-domain of the iden... | java | public static Identity createOtherIdentity(String name, String admDom,
String otherTypeDef) {
return createIdentity(IdentityType.other, name, admDom, otherTypeDef);
} | [
"public",
"static",
"Identity",
"createOtherIdentity",
"(",
"String",
"name",
",",
"String",
"admDom",
",",
"String",
"otherTypeDef",
")",
"{",
"return",
"createIdentity",
"(",
"IdentityType",
".",
"other",
",",
"name",
",",
"admDom",
",",
"otherTypeDef",
")",
... | Create an other identity identifier.
<b>Note: The type is set to {@link IdentityType#other} by default.</b>
@param name the name of the identity identifier
@param admDom the administrative-domain of the identity identifier
@param otherTypeDef vendor specific {@link String}
@return the new {@link Identity} instance | [
"Create",
"an",
"other",
"identity",
"identifier",
"."
] | train | https://github.com/trustathsh/ifmapj/blob/44ece9e95a3d2a1b7019573ba6178598a6cbdaa3/src/main/java/de/hshannover/f4/trust/ifmapj/identifier/Identifiers.java#L508-L511 |
wcm-io/wcm-io-caconfig | extensions/src/main/java/io/wcm/caconfig/extensions/persistence/impl/PersistenceUtils.java | PersistenceUtils.deleteChildrenNotInCollection | public static void deleteChildrenNotInCollection(Resource resource, ConfigurationCollectionPersistData data) {
"""
Delete children that are no longer contained in list of collection items.
@param resource Parent resource
@param data List of collection items
"""
Set<String> collectionItemNames = data.getI... | java | public static void deleteChildrenNotInCollection(Resource resource, ConfigurationCollectionPersistData data) {
Set<String> collectionItemNames = data.getItems().stream()
.map(item -> item.getCollectionItemName())
.collect(Collectors.toSet());
for (Resource child : resource.getChildren()) {
... | [
"public",
"static",
"void",
"deleteChildrenNotInCollection",
"(",
"Resource",
"resource",
",",
"ConfigurationCollectionPersistData",
"data",
")",
"{",
"Set",
"<",
"String",
">",
"collectionItemNames",
"=",
"data",
".",
"getItems",
"(",
")",
".",
"stream",
"(",
")"... | Delete children that are no longer contained in list of collection items.
@param resource Parent resource
@param data List of collection items | [
"Delete",
"children",
"that",
"are",
"no",
"longer",
"contained",
"in",
"list",
"of",
"collection",
"items",
"."
] | train | https://github.com/wcm-io/wcm-io-caconfig/blob/48592eadb0b62a09eec555cedfae7e00b213f6ed/extensions/src/main/java/io/wcm/caconfig/extensions/persistence/impl/PersistenceUtils.java#L215-L225 |
UrielCh/ovh-java-sdk | ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java | ApiOvhOrder.telephony_trunks_serviceName_updateSimultaneousChannels_GET | public OvhOrder telephony_trunks_serviceName_updateSimultaneousChannels_GET(String serviceName, Long quantity) throws IOException {
"""
Get prices and contracts information
REST: GET /order/telephony/trunks/{serviceName}/updateSimultaneousChannels
@param quantity [required] The quantity of total simultaneous c... | java | public OvhOrder telephony_trunks_serviceName_updateSimultaneousChannels_GET(String serviceName, Long quantity) throws IOException {
String qPath = "/order/telephony/trunks/{serviceName}/updateSimultaneousChannels";
StringBuilder sb = path(qPath, serviceName);
query(sb, "quantity", quantity);
String resp = exec(... | [
"public",
"OvhOrder",
"telephony_trunks_serviceName_updateSimultaneousChannels_GET",
"(",
"String",
"serviceName",
",",
"Long",
"quantity",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/order/telephony/trunks/{serviceName}/updateSimultaneousChannels\"",
";",
"Str... | Get prices and contracts information
REST: GET /order/telephony/trunks/{serviceName}/updateSimultaneousChannels
@param quantity [required] The quantity of total simultaneous channels requested
@param serviceName [required] Your trunk number | [
"Get",
"prices",
"and",
"contracts",
"information"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L6838-L6844 |
GwtMaterialDesign/gwt-material-table | src/main/java/gwt/material/design/client/ui/table/cell/FrozenProperties.java | FrozenProperties.setHeaderStyleProperty | public FrozenProperties setHeaderStyleProperty(StyleName styleName, String value) {
"""
Set a header style property using its name as the key. Please ensure the style name and value
are appropriately configured or it may result in unexpected behavior.
@param styleName the style name as seen here {@link Style#S... | java | public FrozenProperties setHeaderStyleProperty(StyleName styleName, String value) {
headerStyleProps.put(styleName, value);
return this;
} | [
"public",
"FrozenProperties",
"setHeaderStyleProperty",
"(",
"StyleName",
"styleName",
",",
"String",
"value",
")",
"{",
"headerStyleProps",
".",
"put",
"(",
"styleName",
",",
"value",
")",
";",
"return",
"this",
";",
"}"
] | Set a header style property using its name as the key. Please ensure the style name and value
are appropriately configured or it may result in unexpected behavior.
@param styleName the style name as seen here {@link Style#STYLE_Z_INDEX} for example.
@param value the string value required for the given style property. | [
"Set",
"a",
"header",
"style",
"property",
"using",
"its",
"name",
"as",
"the",
"key",
".",
"Please",
"ensure",
"the",
"style",
"name",
"and",
"value",
"are",
"appropriately",
"configured",
"or",
"it",
"may",
"result",
"in",
"unexpected",
"behavior",
"."
] | train | https://github.com/GwtMaterialDesign/gwt-material-table/blob/1352cafdcbff747bc1f302e709ed376df6642ef5/src/main/java/gwt/material/design/client/ui/table/cell/FrozenProperties.java#L104-L107 |
Alluxio/alluxio | core/server/common/src/main/java/alluxio/ProcessUtils.java | ProcessUtils.fatalError | public static void fatalError(Logger logger, String format, Object... args) {
"""
Logs a fatal error and then exits the system.
@param logger the logger to log to
@param format the error message format string
@param args args for the format string
"""
fatalError(logger, null, format, args);
} | java | public static void fatalError(Logger logger, String format, Object... args) {
fatalError(logger, null, format, args);
} | [
"public",
"static",
"void",
"fatalError",
"(",
"Logger",
"logger",
",",
"String",
"format",
",",
"Object",
"...",
"args",
")",
"{",
"fatalError",
"(",
"logger",
",",
"null",
",",
"format",
",",
"args",
")",
";",
"}"
] | Logs a fatal error and then exits the system.
@param logger the logger to log to
@param format the error message format string
@param args args for the format string | [
"Logs",
"a",
"fatal",
"error",
"and",
"then",
"exits",
"the",
"system",
"."
] | train | https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/server/common/src/main/java/alluxio/ProcessUtils.java#L57-L59 |
forge/core | facets/api/src/main/java/org/jboss/forge/addon/facets/constraints/FacetInspector.java | FacetInspector.getRequiredFacets | public static <FACETTYPE extends Facet<?>> Set<Class<FACETTYPE>> getRequiredFacets(final Class<?> inspectedType) {
"""
Inspect the given {@link Class} for any {@link FacetConstraintType#REQUIRED} dependency {@link Facet} types.
"""
return getRelatedFacets(inspectedType, FacetConstraintType.REQUIRED);
... | java | public static <FACETTYPE extends Facet<?>> Set<Class<FACETTYPE>> getRequiredFacets(final Class<?> inspectedType)
{
return getRelatedFacets(inspectedType, FacetConstraintType.REQUIRED);
} | [
"public",
"static",
"<",
"FACETTYPE",
"extends",
"Facet",
"<",
"?",
">",
">",
"Set",
"<",
"Class",
"<",
"FACETTYPE",
">",
">",
"getRequiredFacets",
"(",
"final",
"Class",
"<",
"?",
">",
"inspectedType",
")",
"{",
"return",
"getRelatedFacets",
"(",
"inspect... | Inspect the given {@link Class} for any {@link FacetConstraintType#REQUIRED} dependency {@link Facet} types. | [
"Inspect",
"the",
"given",
"{"
] | train | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/facets/api/src/main/java/org/jboss/forge/addon/facets/constraints/FacetInspector.java#L71-L74 |
HubSpot/Singularity | SingularityClient/src/main/java/com/hubspot/singularity/client/SingularityClient.java | SingularityClient.getHistoryForTask | public Optional<SingularityTaskHistory> getHistoryForTask(String taskId) {
"""
Retrieve information about an inactive task by its id
@param taskId
The task ID to search for
@return
A {@link SingularityTaskIdHistory} object if the task exists
"""
final Function<String, String> requestUri = (host) -> S... | java | public Optional<SingularityTaskHistory> getHistoryForTask(String taskId) {
final Function<String, String> requestUri = (host) -> String.format(TASK_HISTORY_FORMAT, getApiBase(host), taskId);
return getSingle(requestUri, "task history", taskId, SingularityTaskHistory.class);
} | [
"public",
"Optional",
"<",
"SingularityTaskHistory",
">",
"getHistoryForTask",
"(",
"String",
"taskId",
")",
"{",
"final",
"Function",
"<",
"String",
",",
"String",
">",
"requestUri",
"=",
"(",
"host",
")",
"-",
">",
"String",
".",
"format",
"(",
"TASK_HISTO... | Retrieve information about an inactive task by its id
@param taskId
The task ID to search for
@return
A {@link SingularityTaskIdHistory} object if the task exists | [
"Retrieve",
"information",
"about",
"an",
"inactive",
"task",
"by",
"its",
"id"
] | train | https://github.com/HubSpot/Singularity/blob/384a8c16a10aa076af5ca45c8dfcedab9e5122c8/SingularityClient/src/main/java/com/hubspot/singularity/client/SingularityClient.java#L1079-L1083 |
riversun/d6 | src/main/java/org/riversun/d6/DBConnCreator.java | DBConnCreator.getConnectionViaDriverMangaer | private Connection getConnectionViaDriverMangaer(String driver, String url, String user, String password) {
"""
get connection object from driver manager
@param url
@param user
@param password
@return
"""
Connection conn = null;
try {
Class.forName(driver);
c... | java | private Connection getConnectionViaDriverMangaer(String driver, String url, String user, String password) {
Connection conn = null;
try {
Class.forName(driver);
conn = DriverManager.getConnection(url, user, password);
} catch (ClassNotFoundException e) {
... | [
"private",
"Connection",
"getConnectionViaDriverMangaer",
"(",
"String",
"driver",
",",
"String",
"url",
",",
"String",
"user",
",",
"String",
"password",
")",
"{",
"Connection",
"conn",
"=",
"null",
";",
"try",
"{",
"Class",
".",
"forName",
"(",
"driver",
"... | get connection object from driver manager
@param url
@param user
@param password
@return | [
"get",
"connection",
"object",
"from",
"driver",
"manager"
] | train | https://github.com/riversun/d6/blob/2798bd876b9380dbfea8182d11ad306cb1b0e114/src/main/java/org/riversun/d6/DBConnCreator.java#L69-L81 |
Impetus/Kundera | src/kundera-rethinkdb/src/main/java/com/impetus/client/rethink/query/RethinkDBQuery.java | RethinkDBQuery.buildEntityFromCursor | private void buildEntityFromCursor(Object entity, HashMap obj, EntityType entityType) {
"""
Builds the entity from cursor.
@param entity
the entity
@param obj
the obj
@param entityType
the entity type
@return the object
"""
Iterator<Attribute> iter = entityType.getAttributes().iterator();
... | java | private void buildEntityFromCursor(Object entity, HashMap obj, EntityType entityType)
{
Iterator<Attribute> iter = entityType.getAttributes().iterator();
while (iter.hasNext())
{
Attribute attribute = iter.next();
Field field = (Field) attribute.getJavaMember();
... | [
"private",
"void",
"buildEntityFromCursor",
"(",
"Object",
"entity",
",",
"HashMap",
"obj",
",",
"EntityType",
"entityType",
")",
"{",
"Iterator",
"<",
"Attribute",
">",
"iter",
"=",
"entityType",
".",
"getAttributes",
"(",
")",
".",
"iterator",
"(",
")",
";... | Builds the entity from cursor.
@param entity
the entity
@param obj
the obj
@param entityType
the entity type
@return the object | [
"Builds",
"the",
"entity",
"from",
"cursor",
"."
] | train | https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-rethinkdb/src/main/java/com/impetus/client/rethink/query/RethinkDBQuery.java#L168-L185 |
Azure/azure-sdk-for-java | keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java | KeyVaultClientBaseImpl.updateCertificatePolicyAsync | public Observable<CertificatePolicy> updateCertificatePolicyAsync(String vaultBaseUrl, String certificateName, CertificatePolicy certificatePolicy) {
"""
Updates the policy for a certificate.
Set specified members in the certificate policy. Leave others as null. This operation requires the certificates/update per... | java | public Observable<CertificatePolicy> updateCertificatePolicyAsync(String vaultBaseUrl, String certificateName, CertificatePolicy certificatePolicy) {
return updateCertificatePolicyWithServiceResponseAsync(vaultBaseUrl, certificateName, certificatePolicy).map(new Func1<ServiceResponse<CertificatePolicy>, Certifi... | [
"public",
"Observable",
"<",
"CertificatePolicy",
">",
"updateCertificatePolicyAsync",
"(",
"String",
"vaultBaseUrl",
",",
"String",
"certificateName",
",",
"CertificatePolicy",
"certificatePolicy",
")",
"{",
"return",
"updateCertificatePolicyWithServiceResponseAsync",
"(",
"... | Updates the policy for a certificate.
Set specified members in the certificate policy. Leave others as null. This operation requires the certificates/update permission.
@param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
@param certificateName The name of the certificate in the given vault... | [
"Updates",
"the",
"policy",
"for",
"a",
"certificate",
".",
"Set",
"specified",
"members",
"in",
"the",
"certificate",
"policy",
".",
"Leave",
"others",
"as",
"null",
".",
"This",
"operation",
"requires",
"the",
"certificates",
"/",
"update",
"permission",
"."... | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L7270-L7277 |
line/armeria | core/src/main/java/com/linecorp/armeria/internal/annotation/AnnotatedValueResolver.java | AnnotatedValueResolver.ofBeanConstructorOrMethod | static List<AnnotatedValueResolver> ofBeanConstructorOrMethod(Executable constructorOrMethod,
Set<String> pathParams,
List<RequestObjectResolver> objectResolvers) {
"""
Returns a list... | java | static List<AnnotatedValueResolver> ofBeanConstructorOrMethod(Executable constructorOrMethod,
Set<String> pathParams,
List<RequestObjectResolver> objectResolvers) {
return of(const... | [
"static",
"List",
"<",
"AnnotatedValueResolver",
">",
"ofBeanConstructorOrMethod",
"(",
"Executable",
"constructorOrMethod",
",",
"Set",
"<",
"String",
">",
"pathParams",
",",
"List",
"<",
"RequestObjectResolver",
">",
"objectResolvers",
")",
"{",
"return",
"of",
"(... | Returns a list of {@link AnnotatedValueResolver} which is constructed with the specified
{@code constructorOrMethod}, {@code pathParams} and {@code objectResolvers}. | [
"Returns",
"a",
"list",
"of",
"{"
] | train | https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/core/src/main/java/com/linecorp/armeria/internal/annotation/AnnotatedValueResolver.java#L149-L153 |
bazaarvoice/jolt | jolt-core/src/main/java/com/bazaarvoice/jolt/cardinality/CardinalityCompositeSpec.java | CardinalityCompositeSpec.applyCardinality | @Override
public boolean applyCardinality( String inputKey, Object input, WalkedPath walkedPath, Object parentContainer ) {
"""
If this Spec matches the inputkey, then perform one step in the parallel treewalk.
<p/>
Step one level down the input "tree" by carefully handling the List/Map nature the input to
... | java | @Override
public boolean applyCardinality( String inputKey, Object input, WalkedPath walkedPath, Object parentContainer ) {
MatchedElement thisLevel = pathElement.match( inputKey, walkedPath );
if ( thisLevel == null ) {
return false;
}
walkedPath.add( input, thisLevel )... | [
"@",
"Override",
"public",
"boolean",
"applyCardinality",
"(",
"String",
"inputKey",
",",
"Object",
"input",
",",
"WalkedPath",
"walkedPath",
",",
"Object",
"parentContainer",
")",
"{",
"MatchedElement",
"thisLevel",
"=",
"pathElement",
".",
"match",
"(",
"inputKe... | If this Spec matches the inputkey, then perform one step in the parallel treewalk.
<p/>
Step one level down the input "tree" by carefully handling the List/Map nature the input to
get the "one level down" data.
<p/>
Step one level down the Spec tree by carefully and efficiently applying our children to the
"one level d... | [
"If",
"this",
"Spec",
"matches",
"the",
"inputkey",
"then",
"perform",
"one",
"step",
"in",
"the",
"parallel",
"treewalk",
".",
"<p",
"/",
">",
"Step",
"one",
"level",
"down",
"the",
"input",
"tree",
"by",
"carefully",
"handling",
"the",
"List",
"/",
"Ma... | train | https://github.com/bazaarvoice/jolt/blob/4cf866a9f4222142da41b50dbcccce022a956bff/jolt-core/src/main/java/com/bazaarvoice/jolt/cardinality/CardinalityCompositeSpec.java#L144-L164 |
Azure/azure-sdk-for-java | network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/ExpressRouteCircuitsInner.java | ExpressRouteCircuitsInner.updateTags | public ExpressRouteCircuitInner updateTags(String resourceGroupName, String circuitName) {
"""
Updates an express route circuit tags.
@param resourceGroupName The name of the resource group.
@param circuitName The name of the circuit.
@throws IllegalArgumentException thrown if parameters fail the validation
... | java | public ExpressRouteCircuitInner updateTags(String resourceGroupName, String circuitName) {
return updateTagsWithServiceResponseAsync(resourceGroupName, circuitName).toBlocking().last().body();
} | [
"public",
"ExpressRouteCircuitInner",
"updateTags",
"(",
"String",
"resourceGroupName",
",",
"String",
"circuitName",
")",
"{",
"return",
"updateTagsWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"circuitName",
")",
".",
"toBlocking",
"(",
")",
".",
"last",
... | Updates an express route circuit tags.
@param resourceGroupName The name of the resource group.
@param circuitName The name of the circuit.
@throws IllegalArgumentException thrown if parameters fail the validation
@throws CloudException thrown if the request is rejected by server
@throws RuntimeException all other wra... | [
"Updates",
"an",
"express",
"route",
"circuit",
"tags",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/ExpressRouteCircuitsInner.java#L562-L564 |
UrielCh/ovh-java-sdk | ovh-java-sdk-dedicatedCloud/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedCloud.java | ApiOvhDedicatedCloud.serviceName_datacenter_datacenterId_disasterRecovery_zertoSingle_enable_POST | public OvhTask serviceName_datacenter_datacenterId_disasterRecovery_zertoSingle_enable_POST(String serviceName, Long datacenterId, String localVraNetwork, String ovhEndpointIp, String remoteVraNetwork) throws IOException {
"""
Enable Zerto replication between your OVH Private Cloud and your onsite infrastructure
... | java | public OvhTask serviceName_datacenter_datacenterId_disasterRecovery_zertoSingle_enable_POST(String serviceName, Long datacenterId, String localVraNetwork, String ovhEndpointIp, String remoteVraNetwork) throws IOException {
String qPath = "/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/disasterRecovery/zertoS... | [
"public",
"OvhTask",
"serviceName_datacenter_datacenterId_disasterRecovery_zertoSingle_enable_POST",
"(",
"String",
"serviceName",
",",
"Long",
"datacenterId",
",",
"String",
"localVraNetwork",
",",
"String",
"ovhEndpointIp",
",",
"String",
"remoteVraNetwork",
")",
"throws",
... | Enable Zerto replication between your OVH Private Cloud and your onsite infrastructure
REST: POST /dedicatedCloud/{serviceName}/datacenter/{datacenterId}/disasterRecovery/zertoSingle/enable
@param ovhEndpointIp [required] Your OVH Private Cloud public IP for the secured replication data tunnel endpoint
@param remoteVr... | [
"Enable",
"Zerto",
"replication",
"between",
"your",
"OVH",
"Private",
"Cloud",
"and",
"your",
"onsite",
"infrastructure"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dedicatedCloud/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedCloud.java#L1881-L1890 |
JM-Lab/utils-java8 | src/main/java/kr/jm/utils/helper/JMOptional.java | JMOptional.orElseGetIfNull | public static <T> T orElseGetIfNull(T target, Supplier<T> elseGetSupplier) {
"""
Or else get if null t.
@param <T> the type parameter
@param target the target
@param elseGetSupplier the else get supplier
@return the t
"""
return Optional.ofNullable(target).orElseGet(elseGetSu... | java | public static <T> T orElseGetIfNull(T target, Supplier<T> elseGetSupplier) {
return Optional.ofNullable(target).orElseGet(elseGetSupplier);
} | [
"public",
"static",
"<",
"T",
">",
"T",
"orElseGetIfNull",
"(",
"T",
"target",
",",
"Supplier",
"<",
"T",
">",
"elseGetSupplier",
")",
"{",
"return",
"Optional",
".",
"ofNullable",
"(",
"target",
")",
".",
"orElseGet",
"(",
"elseGetSupplier",
")",
";",
"... | Or else get if null t.
@param <T> the type parameter
@param target the target
@param elseGetSupplier the else get supplier
@return the t | [
"Or",
"else",
"get",
"if",
"null",
"t",
"."
] | train | https://github.com/JM-Lab/utils-java8/blob/9e407b3f28a7990418a1e877229fa8344f4d78a5/src/main/java/kr/jm/utils/helper/JMOptional.java#L229-L231 |
foundation-runtime/service-directory | 2.0/sd-api/src/main/java/com/cisco/oss/foundation/directory/connect/NIODirectorySocket.java | NIODirectorySocket.registerAndConnect | void registerAndConnect(SocketChannel sock, InetSocketAddress addr)
throws IOException {
"""
Register a SocketChannel and connect the remote address.
@param sock
the SocketChannel.
@param addr
the remote address.
@throws IOException
the IOException.
"""
selectionKey = sock.register(... | java | void registerAndConnect(SocketChannel sock, InetSocketAddress addr)
throws IOException {
selectionKey = sock.register(selector, SelectionKey.OP_CONNECT);
boolean immediateConnect = sock.connect(addr);
if(LOGGER.isTraceEnabled()){
LOGGER.trace("Connect to host=" + addr.ge... | [
"void",
"registerAndConnect",
"(",
"SocketChannel",
"sock",
",",
"InetSocketAddress",
"addr",
")",
"throws",
"IOException",
"{",
"selectionKey",
"=",
"sock",
".",
"register",
"(",
"selector",
",",
"SelectionKey",
".",
"OP_CONNECT",
")",
";",
"boolean",
"immediateC... | Register a SocketChannel and connect the remote address.
@param sock
the SocketChannel.
@param addr
the remote address.
@throws IOException
the IOException. | [
"Register",
"a",
"SocketChannel",
"and",
"connect",
"the",
"remote",
"address",
"."
] | train | https://github.com/foundation-runtime/service-directory/blob/a7bdefe173dc99e75eff4a24e07e6407e62f2ed4/2.0/sd-api/src/main/java/com/cisco/oss/foundation/directory/connect/NIODirectorySocket.java#L152-L165 |
alkacon/opencms-core | src/org/opencms/db/CmsDriverManager.java | CmsDriverManager.deleteProject | public void deleteProject(CmsDbContext dbc, CmsProject deleteProject) throws CmsException {
"""
Deletes a project.<p>
Only the admin or the owner of the project can do this.
@param dbc the current database context
@param deleteProject the project to be deleted
@throws CmsException if something goes wrong... | java | public void deleteProject(CmsDbContext dbc, CmsProject deleteProject) throws CmsException {
deleteProject(dbc, deleteProject, true);
} | [
"public",
"void",
"deleteProject",
"(",
"CmsDbContext",
"dbc",
",",
"CmsProject",
"deleteProject",
")",
"throws",
"CmsException",
"{",
"deleteProject",
"(",
"dbc",
",",
"deleteProject",
",",
"true",
")",
";",
"}"
] | Deletes a project.<p>
Only the admin or the owner of the project can do this.
@param dbc the current database context
@param deleteProject the project to be deleted
@throws CmsException if something goes wrong | [
"Deletes",
"a",
"project",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsDriverManager.java#L2687-L2690 |
ontop/ontop | core/optimization/src/main/java/it/unibz/inf/ontop/iq/optimizer/impl/PushDownBooleanExpressionOptimizerImpl.java | PushDownBooleanExpressionOptimizerImpl.optimizeJoinOrFilter | private NextNodeAndQuery optimizeJoinOrFilter(IntermediateQuery currentQuery, JoinOrFilterNode currentNode) {
"""
Tries to optimize one JoinOrFilterNode.
Returns information for the continuing the navigation in the possibly new IntermediateQuery.
"""
/**
* Tries to build a PushDownBooleanExp... | java | private NextNodeAndQuery optimizeJoinOrFilter(IntermediateQuery currentQuery, JoinOrFilterNode currentNode) {
/**
* Tries to build a PushDownBooleanExpressionProposal for the current node
*/
Optional<PushDownBooleanExpressionProposal> optionalProposal = makeProposal(
c... | [
"private",
"NextNodeAndQuery",
"optimizeJoinOrFilter",
"(",
"IntermediateQuery",
"currentQuery",
",",
"JoinOrFilterNode",
"currentNode",
")",
"{",
"/**\n * Tries to build a PushDownBooleanExpressionProposal for the current node\n */",
"Optional",
"<",
"PushDownBooleanExpr... | Tries to optimize one JoinOrFilterNode.
Returns information for the continuing the navigation in the possibly new IntermediateQuery. | [
"Tries",
"to",
"optimize",
"one",
"JoinOrFilterNode",
".",
"Returns",
"information",
"for",
"the",
"continuing",
"the",
"navigation",
"in",
"the",
"possibly",
"new",
"IntermediateQuery",
"."
] | train | https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/core/optimization/src/main/java/it/unibz/inf/ontop/iq/optimizer/impl/PushDownBooleanExpressionOptimizerImpl.java#L158-L185 |
Omertron/api-themoviedb | src/main/java/com/omertron/themoviedbapi/Compare.java | Compare.movies | public static boolean movies(final MovieInfo moviedb, final String title, final String year) {
"""
Compare the MovieDB object with a title and year
@param moviedb The moviedb object to compare too
@param title The title of the movie to compare
@param year The year of the movie to compare exact match
@return ... | java | public static boolean movies(final MovieInfo moviedb, final String title, final String year) {
return movies(moviedb, title, year, 0, true);
} | [
"public",
"static",
"boolean",
"movies",
"(",
"final",
"MovieInfo",
"moviedb",
",",
"final",
"String",
"title",
",",
"final",
"String",
"year",
")",
"{",
"return",
"movies",
"(",
"moviedb",
",",
"title",
",",
"year",
",",
"0",
",",
"true",
")",
";",
"}... | Compare the MovieDB object with a title and year
@param moviedb The moviedb object to compare too
@param title The title of the movie to compare
@param year The year of the movie to compare exact match
@return True if there is a match, False otherwise. | [
"Compare",
"the",
"MovieDB",
"object",
"with",
"a",
"title",
"and",
"year"
] | train | https://github.com/Omertron/api-themoviedb/blob/bf132d7c7271734e13b58ba3bc92bba46f220118/src/main/java/com/omertron/themoviedbapi/Compare.java#L49-L51 |
reapzor/FiloFirmata | src/main/java/com/bortbort/arduino/FiloFirmata/Firmata.java | Firmata.addListener | private void addListener(Integer channel, Class<? extends Message> messageClass, MessageListener messageListener) {
"""
Add a messageListener to the Firmata object which will fire whenever a matching message is received
over the SerialPort that corresponds to the given channel. If the channel is null, the listene... | java | private void addListener(Integer channel, Class<? extends Message> messageClass, MessageListener messageListener) {
// Build up the empty class listener map if not already there
if (!messageListenerMap.containsKey(messageClass)) {
messageListenerMap.put(messageClass, ArrayListMultimap.create(... | [
"private",
"void",
"addListener",
"(",
"Integer",
"channel",
",",
"Class",
"<",
"?",
"extends",
"Message",
">",
"messageClass",
",",
"MessageListener",
"messageListener",
")",
"{",
"// Build up the empty class listener map if not already there",
"if",
"(",
"!",
"message... | Add a messageListener to the Firmata object which will fire whenever a matching message is received
over the SerialPort that corresponds to the given channel. If the channel is null, the listener
will fire regardless of which channel (pin) the message is coming from.
@param channel Integer indicating the specific chan... | [
"Add",
"a",
"messageListener",
"to",
"the",
"Firmata",
"object",
"which",
"will",
"fire",
"whenever",
"a",
"matching",
"message",
"is",
"received",
"over",
"the",
"SerialPort",
"that",
"corresponds",
"to",
"the",
"given",
"channel",
".",
"If",
"the",
"channel"... | train | https://github.com/reapzor/FiloFirmata/blob/39c26c1a577b8fff8690245e105cb62e02284f16/src/main/java/com/bortbort/arduino/FiloFirmata/Firmata.java#L119-L133 |
nominanuda/zen-project | zen-core/src/main/java/com/nominanuda/zen/xml/DOMBuilder.java | DOMBuilder.charactersRaw | public void charactersRaw(char ch[], int start, int length)
throws SAXException {
"""
If available, when the disable-output-escaping attribute is used, output
raw text without escaping. A PI will be inserted in front of the node
with the name "lotusxsl-next-is-raw" and a value of "formatter-to-dom".
@param... | java | public void charactersRaw(char ch[], int start, int length)
throws SAXException {
if (isOutsideDocElem()
&& XML.isWhiteSpace(ch, start, length))
return; // avoid DOM006 Hierarchy request error
String s = new String(ch, start, length);
append(m_doc.createProcessingInstruction("xslt-next-is-raw",
"f... | [
"public",
"void",
"charactersRaw",
"(",
"char",
"ch",
"[",
"]",
",",
"int",
"start",
",",
"int",
"length",
")",
"throws",
"SAXException",
"{",
"if",
"(",
"isOutsideDocElem",
"(",
")",
"&&",
"XML",
".",
"isWhiteSpace",
"(",
"ch",
",",
"start",
",",
"len... | If available, when the disable-output-escaping attribute is used, output
raw text without escaping. A PI will be inserted in front of the node
with the name "lotusxsl-next-is-raw" and a value of "formatter-to-dom".
@param ch
Array containing the characters
@param start
Index to start of characters in the array
@param ... | [
"If",
"available",
"when",
"the",
"disable",
"-",
"output",
"-",
"escaping",
"attribute",
"is",
"used",
"output",
"raw",
"text",
"without",
"escaping",
".",
"A",
"PI",
"will",
"be",
"inserted",
"in",
"front",
"of",
"the",
"node",
"with",
"the",
"name",
"... | train | https://github.com/nominanuda/zen-project/blob/fe48ae8da198eb7066c2b56bf2ffafe4cdfc451d/zen-core/src/main/java/com/nominanuda/zen/xml/DOMBuilder.java#L481-L492 |
aws/aws-sdk-java | aws-java-sdk-core/src/main/java/com/amazonaws/util/ValidationUtils.java | ValidationUtils.assertNotNull | public static <T> T assertNotNull(T object, String fieldName) throws IllegalArgumentException {
"""
Asserts that the given object is non-null and returns it.
@param object
Object to assert on
@param fieldName
Field name to display in exception message if null
@return Object if non null
@throws IllegalArgum... | java | public static <T> T assertNotNull(T object, String fieldName) throws IllegalArgumentException {
if (object == null) {
throw new IllegalArgumentException(String.format("%s cannot be null", fieldName));
}
return object;
} | [
"public",
"static",
"<",
"T",
">",
"T",
"assertNotNull",
"(",
"T",
"object",
",",
"String",
"fieldName",
")",
"throws",
"IllegalArgumentException",
"{",
"if",
"(",
"object",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"String",
"... | Asserts that the given object is non-null and returns it.
@param object
Object to assert on
@param fieldName
Field name to display in exception message if null
@return Object if non null
@throws IllegalArgumentException
If object was null | [
"Asserts",
"that",
"the",
"given",
"object",
"is",
"non",
"-",
"null",
"and",
"returns",
"it",
"."
] | train | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/util/ValidationUtils.java#L35-L40 |
joniles/mpxj | src/main/java/net/sf/mpxj/primavera/suretrak/SureTrakDatabaseReader.java | SureTrakDatabaseReader.readHours | private void readHours(ProjectCalendar calendar, Day day, Integer hours) {
"""
Reads the integer representation of calendar hours for a given
day and populates the calendar.
@param calendar parent calendar
@param day target day
@param hours working hours
"""
int value = hours.intValue();
int ... | java | private void readHours(ProjectCalendar calendar, Day day, Integer hours)
{
int value = hours.intValue();
int startHour = 0;
ProjectCalendarHours calendarHours = null;
Calendar cal = DateHelper.popCalendar();
cal.set(Calendar.HOUR_OF_DAY, 0);
cal.set(Calendar.MINUTE, 0);
cal... | [
"private",
"void",
"readHours",
"(",
"ProjectCalendar",
"calendar",
",",
"Day",
"day",
",",
"Integer",
"hours",
")",
"{",
"int",
"value",
"=",
"hours",
".",
"intValue",
"(",
")",
";",
"int",
"startHour",
"=",
"0",
";",
"ProjectCalendarHours",
"calendarHours"... | Reads the integer representation of calendar hours for a given
day and populates the calendar.
@param calendar parent calendar
@param day target day
@param hours working hours | [
"Reads",
"the",
"integer",
"representation",
"of",
"calendar",
"hours",
"for",
"a",
"given",
"day",
"and",
"populates",
"the",
"calendar",
"."
] | train | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/suretrak/SureTrakDatabaseReader.java#L374-L426 |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/comms/common/CommsByteBuffer.java | CommsByteBuffer.putMap | public void putMap (Map<String,String> map) {
"""
Put a <String,String> Map object into the transmission buffer
""" //SIB0163.comms.1
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "putMap", "map="+map);
if... | java | public void putMap (Map<String,String> map) { //SIB0163.comms.1
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "putMap", "map="+map);
if (map != null) {
final Set<String> keys = map.keySet();
putShort(... | [
"public",
"void",
"putMap",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"map",
")",
"{",
"//SIB0163.comms.1",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"SibTr",
".",
"entry",
"... | Put a <String,String> Map object into the transmission buffer | [
"Put",
"a",
"<String",
"String",
">",
"Map",
"object",
"into",
"the",
"transmission",
"buffer"
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/comms/common/CommsByteBuffer.java#L688-L703 |
apptik/jus | examples-android/src/main/java/io/apptik/comm/jus/examples/adapter/RecyclerAdapter.java | RecyclerAdapter.onBindViewHolder | @Override
public void onBindViewHolder(ViewHolder viewHolder, final int position) {
"""
Replace the contents of a view (invoked by the layout manager)
"""
Log.d(TAG, "Element " + position + " set.");
// Get element from your dataset at this position and replace the contents of the view
... | java | @Override
public void onBindViewHolder(ViewHolder viewHolder, final int position) {
Log.d(TAG, "Element " + position + " set.");
// Get element from your dataset at this position and replace the contents of the view
// with that element
Log.e("jus", jarr.get(position).asJsonObject().... | [
"@",
"Override",
"public",
"void",
"onBindViewHolder",
"(",
"ViewHolder",
"viewHolder",
",",
"final",
"int",
"position",
")",
"{",
"Log",
".",
"d",
"(",
"TAG",
",",
"\"Element \"",
"+",
"position",
"+",
"\" set.\"",
")",
";",
"// Get element from your dataset at... | Replace the contents of a view (invoked by the layout manager) | [
"Replace",
"the",
"contents",
"of",
"a",
"view",
"(",
"invoked",
"by",
"the",
"layout",
"manager",
")"
] | train | https://github.com/apptik/jus/blob/8a37a21b41f897d68eaeaab07368ec22a1e5a60e/examples-android/src/main/java/io/apptik/comm/jus/examples/adapter/RecyclerAdapter.java#L128-L166 |
LearnLib/learnlib | oracles/parallelism/src/main/java/de/learnlib/oracle/parallelism/ParallelOracleBuilders.java | ParallelOracleBuilders.newDynamicParallelOracle | @Nonnull
@SafeVarargs
public static <I, D> DynamicParallelOracleBuilder<I, D> newDynamicParallelOracle(MembershipOracle<I, D> firstOracle,
MembershipOracle<I, D>... otherOracles) {
"""
Convenience method for {@link #newDyn... | java | @Nonnull
@SafeVarargs
public static <I, D> DynamicParallelOracleBuilder<I, D> newDynamicParallelOracle(MembershipOracle<I, D> firstOracle,
MembershipOracle<I, D>... otherOracles) {
return newDynamicParallelOracle(Lists.... | [
"@",
"Nonnull",
"@",
"SafeVarargs",
"public",
"static",
"<",
"I",
",",
"D",
">",
"DynamicParallelOracleBuilder",
"<",
"I",
",",
"D",
">",
"newDynamicParallelOracle",
"(",
"MembershipOracle",
"<",
"I",
",",
"D",
">",
"firstOracle",
",",
"MembershipOracle",
"<",... | Convenience method for {@link #newDynamicParallelOracle(Collection)}.
@param firstOracle
the first (mandatory) oracle
@param otherOracles
further (optional) oracles to be used by other threads
@param <I>
input symbol type
@param <D>
output domain type
@return a preconfigured oracle builder | [
"Convenience",
"method",
"for",
"{",
"@link",
"#newDynamicParallelOracle",
"(",
"Collection",
")",
"}",
"."
] | train | https://github.com/LearnLib/learnlib/blob/fa38a14adcc0664099f180d671ffa42480318d7b/oracles/parallelism/src/main/java/de/learnlib/oracle/parallelism/ParallelOracleBuilders.java#L103-L108 |
aws/aws-sdk-java | aws-java-sdk-stepfunctions/src/main/java/com/amazonaws/services/stepfunctions/builder/StepFunctionBuilder.java | StepFunctionBuilder.gt | public static TimestampGreaterThanCondition.Builder gt(String variable, Date expectedValue) {
"""
Binary condition for Timestamp greater than comparison. Dates are converted to ISO8601 UTC timestamps.
@param variable The JSONPath expression that determines which piece of the input document is used for the ... | java | public static TimestampGreaterThanCondition.Builder gt(String variable, Date expectedValue) {
return TimestampGreaterThanCondition.builder().variable(variable).expectedValue(expectedValue);
} | [
"public",
"static",
"TimestampGreaterThanCondition",
".",
"Builder",
"gt",
"(",
"String",
"variable",
",",
"Date",
"expectedValue",
")",
"{",
"return",
"TimestampGreaterThanCondition",
".",
"builder",
"(",
")",
".",
"variable",
"(",
"variable",
")",
".",
"expected... | Binary condition for Timestamp greater than comparison. Dates are converted to ISO8601 UTC timestamps.
@param variable The JSONPath expression that determines which piece of the input document is used for the comparison.
@param expectedValue The expected value for this condition.
@see <a href="https://states-lang... | [
"Binary",
"condition",
"for",
"Timestamp",
"greater",
"than",
"comparison",
".",
"Dates",
"are",
"converted",
"to",
"ISO8601",
"UTC",
"timestamps",
"."
] | train | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-stepfunctions/src/main/java/com/amazonaws/services/stepfunctions/builder/StepFunctionBuilder.java#L308-L310 |
gallandarakhneorg/afc | advanced/mathfx/src/main/java/org/arakhne/afc/math/geometry/d2/ifx/AbstractRectangularShape2ifx.java | AbstractRectangularShape2ifx.minYProperty | @Pure
public IntegerProperty minYProperty() {
"""
Replies the property that is the minimum y coordinate of the box.
@return the minY property.
"""
if (this.minY == null) {
this.minY = new SimpleIntegerProperty(this, MathFXAttributeNames.MINIMUM_Y) {
@Override
protected void invalidated() {
... | java | @Pure
public IntegerProperty minYProperty() {
if (this.minY == null) {
this.minY = new SimpleIntegerProperty(this, MathFXAttributeNames.MINIMUM_Y) {
@Override
protected void invalidated() {
final int currentMin = get();
final int currentMax = getMaxY();
if (currentMax < currentMin) {
... | [
"@",
"Pure",
"public",
"IntegerProperty",
"minYProperty",
"(",
")",
"{",
"if",
"(",
"this",
".",
"minY",
"==",
"null",
")",
"{",
"this",
".",
"minY",
"=",
"new",
"SimpleIntegerProperty",
"(",
"this",
",",
"MathFXAttributeNames",
".",
"MINIMUM_Y",
")",
"{",... | Replies the property that is the minimum y coordinate of the box.
@return the minY property. | [
"Replies",
"the",
"property",
"that",
"is",
"the",
"minimum",
"y",
"coordinate",
"of",
"the",
"box",
"."
] | train | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/mathfx/src/main/java/org/arakhne/afc/math/geometry/d2/ifx/AbstractRectangularShape2ifx.java#L207-L223 |
wisdom-framework/wisdom | core/wisdom-maven-plugin/src/main/java/org/wisdom/maven/utils/ResourceCopy.java | ResourceCopy.copyConfiguration | public static void copyConfiguration(AbstractWisdomWatcherMojo mojo, MavenResourcesFiltering filtering) throws
IOException {
"""
Copies the configuration from "src/main/configuration" to "wisdom/conf". Copied resources are filtered.
@param mojo the mojo
@param filtering the component required ... | java | public static void copyConfiguration(AbstractWisdomWatcherMojo mojo, MavenResourcesFiltering filtering) throws
IOException {
File in = new File(mojo.basedir, Constants.CONFIGURATION_SRC_DIR);
if (in.isDirectory()) {
File out = new File(mojo.getWisdomRootDirectory(), Constants.CON... | [
"public",
"static",
"void",
"copyConfiguration",
"(",
"AbstractWisdomWatcherMojo",
"mojo",
",",
"MavenResourcesFiltering",
"filtering",
")",
"throws",
"IOException",
"{",
"File",
"in",
"=",
"new",
"File",
"(",
"mojo",
".",
"basedir",
",",
"Constants",
".",
"CONFIG... | Copies the configuration from "src/main/configuration" to "wisdom/conf". Copied resources are filtered.
@param mojo the mojo
@param filtering the component required to filter resources
@throws IOException if a file cannot be copied | [
"Copies",
"the",
"configuration",
"from",
"src",
"/",
"main",
"/",
"configuration",
"to",
"wisdom",
"/",
"conf",
".",
"Copied",
"resources",
"are",
"filtered",
"."
] | train | https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/core/wisdom-maven-plugin/src/main/java/org/wisdom/maven/utils/ResourceCopy.java#L189-L205 |
realtime-framework/RealtimeMessaging-Android | library/src/main/java/ibt/ortc/extensibility/OrtcClient.java | OrtcClient.subscribeWithNotifications | public void subscribeWithNotifications(String channel, boolean subscribeOnReconnect, OnMessageWithPayload onMessageWithPayload) {
"""
Subscribe the specified channel in order to receive messages in that
channel with a support of Google Cloud Messaging (with access to notification payload).
@param channel
Chan... | java | public void subscribeWithNotifications(String channel, boolean subscribeOnReconnect, OnMessageWithPayload onMessageWithPayload){
_subscribeWithNotifications(channel, subscribeOnReconnect, onMessageWithPayload, false);
} | [
"public",
"void",
"subscribeWithNotifications",
"(",
"String",
"channel",
",",
"boolean",
"subscribeOnReconnect",
",",
"OnMessageWithPayload",
"onMessageWithPayload",
")",
"{",
"_subscribeWithNotifications",
"(",
"channel",
",",
"subscribeOnReconnect",
",",
"onMessageWithPayl... | Subscribe the specified channel in order to receive messages in that
channel with a support of Google Cloud Messaging (with access to notification payload).
@param channel
Channel to be subscribed
@param subscribeOnReconnect
Indicates if the channel should be subscribe if the event on
reconnected is fired
@param onMes... | [
"Subscribe",
"the",
"specified",
"channel",
"in",
"order",
"to",
"receive",
"messages",
"in",
"that",
"channel",
"with",
"a",
"support",
"of",
"Google",
"Cloud",
"Messaging",
"(",
"with",
"access",
"to",
"notification",
"payload",
")",
"."
] | train | https://github.com/realtime-framework/RealtimeMessaging-Android/blob/f0d87b92ed7c591bcfe2b9cf45b947865570e061/library/src/main/java/ibt/ortc/extensibility/OrtcClient.java#L910-L912 |
elki-project/elki | elki-outlier/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/COP.java | COP.computeCentroid | private static void computeCentroid(double[] centroid, Relation<? extends NumberVector> relation, DBIDs ids) {
"""
Recompute the centroid of a set.
@param centroid Scratch buffer
@param relation Input data
@param ids IDs to include
"""
Arrays.fill(centroid, 0);
int dim = centroid.length;
for(D... | java | private static void computeCentroid(double[] centroid, Relation<? extends NumberVector> relation, DBIDs ids) {
Arrays.fill(centroid, 0);
int dim = centroid.length;
for(DBIDIter it = ids.iter(); it.valid(); it.advance()) {
NumberVector v = relation.get(it);
for(int i = 0; i < dim; i++) {
... | [
"private",
"static",
"void",
"computeCentroid",
"(",
"double",
"[",
"]",
"centroid",
",",
"Relation",
"<",
"?",
"extends",
"NumberVector",
">",
"relation",
",",
"DBIDs",
"ids",
")",
"{",
"Arrays",
".",
"fill",
"(",
"centroid",
",",
"0",
")",
";",
"int",
... | Recompute the centroid of a set.
@param centroid Scratch buffer
@param relation Input data
@param ids IDs to include | [
"Recompute",
"the",
"centroid",
"of",
"a",
"set",
"."
] | train | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-outlier/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/COP.java#L285-L295 |
cdk/cdk | app/depict/src/main/java/org/openscience/cdk/depict/Abbreviations.java | Abbreviations.setEnabled | public boolean setEnabled(String label, boolean enabled) {
"""
Set whether an abbreviation is enabled or disabled.
@param label the label (e.g. Ph, Et, Me, OAc, etc.)
@param enabled flag the label as enabled or disabled
@return the label state was modified
"""
return enabled ? labels.contains(la... | java | public boolean setEnabled(String label, boolean enabled) {
return enabled ? labels.contains(label) && disabled.remove(label)
: labels.contains(label) && disabled.add(label);
} | [
"public",
"boolean",
"setEnabled",
"(",
"String",
"label",
",",
"boolean",
"enabled",
")",
"{",
"return",
"enabled",
"?",
"labels",
".",
"contains",
"(",
"label",
")",
"&&",
"disabled",
".",
"remove",
"(",
"label",
")",
":",
"labels",
".",
"contains",
"(... | Set whether an abbreviation is enabled or disabled.
@param label the label (e.g. Ph, Et, Me, OAc, etc.)
@param enabled flag the label as enabled or disabled
@return the label state was modified | [
"Set",
"whether",
"an",
"abbreviation",
"is",
"enabled",
"or",
"disabled",
"."
] | train | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/app/depict/src/main/java/org/openscience/cdk/depict/Abbreviations.java#L166-L169 |
liferay/com-liferay-commerce | commerce-price-list-service/src/main/java/com/liferay/commerce/price/list/service/persistence/impl/CommercePriceEntryPersistenceImpl.java | CommercePriceEntryPersistenceImpl.findByCommercePriceListId | @Override
public List<CommercePriceEntry> findByCommercePriceListId(
long commercePriceListId, int start, int end) {
"""
Returns a range of all the commerce price entries where commercePriceListId = ?.
<p>
Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>sta... | java | @Override
public List<CommercePriceEntry> findByCommercePriceListId(
long commercePriceListId, int start, int end) {
return findByCommercePriceListId(commercePriceListId, start, end, null);
} | [
"@",
"Override",
"public",
"List",
"<",
"CommercePriceEntry",
">",
"findByCommercePriceListId",
"(",
"long",
"commercePriceListId",
",",
"int",
"start",
",",
"int",
"end",
")",
"{",
"return",
"findByCommercePriceListId",
"(",
"commercePriceListId",
",",
"start",
","... | Returns a range of all the commerce price entries where commercePriceListId = ?.
<p>
Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first re... | [
"Returns",
"a",
"range",
"of",
"all",
"the",
"commerce",
"price",
"entries",
"where",
"commercePriceListId",
"=",
"?",
";",
"."
] | train | https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-price-list-service/src/main/java/com/liferay/commerce/price/list/service/persistence/impl/CommercePriceEntryPersistenceImpl.java#L2559-L2563 |
TNG/ArchUnit | archunit/src/main/java/com/tngtech/archunit/library/dependencies/Slice.java | Slice.as | @Override
@PublicAPI(usage = ACCESS)
public Slice as(String pattern) {
"""
The pattern can be a description with references to the matching groups by '$' and position.
E.g. slices are created by 'some.svc.(*).sub.(*)', and the pattern is "the module $2 of service $1",
and we match 'some.svc.foo.module.ba... | java | @Override
@PublicAPI(usage = ACCESS)
public Slice as(String pattern) {
return new Slice(sliceAssignment, matchingGroups, new Description(pattern), classes);
} | [
"@",
"Override",
"@",
"PublicAPI",
"(",
"usage",
"=",
"ACCESS",
")",
"public",
"Slice",
"as",
"(",
"String",
"pattern",
")",
"{",
"return",
"new",
"Slice",
"(",
"sliceAssignment",
",",
"matchingGroups",
",",
"new",
"Description",
"(",
"pattern",
")",
",",
... | The pattern can be a description with references to the matching groups by '$' and position.
E.g. slices are created by 'some.svc.(*).sub.(*)', and the pattern is "the module $2 of service $1",
and we match 'some.svc.foo.module.bar', then the resulting description will be
"the module bar of service foo".
@param patter... | [
"The",
"pattern",
"can",
"be",
"a",
"description",
"with",
"references",
"to",
"the",
"matching",
"groups",
"by",
"$",
"and",
"position",
".",
"E",
".",
"g",
".",
"slices",
"are",
"created",
"by",
"some",
".",
"svc",
".",
"(",
"*",
")",
".",
"sub",
... | train | https://github.com/TNG/ArchUnit/blob/024c5d2502e91de6cb586b86c7084dbd12f3ef37/archunit/src/main/java/com/tngtech/archunit/library/dependencies/Slice.java#L98-L102 |
virgo47/javasimon | core/src/main/java/org/javasimon/callback/quantiles/ExponentialBuckets.java | ExponentialBuckets.estimateQuantile | protected double estimateQuantile(Bucket bucket, double expectedCount, double lastCount) {
"""
{@inheritDoc}
<p/>
Used during quantiles computation to do exponential regression over one bucket.
"""
return bucket.getMin() + (bucket.getMax() - bucket.getMin()) * Math.exp(Math.log(expectedCount - lastCount) ... | java | protected double estimateQuantile(Bucket bucket, double expectedCount, double lastCount) {
return bucket.getMin() + (bucket.getMax() - bucket.getMin()) * Math.exp(Math.log(expectedCount - lastCount) / Math.log(bucket.getCount()));
} | [
"protected",
"double",
"estimateQuantile",
"(",
"Bucket",
"bucket",
",",
"double",
"expectedCount",
",",
"double",
"lastCount",
")",
"{",
"return",
"bucket",
".",
"getMin",
"(",
")",
"+",
"(",
"bucket",
".",
"getMax",
"(",
")",
"-",
"bucket",
".",
"getMin"... | {@inheritDoc}
<p/>
Used during quantiles computation to do exponential regression over one bucket. | [
"{"
] | train | https://github.com/virgo47/javasimon/blob/17dfaa93cded9ce8ef64a134b28ccbf4d0284d2f/core/src/main/java/org/javasimon/callback/quantiles/ExponentialBuckets.java#L66-L68 |
OpenLiberty/open-liberty | dev/com.ibm.ws.jdbc/src/com/ibm/ws/rsadapter/impl/DB2JCCHelper.java | DB2JCCHelper.setClientInformationArray | @Override
public void setClientInformationArray(String[] clientInfoArray, WSRdbManagedConnectionImpl mc, boolean explicitCall) throws SQLException {
"""
/*
order of array is: 0- clientId, 1- workstationid, 2- applicationname, 3- accounInfo
"""
final boolean isTraceOn = TraceComponent.isAnyTracingE... | java | @Override
public void setClientInformationArray(String[] clientInfoArray, WSRdbManagedConnectionImpl mc, boolean explicitCall) throws SQLException {
final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
if (isTraceOn && tc.isDebugEnabled())
Tr.debug(this, tc, "setClientInfor... | [
"@",
"Override",
"public",
"void",
"setClientInformationArray",
"(",
"String",
"[",
"]",
"clientInfoArray",
",",
"WSRdbManagedConnectionImpl",
"mc",
",",
"boolean",
"explicitCall",
")",
"throws",
"SQLException",
"{",
"final",
"boolean",
"isTraceOn",
"=",
"TraceCompone... | /*
order of array is: 0- clientId, 1- workstationid, 2- applicationname, 3- accounInfo | [
"/",
"*",
"order",
"of",
"array",
"is",
":",
"0",
"-",
"clientId",
"1",
"-",
"workstationid",
"2",
"-",
"applicationname",
"3",
"-",
"accounInfo"
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jdbc/src/com/ibm/ws/rsadapter/impl/DB2JCCHelper.java#L425-L451 |
pgjdbc/pgjdbc | pgjdbc/src/main/java/org/postgresql/jdbc/TimestampUtils.java | TimestampUtils.toBinDate | public void toBinDate(TimeZone tz, byte[] bytes, Date value) throws PSQLException {
"""
Converts the SQL Date to binary representation for {@link Oid#DATE}.
@param tz The timezone used.
@param bytes The binary encoded date value.
@param value value
@throws PSQLException If binary format could not be parsed.
... | java | public void toBinDate(TimeZone tz, byte[] bytes, Date value) throws PSQLException {
long millis = value.getTime();
if (tz == null) {
tz = getDefaultTz();
}
// It "getOffset" is UNTESTED
// See org.postgresql.jdbc.AbstractJdbc2Statement.setDate(int, java.sql.Date,
// java.util.Calendar)
... | [
"public",
"void",
"toBinDate",
"(",
"TimeZone",
"tz",
",",
"byte",
"[",
"]",
"bytes",
",",
"Date",
"value",
")",
"throws",
"PSQLException",
"{",
"long",
"millis",
"=",
"value",
".",
"getTime",
"(",
")",
";",
"if",
"(",
"tz",
"==",
"null",
")",
"{",
... | Converts the SQL Date to binary representation for {@link Oid#DATE}.
@param tz The timezone used.
@param bytes The binary encoded date value.
@param value value
@throws PSQLException If binary format could not be parsed. | [
"Converts",
"the",
"SQL",
"Date",
"to",
"binary",
"representation",
"for",
"{",
"@link",
"Oid#DATE",
"}",
"."
] | train | https://github.com/pgjdbc/pgjdbc/blob/95ba7b261e39754674c5817695ae5ebf9a341fae/pgjdbc/src/main/java/org/postgresql/jdbc/TimestampUtils.java#L1380-L1396 |
fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/validation/DOValidatorSchematron.java | DOValidatorSchematron.validate | public void validate(StreamSource objectSource) throws ServerException {
"""
Run the Schematron validation on a Fedora object.
@param objectSource
the Fedora object as an StreamSource
@throws ServerException
"""
DOValidatorSchematronResult result = null;
try {
// Create a trans... | java | public void validate(StreamSource objectSource) throws ServerException {
DOValidatorSchematronResult result = null;
try {
// Create a transformer that uses the validating stylesheet.
// Run the Schematron validation of the Fedora object and
// output results in DOM fo... | [
"public",
"void",
"validate",
"(",
"StreamSource",
"objectSource",
")",
"throws",
"ServerException",
"{",
"DOValidatorSchematronResult",
"result",
"=",
"null",
";",
"try",
"{",
"// Create a transformer that uses the validating stylesheet.",
"// Run the Schematron validation of th... | Run the Schematron validation on a Fedora object.
@param objectSource
the Fedora object as an StreamSource
@throws ServerException | [
"Run",
"the",
"Schematron",
"validation",
"on",
"a",
"Fedora",
"object",
"."
] | train | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/validation/DOValidatorSchematron.java#L107-L140 |
sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/typesystem/SARLOperationHelper.java | SARLOperationHelper._hasSideEffects | protected Boolean _hasSideEffects(XUnaryOperation expression, ISideEffectContext context) {
"""
Test if the given expression has side effects.
@param expression the expression.
@param context the list of context expressions.
@return {@code true} if the expression has side effects.
"""
if (expression.isT... | java | protected Boolean _hasSideEffects(XUnaryOperation expression, ISideEffectContext context) {
if (expression.isTypeLiteral() || expression.isPackageFragment()) {
return Boolean.FALSE;
}
if (hasSideEffects(expression.getOperand(), context)) {
return true;
}
return false;
} | [
"protected",
"Boolean",
"_hasSideEffects",
"(",
"XUnaryOperation",
"expression",
",",
"ISideEffectContext",
"context",
")",
"{",
"if",
"(",
"expression",
".",
"isTypeLiteral",
"(",
")",
"||",
"expression",
".",
"isPackageFragment",
"(",
")",
")",
"{",
"return",
... | Test if the given expression has side effects.
@param expression the expression.
@param context the list of context expressions.
@return {@code true} if the expression has side effects. | [
"Test",
"if",
"the",
"given",
"expression",
"has",
"side",
"effects",
"."
] | train | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/typesystem/SARLOperationHelper.java#L521-L529 |
morimekta/utils | console-util/src/main/java/net/morimekta/console/terminal/InputLine.java | InputLine.handleInterrupt | private void handleInterrupt(int ch, Char c) throws IOException {
"""
Handle user interrupts.
@param ch The character code point.
@param c The char instance.
@throws IOException
"""
if (ch == Char.ESC || ch == Char.ABR || ch == Char.EOF) {
throw new IOException("User interrupted: " + c.a... | java | private void handleInterrupt(int ch, Char c) throws IOException {
if (ch == Char.ESC || ch == Char.ABR || ch == Char.EOF) {
throw new IOException("User interrupted: " + c.asString());
}
} | [
"private",
"void",
"handleInterrupt",
"(",
"int",
"ch",
",",
"Char",
"c",
")",
"throws",
"IOException",
"{",
"if",
"(",
"ch",
"==",
"Char",
".",
"ESC",
"||",
"ch",
"==",
"Char",
".",
"ABR",
"||",
"ch",
"==",
"Char",
".",
"EOF",
")",
"{",
"throw",
... | Handle user interrupts.
@param ch The character code point.
@param c The char instance.
@throws IOException | [
"Handle",
"user",
"interrupts",
"."
] | train | https://github.com/morimekta/utils/blob/dc987485902f1a7d58169c89c61db97425a6226d/console-util/src/main/java/net/morimekta/console/terminal/InputLine.java#L281-L285 |
facebookarchive/hadoop-20 | src/mapred/org/apache/hadoop/mapred/LinuxTaskController.java | LinuxTaskController.setup | @Override
void setup() {
"""
Sets up the permissions of the following directories:
Job cache directory
Archive directory
Hadoop log directories
"""
super.setup();
//set up job cache directory and associated permissions
String localDirs[] = this.mapredLocalDirs;
for(String localDir : loca... | java | @Override
void setup() {
super.setup();
//set up job cache directory and associated permissions
String localDirs[] = this.mapredLocalDirs;
for(String localDir : localDirs) {
//Cache root
File cacheDirectory = new File(localDir,TaskTracker.getCacheSubdir());
File jobCacheDirectory = n... | [
"@",
"Override",
"void",
"setup",
"(",
")",
"{",
"super",
".",
"setup",
"(",
")",
";",
"//set up job cache directory and associated permissions",
"String",
"localDirs",
"[",
"]",
"=",
"this",
".",
"mapredLocalDirs",
";",
"for",
"(",
"String",
"localDir",
":",
... | Sets up the permissions of the following directories:
Job cache directory
Archive directory
Hadoop log directories | [
"Sets",
"up",
"the",
"permissions",
"of",
"the",
"following",
"directories",
":"
] | train | https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/mapred/org/apache/hadoop/mapred/LinuxTaskController.java#L491-L520 |
census-instrumentation/opencensus-java | contrib/dropwizard5/src/main/java/io/opencensus/contrib/dropwizard5/DropWizardUtils.java | DropWizardUtils.generateFullMetricDescription | static String generateFullMetricDescription(String metricName, Metric metric) {
"""
Returns the metric description.
@param metricName the initial metric name
@param metric the codahale metric class.
@return a String the custom metric description
"""
return "Collected from "
+ SOURCE
+ ... | java | static String generateFullMetricDescription(String metricName, Metric metric) {
return "Collected from "
+ SOURCE
+ " (metric="
+ metricName
+ ", type="
+ metric.getClass().getName()
+ ")";
} | [
"static",
"String",
"generateFullMetricDescription",
"(",
"String",
"metricName",
",",
"Metric",
"metric",
")",
"{",
"return",
"\"Collected from \"",
"+",
"SOURCE",
"+",
"\" (metric=\"",
"+",
"metricName",
"+",
"\", type=\"",
"+",
"metric",
".",
"getClass",
"(",
"... | Returns the metric description.
@param metricName the initial metric name
@param metric the codahale metric class.
@return a String the custom metric description | [
"Returns",
"the",
"metric",
"description",
"."
] | train | https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/contrib/dropwizard5/src/main/java/io/opencensus/contrib/dropwizard5/DropWizardUtils.java#L51-L59 |
soi-toolkit/soi-toolkit-mule | commons/components/commons-mule/src/main/java/org/soitoolkit/commons/mule/sftp/SftpUtil.java | SftpUtil.initEndpointDirectory | public static void initEndpointDirectory(MuleContext muleContext, String endpointName) throws MuleException, IOException, SftpException {
"""
Ensures that the directory exists and is writable by deleting the
directory and then recreate it.
@param muleContext
@param endpointName
@throws org.mule.api.MuleExcep... | java | public static void initEndpointDirectory(MuleContext muleContext, String endpointName) throws MuleException, IOException, SftpException {
SftpClient sftpClient = getSftpClient(muleContext, endpointName);
try {
ChannelSftp channelSftp = sftpClient.getChannelSftp();
try {
recursiveDelete(muleContext, sftpCl... | [
"public",
"static",
"void",
"initEndpointDirectory",
"(",
"MuleContext",
"muleContext",
",",
"String",
"endpointName",
")",
"throws",
"MuleException",
",",
"IOException",
",",
"SftpException",
"{",
"SftpClient",
"sftpClient",
"=",
"getSftpClient",
"(",
"muleContext",
... | Ensures that the directory exists and is writable by deleting the
directory and then recreate it.
@param muleContext
@param endpointName
@throws org.mule.api.MuleException
@throws java.io.IOException
@throws com.jcraft.jsch.SftpException | [
"Ensures",
"that",
"the",
"directory",
"exists",
"and",
"is",
"writable",
"by",
"deleting",
"the",
"directory",
"and",
"then",
"recreate",
"it",
"."
] | train | https://github.com/soi-toolkit/soi-toolkit-mule/blob/e891350dbf55e6307be94d193d056bdb785b37d3/commons/components/commons-mule/src/main/java/org/soitoolkit/commons/mule/sftp/SftpUtil.java#L116-L134 |
gallandarakhneorg/afc | advanced/attributes/src/main/java/org/arakhne/afc/attrs/collection/HeapAttributeCollection.java | HeapAttributeCollection.getStoredAttributeValue | @Pure
protected AttributeValue getStoredAttributeValue(String name, AttributeType expectedType) {
"""
Replies the attribute with the given name.
@param name is the name of the attribute to retreive
@param expectedType is the expected type for the attribute.
@return the value or <code>null</code>
"""
Ob... | java | @Pure
protected AttributeValue getStoredAttributeValue(String name, AttributeType expectedType) {
Object val = this.heap.get(name);
if (val != null) {
final AttributeType currentType = AttributeType.fromValue(val);
val = unprotectNull(val);
final AttributeValue attr = new AttributeValueImpl(name);
if (... | [
"@",
"Pure",
"protected",
"AttributeValue",
"getStoredAttributeValue",
"(",
"String",
"name",
",",
"AttributeType",
"expectedType",
")",
"{",
"Object",
"val",
"=",
"this",
".",
"heap",
".",
"get",
"(",
"name",
")",
";",
"if",
"(",
"val",
"!=",
"null",
")",... | Replies the attribute with the given name.
@param name is the name of the attribute to retreive
@param expectedType is the expected type for the attribute.
@return the value or <code>null</code> | [
"Replies",
"the",
"attribute",
"with",
"the",
"given",
"name",
"."
] | train | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/attributes/src/main/java/org/arakhne/afc/attrs/collection/HeapAttributeCollection.java#L274-L289 |
pip-services3-java/pip-services3-commons-java | src/org/pipservices3/commons/random/RandomDateTime.java | RandomDateTime.nextDateTime | public static ZonedDateTime nextDateTime(int minYear, int maxYear) {
"""
Generates a random ZonedDateTime and time in the range ['minYear',
'maxYear']. This method generate dates without time (or time set to 00:00:00)
@param minYear (optional) minimum range value
@param maxYear max range value
@return a rand... | java | public static ZonedDateTime nextDateTime(int minYear, int maxYear) {
return nextDate(minYear, maxYear).plusSeconds(RandomInteger.nextInteger(3600 * 24 * 365));
} | [
"public",
"static",
"ZonedDateTime",
"nextDateTime",
"(",
"int",
"minYear",
",",
"int",
"maxYear",
")",
"{",
"return",
"nextDate",
"(",
"minYear",
",",
"maxYear",
")",
".",
"plusSeconds",
"(",
"RandomInteger",
".",
"nextInteger",
"(",
"3600",
"*",
"24",
"*",... | Generates a random ZonedDateTime and time in the range ['minYear',
'maxYear']. This method generate dates without time (or time set to 00:00:00)
@param minYear (optional) minimum range value
@param maxYear max range value
@return a random ZonedDateTime and time value. | [
"Generates",
"a",
"random",
"ZonedDateTime",
"and",
"time",
"in",
"the",
"range",
"[",
"minYear",
"maxYear",
"]",
".",
"This",
"method",
"generate",
"dates",
"without",
"time",
"(",
"or",
"time",
"set",
"to",
"00",
":",
"00",
":",
"00",
")"
] | train | https://github.com/pip-services3-java/pip-services3-commons-java/blob/a8a0c3e5ec58f0663c295aa855c6b3afad2af86a/src/org/pipservices3/commons/random/RandomDateTime.java#L66-L68 |
gosu-lang/gosu-lang | gosu-core/src/main/java/gw/internal/gosu/parser/BeanAccess.java | BeanAccess.getPropertyInfoDirectly_NoException | public static IPropertyInfo getPropertyInfoDirectly_NoException( IType classBean, String strProperty ) {
"""
Resolves the property directly, as if the type were requesting it, giving access to all properties
"""
return getPropertyInfo_NoException( classBean, classBean, strProperty, null, null, null );
} | java | public static IPropertyInfo getPropertyInfoDirectly_NoException( IType classBean, String strProperty )
{
return getPropertyInfo_NoException( classBean, classBean, strProperty, null, null, null );
} | [
"public",
"static",
"IPropertyInfo",
"getPropertyInfoDirectly_NoException",
"(",
"IType",
"classBean",
",",
"String",
"strProperty",
")",
"{",
"return",
"getPropertyInfo_NoException",
"(",
"classBean",
",",
"classBean",
",",
"strProperty",
",",
"null",
",",
"null",
",... | Resolves the property directly, as if the type were requesting it, giving access to all properties | [
"Resolves",
"the",
"property",
"directly",
"as",
"if",
"the",
"type",
"were",
"requesting",
"it",
"giving",
"access",
"to",
"all",
"properties"
] | train | https://github.com/gosu-lang/gosu-lang/blob/d6e9261b137ce66fef3726cabe7826d4a1f946b7/gosu-core/src/main/java/gw/internal/gosu/parser/BeanAccess.java#L416-L419 |
Harium/keel | src/main/java/com/harium/keel/catalano/math/function/Gamma.java | Gamma.Incomplete | public static double Incomplete(double a, double x) {
"""
Incomplete gamma function.
@param a Value.
@param x Value.
@return Result.
"""
double ans, ax, c, r;
if (x <= 0 || a <= 0) return 0.0;
if (x > 1.0 && x > a) return 1.0 - ComplementedIncomplete(a, x);
ax = a * Math... | java | public static double Incomplete(double a, double x) {
double ans, ax, c, r;
if (x <= 0 || a <= 0) return 0.0;
if (x > 1.0 && x > a) return 1.0 - ComplementedIncomplete(a, x);
ax = a * Math.log(x) - x - Log(a);
if (ax < -Constants.LogMax) return (0.0);
ax = Math.exp(ax... | [
"public",
"static",
"double",
"Incomplete",
"(",
"double",
"a",
",",
"double",
"x",
")",
"{",
"double",
"ans",
",",
"ax",
",",
"c",
",",
"r",
";",
"if",
"(",
"x",
"<=",
"0",
"||",
"a",
"<=",
"0",
")",
"return",
"0.0",
";",
"if",
"(",
"x",
">"... | Incomplete gamma function.
@param a Value.
@param x Value.
@return Result. | [
"Incomplete",
"gamma",
"function",
"."
] | train | https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/function/Gamma.java#L437-L460 |
pryzach/midao | midao-jdbc-core/src/main/java/org/midao/jdbc/core/MidaoFactory.java | MidaoFactory.getQueryRunner | public static QueryRunnerService getQueryRunner(Connection conn, Class<? extends TypeHandler> typeHandlerClazz) {
"""
Returns new {@link org.midao.jdbc.core.service.QueryRunnerService} instance
@param conn SQL Connection
@param typeHandlerClazz {@link org.midao.jdbc.core.handlers.type.TypeHandler} ... | java | public static QueryRunnerService getQueryRunner(Connection conn, Class<? extends TypeHandler> typeHandlerClazz) {
return (QueryRunnerService) ProfilerFactory.newInstance(new QueryRunner(conn, typeHandlerClazz));
} | [
"public",
"static",
"QueryRunnerService",
"getQueryRunner",
"(",
"Connection",
"conn",
",",
"Class",
"<",
"?",
"extends",
"TypeHandler",
">",
"typeHandlerClazz",
")",
"{",
"return",
"(",
"QueryRunnerService",
")",
"ProfilerFactory",
".",
"newInstance",
"(",
"new",
... | Returns new {@link org.midao.jdbc.core.service.QueryRunnerService} instance
@param conn SQL Connection
@param typeHandlerClazz {@link org.midao.jdbc.core.handlers.type.TypeHandler} implementation
@return new {@link org.midao.jdbc.core.service.QueryRunnerService} instance | [
"Returns",
"new",
"{",
"@link",
"org",
".",
"midao",
".",
"jdbc",
".",
"core",
".",
"service",
".",
"QueryRunnerService",
"}",
"instance"
] | train | https://github.com/pryzach/midao/blob/ed9048ed2c792a4794a2116a25779dfb84cd9447/midao-jdbc-core/src/main/java/org/midao/jdbc/core/MidaoFactory.java#L93-L95 |
OpenLiberty/open-liberty | dev/com.ibm.ws.jdbc/src/com/ibm/ws/rsadapter/impl/WSConnectionRequestInfoImpl.java | WSConnectionRequestInfoImpl.setTypeMap | public void setTypeMap(Map<String, Class<?>> map) throws SQLException {
"""
Change the value of the type map property in the connection request information.
@param map The new value.
@throws IllegalArgumentException if the key is incorrect.
@throws SQLException if the connection request information is not edi... | java | public void setTypeMap(Map<String, Class<?>> map) throws SQLException {
if (!changable) {
throw new SQLException(AdapterUtil.getNLSMessage("WS_INTERNAL_ERROR", new Object[]
{ "ConnectionRequestInfo cannot be modified, doing so may result in corruption: type map, cri", map, this }));
... | [
"public",
"void",
"setTypeMap",
"(",
"Map",
"<",
"String",
",",
"Class",
"<",
"?",
">",
">",
"map",
")",
"throws",
"SQLException",
"{",
"if",
"(",
"!",
"changable",
")",
"{",
"throw",
"new",
"SQLException",
"(",
"AdapterUtil",
".",
"getNLSMessage",
"(",
... | Change the value of the type map property in the connection request information.
@param map The new value.
@throws IllegalArgumentException if the key is incorrect.
@throws SQLException if the connection request information is not editable. | [
"Change",
"the",
"value",
"of",
"the",
"type",
"map",
"property",
"in",
"the",
"connection",
"request",
"information",
"."
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jdbc/src/com/ibm/ws/rsadapter/impl/WSConnectionRequestInfoImpl.java#L955-L965 |
davidmoten/grumpy | grumpy-core/src/main/java/com/github/davidmoten/grumpy/core/Position.java | Position.getPositionAlongPath | public final Position getPositionAlongPath(Position position, double proportion) {
"""
Returns a position along a path according to the proportion value
@param position
@param proportion
is between 0 and 1 inclusive
@return
"""
if (proportion >= 0 && proportion <= 1) {
// Get bearin... | java | public final Position getPositionAlongPath(Position position, double proportion) {
if (proportion >= 0 && proportion <= 1) {
// Get bearing degrees for course
double courseDegrees = this.getBearingDegrees(position);
// Get distance from position arg and this objects locati... | [
"public",
"final",
"Position",
"getPositionAlongPath",
"(",
"Position",
"position",
",",
"double",
"proportion",
")",
"{",
"if",
"(",
"proportion",
">=",
"0",
"&&",
"proportion",
"<=",
"1",
")",
"{",
"// Get bearing degrees for course",
"double",
"courseDegrees",
... | Returns a position along a path according to the proportion value
@param position
@param proportion
is between 0 and 1 inclusive
@return | [
"Returns",
"a",
"position",
"along",
"a",
"path",
"according",
"to",
"the",
"proportion",
"value"
] | train | https://github.com/davidmoten/grumpy/blob/f2d03e6b9771f15425fb3f76314837efc08c1233/grumpy-core/src/main/java/com/github/davidmoten/grumpy/core/Position.java#L387-L405 |
tbrooks8/Precipice | precipice-core/src/main/java/net/uncontended/precipice/GuardRail.java | GuardRail.releasePermitsWithoutResult | public void releasePermitsWithoutResult(long number, long nanoTime) {
"""
Release acquired permits without result. Since there is not a known result the result
count object and latency will not be updated.
@param number of permits to release
@param nanoTime currentInterval nano time
"""
for (Bac... | java | public void releasePermitsWithoutResult(long number, long nanoTime) {
for (BackPressure<Rejected> backPressure : backPressureList) {
backPressure.releasePermit(number, nanoTime);
}
} | [
"public",
"void",
"releasePermitsWithoutResult",
"(",
"long",
"number",
",",
"long",
"nanoTime",
")",
"{",
"for",
"(",
"BackPressure",
"<",
"Rejected",
">",
"backPressure",
":",
"backPressureList",
")",
"{",
"backPressure",
".",
"releasePermit",
"(",
"number",
"... | Release acquired permits without result. Since there is not a known result the result
count object and latency will not be updated.
@param number of permits to release
@param nanoTime currentInterval nano time | [
"Release",
"acquired",
"permits",
"without",
"result",
".",
"Since",
"there",
"is",
"not",
"a",
"known",
"result",
"the",
"result",
"count",
"object",
"and",
"latency",
"will",
"not",
"be",
"updated",
"."
] | train | https://github.com/tbrooks8/Precipice/blob/97fae467fd676b16a96b8d88b02569d8fc1f2681/precipice-core/src/main/java/net/uncontended/precipice/GuardRail.java#L102-L106 |
liyiorg/weixin-popular | src/main/java/weixin/popular/api/SemanticAPI.java | SemanticAPI.addvoicetorecofortext | public static BaseResult addvoicetorecofortext(String accessToken, String voiceId, URI uri) {
"""
提交语音
@param accessToken 接口调用凭证
@param voiceId 语音唯一标识
@param uri 文件格式 只支持mp3,16k,单声道,最大1M
@return BaseResult
@since 2.8.22
"""
return addvoicetorecofortext(accessToken, voiceId, null, ur... | java | public static BaseResult addvoicetorecofortext(String accessToken, String voiceId, URI uri) {
return addvoicetorecofortext(accessToken, voiceId, null, uri);
} | [
"public",
"static",
"BaseResult",
"addvoicetorecofortext",
"(",
"String",
"accessToken",
",",
"String",
"voiceId",
",",
"URI",
"uri",
")",
"{",
"return",
"addvoicetorecofortext",
"(",
"accessToken",
",",
"voiceId",
",",
"null",
",",
"uri",
")",
";",
"}"
] | 提交语音
@param accessToken 接口调用凭证
@param voiceId 语音唯一标识
@param uri 文件格式 只支持mp3,16k,单声道,最大1M
@return BaseResult
@since 2.8.22 | [
"提交语音"
] | train | https://github.com/liyiorg/weixin-popular/blob/c64255292d41463bdb671938feaabf42a335d82c/src/main/java/weixin/popular/api/SemanticAPI.java#L110-L112 |
aws/aws-sdk-java | aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/Item.java | Item.withInt | public Item withInt(String attrName, int val) {
"""
Sets the value of the specified attribute in the current item to the
given value.
"""
checkInvalidAttrName(attrName);
return withNumber(attrName, Integer.valueOf(val));
} | java | public Item withInt(String attrName, int val) {
checkInvalidAttrName(attrName);
return withNumber(attrName, Integer.valueOf(val));
} | [
"public",
"Item",
"withInt",
"(",
"String",
"attrName",
",",
"int",
"val",
")",
"{",
"checkInvalidAttrName",
"(",
"attrName",
")",
";",
"return",
"withNumber",
"(",
"attrName",
",",
"Integer",
".",
"valueOf",
"(",
"val",
")",
")",
";",
"}"
] | Sets the value of the specified attribute in the current item to the
given value. | [
"Sets",
"the",
"value",
"of",
"the",
"specified",
"attribute",
"in",
"the",
"current",
"item",
"to",
"the",
"given",
"value",
"."
] | train | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/Item.java#L287-L290 |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/odmg/ObjectEnvelopeOrdering.java | ObjectEnvelopeOrdering.buildPotential11Edge | protected Edge buildPotential11Edge(Vertex vertex1, Vertex vertex2, boolean fkToRef) {
"""
Checks if the database operations associated with two object envelopes
that might have been related via an 1:1 (or n:1) reference before
the current transaction needs to be performed
in a particular order and if so builds... | java | protected Edge buildPotential11Edge(Vertex vertex1, Vertex vertex2, boolean fkToRef)
{
ModificationState state1 = vertex1.getEnvelope().getModificationState();
ModificationState state2 = vertex2.getEnvelope().getModificationState();
if (state1.needsUpdate() || state1.needsDelete())
... | [
"protected",
"Edge",
"buildPotential11Edge",
"(",
"Vertex",
"vertex1",
",",
"Vertex",
"vertex2",
",",
"boolean",
"fkToRef",
")",
"{",
"ModificationState",
"state1",
"=",
"vertex1",
".",
"getEnvelope",
"(",
")",
".",
"getModificationState",
"(",
")",
";",
"Modifi... | Checks if the database operations associated with two object envelopes
that might have been related via an 1:1 (or n:1) reference before
the current transaction needs to be performed
in a particular order and if so builds and returns a corresponding
directed edge weighted with <code>POTENTIAL_EDGE_WEIGHT</code>.
The fo... | [
"Checks",
"if",
"the",
"database",
"operations",
"associated",
"with",
"two",
"object",
"envelopes",
"that",
"might",
"have",
"been",
"related",
"via",
"an",
"1",
":",
"1",
"(",
"or",
"n",
":",
"1",
")",
"reference",
"before",
"the",
"current",
"transactio... | train | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/odmg/ObjectEnvelopeOrdering.java#L473-L486 |
nguyenq/tess4j | src/main/java/net/sourceforge/tess4j/util/ImageHelper.java | ImageHelper.invertImageColor | public static BufferedImage invertImageColor(BufferedImage image) {
"""
Inverts image color.
@param image input image
@return an inverted-color image
"""
BufferedImage tmp = new BufferedImage(image.getWidth(), image.getHeight(), image.getType());
BufferedImageOp invertOp = new LookupOp(ne... | java | public static BufferedImage invertImageColor(BufferedImage image) {
BufferedImage tmp = new BufferedImage(image.getWidth(), image.getHeight(), image.getType());
BufferedImageOp invertOp = new LookupOp(new ShortLookupTable(0, invertTable), null);
return invertOp.filter(image, tmp);
} | [
"public",
"static",
"BufferedImage",
"invertImageColor",
"(",
"BufferedImage",
"image",
")",
"{",
"BufferedImage",
"tmp",
"=",
"new",
"BufferedImage",
"(",
"image",
".",
"getWidth",
"(",
")",
",",
"image",
".",
"getHeight",
"(",
")",
",",
"image",
".",
"getT... | Inverts image color.
@param image input image
@return an inverted-color image | [
"Inverts",
"image",
"color",
"."
] | train | https://github.com/nguyenq/tess4j/blob/cfcd4a8a44042f150b4aaf7bdf5ffc485a2236e1/src/main/java/net/sourceforge/tess4j/util/ImageHelper.java#L151-L155 |
threerings/narya | core/src/main/java/com/threerings/crowd/server/PlaceManager.java | PlaceManager.registerMessageHandler | @Deprecated
public void registerMessageHandler (String name, MessageHandler handler) {
"""
Registers a particular message handler instance to be used when processing message events
with the specified name.
@param name the message name of the message events that should be handled by this handler.
@param ha... | java | @Deprecated
public void registerMessageHandler (String name, MessageHandler handler)
{
// create our handler map if necessary
if (_msghandlers == null) {
_msghandlers = Maps.newHashMap();
}
_msghandlers.put(name, handler);
} | [
"@",
"Deprecated",
"public",
"void",
"registerMessageHandler",
"(",
"String",
"name",
",",
"MessageHandler",
"handler",
")",
"{",
"// create our handler map if necessary",
"if",
"(",
"_msghandlers",
"==",
"null",
")",
"{",
"_msghandlers",
"=",
"Maps",
".",
"newHashM... | Registers a particular message handler instance to be used when processing message events
with the specified name.
@param name the message name of the message events that should be handled by this handler.
@param handler the handler to be registered.
@deprecated Use dynamically bound methods instead. See {@link Dynam... | [
"Registers",
"a",
"particular",
"message",
"handler",
"instance",
"to",
"be",
"used",
"when",
"processing",
"message",
"events",
"with",
"the",
"specified",
"name",
"."
] | train | https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/crowd/server/PlaceManager.java#L361-L369 |
ngageoint/geopackage-android-map | geopackage-map/src/main/java/mil/nga/geopackage/map/features/StyleUtils.java | StyleUtils.createIcon | public static Bitmap createIcon(IconRow icon, float density, IconCache iconCache) {
"""
Create the icon bitmap
@param icon icon row
@param density display density: {@link android.util.DisplayMetrics#density}
@param iconCache icon cache
@return icon bitmap
"""
return iconCache.createIcon(ic... | java | public static Bitmap createIcon(IconRow icon, float density, IconCache iconCache) {
return iconCache.createIcon(icon, density);
} | [
"public",
"static",
"Bitmap",
"createIcon",
"(",
"IconRow",
"icon",
",",
"float",
"density",
",",
"IconCache",
"iconCache",
")",
"{",
"return",
"iconCache",
".",
"createIcon",
"(",
"icon",
",",
"density",
")",
";",
"}"
] | Create the icon bitmap
@param icon icon row
@param density display density: {@link android.util.DisplayMetrics#density}
@param iconCache icon cache
@return icon bitmap | [
"Create",
"the",
"icon",
"bitmap"
] | train | https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/features/StyleUtils.java#L303-L305 |
mikepenz/MaterialDrawer | library/src/main/java/com/mikepenz/materialdrawer/DrawerUtils.java | DrawerUtils.getPositionByIdentifier | public static int getPositionByIdentifier(DrawerBuilder drawer, long identifier) {
"""
calculates the position of an drawerItem. searching by it's identifier
@param identifier
@return
"""
if (identifier != -1) {
for (int i = 0; i < drawer.getAdapter().getItemCount(); i++) {
... | java | public static int getPositionByIdentifier(DrawerBuilder drawer, long identifier) {
if (identifier != -1) {
for (int i = 0; i < drawer.getAdapter().getItemCount(); i++) {
if (drawer.getAdapter().getItem(i).getIdentifier() == identifier) {
return i;
... | [
"public",
"static",
"int",
"getPositionByIdentifier",
"(",
"DrawerBuilder",
"drawer",
",",
"long",
"identifier",
")",
"{",
"if",
"(",
"identifier",
"!=",
"-",
"1",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"drawer",
".",
"getAdapter",
... | calculates the position of an drawerItem. searching by it's identifier
@param identifier
@return | [
"calculates",
"the",
"position",
"of",
"an",
"drawerItem",
".",
"searching",
"by",
"it",
"s",
"identifier"
] | train | https://github.com/mikepenz/MaterialDrawer/blob/f4fb31635767edead0a01cee7b7588942b89d8d9/library/src/main/java/com/mikepenz/materialdrawer/DrawerUtils.java#L106-L116 |
nguillaumin/slick2d-maven | slick2d-hiero/src/main/java/org/newdawn/slick/tools/hiero/truetype/FontData.java | FontData.getStyled | public static FontData getStyled(String familyName, int style) {
"""
Get a styled version of a particular font family
@param familyName The name of the font family
@param style The style (@see java.awt.Font#PLAIN)
@return The styled font or null if no such font exists
"""
boolean b = (style & Font.BOLD... | java | public static FontData getStyled(String familyName, int style) {
boolean b = (style & Font.BOLD) != 0;
boolean i = (style & Font.ITALIC) != 0;
if (b & i) {
return getBoldItalic(familyName);
} else if (b) {
return getBold(familyName);
} else if (i) {
return getItalic(familyName);
} else ... | [
"public",
"static",
"FontData",
"getStyled",
"(",
"String",
"familyName",
",",
"int",
"style",
")",
"{",
"boolean",
"b",
"=",
"(",
"style",
"&",
"Font",
".",
"BOLD",
")",
"!=",
"0",
";",
"boolean",
"i",
"=",
"(",
"style",
"&",
"Font",
".",
"ITALIC",
... | Get a styled version of a particular font family
@param familyName The name of the font family
@param style The style (@see java.awt.Font#PLAIN)
@return The styled font or null if no such font exists | [
"Get",
"a",
"styled",
"version",
"of",
"a",
"particular",
"font",
"family"
] | train | https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-hiero/src/main/java/org/newdawn/slick/tools/hiero/truetype/FontData.java#L150-L163 |
Azure/azure-sdk-for-java | keyvault/resource-manager/v2016_10_01/src/main/java/com/microsoft/azure/management/keyvault/v2016_10_01/implementation/VaultsInner.java | VaultsInner.getDeleted | public DeletedVaultInner getDeleted(String vaultName, String location) {
"""
Gets the deleted Azure key vault.
@param vaultName The name of the vault.
@param location The location of the deleted vault.
@throws IllegalArgumentException thrown if parameters fail the validation
@throws CloudException thrown if ... | java | public DeletedVaultInner getDeleted(String vaultName, String location) {
return getDeletedWithServiceResponseAsync(vaultName, location).toBlocking().single().body();
} | [
"public",
"DeletedVaultInner",
"getDeleted",
"(",
"String",
"vaultName",
",",
"String",
"location",
")",
"{",
"return",
"getDeletedWithServiceResponseAsync",
"(",
"vaultName",
",",
"location",
")",
".",
"toBlocking",
"(",
")",
".",
"single",
"(",
")",
".",
"body... | Gets the deleted Azure key vault.
@param vaultName The name of the vault.
@param location The location of the deleted vault.
@throws IllegalArgumentException thrown if parameters fail the validation
@throws CloudException thrown if the request is rejected by server
@throws RuntimeException all other wrapped checked ex... | [
"Gets",
"the",
"deleted",
"Azure",
"key",
"vault",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/resource-manager/v2016_10_01/src/main/java/com/microsoft/azure/management/keyvault/v2016_10_01/implementation/VaultsInner.java#L1168-L1170 |
fuinorg/srcgen4j-commons | src/main/java/org/fuin/srcgen4j/commons/SrcGen4JConfig.java | SrcGen4JConfig.createMavenStyleSingleProject | @NotNull
public static SrcGen4JConfig createMavenStyleSingleProject(@NotNull final SrcGen4JContext context, @NotNull final String projectName,
@NotNull @FileExists @IsDirectory final File rootDir) {
"""
Creates a new configuration with a single project and a Maven directory structure.
@param c... | java | @NotNull
public static SrcGen4JConfig createMavenStyleSingleProject(@NotNull final SrcGen4JContext context, @NotNull final String projectName,
@NotNull @FileExists @IsDirectory final File rootDir) {
Contract.requireArgNotNull("context", context);
Contract.requireArgNotNull(ROOT_DIR... | [
"@",
"NotNull",
"public",
"static",
"SrcGen4JConfig",
"createMavenStyleSingleProject",
"(",
"@",
"NotNull",
"final",
"SrcGen4JContext",
"context",
",",
"@",
"NotNull",
"final",
"String",
"projectName",
",",
"@",
"NotNull",
"@",
"FileExists",
"@",
"IsDirectory",
"fin... | Creates a new configuration with a single project and a Maven directory structure.
@param context
Current context.
@param projectName
Name of the one and only project.
@param rootDir
Root directory that is available as variable 'srcgen4jRootDir'.
@return New initialized configuration instance. | [
"Creates",
"a",
"new",
"configuration",
"with",
"a",
"single",
"project",
"and",
"a",
"Maven",
"directory",
"structure",
"."
] | train | https://github.com/fuinorg/srcgen4j-commons/blob/bce26fd3167ea91fb2f3ad3fc9a1836d3d9fb14b/src/main/java/org/fuin/srcgen4j/commons/SrcGen4JConfig.java#L428-L446 |
apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/concurrent/FutureUtils.java | FutureUtils.runAfterwardsAsync | public static CompletableFuture<Void> runAfterwardsAsync(CompletableFuture<?> future, RunnableWithException runnable) {
"""
Run the given action after the completion of the given future. The given future can be
completed normally or exceptionally. In case of an exceptional completion the, the
action's exception ... | java | public static CompletableFuture<Void> runAfterwardsAsync(CompletableFuture<?> future, RunnableWithException runnable) {
return runAfterwardsAsync(future, runnable, ForkJoinPool.commonPool());
} | [
"public",
"static",
"CompletableFuture",
"<",
"Void",
">",
"runAfterwardsAsync",
"(",
"CompletableFuture",
"<",
"?",
">",
"future",
",",
"RunnableWithException",
"runnable",
")",
"{",
"return",
"runAfterwardsAsync",
"(",
"future",
",",
"runnable",
",",
"ForkJoinPool... | Run the given action after the completion of the given future. The given future can be
completed normally or exceptionally. In case of an exceptional completion the, the
action's exception will be added to the initial exception.
@param future to wait for its completion
@param runnable action which is triggered after t... | [
"Run",
"the",
"given",
"action",
"after",
"the",
"completion",
"of",
"the",
"given",
"future",
".",
"The",
"given",
"future",
"can",
"be",
"completed",
"normally",
"or",
"exceptionally",
".",
"In",
"case",
"of",
"an",
"exceptional",
"completion",
"the",
"the... | train | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/concurrent/FutureUtils.java#L421-L423 |
scireum/server-sass | src/main/java/org/serversass/Generator.java | Generator.addResultSection | private void addResultSection(String mediaQueryPath, Section section) {
"""
/*
Adds a section to the given media query section - creates if necessary
"""
Section qry = mediaQueries.get(mediaQueryPath);
if (qry == null) {
qry = new Section();
qry.getSelectors().add(Colle... | java | private void addResultSection(String mediaQueryPath, Section section) {
Section qry = mediaQueries.get(mediaQueryPath);
if (qry == null) {
qry = new Section();
qry.getSelectors().add(Collections.singletonList(mediaQueryPath));
mediaQueries.put(mediaQueryPath, qry);
... | [
"private",
"void",
"addResultSection",
"(",
"String",
"mediaQueryPath",
",",
"Section",
"section",
")",
"{",
"Section",
"qry",
"=",
"mediaQueries",
".",
"get",
"(",
"mediaQueryPath",
")",
";",
"if",
"(",
"qry",
"==",
"null",
")",
"{",
"qry",
"=",
"new",
... | /*
Adds a section to the given media query section - creates if necessary | [
"/",
"*",
"Adds",
"a",
"section",
"to",
"the",
"given",
"media",
"query",
"section",
"-",
"creates",
"if",
"necessary"
] | train | https://github.com/scireum/server-sass/blob/e74af983567f10c43420d70cd31165dd080ba8fc/src/main/java/org/serversass/Generator.java#L359-L367 |
Deep-Symmetry/beat-link | src/main/java/org/deepsymmetry/beatlink/VirtualCdj.java | VirtualCdj.sendFaderStartCommand | public void sendFaderStartCommand(Set<Integer> deviceNumbersToStart, Set<Integer> deviceNumbersToStop) throws IOException {
"""
Broadcast a packet that tells some players to start playing and others to stop. If a player number is in
both sets, it will be told to stop. Numbers outside the range 1 to 4 are ignored.... | java | public void sendFaderStartCommand(Set<Integer> deviceNumbersToStart, Set<Integer> deviceNumbersToStop) throws IOException {
ensureRunning();
byte[] payload = new byte[FADER_START_PAYLOAD.length];
System.arraycopy(FADER_START_PAYLOAD, 0, payload, 0, FADER_START_PAYLOAD.length);
payload[2]... | [
"public",
"void",
"sendFaderStartCommand",
"(",
"Set",
"<",
"Integer",
">",
"deviceNumbersToStart",
",",
"Set",
"<",
"Integer",
">",
"deviceNumbersToStop",
")",
"throws",
"IOException",
"{",
"ensureRunning",
"(",
")",
";",
"byte",
"[",
"]",
"payload",
"=",
"ne... | Broadcast a packet that tells some players to start playing and others to stop. If a player number is in
both sets, it will be told to stop. Numbers outside the range 1 to 4 are ignored.
@param deviceNumbersToStart the players that should start playing if they aren't already
@param deviceNumbersToStop the players that... | [
"Broadcast",
"a",
"packet",
"that",
"tells",
"some",
"players",
"to",
"start",
"playing",
"and",
"others",
"to",
"stop",
".",
"If",
"a",
"player",
"number",
"is",
"in",
"both",
"sets",
"it",
"will",
"be",
"told",
"to",
"stop",
".",
"Numbers",
"outside",
... | train | https://github.com/Deep-Symmetry/beat-link/blob/f958a2a70e8a87a31a75326d7b4db77c2f0b4212/src/main/java/org/deepsymmetry/beatlink/VirtualCdj.java#L1234-L1250 |
RobotiumTech/robotium | robotium-solo/src/main/java/com/robotium/solo/Solo.java | Solo.waitForActivity | public boolean waitForActivity(Class<? extends Activity> activityClass, int timeout) {
"""
Waits for an Activity matching the specified class.
@param activityClass the class of the {@code Activity} to wait for. Example is: {@code MyActivity.class}
@param timeout the amount of time in milliseconds to wait
@ret... | java | public boolean waitForActivity(Class<? extends Activity> activityClass, int timeout)
{
if(config.commandLogging){
Log.d(config.commandLoggingTag, "waitForActivity("+activityClass+", "+timeout+")");
}
return waiter.waitForActivity(activityClass, timeout);
} | [
"public",
"boolean",
"waitForActivity",
"(",
"Class",
"<",
"?",
"extends",
"Activity",
">",
"activityClass",
",",
"int",
"timeout",
")",
"{",
"if",
"(",
"config",
".",
"commandLogging",
")",
"{",
"Log",
".",
"d",
"(",
"config",
".",
"commandLoggingTag",
",... | Waits for an Activity matching the specified class.
@param activityClass the class of the {@code Activity} to wait for. Example is: {@code MyActivity.class}
@param timeout the amount of time in milliseconds to wait
@return {@code true} if {@link Activity} appears before the timeout and {@code false} if it does not | [
"Waits",
"for",
"an",
"Activity",
"matching",
"the",
"specified",
"class",
"."
] | train | https://github.com/RobotiumTech/robotium/blob/75e567c38f26a6a87dc8bef90b3886a20e28d291/robotium-solo/src/main/java/com/robotium/solo/Solo.java#L3623-L3630 |
mapfish/mapfish-print | core/src/main/java/org/mapfish/print/config/ConfigurationFactory.java | ConfigurationFactory.getConfig | public final Configuration getConfig(final File configFile, final InputStream configData)
throws IOException {
"""
Create a configuration object from a config file.
@param configFile the file that contains the configuration data.
@param configData the config file data
"""
final Configur... | java | public final Configuration getConfig(final File configFile, final InputStream configData)
throws IOException {
final Configuration configuration = this.context.getBean(Configuration.class);
configuration.setConfigurationFile(configFile);
MapfishPrintConstructor.setConfigurationUnderC... | [
"public",
"final",
"Configuration",
"getConfig",
"(",
"final",
"File",
"configFile",
",",
"final",
"InputStream",
"configData",
")",
"throws",
"IOException",
"{",
"final",
"Configuration",
"configuration",
"=",
"this",
".",
"context",
".",
"getBean",
"(",
"Configu... | Create a configuration object from a config file.
@param configFile the file that contains the configuration data.
@param configData the config file data | [
"Create",
"a",
"configuration",
"object",
"from",
"a",
"config",
"file",
"."
] | train | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/config/ConfigurationFactory.java#L56-L76 |
hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/spi/impl/proxyservice/impl/ProxyRegistry.java | ProxyRegistry.getProxyInfos | public void getProxyInfos(Collection<ProxyInfo> result) {
"""
Gets the ProxyInfo of all fully initialized proxies in this registry.
The result is written into 'result'.
@param result The ProxyInfo of all proxies in this registry.
"""
for (Map.Entry<String, DistributedObjectFuture> entry : proxies.e... | java | public void getProxyInfos(Collection<ProxyInfo> result) {
for (Map.Entry<String, DistributedObjectFuture> entry : proxies.entrySet()) {
DistributedObjectFuture future = entry.getValue();
if (future.isSetAndInitialized()) {
String proxyName = entry.getKey();
... | [
"public",
"void",
"getProxyInfos",
"(",
"Collection",
"<",
"ProxyInfo",
">",
"result",
")",
"{",
"for",
"(",
"Map",
".",
"Entry",
"<",
"String",
",",
"DistributedObjectFuture",
">",
"entry",
":",
"proxies",
".",
"entrySet",
"(",
")",
")",
"{",
"Distributed... | Gets the ProxyInfo of all fully initialized proxies in this registry.
The result is written into 'result'.
@param result The ProxyInfo of all proxies in this registry. | [
"Gets",
"the",
"ProxyInfo",
"of",
"all",
"fully",
"initialized",
"proxies",
"in",
"this",
"registry",
".",
"The",
"result",
"is",
"written",
"into",
"result",
"."
] | train | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/spi/impl/proxyservice/impl/ProxyRegistry.java#L119-L127 |
carewebframework/carewebframework-core | org.carewebframework.ui-parent/org.carewebframework.ui.core/src/main/java/org/carewebframework/ui/manifest/BaseRenderer.java | BaseRenderer.addContent | public Span addContent(Row row, String label) {
"""
Adds a cell with the specified content to the grid row.
@param row List row.
@param label Content for cell. Auto-detects type of content.
@return Newly created cell.
"""
Span cell = new Span();
cell.addChild(CWFUtil.getTextComponent(label... | java | public Span addContent(Row row, String label) {
Span cell = new Span();
cell.addChild(CWFUtil.getTextComponent(label));
row.addChild(cell);
return cell;
} | [
"public",
"Span",
"addContent",
"(",
"Row",
"row",
",",
"String",
"label",
")",
"{",
"Span",
"cell",
"=",
"new",
"Span",
"(",
")",
";",
"cell",
".",
"addChild",
"(",
"CWFUtil",
".",
"getTextComponent",
"(",
"label",
")",
")",
";",
"row",
".",
"addChi... | Adds a cell with the specified content to the grid row.
@param row List row.
@param label Content for cell. Auto-detects type of content.
@return Newly created cell. | [
"Adds",
"a",
"cell",
"with",
"the",
"specified",
"content",
"to",
"the",
"grid",
"row",
"."
] | train | https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.ui-parent/org.carewebframework.ui.core/src/main/java/org/carewebframework/ui/manifest/BaseRenderer.java#L28-L33 |
progolden/vraptor-boilerplate | vraptor-boilerplate-utils/src/main/java/br/com/caelum/vraptor/boilerplate/i18n/MessageBundle.java | MessageBundle.formatMessage | public String formatMessage(String key, Object[] args) {
"""
Retorna uma mensagem formatada utilizando o MessageFormat.
@param key Chave da mesnagem.
@param args Parametros a serem inseridos na mensagem.
@return Mensagem formatada inserindo os argumentos no template estático obtivdo do arquivo de propriedades.
... | java | public String formatMessage(String key, Object[] args) {
try {
String raw = this.getMessage(key);
return MessageFormat.format(raw, args);
} catch (MissingResourceException ex) {
return "???!"+key+"!???";
}
} | [
"public",
"String",
"formatMessage",
"(",
"String",
"key",
",",
"Object",
"[",
"]",
"args",
")",
"{",
"try",
"{",
"String",
"raw",
"=",
"this",
".",
"getMessage",
"(",
"key",
")",
";",
"return",
"MessageFormat",
".",
"format",
"(",
"raw",
",",
"args",
... | Retorna uma mensagem formatada utilizando o MessageFormat.
@param key Chave da mesnagem.
@param args Parametros a serem inseridos na mensagem.
@return Mensagem formatada inserindo os argumentos no template estático obtivdo do arquivo de propriedades. | [
"Retorna",
"uma",
"mensagem",
"formatada",
"utilizando",
"o",
"MessageFormat",
"."
] | train | https://github.com/progolden/vraptor-boilerplate/blob/3edf45cc0dc5aec61b16ca326b4d72c82d1d3e07/vraptor-boilerplate-utils/src/main/java/br/com/caelum/vraptor/boilerplate/i18n/MessageBundle.java#L80-L87 |
bingoohuang/excel2javabeans | src/main/java/com/github/bingoohuang/excel2beans/PoiUtil.java | PoiUtil.findCell | public static Cell findCell(Sheet sheet, String cellReference, String searchKey) {
"""
查找单元格。
@param sheet 表单
@param cellReference 单元格索引
@param searchKey 单元格中包含的关键字
@return 单元格,没有找到时返回null
"""
if (isFullCellReference(cellReference)) {
return findCell(sheet, cellReference);... | java | public static Cell findCell(Sheet sheet, String cellReference, String searchKey) {
if (isFullCellReference(cellReference)) {
return findCell(sheet, cellReference);
}
if (isColReference(cellReference)) {
val cellRef = new CellReference(cellReference + "1");
re... | [
"public",
"static",
"Cell",
"findCell",
"(",
"Sheet",
"sheet",
",",
"String",
"cellReference",
",",
"String",
"searchKey",
")",
"{",
"if",
"(",
"isFullCellReference",
"(",
"cellReference",
")",
")",
"{",
"return",
"findCell",
"(",
"sheet",
",",
"cellReference"... | 查找单元格。
@param sheet 表单
@param cellReference 单元格索引
@param searchKey 单元格中包含的关键字
@return 单元格,没有找到时返回null | [
"查找单元格。"
] | train | https://github.com/bingoohuang/excel2javabeans/blob/db136d460b93b649814366c0d84a982698b96dc3/src/main/java/com/github/bingoohuang/excel2beans/PoiUtil.java#L300-L316 |
lucee/Lucee | core/src/main/java/lucee/runtime/net/ipsettings/IPSettings.java | IPSettings.put | public synchronized void put(IPRangeNode<Map> ipr, boolean doCheck) {
"""
all added data should go through this method
@param ipr
@param doCheck
"""
IPRangeNode parent = ipr.isV4() ? ipv4 : ipv6;
parent.addChild(ipr, doCheck);
version++;
isSorted = false;
} | java | public synchronized void put(IPRangeNode<Map> ipr, boolean doCheck) {
IPRangeNode parent = ipr.isV4() ? ipv4 : ipv6;
parent.addChild(ipr, doCheck);
version++;
isSorted = false;
} | [
"public",
"synchronized",
"void",
"put",
"(",
"IPRangeNode",
"<",
"Map",
">",
"ipr",
",",
"boolean",
"doCheck",
")",
"{",
"IPRangeNode",
"parent",
"=",
"ipr",
".",
"isV4",
"(",
")",
"?",
"ipv4",
":",
"ipv6",
";",
"parent",
".",
"addChild",
"(",
"ipr",
... | all added data should go through this method
@param ipr
@param doCheck | [
"all",
"added",
"data",
"should",
"go",
"through",
"this",
"method"
] | train | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/net/ipsettings/IPSettings.java#L64-L69 |
yavijava/yavijava | src/main/java/com/vmware/vim25/mo/HostVsanSystem.java | HostVsanSystem.removeDisk_Task | public Task removeDisk_Task(HostScsiDisk[] disk, HostMaintenanceSpec maintenanceSpec, int timeout) throws RuntimeFault, RemoteException {
"""
Remove the set of given disks from use by the VSAN service on this host. Users may use this API to manually
remove a DiskMapping#nonSsd from a DiskMapping. This operation i... | java | public Task removeDisk_Task(HostScsiDisk[] disk, HostMaintenanceSpec maintenanceSpec, int timeout) throws RuntimeFault, RemoteException {
ManagedObjectReference mor = getVimService().removeDisk_Task(this.getMOR(), disk, maintenanceSpec, timeout);
return new Task(getServerConnection(), mor);
} | [
"public",
"Task",
"removeDisk_Task",
"(",
"HostScsiDisk",
"[",
"]",
"disk",
",",
"HostMaintenanceSpec",
"maintenanceSpec",
",",
"int",
"timeout",
")",
"throws",
"RuntimeFault",
",",
"RemoteException",
"{",
"ManagedObjectReference",
"mor",
"=",
"getVimService",
"(",
... | Remove the set of given disks from use by the VSAN service on this host. Users may use this API to manually
remove a DiskMapping#nonSsd from a DiskMapping. This operation is only permitted if the VSAN service on this host
is not configured to automatically claim storage.
@param disk list of disks to be remo... | [
"Remove",
"the",
"set",
"of",
"given",
"disks",
"from",
"use",
"by",
"the",
"VSAN",
"service",
"on",
"this",
"host",
".",
"Users",
"may",
"use",
"this",
"API",
"to",
"manually",
"remove",
"a",
"DiskMapping#nonSsd",
"from",
"a",
"DiskMapping",
".",
"This",
... | train | https://github.com/yavijava/yavijava/blob/27fd2c5826115782d5eeb934f86e3e39240179cd/src/main/java/com/vmware/vim25/mo/HostVsanSystem.java#L101-L104 |
deeplearning4j/deeplearning4j | deeplearning4j/deeplearning4j-nlp-parent/deeplearning4j-nlp/src/main/java/org/deeplearning4j/models/sequencevectors/graph/huffman/GraphHuffman.java | GraphHuffman.buildTree | public void buildTree(int[] vertexDegree) {
"""
Build the Huffman tree given an array of vertex degrees
@param vertexDegree vertexDegree[i] = degree of ith vertex
"""
PriorityQueue<Node> pq = new PriorityQueue<>();
for (int i = 0; i < vertexDegree.length; i++)
pq.add(new Node(i, ve... | java | public void buildTree(int[] vertexDegree) {
PriorityQueue<Node> pq = new PriorityQueue<>();
for (int i = 0; i < vertexDegree.length; i++)
pq.add(new Node(i, vertexDegree[i], null, null));
while (pq.size() > 1) {
Node left = pq.remove();
Node right = pq.remove... | [
"public",
"void",
"buildTree",
"(",
"int",
"[",
"]",
"vertexDegree",
")",
"{",
"PriorityQueue",
"<",
"Node",
">",
"pq",
"=",
"new",
"PriorityQueue",
"<>",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"vertexDegree",
".",
"length",
... | Build the Huffman tree given an array of vertex degrees
@param vertexDegree vertexDegree[i] = degree of ith vertex | [
"Build",
"the",
"Huffman",
"tree",
"given",
"an",
"array",
"of",
"vertex",
"degrees"
] | train | https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-nlp-parent/deeplearning4j-nlp/src/main/java/org/deeplearning4j/models/sequencevectors/graph/huffman/GraphHuffman.java#L58-L76 |
aws/aws-sdk-java | aws-java-sdk-glue/src/main/java/com/amazonaws/services/glue/model/BatchDeleteConnectionResult.java | BatchDeleteConnectionResult.withErrors | public BatchDeleteConnectionResult withErrors(java.util.Map<String, ErrorDetail> errors) {
"""
<p>
A map of the names of connections that were not successfully deleted to error details.
</p>
@param errors
A map of the names of connections that were not successfully deleted to error details.
@return Returns ... | java | public BatchDeleteConnectionResult withErrors(java.util.Map<String, ErrorDetail> errors) {
setErrors(errors);
return this;
} | [
"public",
"BatchDeleteConnectionResult",
"withErrors",
"(",
"java",
".",
"util",
".",
"Map",
"<",
"String",
",",
"ErrorDetail",
">",
"errors",
")",
"{",
"setErrors",
"(",
"errors",
")",
";",
"return",
"this",
";",
"}"
] | <p>
A map of the names of connections that were not successfully deleted to error details.
</p>
@param errors
A map of the names of connections that were not successfully deleted to error details.
@return Returns a reference to this object so that method calls can be chained together. | [
"<p",
">",
"A",
"map",
"of",
"the",
"names",
"of",
"connections",
"that",
"were",
"not",
"successfully",
"deleted",
"to",
"error",
"details",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-glue/src/main/java/com/amazonaws/services/glue/model/BatchDeleteConnectionResult.java#L144-L147 |
alkacon/opencms-core | src-gwt/org/opencms/gwt/client/ui/CmsScrollPanelImpl.java | CmsScrollPanelImpl.setVerticalScrollbar | private void setVerticalScrollbar(final CmsScrollBar scrollbar, int width) {
"""
Set the scrollbar used for vertical scrolling.
@param scrollbar the scrollbar, or null to clear it
@param width the width of the scrollbar in pixels
"""
// Validate.
if ((scrollbar == m_scrollbar) || (scrol... | java | private void setVerticalScrollbar(final CmsScrollBar scrollbar, int width) {
// Validate.
if ((scrollbar == m_scrollbar) || (scrollbar == null)) {
return;
}
// Detach new child.
scrollbar.asWidget().removeFromParent();
// Remove old child.
... | [
"private",
"void",
"setVerticalScrollbar",
"(",
"final",
"CmsScrollBar",
"scrollbar",
",",
"int",
"width",
")",
"{",
"// Validate.\r",
"if",
"(",
"(",
"scrollbar",
"==",
"m_scrollbar",
")",
"||",
"(",
"scrollbar",
"==",
"null",
")",
")",
"{",
"return",
";",
... | Set the scrollbar used for vertical scrolling.
@param scrollbar the scrollbar, or null to clear it
@param width the width of the scrollbar in pixels | [
"Set",
"the",
"scrollbar",
"used",
"for",
"vertical",
"scrolling",
"."
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/ui/CmsScrollPanelImpl.java#L416-L454 |
couchbase/couchbase-java-client | src/main/java/com/couchbase/client/java/subdoc/MutateInBuilder.java | MutateInBuilder.arrayPrependAll | public <T> MutateInBuilder arrayPrependAll(String path, Collection<T> values, SubdocOptionsBuilder optionsBuilder) {
"""
Prepend multiple values at once in an existing array, pushing all values in the collection's iteration order to
the front/start of the array.
First value becomes the first element of the arr... | java | public <T> MutateInBuilder arrayPrependAll(String path, Collection<T> values, SubdocOptionsBuilder optionsBuilder) {
asyncBuilder.arrayPrependAll(path, values, optionsBuilder);
return this;
} | [
"public",
"<",
"T",
">",
"MutateInBuilder",
"arrayPrependAll",
"(",
"String",
"path",
",",
"Collection",
"<",
"T",
">",
"values",
",",
"SubdocOptionsBuilder",
"optionsBuilder",
")",
"{",
"asyncBuilder",
".",
"arrayPrependAll",
"(",
"path",
",",
"values",
",",
... | Prepend multiple values at once in an existing array, pushing all values in the collection's iteration order to
the front/start of the array.
First value becomes the first element of the array, second value the second, etc... All existing values
are shifted right in the array, by the number of inserted elements.
Each... | [
"Prepend",
"multiple",
"values",
"at",
"once",
"in",
"an",
"existing",
"array",
"pushing",
"all",
"values",
"in",
"the",
"collection",
"s",
"iteration",
"order",
"to",
"the",
"front",
"/",
"start",
"of",
"the",
"array",
"."
] | train | https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/subdoc/MutateInBuilder.java#L770-L773 |
camunda/camunda-bpm-platform | engine-cdi/src/main/java/org/camunda/bpm/engine/cdi/BusinessProcess.java | BusinessProcess.startTask | public Task startTask(String taskId) {
"""
Associates the task with the provided taskId with the current conversation.
<p/>
@param taskId
the id of the task
@return the resumed task
@throws ProcessEngineCdiException
if no such task is found
"""
Task currentTask = associationManager.getTask();
... | java | public Task startTask(String taskId) {
Task currentTask = associationManager.getTask();
if(currentTask != null && currentTask.getId().equals(taskId)) {
return currentTask;
}
Task task = processEngine.getTaskService().createTaskQuery().taskId(taskId).singleResult();
if(task == null) {
thr... | [
"public",
"Task",
"startTask",
"(",
"String",
"taskId",
")",
"{",
"Task",
"currentTask",
"=",
"associationManager",
".",
"getTask",
"(",
")",
";",
"if",
"(",
"currentTask",
"!=",
"null",
"&&",
"currentTask",
".",
"getId",
"(",
")",
".",
"equals",
"(",
"t... | Associates the task with the provided taskId with the current conversation.
<p/>
@param taskId
the id of the task
@return the resumed task
@throws ProcessEngineCdiException
if no such task is found | [
"Associates",
"the",
"task",
"with",
"the",
"provided",
"taskId",
"with",
"the",
"current",
"conversation",
".",
"<p",
"/",
">"
] | train | https://github.com/camunda/camunda-bpm-platform/blob/1a464fc887ef3760e53d6f91b9e5b871a0d77cc0/engine-cdi/src/main/java/org/camunda/bpm/engine/cdi/BusinessProcess.java#L293-L305 |
alkacon/opencms-core | src/org/opencms/staticexport/CmsLinkManager.java | CmsLinkManager.substituteLink | public String substituteLink(CmsObject cms, String link, String siteRoot) {
"""
Returns a link <i>from</i> the URI stored in the provided OpenCms user context
<i>to</i> the VFS resource indicated by the given <code>link</code> and <code>siteRoot</code>,
for use on web pages.<p>
The result will be an absolute ... | java | public String substituteLink(CmsObject cms, String link, String siteRoot) {
return substituteLink(cms, link, siteRoot, false);
} | [
"public",
"String",
"substituteLink",
"(",
"CmsObject",
"cms",
",",
"String",
"link",
",",
"String",
"siteRoot",
")",
"{",
"return",
"substituteLink",
"(",
"cms",
",",
"link",
",",
"siteRoot",
",",
"false",
")",
";",
"}"
] | Returns a link <i>from</i> the URI stored in the provided OpenCms user context
<i>to</i> the VFS resource indicated by the given <code>link</code> and <code>siteRoot</code>,
for use on web pages.<p>
The result will be an absolute link that contains the configured context path and
servlet name, and in the case of the "... | [
"Returns",
"a",
"link",
"<i",
">",
"from<",
"/",
"i",
">",
"the",
"URI",
"stored",
"in",
"the",
"provided",
"OpenCms",
"user",
"context",
"<i",
">",
"to<",
"/",
"i",
">",
"the",
"VFS",
"resource",
"indicated",
"by",
"the",
"given",
"<code",
">",
"lin... | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/staticexport/CmsLinkManager.java#L713-L716 |
Harium/keel | src/main/java/com/harium/keel/catalano/math/transform/FourierTransform.java | FourierTransform.FFTShift2D | public static void FFTShift2D(double[][] x, Direction direction) {
"""
Shift zero-frequency component to center of spectrum.
@param x Data.
@param direction Direction.
"""
FFTShift2D(x, direction, 1);
FFTShift2D(x, direction, 2);
} | java | public static void FFTShift2D(double[][] x, Direction direction) {
FFTShift2D(x, direction, 1);
FFTShift2D(x, direction, 2);
} | [
"public",
"static",
"void",
"FFTShift2D",
"(",
"double",
"[",
"]",
"[",
"]",
"x",
",",
"Direction",
"direction",
")",
"{",
"FFTShift2D",
"(",
"x",
",",
"direction",
",",
"1",
")",
";",
"FFTShift2D",
"(",
"x",
",",
"direction",
",",
"2",
")",
";",
"... | Shift zero-frequency component to center of spectrum.
@param x Data.
@param direction Direction. | [
"Shift",
"zero",
"-",
"frequency",
"component",
"to",
"center",
"of",
"spectrum",
"."
] | train | https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/transform/FourierTransform.java#L450-L453 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.