repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
18
194
func_name
stringlengths
6
111
whole_func_string
stringlengths
80
3.8k
language
stringclasses
1 value
func_code_string
stringlengths
80
3.8k
func_code_tokens
listlengths
20
697
func_documentation_string
stringlengths
61
2k
func_documentation_tokens
listlengths
1
434
split_name
stringclasses
1 value
func_code_url
stringlengths
111
308
antopen/alipay-sdk-java
src/main/java/com/alipay/api/internal/util/AlipaySignature.java
AlipaySignature.checkSignAndDecrypt
public static String checkSignAndDecrypt(Map<String, String> params, String alipayPublicKey, String cusPrivateKey, boolean isCheckSign, boolean isDecrypt) throws AlipayApiException { String charset = params.get("charset");...
java
public static String checkSignAndDecrypt(Map<String, String> params, String alipayPublicKey, String cusPrivateKey, boolean isCheckSign, boolean isDecrypt) throws AlipayApiException { String charset = params.get("charset");...
[ "public", "static", "String", "checkSignAndDecrypt", "(", "Map", "<", "String", ",", "String", ">", "params", ",", "String", "alipayPublicKey", ",", "String", "cusPrivateKey", ",", "boolean", "isCheckSign", ",", "boolean", "isDecrypt", ")", "throws", "AlipayApiExc...
验签并解密 <p> <b>目前适用于公众号</b><br> params参数示例: <br>{ <br>biz_content=M0qGiGz+8kIpxe8aF4geWJdBn0aBTuJRQItLHo9R7o5JGhpic/MIUjvXo2BLB++BbkSq2OsJCEQFDZ0zK5AJYwvBgeRX30gvEj6eXqXRt16/IkB9HzAccEqKmRHrZJ7PjQWE0KfvDAHsJqFIeMvEYk1Zei2QkwSQPlso7K0oheo/iT+HYE8aTATnkqD/ByD9iNDtGg38pCa2xnnns63abKsKoV8h0DfHWgPH62urGY7Pye3r9FCOXA2Ykm8X4/Bl...
[ "验签并解密", "<p", ">", "<b", ">", "目前适用于公众号<", "/", "b", ">", "<br", ">", "params参数示例:", "<br", ">", "{", "<br", ">", "biz_content", "=", "M0qGiGz", "+", "8kIpxe8aF4geWJdBn0aBTuJRQItLHo9R7o5JGhpic", "/", "MIUjvXo2BLB", "++", "BbkSq2OsJCEQFDZ0zK5AJYwvBgeRX30gvEj6eXqXRt1...
train
https://github.com/antopen/alipay-sdk-java/blob/e82aeac7d0239330ee173c7e393596e51e41c1cd/src/main/java/com/alipay/api/internal/util/AlipaySignature.java#L378-L394
greatman/craftconomy3
src/main/java/com/greatmancode/craftconomy3/account/AccountACL.java
AccountACL.setAcl
public void setAcl(String name, boolean acl) { String newName = name.toLowerCase(); if (aclList.containsKey(newName)) { AccountACLValue value = aclList.get(newName); set(newName, value.canDeposit(), value.canWithdraw(), acl, value.canBalance(), value.isOwner()); } else { ...
java
public void setAcl(String name, boolean acl) { String newName = name.toLowerCase(); if (aclList.containsKey(newName)) { AccountACLValue value = aclList.get(newName); set(newName, value.canDeposit(), value.canWithdraw(), acl, value.canBalance(), value.isOwner()); } else { ...
[ "public", "void", "setAcl", "(", "String", "name", ",", "boolean", "acl", ")", "{", "String", "newName", "=", "name", ".", "toLowerCase", "(", ")", ";", "if", "(", "aclList", ".", "containsKey", "(", "newName", ")", ")", "{", "AccountACLValue", "value", ...
Set if a player can modify the ACL list @param name The player name @param acl can modify the ACL or not
[ "Set", "if", "a", "player", "can", "modify", "the", "ACL", "list" ]
train
https://github.com/greatman/craftconomy3/blob/51b1b3de7d039e20c7418d1e70b8c4b02b8cf840/src/main/java/com/greatmancode/craftconomy3/account/AccountACL.java#L149-L157
exoplatform/jcr
exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/UserProfileHandlerImpl.java
UserProfileHandlerImpl.preDelete
private void preDelete(UserProfile userProfile, boolean broadcast) throws Exception { for (UserProfileEventListener listener : listeners) { listener.preDelete(userProfile); } }
java
private void preDelete(UserProfile userProfile, boolean broadcast) throws Exception { for (UserProfileEventListener listener : listeners) { listener.preDelete(userProfile); } }
[ "private", "void", "preDelete", "(", "UserProfile", "userProfile", ",", "boolean", "broadcast", ")", "throws", "Exception", "{", "for", "(", "UserProfileEventListener", "listener", ":", "listeners", ")", "{", "listener", ".", "preDelete", "(", "userProfile", ")", ...
Notifying listeners before profile deletion. @param userProfile the user profile which is used in delete operation @throws Exception if any listener failed to handle the event
[ "Notifying", "listeners", "before", "profile", "deletion", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/UserProfileHandlerImpl.java#L443-L449
lessthanoptimal/BoofCV
main/boofcv-sfm/src/main/java/boofcv/alg/sfm/d3/VisOdomQuadPnP.java
VisOdomQuadPnP.process
public boolean process( T left , T right ) { if( first ) { associateL2R(left, right); first = false; } else { // long time0 = System.currentTimeMillis(); associateL2R(left, right); // long time1 = System.currentTimeMillis(); associateF2F(); // long time2 = System.currentTimeMillis(); cyclicCon...
java
public boolean process( T left , T right ) { if( first ) { associateL2R(left, right); first = false; } else { // long time0 = System.currentTimeMillis(); associateL2R(left, right); // long time1 = System.currentTimeMillis(); associateF2F(); // long time2 = System.currentTimeMillis(); cyclicCon...
[ "public", "boolean", "process", "(", "T", "left", ",", "T", "right", ")", "{", "if", "(", "first", ")", "{", "associateL2R", "(", "left", ",", "right", ")", ";", "first", "=", "false", ";", "}", "else", "{", "//\t\t\tlong time0 = System.currentTimeMillis()...
Estimates camera egomotion from the stereo pair @param left Image from left camera @param right Image from right camera @return true if motion was estimated and false if not
[ "Estimates", "camera", "egomotion", "from", "the", "stereo", "pair" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-sfm/src/main/java/boofcv/alg/sfm/d3/VisOdomQuadPnP.java#L173-L195
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPMeasurementUnitPersistenceImpl.java
CPMeasurementUnitPersistenceImpl.findByG_T
@Override public List<CPMeasurementUnit> findByG_T(long groupId, int type, int start, int end) { return findByG_T(groupId, type, start, end, null); }
java
@Override public List<CPMeasurementUnit> findByG_T(long groupId, int type, int start, int end) { return findByG_T(groupId, type, start, end, null); }
[ "@", "Override", "public", "List", "<", "CPMeasurementUnit", ">", "findByG_T", "(", "long", "groupId", ",", "int", "type", ",", "int", "start", ",", "int", "end", ")", "{", "return", "findByG_T", "(", "groupId", ",", "type", ",", "start", ",", "end", "...
Returns a range of all the cp measurement units where groupId = &#63; and type = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first...
[ "Returns", "a", "range", "of", "all", "the", "cp", "measurement", "units", "where", "groupId", "=", "&#63", ";", "and", "type", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPMeasurementUnitPersistenceImpl.java#L2044-L2048
rampatra/jbot
jbot-example/src/main/java/example/jbot/slack/SlackBot.java
SlackBot.onReceiveDM
@Controller(events = {EventType.DIRECT_MENTION, EventType.DIRECT_MESSAGE}) public void onReceiveDM(WebSocketSession session, Event event) { reply(session, event, "Hi, I am " + slackService.getCurrentUser().getName()); }
java
@Controller(events = {EventType.DIRECT_MENTION, EventType.DIRECT_MESSAGE}) public void onReceiveDM(WebSocketSession session, Event event) { reply(session, event, "Hi, I am " + slackService.getCurrentUser().getName()); }
[ "@", "Controller", "(", "events", "=", "{", "EventType", ".", "DIRECT_MENTION", ",", "EventType", ".", "DIRECT_MESSAGE", "}", ")", "public", "void", "onReceiveDM", "(", "WebSocketSession", "session", ",", "Event", "event", ")", "{", "reply", "(", "session", ...
Invoked when the bot receives a direct mention (@botname: message) or a direct message. NOTE: These two event types are added by jbot to make your task easier, Slack doesn't have any direct way to determine these type of events. @param session @param event
[ "Invoked", "when", "the", "bot", "receives", "a", "direct", "mention", "(", "@botname", ":", "message", ")", "or", "a", "direct", "message", ".", "NOTE", ":", "These", "two", "event", "types", "are", "added", "by", "jbot", "to", "make", "your", "task", ...
train
https://github.com/rampatra/jbot/blob/0f42e1a6ec4dcbc5d1257e1307704903e771f7b5/jbot-example/src/main/java/example/jbot/slack/SlackBot.java#L56-L59
threerings/narya
core/src/main/java/com/threerings/presents/server/TimeBaseProvider.java
TimeBaseProvider.init
public static void init (InvocationManager invmgr, RootDObjectManager omgr) { // we'll need these later _invmgr = invmgr; _omgr = omgr; // register a provider instance invmgr.registerProvider(new TimeBaseProvider(), TimeBaseMarshaller.class, GLOBAL_GROUP); }
java
public static void init (InvocationManager invmgr, RootDObjectManager omgr) { // we'll need these later _invmgr = invmgr; _omgr = omgr; // register a provider instance invmgr.registerProvider(new TimeBaseProvider(), TimeBaseMarshaller.class, GLOBAL_GROUP); }
[ "public", "static", "void", "init", "(", "InvocationManager", "invmgr", ",", "RootDObjectManager", "omgr", ")", "{", "// we'll need these later", "_invmgr", "=", "invmgr", ";", "_omgr", "=", "omgr", ";", "// register a provider instance", "invmgr", ".", "registerProvi...
Registers the time provider with the appropriate managers. Called by the presents server at startup.
[ "Registers", "the", "time", "provider", "with", "the", "appropriate", "managers", ".", "Called", "by", "the", "presents", "server", "at", "startup", "." ]
train
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/server/TimeBaseProvider.java#L47-L55
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/distance/ST_ClosestCoordinate.java
ST_ClosestCoordinate.getFurthestCoordinate
public static Geometry getFurthestCoordinate(Point point, Geometry geom) { if (point == null || geom == null) { return null; } double minDistance = Double.POSITIVE_INFINITY; Coordinate pointCoordinate = point.getCoordinate(); Set<Coordinate> closestCoordinates = new H...
java
public static Geometry getFurthestCoordinate(Point point, Geometry geom) { if (point == null || geom == null) { return null; } double minDistance = Double.POSITIVE_INFINITY; Coordinate pointCoordinate = point.getCoordinate(); Set<Coordinate> closestCoordinates = new H...
[ "public", "static", "Geometry", "getFurthestCoordinate", "(", "Point", "point", ",", "Geometry", "geom", ")", "{", "if", "(", "point", "==", "null", "||", "geom", "==", "null", ")", "{", "return", "null", ";", "}", "double", "minDistance", "=", "Double", ...
Computes the closest coordinate(s) contained in the given geometry starting from the given point, using the 2D distance. @param point Point @param geom Geometry @return The closest coordinate(s) contained in the given geometry starting from the given point, using the 2D distance
[ "Computes", "the", "closest", "coordinate", "(", "s", ")", "contained", "in", "the", "given", "geometry", "starting", "from", "the", "given", "point", "using", "the", "2D", "distance", "." ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/distance/ST_ClosestCoordinate.java#L64-L87
googleapis/google-cloud-java
google-cloud-clients/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1beta1/GrafeasV1Beta1Client.java
GrafeasV1Beta1Client.listNoteOccurrences
public final ListNoteOccurrencesPagedResponse listNoteOccurrences(NoteName name, String filter) { ListNoteOccurrencesRequest request = ListNoteOccurrencesRequest.newBuilder() .setName(name == null ? null : name.toString()) .setFilter(filter) .build(); return listNoteO...
java
public final ListNoteOccurrencesPagedResponse listNoteOccurrences(NoteName name, String filter) { ListNoteOccurrencesRequest request = ListNoteOccurrencesRequest.newBuilder() .setName(name == null ? null : name.toString()) .setFilter(filter) .build(); return listNoteO...
[ "public", "final", "ListNoteOccurrencesPagedResponse", "listNoteOccurrences", "(", "NoteName", "name", ",", "String", "filter", ")", "{", "ListNoteOccurrencesRequest", "request", "=", "ListNoteOccurrencesRequest", ".", "newBuilder", "(", ")", ".", "setName", "(", "name"...
Lists occurrences referencing the specified note. Provider projects can use this method to get all occurrences across consumer projects referencing the specified note. <p>Sample code: <pre><code> try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) { NoteName name = NoteName.of("[PROJECT]",...
[ "Lists", "occurrences", "referencing", "the", "specified", "note", ".", "Provider", "projects", "can", "use", "this", "method", "to", "get", "all", "occurrences", "across", "consumer", "projects", "referencing", "the", "specified", "note", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1beta1/GrafeasV1Beta1Client.java#L1618-L1625
apache/incubator-gobblin
gobblin-utility/src/main/java/org/apache/gobblin/util/filesystem/FileSystemInstrumentationFactory.java
FileSystemInstrumentationFactory.instrumentFileSystem
public FileSystem instrumentFileSystem(FileSystem fs, SharedResourcesBroker<S> broker, ConfigView<S, FileSystemKey> config) { return fs; }
java
public FileSystem instrumentFileSystem(FileSystem fs, SharedResourcesBroker<S> broker, ConfigView<S, FileSystemKey> config) { return fs; }
[ "public", "FileSystem", "instrumentFileSystem", "(", "FileSystem", "fs", ",", "SharedResourcesBroker", "<", "S", ">", "broker", ",", "ConfigView", "<", "S", ",", "FileSystemKey", ">", "config", ")", "{", "return", "fs", ";", "}" ]
Return an instrumented version of the input {@link FileSystem}. Generally, this will return a decorator for the input {@link FileSystem}. If the instrumentation will be a no-op (due to, for example, configuration), it is recommended to return the input {@link FileSystem} directly for performance.
[ "Return", "an", "instrumented", "version", "of", "the", "input", "{" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-utility/src/main/java/org/apache/gobblin/util/filesystem/FileSystemInstrumentationFactory.java#L39-L41
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/CharsetDetector.java
CharsetDetector.getReader
public Reader getReader(InputStream in, String declaredEncoding) { fDeclaredEncoding = declaredEncoding; try { setText(in); CharsetMatch match = detect(); if (match == null) { return null; } ...
java
public Reader getReader(InputStream in, String declaredEncoding) { fDeclaredEncoding = declaredEncoding; try { setText(in); CharsetMatch match = detect(); if (match == null) { return null; } ...
[ "public", "Reader", "getReader", "(", "InputStream", "in", ",", "String", "declaredEncoding", ")", "{", "fDeclaredEncoding", "=", "declaredEncoding", ";", "try", "{", "setText", "(", "in", ")", ";", "CharsetMatch", "match", "=", "detect", "(", ")", ";", "if"...
Autodetect the charset of an inputStream, and return a Java Reader to access the converted input data. <p> This is a convenience method that is equivalent to <code>this.setDeclaredEncoding(declaredEncoding).setText(in).detect().getReader();</code> <p> For the input stream that supplies the character data, markSupported...
[ "Autodetect", "the", "charset", "of", "an", "inputStream", "and", "return", "a", "Java", "Reader", "to", "access", "the", "converted", "input", "data", ".", "<p", ">", "This", "is", "a", "convenience", "method", "that", "is", "equivalent", "to", "<code", "...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/CharsetDetector.java#L220-L236
finmath/finmath-lib
src/main/java/net/finmath/modelling/descriptor/xmlparser/FPMLParser.java
FPMLParser.getSwapProductDescriptor
private ProductDescriptor getSwapProductDescriptor(Element trade) { InterestRateSwapLegProductDescriptor legReceiver = null; InterestRateSwapLegProductDescriptor legPayer = null; NodeList legs = trade.getElementsByTagName("swapStream"); for(int legIndex = 0; legIndex < legs.getLength(); legIndex++) { ...
java
private ProductDescriptor getSwapProductDescriptor(Element trade) { InterestRateSwapLegProductDescriptor legReceiver = null; InterestRateSwapLegProductDescriptor legPayer = null; NodeList legs = trade.getElementsByTagName("swapStream"); for(int legIndex = 0; legIndex < legs.getLength(); legIndex++) { ...
[ "private", "ProductDescriptor", "getSwapProductDescriptor", "(", "Element", "trade", ")", "{", "InterestRateSwapLegProductDescriptor", "legReceiver", "=", "null", ";", "InterestRateSwapLegProductDescriptor", "legPayer", "=", "null", ";", "NodeList", "legs", "=", "trade", ...
Construct an InterestRateSwapProductDescriptor from a node in a FpML file. @param trade The node containing the swap. @return Descriptor of the swap.
[ "Construct", "an", "InterestRateSwapProductDescriptor", "from", "a", "node", "in", "a", "FpML", "file", "." ]
train
https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/modelling/descriptor/xmlparser/FPMLParser.java#L101-L120
geomajas/geomajas-project-client-gwt
client/src/main/java/org/geomajas/gwt/client/gfx/painter/RasterLayerPainter.java
RasterLayerPainter.deleteShape
public void deleteShape(Paintable paintable, Object group, MapContext context) { context.getRasterContext().deleteGroup(paintable); }
java
public void deleteShape(Paintable paintable, Object group, MapContext context) { context.getRasterContext().deleteGroup(paintable); }
[ "public", "void", "deleteShape", "(", "Paintable", "paintable", ",", "Object", "group", ",", "MapContext", "context", ")", "{", "context", ".", "getRasterContext", "(", ")", ".", "deleteGroup", "(", "paintable", ")", ";", "}" ]
Delete a {@link Paintable} object from the given {@link MapContext}. It the object does not exist, nothing will be done. @param paintable The raster layer @param group The group where the object resides in (optional). @param graphics The context to paint on.
[ "Delete", "a", "{", "@link", "Paintable", "}", "object", "from", "the", "given", "{", "@link", "MapContext", "}", ".", "It", "the", "object", "does", "not", "exist", "nothing", "will", "be", "done", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/gfx/painter/RasterLayerPainter.java#L75-L77
Azure/azure-sdk-for-java
appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServicePlansInner.java
AppServicePlansInner.getServerFarmSkusAsync
public Observable<Object> getServerFarmSkusAsync(String resourceGroupName, String name) { return getServerFarmSkusWithServiceResponseAsync(resourceGroupName, name).map(new Func1<ServiceResponse<Object>, Object>() { @Override public Object call(ServiceResponse<Object> response) { ...
java
public Observable<Object> getServerFarmSkusAsync(String resourceGroupName, String name) { return getServerFarmSkusWithServiceResponseAsync(resourceGroupName, name).map(new Func1<ServiceResponse<Object>, Object>() { @Override public Object call(ServiceResponse<Object> response) { ...
[ "public", "Observable", "<", "Object", ">", "getServerFarmSkusAsync", "(", "String", "resourceGroupName", ",", "String", "name", ")", "{", "return", "getServerFarmSkusWithServiceResponseAsync", "(", "resourceGroupName", ",", "name", ")", ".", "map", "(", "new", "Fun...
Gets all selectable sku's for a given App Service Plan. Gets all selectable sku's for a given App Service Plan. @param resourceGroupName Name of the resource group to which the resource belongs. @param name Name of App Service Plan @throws IllegalArgumentException thrown if parameters fail the validation @return the o...
[ "Gets", "all", "selectable", "sku", "s", "for", "a", "given", "App", "Service", "Plan", ".", "Gets", "all", "selectable", "sku", "s", "for", "a", "given", "App", "Service", "Plan", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServicePlansInner.java#L2666-L2673
opsmatters/newrelic-api
src/main/java/com/opsmatters/newrelic/api/services/HttpContext.java
HttpContext.logResponse
private void logResponse(URI uri, Response response) { if(logger.isLoggable(Level.FINE)) logger.fine(uri.toString()+" => "+response.getStatus()); if(response.getStatus() > 300) logger.warning(response.toString()); }
java
private void logResponse(URI uri, Response response) { if(logger.isLoggable(Level.FINE)) logger.fine(uri.toString()+" => "+response.getStatus()); if(response.getStatus() > 300) logger.warning(response.toString()); }
[ "private", "void", "logResponse", "(", "URI", "uri", ",", "Response", "response", ")", "{", "if", "(", "logger", ".", "isLoggable", "(", "Level", ".", "FINE", ")", ")", "logger", ".", "fine", "(", "uri", ".", "toString", "(", ")", "+", "\" => \"", "+...
Log a HTTP error response. @param uri The URI used for the HTTP call @param response The HTTP call response
[ "Log", "a", "HTTP", "error", "response", "." ]
train
https://github.com/opsmatters/newrelic-api/blob/5bc2ea62ec368db891e4fd5fe3dcdf529d086b5e/src/main/java/com/opsmatters/newrelic/api/services/HttpContext.java#L608-L614
Coveros/selenified
src/main/java/com/coveros/selenified/Selenified.java
Selenified.getAuthor
private String getAuthor(String clazz, ITestContext context) { return (String) context.getAttribute(clazz + "Author"); }
java
private String getAuthor(String clazz, ITestContext context) { return (String) context.getAttribute(clazz + "Author"); }
[ "private", "String", "getAuthor", "(", "String", "clazz", ",", "ITestContext", "context", ")", "{", "return", "(", "String", ")", "context", ".", "getAttribute", "(", "clazz", "+", "\"Author\"", ")", ";", "}" ]
Obtains the author of the current test suite being executed. If no author was set, null will be returned @param clazz - the test suite class, used for making threadsafe storage of application, allowing suites to have independent applications under test, run at the same time @param context - the TestNG context associ...
[ "Obtains", "the", "author", "of", "the", "current", "test", "suite", "being", "executed", ".", "If", "no", "author", "was", "set", "null", "will", "be", "returned" ]
train
https://github.com/Coveros/selenified/blob/396cc1f010dd69eed33cc5061c41253de246a4cd/src/main/java/com/coveros/selenified/Selenified.java#L150-L152
bwkimmel/jdcp
jdcp-console/src/main/java/ca/eandb/jdcp/client/ScriptCommand.java
ScriptCommand.getScriptEngine
private ScriptEngine getScriptEngine(ScriptEngineManager factory, Options options) { if (options.language != null) { return factory.getEngineByName(options.language); } if (options.file != null) { String fileName = options.file.getName(); int separator = fileName.lastIndexOf('.'); if...
java
private ScriptEngine getScriptEngine(ScriptEngineManager factory, Options options) { if (options.language != null) { return factory.getEngineByName(options.language); } if (options.file != null) { String fileName = options.file.getName(); int separator = fileName.lastIndexOf('.'); if...
[ "private", "ScriptEngine", "getScriptEngine", "(", "ScriptEngineManager", "factory", ",", "Options", "options", ")", "{", "if", "(", "options", ".", "language", "!=", "null", ")", "{", "return", "factory", ".", "getEngineByName", "(", "options", ".", "language",...
Gets the <code>ScriptEngine</code> to use for interpreting the script. @param factory The <code>ScriptEngineManager</code> to use to create the <code>ScriptEngine</code>. @param options The command line options for this <code>ScriptCommand</code>. @return The <code>ScriptEngine</code> to use.
[ "Gets", "the", "<code", ">", "ScriptEngine<", "/", "code", ">", "to", "use", "for", "interpreting", "the", "script", "." ]
train
https://github.com/bwkimmel/jdcp/blob/630c5150c245054e2556ff370f4bad2ec793dfb7/jdcp-console/src/main/java/ca/eandb/jdcp/client/ScriptCommand.java#L121-L134
kiegroup/jbpm
jbpm-services/jbpm-kie-services/src/main/java/org/jbpm/kie/services/impl/CommonUtils.java
CommonUtils.getCallbackUserRoles
public static List<String> getCallbackUserRoles(UserGroupCallback userGroupCallback, String userId) { List<String> roles = userGroupCallback != null ? userGroupCallback.getGroupsForUser(userId) : new ArrayList<>(); if (roles == null || roles.isEmpty()) { roles = new ArrayList<>(); roles.add(""); } return...
java
public static List<String> getCallbackUserRoles(UserGroupCallback userGroupCallback, String userId) { List<String> roles = userGroupCallback != null ? userGroupCallback.getGroupsForUser(userId) : new ArrayList<>(); if (roles == null || roles.isEmpty()) { roles = new ArrayList<>(); roles.add(""); } return...
[ "public", "static", "List", "<", "String", ">", "getCallbackUserRoles", "(", "UserGroupCallback", "userGroupCallback", ",", "String", "userId", ")", "{", "List", "<", "String", ">", "roles", "=", "userGroupCallback", "!=", "null", "?", "userGroupCallback", ".", ...
to compensate https://hibernate.atlassian.net/browse/HHH-8091 add empty element to the roles in case it's empty
[ "to", "compensate", "https", ":", "//", "hibernate", ".", "atlassian", ".", "net", "/", "browse", "/", "HHH", "-", "8091", "add", "empty", "element", "to", "the", "roles", "in", "case", "it", "s", "empty" ]
train
https://github.com/kiegroup/jbpm/blob/c3473c728aa382ebbea01e380c5e754a96647b82/jbpm-services/jbpm-kie-services/src/main/java/org/jbpm/kie/services/impl/CommonUtils.java#L60-L68
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/Long.java
Long.getLong
public static Long getLong(String nm, long val) { Long result = Long.getLong(nm, null); return (result == null) ? Long.valueOf(val) : result; }
java
public static Long getLong(String nm, long val) { Long result = Long.getLong(nm, null); return (result == null) ? Long.valueOf(val) : result; }
[ "public", "static", "Long", "getLong", "(", "String", "nm", ",", "long", "val", ")", "{", "Long", "result", "=", "Long", ".", "getLong", "(", "nm", ",", "null", ")", ";", "return", "(", "result", "==", "null", ")", "?", "Long", ".", "valueOf", "(",...
Determines the {@code long} value of the system property with the specified name. <p>The first argument is treated as the name of a system property. System properties are accessible through the {@link java.lang.System#getProperty(java.lang.String)} method. The string value of this property is then interpreted as a {@...
[ "Determines", "the", "{", "@code", "long", "}", "value", "of", "the", "system", "property", "with", "the", "specified", "name", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/Long.java#L1004-L1007
alipay/sofa-rpc
core-impl/client/src/main/java/com/alipay/sofa/rpc/client/AllConnectConnectionHolder.java
AllConnectConnectionHolder.addAlive
protected void addAlive(ProviderInfo providerInfo, ClientTransport transport) { if (checkState(providerInfo, transport)) { aliveConnections.put(providerInfo, transport); } }
java
protected void addAlive(ProviderInfo providerInfo, ClientTransport transport) { if (checkState(providerInfo, transport)) { aliveConnections.put(providerInfo, transport); } }
[ "protected", "void", "addAlive", "(", "ProviderInfo", "providerInfo", ",", "ClientTransport", "transport", ")", "{", "if", "(", "checkState", "(", "providerInfo", ",", "transport", ")", ")", "{", "aliveConnections", ".", "put", "(", "providerInfo", ",", "transpo...
Add alive. @param providerInfo the provider @param transport the transport
[ "Add", "alive", "." ]
train
https://github.com/alipay/sofa-rpc/blob/a31406410291e56696185a29c3ba4bd1f54488fd/core-impl/client/src/main/java/com/alipay/sofa/rpc/client/AllConnectConnectionHolder.java#L123-L127
OpenLiberty/open-liberty
dev/com.ibm.ws.logging.core/src/com/ibm/websphere/ras/Tr.java
Tr.formatMessage
public static String formatMessage(TraceComponent tc, Enumeration<Locale> locales, String msgKey, Object... objs) { return formatMessage(tc, (locales == null) ? null : Collections.list(locales), msgKey, objs); }
java
public static String formatMessage(TraceComponent tc, Enumeration<Locale> locales, String msgKey, Object... objs) { return formatMessage(tc, (locales == null) ? null : Collections.list(locales), msgKey, objs); }
[ "public", "static", "String", "formatMessage", "(", "TraceComponent", "tc", ",", "Enumeration", "<", "Locale", ">", "locales", ",", "String", "msgKey", ",", "Object", "...", "objs", ")", "{", "return", "formatMessage", "(", "tc", ",", "(", "locales", "==", ...
Like {@link #formatMessage(TraceComponent, List, String, Object...)}, but takes an Enumeration of Locales. @see #formatMessage(TraceComponent, List, String, Object...)
[ "Like", "{", "@link", "#formatMessage", "(", "TraceComponent", "List", "String", "Object", "...", ")", "}", "but", "takes", "an", "Enumeration", "of", "Locales", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.logging.core/src/com/ibm/websphere/ras/Tr.java#L695-L697
joniles/mpxj
src/main/java/net/sf/mpxj/json/JsonStreamWriter.java
JsonStreamWriter.internalWriteNameValuePair
private void internalWriteNameValuePair(String name, String value) throws IOException { writeComma(); writeNewLineIndent(); writeName(name); if (m_pretty) { m_writer.write(' '); } m_writer.write(value); }
java
private void internalWriteNameValuePair(String name, String value) throws IOException { writeComma(); writeNewLineIndent(); writeName(name); if (m_pretty) { m_writer.write(' '); } m_writer.write(value); }
[ "private", "void", "internalWriteNameValuePair", "(", "String", "name", ",", "String", "value", ")", "throws", "IOException", "{", "writeComma", "(", ")", ";", "writeNewLineIndent", "(", ")", ";", "writeName", "(", "name", ")", ";", "if", "(", "m_pretty", ")...
Core write attribute implementation. @param name attribute name @param value attribute value
[ "Core", "write", "attribute", "implementation", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/json/JsonStreamWriter.java#L206-L218
m-m-m/util
io/src/main/java/net/sf/mmm/util/io/impl/ProcessableDetectorStream.java
ProcessableDetectorStream.processInternal
public void processInternal(ByteArray buffer, boolean eos) throws IOException { if (buffer != null) { this.firstBuffer.append(buffer); } this.firstBuffer.process(getMutableMetadata(), eos); if (eos) { setDone(); } }
java
public void processInternal(ByteArray buffer, boolean eos) throws IOException { if (buffer != null) { this.firstBuffer.append(buffer); } this.firstBuffer.process(getMutableMetadata(), eos); if (eos) { setDone(); } }
[ "public", "void", "processInternal", "(", "ByteArray", "buffer", ",", "boolean", "eos", ")", "throws", "IOException", "{", "if", "(", "buffer", "!=", "null", ")", "{", "this", ".", "firstBuffer", ".", "append", "(", "buffer", ")", ";", "}", "this", ".", ...
@see DetectorStreamProcessor#process(net.sf.mmm.util.io.api.spi.DetectorStreamBuffer, Map, boolean) @param buffer is the next part of the streamed data. @param eos - {@code true} if the end of the stream has been reached and the given {@code buffer} has to be @throws IOException in case of an Input/Output error. Shoul...
[ "@see", "DetectorStreamProcessor#process", "(", "net", ".", "sf", ".", "mmm", ".", "util", ".", "io", ".", "api", ".", "spi", ".", "DetectorStreamBuffer", "Map", "boolean", ")" ]
train
https://github.com/m-m-m/util/blob/f0e4e084448f8dfc83ca682a9e1618034a094ce6/io/src/main/java/net/sf/mmm/util/io/impl/ProcessableDetectorStream.java#L73-L82
apache/spark
common/unsafe/src/main/java/org/apache/spark/unsafe/types/ByteArray.java
ByteArray.writeToMemory
public static void writeToMemory(byte[] src, Object target, long targetOffset) { Platform.copyMemory(src, Platform.BYTE_ARRAY_OFFSET, target, targetOffset, src.length); }
java
public static void writeToMemory(byte[] src, Object target, long targetOffset) { Platform.copyMemory(src, Platform.BYTE_ARRAY_OFFSET, target, targetOffset, src.length); }
[ "public", "static", "void", "writeToMemory", "(", "byte", "[", "]", "src", ",", "Object", "target", ",", "long", "targetOffset", ")", "{", "Platform", ".", "copyMemory", "(", "src", ",", "Platform", ".", "BYTE_ARRAY_OFFSET", ",", "target", ",", "targetOffset...
Writes the content of a byte array into a memory address, identified by an object and an offset. The target memory address must already been allocated, and have enough space to hold all the bytes in this string.
[ "Writes", "the", "content", "of", "a", "byte", "array", "into", "a", "memory", "address", "identified", "by", "an", "object", "and", "an", "offset", ".", "The", "target", "memory", "address", "must", "already", "been", "allocated", "and", "have", "enough", ...
train
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/common/unsafe/src/main/java/org/apache/spark/unsafe/types/ByteArray.java#L35-L37
jmrozanec/cron-utils
src/main/java/com/cronutils/model/time/TimeNode.java
TimeNode.getNearestBackwardValue
@VisibleForTesting NearestValue getNearestBackwardValue(final int reference, int shiftsToApply) { final List<Integer> temporaryValues = new ArrayList<>(this.values); Collections.reverse(temporaryValues); int index = 0; boolean foundSmaller = false; final AtomicInteger shift =...
java
@VisibleForTesting NearestValue getNearestBackwardValue(final int reference, int shiftsToApply) { final List<Integer> temporaryValues = new ArrayList<>(this.values); Collections.reverse(temporaryValues); int index = 0; boolean foundSmaller = false; final AtomicInteger shift =...
[ "@", "VisibleForTesting", "NearestValue", "getNearestBackwardValue", "(", "final", "int", "reference", ",", "int", "shiftsToApply", ")", "{", "final", "List", "<", "Integer", ">", "temporaryValues", "=", "new", "ArrayList", "<>", "(", "this", ".", "values", ")",...
We return same reference value if matches or previous one if does not match. Then we start applying shifts. This way we ensure same value is returned if no shift is requested. @param reference - reference value @param shiftsToApply - shifts to apply @return NearestValue instance, never null. Holds information on n...
[ "We", "return", "same", "reference", "value", "if", "matches", "or", "previous", "one", "if", "does", "not", "match", ".", "Then", "we", "start", "applying", "shifts", ".", "This", "way", "we", "ensure", "same", "value", "is", "returned", "if", "no", "sh...
train
https://github.com/jmrozanec/cron-utils/blob/adac5ec8fd9160b082f9762a6eedea0715731170/src/main/java/com/cronutils/model/time/TimeNode.java#L91-L119
elki-project/elki
elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/linearalgebra/pca/weightfunctions/ErfcStddevWeight.java
ErfcStddevWeight.getWeight
@Override public double getWeight(double distance, double max, double stddev) { if(stddev <= 0) { return 1; } return NormalDistribution.erfc(MathUtil.SQRTHALF * distance / stddev); }
java
@Override public double getWeight(double distance, double max, double stddev) { if(stddev <= 0) { return 1; } return NormalDistribution.erfc(MathUtil.SQRTHALF * distance / stddev); }
[ "@", "Override", "public", "double", "getWeight", "(", "double", "distance", ",", "double", "max", ",", "double", "stddev", ")", "{", "if", "(", "stddev", "<=", "0", ")", "{", "return", "1", ";", "}", "return", "NormalDistribution", ".", "erfc", "(", "...
Return Erfc weight, scaled by standard deviation. max is ignored.
[ "Return", "Erfc", "weight", "scaled", "by", "standard", "deviation", ".", "max", "is", "ignored", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/linearalgebra/pca/weightfunctions/ErfcStddevWeight.java#L39-L45
pressgang-ccms/PressGangCCMSContentSpec
src/main/java/org/jboss/pressgang/ccms/contentspec/BaseLevel.java
BaseLevel.getClosestTopicByDBId
public SpecTopic getClosestTopicByDBId(final Integer DBId, final SpecNode callerNode, final boolean checkParentNode) { final SpecTopic retValue = super.getClosestTopicByDBId(DBId, callerNode, checkParentNode); if (retValue != null) { return retValue; } else { // Look up t...
java
public SpecTopic getClosestTopicByDBId(final Integer DBId, final SpecNode callerNode, final boolean checkParentNode) { final SpecTopic retValue = super.getClosestTopicByDBId(DBId, callerNode, checkParentNode); if (retValue != null) { return retValue; } else { // Look up t...
[ "public", "SpecTopic", "getClosestTopicByDBId", "(", "final", "Integer", "DBId", ",", "final", "SpecNode", "callerNode", ",", "final", "boolean", "checkParentNode", ")", "{", "final", "SpecTopic", "retValue", "=", "super", ".", "getClosestTopicByDBId", "(", "DBId", ...
This function checks the levels nodes and child nodes to see if it can match a spec topic for a topic database id. @param DBId The topic database id @param callerNode The node that called this function so that it isn't rechecked @param checkParentNode If the function should check the levels parents as ...
[ "This", "function", "checks", "the", "levels", "nodes", "and", "child", "nodes", "to", "see", "if", "it", "can", "match", "a", "spec", "topic", "for", "a", "topic", "database", "id", "." ]
train
https://github.com/pressgang-ccms/PressGangCCMSContentSpec/blob/2bc02e2971e4522b47a130fb7ae5a0f5ad377df1/src/main/java/org/jboss/pressgang/ccms/contentspec/BaseLevel.java#L73-L91
micronaut-projects/micronaut-core
cli/src/main/groovy/io/micronaut/cli/io/support/AntPathMatcher.java
AntPathMatcher.matchStrings
private boolean matchStrings(String pattern, String str, Map<String, String> uriTemplateVariables) { AntPathStringMatcher matcher = new AntPathStringMatcher(pattern, str, uriTemplateVariables); return matcher.matchStrings(); }
java
private boolean matchStrings(String pattern, String str, Map<String, String> uriTemplateVariables) { AntPathStringMatcher matcher = new AntPathStringMatcher(pattern, str, uriTemplateVariables); return matcher.matchStrings(); }
[ "private", "boolean", "matchStrings", "(", "String", "pattern", ",", "String", "str", ",", "Map", "<", "String", ",", "String", ">", "uriTemplateVariables", ")", "{", "AntPathStringMatcher", "matcher", "=", "new", "AntPathStringMatcher", "(", "pattern", ",", "st...
Tests whether or not a string matches against a pattern. The pattern may contain two special characters:<br> '*' means zero or more characters<br> '?' means one and only one character @param pattern pattern to match against. Must not be <code>null</code>. @param str string which must be matched against the pattern...
[ "Tests", "whether", "or", "not", "a", "string", "matches", "against", "a", "pattern", ".", "The", "pattern", "may", "contain", "two", "special", "characters", ":", "<br", ">", "*", "means", "zero", "or", "more", "characters<br", ">", "?", "means", "one", ...
train
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/cli/src/main/groovy/io/micronaut/cli/io/support/AntPathMatcher.java#L243-L246
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/AccountsImpl.java
AccountsImpl.listNodeAgentSkus
public PagedList<NodeAgentSku> listNodeAgentSkus(final AccountListNodeAgentSkusOptions accountListNodeAgentSkusOptions) { ServiceResponseWithHeaders<Page<NodeAgentSku>, AccountListNodeAgentSkusHeaders> response = listNodeAgentSkusSinglePageAsync(accountListNodeAgentSkusOptions).toBlocking().single(); re...
java
public PagedList<NodeAgentSku> listNodeAgentSkus(final AccountListNodeAgentSkusOptions accountListNodeAgentSkusOptions) { ServiceResponseWithHeaders<Page<NodeAgentSku>, AccountListNodeAgentSkusHeaders> response = listNodeAgentSkusSinglePageAsync(accountListNodeAgentSkusOptions).toBlocking().single(); re...
[ "public", "PagedList", "<", "NodeAgentSku", ">", "listNodeAgentSkus", "(", "final", "AccountListNodeAgentSkusOptions", "accountListNodeAgentSkusOptions", ")", "{", "ServiceResponseWithHeaders", "<", "Page", "<", "NodeAgentSku", ">", ",", "AccountListNodeAgentSkusHeaders", ">"...
Lists all node agent SKUs supported by the Azure Batch service. @param accountListNodeAgentSkusOptions Additional parameters for the operation @throws IllegalArgumentException thrown if parameters fail the validation @throws BatchErrorException thrown if the request is rejected by server @throws RuntimeException all o...
[ "Lists", "all", "node", "agent", "SKUs", "supported", "by", "the", "Azure", "Batch", "service", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/AccountsImpl.java#L208-L223
dkpro/dkpro-argumentation
dkpro-argumentation-types/src/main/java/org/dkpro/argumentation/types/ArgumentUnitUtils.java
ArgumentUnitUtils.getProperty
public static String getProperty(ArgumentUnit argumentUnit, String propertyName) { Properties properties = ArgumentUnitUtils.getProperties(argumentUnit); return (String) properties.get(propertyName); }
java
public static String getProperty(ArgumentUnit argumentUnit, String propertyName) { Properties properties = ArgumentUnitUtils.getProperties(argumentUnit); return (String) properties.get(propertyName); }
[ "public", "static", "String", "getProperty", "(", "ArgumentUnit", "argumentUnit", ",", "String", "propertyName", ")", "{", "Properties", "properties", "=", "ArgumentUnitUtils", ".", "getProperties", "(", "argumentUnit", ")", ";", "return", "(", "String", ")", "pro...
Returns the property value @param argumentUnit argument component @param propertyName property name @return the value to which the specified key is mapped, or {@code null} if this map contains no mapping for the key
[ "Returns", "the", "property", "value" ]
train
https://github.com/dkpro/dkpro-argumentation/blob/57ce6f5e73d8075b7088aeeebb107c85b3d4bbcb/dkpro-argumentation-types/src/main/java/org/dkpro/argumentation/types/ArgumentUnitUtils.java#L170-L174
aws/aws-sdk-java
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/model/ScanResult.java
ScanResult.withItems
public ScanResult withItems(java.util.Map<String, AttributeValue>... items) { if (this.items == null) { setItems(new java.util.ArrayList<java.util.Map<String, AttributeValue>>(items.length)); } for (java.util.Map<String, AttributeValue> ele : items) { this.items.add(ele);...
java
public ScanResult withItems(java.util.Map<String, AttributeValue>... items) { if (this.items == null) { setItems(new java.util.ArrayList<java.util.Map<String, AttributeValue>>(items.length)); } for (java.util.Map<String, AttributeValue> ele : items) { this.items.add(ele);...
[ "public", "ScanResult", "withItems", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "AttributeValue", ">", "...", "items", ")", "{", "if", "(", "this", ".", "items", "==", "null", ")", "{", "setItems", "(", "new", "java", ".", "util", ".",...
<p> An array of item attributes that match the scan criteria. Each element in this array consists of an attribute name and the value for that attribute. </p> <p> <b>NOTE:</b> This method appends the values to the existing list (if any). Use {@link #setItems(java.util.Collection)} or {@link #withItems(java.util.Collecti...
[ "<p", ">", "An", "array", "of", "item", "attributes", "that", "match", "the", "scan", "criteria", ".", "Each", "element", "in", "this", "array", "consists", "of", "an", "attribute", "name", "and", "the", "value", "for", "that", "attribute", ".", "<", "/"...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/model/ScanResult.java#L142-L150
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WMenuItemRenderer.java
WMenuItemRenderer.doRender
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { WMenuItem item = (WMenuItem) component; XmlStringBuilder xml = renderContext.getWriter(); xml.appendTagOpen("ui:menuitem"); xml.appendAttribute("id", component.getId()); xml.appendOptionalAttribute("class",...
java
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { WMenuItem item = (WMenuItem) component; XmlStringBuilder xml = renderContext.getWriter(); xml.appendTagOpen("ui:menuitem"); xml.appendAttribute("id", component.getId()); xml.appendOptionalAttribute("class",...
[ "@", "Override", "public", "void", "doRender", "(", "final", "WComponent", "component", ",", "final", "WebXmlRenderContext", "renderContext", ")", "{", "WMenuItem", "item", "=", "(", "WMenuItem", ")", "component", ";", "XmlStringBuilder", "xml", "=", "renderContex...
Paints the given WMenuItem. @param component the WMenuItem to paint. @param renderContext the RenderContext to paint to.
[ "Paints", "the", "given", "WMenuItem", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WMenuItemRenderer.java#L50-L84
logic-ng/LogicNG
src/main/java/org/logicng/backbones/MiniSatBackbone.java
MiniSatBackbone.isUnit
private boolean isUnit(final int lit, final MSClause clause) { for (int i = 0; i < clause.size(); ++i) { final int clauseLit = clause.get(i); if (lit != clauseLit && this.model.get(var(clauseLit)) != sign(clauseLit)) { return false; } } return ...
java
private boolean isUnit(final int lit, final MSClause clause) { for (int i = 0; i < clause.size(); ++i) { final int clauseLit = clause.get(i); if (lit != clauseLit && this.model.get(var(clauseLit)) != sign(clauseLit)) { return false; } } return ...
[ "private", "boolean", "isUnit", "(", "final", "int", "lit", ",", "final", "MSClause", "clause", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "clause", ".", "size", "(", ")", ";", "++", "i", ")", "{", "final", "int", "clauseLit", "="...
Tests the given literal whether it is unit in the given clause. @param lit literal to test @param clause clause containing the literal @return {@code true} if the literal is unit, {@code false} otherwise
[ "Tests", "the", "given", "literal", "whether", "it", "is", "unit", "in", "the", "given", "clause", "." ]
train
https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/backbones/MiniSatBackbone.java#L281-L289
meertensinstituut/mtas
src/main/java/mtas/search/spans/util/MtasIgnoreItem.java
MtasIgnoreItem.getMinStartPosition
public int getMinStartPosition(int docId, int position) throws IOException { if (ignoreSpans != null && docId == currentDocId) { if (position < minimumPosition) { throw new IOException( "Unexpected position, should be >= " + minimumPosition + "!"); } else { computeFullStartPo...
java
public int getMinStartPosition(int docId, int position) throws IOException { if (ignoreSpans != null && docId == currentDocId) { if (position < minimumPosition) { throw new IOException( "Unexpected position, should be >= " + minimumPosition + "!"); } else { computeFullStartPo...
[ "public", "int", "getMinStartPosition", "(", "int", "docId", ",", "int", "position", ")", "throws", "IOException", "{", "if", "(", "ignoreSpans", "!=", "null", "&&", "docId", "==", "currentDocId", ")", "{", "if", "(", "position", "<", "minimumPosition", ")",...
Gets the min start position. @param docId the doc id @param position the position @return the min start position @throws IOException Signals that an I/O exception has occurred.
[ "Gets", "the", "min", "start", "position", "." ]
train
https://github.com/meertensinstituut/mtas/blob/f02ae730848616bd88b553efa7f9eddc32818e64/src/main/java/mtas/search/spans/util/MtasIgnoreItem.java#L118-L134
bazaarvoice/emodb
uac-api/src/main/java/com/bazaarvoice/emodb/uac/api/UserAccessControlRequest.java
UserAccessControlRequest.setCustomRequestParameter
public void setCustomRequestParameter(String param, String... values) { _customRequestParameters.putAll(param, Arrays.asList(values)); }
java
public void setCustomRequestParameter(String param, String... values) { _customRequestParameters.putAll(param, Arrays.asList(values)); }
[ "public", "void", "setCustomRequestParameter", "(", "String", "param", ",", "String", "...", "values", ")", "{", "_customRequestParameters", ".", "putAll", "(", "param", ",", "Arrays", ".", "asList", "(", "values", ")", ")", ";", "}" ]
Sets custom request parameters. Custom parameters may include new features not yet officially supported or additional parameters to existing calls not intended for widespread use. As such this method is not typically used by most clients. Furthermore, adding additional parameters may cause the request to fail.
[ "Sets", "custom", "request", "parameters", ".", "Custom", "parameters", "may", "include", "new", "features", "not", "yet", "officially", "supported", "or", "additional", "parameters", "to", "existing", "calls", "not", "intended", "for", "widespread", "use", ".", ...
train
https://github.com/bazaarvoice/emodb/blob/97ec7671bc78b47fc2a1c11298c0c872bd5ec7fb/uac-api/src/main/java/com/bazaarvoice/emodb/uac/api/UserAccessControlRequest.java#L21-L23
GoogleCloudPlatform/appengine-mapreduce
java/src/main/java/com/google/appengine/tools/mapreduce/inputs/DatastoreShardStrategy.java
DatastoreShardStrategy.getScatterSplitPoints
private List<Range> getScatterSplitPoints(String namespace, String kind, final int numSegments) { Query query = createQuery(namespace, kind).addSort(SCATTER_RESERVED_PROPERTY).setKeysOnly(); List<Key> splitPoints = sortKeys(runQuery(query, numSegments - 1)); List<Range> result = new ArrayList<>(splitPoints....
java
private List<Range> getScatterSplitPoints(String namespace, String kind, final int numSegments) { Query query = createQuery(namespace, kind).addSort(SCATTER_RESERVED_PROPERTY).setKeysOnly(); List<Key> splitPoints = sortKeys(runQuery(query, numSegments - 1)); List<Range> result = new ArrayList<>(splitPoints....
[ "private", "List", "<", "Range", ">", "getScatterSplitPoints", "(", "String", "namespace", ",", "String", "kind", ",", "final", "int", "numSegments", ")", "{", "Query", "query", "=", "createQuery", "(", "namespace", ",", "kind", ")", ".", "addSort", "(", "...
Uses the scatter property to distribute ranges to segments. A random scatter property is added to 1 out of every 512 entities see: https://github.com/GoogleCloudPlatform/appengine-mapreduce/wiki/ScatterPropertyImplementation Retrieving the entities with the highest scatter values provides a random sample of entities....
[ "Uses", "the", "scatter", "property", "to", "distribute", "ranges", "to", "segments", "." ]
train
https://github.com/GoogleCloudPlatform/appengine-mapreduce/blob/2045eb3605b6ecb40c83d11dd5442a89fe5c5dd6/java/src/main/java/com/google/appengine/tools/mapreduce/inputs/DatastoreShardStrategy.java#L258-L270
square/javapoet
src/main/java/com/squareup/javapoet/ClassName.java
ClassName.get
public static ClassName get(String packageName, String simpleName, String... simpleNames) { ClassName className = new ClassName(packageName, null, simpleName); for (String name : simpleNames) { className = className.nestedClass(name); } return className; }
java
public static ClassName get(String packageName, String simpleName, String... simpleNames) { ClassName className = new ClassName(packageName, null, simpleName); for (String name : simpleNames) { className = className.nestedClass(name); } return className; }
[ "public", "static", "ClassName", "get", "(", "String", "packageName", ",", "String", "simpleName", ",", "String", "...", "simpleNames", ")", "{", "ClassName", "className", "=", "new", "ClassName", "(", "packageName", ",", "null", ",", "simpleName", ")", ";", ...
Returns a class name created from the given parts. For example, calling this with package name {@code "java.util"} and simple names {@code "Map"}, {@code "Entry"} yields {@link Map.Entry}.
[ "Returns", "a", "class", "name", "created", "from", "the", "given", "parts", ".", "For", "example", "calling", "this", "with", "package", "name", "{" ]
train
https://github.com/square/javapoet/blob/0f93da9a3d9a1da8d29fc993409fcf83d40452bc/src/main/java/com/squareup/javapoet/ClassName.java#L214-L220
kaazing/gateway
util/src/main/java/org/kaazing/gateway/util/asn1/Asn1Utils.java
Asn1Utils.decodeOctetString
public static short[] decodeOctetString(ByteBuffer buf) { DerId id = DerId.decode(buf); if (!id.matches(DerId.TagClass.UNIVERSAL, ASN1_OCTET_STRING_TAG_NUM)) { throw new IllegalArgumentException("Expected OCTET STRING identifier, received " + id); } int len = DerUtils.decodeL...
java
public static short[] decodeOctetString(ByteBuffer buf) { DerId id = DerId.decode(buf); if (!id.matches(DerId.TagClass.UNIVERSAL, ASN1_OCTET_STRING_TAG_NUM)) { throw new IllegalArgumentException("Expected OCTET STRING identifier, received " + id); } int len = DerUtils.decodeL...
[ "public", "static", "short", "[", "]", "decodeOctetString", "(", "ByteBuffer", "buf", ")", "{", "DerId", "id", "=", "DerId", ".", "decode", "(", "buf", ")", ";", "if", "(", "!", "id", ".", "matches", "(", "DerId", ".", "TagClass", ".", "UNIVERSAL", "...
Decode an ASN.1 OCTET STRING. @param buf the DER-encoded OCTET STRING @return the octets
[ "Decode", "an", "ASN", ".", "1", "OCTET", "STRING", "." ]
train
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/util/src/main/java/org/kaazing/gateway/util/asn1/Asn1Utils.java#L195-L209
deeplearning4j/deeplearning4j
datavec/datavec-spark/src/main/java/org/datavec/spark/transform/utils/SparkUtils.java
SparkUtils.writeStringToFile
public static void writeStringToFile(String path, String toWrite, Configuration hadoopConfig) throws IOException { FileSystem fileSystem = FileSystem.get(hadoopConfig); try (BufferedOutputStream bos = new BufferedOutputStream(fileSystem.create(new Path(path)))) { bos.write(toWrite.getBytes("...
java
public static void writeStringToFile(String path, String toWrite, Configuration hadoopConfig) throws IOException { FileSystem fileSystem = FileSystem.get(hadoopConfig); try (BufferedOutputStream bos = new BufferedOutputStream(fileSystem.create(new Path(path)))) { bos.write(toWrite.getBytes("...
[ "public", "static", "void", "writeStringToFile", "(", "String", "path", ",", "String", "toWrite", ",", "Configuration", "hadoopConfig", ")", "throws", "IOException", "{", "FileSystem", "fileSystem", "=", "FileSystem", ".", "get", "(", "hadoopConfig", ")", ";", "...
Write a String to a file (on HDFS or local) in UTF-8 format @param path Path to write to @param toWrite String to write @param hadoopConfig Hadoop configuration, for example from SparkContext.hadoopConfiguration()
[ "Write", "a", "String", "to", "a", "file", "(", "on", "HDFS", "or", "local", ")", "in", "UTF", "-", "8", "format" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/datavec/datavec-spark/src/main/java/org/datavec/spark/transform/utils/SparkUtils.java#L96-L101
WiQuery/wiquery
wiquery-jquery-ui/src/main/java/org/odlabs/wiquery/ui/draggable/DraggableContainment.java
DraggableContainment.setArrayParam
public void setArrayParam(Integer x1, Integer y1, Integer x2, Integer y2) { ArrayItemOptions<IntegerItemOptions> tempArrayParam = new ArrayItemOptions<IntegerItemOptions>(); tempArrayParam.add(new IntegerItemOptions(x1)); tempArrayParam.add(new IntegerItemOptions(y1)); tempArrayParam.add(new IntegerItemOpti...
java
public void setArrayParam(Integer x1, Integer y1, Integer x2, Integer y2) { ArrayItemOptions<IntegerItemOptions> tempArrayParam = new ArrayItemOptions<IntegerItemOptions>(); tempArrayParam.add(new IntegerItemOptions(x1)); tempArrayParam.add(new IntegerItemOptions(y1)); tempArrayParam.add(new IntegerItemOpti...
[ "public", "void", "setArrayParam", "(", "Integer", "x1", ",", "Integer", "y1", ",", "Integer", "x2", ",", "Integer", "y2", ")", "{", "ArrayItemOptions", "<", "IntegerItemOptions", ">", "tempArrayParam", "=", "new", "ArrayItemOptions", "<", "IntegerItemOptions", ...
Set's the array parameter @param x1 First x coordinate @param y1 First y coordinate @param x2 Second x coordinate @param y2 Second y coordinate
[ "Set", "s", "the", "array", "parameter" ]
train
https://github.com/WiQuery/wiquery/blob/1b8d60c7a3c37b90fd68c9cd0ff97178fcbcbb08/wiquery-jquery-ui/src/main/java/org/odlabs/wiquery/ui/draggable/DraggableContainment.java#L256-L266
cdk/cdk
base/standard/src/main/java/org/openscience/cdk/tools/manipulator/ChemModelManipulator.java
ChemModelManipulator.setAtomProperties
public static void setAtomProperties(IChemModel chemModel, Object propKey, Object propVal) { if (chemModel.getMoleculeSet() != null) { MoleculeSetManipulator.setAtomProperties(chemModel.getMoleculeSet(), propKey, propVal); } if (chemModel.getReactionSet() != null) { React...
java
public static void setAtomProperties(IChemModel chemModel, Object propKey, Object propVal) { if (chemModel.getMoleculeSet() != null) { MoleculeSetManipulator.setAtomProperties(chemModel.getMoleculeSet(), propKey, propVal); } if (chemModel.getReactionSet() != null) { React...
[ "public", "static", "void", "setAtomProperties", "(", "IChemModel", "chemModel", ",", "Object", "propKey", ",", "Object", "propVal", ")", "{", "if", "(", "chemModel", ".", "getMoleculeSet", "(", ")", "!=", "null", ")", "{", "MoleculeSetManipulator", ".", "setA...
Sets the AtomProperties of all Atoms inside an IChemModel. @param chemModel The IChemModel object. @param propKey The key of the property. @param propVal The value of the property.
[ "Sets", "the", "AtomProperties", "of", "all", "Atoms", "inside", "an", "IChemModel", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/tools/manipulator/ChemModelManipulator.java#L285-L295
Mthwate/DatLib
src/main/java/com/mthwate/datlib/HashUtils.java
HashUtils.hashHex
public static String hashHex(byte[] data, String alg) throws NoSuchAlgorithmException { return toHex(hash(data, alg)); }
java
public static String hashHex(byte[] data, String alg) throws NoSuchAlgorithmException { return toHex(hash(data, alg)); }
[ "public", "static", "String", "hashHex", "(", "byte", "[", "]", "data", ",", "String", "alg", ")", "throws", "NoSuchAlgorithmException", "{", "return", "toHex", "(", "hash", "(", "data", ",", "alg", ")", ")", ";", "}" ]
Hashes data with the specified hashing algorithm. Returns a hexadecimal result. @since 1.1 @param data the data to hash @param alg the hashing algorithm to use @return the hexadecimal hash of the data @throws NoSuchAlgorithmException the algorithm is not supported by existing providers
[ "Hashes", "data", "with", "the", "specified", "hashing", "algorithm", ".", "Returns", "a", "hexadecimal", "result", "." ]
train
https://github.com/Mthwate/DatLib/blob/f0b3a9f9cf6fdc773d4f86234ebd95986c9b6077/src/main/java/com/mthwate/datlib/HashUtils.java#L50-L52
jpush/jmessage-api-java-client
src/main/java/cn/jmessage/api/chatroom/ChatRoomClient.java
ChatRoomClient.addChatRoomMember
public ResponseWrapper addChatRoomMember(long roomId, Members members) throws APIConnectionException, APIRequestException { Preconditions.checkArgument(roomId > 0, "room id is invalid"); Preconditions.checkArgument(members != null, "members should not be empty"); return _httpClient.s...
java
public ResponseWrapper addChatRoomMember(long roomId, Members members) throws APIConnectionException, APIRequestException { Preconditions.checkArgument(roomId > 0, "room id is invalid"); Preconditions.checkArgument(members != null, "members should not be empty"); return _httpClient.s...
[ "public", "ResponseWrapper", "addChatRoomMember", "(", "long", "roomId", ",", "Members", "members", ")", "throws", "APIConnectionException", ",", "APIRequestException", "{", "Preconditions", ".", "checkArgument", "(", "roomId", ">", "0", ",", "\"room id is invalid\"", ...
Add members to chat room @param roomId chat room id @param members {@link Members} @return No content @throws APIConnectionException connect exception @throws APIRequestException request exception
[ "Add", "members", "to", "chat", "room" ]
train
https://github.com/jpush/jmessage-api-java-client/blob/767f5fb15e9fe5a546c00f6e68b64f6dd53c617c/src/main/java/cn/jmessage/api/chatroom/ChatRoomClient.java#L210-L215
bazaarvoice/jolt
cli/src/main/java/com/bazaarvoice/jolt/JoltCliUtilities.java
JoltCliUtilities.readJsonInput
public static Object readJsonInput( File file, boolean suppressOutput ) { Object jsonObject; if ( file == null ) { try { jsonObject = JsonUtils.jsonToMap( System.in ); } catch ( Exception e ) { printToStandardOut( "Failed to process standard input....
java
public static Object readJsonInput( File file, boolean suppressOutput ) { Object jsonObject; if ( file == null ) { try { jsonObject = JsonUtils.jsonToMap( System.in ); } catch ( Exception e ) { printToStandardOut( "Failed to process standard input....
[ "public", "static", "Object", "readJsonInput", "(", "File", "file", ",", "boolean", "suppressOutput", ")", "{", "Object", "jsonObject", ";", "if", "(", "file", "==", "null", ")", "{", "try", "{", "jsonObject", "=", "JsonUtils", ".", "jsonToMap", "(", "Syst...
This method will read in JSON, either from the given file or from standard in if the file is null. An object contain the ingested input is returned. @param file the file to read the input from, or null to use standard in @param suppressOutput suppress output of error messages to standard out @return Object containing ...
[ "This", "method", "will", "read", "in", "JSON", "either", "from", "the", "given", "file", "or", "from", "standard", "in", "if", "the", "file", "is", "null", ".", "An", "object", "contain", "the", "ingested", "input", "is", "returned", "." ]
train
https://github.com/bazaarvoice/jolt/blob/4cf866a9f4222142da41b50dbcccce022a956bff/cli/src/main/java/com/bazaarvoice/jolt/JoltCliUtilities.java#L96-L109
gallandarakhneorg/afc
advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java
RoadNetworkConstants.setPreferredAttributeValuesForTrafficDirection
public static void setPreferredAttributeValuesForTrafficDirection(TrafficDirection direction, String... values) { setPreferredAttributeValuesForTrafficDirection(direction, Arrays.asList(values)); }
java
public static void setPreferredAttributeValuesForTrafficDirection(TrafficDirection direction, String... values) { setPreferredAttributeValuesForTrafficDirection(direction, Arrays.asList(values)); }
[ "public", "static", "void", "setPreferredAttributeValuesForTrafficDirection", "(", "TrafficDirection", "direction", ",", "String", "...", "values", ")", "{", "setPreferredAttributeValuesForTrafficDirection", "(", "direction", ",", "Arrays", ".", "asList", "(", "values", "...
Set the preferred values of traffic direction used in the attributes for the traffic direction on the roads. @param direction a direction @param values are the values for the given direction.
[ "Set", "the", "preferred", "values", "of", "traffic", "direction", "used", "in", "the", "attributes", "for", "the", "traffic", "direction", "on", "the", "roads", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java#L579-L581
hector-client/hector
core/src/main/java/me/prettyprint/cassandra/service/template/SuperCfTemplate.java
SuperCfTemplate.querySuperColumns
public SuperCfResult<K, SN, N> querySuperColumns(K key, HSlicePredicate<SN> predicate) { return doExecuteSlice(key,null,predicate); }
java
public SuperCfResult<K, SN, N> querySuperColumns(K key, HSlicePredicate<SN> predicate) { return doExecuteSlice(key,null,predicate); }
[ "public", "SuperCfResult", "<", "K", ",", "SN", ",", "N", ">", "querySuperColumns", "(", "K", "key", ",", "HSlicePredicate", "<", "SN", ">", "predicate", ")", "{", "return", "doExecuteSlice", "(", "key", ",", "null", ",", "predicate", ")", ";", "}" ]
Query super columns using the provided predicate instead of the internal one @param key @param predicate @return
[ "Query", "super", "columns", "using", "the", "provided", "predicate", "instead", "of", "the", "internal", "one" ]
train
https://github.com/hector-client/hector/blob/a302e68ca8d91b45d332e8c9afd7d98030b54de1/core/src/main/java/me/prettyprint/cassandra/service/template/SuperCfTemplate.java#L146-L148
mkolisnyk/cucumber-reports
cucumber-runner/src/main/java/com/github/mkolisnyk/cucumber/assertions/LazyAssert.java
LazyAssert.assertEquals
public static void assertEquals(String message, Object expected, Object actual) { if (equalsRegardingNull(expected, actual)) { return; } else if (expected instanceof String && actual instanceof String) { String cleanMessage = ""; if (StringUtils.isNotBlank...
java
public static void assertEquals(String message, Object expected, Object actual) { if (equalsRegardingNull(expected, actual)) { return; } else if (expected instanceof String && actual instanceof String) { String cleanMessage = ""; if (StringUtils.isNotBlank...
[ "public", "static", "void", "assertEquals", "(", "String", "message", ",", "Object", "expected", ",", "Object", "actual", ")", "{", "if", "(", "equalsRegardingNull", "(", "expected", ",", "actual", ")", ")", "{", "return", ";", "}", "else", "if", "(", "e...
Asserts that two objects are equal. If they are not, an {@link LazyAssertionError} is thrown with the given message. If <code>expected</code> and <code>actual</code> are <code>null</code>, they are considered equal. @param message the identifying message for the {@link LazyAssertionError} (<code>null</code> okay) @par...
[ "Asserts", "that", "two", "objects", "are", "equal", ".", "If", "they", "are", "not", "an", "{", "@link", "LazyAssertionError", "}", "is", "thrown", "with", "the", "given", "message", ".", "If", "<code", ">", "expected<", "/", "code", ">", "and", "<code"...
train
https://github.com/mkolisnyk/cucumber-reports/blob/9c9a32f15f0bf1eb1d3d181a11bae9c5eec84a8e/cucumber-runner/src/main/java/com/github/mkolisnyk/cucumber/assertions/LazyAssert.java#L112-L126
Stratio/bdt
src/main/java/com/stratio/qa/specs/ZookeeperSpec.java
ZookeeperSpec.createZNode
@When("^I create the zNode '(.+?)'( with content '(.+?)')? which (IS|IS NOT) ephemeral$") public void createZNode(String path, String foo, String content, boolean ephemeral) throws Exception { if (content != null) { commonspec.getZookeeperSecClient().zCreate(path, content, ephemeral); } ...
java
@When("^I create the zNode '(.+?)'( with content '(.+?)')? which (IS|IS NOT) ephemeral$") public void createZNode(String path, String foo, String content, boolean ephemeral) throws Exception { if (content != null) { commonspec.getZookeeperSecClient().zCreate(path, content, ephemeral); } ...
[ "@", "When", "(", "\"^I create the zNode '(.+?)'( with content '(.+?)')? which (IS|IS NOT) ephemeral$\"", ")", "public", "void", "createZNode", "(", "String", "path", ",", "String", "foo", ",", "String", "content", ",", "boolean", "ephemeral", ")", "throws", "Exception", ...
Create zPath and domcument @param path path at zookeeper @param foo a dummy match group @param content if it has content it should be defined @param ephemeral if it's created as ephemeral or not
[ "Create", "zPath", "and", "domcument" ]
train
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/ZookeeperSpec.java#L78-L85
OpenLiberty/open-liberty
dev/wlp-generateRepositoryContent/src/com/ibm/ws/wlp/repository/esa/GenerateEsas.java
GenerateEsas.copy
private void copy(OutputStream out, File in) throws IOException { FileInputStream inStream = null; try { inStream = new FileInputStream(in); byte[] buffer = new byte[4096]; int len; while ((len = inStream.read(buffer)) != -1) { out.write(b...
java
private void copy(OutputStream out, File in) throws IOException { FileInputStream inStream = null; try { inStream = new FileInputStream(in); byte[] buffer = new byte[4096]; int len; while ((len = inStream.read(buffer)) != -1) { out.write(b...
[ "private", "void", "copy", "(", "OutputStream", "out", ",", "File", "in", ")", "throws", "IOException", "{", "FileInputStream", "inStream", "=", "null", ";", "try", "{", "inStream", "=", "new", "FileInputStream", "(", "in", ")", ";", "byte", "[", "]", "b...
Copies the file to the output stream @param out The stream to write to @param in The file to write @throws IOException If something goes wrong
[ "Copies", "the", "file", "to", "the", "output", "stream" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/wlp-generateRepositoryContent/src/com/ibm/ws/wlp/repository/esa/GenerateEsas.java#L733-L748
b3dgs/lionengine
lionengine-core/src/main/java/com/b3dgs/lionengine/Check.java
Check.inferiorStrict
public static void inferiorStrict(int a, int b) { if (a >= b) { throw new LionEngineException(ERROR_ARGUMENT + String.valueOf(a) + ERROR_INFERIOR_STRICT + ...
java
public static void inferiorStrict(int a, int b) { if (a >= b) { throw new LionEngineException(ERROR_ARGUMENT + String.valueOf(a) + ERROR_INFERIOR_STRICT + ...
[ "public", "static", "void", "inferiorStrict", "(", "int", "a", ",", "int", "b", ")", "{", "if", "(", "a", ">=", "b", ")", "{", "throw", "new", "LionEngineException", "(", "ERROR_ARGUMENT", "+", "String", ".", "valueOf", "(", "a", ")", "+", "ERROR_INFER...
Check if <code>a</code> is strictly inferior to <code>b</code>. @param a The parameter to test. @param b The parameter to compare to. @throws LionEngineException If check failed.
[ "Check", "if", "<code", ">", "a<", "/", "code", ">", "is", "strictly", "inferior", "to", "<code", ">", "b<", "/", "code", ">", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-core/src/main/java/com/b3dgs/lionengine/Check.java#L148-L157
cqframework/clinical_quality_language
Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/ElmBaseVisitor.java
ElmBaseVisitor.visitIntervalTypeSpecifier
public T visitIntervalTypeSpecifier(IntervalTypeSpecifier elm, C context) { visitElement(elm.getPointType(), context); return null; }
java
public T visitIntervalTypeSpecifier(IntervalTypeSpecifier elm, C context) { visitElement(elm.getPointType(), context); return null; }
[ "public", "T", "visitIntervalTypeSpecifier", "(", "IntervalTypeSpecifier", "elm", ",", "C", "context", ")", "{", "visitElement", "(", "elm", ".", "getPointType", "(", ")", ",", "context", ")", ";", "return", "null", ";", "}" ]
Visit a IntervalTypeSpecifier. This method will be called for every node in the tree that is a IntervalTypeSpecifier. @param elm the ELM tree @param context the context passed to the visitor @return the visitor result
[ "Visit", "a", "IntervalTypeSpecifier", ".", "This", "method", "will", "be", "called", "for", "every", "node", "in", "the", "tree", "that", "is", "a", "IntervalTypeSpecifier", "." ]
train
https://github.com/cqframework/clinical_quality_language/blob/67459d1ef453e49db8d7c5c86e87278377ed0a0b/Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/ElmBaseVisitor.java#L71-L74
OpenNTF/JavascriptAggregator
jaggr-core/src/main/java/com/ibm/jaggr/core/util/SignalUtil.java
SignalUtil.logResuming
static void logResuming(String callerClass, String callerMethod, Object waitObj, long start) { long elapsed = (System.currentTimeMillis() - start)/1000; log.logp(Level.WARNING, callerClass, callerMethod, Messages.SignalUtil_2, new Object[]{Thread.currentThread().getId(), elapsed, waitObj}); }
java
static void logResuming(String callerClass, String callerMethod, Object waitObj, long start) { long elapsed = (System.currentTimeMillis() - start)/1000; log.logp(Level.WARNING, callerClass, callerMethod, Messages.SignalUtil_2, new Object[]{Thread.currentThread().getId(), elapsed, waitObj}); }
[ "static", "void", "logResuming", "(", "String", "callerClass", ",", "String", "callerMethod", ",", "Object", "waitObj", ",", "long", "start", ")", "{", "long", "elapsed", "=", "(", "System", ".", "currentTimeMillis", "(", ")", "-", "start", ")", "/", "1000...
Logs a warning level message indicating that a thread which has previously been reported as stuck is now resuming. @param callerClass the class name of the caller @param callerMethod the method name of the caller @param waitObj the object that is being waited on @param start the time that the wait began
[ "Logs", "a", "warning", "level", "message", "indicating", "that", "a", "thread", "which", "has", "previously", "been", "reported", "as", "stuck", "is", "now", "resuming", "." ]
train
https://github.com/OpenNTF/JavascriptAggregator/blob/9f47a96d778251638b1df9a368462176216d5b29/jaggr-core/src/main/java/com/ibm/jaggr/core/util/SignalUtil.java#L162-L166
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java
FileUtil.getWriter
public static BufferedWriter getWriter(String path, Charset charset, boolean isAppend) throws IORuntimeException { return getWriter(touch(path), charset, isAppend); }
java
public static BufferedWriter getWriter(String path, Charset charset, boolean isAppend) throws IORuntimeException { return getWriter(touch(path), charset, isAppend); }
[ "public", "static", "BufferedWriter", "getWriter", "(", "String", "path", ",", "Charset", "charset", ",", "boolean", "isAppend", ")", "throws", "IORuntimeException", "{", "return", "getWriter", "(", "touch", "(", "path", ")", ",", "charset", ",", "isAppend", "...
获得一个带缓存的写入对象 @param path 输出路径,绝对路径 @param charset 字符集 @param isAppend 是否追加 @return BufferedReader对象 @throws IORuntimeException IO异常
[ "获得一个带缓存的写入对象" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java#L2598-L2600
zaproxy/zaproxy
src/org/zaproxy/zap/extension/script/ScriptVars.java
ScriptVars.setScriptVarImpl
private static void setScriptVarImpl(String scriptName, String key, String value) { validateKey(key); Map<String, String> scVars = scriptVars .computeIfAbsent(scriptName, k -> Collections.synchronizedMap(new HashMap<String, String>())); if (value == null) { scVars.remove(key); } else { validate...
java
private static void setScriptVarImpl(String scriptName, String key, String value) { validateKey(key); Map<String, String> scVars = scriptVars .computeIfAbsent(scriptName, k -> Collections.synchronizedMap(new HashMap<String, String>())); if (value == null) { scVars.remove(key); } else { validate...
[ "private", "static", "void", "setScriptVarImpl", "(", "String", "scriptName", ",", "String", "key", ",", "String", "value", ")", "{", "validateKey", "(", "key", ")", ";", "Map", "<", "String", ",", "String", ">", "scVars", "=", "scriptVars", ".", "computeI...
Internal method that sets a variable without validating the script name. @param scriptName the name of the script. @param key the key of the variable. @param value the value of the variable.
[ "Internal", "method", "that", "sets", "a", "variable", "without", "validating", "the", "script", "name", "." ]
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/script/ScriptVars.java#L212-L227
gallandarakhneorg/afc
maven/maventools/src/main/java/org/arakhne/maven/AbstractArakhneMojo.java
AbstractArakhneMojo.dirCopy
public final void dirCopy(File in, File out, boolean skipHiddenFiles) throws IOException { assert in != null; assert out != null; getLog().debug(in.toString() + "->" + out.toString()); //$NON-NLS-1$ getLog().debug("Ignore hidden files: " + skipHiddenFiles); //$NON-NLS-1$ out.mkdirs(); final LinkedList<File>...
java
public final void dirCopy(File in, File out, boolean skipHiddenFiles) throws IOException { assert in != null; assert out != null; getLog().debug(in.toString() + "->" + out.toString()); //$NON-NLS-1$ getLog().debug("Ignore hidden files: " + skipHiddenFiles); //$NON-NLS-1$ out.mkdirs(); final LinkedList<File>...
[ "public", "final", "void", "dirCopy", "(", "File", "in", ",", "File", "out", ",", "boolean", "skipHiddenFiles", ")", "throws", "IOException", "{", "assert", "in", "!=", "null", ";", "assert", "out", "!=", "null", ";", "getLog", "(", ")", ".", "debug", ...
Copy a directory. @param in input directory. @param out output directory. @param skipHiddenFiles indicates if the hidden files should be ignored. @throws IOException on error. @since 3.3
[ "Copy", "a", "directory", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/maven/maventools/src/main/java/org/arakhne/maven/AbstractArakhneMojo.java#L240-L270
phax/ph-masterdata
ph-masterdata/src/main/java/com/helger/masterdata/swift/IBANCountryData.java
IBANCountryData.parseToElementValues
@Nonnull @ReturnsMutableCopy public ICommonsList <IBANElementValue> parseToElementValues (@Nonnull final String sIBAN) { ValueEnforcer.notNull (sIBAN, "IBANString"); final String sRealIBAN = IBANManager.unifyIBAN (sIBAN); if (sRealIBAN.length () != m_nExpectedLength) throw new IllegalArgumentEx...
java
@Nonnull @ReturnsMutableCopy public ICommonsList <IBANElementValue> parseToElementValues (@Nonnull final String sIBAN) { ValueEnforcer.notNull (sIBAN, "IBANString"); final String sRealIBAN = IBANManager.unifyIBAN (sIBAN); if (sRealIBAN.length () != m_nExpectedLength) throw new IllegalArgumentEx...
[ "@", "Nonnull", "@", "ReturnsMutableCopy", "public", "ICommonsList", "<", "IBANElementValue", ">", "parseToElementValues", "(", "@", "Nonnull", "final", "String", "sIBAN", ")", "{", "ValueEnforcer", ".", "notNull", "(", "sIBAN", ",", "\"IBANString\"", ")", ";", ...
Parse a given IBAN number string and convert it to elements according to this country's definition of IBAN numbers. @param sIBAN The IBAN number string to parse. May not be <code>null</code>. @return The list of parsed elements.
[ "Parse", "a", "given", "IBAN", "number", "string", "and", "convert", "it", "to", "elements", "according", "to", "this", "country", "s", "definition", "of", "IBAN", "numbers", "." ]
train
https://github.com/phax/ph-masterdata/blob/ca5e0b03c735b30b47930c018bfb5e71f00d0ff4/ph-masterdata/src/main/java/com/helger/masterdata/swift/IBANCountryData.java#L167-L189
VoltDB/voltdb
src/frontend/org/voltdb/planner/ActivePlanRepository.java
ActivePlanRepository.loadOrAddRefPlanFragment
public static long loadOrAddRefPlanFragment(byte[] planHash, byte[] plan, String stmtText) { Sha1Wrapper key = new Sha1Wrapper(planHash); synchronized (FragInfo.class) { FragInfo frag = m_plansByHash.get(key); if (frag == null) { frag = new FragInfo(key, plan, m_n...
java
public static long loadOrAddRefPlanFragment(byte[] planHash, byte[] plan, String stmtText) { Sha1Wrapper key = new Sha1Wrapper(planHash); synchronized (FragInfo.class) { FragInfo frag = m_plansByHash.get(key); if (frag == null) { frag = new FragInfo(key, plan, m_n...
[ "public", "static", "long", "loadOrAddRefPlanFragment", "(", "byte", "[", "]", "planHash", ",", "byte", "[", "]", "plan", ",", "String", "stmtText", ")", "{", "Sha1Wrapper", "key", "=", "new", "Sha1Wrapper", "(", "planHash", ")", ";", "synchronized", "(", ...
Get the site-local fragment id for a given plan identified by 20-byte sha-1 hash If the plan isn't known to this SPC, load it up. Otherwise addref it.
[ "Get", "the", "site", "-", "local", "fragment", "id", "for", "a", "given", "plan", "identified", "by", "20", "-", "byte", "sha", "-", "1", "hash", "If", "the", "plan", "isn", "t", "known", "to", "this", "SPC", "load", "it", "up", ".", "Otherwise", ...
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/ActivePlanRepository.java#L100-L129
google/closure-compiler
src/com/google/debugging/sourcemap/SourceMapGeneratorV3.java
SourceMapGeneratorV3.appendTo
@Override public void appendTo(Appendable out, @Nullable String name) throws IOException { int maxLine = prepMappings() + 1; // Add the header fields. out.append("{\n"); appendFirstField(out, "version", "3"); if (name != null) { appendField(out, "file", escapeString(name)); } append...
java
@Override public void appendTo(Appendable out, @Nullable String name) throws IOException { int maxLine = prepMappings() + 1; // Add the header fields. out.append("{\n"); appendFirstField(out, "version", "3"); if (name != null) { appendField(out, "file", escapeString(name)); } append...
[ "@", "Override", "public", "void", "appendTo", "(", "Appendable", "out", ",", "@", "Nullable", "String", "name", ")", "throws", "IOException", "{", "int", "maxLine", "=", "prepMappings", "(", ")", "+", "1", ";", "// Add the header fields.", "out", ".", "appe...
Writes out the source map in the following format (line numbers are for reference only and are not part of the format): <pre> 1. { 2. version: 3, 3. file: "out.js", 4. lineCount: 2, 5. sourceRoot: "", 6. sources: ["foo.js", "bar.js"], 7. sourcesContent: ["var foo", "var bar"], 8. names: ["src", "...
[ "Writes", "out", "the", "source", "map", "in", "the", "following", "format", "(", "line", "numbers", "are", "for", "reference", "only", "and", "are", "not", "part", "of", "the", "format", ")", ":" ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/debugging/sourcemap/SourceMapGeneratorV3.java#L369-L424
before/quality-check
modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java
Check.notNull
@Throws(IllegalNullArgumentException.class) public static <T> T notNull(@Nonnull final T reference, @Nullable final String name) { if (reference == null) { throw new IllegalNullArgumentException(name); } return reference; }
java
@Throws(IllegalNullArgumentException.class) public static <T> T notNull(@Nonnull final T reference, @Nullable final String name) { if (reference == null) { throw new IllegalNullArgumentException(name); } return reference; }
[ "@", "Throws", "(", "IllegalNullArgumentException", ".", "class", ")", "public", "static", "<", "T", ">", "T", "notNull", "(", "@", "Nonnull", "final", "T", "reference", ",", "@", "Nullable", "final", "String", "name", ")", "{", "if", "(", "reference", "...
Ensures that an object reference passed as a parameter to the calling method is not {@code null}. @param reference an object reference @param name name of object reference (in source code) @return the non-null reference that was validated @throws IllegalNullArgumentException if the given argument {@code reference} is ...
[ "Ensures", "that", "an", "object", "reference", "passed", "as", "a", "parameter", "to", "the", "calling", "method", "is", "not", "{", "@code", "null", "}", "." ]
train
https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L2979-L2985
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/persist/HsqlProperties.java
HsqlProperties.argArrayToProps
public static HsqlProperties argArrayToProps(String[] arg, String type) { HsqlProperties props = new HsqlProperties(); for (int i = 0; i < arg.length; i++) { String p = arg[i]; if (p.equals("--help") || p.equals("-help")) { props.addError(NO_VALUE_FOR_KEY, p.su...
java
public static HsqlProperties argArrayToProps(String[] arg, String type) { HsqlProperties props = new HsqlProperties(); for (int i = 0; i < arg.length; i++) { String p = arg[i]; if (p.equals("--help") || p.equals("-help")) { props.addError(NO_VALUE_FOR_KEY, p.su...
[ "public", "static", "HsqlProperties", "argArrayToProps", "(", "String", "[", "]", "arg", ",", "String", "type", ")", "{", "HsqlProperties", "props", "=", "new", "HsqlProperties", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "arg", "....
Creates and populates an HsqlProperties Object from the arguments array of a Main method. Properties are in the form of "-key value" pairs. Each key is prefixed with the type argument and a dot before being inserted into the properties Object. <p> "--help" is treated as a key with no value and not inserted.
[ "Creates", "and", "populates", "an", "HsqlProperties", "Object", "from", "the", "arguments", "array", "of", "a", "Main", "method", ".", "Properties", "are", "in", "the", "form", "of", "-", "key", "value", "pairs", ".", "Each", "key", "is", "prefixed", "wit...
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/HsqlProperties.java#L333-L360
michael-rapp/AndroidMaterialValidation
library/src/main/java/de/mrapp/android/validation/Validators.java
Validators.noWhitespace
public static Validator<CharSequence> noWhitespace(@NonNull final Context context, @StringRes final int resourceId) { return new NoWhitespaceValidator(context, resourceId); }
java
public static Validator<CharSequence> noWhitespace(@NonNull final Context context, @StringRes final int resourceId) { return new NoWhitespaceValidator(context, resourceId); }
[ "public", "static", "Validator", "<", "CharSequence", ">", "noWhitespace", "(", "@", "NonNull", "final", "Context", "context", ",", "@", "StringRes", "final", "int", "resourceId", ")", "{", "return", "new", "NoWhitespaceValidator", "(", "context", ",", "resource...
Creates and returns a validator, which allows to validate texts to ensure, that they contain no whitespace. Empty texts are also accepted. @param context The context, which should be used to retrieve the error message, as an instance of the class {@link Context}. The context may not be null @param resourceId The resou...
[ "Creates", "and", "returns", "a", "validator", "which", "allows", "to", "validate", "texts", "to", "ensure", "that", "they", "contain", "no", "whitespace", ".", "Empty", "texts", "are", "also", "accepted", "." ]
train
https://github.com/michael-rapp/AndroidMaterialValidation/blob/ac8693baeac7abddf2e38a47da4c1849d4661a8b/library/src/main/java/de/mrapp/android/validation/Validators.java#L531-L534
EdwardRaff/JSAT
JSAT/src/jsat/io/CSV.java
CSV.readC
public static ClassificationDataSet readC(int classification_target, Reader reader, char delimiter, int lines_to_skip, char comment, Set<Integer> cat_cols) throws IOException { return (ClassificationDataSet) readCSV(reader, lines_to_skip, delimiter, comment, cat_cols, -1, classification_target); }
java
public static ClassificationDataSet readC(int classification_target, Reader reader, char delimiter, int lines_to_skip, char comment, Set<Integer> cat_cols) throws IOException { return (ClassificationDataSet) readCSV(reader, lines_to_skip, delimiter, comment, cat_cols, -1, classification_target); }
[ "public", "static", "ClassificationDataSet", "readC", "(", "int", "classification_target", ",", "Reader", "reader", ",", "char", "delimiter", ",", "int", "lines_to_skip", ",", "char", "comment", ",", "Set", "<", "Integer", ">", "cat_cols", ")", "throws", "IOExce...
Reads in a CSV dataset as a classification dataset. @param classification_target the column index (starting from zero) of the feature that will be the categorical target value @param reader the reader for the CSV content @param delimiter the delimiter to separate columns, usually a comma @param lines_to_skip the numbe...
[ "Reads", "in", "a", "CSV", "dataset", "as", "a", "classification", "dataset", "." ]
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/io/CSV.java#L193-L196
mongodb/stitch-android-sdk
core/services/mongodb-remote/src/main/java/com/mongodb/stitch/core/services/mongodb/remote/internal/CoreRemoteMongoCollectionImpl.java
CoreRemoteMongoCollectionImpl.findOneAndReplace
public DocumentT findOneAndReplace(final Bson filter, final Bson replacement) { return operations.findOneAndModify( "findOneAndReplace", filter, replacement, new RemoteFindOneAndModifyOptions(), documentClass).execute(service); }
java
public DocumentT findOneAndReplace(final Bson filter, final Bson replacement) { return operations.findOneAndModify( "findOneAndReplace", filter, replacement, new RemoteFindOneAndModifyOptions(), documentClass).execute(service); }
[ "public", "DocumentT", "findOneAndReplace", "(", "final", "Bson", "filter", ",", "final", "Bson", "replacement", ")", "{", "return", "operations", ".", "findOneAndModify", "(", "\"findOneAndReplace\"", ",", "filter", ",", "replacement", ",", "new", "RemoteFindOneAnd...
Finds a document in the collection and replaces it with the given document @param filter the query filter @param replacement the document to replace the matched document with @return the resulting document
[ "Finds", "a", "document", "in", "the", "collection", "and", "replaces", "it", "with", "the", "given", "document" ]
train
https://github.com/mongodb/stitch-android-sdk/blob/159b9334b1f1a827285544be5ee20cdf7b04e4cc/core/services/mongodb-remote/src/main/java/com/mongodb/stitch/core/services/mongodb/remote/internal/CoreRemoteMongoCollectionImpl.java#L542-L549
knightliao/disconf
disconf-client/src/main/java/com/baidu/disconf/client/support/utils/StringUtil.java
StringUtil.toCamelCase
public static String toCamelCase(String str) { return new WordTokenizer() { @Override protected void startSentence(StringBuilder buffer, char ch) { buffer.append(Character.toLowerCase(ch)); } @Override protected void startWord(StringBu...
java
public static String toCamelCase(String str) { return new WordTokenizer() { @Override protected void startSentence(StringBuilder buffer, char ch) { buffer.append(Character.toLowerCase(ch)); } @Override protected void startWord(StringBu...
[ "public", "static", "String", "toCamelCase", "(", "String", "str", ")", "{", "return", "new", "WordTokenizer", "(", ")", "{", "@", "Override", "protected", "void", "startSentence", "(", "StringBuilder", "buffer", ",", "char", "ch", ")", "{", "buffer", ".", ...
将字符串转换成camel case。 <p> 如果字符串是<code>null</code>则返回<code>null</code>。 <p/> <p/> <pre> StringUtil.toCamelCase(null) = null StringUtil.toCamelCase("") = "" StringUtil.toCamelCase("aBc") = "aBc" StringUtil.toCamelCase("aBc def") = "aBcDef" StringUtil.toCamelCase("aBc def_ghi") = "aBcDefGhi" StringUtil.toCamelCase("aBc d...
[ "将字符串转换成camel", "case。", "<p", ">", "如果字符串是<code", ">", "null<", "/", "code", ">", "则返回<code", ">", "null<", "/", "code", ">", "。", "<p", "/", ">", "<p", "/", ">", "<pre", ">", "StringUtil", ".", "toCamelCase", "(", "null", ")", "=", "null", "StringU...
train
https://github.com/knightliao/disconf/blob/d413cbce9334fe38a5a24982ce4db3a6ed8e98ea/disconf-client/src/main/java/com/baidu/disconf/client/support/utils/StringUtil.java#L167-L210
google/closure-compiler
src/com/google/javascript/jscomp/NodeTraversal.java
NodeTraversal.traverseClass
private void traverseClass(Node n) { final Node className = n.getFirstChild(); final Node extendsClause = className.getNext(); final Node body = extendsClause.getNext(); boolean isClassExpression = NodeUtil.isClassExpression(n); traverseBranch(extendsClause, n); for (Node child = body.getFirs...
java
private void traverseClass(Node n) { final Node className = n.getFirstChild(); final Node extendsClause = className.getNext(); final Node body = extendsClause.getNext(); boolean isClassExpression = NodeUtil.isClassExpression(n); traverseBranch(extendsClause, n); for (Node child = body.getFirs...
[ "private", "void", "traverseClass", "(", "Node", "n", ")", "{", "final", "Node", "className", "=", "n", ".", "getFirstChild", "(", ")", ";", "final", "Node", "extendsClause", "=", "className", ".", "getNext", "(", ")", ";", "final", "Node", "body", "=", ...
Traverses a class. Note that we traverse some of the child nodes slightly out of order to ensure children are visited in the correct scope. The following children are in the outer scope: (1) the 'extends' clause, (2) any computed method keys, (3) the class name for class declarations only (class expression names are ...
[ "Traverses", "a", "class", ".", "Note", "that", "we", "traverse", "some", "of", "the", "child", "nodes", "slightly", "out", "of", "order", "to", "ensure", "children", "are", "visited", "in", "the", "correct", "scope", ".", "The", "following", "children", "...
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/NodeTraversal.java#L919-L954
james-hu/jabb-core
src/main/java/net/sf/jabb/util/text/StartWithMatcher.java
StartWithMatcher.getLastAcceptedState
protected int getLastAcceptedState(CharSequence text, int startIndex){ int lastAcceptedState = -1; int p = runAutomaton.getInitialState(); int l = text.length(); for (int i = startIndex; i < l; i++) { p = runAutomaton.step(p, text.charAt(i)); if (p == -1) { if (lastAcceptedState == -1){ ...
java
protected int getLastAcceptedState(CharSequence text, int startIndex){ int lastAcceptedState = -1; int p = runAutomaton.getInitialState(); int l = text.length(); for (int i = startIndex; i < l; i++) { p = runAutomaton.step(p, text.charAt(i)); if (p == -1) { if (lastAcceptedState == -1){ ...
[ "protected", "int", "getLastAcceptedState", "(", "CharSequence", "text", ",", "int", "startIndex", ")", "{", "int", "lastAcceptedState", "=", "-", "1", ";", "int", "p", "=", "runAutomaton", ".", "getInitialState", "(", ")", ";", "int", "l", "=", "text", "....
By utilizing the state machine (dk.brics.automaton.RunAutomaton), get the last accepted matching state. The matching test starts at specified position.<br> 利用状态机(dk.brics.automaton.RunAutomaton),取得最后一个匹配到的状态。从指定位置开始进行匹配检查。 @param text The text to be tested.<br>待进行匹配检查的文本。 @param startIndex The position to start ma...
[ "By", "utilizing", "the", "state", "machine", "(", "dk", ".", "brics", ".", "automaton", ".", "RunAutomaton", ")", "get", "the", "last", "accepted", "matching", "state", ".", "The", "matching", "test", "starts", "at", "specified", "position", ".", "<br", "...
train
https://github.com/james-hu/jabb-core/blob/bceed441595c5e5195a7418795f03b69fa7b61e4/src/main/java/net/sf/jabb/util/text/StartWithMatcher.java#L216-L235
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/osm/OSMPreParser.java
OSMPreParser.startElement
@Override public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { if (localName.compareToIgnoreCase("osm") == 0) { version = attributes.getValue(GPXTags.VERSION); } else if (localName.compareToIgnoreCase("node") == 0) { ...
java
@Override public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { if (localName.compareToIgnoreCase("osm") == 0) { version = attributes.getValue(GPXTags.VERSION); } else if (localName.compareToIgnoreCase("node") == 0) { ...
[ "@", "Override", "public", "void", "startElement", "(", "String", "uri", ",", "String", "localName", ",", "String", "qName", ",", "Attributes", "attributes", ")", "throws", "SAXException", "{", "if", "(", "localName", ".", "compareToIgnoreCase", "(", "\"osm\"", ...
Fires whenever an XML start markup is encountered. It indicates which version of osm file is to be parsed. @param uri URI of the local element @param localName Name of the local element (without prefix) @param qName qName of the local element (with prefix) @param attributes Attributes of the local element (contained i...
[ "Fires", "whenever", "an", "XML", "start", "markup", "is", "encountered", ".", "It", "indicates", "which", "version", "of", "osm", "file", "is", "to", "be", "parsed", "." ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/osm/OSMPreParser.java#L92-L103
yanzhenjie/AndPermission
support/src/main/java/com/yanzhenjie/permission/AndPermission.java
AndPermission.hasAlwaysDeniedPermission
public static boolean hasAlwaysDeniedPermission(Context context, List<String> deniedPermissions) { return hasAlwaysDeniedPermission(getContextSource(context), deniedPermissions); }
java
public static boolean hasAlwaysDeniedPermission(Context context, List<String> deniedPermissions) { return hasAlwaysDeniedPermission(getContextSource(context), deniedPermissions); }
[ "public", "static", "boolean", "hasAlwaysDeniedPermission", "(", "Context", "context", ",", "List", "<", "String", ">", "deniedPermissions", ")", "{", "return", "hasAlwaysDeniedPermission", "(", "getContextSource", "(", "context", ")", ",", "deniedPermissions", ")", ...
Some privileges permanently disabled, may need to set up in the execute. @param context {@link Context}. @param deniedPermissions one or more permissions. @return true, other wise is false.
[ "Some", "privileges", "permanently", "disabled", "may", "need", "to", "set", "up", "in", "the", "execute", "." ]
train
https://github.com/yanzhenjie/AndPermission/blob/bbfaaecdb8ecf0f2aa270d80c0b88d022dddda7c/support/src/main/java/com/yanzhenjie/permission/AndPermission.java#L94-L96
timothyb89/EventBus
src/main/java/org/timothyb89/eventbus/EventBus.java
EventBus.registerMethod
protected void registerMethod( Object o, Method m, int priority, boolean vetoable) { // check the parameter types, and attempt to resolve the event // type if (m.getParameterTypes().length != 1) { log.warn("Skipping invalid event handler definition: " + m); return; } // make sure the parameter is an...
java
protected void registerMethod( Object o, Method m, int priority, boolean vetoable) { // check the parameter types, and attempt to resolve the event // type if (m.getParameterTypes().length != 1) { log.warn("Skipping invalid event handler definition: " + m); return; } // make sure the parameter is an...
[ "protected", "void", "registerMethod", "(", "Object", "o", ",", "Method", "m", ",", "int", "priority", ",", "boolean", "vetoable", ")", "{", "// check the parameter types, and attempt to resolve the event", "// type", "if", "(", "m", ".", "getParameterTypes", "(", "...
Registers the given method to the event bus. The object is assumed to be of the class that contains the given method. <p>The method parameters are checked and added to the event queue corresponding to the {@link Event} used as the first method parameter. In other words, if passed a reference to the following method:</p...
[ "Registers", "the", "given", "method", "to", "the", "event", "bus", ".", "The", "object", "is", "assumed", "to", "be", "of", "the", "class", "that", "contains", "the", "given", "method", ".", "<p", ">", "The", "method", "parameters", "are", "checked", "a...
train
https://github.com/timothyb89/EventBus/blob/9285406c16eda84e20da6c72fe2500c24c7848db/src/main/java/org/timothyb89/eventbus/EventBus.java#L149-L179
apache/groovy
subprojects/groovy-nio/src/main/java/org/codehaus/groovy/runtime/NioGroovyMethods.java
NioGroovyMethods.newReader
public static BufferedReader newReader(Path self, String charset) throws IOException { return Files.newBufferedReader(self, Charset.forName(charset)); }
java
public static BufferedReader newReader(Path self, String charset) throws IOException { return Files.newBufferedReader(self, Charset.forName(charset)); }
[ "public", "static", "BufferedReader", "newReader", "(", "Path", "self", ",", "String", "charset", ")", "throws", "IOException", "{", "return", "Files", ".", "newBufferedReader", "(", "self", ",", "Charset", ".", "forName", "(", "charset", ")", ")", ";", "}" ...
Create a buffered reader for this file, using the specified charset as the encoding. @param self a Path @param charset the charset for this Path @return a BufferedReader @throws java.io.FileNotFoundException if the Path was not found @throws java.io.UnsupportedEncodingException if the encoding specified is n...
[ "Create", "a", "buffered", "reader", "for", "this", "file", "using", "the", "specified", "charset", "as", "the", "encoding", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-nio/src/main/java/org/codehaus/groovy/runtime/NioGroovyMethods.java#L1414-L1416
mpetazzoni/ttorrent
ttorrent-tracker/src/main/java/com/turn/ttorrent/tracker/TrackerRequestProcessor.java
TrackerRequestProcessor.serveError
private void serveError(Status status, String error, RequestHandler requestHandler) throws IOException { this.serveError(status, HTTPTrackerErrorMessage.craft(error), requestHandler); }
java
private void serveError(Status status, String error, RequestHandler requestHandler) throws IOException { this.serveError(status, HTTPTrackerErrorMessage.craft(error), requestHandler); }
[ "private", "void", "serveError", "(", "Status", "status", ",", "String", "error", ",", "RequestHandler", "requestHandler", ")", "throws", "IOException", "{", "this", ".", "serveError", "(", "status", ",", "HTTPTrackerErrorMessage", ".", "craft", "(", "error", ")...
Write an error message to the response with the given HTTP status code. @param status The HTTP status code to return. @param error The error message reported by the tracker.
[ "Write", "an", "error", "message", "to", "the", "response", "with", "the", "given", "HTTP", "status", "code", "." ]
train
https://github.com/mpetazzoni/ttorrent/blob/ecd0e6caf853b63393c4ab63cfd8f20114f73f70/ttorrent-tracker/src/main/java/com/turn/ttorrent/tracker/TrackerRequestProcessor.java#L300-L302
mozilla/rhino
src/org/mozilla/classfile/ClassFileWriter.java
ClassFileWriter.classNameToSignature
public static String classNameToSignature(String name) { int nameLength = name.length(); int colonPos = 1 + nameLength; char[] buf = new char[colonPos + 1]; buf[0] = 'L'; buf[colonPos] = ';'; name.getChars(0, nameLength, buf, 1); for (int i = 1; i != colonPos; ++i...
java
public static String classNameToSignature(String name) { int nameLength = name.length(); int colonPos = 1 + nameLength; char[] buf = new char[colonPos + 1]; buf[0] = 'L'; buf[colonPos] = ';'; name.getChars(0, nameLength, buf, 1); for (int i = 1; i != colonPos; ++i...
[ "public", "static", "String", "classNameToSignature", "(", "String", "name", ")", "{", "int", "nameLength", "=", "name", ".", "length", "(", ")", ";", "int", "colonPos", "=", "1", "+", "nameLength", ";", "char", "[", "]", "buf", "=", "new", "char", "["...
Convert Java class name in dot notation into "Lname-with-dots-replaced-by-slashes;" form suitable for use as JVM type signatures.
[ "Convert", "Java", "class", "name", "in", "dot", "notation", "into", "Lname", "-", "with", "-", "dots", "-", "replaced", "-", "by", "-", "slashes", ";", "form", "suitable", "for", "use", "as", "JVM", "type", "signatures", "." ]
train
https://github.com/mozilla/rhino/blob/fa8a86df11d37623f5faa8d445a5876612bc47b0/src/org/mozilla/classfile/ClassFileWriter.java#L113-L126
baratine/baratine
framework/src/main/java/com/caucho/v5/config/types/Period.java
Period.periodEnd
public static long periodEnd(long now, long period) { QDate localCalendar = QDate.allocateLocalDate(); long endTime = periodEnd(now, period, localCalendar); QDate.freeLocalDate(localCalendar); return endTime; }
java
public static long periodEnd(long now, long period) { QDate localCalendar = QDate.allocateLocalDate(); long endTime = periodEnd(now, period, localCalendar); QDate.freeLocalDate(localCalendar); return endTime; }
[ "public", "static", "long", "periodEnd", "(", "long", "now", ",", "long", "period", ")", "{", "QDate", "localCalendar", "=", "QDate", ".", "allocateLocalDate", "(", ")", ";", "long", "endTime", "=", "periodEnd", "(", "now", ",", "period", ",", "localCalend...
Calculates the next period end. The calculation is in local time. @param now the current time in GMT ms since the epoch @return the time of the next period in GMT ms since the epoch
[ "Calculates", "the", "next", "period", "end", ".", "The", "calculation", "is", "in", "local", "time", "." ]
train
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/config/types/Period.java#L217-L226
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/internal/partition/impl/InternalPartitionServiceImpl.java
InternalPartitionServiceImpl.createMigrationCommitPartitionState
PartitionRuntimeState createMigrationCommitPartitionState(MigrationInfo migrationInfo) { lock.lock(); try { if (!partitionStateManager.isInitialized()) { return null; } List<MigrationInfo> completedMigrations = migrationManager.getCompletedMigrationsC...
java
PartitionRuntimeState createMigrationCommitPartitionState(MigrationInfo migrationInfo) { lock.lock(); try { if (!partitionStateManager.isInitialized()) { return null; } List<MigrationInfo> completedMigrations = migrationManager.getCompletedMigrationsC...
[ "PartitionRuntimeState", "createMigrationCommitPartitionState", "(", "MigrationInfo", "migrationInfo", ")", "{", "lock", ".", "lock", "(", ")", ";", "try", "{", "if", "(", "!", "partitionStateManager", ".", "isInitialized", "(", ")", ")", "{", "return", "null", ...
Creates a transient PartitionRuntimeState to commit given migration. Result migration is applied to partition table and migration is added to completed-migrations set. Version of created partition table is incremented by 1.
[ "Creates", "a", "transient", "PartitionRuntimeState", "to", "commit", "given", "migration", ".", "Result", "migration", "is", "applied", "to", "partition", "table", "and", "migration", "is", "added", "to", "completed", "-", "migrations", "set", ".", "Version", "...
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/partition/impl/InternalPartitionServiceImpl.java#L444-L466
johnkil/Android-ProgressFragment
progressfragment-native/src/com/devspark/progressfragment/ProgressGridFragment.java
ProgressGridFragment.setGridShown
private void setGridShown(boolean shown, boolean animate) { ensureList(); if (mProgressContainer == null) { throw new IllegalStateException("Can't be used with a custom content view"); } if (mGridShown == shown) { return; } mGridShown = shown; ...
java
private void setGridShown(boolean shown, boolean animate) { ensureList(); if (mProgressContainer == null) { throw new IllegalStateException("Can't be used with a custom content view"); } if (mGridShown == shown) { return; } mGridShown = shown; ...
[ "private", "void", "setGridShown", "(", "boolean", "shown", ",", "boolean", "animate", ")", "{", "ensureList", "(", ")", ";", "if", "(", "mProgressContainer", "==", "null", ")", "{", "throw", "new", "IllegalStateException", "(", "\"Can't be used with a custom cont...
Control whether the grid is being displayed. You can make it not displayed if you are waiting for the initial data to show in it. During this time an indeterminant progress indicator will be shown instead. @param shown If true, the grid view is shown; if false, the progress indicator. The initial value is true. @...
[ "Control", "whether", "the", "grid", "is", "being", "displayed", ".", "You", "can", "make", "it", "not", "displayed", "if", "you", "are", "waiting", "for", "the", "initial", "data", "to", "show", "in", "it", ".", "During", "this", "time", "an", "indeterm...
train
https://github.com/johnkil/Android-ProgressFragment/blob/f4b3b969f36f3ac9598c662722630f9ffb151bd6/progressfragment-native/src/com/devspark/progressfragment/ProgressGridFragment.java#L221-L255
apache/spark
common/network-shuffle/src/main/java/org/apache/spark/network/sasl/ShuffleSecretManager.java
ShuffleSecretManager.registerApp
public void registerApp(String appId, String shuffleSecret) { // Always put the new secret information to make sure it's the most up to date. // Otherwise we have to specifically look at the application attempt in addition // to the applicationId since the secrets change between application attempts on yarn...
java
public void registerApp(String appId, String shuffleSecret) { // Always put the new secret information to make sure it's the most up to date. // Otherwise we have to specifically look at the application attempt in addition // to the applicationId since the secrets change between application attempts on yarn...
[ "public", "void", "registerApp", "(", "String", "appId", ",", "String", "shuffleSecret", ")", "{", "// Always put the new secret information to make sure it's the most up to date.", "// Otherwise we have to specifically look at the application attempt in addition", "// to the applicationId...
Register an application with its secret. Executors need to first authenticate themselves with the same secret before fetching shuffle files written by other executors in this application.
[ "Register", "an", "application", "with", "its", "secret", ".", "Executors", "need", "to", "first", "authenticate", "themselves", "with", "the", "same", "secret", "before", "fetching", "shuffle", "files", "written", "by", "other", "executors", "in", "this", "appl...
train
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/common/network-shuffle/src/main/java/org/apache/spark/network/sasl/ShuffleSecretManager.java#L49-L55
Hygieia/Hygieia
api/src/main/java/com/capitalone/dashboard/service/CodeQualityServiceImpl.java
CodeQualityServiceImpl.getReportURL
private String getReportURL(String projectUrl,String path,String projectId) { StringBuilder sb = new StringBuilder(projectUrl); if(!projectUrl.endsWith("/")) { sb.append("/"); } sb.append(path) .append(projectId); return sb.toString(); }
java
private String getReportURL(String projectUrl,String path,String projectId) { StringBuilder sb = new StringBuilder(projectUrl); if(!projectUrl.endsWith("/")) { sb.append("/"); } sb.append(path) .append(projectId); return sb.toString(); }
[ "private", "String", "getReportURL", "(", "String", "projectUrl", ",", "String", "path", ",", "String", "projectId", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", "projectUrl", ")", ";", "if", "(", "!", "projectUrl", ".", "endsWith", "("...
get projectUrl and projectId from collectorItem and form reportUrl
[ "get", "projectUrl", "and", "projectId", "from", "collectorItem", "and", "form", "reportUrl" ]
train
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/api/src/main/java/com/capitalone/dashboard/service/CodeQualityServiceImpl.java#L220-L228
cdk/cdk
app/depict/src/main/java/org/openscience/cdk/depict/DepictionGenerator.java
DepictionGenerator.withAtomMapNumbers
public DepictionGenerator withAtomMapNumbers() { if (annotateAtomNum) throw new IllegalArgumentException("Can not annotated atom maps, atom numbers or values are already annotated"); DepictionGenerator copy = new DepictionGenerator(this); copy.annotateAtomMap = true; return c...
java
public DepictionGenerator withAtomMapNumbers() { if (annotateAtomNum) throw new IllegalArgumentException("Can not annotated atom maps, atom numbers or values are already annotated"); DepictionGenerator copy = new DepictionGenerator(this); copy.annotateAtomMap = true; return c...
[ "public", "DepictionGenerator", "withAtomMapNumbers", "(", ")", "{", "if", "(", "annotateAtomNum", ")", "throw", "new", "IllegalArgumentException", "(", "\"Can not annotated atom maps, atom numbers or values are already annotated\"", ")", ";", "DepictionGenerator", "copy", "=",...
Display atom-atom mapping numbers on a reaction. Each atom map index is loaded from the property {@link CDKConstants#ATOM_ATOM_MAPPING}. Note: A depiction can not have both atom numbers and atom maps visible (but this can be achieved by manually setting the annotation). @return new generator for method chaining @see ...
[ "Display", "atom", "-", "atom", "mapping", "numbers", "on", "a", "reaction", ".", "Each", "atom", "map", "index", "is", "loaded", "from", "the", "property", "{", "@link", "CDKConstants#ATOM_ATOM_MAPPING", "}", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/app/depict/src/main/java/org/openscience/cdk/depict/DepictionGenerator.java#L814-L820
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/factory/util/PathNormalizer.java
PathNormalizer.addGetParameter
public static String addGetParameter(String path, String parameterKey, String parameter) { StringBuilder sb = new StringBuilder(path); if (path.indexOf("?") > 0) { sb.append("&"); } else { sb.append("?"); } sb.append(parameterKey).append("=").append(parameter); return sb.toString(); }
java
public static String addGetParameter(String path, String parameterKey, String parameter) { StringBuilder sb = new StringBuilder(path); if (path.indexOf("?") > 0) { sb.append("&"); } else { sb.append("?"); } sb.append(parameterKey).append("=").append(parameter); return sb.toString(); }
[ "public", "static", "String", "addGetParameter", "(", "String", "path", ",", "String", "parameterKey", ",", "String", "parameter", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", "path", ")", ";", "if", "(", "path", ".", "indexOf", "(", ...
Adds a key and value to the request path & or ? will be used as needed path + ? or & + parameterKey=parameter @param path the url to add the parameterKey and parameter too @param parameterKey the key in the get request (parameterKey=parameter) @param parameter the parameter to add to the end of the url @return a Stri...
[ "Adds", "a", "key", "and", "value", "to", "the", "request", "path", "&", "or", "?", "will", "be", "used", "as", "needed" ]
train
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/factory/util/PathNormalizer.java#L437-L446
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/NodeStack.java
NodeStack.innerProcessSubTree
private void innerProcessSubTree( GBSNode p, int initialState, int topIndex) { boolean done = false; _topIndex = topIndex; _endp = p; _endIndex = _idx; GBSNode q; /* Used for tree walking */ int s = initialState; while...
java
private void innerProcessSubTree( GBSNode p, int initialState, int topIndex) { boolean done = false; _topIndex = topIndex; _endp = p; _endIndex = _idx; GBSNode q; /* Used for tree walking */ int s = initialState; while...
[ "private", "void", "innerProcessSubTree", "(", "GBSNode", "p", ",", "int", "initialState", ",", "int", "topIndex", ")", "{", "boolean", "done", "=", "false", ";", "_topIndex", "=", "topIndex", ";", "_endp", "=", "p", ";", "_endIndex", "=", "_idx", ";", "...
Walk through an entire sub-tree, invoking processNode on each node. <p>Walk through a sub-tree, invoking processNode on each node. processNode is an abstract megthod that is implemented by subclasses.</p> @param p The node at which to start. @param initialState The initial state of the walk, which is one of VISIT_LEF...
[ "Walk", "through", "an", "entire", "sub", "-", "tree", "invoking", "processNode", "on", "each", "node", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/NodeStack.java#L309-L367
datacleaner/DataCleaner
engine/core/src/main/java/org/datacleaner/descriptors/ClasspathScanDescriptorProvider.java
ClasspathScanDescriptorProvider.scanPackage
public ClasspathScanDescriptorProvider scanPackage(final String packageName, final boolean recursive) { return scanPackage(packageName, recursive, ClassLoaderUtils.getParentClassLoader(), false); }
java
public ClasspathScanDescriptorProvider scanPackage(final String packageName, final boolean recursive) { return scanPackage(packageName, recursive, ClassLoaderUtils.getParentClassLoader(), false); }
[ "public", "ClasspathScanDescriptorProvider", "scanPackage", "(", "final", "String", "packageName", ",", "final", "boolean", "recursive", ")", "{", "return", "scanPackage", "(", "packageName", ",", "recursive", ",", "ClassLoaderUtils", ".", "getParentClassLoader", "(", ...
Scans a package in the classpath (of the current thread's context classloader) for annotated components. @param packageName the package name to scan @param recursive whether or not to scan subpackages recursively @return
[ "Scans", "a", "package", "in", "the", "classpath", "(", "of", "the", "current", "thread", "s", "context", "classloader", ")", "for", "annotated", "components", "." ]
train
https://github.com/datacleaner/DataCleaner/blob/9aa01fdac3560cef51c55df3cb2ac5c690b57639/engine/core/src/main/java/org/datacleaner/descriptors/ClasspathScanDescriptorProvider.java#L179-L181
FedericoPecora/meta-csp-framework
src/main/java/org/metacsp/multi/spatioTemporal/paths/TrajectoryEnvelopeSolver.java
TrajectoryEnvelopeSolver.createEnvelopes
public HashMap<Integer,ArrayList<TrajectoryEnvelope>> createEnvelopes(int firstRobotID, long durationFirstParking, long durationLastParking, Coordinate[] footprint, String ... pathFiles) { Trajectory[] trajectories = new Trajectory[pathFiles.length]; for (int i = 0; i < pathFiles.length; i++) { trajectories[i] ...
java
public HashMap<Integer,ArrayList<TrajectoryEnvelope>> createEnvelopes(int firstRobotID, long durationFirstParking, long durationLastParking, Coordinate[] footprint, String ... pathFiles) { Trajectory[] trajectories = new Trajectory[pathFiles.length]; for (int i = 0; i < pathFiles.length; i++) { trajectories[i] ...
[ "public", "HashMap", "<", "Integer", ",", "ArrayList", "<", "TrajectoryEnvelope", ">", ">", "createEnvelopes", "(", "int", "firstRobotID", ",", "long", "durationFirstParking", ",", "long", "durationLastParking", ",", "Coordinate", "[", "]", "footprint", ",", "Stri...
Create a trajectory envelope for each given reference to a file containing a path. Robot IDs are assigned starting from the given integer. This method creates three envelopes for each path: the main {@link TrajectoryEnvelope} covering the path; one {@link TrajectoryEnvelope} for the starting position of the robot; and ...
[ "Create", "a", "trajectory", "envelope", "for", "each", "given", "reference", "to", "a", "file", "containing", "a", "path", ".", "Robot", "IDs", "are", "assigned", "starting", "from", "the", "given", "integer", ".", "This", "method", "creates", "three", "env...
train
https://github.com/FedericoPecora/meta-csp-framework/blob/42aaef2e2b76d0f738427f0dd9653c4f62b40517/src/main/java/org/metacsp/multi/spatioTemporal/paths/TrajectoryEnvelopeSolver.java#L319-L326
jqno/equalsverifier
src/main/java/nl/jqno/equalsverifier/internal/prefabvalues/PrefabValues.java
PrefabValues.realizeCacheFor
public <T> void realizeCacheFor(TypeTag tag, LinkedHashSet<TypeTag> typeStack) { if (!cache.contains(tag)) { Tuple<T> tuple = createTuple(tag, typeStack); addToCache(tag, tuple); } }
java
public <T> void realizeCacheFor(TypeTag tag, LinkedHashSet<TypeTag> typeStack) { if (!cache.contains(tag)) { Tuple<T> tuple = createTuple(tag, typeStack); addToCache(tag, tuple); } }
[ "public", "<", "T", ">", "void", "realizeCacheFor", "(", "TypeTag", "tag", ",", "LinkedHashSet", "<", "TypeTag", ">", "typeStack", ")", "{", "if", "(", "!", "cache", ".", "contains", "(", "tag", ")", ")", "{", "Tuple", "<", "T", ">", "tuple", "=", ...
Makes sure that values for the specified type are present in the cache, but doesn't return them. @param <T> The desired type. @param tag A description of the desired type, including generic parameters. @param typeStack Keeps track of recursion in the type.
[ "Makes", "sure", "that", "values", "for", "the", "specified", "type", "are", "present", "in", "the", "cache", "but", "doesn", "t", "return", "them", "." ]
train
https://github.com/jqno/equalsverifier/blob/25d73c9cb801c8b20b257d1d1283ac6e0585ef1d/src/main/java/nl/jqno/equalsverifier/internal/prefabvalues/PrefabValues.java#L145-L150
joniles/mpxj
src/main/java/net/sf/mpxj/ProjectFile.java
ProjectFile.getDuration
@Deprecated public Duration getDuration(String calendarName, Date startDate, Date endDate) throws MPXJException { ProjectCalendar calendar = getCalendarByName(calendarName); if (calendar == null) { throw new MPXJException(MPXJException.CALENDAR_ERROR + ": " + calendarName); } ...
java
@Deprecated public Duration getDuration(String calendarName, Date startDate, Date endDate) throws MPXJException { ProjectCalendar calendar = getCalendarByName(calendarName); if (calendar == null) { throw new MPXJException(MPXJException.CALENDAR_ERROR + ": " + calendarName); } ...
[ "@", "Deprecated", "public", "Duration", "getDuration", "(", "String", "calendarName", ",", "Date", "startDate", ",", "Date", "endDate", ")", "throws", "MPXJException", "{", "ProjectCalendar", "calendar", "=", "getCalendarByName", "(", "calendarName", ")", ";", "i...
This method is used to calculate the duration of work between two fixed dates according to the work schedule defined in the named calendar. The name of the calendar to be used is passed as an argument. @param calendarName name of the calendar to use @param startDate start of the period @param endDate end of the period...
[ "This", "method", "is", "used", "to", "calculate", "the", "duration", "of", "work", "between", "two", "fixed", "dates", "according", "to", "the", "work", "schedule", "defined", "in", "the", "named", "calendar", ".", "The", "name", "of", "the", "calendar", ...
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ProjectFile.java#L353-L363
wildfly/wildfly-core
logging/src/main/java/org/jboss/as/logging/handlers/AbstractHandlerDefinition.java
AbstractHandlerDefinition.createParameters
private static Parameters createParameters(final PathElement path, final Class<? extends Handler> type, final PropertySorter propertySorter, final AttributeDefinition[] addAttributes, final ConfigurationProperty<?>... construc...
java
private static Parameters createParameters(final PathElement path, final Class<? extends Handler> type, final PropertySorter propertySorter, final AttributeDefinition[] addAttributes, final ConfigurationProperty<?>... construc...
[ "private", "static", "Parameters", "createParameters", "(", "final", "PathElement", "path", ",", "final", "Class", "<", "?", "extends", "Handler", ">", "type", ",", "final", "PropertySorter", "propertySorter", ",", "final", "AttributeDefinition", "[", "]", "addAtt...
Creates the default {@linkplain org.jboss.as.controller.SimpleResourceDefinition.Parameters parameters} for creating the source. @param path the resource path @param type the known type of the resource or {@code null} if the type is unknown @param propertySorter the property...
[ "Creates", "the", "default", "{", "@linkplain", "org", ".", "jboss", ".", "as", ".", "controller", ".", "SimpleResourceDefinition", ".", "Parameters", "parameters", "}", "for", "creating", "the", "source", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/logging/src/main/java/org/jboss/as/logging/handlers/AbstractHandlerDefinition.java#L247-L254
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/painter/TitlePaneIconifyButtonPainter.java
TitlePaneIconifyButtonPainter.paintMinimizeHover
private void paintMinimizeHover(Graphics2D g, JComponent c, int width, int height) { iconifyPainter.paintHover(g, c, width, height); }
java
private void paintMinimizeHover(Graphics2D g, JComponent c, int width, int height) { iconifyPainter.paintHover(g, c, width, height); }
[ "private", "void", "paintMinimizeHover", "(", "Graphics2D", "g", ",", "JComponent", "c", ",", "int", "width", ",", "int", "height", ")", "{", "iconifyPainter", ".", "paintHover", "(", "g", ",", "c", ",", "width", ",", "height", ")", ";", "}" ]
Paint the foreground minimized button mouse-over state. @param g the Graphics2D context to paint with. @param c the component. @param width the width of the component. @param height the height of the component.
[ "Paint", "the", "foreground", "minimized", "button", "mouse", "-", "over", "state", "." ]
train
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/painter/TitlePaneIconifyButtonPainter.java#L183-L185
bitcoinj/bitcoinj
wallettemplate/src/main/java/wallettemplate/utils/AlertWindowController.java
AlertWindowController.informational
public void informational(Stage stage, String message, String details) { messageLabel.setText(message); detailsLabel.setText(details); cancelButton.setVisible(false); actionButton.setVisible(false); okButton.setOnAction(actionEvent -> stage.close()); }
java
public void informational(Stage stage, String message, String details) { messageLabel.setText(message); detailsLabel.setText(details); cancelButton.setVisible(false); actionButton.setVisible(false); okButton.setOnAction(actionEvent -> stage.close()); }
[ "public", "void", "informational", "(", "Stage", "stage", ",", "String", "message", ",", "String", "details", ")", "{", "messageLabel", ".", "setText", "(", "message", ")", ";", "detailsLabel", ".", "setText", "(", "details", ")", ";", "cancelButton", ".", ...
Initialize this alert for general information: OK button only, nothing happens on dismissal.
[ "Initialize", "this", "alert", "for", "general", "information", ":", "OK", "button", "only", "nothing", "happens", "on", "dismissal", "." ]
train
https://github.com/bitcoinj/bitcoinj/blob/9cf13d29315014ed59cf4fc5944e5f227e8df9a6/wallettemplate/src/main/java/wallettemplate/utils/AlertWindowController.java#L41-L47
EsotericSoftware/kryo
src/com/esotericsoftware/kryo/io/Input.java
Input.setBuffer
public void setBuffer (byte[] bytes, int offset, int count) { if (bytes == null) throw new IllegalArgumentException("bytes cannot be null."); buffer = bytes; position = offset; limit = offset + count; capacity = bytes.length; total = 0; inputStream = null; }
java
public void setBuffer (byte[] bytes, int offset, int count) { if (bytes == null) throw new IllegalArgumentException("bytes cannot be null."); buffer = bytes; position = offset; limit = offset + count; capacity = bytes.length; total = 0; inputStream = null; }
[ "public", "void", "setBuffer", "(", "byte", "[", "]", "bytes", ",", "int", "offset", ",", "int", "count", ")", "{", "if", "(", "bytes", "==", "null", ")", "throw", "new", "IllegalArgumentException", "(", "\"bytes cannot be null.\"", ")", ";", "buffer", "="...
Sets a new buffer to read from. The bytes are not copied, the old buffer is discarded and the new buffer used in its place. The position and total are reset. The {@link #setInputStream(InputStream) InputStream} is set to null.
[ "Sets", "a", "new", "buffer", "to", "read", "from", ".", "The", "bytes", "are", "not", "copied", "the", "old", "buffer", "is", "discarded", "and", "the", "new", "buffer", "used", "in", "its", "place", ".", "The", "position", "and", "total", "are", "res...
train
https://github.com/EsotericSoftware/kryo/blob/a8be1ab26f347f299a3c3f7171d6447dd5390845/src/com/esotericsoftware/kryo/io/Input.java#L91-L99
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/JobOperations.java
JobOperations.patchJob
public void patchJob(String jobId, OnAllTasksComplete onAllTasksComplete) throws BatchErrorException, IOException { patchJob(jobId, null, null, null, onAllTasksComplete, null, null); }
java
public void patchJob(String jobId, OnAllTasksComplete onAllTasksComplete) throws BatchErrorException, IOException { patchJob(jobId, null, null, null, onAllTasksComplete, null, null); }
[ "public", "void", "patchJob", "(", "String", "jobId", ",", "OnAllTasksComplete", "onAllTasksComplete", ")", "throws", "BatchErrorException", ",", "IOException", "{", "patchJob", "(", "jobId", ",", "null", ",", "null", ",", "null", ",", "onAllTasksComplete", ",", ...
Updates the specified job. This method only replaces the properties specified with non-null values. @param jobId The ID of the job. @param onAllTasksComplete Specifies an action the Batch service should take when all tasks in the job are in the completed state. @throws BatchErrorException Exception thrown when an erro...
[ "Updates", "the", "specified", "job", ".", "This", "method", "only", "replaces", "the", "properties", "specified", "with", "non", "-", "null", "values", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/JobOperations.java#L517-L519
kotcrab/vis-ui
ui/src/main/java/com/kotcrab/vis/ui/widget/PopupMenu.java
PopupMenu.getDefaultInputListener
public InputListener getDefaultInputListener (final int mouseButton) { if (defaultInputListener == null) { defaultInputListener = new InputListener() { @Override public boolean touchDown (InputEvent event, float x, float y, int pointer, int button) { return true; } @Override public void t...
java
public InputListener getDefaultInputListener (final int mouseButton) { if (defaultInputListener == null) { defaultInputListener = new InputListener() { @Override public boolean touchDown (InputEvent event, float x, float y, int pointer, int button) { return true; } @Override public void t...
[ "public", "InputListener", "getDefaultInputListener", "(", "final", "int", "mouseButton", ")", "{", "if", "(", "defaultInputListener", "==", "null", ")", "{", "defaultInputListener", "=", "new", "InputListener", "(", ")", "{", "@", "Override", "public", "boolean",...
Returns input listener that can be added to scene2d actor. When mouse button is pressed on that actor, menu will be displayed @param mouseButton from {@link Buttons}
[ "Returns", "input", "listener", "that", "can", "be", "added", "to", "scene2d", "actor", ".", "When", "mouse", "button", "is", "pressed", "on", "that", "actor", "menu", "will", "be", "displayed" ]
train
https://github.com/kotcrab/vis-ui/blob/3b68f82d94ae32bffa2a3399c63f432e0f4908e0/ui/src/main/java/com/kotcrab/vis/ui/widget/PopupMenu.java#L258-L275
Azure/azure-sdk-for-java
sql/resource-manager/v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/SyncAgentsInner.java
SyncAgentsInner.generateKey
public SyncAgentKeyPropertiesInner generateKey(String resourceGroupName, String serverName, String syncAgentName) { return generateKeyWithServiceResponseAsync(resourceGroupName, serverName, syncAgentName).toBlocking().single().body(); }
java
public SyncAgentKeyPropertiesInner generateKey(String resourceGroupName, String serverName, String syncAgentName) { return generateKeyWithServiceResponseAsync(resourceGroupName, serverName, syncAgentName).toBlocking().single().body(); }
[ "public", "SyncAgentKeyPropertiesInner", "generateKey", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "syncAgentName", ")", "{", "return", "generateKeyWithServiceResponseAsync", "(", "resourceGroupName", ",", "serverName", ",", "syncAgentNa...
Generates a sync agent key. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server on which the sync agent is hosted. @param syncAgentName The name of the sync agent. @thro...
[ "Generates", "a", "sync", "agent", "key", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/SyncAgentsInner.java#L852-L854
alkacon/opencms-core
src/org/opencms/ui/actions/CmsResourceInfoAction.java
CmsResourceInfoAction.openDialog
public void openDialog(final I_CmsDialogContext context, String tabId) { CmsGwtDialogExtension extension = new CmsGwtDialogExtension(A_CmsUI.get(), new I_CmsUpdateListener<String>() { public void onUpdate(List<String> updatedItems) { List<CmsUUID> ids = Lists.newArrayList(); ...
java
public void openDialog(final I_CmsDialogContext context, String tabId) { CmsGwtDialogExtension extension = new CmsGwtDialogExtension(A_CmsUI.get(), new I_CmsUpdateListener<String>() { public void onUpdate(List<String> updatedItems) { List<CmsUUID> ids = Lists.newArrayList(); ...
[ "public", "void", "openDialog", "(", "final", "I_CmsDialogContext", "context", ",", "String", "tabId", ")", "{", "CmsGwtDialogExtension", "extension", "=", "new", "CmsGwtDialogExtension", "(", "A_CmsUI", ".", "get", "(", ")", ",", "new", "I_CmsUpdateListener", "<"...
Opens the resource info dialog with the given start tab.<p> @param context the dialog context @param tabId the tab to open
[ "Opens", "the", "resource", "info", "dialog", "with", "the", "given", "start", "tab", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/actions/CmsResourceInfoAction.java#L121-L135
alkacon/opencms-core
src/org/opencms/ui/components/extensions/CmsScrollPositionCss.java
CmsScrollPositionCss.addTo
@SuppressWarnings("unused") public static void addTo( AbstractSingleComponentContainer componentContainer, int scrollBarrier, int barrierMargin, String styleName) { new CmsScrollPositionCss(componentContainer, scrollBarrier, barrierMargin, styleName); }
java
@SuppressWarnings("unused") public static void addTo( AbstractSingleComponentContainer componentContainer, int scrollBarrier, int barrierMargin, String styleName) { new CmsScrollPositionCss(componentContainer, scrollBarrier, barrierMargin, styleName); }
[ "@", "SuppressWarnings", "(", "\"unused\"", ")", "public", "static", "void", "addTo", "(", "AbstractSingleComponentContainer", "componentContainer", ",", "int", "scrollBarrier", ",", "int", "barrierMargin", ",", "String", "styleName", ")", "{", "new", "CmsScrollPositi...
Adds the scroll position CSS extension to the given component @param componentContainer the component to extend @param scrollBarrier the scroll barrier @param barrierMargin the margin @param styleName the style name to set beyond the scroll barrier
[ "Adds", "the", "scroll", "position", "CSS", "extension", "to", "the", "given", "component" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/components/extensions/CmsScrollPositionCss.java#L71-L79
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/ch/epfl/bbp/uima/types/Cooccurrence.java
Cooccurrence.setSecondIds
public void setSecondIds(int i, String v) { if (Cooccurrence_Type.featOkTst && ((Cooccurrence_Type)jcasType).casFeat_secondIds == null) jcasType.jcas.throwFeatMissing("secondIds", "ch.epfl.bbp.uima.types.Cooccurrence"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((Cooccurrence_Ty...
java
public void setSecondIds(int i, String v) { if (Cooccurrence_Type.featOkTst && ((Cooccurrence_Type)jcasType).casFeat_secondIds == null) jcasType.jcas.throwFeatMissing("secondIds", "ch.epfl.bbp.uima.types.Cooccurrence"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((Cooccurrence_Ty...
[ "public", "void", "setSecondIds", "(", "int", "i", ",", "String", "v", ")", "{", "if", "(", "Cooccurrence_Type", ".", "featOkTst", "&&", "(", "(", "Cooccurrence_Type", ")", "jcasType", ")", ".", "casFeat_secondIds", "==", "null", ")", "jcasType", ".", "jca...
indexed setter for secondIds - sets an indexed value - a list of string ids to identify the second occurrence @generated @param i index in the array to set @param v value to set into the array
[ "indexed", "setter", "for", "secondIds", "-", "sets", "an", "indexed", "value", "-", "a", "list", "of", "string", "ids", "to", "identify", "the", "second", "occurrence" ]
train
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/ch/epfl/bbp/uima/types/Cooccurrence.java#L249-L253
zandero/cmd
src/main/java/com/zandero/cmd/ConfigFileReader.java
ConfigFileReader.parse
private Settings parse(ArrayList<String> list, CommandBuilder builder) throws CommandLineException { Settings settings = new Settings(); if (list != null && list.size() > 0) { for (String line : list) { line = StringUtils.trimToNull(line); if (line != null && !isComment(line)) { String[] items =...
java
private Settings parse(ArrayList<String> list, CommandBuilder builder) throws CommandLineException { Settings settings = new Settings(); if (list != null && list.size() > 0) { for (String line : list) { line = StringUtils.trimToNull(line); if (line != null && !isComment(line)) { String[] items =...
[ "private", "Settings", "parse", "(", "ArrayList", "<", "String", ">", "list", ",", "CommandBuilder", "builder", ")", "throws", "CommandLineException", "{", "Settings", "settings", "=", "new", "Settings", "(", ")", ";", "if", "(", "list", "!=", "null", "&&", ...
Expects name = value in each line ignores lines starting with '#' or '//' @param list of strings
[ "Expects", "name", "=", "value", "in", "each", "line", "ignores", "lines", "starting", "with", "#", "or", "//" ]
train
https://github.com/zandero/cmd/blob/cf0c3b0afdd413f9f52243164bdf28e1db3e523f/src/main/java/com/zandero/cmd/ConfigFileReader.java#L67-L94
headius/invokebinder
src/main/java/com/headius/invokebinder/SmartBinder.java
SmartBinder.dropLast
public SmartBinder dropLast(int count) { return new SmartBinder(this, signature().dropLast(count), binder.dropLast(count)); }
java
public SmartBinder dropLast(int count) { return new SmartBinder(this, signature().dropLast(count), binder.dropLast(count)); }
[ "public", "SmartBinder", "dropLast", "(", "int", "count", ")", "{", "return", "new", "SmartBinder", "(", "this", ",", "signature", "(", ")", ".", "dropLast", "(", "count", ")", ",", "binder", ".", "dropLast", "(", "count", ")", ")", ";", "}" ]
Drop the last N arguments. @param count the count of arguments to drop @return a new SmartBinder with the drop applied
[ "Drop", "the", "last", "N", "arguments", "." ]
train
https://github.com/headius/invokebinder/blob/ce6bfeb8e33265480daa7b797989dd915d51238d/src/main/java/com/headius/invokebinder/SmartBinder.java#L809-L811
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/geo/structure/ProjectiveStructureByFactorization.java
ProjectiveStructureByFactorization.setDepthsFrom3D
public void setDepthsFrom3D(int view , List<Point3D_F64> locations ) { if( locations.size() != pixels.numCols ) throw new IllegalArgumentException("Pixel count must be constant and match "+pixels.numCols); int N = depths.numCols; for (int i = 0; i < N; i++) { depths.set(view,i, locations.get(i).z ); } }
java
public void setDepthsFrom3D(int view , List<Point3D_F64> locations ) { if( locations.size() != pixels.numCols ) throw new IllegalArgumentException("Pixel count must be constant and match "+pixels.numCols); int N = depths.numCols; for (int i = 0; i < N; i++) { depths.set(view,i, locations.get(i).z ); } }
[ "public", "void", "setDepthsFrom3D", "(", "int", "view", ",", "List", "<", "Point3D_F64", ">", "locations", ")", "{", "if", "(", "locations", ".", "size", "(", ")", "!=", "pixels", ".", "numCols", ")", "throw", "new", "IllegalArgumentException", "(", "\"Pi...
Assigns depth to the z value of all the features in the list. Features must be in the coordinate system of the view for this to be correct @param view which view is features are in @param locations Location of features in the view's reference frame
[ "Assigns", "depth", "to", "the", "z", "value", "of", "all", "the", "features", "in", "the", "list", ".", "Features", "must", "be", "in", "the", "coordinate", "system", "of", "the", "view", "for", "this", "to", "be", "correct" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/structure/ProjectiveStructureByFactorization.java#L151-L159
datasalt/pangool
core/src/main/java/com/datasalt/pangool/io/Mutator.java
Mutator.minusFields
public static Schema minusFields(Schema schema, String... minusFields) { return minusFields("minusSchema" + (COUNTER++), schema, minusFields); }
java
public static Schema minusFields(Schema schema, String... minusFields) { return minusFields("minusSchema" + (COUNTER++), schema, minusFields); }
[ "public", "static", "Schema", "minusFields", "(", "Schema", "schema", ",", "String", "...", "minusFields", ")", "{", "return", "minusFields", "(", "\"minusSchema\"", "+", "(", "COUNTER", "++", ")", ",", "schema", ",", "minusFields", ")", ";", "}" ]
Creates a new schema which has exactly the same fields as the input Schema minus the field names that are specified as "minusFields". This is equivalent to calling {@link #subSetOf(Schema, String...)} with the list of Fields that must remain, but instead here we specify the fields that should NOT remain. <p> The name o...
[ "Creates", "a", "new", "schema", "which", "has", "exactly", "the", "same", "fields", "as", "the", "input", "Schema", "minus", "the", "field", "names", "that", "are", "specified", "as", "minusFields", ".", "This", "is", "equivalent", "to", "calling", "{" ]
train
https://github.com/datasalt/pangool/blob/bfd312dd78cba03febaf7988ae96a3d4bc585408/core/src/main/java/com/datasalt/pangool/io/Mutator.java#L24-L26
micronaut-projects/micronaut-core
http-server-netty/src/main/java/io/micronaut/http/server/netty/EpollEventLoopGroupFactory.java
EpollEventLoopGroupFactory.createEventLoopGroup
@Override public EventLoopGroup createEventLoopGroup(int threads, @Nullable Integer ioRatio) { return withIoRatio(new EpollEventLoopGroup(threads), ioRatio); }
java
@Override public EventLoopGroup createEventLoopGroup(int threads, @Nullable Integer ioRatio) { return withIoRatio(new EpollEventLoopGroup(threads), ioRatio); }
[ "@", "Override", "public", "EventLoopGroup", "createEventLoopGroup", "(", "int", "threads", ",", "@", "Nullable", "Integer", "ioRatio", ")", "{", "return", "withIoRatio", "(", "new", "EpollEventLoopGroup", "(", "threads", ")", ",", "ioRatio", ")", ";", "}" ]
Creates an EpollEventLoopGroup. @param threads The number of threads to use. @param ioRatio The io ratio. @return An EpollEventLoopGroup.
[ "Creates", "an", "EpollEventLoopGroup", "." ]
train
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/http-server-netty/src/main/java/io/micronaut/http/server/netty/EpollEventLoopGroupFactory.java#L58-L61
tootedom/related
app/domain/src/main/java/org/greencheek/related/api/RelatedItemAdditionalProperties.java
RelatedItemAdditionalProperties.setProperty
public void setProperty(String name, String value, int propertyIndex) { additionalProperties[propertyIndex].setName(name); additionalProperties[propertyIndex].setValue(value); }
java
public void setProperty(String name, String value, int propertyIndex) { additionalProperties[propertyIndex].setName(name); additionalProperties[propertyIndex].setValue(value); }
[ "public", "void", "setProperty", "(", "String", "name", ",", "String", "value", ",", "int", "propertyIndex", ")", "{", "additionalProperties", "[", "propertyIndex", "]", ".", "setName", "(", "name", ")", ";", "additionalProperties", "[", "propertyIndex", "]", ...
Sets the property, at the given index, to the given name, and value. @param name The property name @param value the property value @param propertyIndex the property that is to be set or written over.
[ "Sets", "the", "property", "at", "the", "given", "index", "to", "the", "given", "name", "and", "value", "." ]
train
https://github.com/tootedom/related/blob/3782dd5a839bbcdc15661d598e8b895aae8aabb7/app/domain/src/main/java/org/greencheek/related/api/RelatedItemAdditionalProperties.java#L128-L131