repository_name stringlengths 7 54 | func_path_in_repository stringlengths 18 196 | func_name stringlengths 7 107 | whole_func_string stringlengths 76 3.82k | language stringclasses 1
value | func_code_string stringlengths 76 3.82k | func_code_tokens listlengths 22 717 | func_documentation_string stringlengths 61 1.98k | func_documentation_tokens listlengths 1 508 | split_name stringclasses 1
value | func_code_url stringlengths 111 310 |
|---|---|---|---|---|---|---|---|---|---|---|
deeplearning4j/deeplearning4j | nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDMath.java | SDMath.matrixInverse | public SDVariable matrixInverse(String name, SDVariable in) {
validateFloatingPoint("matrix inverse", in);
SDVariable ret = f().matrixInverse(in);
return updateVariableNameAndReference(ret, name);
} | java | public SDVariable matrixInverse(String name, SDVariable in) {
validateFloatingPoint("matrix inverse", in);
SDVariable ret = f().matrixInverse(in);
return updateVariableNameAndReference(ret, name);
} | [
"public",
"SDVariable",
"matrixInverse",
"(",
"String",
"name",
",",
"SDVariable",
"in",
")",
"{",
"validateFloatingPoint",
"(",
"\"matrix inverse\"",
",",
"in",
")",
";",
"SDVariable",
"ret",
"=",
"f",
"(",
")",
".",
"matrixInverse",
"(",
"in",
")",
";",
... | Matrix inverse op. For 2D input, this returns the standard matrix inverse.
For higher dimensional input with shape [..., m, m] the matrix inverse is returned for each
shape [m,m] sub-matrix.
@param name Name of the output variable
@param in Input
@return Matrix inverse variable | [
"Matrix",
"inverse",
"op",
".",
"For",
"2D",
"input",
"this",
"returns",
"the",
"standard",
"matrix",
"inverse",
".",
"For",
"higher",
"dimensional",
"input",
"with",
"shape",
"[",
"...",
"m",
"m",
"]",
"the",
"matrix",
"inverse",
"is",
"returned",
"for",
... | train | https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDMath.java#L1702-L1706 |
JOML-CI/JOML | src/org/joml/Intersectionf.java | Intersectionf.intersectSphereSphere | public static boolean intersectSphereSphere(Spheref sphereA, Spheref sphereB, Vector4f centerAndRadiusOfIntersectionCircle) {
return intersectSphereSphere(sphereA.x, sphereA.y, sphereA.z, sphereA.r*sphereA.r, sphereB.x, sphereB.y, sphereB.z, sphereB.r*sphereB.r, centerAndRadiusOfIntersectionCircle);
} | java | public static boolean intersectSphereSphere(Spheref sphereA, Spheref sphereB, Vector4f centerAndRadiusOfIntersectionCircle) {
return intersectSphereSphere(sphereA.x, sphereA.y, sphereA.z, sphereA.r*sphereA.r, sphereB.x, sphereB.y, sphereB.z, sphereB.r*sphereB.r, centerAndRadiusOfIntersectionCircle);
} | [
"public",
"static",
"boolean",
"intersectSphereSphere",
"(",
"Spheref",
"sphereA",
",",
"Spheref",
"sphereB",
",",
"Vector4f",
"centerAndRadiusOfIntersectionCircle",
")",
"{",
"return",
"intersectSphereSphere",
"(",
"sphereA",
".",
"x",
",",
"sphereA",
".",
"y",
","... | Test whether the one sphere with intersects the other sphere, and store the center of the circle of
intersection in the <code>(x, y, z)</code> components of the supplied vector and the radius of that circle in the w component.
<p>
The normal vector of the circle of intersection can simply be obtained by subtracting the... | [
"Test",
"whether",
"the",
"one",
"sphere",
"with",
"intersects",
"the",
"other",
"sphere",
"and",
"store",
"the",
"center",
"of",
"the",
"circle",
"of",
"intersection",
"in",
"the",
"<code",
">",
"(",
"x",
"y",
"z",
")",
"<",
"/",
"code",
">",
"compone... | train | https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Intersectionf.java#L825-L827 |
basho/riak-java-client | src/main/java/com/basho/riak/client/core/query/UserMetadata/RiakUserMetadata.java | RiakUserMetadata.containsKey | public boolean containsKey(String key, Charset charset)
{
return meta.containsKey(BinaryValue.unsafeCreate(key.getBytes(charset)));
} | java | public boolean containsKey(String key, Charset charset)
{
return meta.containsKey(BinaryValue.unsafeCreate(key.getBytes(charset)));
} | [
"public",
"boolean",
"containsKey",
"(",
"String",
"key",
",",
"Charset",
"charset",
")",
"{",
"return",
"meta",
".",
"containsKey",
"(",
"BinaryValue",
".",
"unsafeCreate",
"(",
"key",
".",
"getBytes",
"(",
"charset",
")",
")",
")",
";",
"}"
] | Determine if a specific usermeta entry is present.
<p>
This method uses the supplied {@code Charset} to convert the supplied key.
</p>
@param key the metadata key
@return {@code true} if the entry is present, {@code false} otherwise. | [
"Determine",
"if",
"a",
"specific",
"usermeta",
"entry",
"is",
"present",
".",
"<p",
">",
"This",
"method",
"uses",
"the",
"supplied",
"{",
"@code",
"Charset",
"}",
"to",
"convert",
"the",
"supplied",
"key",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/basho/riak-java-client/blob/bed6cd60f360bacf1b873ab92dd74f2526651e71/src/main/java/com/basho/riak/client/core/query/UserMetadata/RiakUserMetadata.java#L81-L84 |
lessthanoptimal/BoofCV | main/boofcv-ip/src/main/java/boofcv/alg/filter/derivative/GImageDerivativeOps.java | GImageDerivativeOps.derivativeForScaleSpace | public static <I extends ImageGray<I>, D extends ImageGray<D>>
AnyImageDerivative<I,D> derivativeForScaleSpace( Class<I> inputType , Class<D> derivType ) {
return createAnyDerivatives(DerivativeType.THREE,inputType,derivType);
} | java | public static <I extends ImageGray<I>, D extends ImageGray<D>>
AnyImageDerivative<I,D> derivativeForScaleSpace( Class<I> inputType , Class<D> derivType ) {
return createAnyDerivatives(DerivativeType.THREE,inputType,derivType);
} | [
"public",
"static",
"<",
"I",
"extends",
"ImageGray",
"<",
"I",
">",
",",
"D",
"extends",
"ImageGray",
"<",
"D",
">",
">",
"AnyImageDerivative",
"<",
"I",
",",
"D",
">",
"derivativeForScaleSpace",
"(",
"Class",
"<",
"I",
">",
"inputType",
",",
"Class",
... | Creates an instance of {@link AnyImageDerivative} which is intended for use of calculating scale-spaces.
It uses {@link DerivativeType#THREE} since it does not blur the image. More typical operators, such as Sobel and
Prewitt, blur the image.
@param inputType Type of input image.
@param derivType Type of derivative i... | [
"Creates",
"an",
"instance",
"of",
"{",
"@link",
"AnyImageDerivative",
"}",
"which",
"is",
"intended",
"for",
"use",
"of",
"calculating",
"scale",
"-",
"spaces",
".",
"It",
"uses",
"{",
"@link",
"DerivativeType#THREE",
"}",
"since",
"it",
"does",
"not",
"blu... | train | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/filter/derivative/GImageDerivativeOps.java#L326-L329 |
liferay/com-liferay-commerce | commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPInstancePersistenceImpl.java | CPInstancePersistenceImpl.countByC_LtD_S | @Override
public int countByC_LtD_S(long CPDefinitionId, Date displayDate, int status) {
FinderPath finderPath = FINDER_PATH_WITH_PAGINATION_COUNT_BY_C_LTD_S;
Object[] finderArgs = new Object[] {
CPDefinitionId, _getTime(displayDate), status
};
Long count = (Long)finderCache.getResult(finderPath, finder... | java | @Override
public int countByC_LtD_S(long CPDefinitionId, Date displayDate, int status) {
FinderPath finderPath = FINDER_PATH_WITH_PAGINATION_COUNT_BY_C_LTD_S;
Object[] finderArgs = new Object[] {
CPDefinitionId, _getTime(displayDate), status
};
Long count = (Long)finderCache.getResult(finderPath, finder... | [
"@",
"Override",
"public",
"int",
"countByC_LtD_S",
"(",
"long",
"CPDefinitionId",
",",
"Date",
"displayDate",
",",
"int",
"status",
")",
"{",
"FinderPath",
"finderPath",
"=",
"FINDER_PATH_WITH_PAGINATION_COUNT_BY_C_LTD_S",
";",
"Object",
"[",
"]",
"finderArgs",
"="... | Returns the number of cp instances where CPDefinitionId = ? and displayDate < ? and status = ?.
@param CPDefinitionId the cp definition ID
@param displayDate the display date
@param status the status
@return the number of matching cp instances | [
"Returns",
"the",
"number",
"of",
"cp",
"instances",
"where",
"CPDefinitionId",
"=",
"?",
";",
"and",
"displayDate",
"<",
";",
"?",
";",
"and",
"status",
"=",
"?",
";",
"."
] | train | https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPInstancePersistenceImpl.java#L6737-L6801 |
bugsnag/bugsnag-java | bugsnag/src/main/java/com/bugsnag/Report.java | Report.setAppInfo | @Deprecated
public Report setAppInfo(String key, Object value) {
diagnostics.app.put(key, value);
return this;
} | java | @Deprecated
public Report setAppInfo(String key, Object value) {
diagnostics.app.put(key, value);
return this;
} | [
"@",
"Deprecated",
"public",
"Report",
"setAppInfo",
"(",
"String",
"key",
",",
"Object",
"value",
")",
"{",
"diagnostics",
".",
"app",
".",
"put",
"(",
"key",
",",
"value",
")",
";",
"return",
"this",
";",
"}"
] | Add some application info on the report.
@param key the key of app info to add
@param value the value of app info to add
@return the modified report
@deprecated use {@link #addToTab(String, String, Object)} instead | [
"Add",
"some",
"application",
"info",
"on",
"the",
"report",
"."
] | train | https://github.com/bugsnag/bugsnag-java/blob/11817d63949bcf2b2b6b765a1d37305cdec356f2/bugsnag/src/main/java/com/bugsnag/Report.java#L214-L218 |
BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/constraint/SelfOrThis.java | SelfOrThis.satisfies | @Override
public boolean satisfies(Match match, int... ind)
{
return match.get(ind[selfIndex]) == match.get(ind[ind.length-1]) ||
super.satisfies(match, ind);
} | java | @Override
public boolean satisfies(Match match, int... ind)
{
return match.get(ind[selfIndex]) == match.get(ind[ind.length-1]) ||
super.satisfies(match, ind);
} | [
"@",
"Override",
"public",
"boolean",
"satisfies",
"(",
"Match",
"match",
",",
"int",
"...",
"ind",
")",
"{",
"return",
"match",
".",
"get",
"(",
"ind",
"[",
"selfIndex",
"]",
")",
"==",
"match",
".",
"get",
"(",
"ind",
"[",
"ind",
".",
"length",
"... | Checks if the last index is either generated or equal to the first element.
@param match current pattern match
@param ind mapped indices
@return true if the last index is either generated or equal to the first element | [
"Checks",
"if",
"the",
"last",
"index",
"is",
"either",
"generated",
"or",
"equal",
"to",
"the",
"first",
"element",
"."
] | train | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/constraint/SelfOrThis.java#L90-L95 |
datacleaner/AnalyzerBeans | env/xml-config/src/main/java/org/eobjects/analyzer/configuration/JaxbConfigurationReader.java | JaxbConfigurationReader.checkName | private static void checkName(final String name, Class<?> type, final Map<String, ?> previousEntries)
throws IllegalStateException {
if (StringUtils.isNullOrEmpty(name)) {
throw new IllegalStateException(type.getSimpleName() + " name cannot be null");
}
if (previousEntrie... | java | private static void checkName(final String name, Class<?> type, final Map<String, ?> previousEntries)
throws IllegalStateException {
if (StringUtils.isNullOrEmpty(name)) {
throw new IllegalStateException(type.getSimpleName() + " name cannot be null");
}
if (previousEntrie... | [
"private",
"static",
"void",
"checkName",
"(",
"final",
"String",
"name",
",",
"Class",
"<",
"?",
">",
"type",
",",
"final",
"Map",
"<",
"String",
",",
"?",
">",
"previousEntries",
")",
"throws",
"IllegalStateException",
"{",
"if",
"(",
"StringUtils",
".",... | Checks if a string is a valid name of a component.
@param name
the name to be validated
@param type
the type of component (used for error messages)
@param previousEntries
the previous entries of that component type (for uniqueness
check)
@throws IllegalStateException
if the name is invalid | [
"Checks",
"if",
"a",
"string",
"is",
"a",
"valid",
"name",
"of",
"a",
"component",
"."
] | train | https://github.com/datacleaner/AnalyzerBeans/blob/f82dae080d80d2a647b706a5fb22b3ea250613b3/env/xml-config/src/main/java/org/eobjects/analyzer/configuration/JaxbConfigurationReader.java#L1227-L1235 |
javamelody/javamelody | javamelody-spring-boot-starter/src/main/java/net/bull/javamelody/JavaMelodyAutoConfiguration.java | JavaMelodyAutoConfiguration.monitoringSpringScheduledAdvisor | @Bean
@ConditionalOnProperty(prefix = JavaMelodyConfigurationProperties.PREFIX, name = "scheduled-monitoring-enabled", matchIfMissing = true)
@ConditionalOnMissingBean(DefaultAdvisorAutoProxyCreator.class)
public MonitoringSpringAdvisor monitoringSpringScheduledAdvisor() {
// scheduled-monitoring-enabled was false... | java | @Bean
@ConditionalOnProperty(prefix = JavaMelodyConfigurationProperties.PREFIX, name = "scheduled-monitoring-enabled", matchIfMissing = true)
@ConditionalOnMissingBean(DefaultAdvisorAutoProxyCreator.class)
public MonitoringSpringAdvisor monitoringSpringScheduledAdvisor() {
// scheduled-monitoring-enabled was false... | [
"@",
"Bean",
"@",
"ConditionalOnProperty",
"(",
"prefix",
"=",
"JavaMelodyConfigurationProperties",
".",
"PREFIX",
",",
"name",
"=",
"\"scheduled-monitoring-enabled\"",
",",
"matchIfMissing",
"=",
"true",
")",
"@",
"ConditionalOnMissingBean",
"(",
"DefaultAdvisorAutoProxy... | Monitoring of beans methods having the {@link Scheduled} or {@link Schedules} annotations.
@return MonitoringSpringAdvisor | [
"Monitoring",
"of",
"beans",
"methods",
"having",
"the",
"{"
] | train | https://github.com/javamelody/javamelody/blob/18ad583ddeb5dcadd797dfda295409c6983ffd71/javamelody-spring-boot-starter/src/main/java/net/bull/javamelody/JavaMelodyAutoConfiguration.java#L262-L272 |
grails/gorm-hibernate5 | grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsHibernateUtil.java | GrailsHibernateUtil.ensureCorrectGroovyMetaClass | @Deprecated
public static void ensureCorrectGroovyMetaClass(Object target, Class<?> persistentClass) {
if (target instanceof GroovyObject) {
GroovyObject go = ((GroovyObject)target);
if (!go.getMetaClass().getTheClass().equals(persistentClass)) {
go.setMetaClass(Groov... | java | @Deprecated
public static void ensureCorrectGroovyMetaClass(Object target, Class<?> persistentClass) {
if (target instanceof GroovyObject) {
GroovyObject go = ((GroovyObject)target);
if (!go.getMetaClass().getTheClass().equals(persistentClass)) {
go.setMetaClass(Groov... | [
"@",
"Deprecated",
"public",
"static",
"void",
"ensureCorrectGroovyMetaClass",
"(",
"Object",
"target",
",",
"Class",
"<",
"?",
">",
"persistentClass",
")",
"{",
"if",
"(",
"target",
"instanceof",
"GroovyObject",
")",
"{",
"GroovyObject",
"go",
"=",
"(",
"(",
... | Ensures the meta class is correct for a given class
@param target The GroovyObject
@param persistentClass The persistent class | [
"Ensures",
"the",
"meta",
"class",
"is",
"correct",
"for",
"a",
"given",
"class"
] | train | https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsHibernateUtil.java#L363-L371 |
citrusframework/citrus | modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/ReceiveMessageBuilder.java | ReceiveMessageBuilder.jsonPath | public T jsonPath(String jsonPathExpression, Object controlValue) {
validate(jsonPathExpression, controlValue);
return self;
} | java | public T jsonPath(String jsonPathExpression, Object controlValue) {
validate(jsonPathExpression, controlValue);
return self;
} | [
"public",
"T",
"jsonPath",
"(",
"String",
"jsonPathExpression",
",",
"Object",
"controlValue",
")",
"{",
"validate",
"(",
"jsonPathExpression",
",",
"controlValue",
")",
";",
"return",
"self",
";",
"}"
] | Adds JsonPath message element validation.
@param jsonPathExpression
@param controlValue
@return | [
"Adds",
"JsonPath",
"message",
"element",
"validation",
"."
] | train | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/ReceiveMessageBuilder.java#L606-L609 |
yavijava/yavijava | src/main/java/com/vmware/vim25/mo/util/VerUtil.java | VerUtil.getTargetNameSpace | public static String getTargetNameSpace(String target) throws IOException {
String version = "";
String urlStr = "https://" + target + "/sdk/vimService?wsdl";
try {
trustAllHttpsCertificates();
}
catch (Exception e) {
throw new RuntimeException(e)... | java | public static String getTargetNameSpace(String target) throws IOException {
String version = "";
String urlStr = "https://" + target + "/sdk/vimService?wsdl";
try {
trustAllHttpsCertificates();
}
catch (Exception e) {
throw new RuntimeException(e)... | [
"public",
"static",
"String",
"getTargetNameSpace",
"(",
"String",
"target",
")",
"throws",
"IOException",
"{",
"String",
"version",
"=",
"\"\"",
";",
"String",
"urlStr",
"=",
"\"https://\"",
"+",
"target",
"+",
"\"/sdk/vimService?wsdl\"",
";",
"try",
"{",
"trus... | Retrieve the target server's name space
@param target either IP or host name
@return the namespace, e.g. urn:vim25Service
@throws IOException when there is a network issue or service issue on the target server
@throws RuntimeException wrapping NoSuchAlgorithmException, KeyManagementException which are
not likely ... | [
"Retrieve",
"the",
"target",
"server",
"s",
"name",
"space"
] | train | https://github.com/yavijava/yavijava/blob/27fd2c5826115782d5eeb934f86e3e39240179cd/src/main/java/com/vmware/vim25/mo/util/VerUtil.java#L82-L117 |
powermock/powermock | powermock-api/powermock-api-easymock/src/main/java/org/powermock/api/easymock/PowerMock.java | PowerMock.createNicePartialMock | public static synchronized <T> T createNicePartialMock(Class<T> type, String methodNameToMock,
Class<?> firstArgumentType, Class<?>... additionalArgumentTypes) {
return doMockSpecific(type, new NiceMockStrategy(), new String[]{methodNameToMock}, null,
... | java | public static synchronized <T> T createNicePartialMock(Class<T> type, String methodNameToMock,
Class<?> firstArgumentType, Class<?>... additionalArgumentTypes) {
return doMockSpecific(type, new NiceMockStrategy(), new String[]{methodNameToMock}, null,
... | [
"public",
"static",
"synchronized",
"<",
"T",
">",
"T",
"createNicePartialMock",
"(",
"Class",
"<",
"T",
">",
"type",
",",
"String",
"methodNameToMock",
",",
"Class",
"<",
"?",
">",
"firstArgumentType",
",",
"Class",
"<",
"?",
">",
"...",
"additionalArgument... | Nicely mock a single specific method. Use this to handle overloaded
methods.
@param <T> The type of the mock.
@param type The type that'll be used to create a mock instance.
@param methodNameToMock The name of the method to mock
@param firstArgumentType The type of t... | [
"Nicely",
"mock",
"a",
"single",
"specific",
"method",
".",
"Use",
"this",
"to",
"handle",
"overloaded",
"methods",
"."
] | train | https://github.com/powermock/powermock/blob/e8cd68026c284c6a7efe66959809eeebd8d1f9ad/powermock-api/powermock-api-easymock/src/main/java/org/powermock/api/easymock/PowerMock.java#L503-L507 |
roboconf/roboconf-platform | core/roboconf-dm-rest-services/src/main/java/net/roboconf/dm/rest/services/internal/utils/RestServicesUtils.java | RestServicesUtils.handleError | public static ResponseBuilder handleError( Status status, RestError restError, String lang ) {
return handleError( status.getStatusCode(), restError, lang );
} | java | public static ResponseBuilder handleError( Status status, RestError restError, String lang ) {
return handleError( status.getStatusCode(), restError, lang );
} | [
"public",
"static",
"ResponseBuilder",
"handleError",
"(",
"Status",
"status",
",",
"RestError",
"restError",
",",
"String",
"lang",
")",
"{",
"return",
"handleError",
"(",
"status",
".",
"getStatusCode",
"(",
")",
",",
"restError",
",",
"lang",
")",
";",
"}... | Handles an error and makes the magic stuff so that users can understand it.
@param status the response's status
@param restError a REST error
@param lang the user language
@return a response builder | [
"Handles",
"an",
"error",
"and",
"makes",
"the",
"magic",
"stuff",
"so",
"that",
"users",
"can",
"understand",
"it",
"."
] | train | https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-dm-rest-services/src/main/java/net/roboconf/dm/rest/services/internal/utils/RestServicesUtils.java#L98-L100 |
jbundle/jbundle | base/screen/view/xml/src/main/java/org/jbundle/base/screen/view/xml/XBasePanel.java | XBasePanel.printXmlTrailer | public void printXmlTrailer(PrintWriter out, ResourceBundle reg)
throws DBException
{
String strTrailer = reg.getString("xmlTrailer");
if ((strTrailer == null) || (strTrailer.length() == 0))
strTrailer =
" <trailer>" +
" </trailer>";
out.pr... | java | public void printXmlTrailer(PrintWriter out, ResourceBundle reg)
throws DBException
{
String strTrailer = reg.getString("xmlTrailer");
if ((strTrailer == null) || (strTrailer.length() == 0))
strTrailer =
" <trailer>" +
" </trailer>";
out.pr... | [
"public",
"void",
"printXmlTrailer",
"(",
"PrintWriter",
"out",
",",
"ResourceBundle",
"reg",
")",
"throws",
"DBException",
"{",
"String",
"strTrailer",
"=",
"reg",
".",
"getString",
"(",
"\"xmlTrailer\"",
")",
";",
"if",
"(",
"(",
"strTrailer",
"==",
"null",
... | Code to display the side Menu.
@param out The http output stream.
@param reg Local resource bundle.
@exception DBException File exception. | [
"Code",
"to",
"display",
"the",
"side",
"Menu",
"."
] | train | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/view/xml/src/main/java/org/jbundle/base/screen/view/xml/XBasePanel.java#L359-L368 |
JetBrains/xodus | entity-store/src/main/java/jetbrains/exodus/entitystore/StoreNamingRules.java | StoreNamingRules.getFQName | @NotNull
private String getFQName(@NotNull final String localName, Object... params) {
final StringBuilder builder = new StringBuilder();
builder.append(storeName);
builder.append('.');
builder.append(localName);
for (final Object param : params) {
builder.append(... | java | @NotNull
private String getFQName(@NotNull final String localName, Object... params) {
final StringBuilder builder = new StringBuilder();
builder.append(storeName);
builder.append('.');
builder.append(localName);
for (final Object param : params) {
builder.append(... | [
"@",
"NotNull",
"private",
"String",
"getFQName",
"(",
"@",
"NotNull",
"final",
"String",
"localName",
",",
"Object",
"...",
"params",
")",
"{",
"final",
"StringBuilder",
"builder",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"builder",
".",
"append",
"(",
... | Gets fully-qualified name of a table or sequence.
@param localName local table name.
@param params params.
@return fully-qualified table name. | [
"Gets",
"fully",
"-",
"qualified",
"name",
"of",
"a",
"table",
"or",
"sequence",
"."
] | train | https://github.com/JetBrains/xodus/blob/7b3476c4e81db66f9c7529148c761605cc8eea6d/entity-store/src/main/java/jetbrains/exodus/entitystore/StoreNamingRules.java#L144-L156 |
googleapis/google-http-java-client | google-http-client/src/main/java/com/google/api/client/json/JsonParser.java | JsonParser.parseArray | public final <T> Collection<T> parseArray(
Class<?> destinationCollectionClass, Class<T> destinationItemClass) throws IOException {
return parseArray(destinationCollectionClass, destinationItemClass, null);
} | java | public final <T> Collection<T> parseArray(
Class<?> destinationCollectionClass, Class<T> destinationItemClass) throws IOException {
return parseArray(destinationCollectionClass, destinationItemClass, null);
} | [
"public",
"final",
"<",
"T",
">",
"Collection",
"<",
"T",
">",
"parseArray",
"(",
"Class",
"<",
"?",
">",
"destinationCollectionClass",
",",
"Class",
"<",
"T",
">",
"destinationItemClass",
")",
"throws",
"IOException",
"{",
"return",
"parseArray",
"(",
"dest... | Parse a JSON Array from the given JSON parser into the given destination collection.
@param destinationCollectionClass class of destination collection (must have a public default
constructor)
@param destinationItemClass class of destination collection item (must have a public default
constructor)
@since 1.15 | [
"Parse",
"a",
"JSON",
"Array",
"from",
"the",
"given",
"JSON",
"parser",
"into",
"the",
"given",
"destination",
"collection",
"."
] | train | https://github.com/googleapis/google-http-java-client/blob/0988ae4e0f26a80f579b6adb2b276dd8254928de/google-http-client/src/main/java/com/google/api/client/json/JsonParser.java#L558-L561 |
milaboratory/milib | src/main/java/com/milaboratory/core/mutations/Mutations.java | Mutations.extractRelativeMutationsForRange | public Mutations<S> extractRelativeMutationsForRange(int from, int to) {
if (to < from)
throw new IllegalArgumentException("Reversed ranges are not supported.");
long indexRange = getIndexRange(from, to);
// If range size is 0 return empty array
if (indexRange == 0)
... | java | public Mutations<S> extractRelativeMutationsForRange(int from, int to) {
if (to < from)
throw new IllegalArgumentException("Reversed ranges are not supported.");
long indexRange = getIndexRange(from, to);
// If range size is 0 return empty array
if (indexRange == 0)
... | [
"public",
"Mutations",
"<",
"S",
">",
"extractRelativeMutationsForRange",
"(",
"int",
"from",
",",
"int",
"to",
")",
"{",
"if",
"(",
"to",
"<",
"from",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Reversed ranges are not supported.\"",
")",
";",
"lon... | Extracts mutations for a range of positions in the original sequence and performs shift of corresponding
positions (moves them to {@code -from}).
<p>Insertions before {@code from} excluded. Insertions after {@code (to - 1)} included.</p>
<p>
<b>Important:</b> to extract leftmost insertions (trailing insertions) use {... | [
"Extracts",
"mutations",
"for",
"a",
"range",
"of",
"positions",
"in",
"the",
"original",
"sequence",
"and",
"performs",
"shift",
"of",
"corresponding",
"positions",
"(",
"moves",
"them",
"to",
"{",
"@code",
"-",
"from",
"}",
")",
"."
] | train | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/mutations/Mutations.java#L389-L422 |
b3dgs/lionengine | lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/Factory.java | Factory.createFeaturable | private <O extends Featurable> O createFeaturable(Class<O> type, Setup setup) throws NoSuchMethodException
{
final O featurable = UtilReflection.createReduce(type, services, setup);
addFeatures(featurable, services, setup);
for (final Feature feature : featurable.getFeatures())
... | java | private <O extends Featurable> O createFeaturable(Class<O> type, Setup setup) throws NoSuchMethodException
{
final O featurable = UtilReflection.createReduce(type, services, setup);
addFeatures(featurable, services, setup);
for (final Feature feature : featurable.getFeatures())
... | [
"private",
"<",
"O",
"extends",
"Featurable",
">",
"O",
"createFeaturable",
"(",
"Class",
"<",
"O",
">",
"type",
",",
"Setup",
"setup",
")",
"throws",
"NoSuchMethodException",
"{",
"final",
"O",
"featurable",
"=",
"UtilReflection",
".",
"createReduce",
"(",
... | Create the featurable.
@param <O> The featurable type.
@param type The featurable type.
@param setup The associated setup.
@return The featurable instance.
@throws NoSuchMethodException If missing constructor. | [
"Create",
"the",
"featurable",
"."
] | train | https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/Factory.java#L261-L277 |
qspin/qtaste | kernel/src/main/java/com/qspin/qtaste/ui/treetable/AbstractTreeTableModel.java | AbstractTreeTableModel.fireTreeStructureChanged | protected void fireTreeStructureChanged(Object source, Object[] path, int[] childIndices, Object[] children) {
// Guaranteed to return a non-null array
Object[] listeners = listenerList.getListenerList();
TreeModelEvent e = null;
// Process the listeners last to first, notifying
... | java | protected void fireTreeStructureChanged(Object source, Object[] path, int[] childIndices, Object[] children) {
// Guaranteed to return a non-null array
Object[] listeners = listenerList.getListenerList();
TreeModelEvent e = null;
// Process the listeners last to first, notifying
... | [
"protected",
"void",
"fireTreeStructureChanged",
"(",
"Object",
"source",
",",
"Object",
"[",
"]",
"path",
",",
"int",
"[",
"]",
"childIndices",
",",
"Object",
"[",
"]",
"children",
")",
"{",
"// Guaranteed to return a non-null array",
"Object",
"[",
"]",
"liste... | /*
Notify all listeners that have registered interest for
notification on this event type. The event instance
is lazily created using the parameters passed into
the fire method.
@see EventListenerList | [
"/",
"*",
"Notify",
"all",
"listeners",
"that",
"have",
"registered",
"interest",
"for",
"notification",
"on",
"this",
"event",
"type",
".",
"The",
"event",
"instance",
"is",
"lazily",
"created",
"using",
"the",
"parameters",
"passed",
"into",
"the",
"fire",
... | train | https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/ui/treetable/AbstractTreeTableModel.java#L152-L167 |
jbundle/jbundle | base/model/src/main/java/org/jbundle/base/model/Utility.java | Utility.getAs | public static Object getAs(Map<String,Object> properties, String strKey, Class<?> classData, Object objDefault)
{
if (properties == null)
return objDefault;
Object objData = properties.get(strKey);
try {
return Converter.convertObjectToDatatype(objData, classData, obj... | java | public static Object getAs(Map<String,Object> properties, String strKey, Class<?> classData, Object objDefault)
{
if (properties == null)
return objDefault;
Object objData = properties.get(strKey);
try {
return Converter.convertObjectToDatatype(objData, classData, obj... | [
"public",
"static",
"Object",
"getAs",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"properties",
",",
"String",
"strKey",
",",
"Class",
"<",
"?",
">",
"classData",
",",
"Object",
"objDefault",
")",
"{",
"if",
"(",
"properties",
"==",
"null",
")",
"r... | Get this property from the map and convert it to the target class.
@param properties The map object to get the property from.
@param strKey The key of the property.
@param classData The target class to convert the property to.
@param objDefault The default value.
@return The data in the correct class. | [
"Get",
"this",
"property",
"from",
"the",
"map",
"and",
"convert",
"it",
"to",
"the",
"target",
"class",
"."
] | train | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/model/src/main/java/org/jbundle/base/model/Utility.java#L459-L469 |
m-m-m/util | io/src/main/java/net/sf/mmm/util/file/base/FileUtilImpl.java | FileUtilImpl.copyRecursive | private void copyRecursive(File source, File destination, FileFilter filter) {
if (source.isDirectory()) {
boolean okay = destination.mkdir();
if (!okay) {
throw new FileCreationFailedException(destination.getAbsolutePath(), true);
}
File[] children;
if (filter == null) {
... | java | private void copyRecursive(File source, File destination, FileFilter filter) {
if (source.isDirectory()) {
boolean okay = destination.mkdir();
if (!okay) {
throw new FileCreationFailedException(destination.getAbsolutePath(), true);
}
File[] children;
if (filter == null) {
... | [
"private",
"void",
"copyRecursive",
"(",
"File",
"source",
",",
"File",
"destination",
",",
"FileFilter",
"filter",
")",
"{",
"if",
"(",
"source",
".",
"isDirectory",
"(",
")",
")",
"{",
"boolean",
"okay",
"=",
"destination",
".",
"mkdir",
"(",
")",
";",... | This method copies the file or directory given by {@code source} into the given {@code destination}. <br>
<b>ATTENTION:</b><br>
In order to allow giving the copy of {@code source} a new {@link File#getName() name}, the {@code destination} has
to point to the final place where the copy should appear rather than the dire... | [
"This",
"method",
"copies",
"the",
"file",
"or",
"directory",
"given",
"by",
"{",
"@code",
"source",
"}",
"into",
"the",
"given",
"{",
"@code",
"destination",
"}",
".",
"<br",
">",
"<b",
">",
"ATTENTION",
":",
"<",
"/",
"b",
">",
"<br",
">",
"In",
... | train | https://github.com/m-m-m/util/blob/f0e4e084448f8dfc83ca682a9e1618034a094ce6/io/src/main/java/net/sf/mmm/util/file/base/FileUtilImpl.java#L245-L264 |
apiman/apiman | common/plugin/src/main/java/io/apiman/common/plugin/PluginUtils.java | PluginUtils.getM2Path | public static File getM2Path(File m2Dir, PluginCoordinates coordinates) {
String artifactSubPath = getMavenPath(coordinates);
return new File(m2Dir, artifactSubPath);
} | java | public static File getM2Path(File m2Dir, PluginCoordinates coordinates) {
String artifactSubPath = getMavenPath(coordinates);
return new File(m2Dir, artifactSubPath);
} | [
"public",
"static",
"File",
"getM2Path",
"(",
"File",
"m2Dir",
",",
"PluginCoordinates",
"coordinates",
")",
"{",
"String",
"artifactSubPath",
"=",
"getMavenPath",
"(",
"coordinates",
")",
";",
"return",
"new",
"File",
"(",
"m2Dir",
",",
"artifactSubPath",
")",
... | Find the plugin artifact in the local .m2 directory.
@param m2Dir the maven m2 directory
@param coordinates the coordinates
@return the M2 path | [
"Find",
"the",
"plugin",
"artifact",
"in",
"the",
"local",
".",
"m2",
"directory",
"."
] | train | https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/common/plugin/src/main/java/io/apiman/common/plugin/PluginUtils.java#L126-L129 |
facebookarchive/hadoop-20 | src/contrib/raid/src/java/org/apache/hadoop/raid/RaidShell.java | RaidShell.showConfig | private int showConfig(String cmd, String argv[], int startindex)
throws IOException {
int exitCode = 0;
PolicyInfo[] all = raidnode.getAllPolicies();
for (PolicyInfo p: all) {
out.println(p);
}
return exitCode;
} | java | private int showConfig(String cmd, String argv[], int startindex)
throws IOException {
int exitCode = 0;
PolicyInfo[] all = raidnode.getAllPolicies();
for (PolicyInfo p: all) {
out.println(p);
}
return exitCode;
} | [
"private",
"int",
"showConfig",
"(",
"String",
"cmd",
",",
"String",
"argv",
"[",
"]",
",",
"int",
"startindex",
")",
"throws",
"IOException",
"{",
"int",
"exitCode",
"=",
"0",
";",
"PolicyInfo",
"[",
"]",
"all",
"=",
"raidnode",
".",
"getAllPolicies",
"... | Apply operation specified by 'cmd' on all parameters
starting from argv[startindex]. | [
"Apply",
"operation",
"specified",
"by",
"cmd",
"on",
"all",
"parameters",
"starting",
"from",
"argv",
"[",
"startindex",
"]",
"."
] | train | https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/raid/src/java/org/apache/hadoop/raid/RaidShell.java#L780-L788 |
codegist/crest | core/src/main/java/org/codegist/crest/interceptor/AbstractRequestInterceptor.java | AbstractRequestInterceptor.newParamConfig | public ParamConfigBuilder newParamConfig(Class<?> type, Type genericType){
return paramConfigBuilderFactory.newInstance(type, genericType);
} | java | public ParamConfigBuilder newParamConfig(Class<?> type, Type genericType){
return paramConfigBuilderFactory.newInstance(type, genericType);
} | [
"public",
"ParamConfigBuilder",
"newParamConfig",
"(",
"Class",
"<",
"?",
">",
"type",
",",
"Type",
"genericType",
")",
"{",
"return",
"paramConfigBuilderFactory",
".",
"newInstance",
"(",
"type",
",",
"genericType",
")",
";",
"}"
] | Returns a new param config for the given class and generic type
@param type param config class
@param genericType param config generic type
@return the new param config | [
"Returns",
"a",
"new",
"param",
"config",
"for",
"the",
"given",
"class",
"and",
"generic",
"type"
] | train | https://github.com/codegist/crest/blob/e99ba7728b27d2ddb2c247261350f1b6fa7a6698/core/src/main/java/org/codegist/crest/interceptor/AbstractRequestInterceptor.java#L59-L61 |
tzaeschke/zoodb | src/org/zoodb/internal/util/FormattedStringBuilder.java | FormattedStringBuilder.appendRightAligned | public FormattedStringBuilder appendRightAligned(String s, int alignPosition) {
int lineStart = _delegate.lastIndexOf(NL);
int currentLength = _delegate.length();
int rightPosition = alignPosition;
if(lineStart != -1) {
lineStart += NL.length();
rightPositio... | java | public FormattedStringBuilder appendRightAligned(String s, int alignPosition) {
int lineStart = _delegate.lastIndexOf(NL);
int currentLength = _delegate.length();
int rightPosition = alignPosition;
if(lineStart != -1) {
lineStart += NL.length();
rightPositio... | [
"public",
"FormattedStringBuilder",
"appendRightAligned",
"(",
"String",
"s",
",",
"int",
"alignPosition",
")",
"{",
"int",
"lineStart",
"=",
"_delegate",
".",
"lastIndexOf",
"(",
"NL",
")",
";",
"int",
"currentLength",
"=",
"_delegate",
".",
"length",
"(",
")... | Appends to the line the white spaces and then the string <tt>s</tt>
so that the end of the string <tt>s</tt> is at the position
<tt>alignPosition</tt>. If the string is longer than the free space
in the buffer to the align position then an IllegalArgumentException
is thrown.
@param s String to append.
@param alignPosi... | [
"Appends",
"to",
"the",
"line",
"the",
"white",
"spaces",
"and",
"then",
"the",
"string",
"<tt",
">",
"s<",
"/",
"tt",
">",
"so",
"that",
"the",
"end",
"of",
"the",
"string",
"<tt",
">",
"s<",
"/",
"tt",
">",
"is",
"at",
"the",
"position",
"<tt",
... | train | https://github.com/tzaeschke/zoodb/blob/058d0ff161a8ee9d53244c433aca97ee9c654410/src/org/zoodb/internal/util/FormattedStringBuilder.java#L149-L166 |
apereo/cas | core/cas-server-core-web-api/src/main/java/org/apereo/cas/web/support/WebUtils.java | WebUtils.putRegisteredService | public static void putRegisteredService(final RequestContext context, final RegisteredService registeredService) {
context.getFlowScope().put(PARAMETER_REGISTERED_SERVICE, registeredService);
} | java | public static void putRegisteredService(final RequestContext context, final RegisteredService registeredService) {
context.getFlowScope().put(PARAMETER_REGISTERED_SERVICE, registeredService);
} | [
"public",
"static",
"void",
"putRegisteredService",
"(",
"final",
"RequestContext",
"context",
",",
"final",
"RegisteredService",
"registeredService",
")",
"{",
"context",
".",
"getFlowScope",
"(",
")",
".",
"put",
"(",
"PARAMETER_REGISTERED_SERVICE",
",",
"registered... | Put registered service into flowscope.
@param context the context
@param registeredService the service | [
"Put",
"registered",
"service",
"into",
"flowscope",
"."
] | train | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-web-api/src/main/java/org/apereo/cas/web/support/WebUtils.java#L340-L342 |
sarl/sarl | sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/Boot.java | Boot.startJanus | public static Kernel startJanus(Class<? extends Agent> agentCls, Object... params)
throws Exception {
return startJanusWithModuleType(null, agentCls, params);
} | java | public static Kernel startJanus(Class<? extends Agent> agentCls, Object... params)
throws Exception {
return startJanusWithModuleType(null, agentCls, params);
} | [
"public",
"static",
"Kernel",
"startJanus",
"(",
"Class",
"<",
"?",
"extends",
"Agent",
">",
"agentCls",
",",
"Object",
"...",
"params",
")",
"throws",
"Exception",
"{",
"return",
"startJanusWithModuleType",
"(",
"null",
",",
"agentCls",
",",
"params",
")",
... | Launch the Janus kernel and the first agent in the kernel.
<p>Thus function does not parse the command line. See {@link #main(String[])} for the command line management. When this
function is called, it is assumed that all the system's properties are correctly set.
<p>The platformModule parameter permits to specify t... | [
"Launch",
"the",
"Janus",
"kernel",
"and",
"the",
"first",
"agent",
"in",
"the",
"kernel",
"."
] | train | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/Boot.java#L922-L925 |
eclipse/hawkbit | hawkbit-dmf/hawkbit-dmf-amqp/src/main/java/org/eclipse/hawkbit/amqp/AmqpMessageHandlerService.java | AmqpMessageHandlerService.onMessage | @RabbitListener(queues = "${hawkbit.dmf.rabbitmq.receiverQueue:dmf_receiver}", containerFactory = "listenerContainerFactory")
public Message onMessage(final Message message,
@Header(name = MessageHeaderKey.TYPE, required = false) final String type,
@Header(name = MessageHeaderKey.TENANT, req... | java | @RabbitListener(queues = "${hawkbit.dmf.rabbitmq.receiverQueue:dmf_receiver}", containerFactory = "listenerContainerFactory")
public Message onMessage(final Message message,
@Header(name = MessageHeaderKey.TYPE, required = false) final String type,
@Header(name = MessageHeaderKey.TENANT, req... | [
"@",
"RabbitListener",
"(",
"queues",
"=",
"\"${hawkbit.dmf.rabbitmq.receiverQueue:dmf_receiver}\"",
",",
"containerFactory",
"=",
"\"listenerContainerFactory\"",
")",
"public",
"Message",
"onMessage",
"(",
"final",
"Message",
"message",
",",
"@",
"Header",
"(",
"name",
... | Method to handle all incoming DMF amqp messages.
@param message
incoming message
@param type
the message type
@param tenant
the contentType of the message
@return a message if <null> no message is send back to sender | [
"Method",
"to",
"handle",
"all",
"incoming",
"DMF",
"amqp",
"messages",
"."
] | train | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-dmf/hawkbit-dmf-amqp/src/main/java/org/eclipse/hawkbit/amqp/AmqpMessageHandlerService.java#L106-L111 |
Azure/azure-sdk-for-java | batch/data-plane/src/main/java/com/microsoft/azure/batch/JobScheduleOperations.java | JobScheduleOperations.enableJobSchedule | public void enableJobSchedule(String jobScheduleId, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException {
JobScheduleEnableOptions options = new JobScheduleEnableOptions();
BehaviorManager bhMgr = new BehaviorManager(this.customBehaviors(), additionalBehaviors);
... | java | public void enableJobSchedule(String jobScheduleId, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException {
JobScheduleEnableOptions options = new JobScheduleEnableOptions();
BehaviorManager bhMgr = new BehaviorManager(this.customBehaviors(), additionalBehaviors);
... | [
"public",
"void",
"enableJobSchedule",
"(",
"String",
"jobScheduleId",
",",
"Iterable",
"<",
"BatchClientBehavior",
">",
"additionalBehaviors",
")",
"throws",
"BatchErrorException",
",",
"IOException",
"{",
"JobScheduleEnableOptions",
"options",
"=",
"new",
"JobScheduleEn... | Enables the specified job schedule, allowing jobs to be created according to its {@link Schedule}.
@param jobScheduleId The ID of the job schedule.
@param additionalBehaviors A collection of {@link BatchClientBehavior} instances that are applied to the Batch service request.
@throws BatchErrorException Exception throw... | [
"Enables",
"the",
"specified",
"job",
"schedule",
"allowing",
"jobs",
"to",
"be",
"created",
"according",
"to",
"its",
"{",
"@link",
"Schedule",
"}",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/JobScheduleOperations.java#L320-L326 |
PeterisP/LVTagger | src/main/java/edu/stanford/nlp/parser/lexparser/MLEDependencyGrammar.java | MLEDependencyGrammar.readData | @Override
public void readData(BufferedReader in) throws IOException {
final String LEFT = "left";
int lineNum = 1;
// all lines have one rule per line
boolean doingStop = false;
for (String line = in.readLine(); line != null && line.length() > 0; line = in.readLine()) {
try {
... | java | @Override
public void readData(BufferedReader in) throws IOException {
final String LEFT = "left";
int lineNum = 1;
// all lines have one rule per line
boolean doingStop = false;
for (String line = in.readLine(); line != null && line.length() > 0; line = in.readLine()) {
try {
... | [
"@",
"Override",
"public",
"void",
"readData",
"(",
"BufferedReader",
"in",
")",
"throws",
"IOException",
"{",
"final",
"String",
"LEFT",
"=",
"\"left\"",
";",
"int",
"lineNum",
"=",
"1",
";",
"// all lines have one rule per line\r",
"boolean",
"doingStop",
"=",
... | Populates data in this DependencyGrammar from the character stream
given by the Reader r. | [
"Populates",
"data",
"in",
"this",
"DependencyGrammar",
"from",
"the",
"character",
"stream",
"given",
"by",
"the",
"Reader",
"r",
"."
] | train | https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/parser/lexparser/MLEDependencyGrammar.java#L804-L840 |
Netflix/Nicobar | nicobar-core/src/main/java/com/netflix/nicobar/core/module/ScriptModuleLoader.java | ScriptModuleLoader.notifyArchiveRejected | protected void notifyArchiveRejected(ScriptArchive scriptArchive, ArchiveRejectedReason reason, @Nullable Throwable cause) {
for (ScriptModuleListener listener : listeners) {
listener.archiveRejected(scriptArchive, reason, cause);
}
} | java | protected void notifyArchiveRejected(ScriptArchive scriptArchive, ArchiveRejectedReason reason, @Nullable Throwable cause) {
for (ScriptModuleListener listener : listeners) {
listener.archiveRejected(scriptArchive, reason, cause);
}
} | [
"protected",
"void",
"notifyArchiveRejected",
"(",
"ScriptArchive",
"scriptArchive",
",",
"ArchiveRejectedReason",
"reason",
",",
"@",
"Nullable",
"Throwable",
"cause",
")",
"{",
"for",
"(",
"ScriptModuleListener",
"listener",
":",
"listeners",
")",
"{",
"listener",
... | Notify listeners that a script archive was rejected by this loader
@param scriptArchive archive that was rejected
@param reason reason it was rejected
@param cause underlying exception which triggered the rejection | [
"Notify",
"listeners",
"that",
"a",
"script",
"archive",
"was",
"rejected",
"by",
"this",
"loader"
] | train | https://github.com/Netflix/Nicobar/blob/507173dcae4a86a955afc3df222a855862fab8d7/nicobar-core/src/main/java/com/netflix/nicobar/core/module/ScriptModuleLoader.java#L501-L505 |
ngageoint/geopackage-android-map | geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShapeConverter.java | GoogleMapShapeConverter.toPolyhedralSurface | public PolyhedralSurface toPolyhedralSurface(
List<com.google.android.gms.maps.model.Polygon> polygonList,
boolean hasZ, boolean hasM) {
PolyhedralSurface polyhedralSurface = new PolyhedralSurface(hasZ, hasM);
for (com.google.android.gms.maps.model.Polygon mapPolygon : polygonL... | java | public PolyhedralSurface toPolyhedralSurface(
List<com.google.android.gms.maps.model.Polygon> polygonList,
boolean hasZ, boolean hasM) {
PolyhedralSurface polyhedralSurface = new PolyhedralSurface(hasZ, hasM);
for (com.google.android.gms.maps.model.Polygon mapPolygon : polygonL... | [
"public",
"PolyhedralSurface",
"toPolyhedralSurface",
"(",
"List",
"<",
"com",
".",
"google",
".",
"android",
".",
"gms",
".",
"maps",
".",
"model",
".",
"Polygon",
">",
"polygonList",
",",
"boolean",
"hasZ",
",",
"boolean",
"hasM",
")",
"{",
"PolyhedralSurf... | Convert a list of {@link Polygon} to a {@link PolyhedralSurface}
@param polygonList polygon list
@param hasZ has z flag
@param hasM has m flag
@return polyhedral surface | [
"Convert",
"a",
"list",
"of",
"{",
"@link",
"Polygon",
"}",
"to",
"a",
"{",
"@link",
"PolyhedralSurface",
"}"
] | train | https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShapeConverter.java#L1220-L1232 |
op4j/op4j | src/main/java/org/op4j/Op.java | Op.onArrayFor | public static <T> Level0ArrayOperator<Calendar[],Calendar> onArrayFor(final Calendar... elements) {
return onArrayOf(Types.CALENDAR, VarArgsUtil.asRequiredObjectArray(elements));
} | java | public static <T> Level0ArrayOperator<Calendar[],Calendar> onArrayFor(final Calendar... elements) {
return onArrayOf(Types.CALENDAR, VarArgsUtil.asRequiredObjectArray(elements));
} | [
"public",
"static",
"<",
"T",
">",
"Level0ArrayOperator",
"<",
"Calendar",
"[",
"]",
",",
"Calendar",
">",
"onArrayFor",
"(",
"final",
"Calendar",
"...",
"elements",
")",
"{",
"return",
"onArrayOf",
"(",
"Types",
".",
"CALENDAR",
",",
"VarArgsUtil",
".",
"... | <p>
Creates an array with the specified elements and an <i>operation expression</i> on it.
</p>
@param elements the elements of the array being created
@return an operator, ready for chaining | [
"<p",
">",
"Creates",
"an",
"array",
"with",
"the",
"specified",
"elements",
"and",
"an",
"<i",
">",
"operation",
"expression<",
"/",
"i",
">",
"on",
"it",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/op4j/op4j/blob/b577596dfe462089d3dd169666defc6de7ad289a/src/main/java/org/op4j/Op.java#L1023-L1025 |
mgledi/DRUMS | src/main/java/com/unister/semweb/drums/util/KeyUtils.java | KeyUtils.generateHashFunction | public static String generateHashFunction(byte[] min, byte[] max, int buckets, String suffix, String prefix)
throws Exception {
String[] Sbuckets = new String[buckets];
for (int i = 0; i < buckets; i++) {
Sbuckets[i] = i + "";
}
return generateRangeHashFunct... | java | public static String generateHashFunction(byte[] min, byte[] max, int buckets, String suffix, String prefix)
throws Exception {
String[] Sbuckets = new String[buckets];
for (int i = 0; i < buckets; i++) {
Sbuckets[i] = i + "";
}
return generateRangeHashFunct... | [
"public",
"static",
"String",
"generateHashFunction",
"(",
"byte",
"[",
"]",
"min",
",",
"byte",
"[",
"]",
"max",
",",
"int",
"buckets",
",",
"String",
"suffix",
",",
"String",
"prefix",
")",
"throws",
"Exception",
"{",
"String",
"[",
"]",
"Sbuckets",
"=... | Generates a {@link RangeHashFunction}.
@param min
the minimal value to expect
@param max
the maximal value to expect
@param buckets
the number of buckets
@param suffix
the suffix for all files
@param prefix
a prefix for all files
@return String representation of the the RangeHashFunction
@throws Exception | [
"Generates",
"a",
"{",
"@link",
"RangeHashFunction",
"}",
"."
] | train | https://github.com/mgledi/DRUMS/blob/a670f17a2186c9a15725f26617d77ce8e444e072/src/main/java/com/unister/semweb/drums/util/KeyUtils.java#L127-L134 |
elki-project/elki | elki-outlier/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/spatial/CTLuMoranScatterplotOutlier.java | CTLuMoranScatterplotOutlier.run | public OutlierResult run(Database database, Relation<N> nrel, Relation<? extends NumberVector> relation) {
final NeighborSetPredicate npred = getNeighborSetPredicateFactory().instantiate(database, nrel);
// Compute the global mean and variance
MeanVariance globalmv = new MeanVariance();
for(DBIDIter id... | java | public OutlierResult run(Database database, Relation<N> nrel, Relation<? extends NumberVector> relation) {
final NeighborSetPredicate npred = getNeighborSetPredicateFactory().instantiate(database, nrel);
// Compute the global mean and variance
MeanVariance globalmv = new MeanVariance();
for(DBIDIter id... | [
"public",
"OutlierResult",
"run",
"(",
"Database",
"database",
",",
"Relation",
"<",
"N",
">",
"nrel",
",",
"Relation",
"<",
"?",
"extends",
"NumberVector",
">",
"relation",
")",
"{",
"final",
"NeighborSetPredicate",
"npred",
"=",
"getNeighborSetPredicateFactory",... | Main method.
@param database Database
@param nrel Neighborhood relation
@param relation Data relation (1d!)
@return Outlier detection result | [
"Main",
"method",
"."
] | train | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-outlier/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/spatial/CTLuMoranScatterplotOutlier.java#L102-L150 |
NordicSemiconductor/Android-DFU-Library | dfu/src/main/java/no/nordicsemi/android/dfu/SecureDfuImpl.java | SecureDfuImpl.setObjectSize | private void setObjectSize(@NonNull final byte[] data, final int value) {
data[2] = (byte) (value & 0xFF);
data[3] = (byte) ((value >> 8) & 0xFF);
data[4] = (byte) ((value >> 16) & 0xFF);
data[5] = (byte) ((value >> 24) & 0xFF);
} | java | private void setObjectSize(@NonNull final byte[] data, final int value) {
data[2] = (byte) (value & 0xFF);
data[3] = (byte) ((value >> 8) & 0xFF);
data[4] = (byte) ((value >> 16) & 0xFF);
data[5] = (byte) ((value >> 24) & 0xFF);
} | [
"private",
"void",
"setObjectSize",
"(",
"@",
"NonNull",
"final",
"byte",
"[",
"]",
"data",
",",
"final",
"int",
"value",
")",
"{",
"data",
"[",
"2",
"]",
"=",
"(",
"byte",
")",
"(",
"value",
"&",
"0xFF",
")",
";",
"data",
"[",
"3",
"]",
"=",
"... | Sets the object size in correct position of the data array.
@param data control point data packet
@param value Object size in bytes. | [
"Sets",
"the",
"object",
"size",
"in",
"correct",
"position",
"of",
"the",
"data",
"array",
"."
] | train | https://github.com/NordicSemiconductor/Android-DFU-Library/blob/ec14c8c522bebe801a9a4c3dfbbeb1f53262c03f/dfu/src/main/java/no/nordicsemi/android/dfu/SecureDfuImpl.java#L737-L742 |
validator/validator | src/nu/validator/gnu/xml/aelfred2/XmlParser.java | XmlParser.fatal | private void fatal(String message, char textFound, String textExpected)
throws SAXException {
fatal(message, Character.valueOf(textFound).toString(), textExpected);
} | java | private void fatal(String message, char textFound, String textExpected)
throws SAXException {
fatal(message, Character.valueOf(textFound).toString(), textExpected);
} | [
"private",
"void",
"fatal",
"(",
"String",
"message",
",",
"char",
"textFound",
",",
"String",
"textExpected",
")",
"throws",
"SAXException",
"{",
"fatal",
"(",
"message",
",",
"Character",
".",
"valueOf",
"(",
"textFound",
")",
".",
"toString",
"(",
")",
... | Report a serious error.
@param message
The error message.
@param textFound
The text that caused the error (or null). | [
"Report",
"a",
"serious",
"error",
"."
] | train | https://github.com/validator/validator/blob/c7b7f85b3a364df7d9944753fb5b2cd0ce642889/src/nu/validator/gnu/xml/aelfred2/XmlParser.java#L578-L581 |
prestodb/presto | presto-hive/src/main/java/com/facebook/presto/hive/metastore/SemiTransactionalHiveMetastore.java | SemiTransactionalHiveMetastore.deleteRecursivelyIfExists | private static boolean deleteRecursivelyIfExists(HdfsContext context, HdfsEnvironment hdfsEnvironment, Path path)
{
FileSystem fileSystem;
try {
fileSystem = hdfsEnvironment.getFileSystem(context, path);
}
catch (IOException ignored) {
return false;
}
... | java | private static boolean deleteRecursivelyIfExists(HdfsContext context, HdfsEnvironment hdfsEnvironment, Path path)
{
FileSystem fileSystem;
try {
fileSystem = hdfsEnvironment.getFileSystem(context, path);
}
catch (IOException ignored) {
return false;
}
... | [
"private",
"static",
"boolean",
"deleteRecursivelyIfExists",
"(",
"HdfsContext",
"context",
",",
"HdfsEnvironment",
"hdfsEnvironment",
",",
"Path",
"path",
")",
"{",
"FileSystem",
"fileSystem",
";",
"try",
"{",
"fileSystem",
"=",
"hdfsEnvironment",
".",
"getFileSystem... | Attempts to remove the file or empty directory.
@return true if the location no longer exists | [
"Attempts",
"to",
"remove",
"the",
"file",
"or",
"empty",
"directory",
"."
] | train | https://github.com/prestodb/presto/blob/89de5e379d8f85e139d292b0add8c537a2a01a88/presto-hive/src/main/java/com/facebook/presto/hive/metastore/SemiTransactionalHiveMetastore.java#L1863-L1874 |
google/error-prone-javac | src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/ClassWriterImpl.java | ClassWriterImpl.getClassLinks | private Content getClassLinks(LinkInfoImpl.Kind context, Collection<?> list) {
Object[] typeList = list.toArray();
Content dd = new HtmlTree(HtmlTag.DD);
boolean isFirst = true;
for (Object item : typeList) {
if (!isFirst) {
Content separator = new StringConte... | java | private Content getClassLinks(LinkInfoImpl.Kind context, Collection<?> list) {
Object[] typeList = list.toArray();
Content dd = new HtmlTree(HtmlTag.DD);
boolean isFirst = true;
for (Object item : typeList) {
if (!isFirst) {
Content separator = new StringConte... | [
"private",
"Content",
"getClassLinks",
"(",
"LinkInfoImpl",
".",
"Kind",
"context",
",",
"Collection",
"<",
"?",
">",
"list",
")",
"{",
"Object",
"[",
"]",
"typeList",
"=",
"list",
".",
"toArray",
"(",
")",
";",
"Content",
"dd",
"=",
"new",
"HtmlTree",
... | Get links to the given classes.
@param context the id of the context where the link will be printed
@param list the list of classes
@return a content tree for the class list | [
"Get",
"links",
"to",
"the",
"given",
"classes",
"."
] | train | https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/ClassWriterImpl.java#L590-L611 |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Spies.java | Spies.spy2nd | public static <T1, T2, T3> TriPredicate<T1, T2, T3> spy2nd(TriPredicate<T1, T2, T3> predicate, Box<T2> param2) {
return spy(predicate, Box.<Boolean>empty(), Box.<T1>empty(), param2, Box.<T3>empty());
} | java | public static <T1, T2, T3> TriPredicate<T1, T2, T3> spy2nd(TriPredicate<T1, T2, T3> predicate, Box<T2> param2) {
return spy(predicate, Box.<Boolean>empty(), Box.<T1>empty(), param2, Box.<T3>empty());
} | [
"public",
"static",
"<",
"T1",
",",
"T2",
",",
"T3",
">",
"TriPredicate",
"<",
"T1",
",",
"T2",
",",
"T3",
">",
"spy2nd",
"(",
"TriPredicate",
"<",
"T1",
",",
"T2",
",",
"T3",
">",
"predicate",
",",
"Box",
"<",
"T2",
">",
"param2",
")",
"{",
"r... | Proxies a ternary predicate spying for second parameter.
@param <T1> the predicate first parameter type
@param <T2> the predicate second parameter type
@param <T3> the predicate third parameter type
@param predicate the predicate that will be spied
@param param2 a box that will be containing the second spied parameter... | [
"Proxies",
"a",
"ternary",
"predicate",
"spying",
"for",
"second",
"parameter",
"."
] | train | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Spies.java#L429-L431 |
Azure/azure-sdk-for-java | cognitiveservices/data-plane/vision/customvision/training/src/main/java/com/microsoft/azure/cognitiveservices/vision/customvision/training/implementation/TrainingsImpl.java | TrainingsImpl.createImagesFromUrls | public ImageCreateSummary createImagesFromUrls(UUID projectId, ImageUrlCreateBatch batch) {
return createImagesFromUrlsWithServiceResponseAsync(projectId, batch).toBlocking().single().body();
} | java | public ImageCreateSummary createImagesFromUrls(UUID projectId, ImageUrlCreateBatch batch) {
return createImagesFromUrlsWithServiceResponseAsync(projectId, batch).toBlocking().single().body();
} | [
"public",
"ImageCreateSummary",
"createImagesFromUrls",
"(",
"UUID",
"projectId",
",",
"ImageUrlCreateBatch",
"batch",
")",
"{",
"return",
"createImagesFromUrlsWithServiceResponseAsync",
"(",
"projectId",
",",
"batch",
")",
".",
"toBlocking",
"(",
")",
".",
"single",
... | Add the provided images urls to the set of training images.
This API accepts a batch of urls, and optionally tags, to create images. There is a limit of 64 images and 20 tags.
@param projectId The project id
@param batch Image urls and tag ids. Limited to 64 images and 20 tags per batch
@throws IllegalArgumentExceptio... | [
"Add",
"the",
"provided",
"images",
"urls",
"to",
"the",
"set",
"of",
"training",
"images",
".",
"This",
"API",
"accepts",
"a",
"batch",
"of",
"urls",
"and",
"optionally",
"tags",
"to",
"create",
"images",
".",
"There",
"is",
"a",
"limit",
"of",
"64",
... | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/customvision/training/src/main/java/com/microsoft/azure/cognitiveservices/vision/customvision/training/implementation/TrainingsImpl.java#L3840-L3842 |
cdk/cdk | tool/sdg/src/main/java/org/openscience/cdk/layout/RingPlacer.java | RingPlacer.getNativeRingRadius | public double getNativeRingRadius(IRing ring, double bondLength) {
int size = ring.getAtomCount();
double radius = bondLength / (2 * Math.sin((Math.PI) / size));
return radius;
} | java | public double getNativeRingRadius(IRing ring, double bondLength) {
int size = ring.getAtomCount();
double radius = bondLength / (2 * Math.sin((Math.PI) / size));
return radius;
} | [
"public",
"double",
"getNativeRingRadius",
"(",
"IRing",
"ring",
",",
"double",
"bondLength",
")",
"{",
"int",
"size",
"=",
"ring",
".",
"getAtomCount",
"(",
")",
";",
"double",
"radius",
"=",
"bondLength",
"/",
"(",
"2",
"*",
"Math",
".",
"sin",
"(",
... | Returns the ring radius of a perfect polygons of size ring.getAtomCount()
The ring radius is the distance of each atom to the ringcenter.
@param ring The ring for which the radius is to calculated
@param bondLength The bond length for each bond in the ring
@return The radius of the ring. | [
"Returns",
"the",
"ring",
"radius",
"of",
"a",
"perfect",
"polygons",
"of",
"size",
"ring",
".",
"getAtomCount",
"()",
"The",
"ring",
"radius",
"is",
"the",
"distance",
"of",
"each",
"atom",
"to",
"the",
"ringcenter",
"."
] | train | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/RingPlacer.java#L686-L690 |
teatrove/teatrove | teaapps/src/main/java/org/teatrove/teaapps/contexts/HttpContext.java | HttpContext.doSecureGet | public String doSecureGet(String host, String path,
int port, Map<String, String> headers,
int timeout)
throws UnknownHostException, ConnectException, IOException {
return doHttpCall(host, path, null, port, headers, timeout, true);
... | java | public String doSecureGet(String host, String path,
int port, Map<String, String> headers,
int timeout)
throws UnknownHostException, ConnectException, IOException {
return doHttpCall(host, path, null, port, headers, timeout, true);
... | [
"public",
"String",
"doSecureGet",
"(",
"String",
"host",
",",
"String",
"path",
",",
"int",
"port",
",",
"Map",
"<",
"String",
",",
"String",
">",
"headers",
",",
"int",
"timeout",
")",
"throws",
"UnknownHostException",
",",
"ConnectException",
",",
"IOExce... | Perform a secure HTTPS GET at the given path returning the results of the
response.
@param host The hostname of the request
@param path The path of the request
@param port The port of the request
@param headers The headers to pass in the request
@param timeout The timeout of the request in milliseconds
@return The da... | [
"Perform",
"a",
"secure",
"HTTPS",
"GET",
"at",
"the",
"given",
"path",
"returning",
"the",
"results",
"of",
"the",
"response",
"."
] | train | https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/teaapps/src/main/java/org/teatrove/teaapps/contexts/HttpContext.java#L83-L89 |
jsurfer/JsonSurfer | jsurfer-core/src/main/java/org/jsfr/json/JsonSurfer.java | JsonSurfer.collectOne | public Object collectOne(String json, String... paths) {
return collectOne(json, compile(paths));
} | java | public Object collectOne(String json, String... paths) {
return collectOne(json, compile(paths));
} | [
"public",
"Object",
"collectOne",
"(",
"String",
"json",
",",
"String",
"...",
"paths",
")",
"{",
"return",
"collectOne",
"(",
"json",
",",
"compile",
"(",
"paths",
")",
")",
";",
"}"
] | Collect the first matched value and stop parsing immediately
@param json json
@param paths JsonPath
@return value | [
"Collect",
"the",
"first",
"matched",
"value",
"and",
"stop",
"parsing",
"immediately"
] | train | https://github.com/jsurfer/JsonSurfer/blob/52bd75a453338b86e115092803da140bf99cee62/jsurfer-core/src/main/java/org/jsfr/json/JsonSurfer.java#L388-L390 |
facebookarchive/hadoop-20 | src/contrib/raid/src/java/org/apache/hadoop/hdfs/server/namenode/BlockPlacementPolicyRaid.java | BlockPlacementPolicyRaid.getSourceFile | NameWithINode getSourceFile(String parity, String prefix) throws IOException {
if (isHarFile(parity)) {
return null;
}
// remove the prefix
String src = parity.substring(prefix.length());
byte[][] components = INodeDirectory.getPathComponents(src);
INode inode = namesystem.dir.getINode(com... | java | NameWithINode getSourceFile(String parity, String prefix) throws IOException {
if (isHarFile(parity)) {
return null;
}
// remove the prefix
String src = parity.substring(prefix.length());
byte[][] components = INodeDirectory.getPathComponents(src);
INode inode = namesystem.dir.getINode(com... | [
"NameWithINode",
"getSourceFile",
"(",
"String",
"parity",
",",
"String",
"prefix",
")",
"throws",
"IOException",
"{",
"if",
"(",
"isHarFile",
"(",
"parity",
")",
")",
"{",
"return",
"null",
";",
"}",
"// remove the prefix",
"String",
"src",
"=",
"parity",
"... | Get path for the corresponding source file for a valid parity
file. Returns null if it does not exists
@param parity the toUri path of the parity file
@return the toUri path of the source file | [
"Get",
"path",
"for",
"the",
"corresponding",
"source",
"file",
"for",
"a",
"valid",
"parity",
"file",
".",
"Returns",
"null",
"if",
"it",
"does",
"not",
"exists"
] | train | https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/raid/src/java/org/apache/hadoop/hdfs/server/namenode/BlockPlacementPolicyRaid.java#L774-L783 |
spring-projects/spring-boot | spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/TypeUtils.java | TypeUtils.getType | public String getType(TypeElement element, TypeMirror type) {
if (type == null) {
return null;
}
return type.accept(this.typeExtractor, createTypeDescriptor(element));
} | java | public String getType(TypeElement element, TypeMirror type) {
if (type == null) {
return null;
}
return type.accept(this.typeExtractor, createTypeDescriptor(element));
} | [
"public",
"String",
"getType",
"(",
"TypeElement",
"element",
",",
"TypeMirror",
"type",
")",
"{",
"if",
"(",
"type",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"return",
"type",
".",
"accept",
"(",
"this",
".",
"typeExtractor",
",",
"createType... | Return the type of the specified {@link TypeMirror} including all its generic
information.
@param element the {@link TypeElement} in which this {@code type} is declared
@param type the type to handle
@return a representation of the type including all its generic information | [
"Return",
"the",
"type",
"of",
"the",
"specified",
"{"
] | train | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/TypeUtils.java#L138-L143 |
UrielCh/ovh-java-sdk | ovh-java-sdk-dedicatedserver/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedserver.java | ApiOvhDedicatedserver.serviceName_secondaryDnsDomains_domain_PUT | public void serviceName_secondaryDnsDomains_domain_PUT(String serviceName, String domain, OvhSecondaryDNS body) throws IOException {
String qPath = "/dedicated/server/{serviceName}/secondaryDnsDomains/{domain}";
StringBuilder sb = path(qPath, serviceName, domain);
exec(qPath, "PUT", sb.toString(), body);
} | java | public void serviceName_secondaryDnsDomains_domain_PUT(String serviceName, String domain, OvhSecondaryDNS body) throws IOException {
String qPath = "/dedicated/server/{serviceName}/secondaryDnsDomains/{domain}";
StringBuilder sb = path(qPath, serviceName, domain);
exec(qPath, "PUT", sb.toString(), body);
} | [
"public",
"void",
"serviceName_secondaryDnsDomains_domain_PUT",
"(",
"String",
"serviceName",
",",
"String",
"domain",
",",
"OvhSecondaryDNS",
"body",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/dedicated/server/{serviceName}/secondaryDnsDomains/{domain}\"",
... | Alter this object properties
REST: PUT /dedicated/server/{serviceName}/secondaryDnsDomains/{domain}
@param body [required] New object properties
@param serviceName [required] The internal name of your dedicated server
@param domain [required] domain on slave server | [
"Alter",
"this",
"object",
"properties"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dedicatedserver/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedserver.java#L1963-L1967 |
infinispan/infinispan | core/src/main/java/org/infinispan/persistence/support/SingletonCacheWriter.java | SingletonCacheWriter.pushState | protected void pushState(final Cache<?, ?> cache) throws Exception {
DataContainer<?, ?> dc = cache.getAdvancedCache().getDataContainer();
dc.forEach(entry -> {
MarshallableEntry me = ctx.getMarshallableEntryFactory().create(entry.getKey(), entry.getValue(), entry.getMetadata(),
entr... | java | protected void pushState(final Cache<?, ?> cache) throws Exception {
DataContainer<?, ?> dc = cache.getAdvancedCache().getDataContainer();
dc.forEach(entry -> {
MarshallableEntry me = ctx.getMarshallableEntryFactory().create(entry.getKey(), entry.getValue(), entry.getMetadata(),
entr... | [
"protected",
"void",
"pushState",
"(",
"final",
"Cache",
"<",
"?",
",",
"?",
">",
"cache",
")",
"throws",
"Exception",
"{",
"DataContainer",
"<",
"?",
",",
"?",
">",
"dc",
"=",
"cache",
".",
"getAdvancedCache",
"(",
")",
".",
"getDataContainer",
"(",
"... | Pushes the state of a specific cache by reading the cache's data and putting in the cache store. | [
"Pushes",
"the",
"state",
"of",
"a",
"specific",
"cache",
"by",
"reading",
"the",
"cache",
"s",
"data",
"and",
"putting",
"in",
"the",
"cache",
"store",
"."
] | train | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/persistence/support/SingletonCacheWriter.java#L141-L148 |
cryptomator/siv-mode | src/main/java/org/cryptomator/siv/SivMode.java | SivMode.s2v | byte[] s2v(byte[] macKey, byte[] plaintext, byte[]... associatedData) {
// Maximum permitted AD length is the block size in bits - 2
if (associatedData.length > 126) {
// SIV mode cannot be used safely with this many AD fields
throw new IllegalArgumentException("too many Associated Data fields");
}
final... | java | byte[] s2v(byte[] macKey, byte[] plaintext, byte[]... associatedData) {
// Maximum permitted AD length is the block size in bits - 2
if (associatedData.length > 126) {
// SIV mode cannot be used safely with this many AD fields
throw new IllegalArgumentException("too many Associated Data fields");
}
final... | [
"byte",
"[",
"]",
"s2v",
"(",
"byte",
"[",
"]",
"macKey",
",",
"byte",
"[",
"]",
"plaintext",
",",
"byte",
"[",
"]",
"...",
"associatedData",
")",
"{",
"// Maximum permitted AD length is the block size in bits - 2",
"if",
"(",
"associatedData",
".",
"length",
... | Visible for testing, throws IllegalArgumentException if key is not accepted by CMac#init(CipherParameters) | [
"Visible",
"for",
"testing",
"throws",
"IllegalArgumentException",
"if",
"key",
"is",
"not",
"accepted",
"by",
"CMac#init",
"(",
"CipherParameters",
")"
] | train | https://github.com/cryptomator/siv-mode/blob/aa21286cc5a840c42ec3bf6d4c945ab6acaad568/src/main/java/org/cryptomator/siv/SivMode.java#L224-L249 |
dita-ot/dita-ot | src/main/java/org/dita/dost/util/StringUtils.java | StringUtils.restoreSet | public static Set<String> restoreSet(final String s, final String delim) {
final Set<String> copytoSet = new HashSet<>();
if (StringUtils.isEmptyString(s)) {
return copytoSet;
}
final StringTokenizer st = new StringTokenizer(s, delim);
while (st.hasMoreTokens()) {
... | java | public static Set<String> restoreSet(final String s, final String delim) {
final Set<String> copytoSet = new HashSet<>();
if (StringUtils.isEmptyString(s)) {
return copytoSet;
}
final StringTokenizer st = new StringTokenizer(s, delim);
while (st.hasMoreTokens()) {
... | [
"public",
"static",
"Set",
"<",
"String",
">",
"restoreSet",
"(",
"final",
"String",
"s",
",",
"final",
"String",
"delim",
")",
"{",
"final",
"Set",
"<",
"String",
">",
"copytoSet",
"=",
"new",
"HashSet",
"<>",
"(",
")",
";",
"if",
"(",
"StringUtils",
... | Break down a string separated by <code>delim</code> into a string set.
@param s String to be splitted
@param delim Delimiter to be used.
@return string set | [
"Break",
"down",
"a",
"string",
"separated",
"by",
"<code",
">",
"delim<",
"/",
"code",
">",
"into",
"a",
"string",
"set",
"."
] | train | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/util/StringUtils.java#L144-L160 |
jenkinsci/jenkins | core/src/main/java/jenkins/security/UserDetailsCache.java | UserDetailsCache.loadUserByUsername | @Nonnull
public UserDetails loadUserByUsername(String idOrFullName) throws UsernameNotFoundException, DataAccessException, ExecutionException {
Boolean exists = existenceCache.getIfPresent(idOrFullName);
if(exists != null && !exists) {
throw new UsernameNotFoundException(String.format("\... | java | @Nonnull
public UserDetails loadUserByUsername(String idOrFullName) throws UsernameNotFoundException, DataAccessException, ExecutionException {
Boolean exists = existenceCache.getIfPresent(idOrFullName);
if(exists != null && !exists) {
throw new UsernameNotFoundException(String.format("\... | [
"@",
"Nonnull",
"public",
"UserDetails",
"loadUserByUsername",
"(",
"String",
"idOrFullName",
")",
"throws",
"UsernameNotFoundException",
",",
"DataAccessException",
",",
"ExecutionException",
"{",
"Boolean",
"exists",
"=",
"existenceCache",
".",
"getIfPresent",
"(",
"i... | Locates the user based on the username, by first looking in the cache and then delegate to
{@link hudson.security.SecurityRealm#loadUserByUsername(String)}.
@param idOrFullName the username
@return the details
@throws UsernameNotFoundException (normally a {@link hudson.security.UserMayOrMayNotExistException})
if the ... | [
"Locates",
"the",
"user",
"based",
"on",
"the",
"username",
"by",
"first",
"looking",
"in",
"the",
"cache",
"and",
"then",
"delegate",
"to",
"{",
"@link",
"hudson",
".",
"security",
".",
"SecurityRealm#loadUserByUsername",
"(",
"String",
")",
"}",
"."
] | train | https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/jenkins/security/UserDetailsCache.java#L120-L138 |
networknt/light-4j | utility/src/main/java/com/networknt/utility/DateUtil.java | DateUtil.parseIso8601Date | public static Instant parseIso8601Date(String dateString) {
// For EC2 Spot Fleet.
if (dateString.endsWith("+0000")) {
dateString = dateString
.substring(0, dateString.length() - 5)
.concat("Z");
}
try {
return parseInstant... | java | public static Instant parseIso8601Date(String dateString) {
// For EC2 Spot Fleet.
if (dateString.endsWith("+0000")) {
dateString = dateString
.substring(0, dateString.length() - 5)
.concat("Z");
}
try {
return parseInstant... | [
"public",
"static",
"Instant",
"parseIso8601Date",
"(",
"String",
"dateString",
")",
"{",
"// For EC2 Spot Fleet.",
"if",
"(",
"dateString",
".",
"endsWith",
"(",
"\"+0000\"",
")",
")",
"{",
"dateString",
"=",
"dateString",
".",
"substring",
"(",
"0",
",",
"da... | Parses the specified date string as an ISO 8601 date (yyyy-MM-dd'T'HH:mm:ss.SSSZZ)
and returns the {@link Instant} object.
@param dateString
The date string to parse.
@return The parsed Instant object. | [
"Parses",
"the",
"specified",
"date",
"string",
"as",
"an",
"ISO",
"8601",
"date",
"(",
"yyyy",
"-",
"MM",
"-",
"dd",
"T",
"HH",
":",
"mm",
":",
"ss",
".",
"SSSZZ",
")",
"and",
"returns",
"the",
"{",
"@link",
"Instant",
"}",
"object",
"."
] | train | https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/utility/src/main/java/com/networknt/utility/DateUtil.java#L56-L69 |
GeoLatte/geolatte-common | src/main/java/org/geolatte/common/dataformats/json/to/GeoJsonTo.java | GeoJsonTo.mergeInto | private static void mergeInto(double[] first, double[] second) {
for (int j = 0; j < first.length / 2; j++) {
first[j] = Math.min(first[j], second[j]);
first[j + first.length / 2] = Math.max(first[j + first.length / 2], second[j + first.length / 2]);
}
} | java | private static void mergeInto(double[] first, double[] second) {
for (int j = 0; j < first.length / 2; j++) {
first[j] = Math.min(first[j], second[j]);
first[j + first.length / 2] = Math.max(first[j + first.length / 2], second[j + first.length / 2]);
}
} | [
"private",
"static",
"void",
"mergeInto",
"(",
"double",
"[",
"]",
"first",
",",
"double",
"[",
"]",
"second",
")",
"{",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"first",
".",
"length",
"/",
"2",
";",
"j",
"++",
")",
"{",
"first",
"[",
... | Merges the second boundingbox into the first. Basically, this extends the first boundingbox to also
encapsulate the second
@param first the first boundingbox
@param second the second boundingbox | [
"Merges",
"the",
"second",
"boundingbox",
"into",
"the",
"first",
".",
"Basically",
"this",
"extends",
"the",
"first",
"boundingbox",
"to",
"also",
"encapsulate",
"the",
"second"
] | train | https://github.com/GeoLatte/geolatte-common/blob/dc7f92b04d8c6cb706e78cb95e746d8f12089d95/src/main/java/org/geolatte/common/dataformats/json/to/GeoJsonTo.java#L242-L247 |
w3c/epubcheck | src/main/java/com/adobe/epubcheck/vocab/VocabUtil.java | VocabUtil.parsePrefixDeclaration | public static Map<String, Vocab> parsePrefixDeclaration(String value,
Map<String, ? extends Vocab> predefined, Map<String, ? extends Vocab> known,
Set<String> forbidden, Report report, EPUBLocation location)
{
Map<String, Vocab> vocabs = Maps.newHashMap(predefined);
Map<String, String> mappings = ... | java | public static Map<String, Vocab> parsePrefixDeclaration(String value,
Map<String, ? extends Vocab> predefined, Map<String, ? extends Vocab> known,
Set<String> forbidden, Report report, EPUBLocation location)
{
Map<String, Vocab> vocabs = Maps.newHashMap(predefined);
Map<String, String> mappings = ... | [
"public",
"static",
"Map",
"<",
"String",
",",
"Vocab",
">",
"parsePrefixDeclaration",
"(",
"String",
"value",
",",
"Map",
"<",
"String",
",",
"?",
"extends",
"Vocab",
">",
"predefined",
",",
"Map",
"<",
"String",
",",
"?",
"extends",
"Vocab",
">",
"know... | Parses a prefix attribute value and returns a map of prefixes to
vocabularies, given a pre-existing set of reserved prefixes, known
vocabularies, and default vocabularies that cannot be re-declared.
@param value
the prefix declaration to parse.
@param predefined
a map of reserved prefixes to associated vocabularies.
@... | [
"Parses",
"a",
"prefix",
"attribute",
"value",
"and",
"returns",
"a",
"map",
"of",
"prefixes",
"to",
"vocabularies",
"given",
"a",
"pre",
"-",
"existing",
"set",
"of",
"reserved",
"prefixes",
"known",
"vocabularies",
"and",
"default",
"vocabularies",
"that",
"... | train | https://github.com/w3c/epubcheck/blob/4d5a24d9f2878a2a5497eb11c036cc18fe2c0a78/src/main/java/com/adobe/epubcheck/vocab/VocabUtil.java#L174-L208 |
JodaOrg/joda-beans | src/main/java/org/joda/beans/ser/JodaBeanSer.java | JodaBeanSer.withShortTypes | public JodaBeanSer withShortTypes(boolean shortTypes) {
return new JodaBeanSer(indent, newLine, converter, iteratorFactory, shortTypes, deserializers, includeDerived);
} | java | public JodaBeanSer withShortTypes(boolean shortTypes) {
return new JodaBeanSer(indent, newLine, converter, iteratorFactory, shortTypes, deserializers, includeDerived);
} | [
"public",
"JodaBeanSer",
"withShortTypes",
"(",
"boolean",
"shortTypes",
")",
"{",
"return",
"new",
"JodaBeanSer",
"(",
"indent",
",",
"newLine",
",",
"converter",
",",
"iteratorFactory",
",",
"shortTypes",
",",
"deserializers",
",",
"includeDerived",
")",
";",
... | Returns a copy of this serializer with the short types flag set.
@param shortTypes whether to use short types, not null
@return a copy of this object with the short types flag changed, not null | [
"Returns",
"a",
"copy",
"of",
"this",
"serializer",
"with",
"the",
"short",
"types",
"flag",
"set",
"."
] | train | https://github.com/JodaOrg/joda-beans/blob/f07dbe42947150b23a173f35984c6ab33c5529bf/src/main/java/org/joda/beans/ser/JodaBeanSer.java#L201-L203 |
OpenTSDB/opentsdb | src/tsd/GraphHandler.java | GraphHandler.runGnuplot | static int runGnuplot(final HttpQuery query,
final String basepath,
final Plot plot) throws IOException {
final int nplotted = plot.dumpToFiles(basepath);
final long start_time = System.nanoTime();
final Process gnuplot = new ProcessBuilder(GNUPLOT,
base... | java | static int runGnuplot(final HttpQuery query,
final String basepath,
final Plot plot) throws IOException {
final int nplotted = plot.dumpToFiles(basepath);
final long start_time = System.nanoTime();
final Process gnuplot = new ProcessBuilder(GNUPLOT,
base... | [
"static",
"int",
"runGnuplot",
"(",
"final",
"HttpQuery",
"query",
",",
"final",
"String",
"basepath",
",",
"final",
"Plot",
"plot",
")",
"throws",
"IOException",
"{",
"final",
"int",
"nplotted",
"=",
"plot",
".",
"dumpToFiles",
"(",
"basepath",
")",
";",
... | Runs Gnuplot in a subprocess to generate the graph.
<strong>This function will block</strong> while Gnuplot is running.
@param query The query being handled (for logging purposes).
@param basepath The base path used for the Gnuplot files.
@param plot The plot object to generate Gnuplot's input files.
@return The number... | [
"Runs",
"Gnuplot",
"in",
"a",
"subprocess",
"to",
"generate",
"the",
"graph",
".",
"<strong",
">",
"This",
"function",
"will",
"block<",
"/",
"strong",
">",
"while",
"Gnuplot",
"is",
"running",
"."
] | train | https://github.com/OpenTSDB/opentsdb/blob/3fc2d491c3c1ad397252c0a80203a69a3f9e3ef3/src/tsd/GraphHandler.java#L780-L818 |
ops4j/org.ops4j.pax.logging | pax-logging-api/src/main/java/org/apache/logging/log4j/util/EnglishEnums.java | EnglishEnums.valueOf | public static <T extends Enum<T>> T valueOf(final Class<T> enumType, final String name, final T defaultValue) {
return name == null ? defaultValue : Enum.valueOf(enumType, name.toUpperCase(Locale.ENGLISH));
} | java | public static <T extends Enum<T>> T valueOf(final Class<T> enumType, final String name, final T defaultValue) {
return name == null ? defaultValue : Enum.valueOf(enumType, name.toUpperCase(Locale.ENGLISH));
} | [
"public",
"static",
"<",
"T",
"extends",
"Enum",
"<",
"T",
">",
">",
"T",
"valueOf",
"(",
"final",
"Class",
"<",
"T",
">",
"enumType",
",",
"final",
"String",
"name",
",",
"final",
"T",
"defaultValue",
")",
"{",
"return",
"name",
"==",
"null",
"?",
... | Returns an enum value for the given string.
<p>
The {@code name} is converted internally to upper case with the {@linkplain Locale#ENGLISH ENGLISH} locale to
avoid problems on the Turkish locale. Do not use with Turkish enum values.
</p>
@param name The enum name, case-insensitive. If null, returns {@code defaultValue... | [
"Returns",
"an",
"enum",
"value",
"for",
"the",
"given",
"string",
".",
"<p",
">",
"The",
"{",
"@code",
"name",
"}",
"is",
"converted",
"internally",
"to",
"upper",
"case",
"with",
"the",
"{",
"@linkplain",
"Locale#ENGLISH",
"ENGLISH",
"}",
"locale",
"to",... | train | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/util/EnglishEnums.java#L66-L68 |
hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/spi/discovery/AbstractDiscoveryStrategy.java | AbstractDiscoveryStrategy.getOrNull | protected <T extends Comparable> T getOrNull(String prefix, PropertyDefinition property) {
return getOrDefault(prefix, property, null);
} | java | protected <T extends Comparable> T getOrNull(String prefix, PropertyDefinition property) {
return getOrDefault(prefix, property, null);
} | [
"protected",
"<",
"T",
"extends",
"Comparable",
">",
"T",
"getOrNull",
"(",
"String",
"prefix",
",",
"PropertyDefinition",
"property",
")",
"{",
"return",
"getOrDefault",
"(",
"prefix",
",",
"property",
",",
"null",
")",
";",
"}"
] | Returns the value of the requested {@link PropertyDefinition} if available in the
declarative or programmatic configuration (XML or Config API), can be found in the
system's environment, or passed as a JVM property. Otherwise it will return <tt>null</tt>.
<p/>
This overload will resolve the requested property in the fo... | [
"Returns",
"the",
"value",
"of",
"the",
"requested",
"{",
"@link",
"PropertyDefinition",
"}",
"if",
"available",
"in",
"the",
"declarative",
"or",
"programmatic",
"configuration",
"(",
"XML",
"or",
"Config",
"API",
")",
"can",
"be",
"found",
"in",
"the",
"sy... | train | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/spi/discovery/AbstractDiscoveryStrategy.java#L124-L126 |
moparisthebest/beehive | beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/FlowController.java | FlowController.addActionErrorExpression | protected void addActionErrorExpression( String propertyName, String expression, Object[] messageArgs )
{
PageFlowUtils.addActionErrorExpression( getRequest(), propertyName, expression, messageArgs );
} | java | protected void addActionErrorExpression( String propertyName, String expression, Object[] messageArgs )
{
PageFlowUtils.addActionErrorExpression( getRequest(), propertyName, expression, messageArgs );
} | [
"protected",
"void",
"addActionErrorExpression",
"(",
"String",
"propertyName",
",",
"String",
"expression",
",",
"Object",
"[",
"]",
"messageArgs",
")",
"{",
"PageFlowUtils",
".",
"addActionErrorExpression",
"(",
"getRequest",
"(",
")",
",",
"propertyName",
",",
... | Add a property-related message as an expression that will be evaluated and shown with the Errors and Error tags.
@param propertyName the name of the property with which to associate this error.
@param expression the expression that will be evaluated to generate the error message.
@param messageArgs zero or more argume... | [
"Add",
"a",
"property",
"-",
"related",
"message",
"as",
"an",
"expression",
"that",
"will",
"be",
"evaluated",
"and",
"shown",
"with",
"the",
"Errors",
"and",
"Error",
"tags",
"."
] | train | https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/FlowController.java#L1483-L1486 |
agmip/translator-dssat | src/main/java/org/agmip/translators/dssat/DssatXFileOutput.java | DssatXFileOutput.translateTo2BitCrid | private String translateTo2BitCrid(Map cuData, String id, String defVal) {
String crid = getValueOr(cuData, id, "");
if (!crid.equals("")) {
return DssatCRIDHelper.get2BitCrid(crid);
} else {
return defVal;
}
} | java | private String translateTo2BitCrid(Map cuData, String id, String defVal) {
String crid = getValueOr(cuData, id, "");
if (!crid.equals("")) {
return DssatCRIDHelper.get2BitCrid(crid);
} else {
return defVal;
}
} | [
"private",
"String",
"translateTo2BitCrid",
"(",
"Map",
"cuData",
",",
"String",
"id",
",",
"String",
"defVal",
")",
"{",
"String",
"crid",
"=",
"getValueOr",
"(",
"cuData",
",",
"id",
",",
"\"\"",
")",
";",
"if",
"(",
"!",
"crid",
".",
"equals",
"(",
... | Try to translate 3-bit CRID to 2-bit version stored in the map
@param cuData the cultivar data record
@param id the field id for contain crop id info
@param defVal the default value when id is not available
@return 2-bit crop ID | [
"Try",
"to",
"translate",
"3",
"-",
"bit",
"CRID",
"to",
"2",
"-",
"bit",
"version",
"stored",
"in",
"the",
"map"
] | train | https://github.com/agmip/translator-dssat/blob/4be61d998f106eb7234ea8701b63c3746ae688f4/src/main/java/org/agmip/translators/dssat/DssatXFileOutput.java#L1565-L1572 |
google/closure-compiler | src/com/google/javascript/refactoring/Matchers.java | Matchers.isPrivate | public static Matcher isPrivate() {
return new Matcher() {
@Override public boolean matches(Node node, NodeMetadata metadata) {
JSDocInfo jsDoc = NodeUtil.getBestJSDocInfo(node);
if (jsDoc != null) {
return jsDoc.getVisibility() == Visibility.PRIVATE;
}
return false;
... | java | public static Matcher isPrivate() {
return new Matcher() {
@Override public boolean matches(Node node, NodeMetadata metadata) {
JSDocInfo jsDoc = NodeUtil.getBestJSDocInfo(node);
if (jsDoc != null) {
return jsDoc.getVisibility() == Visibility.PRIVATE;
}
return false;
... | [
"public",
"static",
"Matcher",
"isPrivate",
"(",
")",
"{",
"return",
"new",
"Matcher",
"(",
")",
"{",
"@",
"Override",
"public",
"boolean",
"matches",
"(",
"Node",
"node",
",",
"NodeMetadata",
"metadata",
")",
"{",
"JSDocInfo",
"jsDoc",
"=",
"NodeUtil",
".... | Returns a Matcher that matches against nodes that are declared {@code @private}. | [
"Returns",
"a",
"Matcher",
"that",
"matches",
"against",
"nodes",
"that",
"are",
"declared",
"{"
] | train | https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/refactoring/Matchers.java#L392-L402 |
salesforce/Argus | ArgusWebServices/src/main/java/com/salesforce/dva/argus/ws/resources/AlertResources.java | AlertResources.deleteTriggersById | @DELETE
@Produces(MediaType.APPLICATION_JSON)
@Path("/{alertId}/triggers/{triggerId}")
@Description("Deletes a trigger having the given ID and removes any associations with the alert or notifications.")
public Response deleteTriggersById(@Context HttpServletRequest req,
@PathParam("alertId") BigInteger alertId,
... | java | @DELETE
@Produces(MediaType.APPLICATION_JSON)
@Path("/{alertId}/triggers/{triggerId}")
@Description("Deletes a trigger having the given ID and removes any associations with the alert or notifications.")
public Response deleteTriggersById(@Context HttpServletRequest req,
@PathParam("alertId") BigInteger alertId,
... | [
"@",
"DELETE",
"@",
"Produces",
"(",
"MediaType",
".",
"APPLICATION_JSON",
")",
"@",
"Path",
"(",
"\"/{alertId}/triggers/{triggerId}\"",
")",
"@",
"Description",
"(",
"\"Deletes a trigger having the given ID and removes any associations with the alert or notifications.\"",
")",
... | Deletes a trigger from alert.
@param req The HttpServlet request object. Cannot be null.
@param alertId The alert Id. Cannot be null.
@param triggerId The trigger Id. Cannot be null.
@return Updated alert object.
@throws WebApplicationException The exception with 404 status will be thrown if an a... | [
"Deletes",
"a",
"trigger",
"from",
"alert",
"."
] | train | https://github.com/salesforce/Argus/blob/121b59a268da264316cded6a3e9271366a23cd86/ArgusWebServices/src/main/java/com/salesforce/dva/argus/ws/resources/AlertResources.java#L1251-L1286 |
leonchen83/redis-replicator | src/main/java/com/moilioncircle/redis/replicator/rdb/BaseRdbParser.java | BaseRdbParser.rdbLoadLen | public Len rdbLoadLen() throws IOException {
boolean isencoded = false;
int rawByte = in.read();
int type = (rawByte & 0xC0) >> 6;
long value;
if (type == RDB_ENCVAL) {
isencoded = true;
value = rawByte & 0x3F;
} else if (type == RDB_6BITLEN) {
... | java | public Len rdbLoadLen() throws IOException {
boolean isencoded = false;
int rawByte = in.read();
int type = (rawByte & 0xC0) >> 6;
long value;
if (type == RDB_ENCVAL) {
isencoded = true;
value = rawByte & 0x3F;
} else if (type == RDB_6BITLEN) {
... | [
"public",
"Len",
"rdbLoadLen",
"(",
")",
"throws",
"IOException",
"{",
"boolean",
"isencoded",
"=",
"false",
";",
"int",
"rawByte",
"=",
"in",
".",
"read",
"(",
")",
";",
"int",
"type",
"=",
"(",
"rawByte",
"&",
"0xC0",
")",
">>",
"6",
";",
"long",
... | read bytes 1 or 2 or 5
<p>
1. |00xxxxxx| remaining 6 bits represent the length
<p>
2. |01xxxxxx|xxxxxxxx| the combined 14 bits represent the length
<p>
3. |10xxxxxx|xxxxxxxx|xxxxxxxx|xxxxxxxx|xxxxxxxx| the remaining 6 bits are discarded.Additional 4 bytes represent the length(big endian in version6)
<p>
4. |11xxxxxx| t... | [
"read",
"bytes",
"1",
"or",
"2",
"or",
"5",
"<p",
">",
"1",
".",
"|00xxxxxx|",
"remaining",
"6",
"bits",
"represent",
"the",
"length",
"<p",
">",
"2",
".",
"|01xxxxxx|xxxxxxxx|",
"the",
"combined",
"14",
"bits",
"represent",
"the",
"length",
"<p",
">",
... | train | https://github.com/leonchen83/redis-replicator/blob/645aac2de1452e26c0f8f9d01d60edb45bba38c9/src/main/java/com/moilioncircle/redis/replicator/rdb/BaseRdbParser.java#L92-L112 |
dustin/java-memcached-client | src/main/java/net/spy/memcached/MemcachedClient.java | MemcachedClient.getAndTouch | @Override
public CASValue<Object> getAndTouch(String key, int exp) {
return getAndTouch(key, exp, transcoder);
} | java | @Override
public CASValue<Object> getAndTouch(String key, int exp) {
return getAndTouch(key, exp, transcoder);
} | [
"@",
"Override",
"public",
"CASValue",
"<",
"Object",
">",
"getAndTouch",
"(",
"String",
"key",
",",
"int",
"exp",
")",
"{",
"return",
"getAndTouch",
"(",
"key",
",",
"exp",
",",
"transcoder",
")",
";",
"}"
] | Get a single key and reset its expiration using the default transcoder.
@param key the key to get
@param exp the new expiration for the key
@return the result from the cache and CAS id (null if there is none)
@throws OperationTimeoutException if the global operation timeout is
exceeded
@throws IllegalStateException in... | [
"Get",
"a",
"single",
"key",
"and",
"reset",
"its",
"expiration",
"using",
"the",
"default",
"transcoder",
"."
] | train | https://github.com/dustin/java-memcached-client/blob/c232307ad8e0c7ccc926e495dd7d5aad2d713318/src/main/java/net/spy/memcached/MemcachedClient.java#L1193-L1196 |
skuzzle/semantic-version | src/main/java/de/skuzzle/semantic/Version.java | Version.nextMinor | public Version nextMinor(String newPrelease) {
require(newPrelease != null, "newPreRelease is null");
final String[] preReleaseParts = parsePreRelease(newPrelease);
return new Version(this.major, this.minor + 1, 0, preReleaseParts, EMPTY_ARRAY);
} | java | public Version nextMinor(String newPrelease) {
require(newPrelease != null, "newPreRelease is null");
final String[] preReleaseParts = parsePreRelease(newPrelease);
return new Version(this.major, this.minor + 1, 0, preReleaseParts, EMPTY_ARRAY);
} | [
"public",
"Version",
"nextMinor",
"(",
"String",
"newPrelease",
")",
"{",
"require",
"(",
"newPrelease",
"!=",
"null",
",",
"\"newPreRelease is null\"",
")",
";",
"final",
"String",
"[",
"]",
"preReleaseParts",
"=",
"parsePreRelease",
"(",
"newPrelease",
")",
";... | Given this version, returns the next minor version. That is, the major part remains
the same and the minor version is incremented. The pre-release part will be set to
the given identifier and the build-meta-data is dropped.
@param newPrelease The pre-release part for the resulting Version.
@return The incremented vers... | [
"Given",
"this",
"version",
"returns",
"the",
"next",
"minor",
"version",
".",
"That",
"is",
"the",
"major",
"part",
"remains",
"the",
"same",
"and",
"the",
"minor",
"version",
"is",
"incremented",
".",
"The",
"pre",
"-",
"release",
"part",
"will",
"be",
... | train | https://github.com/skuzzle/semantic-version/blob/2ddb66fb80244cd7f67c77ed5f8072d1132ad933/src/main/java/de/skuzzle/semantic/Version.java#L770-L774 |
OpenLiberty/open-liberty | dev/com.ibm.ws.security.openidconnect.clients.common/src/com/ibm/ws/security/openidconnect/clients/common/OidcClientUtil.java | OidcClientUtil.createCookie | public static Cookie createCookie(String cookieName, @Sensitive String cookieValue, HttpServletRequest req) {
return createCookie(cookieName, cookieValue, -1, req);
} | java | public static Cookie createCookie(String cookieName, @Sensitive String cookieValue, HttpServletRequest req) {
return createCookie(cookieName, cookieValue, -1, req);
} | [
"public",
"static",
"Cookie",
"createCookie",
"(",
"String",
"cookieName",
",",
"@",
"Sensitive",
"String",
"cookieValue",
",",
"HttpServletRequest",
"req",
")",
"{",
"return",
"createCookie",
"(",
"cookieName",
",",
"cookieValue",
",",
"-",
"1",
",",
"req",
"... | /*
In case, the ReferrerURLCookieHandler is dynamic in every request, then we will need to make this into
OidcClientRequest. And do not do static. | [
"/",
"*",
"In",
"case",
"the",
"ReferrerURLCookieHandler",
"is",
"dynamic",
"in",
"every",
"request",
"then",
"we",
"will",
"need",
"to",
"make",
"this",
"into",
"OidcClientRequest",
".",
"And",
"do",
"not",
"do",
"static",
"."
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.openidconnect.clients.common/src/com/ibm/ws/security/openidconnect/clients/common/OidcClientUtil.java#L286-L288 |
samskivert/samskivert | src/main/java/com/samskivert/servlet/util/ParameterUtil.java | ParameterUtil.requireIntParameter | public static int requireIntParameter (HttpServletRequest req, String name, int low, int high,
String invalidDataMessage)
throws DataValidationException
{
return requireIntParameter(
req, name, invalidDataMessage, new IntRangeValidator(low, high... | java | public static int requireIntParameter (HttpServletRequest req, String name, int low, int high,
String invalidDataMessage)
throws DataValidationException
{
return requireIntParameter(
req, name, invalidDataMessage, new IntRangeValidator(low, high... | [
"public",
"static",
"int",
"requireIntParameter",
"(",
"HttpServletRequest",
"req",
",",
"String",
"name",
",",
"int",
"low",
",",
"int",
"high",
",",
"String",
"invalidDataMessage",
")",
"throws",
"DataValidationException",
"{",
"return",
"requireIntParameter",
"("... | Fetches the supplied parameter from the request and converts it to an integer. If the
parameter does not exist or is not a well-formed integer, a data validation exception is
thrown with the supplied message. | [
"Fetches",
"the",
"supplied",
"parameter",
"from",
"the",
"request",
"and",
"converts",
"it",
"to",
"an",
"integer",
".",
"If",
"the",
"parameter",
"does",
"not",
"exist",
"or",
"is",
"not",
"a",
"well",
"-",
"formed",
"integer",
"a",
"data",
"validation",... | train | https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/servlet/util/ParameterUtil.java#L112-L118 |
codeprimate-software/cp-elements | src/main/java/org/cp/elements/lang/reflect/MethodInvocation.java | MethodInvocation.newMethodInvocation | public static MethodInvocation newMethodInvocation(Object target, Method method, Object... args) {
return new MethodInvocation(target, method, args);
} | java | public static MethodInvocation newMethodInvocation(Object target, Method method, Object... args) {
return new MethodInvocation(target, method, args);
} | [
"public",
"static",
"MethodInvocation",
"newMethodInvocation",
"(",
"Object",
"target",
",",
"Method",
"method",
",",
"Object",
"...",
"args",
")",
"{",
"return",
"new",
"MethodInvocation",
"(",
"target",
",",
"method",
",",
"args",
")",
";",
"}"
] | Factory method used to construct a new instance of {@link MethodInvocation} initialized with
the given target {@link Object}, instance {@link Method} and array of {@link Object arguments}
passed to the {@link Method} during invocation.
The {@link Method} represents a {@link java.lang.reflect.Modifier#STATIC non-static... | [
"Factory",
"method",
"used",
"to",
"construct",
"a",
"new",
"instance",
"of",
"{",
"@link",
"MethodInvocation",
"}",
"initialized",
"with",
"the",
"given",
"target",
"{",
"@link",
"Object",
"}",
"instance",
"{",
"@link",
"Method",
"}",
"and",
"array",
"of",
... | train | https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/lang/reflect/MethodInvocation.java#L78-L80 |
bwkimmel/java-util | src/main/java/ca/eandb/util/io/FileUtil.java | FileUtil.setFileContents | public static void setFileContents(File file, ByteBuffer contents) throws IOException {
setFileContents(file, contents, false);
} | java | public static void setFileContents(File file, ByteBuffer contents) throws IOException {
setFileContents(file, contents, false);
} | [
"public",
"static",
"void",
"setFileContents",
"(",
"File",
"file",
",",
"ByteBuffer",
"contents",
")",
"throws",
"IOException",
"{",
"setFileContents",
"(",
"file",
",",
"contents",
",",
"false",
")",
";",
"}"
] | Writes the specified byte array to a file.
@param file The <code>File</code> to write.
@param contents The byte array to write to the file.
@throws IOException If the file could not be written. | [
"Writes",
"the",
"specified",
"byte",
"array",
"to",
"a",
"file",
"."
] | train | https://github.com/bwkimmel/java-util/blob/0c03664d42f0e6b111f64447f222aa73c2819e5c/src/main/java/ca/eandb/util/io/FileUtil.java#L129-L131 |
google/error-prone-javac | src/java.compiler/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor6.java | AbstractAnnotationValueVisitor6.visitUnknown | @Override
public R visitUnknown(AnnotationValue av, P p) {
throw new UnknownAnnotationValueException(av, p);
} | java | @Override
public R visitUnknown(AnnotationValue av, P p) {
throw new UnknownAnnotationValueException(av, p);
} | [
"@",
"Override",
"public",
"R",
"visitUnknown",
"(",
"AnnotationValue",
"av",
",",
"P",
"p",
")",
"{",
"throw",
"new",
"UnknownAnnotationValueException",
"(",
"av",
",",
"p",
")",
";",
"}"
] | {@inheritDoc}
@implSpec The default implementation of this method in {@code
AbstractAnnotationValueVisitor6} will always throw {@code
new UnknownAnnotationValueException(av, p)}. This behavior is not
required of a subclass.
@param av {@inheritDoc}
@param p {@inheritDoc} | [
"{",
"@inheritDoc",
"}"
] | train | https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/java.compiler/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor6.java#L115-L118 |
alkacon/opencms-core | src/org/opencms/workplace/tools/CmsToolManager.java | CmsToolManager.generateNavBar | public String generateNavBar(String toolPath, CmsWorkplace wp) {
if (toolPath.equals(getBaseToolPath(wp))) {
return "<div class='pathbar'> </div>\n";
}
CmsTool adminTool = resolveAdminTool(getCurrentRoot(wp).getKey(), toolPath);
String html = A_CmsHtmlIconButton.default... | java | public String generateNavBar(String toolPath, CmsWorkplace wp) {
if (toolPath.equals(getBaseToolPath(wp))) {
return "<div class='pathbar'> </div>\n";
}
CmsTool adminTool = resolveAdminTool(getCurrentRoot(wp).getKey(), toolPath);
String html = A_CmsHtmlIconButton.default... | [
"public",
"String",
"generateNavBar",
"(",
"String",
"toolPath",
",",
"CmsWorkplace",
"wp",
")",
"{",
"if",
"(",
"toolPath",
".",
"equals",
"(",
"getBaseToolPath",
"(",
"wp",
")",
")",
")",
"{",
"return",
"\"<div class='pathbar'> </div>\\n\"",
";",
"}",
"... | Returns the navigation bar html code for the given tool path.<p>
@param toolPath the path
@param wp the jsp page
@return the html code | [
"Returns",
"the",
"navigation",
"bar",
"html",
"code",
"for",
"the",
"given",
"tool",
"path",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/workplace/tools/CmsToolManager.java#L218-L259 |
OpenLiberty/open-liberty | dev/com.ibm.ws.session.db/src/com/ibm/ws/session/store/db/DatabaseHashMap.java | DatabaseHashMap.setMaxInactToZero | int setMaxInactToZero(String sessId, String appName) {
if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
LoggingUtil.SESSION_LOGGER_WAS.entering(methodClassName, methodNames[SET_MAX_INACT_TO_ZERO], "for " + sessId + " and app "... | java | int setMaxInactToZero(String sessId, String appName) {
if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
LoggingUtil.SESSION_LOGGER_WAS.entering(methodClassName, methodNames[SET_MAX_INACT_TO_ZERO], "for " + sessId + " and app "... | [
"int",
"setMaxInactToZero",
"(",
"String",
"sessId",
",",
"String",
"appName",
")",
"{",
"if",
"(",
"com",
".",
"ibm",
".",
"websphere",
".",
"ras",
".",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"LoggingUtil",
".",
"SESSION_LOGGER_WAS",
... | /*
setMaxInactToZero - called to set the max inactive time to zero for remote invalidateAll.
This will result in the session being invalidated by the next run of the background
invalidator. | [
"/",
"*",
"setMaxInactToZero",
"-",
"called",
"to",
"set",
"the",
"max",
"inactive",
"time",
"to",
"zero",
"for",
"remote",
"invalidateAll",
".",
"This",
"will",
"result",
"in",
"the",
"session",
"being",
"invalidated",
"by",
"the",
"next",
"run",
"of",
"t... | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.session.db/src/com/ibm/ws/session/store/db/DatabaseHashMap.java#L2787-L2816 |
facebookarchive/hadoop-20 | src/core/org/apache/hadoop/util/PropertiesFromJSON.java | PropertiesFromJSON.getProperties | public static Properties getProperties(JSONObject json, String rootObjectPath,
String customObjectPath) throws JSONException, InvalidJSONPathException {
if (customObjectPath != null && !customObjectPath.equals("")) {
try {
return getPropertiesFromTraversal(json, customObjectPath);
} catch ... | java | public static Properties getProperties(JSONObject json, String rootObjectPath,
String customObjectPath) throws JSONException, InvalidJSONPathException {
if (customObjectPath != null && !customObjectPath.equals("")) {
try {
return getPropertiesFromTraversal(json, customObjectPath);
} catch ... | [
"public",
"static",
"Properties",
"getProperties",
"(",
"JSONObject",
"json",
",",
"String",
"rootObjectPath",
",",
"String",
"customObjectPath",
")",
"throws",
"JSONException",
",",
"InvalidJSONPathException",
"{",
"if",
"(",
"customObjectPath",
"!=",
"null",
"&&",
... | Uses an object path to traverse the json object and return a Properties
object
from the JSONObject (map<string, string>) object at the end of the path. If
customObjectPath
is null or isn't a valid path for the json object then rootObjectPath is
used as the path.
@param json
@param rootObjectPath
@param customObjectPat... | [
"Uses",
"an",
"object",
"path",
"to",
"traverse",
"the",
"json",
"object",
"and",
"return",
"a",
"Properties",
"object",
"from",
"the",
"JSONObject",
"(",
"map<string",
"string",
">",
")",
"object",
"at",
"the",
"end",
"of",
"the",
"path",
".",
"If",
"cu... | train | https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/util/PropertiesFromJSON.java#L90-L100 |
sarl/sarl | main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/labeling/SARLImages.java | SARLImages.forCapacity | public ImageDescriptor forCapacity(JvmVisibility visibility, int flags) {
return getDecorated(getTypeImageDescriptor(
SarlElementType.CAPACITY, false, false, toFlags(visibility), USE_LIGHT_ICONS), flags);
} | java | public ImageDescriptor forCapacity(JvmVisibility visibility, int flags) {
return getDecorated(getTypeImageDescriptor(
SarlElementType.CAPACITY, false, false, toFlags(visibility), USE_LIGHT_ICONS), flags);
} | [
"public",
"ImageDescriptor",
"forCapacity",
"(",
"JvmVisibility",
"visibility",
",",
"int",
"flags",
")",
"{",
"return",
"getDecorated",
"(",
"getTypeImageDescriptor",
"(",
"SarlElementType",
".",
"CAPACITY",
",",
"false",
",",
"false",
",",
"toFlags",
"(",
"visib... | Replies the image descriptor for the "capacities".
@param visibility the visibility of the capacity.
@param flags the mark flags. See {@link JavaElementImageDescriptor#setAdornments(int)} for
a description of the available flags.
@return the image descriptor for the capacities. | [
"Replies",
"the",
"image",
"descriptor",
"for",
"the",
"capacities",
"."
] | train | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/labeling/SARLImages.java#L151-L154 |
kmi/iserve | iserve-sal-core/src/main/java/uk/ac/open/kmi/iserve/sal/util/UriUtil.java | UriUtil.getUniqueId | public static String getUniqueId(URI resourceUri, URI basePath) {
String result = null;
URI relativeUri = basePath.relativize(resourceUri);
// If it is relative the first part of the path is the Unique ID
if (!relativeUri.isAbsolute()) {
result = relativeUri.toASCIIString();
... | java | public static String getUniqueId(URI resourceUri, URI basePath) {
String result = null;
URI relativeUri = basePath.relativize(resourceUri);
// If it is relative the first part of the path is the Unique ID
if (!relativeUri.isAbsolute()) {
result = relativeUri.toASCIIString();
... | [
"public",
"static",
"String",
"getUniqueId",
"(",
"URI",
"resourceUri",
",",
"URI",
"basePath",
")",
"{",
"String",
"result",
"=",
"null",
";",
"URI",
"relativeUri",
"=",
"basePath",
".",
"relativize",
"(",
"resourceUri",
")",
";",
"// If it is relative the firs... | Given the URI of a resource it returns the Unique ID.
In reality this obtains the first path element after the basePath.
Checks for those that are local to the server only. Developed both for hash and slash URIs.
Works in iServe on the basis of the following assumption behind resource URIs:
http://host:port/...some..... | [
"Given",
"the",
"URI",
"of",
"a",
"resource",
"it",
"returns",
"the",
"Unique",
"ID",
".",
"In",
"reality",
"this",
"obtains",
"the",
"first",
"path",
"element",
"after",
"the",
"basePath",
".",
"Checks",
"for",
"those",
"that",
"are",
"local",
"to",
"th... | train | https://github.com/kmi/iserve/blob/13e7016e64c1d5a539b838c6debf1a5cc4aefcb7/iserve-sal-core/src/main/java/uk/ac/open/kmi/iserve/sal/util/UriUtil.java#L46-L61 |
OpenLiberty/open-liberty | dev/com.ibm.ws.session/src/com/ibm/ws/session/StoreCallback.java | StoreCallback.sessionMaxInactiveTimeSet | public void sessionMaxInactiveTimeSet(ISession session, int old, int newval) {
_sessionStateEventDispatcher.sessionMaxInactiveTimeSet(session, old, newval);
} | java | public void sessionMaxInactiveTimeSet(ISession session, int old, int newval) {
_sessionStateEventDispatcher.sessionMaxInactiveTimeSet(session, old, newval);
} | [
"public",
"void",
"sessionMaxInactiveTimeSet",
"(",
"ISession",
"session",
",",
"int",
"old",
",",
"int",
"newval",
")",
"{",
"_sessionStateEventDispatcher",
".",
"sessionMaxInactiveTimeSet",
"(",
"session",
",",
"old",
",",
"newval",
")",
";",
"}"
] | Method sessionMaxInactiveTimeSet
<p>
@param session
@param old
@param newval
@see com.ibm.wsspi.session.IStoreCallback#sessionMaxInactiveTimeSet(com.ibm.wsspi.session.ISession, int, int) | [
"Method",
"sessionMaxInactiveTimeSet",
"<p",
">"
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.session/src/com/ibm/ws/session/StoreCallback.java#L238-L241 |
belaban/JGroups | src/org/jgroups/blocks/UnicastRequest.java | UnicastRequest.receiveResponse | public void receiveResponse(Object response_value, Address sender, boolean is_exception) {
if(isDone())
return;
if(is_exception && response_value instanceof Throwable)
completeExceptionally((Throwable)response_value);
else
complete((T)response_value);
... | java | public void receiveResponse(Object response_value, Address sender, boolean is_exception) {
if(isDone())
return;
if(is_exception && response_value instanceof Throwable)
completeExceptionally((Throwable)response_value);
else
complete((T)response_value);
... | [
"public",
"void",
"receiveResponse",
"(",
"Object",
"response_value",
",",
"Address",
"sender",
",",
"boolean",
"is_exception",
")",
"{",
"if",
"(",
"isDone",
"(",
")",
")",
"return",
";",
"if",
"(",
"is_exception",
"&&",
"response_value",
"instanceof",
"Throw... | <b>Callback</b> (called by RequestCorrelator or Transport).
Adds a response to the response table. When all responses have been received, {@code execute()} returns. | [
"<b",
">",
"Callback<",
"/",
"b",
">",
"(",
"called",
"by",
"RequestCorrelator",
"or",
"Transport",
")",
".",
"Adds",
"a",
"response",
"to",
"the",
"response",
"table",
".",
"When",
"all",
"responses",
"have",
"been",
"received",
"{"
] | train | https://github.com/belaban/JGroups/blob/bd3ca786aa57fed41dfbc10a94b1281e388be03b/src/org/jgroups/blocks/UnicastRequest.java#L50-L58 |
lucee/Lucee | core/src/main/java/lucee/runtime/crypt/BinConverter.java | BinConverter.longToIntArray | public static void longToIntArray(long lValue, int[] buffer, int nStartIndex) {
buffer[nStartIndex] = (int) (lValue >>> 32);
buffer[nStartIndex + 1] = (int) lValue;
} | java | public static void longToIntArray(long lValue, int[] buffer, int nStartIndex) {
buffer[nStartIndex] = (int) (lValue >>> 32);
buffer[nStartIndex + 1] = (int) lValue;
} | [
"public",
"static",
"void",
"longToIntArray",
"(",
"long",
"lValue",
",",
"int",
"[",
"]",
"buffer",
",",
"int",
"nStartIndex",
")",
"{",
"buffer",
"[",
"nStartIndex",
"]",
"=",
"(",
"int",
")",
"(",
"lValue",
">>>",
"32",
")",
";",
"buffer",
"[",
"n... | converts a long to integers which are put into a given array
@param lValue the 64bit integer to convert
@param buffer the target buffer
@param nStartIndex where to place the bytes in the buffer | [
"converts",
"a",
"long",
"to",
"integers",
"which",
"are",
"put",
"into",
"a",
"given",
"array"
] | train | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/crypt/BinConverter.java#L74-L77 |
liyiorg/weixin-popular | src/main/java/weixin/popular/api/BizwifiAPI.java | BizwifiAPI.apportalRegister | public static ApportalRegisterResult apportalRegister(String accessToken, ApportalRegister apportalRegister) {
return apportalRegister(accessToken, JsonUtil.toJSONString(apportalRegister));
} | java | public static ApportalRegisterResult apportalRegister(String accessToken, ApportalRegister apportalRegister) {
return apportalRegister(accessToken, JsonUtil.toJSONString(apportalRegister));
} | [
"public",
"static",
"ApportalRegisterResult",
"apportalRegister",
"(",
"String",
"accessToken",
",",
"ApportalRegister",
"apportalRegister",
")",
"{",
"return",
"apportalRegister",
"(",
"accessToken",
",",
"JsonUtil",
".",
"toJSONString",
"(",
"apportalRegister",
")",
"... | Wi-Fi设备管理-添加portal型设备
@param accessToken accessToken
@param apportalRegister apportalRegister
@return ApportalRegisterResult | [
"Wi",
"-",
"Fi设备管理",
"-",
"添加portal型设备"
] | train | https://github.com/liyiorg/weixin-popular/blob/c64255292d41463bdb671938feaabf42a335d82c/src/main/java/weixin/popular/api/BizwifiAPI.java#L347-L349 |
petergeneric/stdlib | stdlib/src/main/java/com/peterphi/std/types/CompareHelper.java | CompareHelper.gt | public static <T> boolean gt(Comparable<T> a, T b)
{
return gt(a.compareTo(b));
} | java | public static <T> boolean gt(Comparable<T> a, T b)
{
return gt(a.compareTo(b));
} | [
"public",
"static",
"<",
"T",
">",
"boolean",
"gt",
"(",
"Comparable",
"<",
"T",
">",
"a",
",",
"T",
"b",
")",
"{",
"return",
"gt",
"(",
"a",
".",
"compareTo",
"(",
"b",
")",
")",
";",
"}"
] | <code>a > b</code>
@param <T>
@param a
@param b
@return true if a > b | [
"<code",
">",
"a",
">",
"b<",
"/",
"code",
">"
] | train | https://github.com/petergeneric/stdlib/blob/d4025d2f881bc0542b1e004c5f65a1ccaf895836/stdlib/src/main/java/com/peterphi/std/types/CompareHelper.java#L113-L116 |
jqm4gwt/jqm4gwt | library/src/main/java/com/sksamuel/jqm4gwt/JQMContext.java | JQMContext.changePage | public static void changePage(JQMContainer container, TransitionIntf<?> transition, boolean reverse) {
changePage(container, false/*dialog*/, transition, reverse);
} | java | public static void changePage(JQMContainer container, TransitionIntf<?> transition, boolean reverse) {
changePage(container, false/*dialog*/, transition, reverse);
} | [
"public",
"static",
"void",
"changePage",
"(",
"JQMContainer",
"container",
",",
"TransitionIntf",
"<",
"?",
">",
"transition",
",",
"boolean",
"reverse",
")",
"{",
"changePage",
"(",
"container",
",",
"false",
"/*dialog*/",
",",
"transition",
",",
"reverse",
... | Change the displayed page to the given {@link JQMPage} instance using
the supplied transition and reverse setting. | [
"Change",
"the",
"displayed",
"page",
"to",
"the",
"given",
"{"
] | train | https://github.com/jqm4gwt/jqm4gwt/blob/cf59958e9ba6d4b70f42507b2c77f10c2465085b/library/src/main/java/com/sksamuel/jqm4gwt/JQMContext.java#L111-L113 |
dkmfbk/knowledgestore | ks-server/src/main/java/eu/fbk/knowledgestore/triplestore/SelectQuery.java | SelectQuery.from | public static SelectQuery from(final TupleExpr expression, @Nullable final Dataset dataset)
throws ParseException {
Preconditions.checkNotNull(expression);
try {
// Sesame rendering facilities are definitely broken, so we use our own
final String string = new SPARQL... | java | public static SelectQuery from(final TupleExpr expression, @Nullable final Dataset dataset)
throws ParseException {
Preconditions.checkNotNull(expression);
try {
// Sesame rendering facilities are definitely broken, so we use our own
final String string = new SPARQL... | [
"public",
"static",
"SelectQuery",
"from",
"(",
"final",
"TupleExpr",
"expression",
",",
"@",
"Nullable",
"final",
"Dataset",
"dataset",
")",
"throws",
"ParseException",
"{",
"Preconditions",
".",
"checkNotNull",
"(",
"expression",
")",
";",
"try",
"{",
"// Sesa... | Returns an <tt>SelectQuery</tt> for the algebraic expression and optional dataset
specified.
@param expression
the algebraic expression for the query
@param dataset
the dataset optionally associated to the query
@return the corresponding <tt>SelectQuery</tt> object
@throws ParseException
in case the supplied algebraic... | [
"Returns",
"an",
"<tt",
">",
"SelectQuery<",
"/",
"tt",
">",
"for",
"the",
"algebraic",
"expression",
"and",
"optional",
"dataset",
"specified",
"."
] | train | https://github.com/dkmfbk/knowledgestore/blob/a548101b1dd67fcf72a1ec6f838ea7539bdbbe7a/ks-server/src/main/java/eu/fbk/knowledgestore/triplestore/SelectQuery.java#L118-L137 |
stanfy/goro | goro/src/main/java/com/stanfy/enroscar/goro/GoroService.java | GoroService.foregroundTaskIntent | public static <T extends Callable<?> & Parcelable> Intent foregroundTaskIntent(final Context context,
final String queueName,
final T task,
... | java | public static <T extends Callable<?> & Parcelable> Intent foregroundTaskIntent(final Context context,
final String queueName,
final T task,
... | [
"public",
"static",
"<",
"T",
"extends",
"Callable",
"<",
"?",
">",
"&",
"Parcelable",
">",
"Intent",
"foregroundTaskIntent",
"(",
"final",
"Context",
"context",
",",
"final",
"String",
"queueName",
",",
"final",
"T",
"task",
",",
"final",
"int",
"notificati... | Create an intent that contains a task that should be scheduled
on a defined queue. The Service will run in the foreground and display notification.
Intent can be used as an argument for
{@link android.content.Context#startService(android.content.Intent)}
or {@link android.content.Context#startForegroundService(Intent)}... | [
"Create",
"an",
"intent",
"that",
"contains",
"a",
"task",
"that",
"should",
"be",
"scheduled",
"on",
"a",
"defined",
"queue",
".",
"The",
"Service",
"will",
"run",
"in",
"the",
"foreground",
"and",
"display",
"notification",
".",
"Intent",
"can",
"be",
"u... | train | https://github.com/stanfy/goro/blob/6618e63a926833d61f492ec611ee77668d756820/goro/src/main/java/com/stanfy/enroscar/goro/GoroService.java#L127-L144 |
carewebframework/carewebframework-core | org.carewebframework.ui-parent/org.carewebframework.ui.core/src/main/java/org/carewebframework/ui/action/ActionUtil.java | ActionUtil.addAction | public static ActionListener addAction(BaseComponent component, String action) {
return addAction(component, createAction(action));
} | java | public static ActionListener addAction(BaseComponent component, String action) {
return addAction(component, createAction(action));
} | [
"public",
"static",
"ActionListener",
"addAction",
"(",
"BaseComponent",
"component",
",",
"String",
"action",
")",
"{",
"return",
"addAction",
"(",
"component",
",",
"createAction",
"(",
"action",
")",
")",
";",
"}"
] | Adds/removes an action listener to/from a component using the default click trigger event.
@param component Component to be associated with the action.
@param action Action to invoke when listener event is triggered. This may be either the
action script or a registered action name. If empty or null, dissociates the ev... | [
"Adds",
"/",
"removes",
"an",
"action",
"listener",
"to",
"/",
"from",
"a",
"component",
"using",
"the",
"default",
"click",
"trigger",
"event",
"."
] | train | https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.ui-parent/org.carewebframework.ui.core/src/main/java/org/carewebframework/ui/action/ActionUtil.java#L72-L74 |
googleads/googleads-java-lib | modules/ads_lib/src/main/java/com/google/api/ads/admanager/lib/utils/DateTimesHelper.java | DateTimesHelper.toDateTime | public T toDateTime(String dateTime, String timeZoneId) {
return toDateTime(ISODateTimeFormat.dateHourMinuteSecond().parseDateTime(dateTime)
.withZoneRetainFields(DateTimeZone.forTimeZone(TimeZone.getTimeZone(timeZoneId))));
} | java | public T toDateTime(String dateTime, String timeZoneId) {
return toDateTime(ISODateTimeFormat.dateHourMinuteSecond().parseDateTime(dateTime)
.withZoneRetainFields(DateTimeZone.forTimeZone(TimeZone.getTimeZone(timeZoneId))));
} | [
"public",
"T",
"toDateTime",
"(",
"String",
"dateTime",
",",
"String",
"timeZoneId",
")",
"{",
"return",
"toDateTime",
"(",
"ISODateTimeFormat",
".",
"dateHourMinuteSecond",
"(",
")",
".",
"parseDateTime",
"(",
"dateTime",
")",
".",
"withZoneRetainFields",
"(",
... | Converts a string in the form of {@code yyyy-MM-dd'T'HH:mm:ss} to an API
date time in the time zone supplied. | [
"Converts",
"a",
"string",
"in",
"the",
"form",
"of",
"{"
] | train | https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/modules/ads_lib/src/main/java/com/google/api/ads/admanager/lib/utils/DateTimesHelper.java#L109-L112 |
square/otto | otto/src/main/java/com/squareup/otto/Bus.java | Bus.throwRuntimeException | private static void throwRuntimeException(String msg, InvocationTargetException e) {
Throwable cause = e.getCause();
if (cause != null) {
throw new RuntimeException(msg + ": " + cause.getMessage(), cause);
} else {
throw new RuntimeException(msg + ": " + e.getMessage(), e);
}
} | java | private static void throwRuntimeException(String msg, InvocationTargetException e) {
Throwable cause = e.getCause();
if (cause != null) {
throw new RuntimeException(msg + ": " + cause.getMessage(), cause);
} else {
throw new RuntimeException(msg + ": " + e.getMessage(), e);
}
} | [
"private",
"static",
"void",
"throwRuntimeException",
"(",
"String",
"msg",
",",
"InvocationTargetException",
"e",
")",
"{",
"Throwable",
"cause",
"=",
"e",
".",
"getCause",
"(",
")",
";",
"if",
"(",
"cause",
"!=",
"null",
")",
"{",
"throw",
"new",
"Runtim... | Throw a {@link RuntimeException} with given message and cause lifted from an {@link
InvocationTargetException}. If the specified {@link InvocationTargetException} does not have a
cause, neither will the {@link RuntimeException}. | [
"Throw",
"a",
"{"
] | train | https://github.com/square/otto/blob/2a67589abd91879cf23a8c96542b59349485ec3d/otto/src/main/java/com/squareup/otto/Bus.java#L457-L464 |
geomajas/geomajas-project-hammer-gwt | hammer-gwt/src/main/java/org/geomajas/hammergwt/client/HammerTime.java | HammerTime.setOption | @Api
public <T> void setOption(GestureOption<T> option, T value) {
if (value == null) {
throw new IllegalArgumentException("Null value passed.");
}
if (value instanceof Boolean) {
setOption(this, (Boolean) value, option.getName());
} else if (value instanceof Integer) {
setOption(this, (Integer) valu... | java | @Api
public <T> void setOption(GestureOption<T> option, T value) {
if (value == null) {
throw new IllegalArgumentException("Null value passed.");
}
if (value instanceof Boolean) {
setOption(this, (Boolean) value, option.getName());
} else if (value instanceof Integer) {
setOption(this, (Integer) valu... | [
"@",
"Api",
"public",
"<",
"T",
">",
"void",
"setOption",
"(",
"GestureOption",
"<",
"T",
">",
"option",
",",
"T",
"value",
")",
"{",
"if",
"(",
"value",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Null value passed.\"",
"... | Change the initial settings of hammer Gwt.
@param option {@link org.geomajas.hammergwt.client.option.GestureOption}
@param value T look at {@link org.geomajas.hammergwt.client.option.GestureOptions}
interface for all possible types
@param <T>
@since 1.0.0 | [
"Change",
"the",
"initial",
"settings",
"of",
"hammer",
"Gwt",
"."
] | train | https://github.com/geomajas/geomajas-project-hammer-gwt/blob/bc764171bed55e5a9eced72f0078ec22b8105b62/hammer-gwt/src/main/java/org/geomajas/hammergwt/client/HammerTime.java#L56-L73 |
jbundle/jbundle | base/base/src/main/java/org/jbundle/base/db/KeyArea.java | KeyArea.lastModified | public int lastModified(int iAreaDesc, boolean bForceUniqueKey)
{ // Set up the end key
int iLastKeyField = this.getKeyFields(bForceUniqueKey, false) - 1;
for (int iKeyFieldSeq = iLastKeyField; iKeyFieldSeq >= DBConstants.MAIN_KEY_FIELD; iKeyFieldSeq--)
{
KeyField keyField = th... | java | public int lastModified(int iAreaDesc, boolean bForceUniqueKey)
{ // Set up the end key
int iLastKeyField = this.getKeyFields(bForceUniqueKey, false) - 1;
for (int iKeyFieldSeq = iLastKeyField; iKeyFieldSeq >= DBConstants.MAIN_KEY_FIELD; iKeyFieldSeq--)
{
KeyField keyField = th... | [
"public",
"int",
"lastModified",
"(",
"int",
"iAreaDesc",
",",
"boolean",
"bForceUniqueKey",
")",
"{",
"// Set up the end key",
"int",
"iLastKeyField",
"=",
"this",
".",
"getKeyFields",
"(",
"bForceUniqueKey",
",",
"false",
")",
"-",
"1",
";",
"for",
"(",
"int... | Any of these key fields modified?
@param iAreaDesc The key field area to get the values from.
@param iStartKeyFieldSeq The starting key field to check (from here on).
@return true if any have been modified. | [
"Any",
"of",
"these",
"key",
"fields",
"modified?"
] | train | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/KeyArea.java#L391-L401 |
primefaces/primefaces | src/main/java/org/primefaces/model/timeline/TimelineModel.java | TimelineModel.deleteAll | public void deleteAll(Collection<TimelineEvent> events, TimelineUpdater timelineUpdater) {
if (events != null && !events.isEmpty()) {
for (TimelineEvent event : events) {
delete(event, timelineUpdater);
}
}
} | java | public void deleteAll(Collection<TimelineEvent> events, TimelineUpdater timelineUpdater) {
if (events != null && !events.isEmpty()) {
for (TimelineEvent event : events) {
delete(event, timelineUpdater);
}
}
} | [
"public",
"void",
"deleteAll",
"(",
"Collection",
"<",
"TimelineEvent",
">",
"events",
",",
"TimelineUpdater",
"timelineUpdater",
")",
"{",
"if",
"(",
"events",
"!=",
"null",
"&&",
"!",
"events",
".",
"isEmpty",
"(",
")",
")",
"{",
"for",
"(",
"TimelineEve... | Deletes all given events in the model with UI update.
@param events collection of events to be deleted
@param timelineUpdater TimelineUpdater instance to delete the events in UI | [
"Deletes",
"all",
"given",
"events",
"in",
"the",
"model",
"with",
"UI",
"update",
"."
] | train | https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/model/timeline/TimelineModel.java#L233-L239 |
forge/furnace | se/src/main/java/org/jboss/forge/furnace/se/FurnaceFactory.java | FurnaceFactory.getInstance | public static Furnace getInstance(final ClassLoader clientLoader)
{
final BootstrapClassLoader loader = new BootstrapClassLoader("bootpath");
return getInstance(clientLoader, loader);
} | java | public static Furnace getInstance(final ClassLoader clientLoader)
{
final BootstrapClassLoader loader = new BootstrapClassLoader("bootpath");
return getInstance(clientLoader, loader);
} | [
"public",
"static",
"Furnace",
"getInstance",
"(",
"final",
"ClassLoader",
"clientLoader",
")",
"{",
"final",
"BootstrapClassLoader",
"loader",
"=",
"new",
"BootstrapClassLoader",
"(",
"\"bootpath\"",
")",
";",
"return",
"getInstance",
"(",
"clientLoader",
",",
"loa... | Produce a {@link Furnace} instance using the given {@link ClassLoader} to act as the client for which
{@link Class} instances should be translated across {@link ClassLoader} boundaries, and using the default
bootstrap {@link ClassLoader} to load core furnace implementation JARs from `<code>src/main/java/bootpath/*</cod... | [
"Produce",
"a",
"{"
] | train | https://github.com/forge/furnace/blob/bbe6deaa3c0d85ba43daa3e2f7d486f2dad21e0a/se/src/main/java/org/jboss/forge/furnace/se/FurnaceFactory.java#L47-L51 |
alkacon/opencms-core | src/org/opencms/db/CmsImportFolder.java | CmsImportFolder.importResources | private void importResources(File folder, String importPath) throws Exception {
String[] diskFiles = folder.list();
File currentFile;
for (int i = 0; i < diskFiles.length; i++) {
currentFile = new File(folder, diskFiles[i]);
if (currentFile.isDirectory()) {
... | java | private void importResources(File folder, String importPath) throws Exception {
String[] diskFiles = folder.list();
File currentFile;
for (int i = 0; i < diskFiles.length; i++) {
currentFile = new File(folder, diskFiles[i]);
if (currentFile.isDirectory()) {
... | [
"private",
"void",
"importResources",
"(",
"File",
"folder",
",",
"String",
"importPath",
")",
"throws",
"Exception",
"{",
"String",
"[",
"]",
"diskFiles",
"=",
"folder",
".",
"list",
"(",
")",
";",
"File",
"currentFile",
";",
"for",
"(",
"int",
"i",
"="... | Imports the resources from the folder in the real file system to the OpenCms VFS.<p>
@param folder the folder to import from
@param importPath the OpenCms VFS import path to import to
@throws Exception if something goes wrong during file IO | [
"Imports",
"the",
"resources",
"from",
"the",
"folder",
"in",
"the",
"real",
"file",
"system",
"to",
"the",
"OpenCms",
"VFS",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsImportFolder.java#L231-L262 |
Netflix/spectator | spectator-api/src/main/java/com/netflix/spectator/impl/AsciiSet.java | AsciiSet.fromPattern | public static AsciiSet fromPattern(String pattern) {
final boolean[] members = new boolean[128];
final int n = pattern.length();
for (int i = 0; i < n; ++i) {
final char c = pattern.charAt(i);
if (c >= members.length) {
throw new IllegalArgumentException("invalid pattern, '" + c + "' is ... | java | public static AsciiSet fromPattern(String pattern) {
final boolean[] members = new boolean[128];
final int n = pattern.length();
for (int i = 0; i < n; ++i) {
final char c = pattern.charAt(i);
if (c >= members.length) {
throw new IllegalArgumentException("invalid pattern, '" + c + "' is ... | [
"public",
"static",
"AsciiSet",
"fromPattern",
"(",
"String",
"pattern",
")",
"{",
"final",
"boolean",
"[",
"]",
"members",
"=",
"new",
"boolean",
"[",
"128",
"]",
";",
"final",
"int",
"n",
"=",
"pattern",
".",
"length",
"(",
")",
";",
"for",
"(",
"i... | Create a set containing ascii characters using a simple pattern. The pattern is similar
to a character set in regex. For example, {@code ABC} would contain the characters
{@code A}, {@code B}, and {@code C}. Ranges are supported so all uppercase letters could
be specified as {@code A-Z}. The dash, {@code -}, will be in... | [
"Create",
"a",
"set",
"containing",
"ascii",
"characters",
"using",
"a",
"simple",
"pattern",
".",
"The",
"pattern",
"is",
"similar",
"to",
"a",
"character",
"set",
"in",
"regex",
".",
"For",
"example",
"{",
"@code",
"ABC",
"}",
"would",
"contain",
"the",
... | train | https://github.com/Netflix/spectator/blob/259318252770de3bad581b85adff187d8f2c6537/spectator-api/src/main/java/com/netflix/spectator/impl/AsciiSet.java#L91-L112 |
albfernandez/itext2 | src/main/java/com/lowagie/text/Table.java | Table.addCell | public void addCell(Cell aCell, int row, int column) throws BadElementException {
addCell(aCell, new Point(row,column));
} | java | public void addCell(Cell aCell, int row, int column) throws BadElementException {
addCell(aCell, new Point(row,column));
} | [
"public",
"void",
"addCell",
"(",
"Cell",
"aCell",
",",
"int",
"row",
",",
"int",
"column",
")",
"throws",
"BadElementException",
"{",
"addCell",
"(",
"aCell",
",",
"new",
"Point",
"(",
"row",
",",
"column",
")",
")",
";",
"}"
] | Adds a <CODE>Cell</CODE> to the <CODE>Table</CODE> at a certain row and column.
@param aCell The <CODE>Cell</CODE> to add
@param row The row where the <CODE>Cell</CODE> will be added
@param column The column where the <CODE>Cell</CODE> will be added
@throws BadElementException | [
"Adds",
"a",
"<CODE",
">",
"Cell<",
"/",
"CODE",
">",
"to",
"the",
"<CODE",
">",
"Table<",
"/",
"CODE",
">",
"at",
"a",
"certain",
"row",
"and",
"column",
"."
] | train | https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/Table.java#L685-L687 |
phax/ph-commons | ph-datetime/src/main/java/com/helger/datetime/util/PDTXMLConverter.java | PDTXMLConverter.getXMLCalendarTime | @Nonnull
public static XMLGregorianCalendar getXMLCalendarTime (final int nHour,
final int nMinute,
final int nSecond,
final int nMilliSecond)
{
... | java | @Nonnull
public static XMLGregorianCalendar getXMLCalendarTime (final int nHour,
final int nMinute,
final int nSecond,
final int nMilliSecond)
{
... | [
"@",
"Nonnull",
"public",
"static",
"XMLGregorianCalendar",
"getXMLCalendarTime",
"(",
"final",
"int",
"nHour",
",",
"final",
"int",
"nMinute",
",",
"final",
"int",
"nSecond",
",",
"final",
"int",
"nMilliSecond",
")",
"{",
"return",
"getXMLCalendarTime",
"(",
"n... | <p>
Create a Java representation of XML Schema builtin datatype
<code>date</code> or <code>g*</code>.
</p>
<p>
For example, an instance of <code>gYear</code> can be created invoking this
factory with <code>month</code> and <code>day</code> parameters set to
{@link DatatypeConstants#FIELD_UNDEFINED}.
</p>
<p>
A {@link D... | [
"<p",
">",
"Create",
"a",
"Java",
"representation",
"of",
"XML",
"Schema",
"builtin",
"datatype",
"<code",
">",
"date<",
"/",
"code",
">",
"or",
"<code",
">",
"g",
"*",
"<",
"/",
"code",
">",
".",
"<",
"/",
"p",
">",
"<p",
">",
"For",
"example",
... | train | https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-datetime/src/main/java/com/helger/datetime/util/PDTXMLConverter.java#L450-L457 |
samskivert/pythagoras | src/main/java/pythagoras/f/Quaternion.java | Quaternion.fromAngleAxis | public Quaternion fromAngleAxis (float angle, float x, float y, float z) {
float sina = FloatMath.sin(angle / 2f);
return set(x*sina, y*sina, z*sina, FloatMath.cos(angle / 2f));
} | java | public Quaternion fromAngleAxis (float angle, float x, float y, float z) {
float sina = FloatMath.sin(angle / 2f);
return set(x*sina, y*sina, z*sina, FloatMath.cos(angle / 2f));
} | [
"public",
"Quaternion",
"fromAngleAxis",
"(",
"float",
"angle",
",",
"float",
"x",
",",
"float",
"y",
",",
"float",
"z",
")",
"{",
"float",
"sina",
"=",
"FloatMath",
".",
"sin",
"(",
"angle",
"/",
"2f",
")",
";",
"return",
"set",
"(",
"x",
"*",
"si... | Sets this quaternion to the rotation described by the given angle and normalized
axis.
@return a reference to this quaternion, for chaining. | [
"Sets",
"this",
"quaternion",
"to",
"the",
"rotation",
"described",
"by",
"the",
"given",
"angle",
"and",
"normalized",
"axis",
"."
] | train | https://github.com/samskivert/pythagoras/blob/b8fea743ee8a7d742ad9c06ee4f11f50571fbd32/src/main/java/pythagoras/f/Quaternion.java#L165-L168 |
Azure/azure-sdk-for-java | compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachineScaleSetsInner.java | VirtualMachineScaleSetsInner.beginUpdate | public VirtualMachineScaleSetInner beginUpdate(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetUpdate parameters) {
return beginUpdateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, parameters).toBlocking().single().body();
} | java | public VirtualMachineScaleSetInner beginUpdate(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetUpdate parameters) {
return beginUpdateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, parameters).toBlocking().single().body();
} | [
"public",
"VirtualMachineScaleSetInner",
"beginUpdate",
"(",
"String",
"resourceGroupName",
",",
"String",
"vmScaleSetName",
",",
"VirtualMachineScaleSetUpdate",
"parameters",
")",
"{",
"return",
"beginUpdateWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"vmScaleSetN... | Update a VM scale set.
@param resourceGroupName The name of the resource group.
@param vmScaleSetName The name of the VM scale set to create or update.
@param parameters The scale set object.
@throws IllegalArgumentException thrown if parameters fail the validation
@throws CloudException thrown if the request is rejec... | [
"Update",
"a",
"VM",
"scale",
"set",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachineScaleSetsInner.java#L454-L456 |
JM-Lab/utils-java8 | src/main/java/kr/jm/utils/JMFileAppender.java | JMFileAppender.appendLinesAndClose | public static Path appendLinesAndClose(String filePath, String... lines) {
return appendLinesAndClose(filePath, UTF_8, lines);
} | java | public static Path appendLinesAndClose(String filePath, String... lines) {
return appendLinesAndClose(filePath, UTF_8, lines);
} | [
"public",
"static",
"Path",
"appendLinesAndClose",
"(",
"String",
"filePath",
",",
"String",
"...",
"lines",
")",
"{",
"return",
"appendLinesAndClose",
"(",
"filePath",
",",
"UTF_8",
",",
"lines",
")",
";",
"}"
] | Append lines and close path.
@param filePath the file path
@param lines the lines
@return the path | [
"Append",
"lines",
"and",
"close",
"path",
"."
] | train | https://github.com/JM-Lab/utils-java8/blob/9e407b3f28a7990418a1e877229fa8344f4d78a5/src/main/java/kr/jm/utils/JMFileAppender.java#L122-L124 |
gallandarakhneorg/afc | core/maths/mathgeom/tobeincluded/src/d3/continuous/AbstractSegment3F.java | AbstractSegment3F.computeLineLineIntersectionFactor | @Pure
public static double computeLineLineIntersectionFactor(
double x1, double y1, double z1, double x2, double y2, double z2,
double x3, double y3, double z3, double x4, double y4, double z4) {
//We compute the 4 vectors P1P2, P3P4, P1P3 and P2P4
Vector3f a = new Vector3f(x2 - x1, y2 - y1, z2 - z1);
Ve... | java | @Pure
public static double computeLineLineIntersectionFactor(
double x1, double y1, double z1, double x2, double y2, double z2,
double x3, double y3, double z3, double x4, double y4, double z4) {
//We compute the 4 vectors P1P2, P3P4, P1P3 and P2P4
Vector3f a = new Vector3f(x2 - x1, y2 - y1, z2 - z1);
Ve... | [
"@",
"Pure",
"public",
"static",
"double",
"computeLineLineIntersectionFactor",
"(",
"double",
"x1",
",",
"double",
"y1",
",",
"double",
"z1",
",",
"double",
"x2",
",",
"double",
"y2",
",",
"double",
"z2",
",",
"double",
"x3",
",",
"double",
"y3",
",",
"... | Replies one position factor for the intersection point between two lines.
<p>
Let line equations for L1 and L2:<br>
<code>L1: P1 + factor1 * (P2-P1)</code><br>
<code>L2: P3 + factor2 * (P4-P3)</code><br>
If lines are intersecting, then<br>
<code>P1 + factor1 * (P2-P1) = P3 + factor2 * (P4-P3)</code>
<p>
This function c... | [
"Replies",
"one",
"position",
"factor",
"for",
"the",
"intersection",
"point",
"between",
"two",
"lines",
".",
"<p",
">",
"Let",
"line",
"equations",
"for",
"L1",
"and",
"L2",
":",
"<br",
">",
"<code",
">",
"L1",
":",
"P1",
"+",
"factor1",
"*",
"(",
... | train | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/tobeincluded/src/d3/continuous/AbstractSegment3F.java#L327-L353 |
spotbugs/spotbugs | spotbugs/src/main/java/edu/umd/cs/findbugs/ba/type/TypeAnalysis.java | TypeAnalysis.computeBlockExceptionSet | private CachedExceptionSet computeBlockExceptionSet(BasicBlock basicBlock, TypeFrame result) throws DataflowAnalysisException {
ExceptionSet exceptionSet = computeThrownExceptionTypes(basicBlock);
TypeFrame copyOfResult = createFact();
copy(result, copyOfResult);
CachedExceptionSet c... | java | private CachedExceptionSet computeBlockExceptionSet(BasicBlock basicBlock, TypeFrame result) throws DataflowAnalysisException {
ExceptionSet exceptionSet = computeThrownExceptionTypes(basicBlock);
TypeFrame copyOfResult = createFact();
copy(result, copyOfResult);
CachedExceptionSet c... | [
"private",
"CachedExceptionSet",
"computeBlockExceptionSet",
"(",
"BasicBlock",
"basicBlock",
",",
"TypeFrame",
"result",
")",
"throws",
"DataflowAnalysisException",
"{",
"ExceptionSet",
"exceptionSet",
"=",
"computeThrownExceptionTypes",
"(",
"basicBlock",
")",
";",
"TypeF... | Compute the set of exceptions that can be thrown from the given basic
block. This should only be called if the existing cached exception set is
out of date.
@param basicBlock
the basic block
@param result
the result fact for the block; this is used to determine
whether or not the cached exception set is up to date
@re... | [
"Compute",
"the",
"set",
"of",
"exceptions",
"that",
"can",
"be",
"thrown",
"from",
"the",
"given",
"basic",
"block",
".",
"This",
"should",
"only",
"be",
"called",
"if",
"the",
"existing",
"cached",
"exception",
"set",
"is",
"out",
"of",
"date",
"."
] | train | https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/type/TypeAnalysis.java#L729-L741 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.