repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
11
218
func_name
stringlengths
4
140
whole_func_string
stringlengths
153
5.32k
language
stringclasses
1 value
func_code_string
stringlengths
72
4k
func_code_tokens
listlengths
20
832
func_documentation_string
stringlengths
61
2k
func_documentation_tokens
listlengths
1
647
split_name
stringclasses
1 value
func_code_url
stringlengths
102
339
jeffreyning/nh-micro
nh-micro-template/src/main/java/com/nh/micro/template/MicroServiceTemplateSupport.java
MicroServiceTemplateSupport.getSeqByMysql
public Integer getSeqByMysql(String seqKey) { """ /* public void dbTranNestRollbackAndReStart() throws Exception{ PlatformTransactionManager transactionManager=MicroTranManagerHolder.getTransactionManager(dbName); DefaultTransactionDefinition def =new DefaultTransactionDefinition(); def.setIsolationLevel(Trans...
java
public Integer getSeqByMysql(String seqKey){ PlatformTransactionManager transactionManager=MicroTranManagerHolder.getTransactionManager(dbName); DefaultTransactionDefinition def =new DefaultTransactionDefinition(); def.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRES_NEW); Trans...
[ "public", "Integer", "getSeqByMysql", "(", "String", "seqKey", ")", "{", "PlatformTransactionManager", "transactionManager", "=", "MicroTranManagerHolder", ".", "getTransactionManager", "(", "dbName", ")", ";", "DefaultTransactionDefinition", "def", "=", "new", "DefaultTr...
/* public void dbTranNestRollbackAndReStart() throws Exception{ PlatformTransactionManager transactionManager=MicroTranManagerHolder.getTransactionManager(dbName); DefaultTransactionDefinition def =new DefaultTransactionDefinition(); def.setIsolationLevel(TransactionDefinition.ISOLATION_READ_COMMITTED); def.setPropaga...
[ "/", "*", "public", "void", "dbTranNestRollbackAndReStart", "()", "throws", "Exception", "{", "PlatformTransactionManager", "transactionManager", "=", "MicroTranManagerHolder", ".", "getTransactionManager", "(", "dbName", ")", ";", "DefaultTransactionDefinition", "def", "="...
train
https://github.com/jeffreyning/nh-micro/blob/f1cb420a092f8ba94317519ede739974decb5617/nh-micro-template/src/main/java/com/nh/micro/template/MicroServiceTemplateSupport.java#L2323-L2349
molgenis/molgenis
molgenis-navigator/src/main/java/org/molgenis/navigator/copy/service/LabelGenerator.java
LabelGenerator.generateUniqueLabel
static String generateUniqueLabel(String label, Set<String> existingLabels) { """ Makes sure that a given label will be unique amongst a set of other labels. """ StringBuilder newLabel = new StringBuilder(label); while (existingLabels.contains(newLabel.toString())) { newLabel.append(POSTFIX); ...
java
static String generateUniqueLabel(String label, Set<String> existingLabels) { StringBuilder newLabel = new StringBuilder(label); while (existingLabels.contains(newLabel.toString())) { newLabel.append(POSTFIX); } return newLabel.toString(); }
[ "static", "String", "generateUniqueLabel", "(", "String", "label", ",", "Set", "<", "String", ">", "existingLabels", ")", "{", "StringBuilder", "newLabel", "=", "new", "StringBuilder", "(", "label", ")", ";", "while", "(", "existingLabels", ".", "contains", "(...
Makes sure that a given label will be unique amongst a set of other labels.
[ "Makes", "sure", "that", "a", "given", "label", "will", "be", "unique", "amongst", "a", "set", "of", "other", "labels", "." ]
train
https://github.com/molgenis/molgenis/blob/b4d0d6b27e6f6c8d7505a3863dc03b589601f987/molgenis-navigator/src/main/java/org/molgenis/navigator/copy/service/LabelGenerator.java#L11-L17
JM-Lab/utils-java9
src/main/java/kr/jm/utils/HttpRequester.java
HttpRequester.getResponseAsString
public static String getResponseAsString(String uri, Header header) { """ Gets response as string. @param uri the uri @param header the header @return the response as string """ HttpGet httpGet = new HttpGet(uri); httpGet.setHeader(header); request(httpGet); return reque...
java
public static String getResponseAsString(String uri, Header header) { HttpGet httpGet = new HttpGet(uri); httpGet.setHeader(header); request(httpGet); return request(httpGet); }
[ "public", "static", "String", "getResponseAsString", "(", "String", "uri", ",", "Header", "header", ")", "{", "HttpGet", "httpGet", "=", "new", "HttpGet", "(", "uri", ")", ";", "httpGet", ".", "setHeader", "(", "header", ")", ";", "request", "(", "httpGet"...
Gets response as string. @param uri the uri @param header the header @return the response as string
[ "Gets", "response", "as", "string", "." ]
train
https://github.com/JM-Lab/utils-java9/blob/ee80235b2760396a616cf7563cbdc98d4affe8e1/src/main/java/kr/jm/utils/HttpRequester.java#L99-L104
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WFieldLayout.java
WFieldLayout.addField
public WField addField(final WLabel label, final WComponent field) { """ Add a field using the label and components passed in. @param label the label to use for the field @param field the component to use for the field @return the field which was added to the layout. """ WField wField = new WField(label...
java
public WField addField(final WLabel label, final WComponent field) { WField wField = new WField(label, field); add(wField); return wField; }
[ "public", "WField", "addField", "(", "final", "WLabel", "label", ",", "final", "WComponent", "field", ")", "{", "WField", "wField", "=", "new", "WField", "(", "label", ",", "field", ")", ";", "add", "(", "wField", ")", ";", "return", "wField", ";", "}"...
Add a field using the label and components passed in. @param label the label to use for the field @param field the component to use for the field @return the field which was added to the layout.
[ "Add", "a", "field", "using", "the", "label", "and", "components", "passed", "in", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WFieldLayout.java#L196-L201
apache/groovy
src/main/java/org/codehaus/groovy/runtime/ResourceGroovyMethods.java
ResourceGroovyMethods.newReader
public static BufferedReader newReader(URL url, Map parameters, String charset) throws MalformedURLException, IOException { """ Creates a buffered reader for this URL using the given encoding. @param url a URL @param parameters connection parameters @param charset opens the stream with a specified c...
java
public static BufferedReader newReader(URL url, Map parameters, String charset) throws MalformedURLException, IOException { return new BufferedReader(new InputStreamReader(configuredInputStream(parameters, url), charset)); }
[ "public", "static", "BufferedReader", "newReader", "(", "URL", "url", ",", "Map", "parameters", ",", "String", "charset", ")", "throws", "MalformedURLException", ",", "IOException", "{", "return", "new", "BufferedReader", "(", "new", "InputStreamReader", "(", "con...
Creates a buffered reader for this URL using the given encoding. @param url a URL @param parameters connection parameters @param charset opens the stream with a specified charset @return a BufferedReader for the URL @throws MalformedURLException is thrown if the URL is not well formed @throws IOException ...
[ "Creates", "a", "buffered", "reader", "for", "this", "URL", "using", "the", "given", "encoding", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/ResourceGroovyMethods.java#L2283-L2285
foundation-runtime/service-directory
1.1/sd-api/src/main/java/com/cisco/oss/foundation/directory/impl/DirectoryLookupService.java
DirectoryLookupService.getModelServiceInstance
public ModelServiceInstance getModelServiceInstance(String serviceName, String instanceId) { """ Get the ModelServiceInstance by serviceName and instanceId. @param serviceName the service name. @param instanceId the instanceId. @return the ModelServiceInstance. """ ModelService service = getMod...
java
public ModelServiceInstance getModelServiceInstance(String serviceName, String instanceId){ ModelService service = getModelService(serviceName); if(service != null && service.getServiceInstances() != null ){ for(ModelServiceInstance instance : service.getServiceInstances()){ ...
[ "public", "ModelServiceInstance", "getModelServiceInstance", "(", "String", "serviceName", ",", "String", "instanceId", ")", "{", "ModelService", "service", "=", "getModelService", "(", "serviceName", ")", ";", "if", "(", "service", "!=", "null", "&&", "service", ...
Get the ModelServiceInstance by serviceName and instanceId. @param serviceName the service name. @param instanceId the instanceId. @return the ModelServiceInstance.
[ "Get", "the", "ModelServiceInstance", "by", "serviceName", "and", "instanceId", "." ]
train
https://github.com/foundation-runtime/service-directory/blob/a7bdefe173dc99e75eff4a24e07e6407e62f2ed4/1.1/sd-api/src/main/java/com/cisco/oss/foundation/directory/impl/DirectoryLookupService.java#L102-L112
OpenLiberty/open-liberty
dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/channel/internal/HttpChannelConfig.java
HttpChannelConfig.parseReadTimeout
private void parseReadTimeout(Map<Object, Object> props) { """ Check the input configuration for the timeout to use when doing any read during a connection. @param props """ Object value = props.get(HttpConfigConstants.PROPNAME_READ_TIMEOUT); if (null != value) { try { ...
java
private void parseReadTimeout(Map<Object, Object> props) { Object value = props.get(HttpConfigConstants.PROPNAME_READ_TIMEOUT); if (null != value) { try { this.readTimeout = TIMEOUT_MODIFIER * minLimit(convertInteger(value), HttpConfigConstants.MIN_TIMEOUT); i...
[ "private", "void", "parseReadTimeout", "(", "Map", "<", "Object", ",", "Object", ">", "props", ")", "{", "Object", "value", "=", "props", ".", "get", "(", "HttpConfigConstants", ".", "PROPNAME_READ_TIMEOUT", ")", ";", "if", "(", "null", "!=", "value", ")",...
Check the input configuration for the timeout to use when doing any read during a connection. @param props
[ "Check", "the", "input", "configuration", "for", "the", "timeout", "to", "use", "when", "doing", "any", "read", "during", "a", "connection", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/channel/internal/HttpChannelConfig.java#L658-L673
jtrfp/javamod
src/main/java/de/quippy/javamod/multimedia/mp3/id3/ID3v2Footer.java
ID3v2Footer.readFooter
private void readFooter(RandomAccessInputStream raf, int location) throws IOException { """ Extracts the information from the footer. @param location where the footer is in the file @exception FileNotFoundException if an error occurs @exception IOException if an error occurs """ raf.seek(location); by...
java
private void readFooter(RandomAccessInputStream raf, int location) throws IOException { raf.seek(location); byte[] foot = new byte[FOOT_SIZE]; if (raf.read(foot) != FOOT_SIZE) { throw new IOException("Error encountered reading id3v2 footer"); } majorVersion = (int) foot[3]; if (majorVersion <= NEW_...
[ "private", "void", "readFooter", "(", "RandomAccessInputStream", "raf", ",", "int", "location", ")", "throws", "IOException", "{", "raf", ".", "seek", "(", "location", ")", ";", "byte", "[", "]", "foot", "=", "new", "byte", "[", "FOOT_SIZE", "]", ";", "i...
Extracts the information from the footer. @param location where the footer is in the file @exception FileNotFoundException if an error occurs @exception IOException if an error occurs
[ "Extracts", "the", "information", "from", "the", "footer", "." ]
train
https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mp3/id3/ID3v2Footer.java#L113-L134
alkacon/opencms-core
src/org/opencms/db/CmsLoginManager.java
CmsLoginManager.requiresPasswordChange
public boolean requiresPasswordChange(CmsObject cms, CmsUser user) { """ Checks if a user is required to change his password now.<p> @param cms the current CMS context @param user the user to check @return true if the user should be asked to change his password """ if (user.isManaged() ...
java
public boolean requiresPasswordChange(CmsObject cms, CmsUser user) { if (user.isManaged() || user.isWebuser() || OpenCms.getDefaultUsers().isDefaultUser(user.getName()) || OpenCms.getRoleManager().hasRole(cms, user.getName(), CmsRole.ROOT_ADMIN)) { return false; ...
[ "public", "boolean", "requiresPasswordChange", "(", "CmsObject", "cms", ",", "CmsUser", "user", ")", "{", "if", "(", "user", ".", "isManaged", "(", ")", "||", "user", ".", "isWebuser", "(", ")", "||", "OpenCms", ".", "getDefaultUsers", "(", ")", ".", "is...
Checks if a user is required to change his password now.<p> @param cms the current CMS context @param user the user to check @return true if the user should be asked to change his password
[ "Checks", "if", "a", "user", "is", "required", "to", "change", "his", "password", "now", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsLoginManager.java#L581-L599
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java
ModelsImpl.listModels
public List<ModelInfoResponse> listModels(UUID appId, String versionId, ListModelsOptionalParameter listModelsOptionalParameter) { """ Gets information about the application version models. @param appId The application ID. @param versionId The version ID. @param listModelsOptionalParameter the object represen...
java
public List<ModelInfoResponse> listModels(UUID appId, String versionId, ListModelsOptionalParameter listModelsOptionalParameter) { return listModelsWithServiceResponseAsync(appId, versionId, listModelsOptionalParameter).toBlocking().single().body(); }
[ "public", "List", "<", "ModelInfoResponse", ">", "listModels", "(", "UUID", "appId", ",", "String", "versionId", ",", "ListModelsOptionalParameter", "listModelsOptionalParameter", ")", "{", "return", "listModelsWithServiceResponseAsync", "(", "appId", ",", "versionId", ...
Gets information about the application version models. @param appId The application ID. @param versionId The version ID. @param listModelsOptionalParameter the object representing the optional parameters to be set before calling this API @throws IllegalArgumentException thrown if parameters fail the validation @throws...
[ "Gets", "information", "about", "the", "application", "version", "models", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java#L2445-L2447
samskivert/samskivert
src/main/java/com/samskivert/util/Folds.java
Folds.foldLeft
public static <A, B> B foldLeft (F<B,A> func, B zero, Iterable<? extends A> values) { """ Left folds the supplied function over the supplied values using the supplied starting value. """ for (A value : values) { zero = func.apply(zero, value); } return zero; }
java
public static <A, B> B foldLeft (F<B,A> func, B zero, Iterable<? extends A> values) { for (A value : values) { zero = func.apply(zero, value); } return zero; }
[ "public", "static", "<", "A", ",", "B", ">", "B", "foldLeft", "(", "F", "<", "B", ",", "A", ">", "func", ",", "B", "zero", ",", "Iterable", "<", "?", "extends", "A", ">", "values", ")", "{", "for", "(", "A", "value", ":", "values", ")", "{", ...
Left folds the supplied function over the supplied values using the supplied starting value.
[ "Left", "folds", "the", "supplied", "function", "over", "the", "supplied", "values", "using", "the", "supplied", "starting", "value", "." ]
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/util/Folds.java#L30-L36
ist-dresden/composum
sling/core/commons/src/main/java/com/composum/sling/clientlibs/handle/ClientlibExternalUri.java
ClientlibExternalUri.accept
@Override public void accept(ClientlibVisitor visitor, ClientlibVisitor.VisitorMode mode, ClientlibResourceFolder parent) { """ Calls the visitor with mode {@link com.composum.sling.clientlibs.handle.ClientlibVisitor.VisitorMode#DEPENDS}, since external references are never embedded. """ visitor.v...
java
@Override public void accept(ClientlibVisitor visitor, ClientlibVisitor.VisitorMode mode, ClientlibResourceFolder parent) { visitor.visit(this, ClientlibVisitor.VisitorMode.DEPENDS, parent); }
[ "@", "Override", "public", "void", "accept", "(", "ClientlibVisitor", "visitor", ",", "ClientlibVisitor", ".", "VisitorMode", "mode", ",", "ClientlibResourceFolder", "parent", ")", "{", "visitor", ".", "visit", "(", "this", ",", "ClientlibVisitor", ".", "VisitorMo...
Calls the visitor with mode {@link com.composum.sling.clientlibs.handle.ClientlibVisitor.VisitorMode#DEPENDS}, since external references are never embedded.
[ "Calls", "the", "visitor", "with", "mode", "{" ]
train
https://github.com/ist-dresden/composum/blob/ebc79f559f6022c935240c19102539bdfb1bd1e2/sling/core/commons/src/main/java/com/composum/sling/clientlibs/handle/ClientlibExternalUri.java#L29-L32
citrusframework/citrus
modules/citrus-core/src/main/java/com/consol/citrus/config/xml/PayloadElementParser.java
PayloadElementParser.parseMessagePayload
public static String parseMessagePayload(Element payloadElement) { """ Static parse method taking care of payload element. @param payloadElement """ if (payloadElement == null) { return ""; } try { Document payload = DocumentBuilderFactory.newInstance()...
java
public static String parseMessagePayload(Element payloadElement) { if (payloadElement == null) { return ""; } try { Document payload = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument(); payload.appendChild(payload.importNode(payl...
[ "public", "static", "String", "parseMessagePayload", "(", "Element", "payloadElement", ")", "{", "if", "(", "payloadElement", "==", "null", ")", "{", "return", "\"\"", ";", "}", "try", "{", "Document", "payload", "=", "DocumentBuilderFactory", ".", "newInstance"...
Static parse method taking care of payload element. @param payloadElement
[ "Static", "parse", "method", "taking", "care", "of", "payload", "element", "." ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/config/xml/PayloadElementParser.java#L44-L62
avianey/facebook-api-android-maven
facebook/src/main/java/com/facebook/Session.java
Session.openActiveSession
public static Session openActiveSession(Context context, Fragment fragment, boolean allowLoginUI, StatusCallback callback) { """ If allowLoginUI is true, this will create a new Session, make it active, and open it. If the default token cache is not available, then this will request basic permissions....
java
public static Session openActiveSession(Context context, Fragment fragment, boolean allowLoginUI, StatusCallback callback) { return openActiveSession(context, allowLoginUI, new OpenRequest(fragment).setCallback(callback)); }
[ "public", "static", "Session", "openActiveSession", "(", "Context", "context", ",", "Fragment", "fragment", ",", "boolean", "allowLoginUI", ",", "StatusCallback", "callback", ")", "{", "return", "openActiveSession", "(", "context", ",", "allowLoginUI", ",", "new", ...
If allowLoginUI is true, this will create a new Session, make it active, and open it. If the default token cache is not available, then this will request basic permissions. If the default token cache is available and cached tokens are loaded, this will use the cached token and associated permissions. <p/> If allowedLog...
[ "If", "allowLoginUI", "is", "true", "this", "will", "create", "a", "new", "Session", "make", "it", "active", "and", "open", "it", ".", "If", "the", "default", "token", "cache", "is", "not", "available", "then", "this", "will", "request", "basic", "permissi...
train
https://github.com/avianey/facebook-api-android-maven/blob/ae6c7aa7ae45739ee19f18c1983e05f7e35b9ede/facebook/src/main/java/com/facebook/Session.java#L1065-L1068
alkacon/opencms-core
src/org/opencms/db/CmsSecurityManager.java
CmsSecurityManager.addUserToGroup
public void addUserToGroup(CmsRequestContext context, String username, String groupname, boolean readRoles) throws CmsException { """ Adds a user to a group.<p> @param context the current request context @param username the name of the user that is to be added to the group @param groupname the name of the...
java
public void addUserToGroup(CmsRequestContext context, String username, String groupname, boolean readRoles) throws CmsException { CmsDbContext dbc = m_dbContextFactory.getDbContext(context); try { CmsRole role = CmsRole.ACCOUNT_MANAGER.forOrgUnit(getParentOrganizationalUnit(username)); ...
[ "public", "void", "addUserToGroup", "(", "CmsRequestContext", "context", ",", "String", "username", ",", "String", "groupname", ",", "boolean", "readRoles", ")", "throws", "CmsException", "{", "CmsDbContext", "dbc", "=", "m_dbContextFactory", ".", "getDbContext", "(...
Adds a user to a group.<p> @param context the current request context @param username the name of the user that is to be added to the group @param groupname the name of the group @param readRoles if reading roles or groups @throws CmsException if operation was not successful
[ "Adds", "a", "user", "to", "a", "group", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsSecurityManager.java#L278-L295
BBN-E/bue-common-open
common-core-open/src/main/java/com/bbn/bue/common/primitives/DoubleUtils.java
DoubleUtils.shiftTowardsZeroWithClipping
public static double shiftTowardsZeroWithClipping(double val, double shift) { """ Shifts the provided {@code val} towards but not past zero. If the absolute value of {@code val} is less than or equal to shift, zero will be returned. Otherwise, negative {@code val}s will have {@code shift} added and positive val...
java
public static double shiftTowardsZeroWithClipping(double val, double shift) { checkArgument(shift>=0.0); if (val > shift) { return val - shift; } else if (val < -shift) { return val + shift; } else { return 0.0; } }
[ "public", "static", "double", "shiftTowardsZeroWithClipping", "(", "double", "val", ",", "double", "shift", ")", "{", "checkArgument", "(", "shift", ">=", "0.0", ")", ";", "if", "(", "val", ">", "shift", ")", "{", "return", "val", "-", "shift", ";", "}",...
Shifts the provided {@code val} towards but not past zero. If the absolute value of {@code val} is less than or equal to shift, zero will be returned. Otherwise, negative {@code val}s will have {@code shift} added and positive vals will have {@code shift} subtracted. {@code shift} must be non-negative Inspired by Ad...
[ "Shifts", "the", "provided", "{", "@code", "val", "}", "towards", "but", "not", "past", "zero", ".", "If", "the", "absolute", "value", "of", "{", "@code", "val", "}", "is", "less", "than", "or", "equal", "to", "shift", "zero", "will", "be", "returned",...
train
https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/common-core-open/src/main/java/com/bbn/bue/common/primitives/DoubleUtils.java#L246-L255
netscaler/sdx_nitro
src/main/java/com/citrix/sdx/nitro/resource/config/br_broker/br_broker.java
br_broker.get_nitro_bulk_response
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { """ <pre> Converts API response of bulk operation into object and returns the object array in case of get request. </pre> """ br_broker_responses result = (br_broker_responses) service.get_payload_...
java
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { br_broker_responses result = (br_broker_responses) service.get_payload_formatter().string_to_resource(br_broker_responses.class, response); if(result.errorcode != 0) { if (result.errorcode == SESS...
[ "protected", "base_resource", "[", "]", "get_nitro_bulk_response", "(", "nitro_service", "service", ",", "String", "response", ")", "throws", "Exception", "{", "br_broker_responses", "result", "=", "(", "br_broker_responses", ")", "service", ".", "get_payload_formatter"...
<pre> Converts API response of bulk operation into object and returns the object array in case of get request. </pre>
[ "<pre", ">", "Converts", "API", "response", "of", "bulk", "operation", "into", "object", "and", "returns", "the", "object", "array", "in", "case", "of", "get", "request", ".", "<", "/", "pre", ">" ]
train
https://github.com/netscaler/sdx_nitro/blob/c840919f1a8f7c0a5634c0f23d34fa14d1765ff1/src/main/java/com/citrix/sdx/nitro/resource/config/br_broker/br_broker.java#L688-L705
OpenLiberty/open-liberty
dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/DCacheBase.java
DCacheBase.getEntry
public com.ibm.websphere.cache.CacheEntry getEntry(Object id) { """ This returns the cache entry identified by the specified cache id. It returns null if not in the cache. @param id The object representation of cache id for the entry. The id cannot be null. @return The entry identified by the cache id. ""...
java
public com.ibm.websphere.cache.CacheEntry getEntry(Object id) { return getEntry(id, CachePerf.LOCAL, IGNORE_COUNTING, !INCREMENT_REFF_COUNT); }
[ "public", "com", ".", "ibm", ".", "websphere", ".", "cache", ".", "CacheEntry", "getEntry", "(", "Object", "id", ")", "{", "return", "getEntry", "(", "id", ",", "CachePerf", ".", "LOCAL", ",", "IGNORE_COUNTING", ",", "!", "INCREMENT_REFF_COUNT", ")", ";", ...
This returns the cache entry identified by the specified cache id. It returns null if not in the cache. @param id The object representation of cache id for the entry. The id cannot be null. @return The entry identified by the cache id.
[ "This", "returns", "the", "cache", "entry", "identified", "by", "the", "specified", "cache", "id", ".", "It", "returns", "null", "if", "not", "in", "the", "cache", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/DCacheBase.java#L362-L364
phax/ph-datetime
ph-holiday/src/main/java/com/helger/holiday/parser/AbstractHolidayParser.java
AbstractHolidayParser._isValidInYear
private static boolean _isValidInYear (@Nonnull final Holiday aHoliday, final int nYear) { """ Checks whether the holiday is within the valid date range. @param aHoliday @param nYear @return is valid. """ return (aHoliday.getValidFrom () == null || aHoliday.getValidFrom ().intValue () <= nYear) && ...
java
private static boolean _isValidInYear (@Nonnull final Holiday aHoliday, final int nYear) { return (aHoliday.getValidFrom () == null || aHoliday.getValidFrom ().intValue () <= nYear) && (aHoliday.getValidTo () == null || aHoliday.getValidTo ().intValue () >= nYear); }
[ "private", "static", "boolean", "_isValidInYear", "(", "@", "Nonnull", "final", "Holiday", "aHoliday", ",", "final", "int", "nYear", ")", "{", "return", "(", "aHoliday", ".", "getValidFrom", "(", ")", "==", "null", "||", "aHoliday", ".", "getValidFrom", "(",...
Checks whether the holiday is within the valid date range. @param aHoliday @param nYear @return is valid.
[ "Checks", "whether", "the", "holiday", "is", "within", "the", "valid", "date", "range", "." ]
train
https://github.com/phax/ph-datetime/blob/cfaff01cb76d9affb934800ff55734b5a7d8983e/ph-holiday/src/main/java/com/helger/holiday/parser/AbstractHolidayParser.java#L111-L115
google/closure-templates
java/src/com/google/template/soy/pysrc/internal/PySrcMain.java
PySrcMain.genPySrc
private List<String> genPySrc( SoyFileSetNode soyTree, SoyPySrcOptions pySrcOptions, ImmutableMap<String, String> currentManifest, ErrorReporter errorReporter) { """ Generates Python source code given a Soy parse tree and an options object. @param soyTree The Soy parse tree to generate P...
java
private List<String> genPySrc( SoyFileSetNode soyTree, SoyPySrcOptions pySrcOptions, ImmutableMap<String, String> currentManifest, ErrorReporter errorReporter) { BidiGlobalDir bidiGlobalDir = SoyBidiUtils.decodeBidiGlobalDirFromPyOptions(pySrcOptions.getBidiIsRtlFn()); try (SoyS...
[ "private", "List", "<", "String", ">", "genPySrc", "(", "SoyFileSetNode", "soyTree", ",", "SoyPySrcOptions", "pySrcOptions", ",", "ImmutableMap", "<", "String", ",", "String", ">", "currentManifest", ",", "ErrorReporter", "errorReporter", ")", "{", "BidiGlobalDir", ...
Generates Python source code given a Soy parse tree and an options object. @param soyTree The Soy parse tree to generate Python source code for. @param pySrcOptions The compilation options relevant to this backend. @param currentManifest The namespace manifest for current sources. @param errorReporter The Soy error re...
[ "Generates", "Python", "source", "code", "given", "a", "Soy", "parse", "tree", "and", "an", "options", "object", "." ]
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/pysrc/internal/PySrcMain.java#L70-L82
languagetool-org/languagetool
languagetool-core/src/main/java/org/languagetool/rules/patterns/MatchState.java
MatchState.setToken
public final void setToken(AnalyzedTokenReadings[] tokens, int index, int next) { """ Sets the token to be formatted etc. and includes the support for including the skipped tokens. @param tokens Array of tokens @param index Index of the token to be formatted @param next Position of the next token (the skippe...
java
public final void setToken(AnalyzedTokenReadings[] tokens, int index, int next) { int idx = index; if (index >= tokens.length) { // TODO: hacky workaround, find a proper solution. See EnglishPatternRuleTest.testBug() idx = tokens.length - 1; } setToken(tokens[idx]); IncludeRange includeS...
[ "public", "final", "void", "setToken", "(", "AnalyzedTokenReadings", "[", "]", "tokens", ",", "int", "index", ",", "int", "next", ")", "{", "int", "idx", "=", "index", ";", "if", "(", "index", ">=", "tokens", ".", "length", ")", "{", "// TODO: hacky work...
Sets the token to be formatted etc. and includes the support for including the skipped tokens. @param tokens Array of tokens @param index Index of the token to be formatted @param next Position of the next token (the skipped tokens are the ones between the tokens[index] and tokens[next]
[ "Sets", "the", "token", "to", "be", "formatted", "etc", ".", "and", "includes", "the", "support", "for", "including", "the", "skipped", "tokens", "." ]
train
https://github.com/languagetool-org/languagetool/blob/b7a3d63883d242fb2525877c6382681c57a0a142/languagetool-core/src/main/java/org/languagetool/rules/patterns/MatchState.java#L81-L105
fuzzylite/jfuzzylite
jfuzzylite/src/main/java/com/fuzzylite/term/Function.java
Function.evaluate
public double evaluate(Map<String, Double> localVariables) { """ Computes the function value of this term using the given map of variable substitutions. @param localVariables is a map of substitution variables @return the function value of this term using the given map of variable substitutions. """ ...
java
public double evaluate(Map<String, Double> localVariables) { if (this.root == null) { throw new RuntimeException("[function error] evaluation failed " + "because function is not loaded"); } return this.root.evaluate(localVariables); }
[ "public", "double", "evaluate", "(", "Map", "<", "String", ",", "Double", ">", "localVariables", ")", "{", "if", "(", "this", ".", "root", "==", "null", ")", "{", "throw", "new", "RuntimeException", "(", "\"[function error] evaluation failed \"", "+", "\"becau...
Computes the function value of this term using the given map of variable substitutions. @param localVariables is a map of substitution variables @return the function value of this term using the given map of variable substitutions.
[ "Computes", "the", "function", "value", "of", "this", "term", "using", "the", "given", "map", "of", "variable", "substitutions", "." ]
train
https://github.com/fuzzylite/jfuzzylite/blob/583ac1928f39512af75de80d560e67448039595a/jfuzzylite/src/main/java/com/fuzzylite/term/Function.java#L592-L598
astrapi69/jaulp-wicket
jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/form/checkbox/CheckGroupSelectorPanel.java
CheckGroupSelectorPanel.newCheckGroupSelector
protected CheckGroupSelector newCheckGroupSelector(final String id, final CheckGroup<T> group) { """ Factory method for create a new {@link CheckGroupSelector}. This method is invoked in the constructor from the derived classes and can be overridden so users can provide their own version of a new {@link CheckGro...
java
protected CheckGroupSelector newCheckGroupSelector(final String id, final CheckGroup<T> group) { return ComponentFactory.newCheckGroupSelector(id, group); }
[ "protected", "CheckGroupSelector", "newCheckGroupSelector", "(", "final", "String", "id", ",", "final", "CheckGroup", "<", "T", ">", "group", ")", "{", "return", "ComponentFactory", ".", "newCheckGroupSelector", "(", "id", ",", "group", ")", ";", "}" ]
Factory method for create a new {@link CheckGroupSelector}. This method is invoked in the constructor from the derived classes and can be overridden so users can provide their own version of a new {@link CheckGroupSelector}. @param id the id @param group the {@link CheckGroup} @return the new {@link CheckGroupSelector...
[ "Factory", "method", "for", "create", "a", "new", "{", "@link", "CheckGroupSelector", "}", ".", "This", "method", "is", "invoked", "in", "the", "constructor", "from", "the", "derived", "classes", "and", "can", "be", "overridden", "so", "users", "can", "provi...
train
https://github.com/astrapi69/jaulp-wicket/blob/85d74368d00abd9bb97659b5794e38c0f8a013d4/jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/form/checkbox/CheckGroupSelectorPanel.java#L151-L154
alkacon/opencms-core
src/org/opencms/db/CmsSecurityManager.java
CmsSecurityManager.readBestUrlName
public String readBestUrlName(CmsRequestContext context, CmsUUID id, Locale locale, List<Locale> defaultLocales) throws CmsException { """ Reads the newest URL name which is mapped to the given structure id.<p> If the structure id is not mapped to any name, null will be returned.<p> @param context the re...
java
public String readBestUrlName(CmsRequestContext context, CmsUUID id, Locale locale, List<Locale> defaultLocales) throws CmsException { CmsDbContext dbc = m_dbContextFactory.getDbContext(context); try { return m_driverManager.readBestUrlName(dbc, id, locale, defaultLocales); } ca...
[ "public", "String", "readBestUrlName", "(", "CmsRequestContext", "context", ",", "CmsUUID", "id", ",", "Locale", "locale", ",", "List", "<", "Locale", ">", "defaultLocales", ")", "throws", "CmsException", "{", "CmsDbContext", "dbc", "=", "m_dbContextFactory", ".",...
Reads the newest URL name which is mapped to the given structure id.<p> If the structure id is not mapped to any name, null will be returned.<p> @param context the request context @param id the structure id for which the newest mapped name should be returned @param locale the locale for the mapping @param defaultLoca...
[ "Reads", "the", "newest", "URL", "name", "which", "is", "mapped", "to", "the", "given", "structure", "id", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsSecurityManager.java#L4095-L4110
liferay/com-liferay-commerce
commerce-notification-service/src/main/java/com/liferay/commerce/notification/service/persistence/impl/CommerceNotificationTemplatePersistenceImpl.java
CommerceNotificationTemplatePersistenceImpl.filterFindByGroupId
@Override public List<CommerceNotificationTemplate> filterFindByGroupId( long groupId, int start, int end) { """ Returns a range of all the commerce notification templates that the user has permission to view where groupId = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</...
java
@Override public List<CommerceNotificationTemplate> filterFindByGroupId( long groupId, int start, int end) { return filterFindByGroupId(groupId, start, end, null); }
[ "@", "Override", "public", "List", "<", "CommerceNotificationTemplate", ">", "filterFindByGroupId", "(", "long", "groupId", ",", "int", "start", ",", "int", "end", ")", "{", "return", "filterFindByGroupId", "(", "groupId", ",", "start", ",", "end", ",", "null"...
Returns a range of all the commerce notification templates that the user has permission to view where groupId = &#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, <co...
[ "Returns", "a", "range", "of", "all", "the", "commerce", "notification", "templates", "that", "the", "user", "has", "permission", "to", "view", "where", "groupId", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-notification-service/src/main/java/com/liferay/commerce/notification/service/persistence/impl/CommerceNotificationTemplatePersistenceImpl.java#L1989-L1993
interedition/collatex
collatex-core/src/main/java/eu/interedition/collatex/suffixtree/SuffixTree.java
SuffixTree.setSuffixLink
void setSuffixLink(Node<I, S> node) { """ Sets the suffix link of the last inserted node to point to the supplied node. This method checks the state of the step and only applies the suffix link if there is a previous node inserted during this step. This method also set the last node inserted to the supplied nod...
java
void setSuffixLink(Node<I, S> node) { if (isNotFirstInsert()) { lastNodeInserted.setSuffixLink(node); } lastNodeInserted = node; }
[ "void", "setSuffixLink", "(", "Node", "<", "I", ",", "S", ">", "node", ")", "{", "if", "(", "isNotFirstInsert", "(", ")", ")", "{", "lastNodeInserted", ".", "setSuffixLink", "(", "node", ")", ";", "}", "lastNodeInserted", "=", "node", ";", "}" ]
Sets the suffix link of the last inserted node to point to the supplied node. This method checks the state of the step and only applies the suffix link if there is a previous node inserted during this step. This method also set the last node inserted to the supplied node after applying any suffix linking. @param node ...
[ "Sets", "the", "suffix", "link", "of", "the", "last", "inserted", "node", "to", "point", "to", "the", "supplied", "node", ".", "This", "method", "checks", "the", "state", "of", "the", "step", "and", "only", "applies", "the", "suffix", "link", "if", "ther...
train
https://github.com/interedition/collatex/blob/76dd1fcc36047bc66a87d31142e72e98b5347821/collatex-core/src/main/java/eu/interedition/collatex/suffixtree/SuffixTree.java#L150-L155
google/closure-compiler
src/com/google/javascript/jscomp/TypedCodeGenerator.java
TypedCodeGenerator.getParameterJSDocName
private String getParameterJSDocName(Node paramNode, int paramIndex) { """ Return the name of the parameter to be used in JSDoc, generating one for destructuring parameters. @param paramNode child node of a parameter list @param paramIndex position of child in the list @return name to use in JSDoc """ ...
java
private String getParameterJSDocName(Node paramNode, int paramIndex) { Node nameNode = null; if (paramNode != null) { checkArgument(paramNode.getParent().isParamList(), paramNode); if (paramNode.isRest()) { // use `restParam` of `...restParam` // restParam might still be a destructur...
[ "private", "String", "getParameterJSDocName", "(", "Node", "paramNode", ",", "int", "paramIndex", ")", "{", "Node", "nameNode", "=", "null", ";", "if", "(", "paramNode", "!=", "null", ")", "{", "checkArgument", "(", "paramNode", ".", "getParent", "(", ")", ...
Return the name of the parameter to be used in JSDoc, generating one for destructuring parameters. @param paramNode child node of a parameter list @param paramIndex position of child in the list @return name to use in JSDoc
[ "Return", "the", "name", "of", "the", "parameter", "to", "be", "used", "in", "JSDoc", "generating", "one", "for", "destructuring", "parameters", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/TypedCodeGenerator.java#L308-L334
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/fixed/CommonOps_DDF3.java
CommonOps_DDF3.extractRow
public static DMatrix3 extractRow( DMatrix3x3 a , int row , DMatrix3 out ) { """ Extracts the row from the matrix a. @param a Input matrix @param row Which row is to be extracted @param out output. Storage for the extracted row. If null then a new vector will be returned. @return The extracted row. """ ...
java
public static DMatrix3 extractRow( DMatrix3x3 a , int row , DMatrix3 out ) { if( out == null) out = new DMatrix3(); switch( row ) { case 0: out.a1 = a.a11; out.a2 = a.a12; out.a3 = a.a13; break; case 1: o...
[ "public", "static", "DMatrix3", "extractRow", "(", "DMatrix3x3", "a", ",", "int", "row", ",", "DMatrix3", "out", ")", "{", "if", "(", "out", "==", "null", ")", "out", "=", "new", "DMatrix3", "(", ")", ";", "switch", "(", "row", ")", "{", "case", "0...
Extracts the row from the matrix a. @param a Input matrix @param row Which row is to be extracted @param out output. Storage for the extracted row. If null then a new vector will be returned. @return The extracted row.
[ "Extracts", "the", "row", "from", "the", "matrix", "a", "." ]
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/fixed/CommonOps_DDF3.java#L1350-L1372
simonpercic/CollectionHelper
collectionhelper/src/main/java/com/github/simonpercic/collectionhelper/CollectionHelper.java
CollectionHelper.firstOrNull
public static <T> T firstOrNull(Collection<T> items, Predicate<T> predicate) { """ Returns the first element from a collection that matches the given predicate or null if no matching element is found. @param items source items @param predicate predicate function @param <T> type of elements in the source coll...
java
public static <T> T firstOrNull(Collection<T> items, Predicate<T> predicate) { if (!isEmpty(items)) { for (T item : items) { if (predicate.apply(item)) { return item; } } } return null; }
[ "public", "static", "<", "T", ">", "T", "firstOrNull", "(", "Collection", "<", "T", ">", "items", ",", "Predicate", "<", "T", ">", "predicate", ")", "{", "if", "(", "!", "isEmpty", "(", "items", ")", ")", "{", "for", "(", "T", "item", ":", "items...
Returns the first element from a collection that matches the given predicate or null if no matching element is found. @param items source items @param predicate predicate function @param <T> type of elements in the source collection @return the first element that matches the given predicate or null if no matching elem...
[ "Returns", "the", "first", "element", "from", "a", "collection", "that", "matches", "the", "given", "predicate", "or", "null", "if", "no", "matching", "element", "is", "found", "." ]
train
https://github.com/simonpercic/CollectionHelper/blob/2425390ac14f3b6c0a7b04464cf5670060f2dc54/collectionhelper/src/main/java/com/github/simonpercic/collectionhelper/CollectionHelper.java#L89-L99
Azure/azure-sdk-for-java
containerregistry/resource-manager/v2017_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2017_06_01_preview/implementation/RegistriesInner.java
RegistriesInner.beginCreate
public RegistryInner beginCreate(String resourceGroupName, String registryName, RegistryInner registry) { """ Creates a container registry with the specified parameters. @param resourceGroupName The name of the resource group to which the container registry belongs. @param registryName The name of the containe...
java
public RegistryInner beginCreate(String resourceGroupName, String registryName, RegistryInner registry) { return beginCreateWithServiceResponseAsync(resourceGroupName, registryName, registry).toBlocking().single().body(); }
[ "public", "RegistryInner", "beginCreate", "(", "String", "resourceGroupName", ",", "String", "registryName", ",", "RegistryInner", "registry", ")", "{", "return", "beginCreateWithServiceResponseAsync", "(", "resourceGroupName", ",", "registryName", ",", "registry", ")", ...
Creates a container registry with the specified parameters. @param resourceGroupName The name of the resource group to which the container registry belongs. @param registryName The name of the container registry. @param registry The parameters for creating a container registry. @throws IllegalArgumentException thrown ...
[ "Creates", "a", "container", "registry", "with", "the", "specified", "parameters", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/containerregistry/resource-manager/v2017_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2017_06_01_preview/implementation/RegistriesInner.java#L390-L392
magik6k/JWWF
src/main/java/net/magik6k/jwwf/core/User.java
User.sendGlobal
public final void sendGlobal(String handler, String data) { """ This function is mainly made for plug-in use, it sends data to global user handler for example to perform some tasks that aren't related directly to widgets. Global handler is a javascript function in array named 'global', under key that is passed ...
java
public final void sendGlobal(String handler, String data) { try { connection.sendMessage("{\"id\":-1,\"type\":\"global\",\"handler\":" + Json.escapeString(handler) + ",\"data\":" + data + "}"); } catch (IOException e) { e.printStackTrace(); } }
[ "public", "final", "void", "sendGlobal", "(", "String", "handler", ",", "String", "data", ")", "{", "try", "{", "connection", ".", "sendMessage", "(", "\"{\\\"id\\\":-1,\\\"type\\\":\\\"global\\\",\\\"handler\\\":\"", "+", "Json", ".", "escapeString", "(", "handler", ...
This function is mainly made for plug-in use, it sends data to global user handler for example to perform some tasks that aren't related directly to widgets. Global handler is a javascript function in array named 'global', under key that is passed to this function as handler parameter. As first argument the javascript ...
[ "This", "function", "is", "mainly", "made", "for", "plug", "-", "in", "use", "it", "sends", "data", "to", "global", "user", "handler", "for", "example", "to", "perform", "some", "tasks", "that", "aren", "t", "related", "directly", "to", "widgets", ".", "...
train
https://github.com/magik6k/JWWF/blob/8ba334501396c3301495da8708733f6014f20665/src/main/java/net/magik6k/jwwf/core/User.java#L58-L65
Azure/azure-sdk-for-java
mediaservices/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/mediaservices/v2018_07_01/implementation/ContentKeyPoliciesInner.java
ContentKeyPoliciesInner.listAsync
public Observable<Page<ContentKeyPolicyInner>> listAsync(final String resourceGroupName, final String accountName, final String filter, final Integer top, final String orderby) { """ List Content Key Policies. Lists the Content Key Policies in the account. @param resourceGroupName The name of the resource grou...
java
public Observable<Page<ContentKeyPolicyInner>> listAsync(final String resourceGroupName, final String accountName, final String filter, final Integer top, final String orderby) { return listWithServiceResponseAsync(resourceGroupName, accountName, filter, top, orderby) .map(new Func1<ServiceResponse<...
[ "public", "Observable", "<", "Page", "<", "ContentKeyPolicyInner", ">", ">", "listAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "accountName", ",", "final", "String", "filter", ",", "final", "Integer", "top", ",", "final", "String"...
List Content Key Policies. Lists the Content Key Policies in the account. @param resourceGroupName The name of the resource group within the Azure subscription. @param accountName The Media Services account name. @param filter Restricts the set of items returned. @param top Specifies a non-negative integer n that limi...
[ "List", "Content", "Key", "Policies", ".", "Lists", "the", "Content", "Key", "Policies", "in", "the", "account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/mediaservices/v2018_07_01/implementation/ContentKeyPoliciesInner.java#L281-L289
nmdp-bioinformatics/ngs
feature/src/main/java/org/nmdp/ngs/feature/Allele.java
Allele.doubleCrossover
public Allele doubleCrossover(final Allele right) throws IllegalSymbolException, IndexOutOfBoundsException, IllegalAlphabetException { """ A method to simulate double crossover between Allele objects whereby the sequence from one allele is joined to the other within a specific region of overlap. @param right alle...
java
public Allele doubleCrossover(final Allele right) throws IllegalSymbolException, IndexOutOfBoundsException, IllegalAlphabetException { if (this.overlaps(right)) { //System.out.println("this range" + this.toString() + " sequence = " + this.sequence.seqString() + "sequence length = " + sequence.length...
[ "public", "Allele", "doubleCrossover", "(", "final", "Allele", "right", ")", "throws", "IllegalSymbolException", ",", "IndexOutOfBoundsException", ",", "IllegalAlphabetException", "{", "if", "(", "this", ".", "overlaps", "(", "right", ")", ")", "{", "//System.out.pr...
A method to simulate double crossover between Allele objects whereby the sequence from one allele is joined to the other within a specific region of overlap. @param right allele @return a new crossed-over allele. This implementation treats the original alleles as immutable thus favoring programmatic convenience over ge...
[ "A", "method", "to", "simulate", "double", "crossover", "between", "Allele", "objects", "whereby", "the", "sequence", "from", "one", "allele", "is", "joined", "to", "the", "other", "within", "a", "specific", "region", "of", "overlap", "." ]
train
https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/feature/src/main/java/org/nmdp/ngs/feature/Allele.java#L274-L311
logic-ng/LogicNG
src/main/java/org/logicng/io/readers/FormulaReader.java
FormulaReader.readPropositionalFormula
public static Formula readPropositionalFormula(final File file, final FormulaFactory f) throws IOException, ParserException { """ Reads a given file and returns the contained propositional formula. @param file the file @param f the formula factory @return the parsed formula @throws IOException if there ...
java
public static Formula readPropositionalFormula(final File file, final FormulaFactory f) throws IOException, ParserException { return read(file, new PropositionalParser(f)); }
[ "public", "static", "Formula", "readPropositionalFormula", "(", "final", "File", "file", ",", "final", "FormulaFactory", "f", ")", "throws", "IOException", ",", "ParserException", "{", "return", "read", "(", "file", ",", "new", "PropositionalParser", "(", "f", "...
Reads a given file and returns the contained propositional formula. @param file the file @param f the formula factory @return the parsed formula @throws IOException if there was a problem reading the file @throws ParserException if there was a problem parsing the formula
[ "Reads", "a", "given", "file", "and", "returns", "the", "contained", "propositional", "formula", "." ]
train
https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/io/readers/FormulaReader.java#L80-L82
CloudSlang/cs-actions
cs-tesseract/src/main/java/io/cloudslang/content/tesseract/actions/ExtractTextFromImage.java
ExtractTextFromImage.execute
@Action(name = "Extract text from image", description = EXTRACT_TEXT_FROM_IMAGE_DESC, outputs = { """ This operation extracts the text from a specified file given as input using Tesseract's OCR library. @param filePath The path of the file to be extracted. The file must be an image. Mo...
java
@Action(name = "Extract text from image", description = EXTRACT_TEXT_FROM_IMAGE_DESC, outputs = { @Output(value = RETURN_CODE, description = RETURN_CODE_DESC), @Output(value = RETURN_RESULT, description = RETURN_RESULT_DESC), @Output(va...
[ "@", "Action", "(", "name", "=", "\"Extract text from image\"", ",", "description", "=", "EXTRACT_TEXT_FROM_IMAGE_DESC", ",", "outputs", "=", "{", "@", "Output", "(", "value", "=", "RETURN_CODE", ",", "description", "=", "RETURN_CODE_DESC", ")", ",", "@", "Outpu...
This operation extracts the text from a specified file given as input using Tesseract's OCR library. @param filePath The path of the file to be extracted. The file must be an image. Most of the common image formats are supported. Required @param dataPath The path to the tessdata folder that contains the tesseract ...
[ "This", "operation", "extracts", "the", "text", "from", "a", "specified", "file", "given", "as", "input", "using", "Tesseract", "s", "OCR", "library", "." ]
train
https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-tesseract/src/main/java/io/cloudslang/content/tesseract/actions/ExtractTextFromImage.java#L81-L124
graphql-java/graphql-java
src/main/java/graphql/schema/GraphQLTypeCollectingVisitor.java
GraphQLTypeCollectingVisitor.assertTypeUniqueness
private void assertTypeUniqueness(GraphQLType type, Map<String, GraphQLType> result) { """ /* From http://facebook.github.io/graphql/#sec-Type-System All types within a GraphQL schema must have unique names. No two provided types may have the same name. No provided type may have a name which conflicts with an...
java
private void assertTypeUniqueness(GraphQLType type, Map<String, GraphQLType> result) { GraphQLType existingType = result.get(type.getName()); // do we have an existing definition if (existingType != null) { // type references are ok if (!(existingType instanceof GraphQLTy...
[ "private", "void", "assertTypeUniqueness", "(", "GraphQLType", "type", ",", "Map", "<", "String", ",", "GraphQLType", ">", "result", ")", "{", "GraphQLType", "existingType", "=", "result", ".", "get", "(", "type", ".", "getName", "(", ")", ")", ";", "// do...
/* From http://facebook.github.io/graphql/#sec-Type-System All types within a GraphQL schema must have unique names. No two provided types may have the same name. No provided type may have a name which conflicts with any built in types (including Scalar and Introspection types). Enforcing this helps avoid problems la...
[ "/", "*", "From", "http", ":", "//", "facebook", ".", "github", ".", "io", "/", "graphql", "/", "#sec", "-", "Type", "-", "System" ]
train
https://github.com/graphql-java/graphql-java/blob/9214b6044317849388bd88a14b54fc1c18c9f29f/src/main/java/graphql/schema/GraphQLTypeCollectingVisitor.java#L97-L111
groupon/odo
proxyserver/src/main/java/com/groupon/odo/Proxy.java
Proxy.getApplicablePathNames
private JSONArray getApplicablePathNames (String requestUrl, Integer requestType) throws Exception { """ Get the names of the paths that would apply to the request @param requestUrl URL of the request @param requestType Type of the request: GET, POST, PUT, or DELETE as integer @return JSONArray of path names ...
java
private JSONArray getApplicablePathNames (String requestUrl, Integer requestType) throws Exception { RequestInformation requestInfo = requestInformation.get(); List<EndpointOverride> applicablePaths; JSONArray pathNames = new JSONArray(); // Get all paths that match the request a...
[ "private", "JSONArray", "getApplicablePathNames", "(", "String", "requestUrl", ",", "Integer", "requestType", ")", "throws", "Exception", "{", "RequestInformation", "requestInfo", "=", "requestInformation", ".", "get", "(", ")", ";", "List", "<", "EndpointOverride", ...
Get the names of the paths that would apply to the request @param requestUrl URL of the request @param requestType Type of the request: GET, POST, PUT, or DELETE as integer @return JSONArray of path names @throws Exception
[ "Get", "the", "names", "of", "the", "paths", "that", "would", "apply", "to", "the", "request" ]
train
https://github.com/groupon/odo/blob/3bae43d5eca8ace036775e5b2d3ed9af1a9ff9b1/proxyserver/src/main/java/com/groupon/odo/Proxy.java#L551-L568
eclipse/hawkbit
hawkbit-repository/hawkbit-repository-core/src/main/java/org/eclipse/hawkbit/repository/RolloutStatusCache.java
RolloutStatusCache.getRolloutGroupStatus
public List<TotalTargetCountActionStatus> getRolloutGroupStatus(final Long groupId) { """ Retrieves cached list of {@link TotalTargetCountActionStatus} of {@link RolloutGroup}. @param groupId to retrieve cache entries for @return map of cached entries """ final Cache cache = cacheManager.getCache...
java
public List<TotalTargetCountActionStatus> getRolloutGroupStatus(final Long groupId) { final Cache cache = cacheManager.getCache(CACHE_GR_NAME); return retrieveFromCache(groupId, cache); }
[ "public", "List", "<", "TotalTargetCountActionStatus", ">", "getRolloutGroupStatus", "(", "final", "Long", "groupId", ")", "{", "final", "Cache", "cache", "=", "cacheManager", ".", "getCache", "(", "CACHE_GR_NAME", ")", ";", "return", "retrieveFromCache", "(", "gr...
Retrieves cached list of {@link TotalTargetCountActionStatus} of {@link RolloutGroup}. @param groupId to retrieve cache entries for @return map of cached entries
[ "Retrieves", "cached", "list", "of", "{", "@link", "TotalTargetCountActionStatus", "}", "of", "{", "@link", "RolloutGroup", "}", "." ]
train
https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-repository/hawkbit-repository-core/src/main/java/org/eclipse/hawkbit/repository/RolloutStatusCache.java#L117-L121
docusign/docusign-java-client
src/main/java/com/docusign/esign/api/EnvelopesApi.java
EnvelopesApi.updateDocument
public void updateDocument(String accountId, String envelopeId, String documentId) throws ApiException { """ Adds a document to an existing draft envelope. Adds a document to an existing draft envelope. @param accountId The external account number (int) or account ID Guid. (required) @param envelopeId The envel...
java
public void updateDocument(String accountId, String envelopeId, String documentId) throws ApiException { updateDocument(accountId, envelopeId, documentId, null); }
[ "public", "void", "updateDocument", "(", "String", "accountId", ",", "String", "envelopeId", ",", "String", "documentId", ")", "throws", "ApiException", "{", "updateDocument", "(", "accountId", ",", "envelopeId", ",", "documentId", ",", "null", ")", ";", "}" ]
Adds a document to an existing draft envelope. Adds a document to an existing draft envelope. @param accountId The external account number (int) or account ID Guid. (required) @param envelopeId The envelopeId Guid of the envelope being accessed. (required) @param documentId The ID of the document being accessed. (requi...
[ "Adds", "a", "document", "to", "an", "existing", "draft", "envelope", ".", "Adds", "a", "document", "to", "an", "existing", "draft", "envelope", "." ]
train
https://github.com/docusign/docusign-java-client/blob/17ae82ace0f023e98edf813be832950568212e34/src/main/java/com/docusign/esign/api/EnvelopesApi.java#L4973-L4975
lukin0110/poeditor-java
src/main/java/be/lukin/poeditor/POEditorClient.java
POEditorClient.addTerms
public TermsDetails addTerms(String projectId, List<Term> terms) { """ Add new terms to a project @param projectId id of the project @param terms list of terms @return details about the operation """ String jsonTerms = new Gson().toJson(terms); EditTermsResponse atr = service.editTerms(Act...
java
public TermsDetails addTerms(String projectId, List<Term> terms){ String jsonTerms = new Gson().toJson(terms); EditTermsResponse atr = service.editTerms(Action.ADD_TERMS, apiKey, projectId, jsonTerms); ApiUtils.checkResponse(atr.response); return atr.details; }
[ "public", "TermsDetails", "addTerms", "(", "String", "projectId", ",", "List", "<", "Term", ">", "terms", ")", "{", "String", "jsonTerms", "=", "new", "Gson", "(", ")", ".", "toJson", "(", "terms", ")", ";", "EditTermsResponse", "atr", "=", "service", "....
Add new terms to a project @param projectId id of the project @param terms list of terms @return details about the operation
[ "Add", "new", "terms", "to", "a", "project" ]
train
https://github.com/lukin0110/poeditor-java/blob/42a2cd3136da1276b29a57a483c94050cc7d1d01/src/main/java/be/lukin/poeditor/POEditorClient.java#L210-L215
GoSimpleLLC/nbvcxz
src/main/java/me/gosimple/nbvcxz/matching/DateMatcher.java
DateMatcher.isDateValid
private static ValidDateSplit isDateValid(String day, String month, String year) { """ Verify that a date is valid. Year must be two digit or four digit and between 1900 and 2029. @param day the day of the date @param month the moth of the date @param year the year of the date @return a valid date split ...
java
private static ValidDateSplit isDateValid(String day, String month, String year) { try { int dayInt = Integer.parseInt(day); int monthInt = Integer.parseInt(month); int yearInt = Integer.parseInt(year); if ( dayInt <= 0 || dayInt > ...
[ "private", "static", "ValidDateSplit", "isDateValid", "(", "String", "day", ",", "String", "month", ",", "String", "year", ")", "{", "try", "{", "int", "dayInt", "=", "Integer", ".", "parseInt", "(", "day", ")", ";", "int", "monthInt", "=", "Integer", "....
Verify that a date is valid. Year must be two digit or four digit and between 1900 and 2029. @param day the day of the date @param month the moth of the date @param year the year of the date @return a valid date split object containing the date information if the date is valid and {@code null} if the date is not va...
[ "Verify", "that", "a", "date", "is", "valid", ".", "Year", "must", "be", "two", "digit", "or", "four", "digit", "and", "between", "1900", "and", "2029", "." ]
train
https://github.com/GoSimpleLLC/nbvcxz/blob/a86fb24680e646efdf78d6fda9d68a5410145f56/src/main/java/me/gosimple/nbvcxz/matching/DateMatcher.java#L206-L227
PuyallupFoursquare/ccb-api-client-java
src/main/java/com/p4square/ccbapi/CCBAPIClient.java
CCBAPIClient.makeURI
private URI makeURI(final String service, final Map<String, String> parameters) { """ Build the URI for a particular service call. @param service The CCB API service to call (i.e. the srv query parameter). @param parameters A map of query parameters to include on the URI. @return The apiBaseUri with the addit...
java
private URI makeURI(final String service, final Map<String, String> parameters) { try { StringBuilder queryStringBuilder = new StringBuilder(); if (apiBaseUri.getQuery() != null) { queryStringBuilder.append(apiBaseUri.getQuery()).append("&"); } que...
[ "private", "URI", "makeURI", "(", "final", "String", "service", ",", "final", "Map", "<", "String", ",", "String", ">", "parameters", ")", "{", "try", "{", "StringBuilder", "queryStringBuilder", "=", "new", "StringBuilder", "(", ")", ";", "if", "(", "apiBa...
Build the URI for a particular service call. @param service The CCB API service to call (i.e. the srv query parameter). @param parameters A map of query parameters to include on the URI. @return The apiBaseUri with the additional query parameters appended.
[ "Build", "the", "URI", "for", "a", "particular", "service", "call", "." ]
train
https://github.com/PuyallupFoursquare/ccb-api-client-java/blob/54a7a3184dc565fe513aa520e1344b2303ea6834/src/main/java/com/p4square/ccbapi/CCBAPIClient.java#L217-L233
Azure/azure-sdk-for-java
compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachinesInner.java
VirtualMachinesInner.runCommandAsync
public Observable<RunCommandResultInner> runCommandAsync(String resourceGroupName, String vmName, RunCommandInput parameters) { """ Run command on the VM. @param resourceGroupName The name of the resource group. @param vmName The name of the virtual machine. @param parameters Parameters supplied to the Run co...
java
public Observable<RunCommandResultInner> runCommandAsync(String resourceGroupName, String vmName, RunCommandInput parameters) { return runCommandWithServiceResponseAsync(resourceGroupName, vmName, parameters).map(new Func1<ServiceResponse<RunCommandResultInner>, RunCommandResultInner>() { @Override ...
[ "public", "Observable", "<", "RunCommandResultInner", ">", "runCommandAsync", "(", "String", "resourceGroupName", ",", "String", "vmName", ",", "RunCommandInput", "parameters", ")", "{", "return", "runCommandWithServiceResponseAsync", "(", "resourceGroupName", ",", "vmNam...
Run command on the VM. @param resourceGroupName The name of the resource group. @param vmName The name of the virtual machine. @param parameters Parameters supplied to the Run command operation. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable for the request
[ "Run", "command", "on", "the", "VM", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachinesInner.java#L2653-L2660
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/fixed/CommonOps_DDF6.java
CommonOps_DDF6.multAddOuter
public static void multAddOuter( double alpha , DMatrix6x6 A , double beta , DMatrix6 u , DMatrix6 v , DMatrix6x6 C ) { """ C = &alpha;A + &beta;u*v<sup>T</sup> @param alpha scale factor applied to A @param A matrix @param beta scale factor applies to outer product @param u vector @param v vector @param C ...
java
public static void multAddOuter( double alpha , DMatrix6x6 A , double beta , DMatrix6 u , DMatrix6 v , DMatrix6x6 C ) { C.a11 = alpha*A.a11 + beta*u.a1*v.a1; C.a12 = alpha*A.a12 + beta*u.a1*v.a2; C.a13 = alpha*A.a13 + beta*u.a1*v.a3; C.a14 = alpha*A.a14 + beta*u.a1*v.a4; C.a15 = ...
[ "public", "static", "void", "multAddOuter", "(", "double", "alpha", ",", "DMatrix6x6", "A", ",", "double", "beta", ",", "DMatrix6", "u", ",", "DMatrix6", "v", ",", "DMatrix6x6", "C", ")", "{", "C", ".", "a11", "=", "alpha", "*", "A", ".", "a11", "+",...
C = &alpha;A + &beta;u*v<sup>T</sup> @param alpha scale factor applied to A @param A matrix @param beta scale factor applies to outer product @param u vector @param v vector @param C Storage for solution. Can be same instance as A.
[ "C", "=", "&alpha", ";", "A", "+", "&beta", ";", "u", "*", "v<sup", ">", "T<", "/", "sup", ">" ]
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/fixed/CommonOps_DDF6.java#L1239-L1276
apache/spark
launcher/src/main/java/org/apache/spark/launcher/AbstractCommandBuilder.java
AbstractCommandBuilder.buildJavaCommand
List<String> buildJavaCommand(String extraClassPath) throws IOException { """ Builds a list of arguments to run java. This method finds the java executable to use and appends JVM-specific options for running a class with Spark in the classpath. It also loads options from the "java-opts" file in the configurat...
java
List<String> buildJavaCommand(String extraClassPath) throws IOException { List<String> cmd = new ArrayList<>(); String[] candidateJavaHomes = new String[] { javaHome, childEnv.get("JAVA_HOME"), System.getenv("JAVA_HOME"), System.getProperty("java.home") }; for (String javaHome :...
[ "List", "<", "String", ">", "buildJavaCommand", "(", "String", "extraClassPath", ")", "throws", "IOException", "{", "List", "<", "String", ">", "cmd", "=", "new", "ArrayList", "<>", "(", ")", ";", "String", "[", "]", "candidateJavaHomes", "=", "new", "Stri...
Builds a list of arguments to run java. This method finds the java executable to use and appends JVM-specific options for running a class with Spark in the classpath. It also loads options from the "java-opts" file in the configuration directory being used. Callers should still add at least the class to run, as well ...
[ "Builds", "a", "list", "of", "arguments", "to", "run", "java", "." ]
train
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/launcher/src/main/java/org/apache/spark/launcher/AbstractCommandBuilder.java#L92-L123
jboss/jboss-jsf-api_spec
src/main/java/javax/faces/component/UIViewRoot.java
UIViewRoot.removeComponentResource
public void removeComponentResource(FacesContext context, UIComponent componentResource, String target) { """ <p class="changed_added_2_0">Remove argument <code>component</code>, which is assumed to represent a resource instance, as a resource to this view. A resource instance is rendered by a resource <code>R...
java
public void removeComponentResource(FacesContext context, UIComponent componentResource, String target) { final Map<String,Object> attributes = componentResource.getAttributes(); // look for a target in the component attribute set if arg is not set. if (target == null) { target = (S...
[ "public", "void", "removeComponentResource", "(", "FacesContext", "context", ",", "UIComponent", "componentResource", ",", "String", "target", ")", "{", "final", "Map", "<", "String", ",", "Object", ">", "attributes", "=", "componentResource", ".", "getAttributes", ...
<p class="changed_added_2_0">Remove argument <code>component</code>, which is assumed to represent a resource instance, as a resource to this view. A resource instance is rendered by a resource <code>Renderer</code>, as described in the Standard HTML RenderKit. </p> <div class="changed_added_2_0"> <p> The <code>compo...
[ "<p", "class", "=", "changed_added_2_0", ">", "Remove", "argument", "<code", ">", "component<", "/", "code", ">", "which", "is", "assumed", "to", "represent", "a", "resource", "instance", "as", "a", "resource", "to", "this", "view", ".", "A", "resource", "...
train
https://github.com/jboss/jboss-jsf-api_spec/blob/cb33d215acbab847f2db5cdf2c6fe4d99c0a01c3/src/main/java/javax/faces/component/UIViewRoot.java#L647-L664
rjeschke/txtmark
src/main/java/com/github/rjeschke/txtmark/Emitter.java
Emitter.emitLines
private void emitLines(final StringBuilder out, final Block block) { """ Transforms lines into HTML. @param out The StringBuilder to write to. @param block The Block to process. """ switch (block.type) { case CODE: this.emitCodeLines(out, block.lines, block.meta, true)...
java
private void emitLines(final StringBuilder out, final Block block) { switch (block.type) { case CODE: this.emitCodeLines(out, block.lines, block.meta, true); break; case FENCED_CODE: this.emitCodeLines(out, block.lines, block.meta, false); ...
[ "private", "void", "emitLines", "(", "final", "StringBuilder", "out", ",", "final", "Block", "block", ")", "{", "switch", "(", "block", ".", "type", ")", "{", "case", "CODE", ":", "this", ".", "emitCodeLines", "(", "out", ",", "block", ".", "lines", ",...
Transforms lines into HTML. @param out The StringBuilder to write to. @param block The Block to process.
[ "Transforms", "lines", "into", "HTML", "." ]
train
https://github.com/rjeschke/txtmark/blob/108cee6b209a362843729c032c2d982625d12d98/src/main/java/com/github/rjeschke/txtmark/Emitter.java#L172-L189
mapsforge/mapsforge
mapsforge-core/src/main/java/org/mapsforge/core/model/BoundingBox.java
BoundingBox.extendCoordinates
public BoundingBox extendCoordinates(double latitude, double longitude) { """ Creates a BoundingBox extended up to coordinates (but does not cross date line/poles). @param latitude up to the extension @param longitude up to the extension @return an extended BoundingBox or this (if contains coordinates) "...
java
public BoundingBox extendCoordinates(double latitude, double longitude) { if (contains(latitude, longitude)) { return this; } double minLat = Math.max(MercatorProjection.LATITUDE_MIN, Math.min(this.minLatitude, latitude)); double minLon = Math.max(-180, Math.min(this.minLong...
[ "public", "BoundingBox", "extendCoordinates", "(", "double", "latitude", ",", "double", "longitude", ")", "{", "if", "(", "contains", "(", "latitude", ",", "longitude", ")", ")", "{", "return", "this", ";", "}", "double", "minLat", "=", "Math", ".", "max",...
Creates a BoundingBox extended up to coordinates (but does not cross date line/poles). @param latitude up to the extension @param longitude up to the extension @return an extended BoundingBox or this (if contains coordinates)
[ "Creates", "a", "BoundingBox", "extended", "up", "to", "coordinates", "(", "but", "does", "not", "cross", "date", "line", "/", "poles", ")", "." ]
train
https://github.com/mapsforge/mapsforge/blob/c49c83f7f727552f793dff15cefa532ade030842/mapsforge-core/src/main/java/org/mapsforge/core/model/BoundingBox.java#L169-L180
livetribe/livetribe-slp
osgi/bundle/src/main/java/org/livetribe/slp/osgi/ServiceAgentManagedServiceFactory.java
ServiceAgentManagedServiceFactory.updated
public void updated(String pid, Dictionary dictionary) throws ConfigurationException { """ Update the SLP service agent's configuration, unregistering from the OSGi service registry and stopping it if it had already started. The new SLP service agent will be started with the new configuration and registered in...
java
public void updated(String pid, Dictionary dictionary) throws ConfigurationException { LOGGER.entering(CLASS_NAME, "updated", new Object[]{pid, dictionary}); /** * This could be an update to an existing SLP service agent. Delete * it first then we'll recreate it. */ ...
[ "public", "void", "updated", "(", "String", "pid", ",", "Dictionary", "dictionary", ")", "throws", "ConfigurationException", "{", "LOGGER", ".", "entering", "(", "CLASS_NAME", ",", "\"updated\"", ",", "new", "Object", "[", "]", "{", "pid", ",", "dictionary", ...
Update the SLP service agent's configuration, unregistering from the OSGi service registry and stopping it if it had already started. The new SLP service agent will be started with the new configuration and registered in the OSGi service registry using the configuration parameters as service properties. @param pid ...
[ "Update", "the", "SLP", "service", "agent", "s", "configuration", "unregistering", "from", "the", "OSGi", "service", "registry", "and", "stopping", "it", "if", "it", "had", "already", "started", ".", "The", "new", "SLP", "service", "agent", "will", "be", "st...
train
https://github.com/livetribe/livetribe-slp/blob/6cc13dbe81feab133fe3dd291ca081cbc6e1f591/osgi/bundle/src/main/java/org/livetribe/slp/osgi/ServiceAgentManagedServiceFactory.java#L95-L117
agmip/translator-dssat
src/main/java/org/agmip/translators/dssat/DssatRunFileOutput.java
DssatRunFileOutput.writeFile
@Override public void writeFile(String arg0, Map result) { """ DSSAT Run File Output method @param arg0 file output path @param result data holder object """ // Initial variables BufferedWriter bwR; // output object try { // Get version num...
java
@Override public void writeFile(String arg0, Map result) { // Initial variables BufferedWriter bwR; // output object try { // Get version number if (dssatVerStr == null) { dssatVerStr = getObjectOr(result, "crop_model_version...
[ "@", "Override", "public", "void", "writeFile", "(", "String", "arg0", ",", "Map", "result", ")", "{", "// Initial variables", "BufferedWriter", "bwR", ";", "// output object", "try", "{", "// Get version number", "if", "(", "dssatVerStr", "==", "null", ")", "{"...
DSSAT Run File Output method @param arg0 file output path @param result data holder object
[ "DSSAT", "Run", "File", "Output", "method" ]
train
https://github.com/agmip/translator-dssat/blob/4be61d998f106eb7234ea8701b63c3746ae688f4/src/main/java/org/agmip/translators/dssat/DssatRunFileOutput.java#L50-L82
cdk/cdk
base/standard/src/main/java/org/openscience/cdk/tools/manipulator/ChemModelManipulator.java
ChemModelManipulator.getRelevantAtomContainer
public static IAtomContainer getRelevantAtomContainer(IChemModel chemModel, IBond bond) { """ Retrieves the first IAtomContainer containing a given IBond from an IChemModel. @param chemModel The IChemModel object. @param bond The IBond object to search. @return The IAtomContainer object foun...
java
public static IAtomContainer getRelevantAtomContainer(IChemModel chemModel, IBond bond) { IAtomContainer result = null; if (chemModel.getMoleculeSet() != null) { IAtomContainerSet moleculeSet = chemModel.getMoleculeSet(); result = MoleculeSetManipulator.getRelevantAtomContainer(m...
[ "public", "static", "IAtomContainer", "getRelevantAtomContainer", "(", "IChemModel", "chemModel", ",", "IBond", "bond", ")", "{", "IAtomContainer", "result", "=", "null", ";", "if", "(", "chemModel", ".", "getMoleculeSet", "(", ")", "!=", "null", ")", "{", "IA...
Retrieves the first IAtomContainer containing a given IBond from an IChemModel. @param chemModel The IChemModel object. @param bond The IBond object to search. @return The IAtomContainer object found, null if none is found.
[ "Retrieves", "the", "first", "IAtomContainer", "containing", "a", "given", "IBond", "from", "an", "IChemModel", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/tools/manipulator/ChemModelManipulator.java#L230-L245
mozilla/rhino
src/org/mozilla/javascript/ScriptableObject.java
ScriptableObject.putConst
@Override public void putConst(String name, Scriptable start, Object value) { """ Sets the value of the named const property, creating it if need be. If the property was created using defineProperty, the appropriate setter method is called. <p> If the property's attributes include READONLY, no action is...
java
@Override public void putConst(String name, Scriptable start, Object value) { if (putConstImpl(name, 0, start, value, READONLY)) return; if (start == this) throw Kit.codeBug(); if (start instanceof ConstProperties) ((ConstProperties)start).putConst(name, start, v...
[ "@", "Override", "public", "void", "putConst", "(", "String", "name", ",", "Scriptable", "start", ",", "Object", "value", ")", "{", "if", "(", "putConstImpl", "(", "name", ",", "0", ",", "start", ",", "value", ",", "READONLY", ")", ")", "return", ";", ...
Sets the value of the named const property, creating it if need be. If the property was created using defineProperty, the appropriate setter method is called. <p> If the property's attributes include READONLY, no action is taken. This method will actually set the property in the start object. @param name the name of...
[ "Sets", "the", "value", "of", "the", "named", "const", "property", "creating", "it", "if", "need", "be", "." ]
train
https://github.com/mozilla/rhino/blob/fa8a86df11d37623f5faa8d445a5876612bc47b0/src/org/mozilla/javascript/ScriptableObject.java#L626-L637
googleads/googleads-java-lib
modules/dfp_axis/src/main/java/com/google/api/ads/admanager/axis/utils/v201902/DateTimes.java
DateTimes.toStringForTimeZone
public static String toStringForTimeZone(DateTime dateTime, String newZoneId) { """ Returns string representation of this date time with a different time zone, preserving the millisecond instant. <p>This method is useful for finding the local time in another time zone, especially for filtering. <p>For exam...
java
public static String toStringForTimeZone(DateTime dateTime, String newZoneId) { return dateTimesHelper.toStringForTimeZone(dateTime, newZoneId); }
[ "public", "static", "String", "toStringForTimeZone", "(", "DateTime", "dateTime", ",", "String", "newZoneId", ")", "{", "return", "dateTimesHelper", ".", "toStringForTimeZone", "(", "dateTime", ",", "newZoneId", ")", ";", "}" ]
Returns string representation of this date time with a different time zone, preserving the millisecond instant. <p>This method is useful for finding the local time in another time zone, especially for filtering. <p>For example, if this date time holds 12:30 in Europe/London, the result from this method with Europe/Pa...
[ "Returns", "string", "representation", "of", "this", "date", "time", "with", "a", "different", "time", "zone", "preserving", "the", "millisecond", "instant", "." ]
train
https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/modules/dfp_axis/src/main/java/com/google/api/ads/admanager/axis/utils/v201902/DateTimes.java#L141-L143
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Vector.java
Vector.set
public synchronized E set(int index, E element) { """ Replaces the element at the specified position in this Vector with the specified element. @param index index of the element to replace @param element element to be stored at the specified position @return the element previously at the specified position ...
java
public synchronized E set(int index, E element) { if (index >= elementCount) throw new ArrayIndexOutOfBoundsException(index); E oldValue = elementData(index); elementData[index] = element; return oldValue; }
[ "public", "synchronized", "E", "set", "(", "int", "index", ",", "E", "element", ")", "{", "if", "(", "index", ">=", "elementCount", ")", "throw", "new", "ArrayIndexOutOfBoundsException", "(", "index", ")", ";", "E", "oldValue", "=", "elementData", "(", "in...
Replaces the element at the specified position in this Vector with the specified element. @param index index of the element to replace @param element element to be stored at the specified position @return the element previously at the specified position @throws ArrayIndexOutOfBoundsException if the index is out of ran...
[ "Replaces", "the", "element", "at", "the", "specified", "position", "in", "this", "Vector", "with", "the", "specified", "element", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Vector.java#L764-L771
Javacord/Javacord
javacord-core/src/main/java/org/javacord/core/util/FileContainer.java
FileContainer.setFileTypeOrName
public void setFileTypeOrName(String type) { """ Sets the type ("png", "txt", ...) or name ("image.png", "readme.txt", ...) of the file. @param type The type or name of the file. """ fileTypeOrName = type; if ((fileAsBufferedImage != null) && !ImageIO.getImageWritersByFormatName(getFileType(...
java
public void setFileTypeOrName(String type) { fileTypeOrName = type; if ((fileAsBufferedImage != null) && !ImageIO.getImageWritersByFormatName(getFileType()).hasNext()) { throw new IllegalArgumentException(String.format("No image writer found for format \"%s\"", getFileType())); } ...
[ "public", "void", "setFileTypeOrName", "(", "String", "type", ")", "{", "fileTypeOrName", "=", "type", ";", "if", "(", "(", "fileAsBufferedImage", "!=", "null", ")", "&&", "!", "ImageIO", ".", "getImageWritersByFormatName", "(", "getFileType", "(", ")", ")", ...
Sets the type ("png", "txt", ...) or name ("image.png", "readme.txt", ...) of the file. @param type The type or name of the file.
[ "Sets", "the", "type", "(", "png", "txt", "...", ")", "or", "name", "(", "image", ".", "png", "readme", ".", "txt", "...", ")", "of", "the", "file", "." ]
train
https://github.com/Javacord/Javacord/blob/915aad084dc5e863284267529d0dccd625fc6886/javacord-core/src/main/java/org/javacord/core/util/FileContainer.java#L197-L202
upwork/java-upwork
src/com/Upwork/api/UpworkRestClient.java
UpworkRestClient.getJSONObject
public static JSONObject getJSONObject(HttpGet request, Integer method) throws JSONException { """ Get JSON response for GET @param request Request object for GET @param method HTTP Method @throws JSONException @return {@link JSONObject} """ return UpworkRestClient.getJSONObject(request, me...
java
public static JSONObject getJSONObject(HttpGet request, Integer method) throws JSONException { return UpworkRestClient.getJSONObject(request, method, new HashMap<String, String>()); }
[ "public", "static", "JSONObject", "getJSONObject", "(", "HttpGet", "request", ",", "Integer", "method", ")", "throws", "JSONException", "{", "return", "UpworkRestClient", ".", "getJSONObject", "(", "request", ",", "method", ",", "new", "HashMap", "<", "String", ...
Get JSON response for GET @param request Request object for GET @param method HTTP Method @throws JSONException @return {@link JSONObject}
[ "Get", "JSON", "response", "for", "GET" ]
train
https://github.com/upwork/java-upwork/blob/342297161503a74e9e0bddbd381ab5eebf4dc454/src/com/Upwork/api/UpworkRestClient.java#L74-L76
igniterealtime/Smack
smack-extensions/src/main/java/org/jivesoftware/smackx/disco/ServiceDiscoveryManager.java
ServiceDiscoveryManager.supportsFeature
public boolean supportsFeature(Jid jid, CharSequence feature) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { """ Queries the remote entity for it's features and returns true if the given feature is found. @param jid the JID of the remote entity @param feature @re...
java
public boolean supportsFeature(Jid jid, CharSequence feature) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return supportsFeatures(jid, feature); }
[ "public", "boolean", "supportsFeature", "(", "Jid", "jid", ",", "CharSequence", "feature", ")", "throws", "NoResponseException", ",", "XMPPErrorException", ",", "NotConnectedException", ",", "InterruptedException", "{", "return", "supportsFeatures", "(", "jid", ",", "...
Queries the remote entity for it's features and returns true if the given feature is found. @param jid the JID of the remote entity @param feature @return true if the entity supports the feature, false otherwise @throws XMPPErrorException @throws NoResponseException @throws NotConnectedException @throws InterruptedExc...
[ "Queries", "the", "remote", "entity", "for", "it", "s", "features", "and", "returns", "true", "if", "the", "given", "feature", "is", "found", "." ]
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/disco/ServiceDiscoveryManager.java#L647-L649
liferay/com-liferay-commerce
commerce-wish-list-service/src/main/java/com/liferay/commerce/wish/list/service/persistence/impl/CommerceWishListPersistenceImpl.java
CommerceWishListPersistenceImpl.removeByUUID_G
@Override public CommerceWishList removeByUUID_G(String uuid, long groupId) throws NoSuchWishListException { """ Removes the commerce wish list where uuid = &#63; and groupId = &#63; from the database. @param uuid the uuid @param groupId the group ID @return the commerce wish list that was removed """ ...
java
@Override public CommerceWishList removeByUUID_G(String uuid, long groupId) throws NoSuchWishListException { CommerceWishList commerceWishList = findByUUID_G(uuid, groupId); return remove(commerceWishList); }
[ "@", "Override", "public", "CommerceWishList", "removeByUUID_G", "(", "String", "uuid", ",", "long", "groupId", ")", "throws", "NoSuchWishListException", "{", "CommerceWishList", "commerceWishList", "=", "findByUUID_G", "(", "uuid", ",", "groupId", ")", ";", "return...
Removes the commerce wish list where uuid = &#63; and groupId = &#63; from the database. @param uuid the uuid @param groupId the group ID @return the commerce wish list that was removed
[ "Removes", "the", "commerce", "wish", "list", "where", "uuid", "=", "&#63", ";", "and", "groupId", "=", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-wish-list-service/src/main/java/com/liferay/commerce/wish/list/service/persistence/impl/CommerceWishListPersistenceImpl.java#L814-L820
lawloretienne/ImageGallery
library/src/main/java/com/etiennelawlor/imagegallery/library/ui/TouchImageView.java
TouchImageView.setViewSize
private int setViewSize(int mode, int size, int drawableWidth) { """ Set view dimensions based on layout params @param mode @param size @param drawableWidth @return """ int viewSize; switch (mode) { case MeasureSpec.EXACTLY: viewSize = size; bre...
java
private int setViewSize(int mode, int size, int drawableWidth) { int viewSize; switch (mode) { case MeasureSpec.EXACTLY: viewSize = size; break; case MeasureSpec.AT_MOST: viewSize = Math.min(drawableWidth, size); br...
[ "private", "int", "setViewSize", "(", "int", "mode", ",", "int", "size", ",", "int", "drawableWidth", ")", "{", "int", "viewSize", ";", "switch", "(", "mode", ")", "{", "case", "MeasureSpec", ".", "EXACTLY", ":", "viewSize", "=", "size", ";", "break", ...
Set view dimensions based on layout params @param mode @param size @param drawableWidth @return
[ "Set", "view", "dimensions", "based", "on", "layout", "params" ]
train
https://github.com/lawloretienne/ImageGallery/blob/960d68dfb2b81d05322a576723ac4f090e10eda7/library/src/main/java/com/etiennelawlor/imagegallery/library/ui/TouchImageView.java#L676-L696
gallandarakhneorg/afc
advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/maplayer/MultiMapLayer.java
MultiMapLayer.fireLayerMovedUpEvent
protected void fireLayerMovedUpEvent(MapLayer layer, int newIndex) { """ Fire the event that indicates a layer was moved up. @param layer is the moved layer. @param newIndex is the new index of the layer. """ fireLayerHierarchyChangedEvent(new MapLayerHierarchyEvent(this, layer, Type.MOVE_CHILD_UP, n...
java
protected void fireLayerMovedUpEvent(MapLayer layer, int newIndex) { fireLayerHierarchyChangedEvent(new MapLayerHierarchyEvent(this, layer, Type.MOVE_CHILD_UP, newIndex, layer.isTemporaryLayer())); }
[ "protected", "void", "fireLayerMovedUpEvent", "(", "MapLayer", "layer", ",", "int", "newIndex", ")", "{", "fireLayerHierarchyChangedEvent", "(", "new", "MapLayerHierarchyEvent", "(", "this", ",", "layer", ",", "Type", ".", "MOVE_CHILD_UP", ",", "newIndex", ",", "l...
Fire the event that indicates a layer was moved up. @param layer is the moved layer. @param newIndex is the new index of the layer.
[ "Fire", "the", "event", "that", "indicates", "a", "layer", "was", "moved", "up", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/maplayer/MultiMapLayer.java#L462-L465
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/core/proxy/AbstractProxyFactory.java
AbstractProxyFactory.createIndirectionHandler
public IndirectionHandler createIndirectionHandler(PBKey brokerKey, Identity id) { """ Creates a new indirection handler instance. @param brokerKey The associated {@link PBKey}. @param id The subject's ids @return The new instance """ Object args[] = {brokerKey, id}; try { ...
java
public IndirectionHandler createIndirectionHandler(PBKey brokerKey, Identity id) { Object args[] = {brokerKey, id}; try { return (IndirectionHandler) getIndirectionHandlerConstructor().newInstance(args); } catch(InvocationTargetException ex) { ...
[ "public", "IndirectionHandler", "createIndirectionHandler", "(", "PBKey", "brokerKey", ",", "Identity", "id", ")", "{", "Object", "args", "[", "]", "=", "{", "brokerKey", ",", "id", "}", ";", "try", "{", "return", "(", "IndirectionHandler", ")", "getIndirectio...
Creates a new indirection handler instance. @param brokerKey The associated {@link PBKey}. @param id The subject's ids @return The new instance
[ "Creates", "a", "new", "indirection", "handler", "instance", "." ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/core/proxy/AbstractProxyFactory.java#L149-L169
jparsec/jparsec
jparsec/src/main/java/org/jparsec/OperatorTable.java
OperatorTable.infixl
public OperatorTable<T> infixl( Parser<? extends BiFunction<? super T, ? super T, ? extends T>> parser, int precedence) { """ Adds an infix left-associative binary operator. @param parser the parser for the operator. @param precedence the precedence number. @return this. """ ops.add(new Operator...
java
public OperatorTable<T> infixl( Parser<? extends BiFunction<? super T, ? super T, ? extends T>> parser, int precedence) { ops.add(new Operator(parser, precedence, Associativity.LASSOC)); return this; }
[ "public", "OperatorTable", "<", "T", ">", "infixl", "(", "Parser", "<", "?", "extends", "BiFunction", "<", "?", "super", "T", ",", "?", "super", "T", ",", "?", "extends", "T", ">", ">", "parser", ",", "int", "precedence", ")", "{", "ops", ".", "add...
Adds an infix left-associative binary operator. @param parser the parser for the operator. @param precedence the precedence number. @return this.
[ "Adds", "an", "infix", "left", "-", "associative", "binary", "operator", "." ]
train
https://github.com/jparsec/jparsec/blob/df1280259f5da9eb5ffc537437569dddba66cb94/jparsec/src/main/java/org/jparsec/OperatorTable.java#L115-L119
alkacon/opencms-core
src/org/opencms/util/CmsFileUtil.java
CmsFileUtil.getEncoding
public static String getEncoding(CmsObject cms, CmsResource file) { """ Returns the encoding of the file. Encoding is read from the content-encoding property and defaults to the systems default encoding. Since properties can change without rewriting content, the actual encoding can differ. @param cms {@link C...
java
public static String getEncoding(CmsObject cms, CmsResource file) { CmsProperty encodingProperty = CmsProperty.getNullProperty(); try { encodingProperty = cms.readPropertyObject(file, CmsPropertyDefinition.PROPERTY_CONTENT_ENCODING, true); } catch (CmsException e) { LOG....
[ "public", "static", "String", "getEncoding", "(", "CmsObject", "cms", ",", "CmsResource", "file", ")", "{", "CmsProperty", "encodingProperty", "=", "CmsProperty", ".", "getNullProperty", "(", ")", ";", "try", "{", "encodingProperty", "=", "cms", ".", "readProper...
Returns the encoding of the file. Encoding is read from the content-encoding property and defaults to the systems default encoding. Since properties can change without rewriting content, the actual encoding can differ. @param cms {@link CmsObject} used to read properties of the given file. @param file the file for whi...
[ "Returns", "the", "encoding", "of", "the", "file", ".", "Encoding", "is", "read", "from", "the", "content", "-", "encoding", "property", "and", "defaults", "to", "the", "systems", "default", "encoding", ".", "Since", "properties", "can", "change", "without", ...
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/util/CmsFileUtil.java#L293-L302
lestard/assertj-javafx
src/main/java/eu/lestard/assertj/javafx/api/DoublePropertyAssert.java
DoublePropertyAssert.hasValue
public DoublePropertyAssert hasValue(Double expectedValue, Offset offset) { """ Verifies that the actual observable number has a value that is close to the given one by less then the given offset. @param expectedValue the given value to compare the actual observables value to. @param offset the given positive ...
java
public DoublePropertyAssert hasValue(Double expectedValue, Offset offset){ new ObservableNumberValueAssertions(actual).hasValue(expectedValue, offset); return this; }
[ "public", "DoublePropertyAssert", "hasValue", "(", "Double", "expectedValue", ",", "Offset", "offset", ")", "{", "new", "ObservableNumberValueAssertions", "(", "actual", ")", ".", "hasValue", "(", "expectedValue", ",", "offset", ")", ";", "return", "this", ";", ...
Verifies that the actual observable number has a value that is close to the given one by less then the given offset. @param expectedValue the given value to compare the actual observables value to. @param offset the given positive offset. @return {@code this} assertion object. @throws java.lang.NullPointerException ...
[ "Verifies", "that", "the", "actual", "observable", "number", "has", "a", "value", "that", "is", "close", "to", "the", "given", "one", "by", "less", "then", "the", "given", "offset", "." ]
train
https://github.com/lestard/assertj-javafx/blob/f6b4d22e542a5501c7c1c2fae8700b0f69b956c1/src/main/java/eu/lestard/assertj/javafx/api/DoublePropertyAssert.java#L47-L51
alkacon/opencms-core
src/org/opencms/importexport/CmsExport.java
CmsExport.digestElement
protected void digestElement(Element parent, Element output) throws SAXException { """ Writes the output element to the XML output writer and detaches it from it's parent element.<p> @param parent the parent element @param output the output element @throws SAXException if something goes wrong processing th...
java
protected void digestElement(Element parent, Element output) throws SAXException { m_saxWriter.write(output); parent.remove(output); }
[ "protected", "void", "digestElement", "(", "Element", "parent", ",", "Element", "output", ")", "throws", "SAXException", "{", "m_saxWriter", ".", "write", "(", "output", ")", ";", "parent", ".", "remove", "(", "output", ")", ";", "}" ]
Writes the output element to the XML output writer and detaches it from it's parent element.<p> @param parent the parent element @param output the output element @throws SAXException if something goes wrong processing the manifest.xml
[ "Writes", "the", "output", "element", "to", "the", "XML", "output", "writer", "and", "detaches", "it", "from", "it", "s", "parent", "element", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/importexport/CmsExport.java#L775-L779
Impetus/Kundera
src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/query/CassQuery.java
CassQuery.onQueryOverCQL3
public String onQueryOverCQL3(EntityMetadata m, Client client, MetamodelImpl metaModel, List<String> relations) { """ On query over composite columns. @param m the m @param client the client @param metaModel the meta model @param relations the relations @return the list """ // select column ...
java
public String onQueryOverCQL3(EntityMetadata m, Client client, MetamodelImpl metaModel, List<String> relations) { // select column will always be of entity field only! // where clause ordering Class compoundKeyClass = m.getIdAttribute().getBindableJavaType(); EmbeddableType compoundKey ...
[ "public", "String", "onQueryOverCQL3", "(", "EntityMetadata", "m", ",", "Client", "client", ",", "MetamodelImpl", "metaModel", ",", "List", "<", "String", ">", "relations", ")", "{", "// select column will always be of entity field only!", "// where clause ordering", "Cla...
On query over composite columns. @param m the m @param client the client @param metaModel the meta model @param relations the relations @return the list
[ "On", "query", "over", "composite", "columns", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/query/CassQuery.java#L613-L644
jparsec/jparsec
jparsec/src/main/java/org/jparsec/pattern/Patterns.java
Patterns.atLeast
public static Pattern atLeast(final int min, final CharPredicate predicate) { """ Returns a {@link Pattern} object that matches if the input starts with {@code min} or more characters and all satisfy {@code predicate}. @since 2.2 """ Checks.checkMin(min); return new Pattern() { @Override public...
java
public static Pattern atLeast(final int min, final CharPredicate predicate) { Checks.checkMin(min); return new Pattern() { @Override public int match(CharSequence src, int begin, int end) { int minLen = RepeatCharPredicatePattern.matchRepeat(min, predicate, src, end, begin, 0); if (minLen ...
[ "public", "static", "Pattern", "atLeast", "(", "final", "int", "min", ",", "final", "CharPredicate", "predicate", ")", "{", "Checks", ".", "checkMin", "(", "min", ")", ";", "return", "new", "Pattern", "(", ")", "{", "@", "Override", "public", "int", "mat...
Returns a {@link Pattern} object that matches if the input starts with {@code min} or more characters and all satisfy {@code predicate}. @since 2.2
[ "Returns", "a", "{" ]
train
https://github.com/jparsec/jparsec/blob/df1280259f5da9eb5ffc537437569dddba66cb94/jparsec/src/main/java/org/jparsec/pattern/Patterns.java#L369-L381
OWASP/java-html-sanitizer
src/main/java/org/owasp/html/HtmlPolicyBuilder.java
HtmlPolicyBuilder.requireRelsOnLinks
public HtmlPolicyBuilder requireRelsOnLinks(String... linkValues) { """ Adds <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types" >{@code rel="..."}</a> to {@code <a href="...">} tags beyond those in {@link #DEFAULT_RELS_ON_TARGETTED_LINKS}. <p> @see #skipRelsOnLinks """ this.invalid...
java
public HtmlPolicyBuilder requireRelsOnLinks(String... linkValues) { this.invalidateCompiledState(); if (this.extraRelsForLinks == null) { this.extraRelsForLinks = Sets.newLinkedHashSet(); } for (String linkValue : linkValues) { linkValue = HtmlLexer.canonicalName(linkValue); Preconditi...
[ "public", "HtmlPolicyBuilder", "requireRelsOnLinks", "(", "String", "...", "linkValues", ")", "{", "this", ".", "invalidateCompiledState", "(", ")", ";", "if", "(", "this", ".", "extraRelsForLinks", "==", "null", ")", "{", "this", ".", "extraRelsForLinks", "=", ...
Adds <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types" >{@code rel="..."}</a> to {@code <a href="...">} tags beyond those in {@link #DEFAULT_RELS_ON_TARGETTED_LINKS}. <p> @see #skipRelsOnLinks
[ "Adds", "<a", "href", "=", "https", ":", "//", "developer", ".", "mozilla", ".", "org", "/", "en", "-", "US", "/", "docs", "/", "Web", "/", "HTML", "/", "Link_types", ">", "{" ]
train
https://github.com/OWASP/java-html-sanitizer/blob/a30315fe9a41e19c449628e7ef3488b3a7856009/src/main/java/org/owasp/html/HtmlPolicyBuilder.java#L421-L437
sarl/sarl
docs/io.sarl.docs.doclet/src/main/java/io/sarl/docs/doclet/references/SarlLinkFactory.java
SarlLinkFactory.getLinkForAnnotationType
protected void getLinkForAnnotationType(Content link, LinkInfo linkInfo, Type type) { """ Build the link for the annotation type. @param link the link. @param linkInfo the information on the link. @param type the type. """ link.addContent(getTypeAnnotationLinks(linkInfo)); linkInfo.type = type.asAnnot...
java
protected void getLinkForAnnotationType(Content link, LinkInfo linkInfo, Type type) { link.addContent(getTypeAnnotationLinks(linkInfo)); linkInfo.type = type.asAnnotatedType().underlyingType(); link.addContent(getLink(linkInfo)); }
[ "protected", "void", "getLinkForAnnotationType", "(", "Content", "link", ",", "LinkInfo", "linkInfo", ",", "Type", "type", ")", "{", "link", ".", "addContent", "(", "getTypeAnnotationLinks", "(", "linkInfo", ")", ")", ";", "linkInfo", ".", "type", "=", "type",...
Build the link for the annotation type. @param link the link. @param linkInfo the information on the link. @param type the type.
[ "Build", "the", "link", "for", "the", "annotation", "type", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/docs/io.sarl.docs.doclet/src/main/java/io/sarl/docs/doclet/references/SarlLinkFactory.java#L75-L79
UrielCh/ovh-java-sdk
ovh-java-sdk-ip/src/main/java/net/minidev/ovh/api/ApiOvhIp.java
ApiOvhIp.ip_move_GET
public OvhDestinations ip_move_GET(String ip) throws IOException { """ List services available as a destination REST: GET /ip/{ip}/move @param ip [required] API beta """ String qPath = "/ip/{ip}/move"; StringBuilder sb = path(qPath, ip); String resp = exec(qPath, "GET", sb.toString(), null); ret...
java
public OvhDestinations ip_move_GET(String ip) throws IOException { String qPath = "/ip/{ip}/move"; StringBuilder sb = path(qPath, ip); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhDestinations.class); }
[ "public", "OvhDestinations", "ip_move_GET", "(", "String", "ip", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/ip/{ip}/move\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ",", "ip", ")", ";", "String", "resp", "=", "exec", "(", ...
List services available as a destination REST: GET /ip/{ip}/move @param ip [required] API beta
[ "List", "services", "available", "as", "a", "destination" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-ip/src/main/java/net/minidev/ovh/api/ApiOvhIp.java#L523-L528
lievendoclo/Valkyrie-RCP
valkyrie-rcp-core/src/main/java/org/valkyriercp/application/PropertyNotSetException.java
PropertyNotSetException.throwIfNull
public static void throwIfNull(Object propertyValue, String propertyName, Class beanClass) { """ Throws an instance of this exception if the given {@code propertyValue} is null. @param propertyValue The value of the property. @param propertyName The name of the property. @param beanClass The class on which t...
java
public static void throwIfNull(Object propertyValue, String propertyName, Class beanClass) { if (propertyValue == null) { throw new PropertyNotSetException(beanClass, propertyName); } }
[ "public", "static", "void", "throwIfNull", "(", "Object", "propertyValue", ",", "String", "propertyName", ",", "Class", "beanClass", ")", "{", "if", "(", "propertyValue", "==", "null", ")", "{", "throw", "new", "PropertyNotSetException", "(", "beanClass", ",", ...
Throws an instance of this exception if the given {@code propertyValue} is null. @param propertyValue The value of the property. @param propertyName The name of the property. @param beanClass The class on which the property is supposed to be set. @throws PropertyNotSetException if {@code propertyValue} is null.
[ "Throws", "an", "instance", "of", "this", "exception", "if", "the", "given", "{", "@code", "propertyValue", "}", "is", "null", "." ]
train
https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/application/PropertyNotSetException.java#L40-L46
weld/core
impl/src/main/java/org/jboss/weld/util/BeanMethods.java
BeanMethods.getMethods
private static <T, R> R getMethods(EnhancedAnnotatedType<T> type, MethodListBuilder<T, R> builder) { """ Get all methods of a given kind using a given {@link MethodListBuilder}. """ Collection<EnhancedAnnotatedMethod<?, ? super T>> methods = filterMethods(builder.getAllMethods(type)); for (Clas...
java
private static <T, R> R getMethods(EnhancedAnnotatedType<T> type, MethodListBuilder<T, R> builder) { Collection<EnhancedAnnotatedMethod<?, ? super T>> methods = filterMethods(builder.getAllMethods(type)); for (Class<? super T> clazz = type.getJavaClass(); clazz != null && clazz != Object.class; clazz = ...
[ "private", "static", "<", "T", ",", "R", ">", "R", "getMethods", "(", "EnhancedAnnotatedType", "<", "T", ">", "type", ",", "MethodListBuilder", "<", "T", ",", "R", ">", "builder", ")", "{", "Collection", "<", "EnhancedAnnotatedMethod", "<", "?", ",", "?"...
Get all methods of a given kind using a given {@link MethodListBuilder}.
[ "Get", "all", "methods", "of", "a", "given", "kind", "using", "a", "given", "{" ]
train
https://github.com/weld/core/blob/567a2eaf95b168597d23a56be89bf05a7834b2aa/impl/src/main/java/org/jboss/weld/util/BeanMethods.java#L115-L127
apache/incubator-druid
server/src/main/java/org/apache/druid/discovery/DruidLeaderClient.java
DruidLeaderClient.makeRequest
public Request makeRequest(HttpMethod httpMethod, String urlPath) throws IOException { """ Make a Request object aimed at the leader. Throws IOException if the leader cannot be located. """ return makeRequest(httpMethod, urlPath, true); }
java
public Request makeRequest(HttpMethod httpMethod, String urlPath) throws IOException { return makeRequest(httpMethod, urlPath, true); }
[ "public", "Request", "makeRequest", "(", "HttpMethod", "httpMethod", ",", "String", "urlPath", ")", "throws", "IOException", "{", "return", "makeRequest", "(", "httpMethod", ",", "urlPath", ",", "true", ")", ";", "}" ]
Make a Request object aimed at the leader. Throws IOException if the leader cannot be located.
[ "Make", "a", "Request", "object", "aimed", "at", "the", "leader", ".", "Throws", "IOException", "if", "the", "leader", "cannot", "be", "located", "." ]
train
https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/server/src/main/java/org/apache/druid/discovery/DruidLeaderClient.java#L137-L140
zaproxy/zaproxy
src/org/zaproxy/zap/extension/ext/ExtensionParam.java
ExtensionParam.setExtensionsState
void setExtensionsState(Map<String, Boolean> extensionsState) { """ Sets the extensions' state, to be saved in the configuration file. @param extensionsState the extensions' state """ if (extensionsState == null) { throw new IllegalArgumentException("Parameter extensionsState must not be...
java
void setExtensionsState(Map<String, Boolean> extensionsState) { if (extensionsState == null) { throw new IllegalArgumentException("Parameter extensionsState must not be null."); } ((HierarchicalConfiguration) getConfig()).clearTree(ALL_EXTENSIONS_KEY); int enabledCount = 0; ...
[ "void", "setExtensionsState", "(", "Map", "<", "String", ",", "Boolean", ">", "extensionsState", ")", "{", "if", "(", "extensionsState", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Parameter extensionsState must not be null.\"", ")", ...
Sets the extensions' state, to be saved in the configuration file. @param extensionsState the extensions' state
[ "Sets", "the", "extensions", "state", "to", "be", "saved", "in", "the", "configuration", "file", "." ]
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/ext/ExtensionParam.java#L121-L144
beangle/beangle3
orm/hibernate/src/main/java/org/beangle/orm/hibernate/dwr/H4BeanConverter.java
H4BeanConverter.findGetter
protected Method findGetter(Object data, String property) throws IntrospectionException { """ Cache the method if possible, using the classname and property name to allow for similar named methods. @param data The bean to introspect @param property The property to get the accessor for @return The getter meth...
java
protected Method findGetter(Object data, String property) throws IntrospectionException { Class<?> clazz = getClass(data); String key = clazz.getName() + ":" + property; Method method = methods.get(key); if (method == null) { Method newMethod = null; PropertyDescriptor[] props = Introspector...
[ "protected", "Method", "findGetter", "(", "Object", "data", ",", "String", "property", ")", "throws", "IntrospectionException", "{", "Class", "<", "?", ">", "clazz", "=", "getClass", "(", "data", ")", ";", "String", "key", "=", "clazz", ".", "getName", "("...
Cache the method if possible, using the classname and property name to allow for similar named methods. @param data The bean to introspect @param property The property to get the accessor for @return The getter method @throws IntrospectionException If Introspector.getBeanInfo() fails
[ "Cache", "the", "method", "if", "possible", "using", "the", "classname", "and", "property", "name", "to", "allow", "for", "similar", "named", "methods", "." ]
train
https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/orm/hibernate/src/main/java/org/beangle/orm/hibernate/dwr/H4BeanConverter.java#L168-L187
igniterealtime/Smack
smack-extensions/src/main/java/org/jivesoftware/smackx/privacy/packet/Privacy.java
Privacy.getItem
public PrivacyItem getItem(String listName, int order) { """ Returns the privacy item in the specified order. @param listName the name of the privacy list. @param order the order of the element. @return a List with {@link PrivacyItem} """ // CHECKSTYLE:OFF Iterator<PrivacyItem> values = ge...
java
public PrivacyItem getItem(String listName, int order) { // CHECKSTYLE:OFF Iterator<PrivacyItem> values = getPrivacyList(listName).iterator(); PrivacyItem itemFound = null; while (itemFound == null && values.hasNext()) { PrivacyItem element = values.next(); if (el...
[ "public", "PrivacyItem", "getItem", "(", "String", "listName", ",", "int", "order", ")", "{", "// CHECKSTYLE:OFF", "Iterator", "<", "PrivacyItem", ">", "values", "=", "getPrivacyList", "(", "listName", ")", ".", "iterator", "(", ")", ";", "PrivacyItem", "itemF...
Returns the privacy item in the specified order. @param listName the name of the privacy list. @param order the order of the element. @return a List with {@link PrivacyItem}
[ "Returns", "the", "privacy", "item", "in", "the", "specified", "order", "." ]
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/privacy/packet/Privacy.java#L157-L169
michael-rapp/AndroidMaterialDialog
library/src/main/java/de/mrapp/android/dialog/view/DialogRootView.java
DialogRootView.applyDialogPaddingRight
private void applyDialogPaddingRight(@NonNull final Area area, @NonNull final View view) { """ Applies the dialog's right padding to the view of a specific area. @param area The area, the view, the padding should be applied to, corresponds to, as an instance of the class {@link Area}. The area may not be null...
java
private void applyDialogPaddingRight(@NonNull final Area area, @NonNull final View view) { int padding = area != Area.HEADER && area != Area.BUTTON_BAR && area != Area.CONTENT ? dialogPadding[2] : 0; view.setPadding(view.getPaddingLeft(), view.getPaddingTop(), padding, vi...
[ "private", "void", "applyDialogPaddingRight", "(", "@", "NonNull", "final", "Area", "area", ",", "@", "NonNull", "final", "View", "view", ")", "{", "int", "padding", "=", "area", "!=", "Area", ".", "HEADER", "&&", "area", "!=", "Area", ".", "BUTTON_BAR", ...
Applies the dialog's right padding to the view of a specific area. @param area The area, the view, the padding should be applied to, corresponds to, as an instance of the class {@link Area}. The area may not be null @param view The view, the padding should be applied to, as an instance of the class {@link View}. The v...
[ "Applies", "the", "dialog", "s", "right", "padding", "to", "the", "view", "of", "a", "specific", "area", "." ]
train
https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/view/DialogRootView.java#L703-L708
OpenBEL/openbel-framework
org.openbel.framework.core/src/main/java/org/openbel/framework/core/protocol/handler/FTPConnector.java
FTPConnector.retrieveFile
public void retrieveFile(String remotePath, String localPath) throws FileNotFoundException, IOException { """ Retrieves a file, specified by {@code remotePath}, from the ftp server and saves it locally to {@code localPath}. @param remotePath {@link String}, the remote path @param localPath {@link ...
java
public void retrieveFile(String remotePath, String localPath) throws FileNotFoundException, IOException { FileOutputStream localFileOutputStream = new FileOutputStream(localPath); ftpClient.retrieveFile(remotePath, localFileOutputStream); localFileOutputStream.close()...
[ "public", "void", "retrieveFile", "(", "String", "remotePath", ",", "String", "localPath", ")", "throws", "FileNotFoundException", ",", "IOException", "{", "FileOutputStream", "localFileOutputStream", "=", "new", "FileOutputStream", "(", "localPath", ")", ";", "ftpCli...
Retrieves a file, specified by {@code remotePath}, from the ftp server and saves it locally to {@code localPath}. @param remotePath {@link String}, the remote path @param localPath {@link String}, the local path @throws FileNotFoundException - Thrown if the file exists but is a directory rather than a regular file, do...
[ "Retrieves", "a", "file", "specified", "by", "{", "@code", "remotePath", "}", "from", "the", "ftp", "server", "and", "saves", "it", "locally", "to", "{", "@code", "localPath", "}", "." ]
train
https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.core/src/main/java/org/openbel/framework/core/protocol/handler/FTPConnector.java#L213-L219
cdk/cdk
tool/builder3d/src/main/java/org/openscience/cdk/modeling/builder3d/ModelBuilder3D.java
ModelBuilder3D.searchAndPlaceBranches
private void searchAndPlaceBranches(IAtomContainer molecule, IAtomContainer chain, AtomPlacer3D ap3d, AtomTetrahedralLigandPlacer3D atlp3d, AtomPlacer atomPlacer) throws CDKException { """ Search and place branches of a chain or ring. @param chain AtomContainer if atoms in an aliphatic cha...
java
private void searchAndPlaceBranches(IAtomContainer molecule, IAtomContainer chain, AtomPlacer3D ap3d, AtomTetrahedralLigandPlacer3D atlp3d, AtomPlacer atomPlacer) throws CDKException { //logger.debug("****** SEARCH AND PLACE ****** Chain length: "+chain.getAtomCount()); List atoms = null; ...
[ "private", "void", "searchAndPlaceBranches", "(", "IAtomContainer", "molecule", ",", "IAtomContainer", "chain", ",", "AtomPlacer3D", "ap3d", ",", "AtomTetrahedralLigandPlacer3D", "atlp3d", ",", "AtomPlacer", "atomPlacer", ")", "throws", "CDKException", "{", "//logger.debu...
Search and place branches of a chain or ring. @param chain AtomContainer if atoms in an aliphatic chain or ring system
[ "Search", "and", "place", "branches", "of", "a", "chain", "or", "ring", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/builder3d/src/main/java/org/openscience/cdk/modeling/builder3d/ModelBuilder3D.java#L459-L491
JodaOrg/joda-time
src/main/java/org/joda/time/LocalTime.java
LocalTime.withPeriodAdded
public LocalTime withPeriodAdded(ReadablePeriod period, int scalar) { """ Returns a copy of this time with the specified period added. <p> If the addition is zero, then <code>this</code> is returned. <p> This method is typically used to add multiple copies of complex period instances. Adding one field is best...
java
public LocalTime withPeriodAdded(ReadablePeriod period, int scalar) { if (period == null || scalar == 0) { return this; } long instant = getChronology().add(period, getLocalMillis(), scalar); return withLocalMillis(instant); }
[ "public", "LocalTime", "withPeriodAdded", "(", "ReadablePeriod", "period", ",", "int", "scalar", ")", "{", "if", "(", "period", "==", "null", "||", "scalar", "==", "0", ")", "{", "return", "this", ";", "}", "long", "instant", "=", "getChronology", "(", "...
Returns a copy of this time with the specified period added. <p> If the addition is zero, then <code>this</code> is returned. <p> This method is typically used to add multiple copies of complex period instances. Adding one field is best achieved using methods like {@link #withFieldAdded(DurationFieldType, int)} or {@li...
[ "Returns", "a", "copy", "of", "this", "time", "with", "the", "specified", "period", "added", ".", "<p", ">", "If", "the", "addition", "is", "zero", "then", "<code", ">", "this<", "/", "code", ">", "is", "returned", ".", "<p", ">", "This", "method", "...
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/LocalTime.java#L844-L850
alkacon/opencms-core
src-modules/org/opencms/workplace/commons/CmsPreferences.java
CmsPreferences.buildSelectExplorerButtonStyle
public String buildSelectExplorerButtonStyle(String htmlAttributes) { """ Builds the html for the explorer button style select box.<p> @param htmlAttributes optional html attributes for the &lgt;select&gt; tag @return the html for the explorer button style select box """ int selectedIndex = Intege...
java
public String buildSelectExplorerButtonStyle(String htmlAttributes) { int selectedIndex = Integer.parseInt(getParamTabExButtonStyle()); return buildSelectButtonStyle(htmlAttributes, selectedIndex); }
[ "public", "String", "buildSelectExplorerButtonStyle", "(", "String", "htmlAttributes", ")", "{", "int", "selectedIndex", "=", "Integer", ".", "parseInt", "(", "getParamTabExButtonStyle", "(", ")", ")", ";", "return", "buildSelectButtonStyle", "(", "htmlAttributes", ",...
Builds the html for the explorer button style select box.<p> @param htmlAttributes optional html attributes for the &lgt;select&gt; tag @return the html for the explorer button style select box
[ "Builds", "the", "html", "for", "the", "explorer", "button", "style", "select", "box", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/commons/CmsPreferences.java#L669-L673
Erudika/para
para-client/src/main/java/com/erudika/para/client/ParaClient.java
ParaClient.revokeResourcePermission
public Map<String, Map<String, List<String>>> revokeResourcePermission(String subjectid, String resourcePath) { """ Revokes a permission for a subject, meaning they no longer will be able to access the given resource. @param subjectid subject id (user id) @param resourcePath resource path or object type @return...
java
public Map<String, Map<String, List<String>>> revokeResourcePermission(String subjectid, String resourcePath) { if (StringUtils.isBlank(subjectid) || StringUtils.isBlank(resourcePath)) { return Collections.emptyMap(); } resourcePath = Utils.urlEncode(resourcePath); return getEntity(invokeDelete(Utils.formatM...
[ "public", "Map", "<", "String", ",", "Map", "<", "String", ",", "List", "<", "String", ">", ">", ">", "revokeResourcePermission", "(", "String", "subjectid", ",", "String", "resourcePath", ")", "{", "if", "(", "StringUtils", ".", "isBlank", "(", "subjectid...
Revokes a permission for a subject, meaning they no longer will be able to access the given resource. @param subjectid subject id (user id) @param resourcePath resource path or object type @return a map of the permissions for this subject id
[ "Revokes", "a", "permission", "for", "a", "subject", "meaning", "they", "no", "longer", "will", "be", "able", "to", "access", "the", "given", "resource", "." ]
train
https://github.com/Erudika/para/blob/5ba096c477042ea7b18e9a0e8b5b1ee0f5bd6ce9/para-client/src/main/java/com/erudika/para/client/ParaClient.java#L1463-L1470
elki-project/elki
elki-outlier/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/intrinsic/ISOS.java
ISOS.estimateID
protected double estimateID(DBIDRef ignore, DoubleDBIDListIter it, double[] p) { """ Estimate the local intrinsic dimensionality. @param ignore Object to ignore @param it Iterator @param p Scratch array @return ID estimate """ int j = 0; for(it.seek(0); it.valid(); it.advance()) { if(it.dou...
java
protected double estimateID(DBIDRef ignore, DoubleDBIDListIter it, double[] p) { int j = 0; for(it.seek(0); it.valid(); it.advance()) { if(it.doubleValue() == 0. || DBIDUtil.equal(ignore, it)) { continue; } p[j++] = it.doubleValue(); } if(j < 2) { throw new ArithmeticExce...
[ "protected", "double", "estimateID", "(", "DBIDRef", "ignore", ",", "DoubleDBIDListIter", "it", ",", "double", "[", "]", "p", ")", "{", "int", "j", "=", "0", ";", "for", "(", "it", ".", "seek", "(", "0", ")", ";", "it", ".", "valid", "(", ")", ";...
Estimate the local intrinsic dimensionality. @param ignore Object to ignore @param it Iterator @param p Scratch array @return ID estimate
[ "Estimate", "the", "local", "intrinsic", "dimensionality", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-outlier/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/intrinsic/ISOS.java#L194-L206
molgenis/molgenis
molgenis-data/src/main/java/org/molgenis/data/EntityFactoryRegistry.java
EntityFactoryRegistry.registerStaticEntityFactory
<E extends Entity> void registerStaticEntityFactory(EntityFactory<E, ?> staticEntityFactory) { """ Registers a static entity factory @param staticEntityFactory static entity factory @param <E> static entity type (e.g. Tag, Language, Package) """ String entityTypeId = staticEntityFactory.getEntityTypeId...
java
<E extends Entity> void registerStaticEntityFactory(EntityFactory<E, ?> staticEntityFactory) { String entityTypeId = staticEntityFactory.getEntityTypeId(); staticEntityFactoryMap.put(entityTypeId, staticEntityFactory); }
[ "<", "E", "extends", "Entity", ">", "void", "registerStaticEntityFactory", "(", "EntityFactory", "<", "E", ",", "?", ">", "staticEntityFactory", ")", "{", "String", "entityTypeId", "=", "staticEntityFactory", ".", "getEntityTypeId", "(", ")", ";", "staticEntityFac...
Registers a static entity factory @param staticEntityFactory static entity factory @param <E> static entity type (e.g. Tag, Language, Package)
[ "Registers", "a", "static", "entity", "factory" ]
train
https://github.com/molgenis/molgenis/blob/b4d0d6b27e6f6c8d7505a3863dc03b589601f987/molgenis-data/src/main/java/org/molgenis/data/EntityFactoryRegistry.java#L28-L31
fhoeben/hsac-fitnesse-fixtures
src/main/java/nl/hsac/fitnesse/fixture/util/StreamUtil.java
StreamUtil.throwingMerger
public static <T> BinaryOperator<T> throwingMerger() { """ Throws is same key is produced. @param <T> type of values. @throws IllegalArgumentException always """ return (u, v) -> { throw new IllegalArgumentException(String.format("Duplicate key: value %s was already present now %s is ad...
java
public static <T> BinaryOperator<T> throwingMerger() { return (u, v) -> { throw new IllegalArgumentException(String.format("Duplicate key: value %s was already present now %s is added", u, v)); }; }
[ "public", "static", "<", "T", ">", "BinaryOperator", "<", "T", ">", "throwingMerger", "(", ")", "{", "return", "(", "u", ",", "v", ")", "->", "{", "throw", "new", "IllegalArgumentException", "(", "String", ".", "format", "(", "\"Duplicate key: value %s was a...
Throws is same key is produced. @param <T> type of values. @throws IllegalArgumentException always
[ "Throws", "is", "same", "key", "is", "produced", "." ]
train
https://github.com/fhoeben/hsac-fitnesse-fixtures/blob/4e9018d7386a9aa65bfcbf07eb28ae064edd1732/src/main/java/nl/hsac/fitnesse/fixture/util/StreamUtil.java#L55-L59
sevensource/html-email-service
src/main/java/org/sevensource/commons/email/model/DefaultEmailModel.java
DefaultEmailModel.addBcc
public void addBcc(String address, String personal) throws AddressException { """ adds a BCC recipient @param address a valid email address @param personal the real world name of the sender (can be null) @throws AddressException in case of an invalid email address """ if(bcc == null) { bcc = new Arra...
java
public void addBcc(String address, String personal) throws AddressException { if(bcc == null) { bcc = new ArrayList<>(); } bcc.add( toInternetAddress(address, personal) ); }
[ "public", "void", "addBcc", "(", "String", "address", ",", "String", "personal", ")", "throws", "AddressException", "{", "if", "(", "bcc", "==", "null", ")", "{", "bcc", "=", "new", "ArrayList", "<>", "(", ")", ";", "}", "bcc", ".", "add", "(", "toIn...
adds a BCC recipient @param address a valid email address @param personal the real world name of the sender (can be null) @throws AddressException in case of an invalid email address
[ "adds", "a", "BCC", "recipient" ]
train
https://github.com/sevensource/html-email-service/blob/a55d9ef1a2173917cb5f870854bc24e5aaebd182/src/main/java/org/sevensource/commons/email/model/DefaultEmailModel.java#L121-L126
apache/flink
flink-java/src/main/java/org/apache/flink/api/java/ExecutionEnvironment.java
ExecutionEnvironment.fromCollection
public <X> DataSource<X> fromCollection(Iterator<X> data, Class<X> type) { """ Creates a DataSet from the given iterator. Because the iterator will remain unmodified until the actual execution happens, the type of data returned by the iterator must be given explicitly in the form of the type class (this is due t...
java
public <X> DataSource<X> fromCollection(Iterator<X> data, Class<X> type) { return fromCollection(data, TypeExtractor.getForClass(type)); }
[ "public", "<", "X", ">", "DataSource", "<", "X", ">", "fromCollection", "(", "Iterator", "<", "X", ">", "data", ",", "Class", "<", "X", ">", "type", ")", "{", "return", "fromCollection", "(", "data", ",", "TypeExtractor", ".", "getForClass", "(", "type...
Creates a DataSet from the given iterator. Because the iterator will remain unmodified until the actual execution happens, the type of data returned by the iterator must be given explicitly in the form of the type class (this is due to the fact that the Java compiler erases the generic type information). <p>Note that ...
[ "Creates", "a", "DataSet", "from", "the", "given", "iterator", ".", "Because", "the", "iterator", "will", "remain", "unmodified", "until", "the", "actual", "execution", "happens", "the", "type", "of", "data", "returned", "by", "the", "iterator", "must", "be", ...
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/ExecutionEnvironment.java#L653-L655
ggrandes/kvstore
src/main/java/org/javastack/kvstore/structures/bitset/SimpleBitSet.java
SimpleBitSet.get
public SimpleBitSet get(int fromIndex, int toIndex) { """ Returns a new <tt>BitSet</tt> composed of bits from this <tt>BitSet</tt> from <tt>fromIndex</tt> (inclusive) to <tt>toIndex</tt> (exclusive). @param fromIndex index of the first bit to include. @param toIndex index after the last bit to i...
java
public SimpleBitSet get(int fromIndex, int toIndex) { checkRange(fromIndex, toIndex); checkInvariants(); int len = length(); // If no set bits in range return empty bitset if (len <= fromIndex || fromIndex == toIndex) return new SimpleBitSet(0); // An optimization if (toIndex > len) toIndex = le...
[ "public", "SimpleBitSet", "get", "(", "int", "fromIndex", ",", "int", "toIndex", ")", "{", "checkRange", "(", "fromIndex", ",", "toIndex", ")", ";", "checkInvariants", "(", ")", ";", "int", "len", "=", "length", "(", ")", ";", "// If no set bits in range ret...
Returns a new <tt>BitSet</tt> composed of bits from this <tt>BitSet</tt> from <tt>fromIndex</tt> (inclusive) to <tt>toIndex</tt> (exclusive). @param fromIndex index of the first bit to include. @param toIndex index after the last bit to include. @return a new <tt>BitSet</tt> from a range of this <tt>B...
[ "Returns", "a", "new", "<tt", ">", "BitSet<", "/", "tt", ">", "composed", "of", "bits", "from", "this", "<tt", ">", "BitSet<", "/", "tt", ">", "from", "<tt", ">", "fromIndex<", "/", "tt", ">", "(", "inclusive", ")", "to", "<tt", ">", "toIndex<", "/...
train
https://github.com/ggrandes/kvstore/blob/c79277f79f4604e0fec8349a98519838e3de38f0/src/main/java/org/javastack/kvstore/structures/bitset/SimpleBitSet.java#L368-L407
BigBadaboom/androidsvg
androidsvg/src/main/java/com/caverock/androidsvg/SVG.java
SVG.renderViewToPicture
@SuppressWarnings( { """ Renders this SVG document to a {@link Picture} using the specified view defined in the document. <p> A View is an special element in a SVG document that describes a rectangular area in the document. Calling this method with a {@code viewId} will result in the specified view being positi...
java
@SuppressWarnings({"WeakerAccess", "unused"}) public Picture renderViewToPicture(String viewId, int widthInPixels, int heightInPixels) { RenderOptions renderOptions = new RenderOptions(); renderOptions.view(viewId) .viewPort(0f, 0f, (float) widthInPixels, (float) heightInPixe...
[ "@", "SuppressWarnings", "(", "{", "\"WeakerAccess\"", ",", "\"unused\"", "}", ")", "public", "Picture", "renderViewToPicture", "(", "String", "viewId", ",", "int", "widthInPixels", ",", "int", "heightInPixels", ")", "{", "RenderOptions", "renderOptions", "=", "ne...
Renders this SVG document to a {@link Picture} using the specified view defined in the document. <p> A View is an special element in a SVG document that describes a rectangular area in the document. Calling this method with a {@code viewId} will result in the specified view being positioned and scaled to the viewport. ...
[ "Renders", "this", "SVG", "document", "to", "a", "{", "@link", "Picture", "}", "using", "the", "specified", "view", "defined", "in", "the", "document", ".", "<p", ">", "A", "View", "is", "an", "special", "element", "in", "a", "SVG", "document", "that", ...
train
https://github.com/BigBadaboom/androidsvg/blob/0d1614dd1a4da10ea4afe3b0cea1361a4ac6b45a/androidsvg/src/main/java/com/caverock/androidsvg/SVG.java#L461-L477
weld/core
impl/src/main/java/org/jboss/weld/bean/builtin/BeanManagerProxy.java
BeanManagerProxy.checkContainerState
private void checkContainerState(String methodName, ContainerState minimalState) { """ When in portable mode (default) this method verifies that the container has reached the specified minimal state. If it hasn't, an {@link IllegalStateException} is thrown. When in non-portable mode this method is no-op. @para...
java
private void checkContainerState(String methodName, ContainerState minimalState) { if (nonPortableMode) { return; } if (this.container == null) { this.container = Container.instance(manager); } ContainerState state = container.getState(); if (SHUT...
[ "private", "void", "checkContainerState", "(", "String", "methodName", ",", "ContainerState", "minimalState", ")", "{", "if", "(", "nonPortableMode", ")", "{", "return", ";", "}", "if", "(", "this", ".", "container", "==", "null", ")", "{", "this", ".", "c...
When in portable mode (default) this method verifies that the container has reached the specified minimal state. If it hasn't, an {@link IllegalStateException} is thrown. When in non-portable mode this method is no-op. @param methodName @param minimalState the minimal state @throws IllegalStateException If the applica...
[ "When", "in", "portable", "mode", "(", "default", ")", "this", "method", "verifies", "that", "the", "container", "has", "reached", "the", "specified", "minimal", "state", ".", "If", "it", "hasn", "t", "an", "{", "@link", "IllegalStateException", "}", "is", ...
train
https://github.com/weld/core/blob/567a2eaf95b168597d23a56be89bf05a7834b2aa/impl/src/main/java/org/jboss/weld/bean/builtin/BeanManagerProxy.java#L222-L237
inaiat/jqplot4java
src/main/java/br/com/digilabs/jqplot/JqPlotUtils.java
JqPlotUtils.jqPlotToJson
public static String jqPlotToJson(ChartConfiguration<?> jqPlot) { """ Retorna o um json a partir de uma configuração jqplot @param jqPlot ChartConfiguration @return String of JSON content """ XStream xstream = new XStream(new JsonHierarchicalStreamDriver() { @Override public...
java
public static String jqPlotToJson(ChartConfiguration<?> jqPlot) { XStream xstream = new XStream(new JsonHierarchicalStreamDriver() { @Override public HierarchicalStreamWriter createWriter(Writer writer) { return new JqPlotJsonMapHierarchicalWriter(writer, JsonWriter.DRO...
[ "public", "static", "String", "jqPlotToJson", "(", "ChartConfiguration", "<", "?", ">", "jqPlot", ")", "{", "XStream", "xstream", "=", "new", "XStream", "(", "new", "JsonHierarchicalStreamDriver", "(", ")", "{", "@", "Override", "public", "HierarchicalStreamWriter...
Retorna o um json a partir de uma configuração jqplot @param jqPlot ChartConfiguration @return String of JSON content
[ "Retorna", "o", "um", "json", "a", "partir", "de", "uma", "configuração", "jqplot" ]
train
https://github.com/inaiat/jqplot4java/blob/35bcd17749442e88695df0438c8330a65a3977cc/src/main/java/br/com/digilabs/jqplot/JqPlotUtils.java#L101-L140
gotev/android-upload-service
uploadservice/src/main/java/net/gotev/uploadservice/UploadService.java
UploadService.setUploadStatusDelegate
protected static void setUploadStatusDelegate(String uploadId, UploadStatusDelegate delegate) { """ Sets the delegate which will receive the events for the given upload request. Those events will not be sent in broadcast, but only to the delegate. @param uploadId uploadID of the upload request @param delegate t...
java
protected static void setUploadStatusDelegate(String uploadId, UploadStatusDelegate delegate) { if (delegate == null) return; uploadDelegates.put(uploadId, new WeakReference<>(delegate)); }
[ "protected", "static", "void", "setUploadStatusDelegate", "(", "String", "uploadId", ",", "UploadStatusDelegate", "delegate", ")", "{", "if", "(", "delegate", "==", "null", ")", "return", ";", "uploadDelegates", ".", "put", "(", "uploadId", ",", "new", "WeakRefe...
Sets the delegate which will receive the events for the given upload request. Those events will not be sent in broadcast, but only to the delegate. @param uploadId uploadID of the upload request @param delegate the delegate instance
[ "Sets", "the", "delegate", "which", "will", "receive", "the", "events", "for", "the", "given", "upload", "request", ".", "Those", "events", "will", "not", "be", "sent", "in", "broadcast", "but", "only", "to", "the", "delegate", "." ]
train
https://github.com/gotev/android-upload-service/blob/0952fcbe4b32c100150ffd0a237de3be4942e0a8/uploadservice/src/main/java/net/gotev/uploadservice/UploadService.java#L423-L428
netceteragroup/trema-core
src/main/java/com/netcetera/trema/core/XMLDatabase.java
XMLDatabase.fireTextNodesRemoved
protected void fireTextNodesRemoved(ITextNode[] textNodes, int index) { """ Notifies the registered listeners that some text nodes have been removed. @param textNodes the text nodes that have been removed @param index the position of the topmost text node that has been removed """ for (IDatabaseListene...
java
protected void fireTextNodesRemoved(ITextNode[] textNodes, int index) { for (IDatabaseListener iDatabaseListener : listeners) { iDatabaseListener.textNodesRemoved(this, textNodes, index); } }
[ "protected", "void", "fireTextNodesRemoved", "(", "ITextNode", "[", "]", "textNodes", ",", "int", "index", ")", "{", "for", "(", "IDatabaseListener", "iDatabaseListener", ":", "listeners", ")", "{", "iDatabaseListener", ".", "textNodesRemoved", "(", "this", ",", ...
Notifies the registered listeners that some text nodes have been removed. @param textNodes the text nodes that have been removed @param index the position of the topmost text node that has been removed
[ "Notifies", "the", "registered", "listeners", "that", "some", "text", "nodes", "have", "been", "removed", "." ]
train
https://github.com/netceteragroup/trema-core/blob/e5367f4b80b38038d462627aa146a62bc34fc489/src/main/java/com/netcetera/trema/core/XMLDatabase.java#L572-L576
versionone/VersionOne.SDK.Java.ObjectModel
src/main/java/com/versionone/om/Project.java
Project.createSubProject
public Project createSubProject(String name, DateTime beginDate) { """ Create a sub project under this project with a name and begin date. @param name Name of the new project. @param beginDate Date the schedule will begin. @return The newly created project. """ return createSubProject(name, b...
java
public Project createSubProject(String name, DateTime beginDate) { return createSubProject(name, beginDate, null); }
[ "public", "Project", "createSubProject", "(", "String", "name", ",", "DateTime", "beginDate", ")", "{", "return", "createSubProject", "(", "name", ",", "beginDate", ",", "null", ")", ";", "}" ]
Create a sub project under this project with a name and begin date. @param name Name of the new project. @param beginDate Date the schedule will begin. @return The newly created project.
[ "Create", "a", "sub", "project", "under", "this", "project", "with", "a", "name", "and", "begin", "date", "." ]
train
https://github.com/versionone/VersionOne.SDK.Java.ObjectModel/blob/59d35b67c849299631bca45ee94143237eb2ae1a/src/main/java/com/versionone/om/Project.java#L173-L175
alkacon/opencms-core
src/org/opencms/db/CmsDriverManager.java
CmsDriverManager.writeProjectLastModified
public void writeProjectLastModified(CmsDbContext dbc, CmsResource resource, CmsUUID projectId) throws CmsDataAccessException { """ Writes a new project into the PROJECT_LASTMODIFIED field of a resource record.<p> @param dbc the current database context @param resource the resource which should be modified...
java
public void writeProjectLastModified(CmsDbContext dbc, CmsResource resource, CmsUUID projectId) throws CmsDataAccessException { I_CmsVfsDriver vfsDriver = getVfsDriver(dbc); vfsDriver.writeLastModifiedProjectId(dbc, dbc.currentProject(), projectId, resource); }
[ "public", "void", "writeProjectLastModified", "(", "CmsDbContext", "dbc", ",", "CmsResource", "resource", ",", "CmsUUID", "projectId", ")", "throws", "CmsDataAccessException", "{", "I_CmsVfsDriver", "vfsDriver", "=", "getVfsDriver", "(", "dbc", ")", ";", "vfsDriver", ...
Writes a new project into the PROJECT_LASTMODIFIED field of a resource record.<p> @param dbc the current database context @param resource the resource which should be modified @param projectId the project id to write @throws CmsDataAccessException if the database access fails
[ "Writes", "a", "new", "project", "into", "the", "PROJECT_LASTMODIFIED", "field", "of", "a", "resource", "record", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsDriverManager.java#L9961-L9966
ironjacamar/ironjacamar
tracer/src/main/java/org/ironjacamar/tracer/TraceEventHelper.java
TraceEventHelper.hasMoreApplicationEvents
static boolean hasMoreApplicationEvents(List<TraceEvent> events, int index) { """ Has more application events @param events The events @param index The index @return True if more application events after the index """ if (index < 0 || index >= events.size()) return false; for (int j = ...
java
static boolean hasMoreApplicationEvents(List<TraceEvent> events, int index) { if (index < 0 || index >= events.size()) return false; for (int j = index; j < events.size(); j++) { TraceEvent te = events.get(j); if (te.getType() == TraceEvent.GET_CONNECTION || ...
[ "static", "boolean", "hasMoreApplicationEvents", "(", "List", "<", "TraceEvent", ">", "events", ",", "int", "index", ")", "{", "if", "(", "index", "<", "0", "||", "index", ">=", "events", ".", "size", "(", ")", ")", "return", "false", ";", "for", "(", ...
Has more application events @param events The events @param index The index @return True if more application events after the index
[ "Has", "more", "application", "events" ]
train
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/tracer/src/main/java/org/ironjacamar/tracer/TraceEventHelper.java#L1056-L1070
Omertron/api-thetvdb
src/main/java/com/omertron/thetvdbapi/TheTVDBApi.java
TheTVDBApi.getEpisodeById
public Episode getEpisodeById(String episodeId, String language) throws TvDbException { """ Get information for a specific episode @param episodeId @param language @return @throws com.omertron.thetvdbapi.TvDbException """ StringBuilder urlBuilder = new StringBuilder(); urlBuilder.append(...
java
public Episode getEpisodeById(String episodeId, String language) throws TvDbException { StringBuilder urlBuilder = new StringBuilder(); urlBuilder.append(BASE_URL) .append(apiKey) .append("/episodes/") .append(episodeId) .append("/...
[ "public", "Episode", "getEpisodeById", "(", "String", "episodeId", ",", "String", "language", ")", "throws", "TvDbException", "{", "StringBuilder", "urlBuilder", "=", "new", "StringBuilder", "(", ")", ";", "urlBuilder", ".", "append", "(", "BASE_URL", ")", ".", ...
Get information for a specific episode @param episodeId @param language @return @throws com.omertron.thetvdbapi.TvDbException
[ "Get", "information", "for", "a", "specific", "episode" ]
train
https://github.com/Omertron/api-thetvdb/blob/2ff9f9580e76043f19d2fc3234d87e16a95fa485/src/main/java/com/omertron/thetvdbapi/TheTVDBApi.java#L373-L388
netty/netty
common/src/main/java/io/netty/util/internal/StringUtil.java
StringUtil.substringAfter
public static String substringAfter(String value, char delim) { """ Get the item after one char delim if the delim is found (else null). This operation is a simplified and optimized version of {@link String#split(String, int)}. """ int pos = value.indexOf(delim); if (pos >= 0) { r...
java
public static String substringAfter(String value, char delim) { int pos = value.indexOf(delim); if (pos >= 0) { return value.substring(pos + 1); } return null; }
[ "public", "static", "String", "substringAfter", "(", "String", "value", ",", "char", "delim", ")", "{", "int", "pos", "=", "value", ".", "indexOf", "(", "delim", ")", ";", "if", "(", "pos", ">=", "0", ")", "{", "return", "value", ".", "substring", "(...
Get the item after one char delim if the delim is found (else null). This operation is a simplified and optimized version of {@link String#split(String, int)}.
[ "Get", "the", "item", "after", "one", "char", "delim", "if", "the", "delim", "is", "found", "(", "else", "null", ")", ".", "This", "operation", "is", "a", "simplified", "and", "optimized", "version", "of", "{" ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/common/src/main/java/io/netty/util/internal/StringUtil.java#L67-L73
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/XPathParser.java
XPathParser.lookahead
final boolean lookahead(char c, int n) { """ Look ahead of the current token in order to make a branching decision. @param c the character to be tested for. @param n number of tokens to look ahead. Must be greater than 1. @return true if the next token matches the character argument. """ int pos...
java
final boolean lookahead(char c, int n) { int pos = (m_queueMark + n); boolean b; if ((pos <= m_ops.getTokenQueueSize()) && (pos > 0) && (m_ops.getTokenQueueSize() != 0)) { String tok = ((String) m_ops.m_tokenQueue.elementAt(pos - 1)); b = (tok.length() == 1) ? (tok.charAt(0)...
[ "final", "boolean", "lookahead", "(", "char", "c", ",", "int", "n", ")", "{", "int", "pos", "=", "(", "m_queueMark", "+", "n", ")", ";", "boolean", "b", ";", "if", "(", "(", "pos", "<=", "m_ops", ".", "getTokenQueueSize", "(", ")", ")", "&&", "("...
Look ahead of the current token in order to make a branching decision. @param c the character to be tested for. @param n number of tokens to look ahead. Must be greater than 1. @return true if the next token matches the character argument.
[ "Look", "ahead", "of", "the", "current", "token", "in", "order", "to", "make", "a", "branching", "decision", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/XPathParser.java#L290-L309
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/metadata/fieldaccess/AnonymousPersistentField.java
AnonymousPersistentField.putToFieldCache
protected void putToFieldCache(Object key, Object value) { """ /* Use ReferenceIdentityMap (with weak key and hard value setting) instead of WeakHashMap to hold anonymous field values. Here is an snip of the mail from Andy Malakov: <snip> I found that usage of database identity in Java produces quite interesti...
java
protected void putToFieldCache(Object key, Object value) { if (key != null) { if (fkCache == null) { fkCache = new ReferenceIdentityMap (ReferenceIdentityMap.WEAK, ReferenceIdentityMap.HARD, true); } if (value != null) ...
[ "protected", "void", "putToFieldCache", "(", "Object", "key", ",", "Object", "value", ")", "{", "if", "(", "key", "!=", "null", ")", "{", "if", "(", "fkCache", "==", "null", ")", "{", "fkCache", "=", "new", "ReferenceIdentityMap", "(", "ReferenceIdentityMa...
/* Use ReferenceIdentityMap (with weak key and hard value setting) instead of WeakHashMap to hold anonymous field values. Here is an snip of the mail from Andy Malakov: <snip> I found that usage of database identity in Java produces quite interesting problem in OJB: In my application all persistent Java objects use dat...
[ "/", "*", "Use", "ReferenceIdentityMap", "(", "with", "weak", "key", "and", "hard", "value", "setting", ")", "instead", "of", "WeakHashMap", "to", "hold", "anonymous", "field", "values", ".", "Here", "is", "an", "snip", "of", "the", "mail", "from", "Andy",...
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/metadata/fieldaccess/AnonymousPersistentField.java#L78-L91