repository_name
stringlengths
7
54
func_path_in_repository
stringlengths
18
196
func_name
stringlengths
7
107
whole_func_string
stringlengths
76
3.82k
language
stringclasses
1 value
func_code_string
stringlengths
76
3.82k
func_code_tokens
listlengths
22
717
func_documentation_string
stringlengths
61
1.98k
func_documentation_tokens
listlengths
1
508
split_name
stringclasses
1 value
func_code_url
stringlengths
111
310
overturetool/overture
core/typechecker/src/main/java/org/overture/typechecker/TypeCheckInfo.java
TypeCheckInfo.contextSet
public <T> void contextSet(Class<T> key, T value) { synchronized (TypeCheckInfo.class) { Stack<T> contextStack = lookupListForType(key); if (contextStack == null) { contextStack = new Stack<T>(); context.put(key, contextStack); } contextStack.push(value); } }
java
public <T> void contextSet(Class<T> key, T value) { synchronized (TypeCheckInfo.class) { Stack<T> contextStack = lookupListForType(key); if (contextStack == null) { contextStack = new Stack<T>(); context.put(key, contextStack); } contextStack.push(value); } }
[ "public", "<", "T", ">", "void", "contextSet", "(", "Class", "<", "T", ">", "key", ",", "T", "value", ")", "{", "synchronized", "(", "TypeCheckInfo", ".", "class", ")", "{", "Stack", "<", "T", ">", "contextStack", "=", "lookupListForType", "(", "key", ...
Associates the given key with the given value. @param <T> @param key @param value
[ "Associates", "the", "given", "key", "with", "the", "given", "value", "." ]
train
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/typechecker/src/main/java/org/overture/typechecker/TypeCheckInfo.java#L101-L113
keenon/loglinear
src/main/java/com/github/keenon/loglinear/inference/CliqueTree.java
CliqueTree.domainsOverlap
private boolean domainsOverlap(TableFactor f1, TableFactor f2) { for (int n1 : f1.neighborIndices) { for (int n2 : f2.neighborIndices) { if (n1 == n2) return true; } } return false; }
java
private boolean domainsOverlap(TableFactor f1, TableFactor f2) { for (int n1 : f1.neighborIndices) { for (int n2 : f2.neighborIndices) { if (n1 == n2) return true; } } return false; }
[ "private", "boolean", "domainsOverlap", "(", "TableFactor", "f1", ",", "TableFactor", "f2", ")", "{", "for", "(", "int", "n1", ":", "f1", ".", "neighborIndices", ")", "{", "for", "(", "int", "n2", ":", "f2", ".", "neighborIndices", ")", "{", "if", "(",...
Just a quick inline to check if two factors have overlapping domains. Since factor neighbor sets are super small, this n^2 algorithm is fine. @param f1 first factor to compare @param f2 second factor to compare @return whether their domains overlap
[ "Just", "a", "quick", "inline", "to", "check", "if", "two", "factors", "have", "overlapping", "domains", ".", "Since", "factor", "neighbor", "sets", "are", "super", "small", "this", "n^2", "algorithm", "is", "fine", "." ]
train
https://github.com/keenon/loglinear/blob/fa0c370ab6782015412f676ef2ab11c97be58e29/src/main/java/com/github/keenon/loglinear/inference/CliqueTree.java#L919-L926
jronrun/benayn
benayn-ustyle/src/main/java/com/benayn/ustyle/Gather.java
Gather.foreach
public <O> int foreach(Function<? super T, O> function) { int count = 0; for (T item : each()) { function.apply(item); ++count; } return count; }
java
public <O> int foreach(Function<? super T, O> function) { int count = 0; for (T item : each()) { function.apply(item); ++count; } return count; }
[ "public", "<", "O", ">", "int", "foreach", "(", "Function", "<", "?", "super", "T", ",", "O", ">", "function", ")", "{", "int", "count", "=", "0", ";", "for", "(", "T", "item", ":", "each", "(", ")", ")", "{", "function", ".", "apply", "(", "...
Invokes a function on each element of the delegate, ignoring the return value; returns the number of elements that were present.
[ "Invokes", "a", "function", "on", "each", "element", "of", "the", "delegate", "ignoring", "the", "return", "value", ";", "returns", "the", "number", "of", "elements", "that", "were", "present", "." ]
train
https://github.com/jronrun/benayn/blob/7585152e10e4cac07b4274c65f1c72ad7061ae69/benayn-ustyle/src/main/java/com/benayn/ustyle/Gather.java#L258-L266
DiUS/pact-jvm
pact-jvm-consumer/src/main/java/au/com/dius/pact/consumer/dsl/PactDslJsonArray.java
PactDslJsonArray.arrayEachLike
public static PactDslJsonBody arrayEachLike(Integer numberExamples) { PactDslJsonArray parent = new PactDslJsonArray("", "", null, true); parent.setNumberExamples(numberExamples); parent.matchers.addRule("", parent.matchMin(0)); return new PactDslJsonBody(".", "", parent); }
java
public static PactDslJsonBody arrayEachLike(Integer numberExamples) { PactDslJsonArray parent = new PactDslJsonArray("", "", null, true); parent.setNumberExamples(numberExamples); parent.matchers.addRule("", parent.matchMin(0)); return new PactDslJsonBody(".", "", parent); }
[ "public", "static", "PactDslJsonBody", "arrayEachLike", "(", "Integer", "numberExamples", ")", "{", "PactDslJsonArray", "parent", "=", "new", "PactDslJsonArray", "(", "\"\"", ",", "\"\"", ",", "null", ",", "true", ")", ";", "parent", ".", "setNumberExamples", "(...
Array where each item must match the following example @param numberExamples Number of examples to generate
[ "Array", "where", "each", "item", "must", "match", "the", "following", "example" ]
train
https://github.com/DiUS/pact-jvm/blob/2f447e9dd4ac152a6a36b7fcf8962d07de9ef3ef/pact-jvm-consumer/src/main/java/au/com/dius/pact/consumer/dsl/PactDslJsonArray.java#L739-L744
infinispan/infinispan
commons/src/main/java/org/infinispan/commons/io/UnsignedNumeric.java
UnsignedNumeric.writeUnsignedInt
public static int writeUnsignedInt(byte[] bytes, int offset, int i) { int localOffset = offset; while ((i & ~0x7F) != 0) { bytes[localOffset++] = (byte) ((i & 0x7f) | 0x80); i >>>= 7; } bytes[localOffset++] = (byte) i; return localOffset - offset; }
java
public static int writeUnsignedInt(byte[] bytes, int offset, int i) { int localOffset = offset; while ((i & ~0x7F) != 0) { bytes[localOffset++] = (byte) ((i & 0x7f) | 0x80); i >>>= 7; } bytes[localOffset++] = (byte) i; return localOffset - offset; }
[ "public", "static", "int", "writeUnsignedInt", "(", "byte", "[", "]", "bytes", ",", "int", "offset", ",", "int", "i", ")", "{", "int", "localOffset", "=", "offset", ";", "while", "(", "(", "i", "&", "~", "0x7F", ")", "!=", "0", ")", "{", "bytes", ...
Writes an int in a variable-length format. Writes between one and five bytes. Smaller values take fewer bytes. Negative numbers are not supported. @param i int to write
[ "Writes", "an", "int", "in", "a", "variable", "-", "length", "format", ".", "Writes", "between", "one", "and", "five", "bytes", ".", "Smaller", "values", "take", "fewer", "bytes", ".", "Negative", "numbers", "are", "not", "supported", "." ]
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/commons/src/main/java/org/infinispan/commons/io/UnsignedNumeric.java#L173-L181
hal/core
gui/src/main/java/org/jboss/as/console/client/rbac/SecurityContextImpl.java
SecurityContextImpl.checkPriviledge
private AuthorisationDecision checkPriviledge(Priviledge p, boolean includeOptional) { AuthorisationDecision decision = new AuthorisationDecision(true); for(AddressTemplate ref : requiredResources) { if(ref.isOptional()) continue; // skip optional ones final Constraint...
java
private AuthorisationDecision checkPriviledge(Priviledge p, boolean includeOptional) { AuthorisationDecision decision = new AuthorisationDecision(true); for(AddressTemplate ref : requiredResources) { if(ref.isOptional()) continue; // skip optional ones final Constraint...
[ "private", "AuthorisationDecision", "checkPriviledge", "(", "Priviledge", "p", ",", "boolean", "includeOptional", ")", "{", "AuthorisationDecision", "decision", "=", "new", "AuthorisationDecision", "(", "true", ")", ";", "for", "(", "AddressTemplate", "ref", ":", "r...
Iterates over all required (and optional) resources, grabs the related constraints and checks if the given privilege for these constraints holds true. @return granted if the privilege holds true for *all* tested resources
[ "Iterates", "over", "all", "required", "(", "and", "optional", ")", "resources", "grabs", "the", "related", "constraints", "and", "checks", "if", "the", "given", "privilege", "for", "these", "constraints", "holds", "true", "." ]
train
https://github.com/hal/core/blob/d6d03f0bb128dc0470f5dc75fdb1ea1014400602/gui/src/main/java/org/jboss/as/console/client/rbac/SecurityContextImpl.java#L79-L108
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WTableRenderer.java
WTableRenderer.paintExpansionDetails
private void paintExpansionDetails(final WTable table, final XmlStringBuilder xml) { xml.appendTagOpen("ui:rowexpansion"); switch (table.getExpandMode()) { case CLIENT: xml.appendAttribute("mode", "client"); break; case LAZY: xml.appendAttribute("mode", "lazy"); break; case DYNAMIC: xm...
java
private void paintExpansionDetails(final WTable table, final XmlStringBuilder xml) { xml.appendTagOpen("ui:rowexpansion"); switch (table.getExpandMode()) { case CLIENT: xml.appendAttribute("mode", "client"); break; case LAZY: xml.appendAttribute("mode", "lazy"); break; case DYNAMIC: xm...
[ "private", "void", "paintExpansionDetails", "(", "final", "WTable", "table", ",", "final", "XmlStringBuilder", "xml", ")", "{", "xml", ".", "appendTagOpen", "(", "\"ui:rowexpansion\"", ")", ";", "switch", "(", "table", ".", "getExpandMode", "(", ")", ")", "{",...
Paint the row selection aspects of the table. @param table the WDataTable being rendered @param xml the string builder in use
[ "Paint", "the", "row", "selection", "aspects", "of", "the", "table", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WTableRenderer.java#L216-L237
lievendoclo/Valkyrie-RCP
valkyrie-rcp-integrations/valkyrie-rcp-jidedocking/src/main/java/org/valkyriercp/application/docking/LayoutManager.java
LayoutManager.savePageLayoutData
public static void savePageLayoutData(DockingManager manager, String pageId, String perspectiveId){ manager.saveLayoutDataAs(MessageFormat.format(PAGE_LAYOUT, pageId, perspectiveId)); }
java
public static void savePageLayoutData(DockingManager manager, String pageId, String perspectiveId){ manager.saveLayoutDataAs(MessageFormat.format(PAGE_LAYOUT, pageId, perspectiveId)); }
[ "public", "static", "void", "savePageLayoutData", "(", "DockingManager", "manager", ",", "String", "pageId", ",", "String", "perspectiveId", ")", "{", "manager", ".", "saveLayoutDataAs", "(", "MessageFormat", ".", "format", "(", "PAGE_LAYOUT", ",", "pageId", ",", ...
Saves the current page layout. @param manager The current docking manager @param pageId The page to saved the layout for
[ "Saves", "the", "current", "page", "layout", "." ]
train
https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-integrations/valkyrie-rcp-jidedocking/src/main/java/org/valkyriercp/application/docking/LayoutManager.java#L76-L79
fommil/matrix-toolkits-java
src/main/java/no/uib/cipr/matrix/QRP.java
QRP.getP
public Matrix getP() { Matrix P = new DenseMatrix(jpvt.length, jpvt.length); for (int i = 0; i < jpvt.length; i++) { P.set(jpvt[i], i, 1); } return P; }
java
public Matrix getP() { Matrix P = new DenseMatrix(jpvt.length, jpvt.length); for (int i = 0; i < jpvt.length; i++) { P.set(jpvt[i], i, 1); } return P; }
[ "public", "Matrix", "getP", "(", ")", "{", "Matrix", "P", "=", "new", "DenseMatrix", "(", "jpvt", ".", "length", ",", "jpvt", ".", "length", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "jpvt", ".", "length", ";", "i", "++", ")", ...
Returns the column pivoting matrix. This function allocates a new Matrix to be returned, a more cheap option is tu use {@link #getPVector()}.
[ "Returns", "the", "column", "pivoting", "matrix", ".", "This", "function", "allocates", "a", "new", "Matrix", "to", "be", "returned", "a", "more", "cheap", "option", "is", "tu", "use", "{" ]
train
https://github.com/fommil/matrix-toolkits-java/blob/6157618bc86bcda3749af2a60bf869d8f3292960/src/main/java/no/uib/cipr/matrix/QRP.java#L225-L231
geomajas/geomajas-project-client-gwt
plugin/editing/editing-javascript-api-gwt/src/main/java/org/geomajas/plugin/editing/jsapi/gwt/client/gfx/style/JsPointSymbolizerShapeAndSize.java
JsPointSymbolizerShapeAndSize.setShape
@ExportInstanceMethod public static void setShape(PointSymbolizerShapeAndSize instance, String shape) { if ("circle".equals(shape)) { instance.setShape(PointSymbolizerShapeAndSize.Shape.CIRCLE); } else if ("square".equals(shape)) { instance.setShape(PointSymbolizerShapeAndSize.Shape.SQUARE); } else { //...
java
@ExportInstanceMethod public static void setShape(PointSymbolizerShapeAndSize instance, String shape) { if ("circle".equals(shape)) { instance.setShape(PointSymbolizerShapeAndSize.Shape.CIRCLE); } else if ("square".equals(shape)) { instance.setShape(PointSymbolizerShapeAndSize.Shape.SQUARE); } else { //...
[ "@", "ExportInstanceMethod", "public", "static", "void", "setShape", "(", "PointSymbolizerShapeAndSize", "instance", ",", "String", "shape", ")", "{", "if", "(", "\"circle\"", ".", "equals", "(", "shape", ")", ")", "{", "instance", ".", "setShape", "(", "Point...
Set the shape type of the point symbolizer. Can be a square (default) or circle. @param shape The shape type as a string.
[ "Set", "the", "shape", "type", "of", "the", "point", "symbolizer", ".", "Can", "be", "a", "square", "(", "default", ")", "or", "circle", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/plugin/editing/editing-javascript-api-gwt/src/main/java/org/geomajas/plugin/editing/jsapi/gwt/client/gfx/style/JsPointSymbolizerShapeAndSize.java#L54-L64
PistoiaHELM/HELM2NotationToolkit
src/main/java/org/helm/notation2/tools/ChangeObjects.java
ChangeObjects.deleteAnnotationFromMonomerNotation
public final static void deleteAnnotationFromMonomerNotation(PolymerNotation polymer, int position) { polymer.getPolymerElements().getListOfElements().get(position).setAnnotation(null); }
java
public final static void deleteAnnotationFromMonomerNotation(PolymerNotation polymer, int position) { polymer.getPolymerElements().getListOfElements().get(position).setAnnotation(null); }
[ "public", "final", "static", "void", "deleteAnnotationFromMonomerNotation", "(", "PolymerNotation", "polymer", ",", "int", "position", ")", "{", "polymer", ".", "getPolymerElements", "(", ")", ".", "getListOfElements", "(", ")", ".", "get", "(", "position", ")", ...
method to delete the annotation of a MonomerNotation @param polymer PolymerNotation @param position position of the MonomerNotation
[ "method", "to", "delete", "the", "annotation", "of", "a", "MonomerNotation" ]
train
https://github.com/PistoiaHELM/HELM2NotationToolkit/blob/ac5bb01fd5b4082134a8ef226bbe2ff0f60fcd38/src/main/java/org/helm/notation2/tools/ChangeObjects.java#L352-L354
Azure/azure-sdk-for-java
sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/BackupLongTermRetentionPoliciesInner.java
BackupLongTermRetentionPoliciesInner.listByDatabaseAsync
public Observable<BackupLongTermRetentionPolicyInner> listByDatabaseAsync(String resourceGroupName, String serverName, String databaseName) { return listByDatabaseWithServiceResponseAsync(resourceGroupName, serverName, databaseName).map(new Func1<ServiceResponse<BackupLongTermRetentionPolicyInner>, BackupLongTe...
java
public Observable<BackupLongTermRetentionPolicyInner> listByDatabaseAsync(String resourceGroupName, String serverName, String databaseName) { return listByDatabaseWithServiceResponseAsync(resourceGroupName, serverName, databaseName).map(new Func1<ServiceResponse<BackupLongTermRetentionPolicyInner>, BackupLongTe...
[ "public", "Observable", "<", "BackupLongTermRetentionPolicyInner", ">", "listByDatabaseAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "databaseName", ")", "{", "return", "listByDatabaseWithServiceResponseAsync", "(", "resourceGroupName...
Gets a database's long term retention policy. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @param databaseName The name of the database. @throws IllegalArgumentE...
[ "Gets", "a", "database", "s", "long", "term", "retention", "policy", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/BackupLongTermRetentionPoliciesInner.java#L395-L402
yavijava/yavijava
src/main/java/com/vmware/vim25/mo/AlarmManager.java
AlarmManager.createAlarm
public Alarm createAlarm(ManagedEntity me, AlarmSpec as) throws InvalidName, DuplicateName, RuntimeFault, RemoteException { if (me == null) { throw new IllegalArgumentException("entity must not be null."); } ManagedObjectReference mor = getVimService().createAlarm(getMOR(), me.ge...
java
public Alarm createAlarm(ManagedEntity me, AlarmSpec as) throws InvalidName, DuplicateName, RuntimeFault, RemoteException { if (me == null) { throw new IllegalArgumentException("entity must not be null."); } ManagedObjectReference mor = getVimService().createAlarm(getMOR(), me.ge...
[ "public", "Alarm", "createAlarm", "(", "ManagedEntity", "me", ",", "AlarmSpec", "as", ")", "throws", "InvalidName", ",", "DuplicateName", ",", "RuntimeFault", ",", "RemoteException", "{", "if", "(", "me", "==", "null", ")", "{", "throw", "new", "IllegalArgumen...
Create an alarm against the given managed entity using the alarm specification @param me The {@link ManagedEntity} to alarm against. @param as The {@link AlarmSpec} used to generate the alarm. @return The new {@link Alarm} created @throws InvalidName if the alarm name exceeds the max length or is empty. @throws Duplic...
[ "Create", "an", "alarm", "against", "the", "given", "managed", "entity", "using", "the", "alarm", "specification" ]
train
https://github.com/yavijava/yavijava/blob/27fd2c5826115782d5eeb934f86e3e39240179cd/src/main/java/com/vmware/vim25/mo/AlarmManager.java#L147-L153
UrielCh/ovh-java-sdk
ovh-java-sdk-ip/src/main/java/net/minidev/ovh/api/ApiOvhIp.java
ApiOvhIp.loadBalancing_serviceName_portsRedirection_GET
public ArrayList<OvhLoadBalancingAdditionalPortEnum> loadBalancing_serviceName_portsRedirection_GET(String serviceName) throws IOException { String qPath = "/ip/loadBalancing/{serviceName}/portsRedirection"; StringBuilder sb = path(qPath, serviceName); String resp = exec(qPath, "GET", sb.toString(), null); retu...
java
public ArrayList<OvhLoadBalancingAdditionalPortEnum> loadBalancing_serviceName_portsRedirection_GET(String serviceName) throws IOException { String qPath = "/ip/loadBalancing/{serviceName}/portsRedirection"; StringBuilder sb = path(qPath, serviceName); String resp = exec(qPath, "GET", sb.toString(), null); retu...
[ "public", "ArrayList", "<", "OvhLoadBalancingAdditionalPortEnum", ">", "loadBalancing_serviceName_portsRedirection_GET", "(", "String", "serviceName", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/ip/loadBalancing/{serviceName}/portsRedirection\"", ";", "StringBu...
Get all srcPort REST: GET /ip/loadBalancing/{serviceName}/portsRedirection @param serviceName [required] The internal name of your IP load balancing
[ "Get", "all", "srcPort" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-ip/src/main/java/net/minidev/ovh/api/ApiOvhIp.java#L1526-L1531
radkovo/CSSBox
src/main/java/org/fit/cssbox/layout/VisualContext.java
VisualContext.fontAvailable
private String fontAvailable(String family, String[] avail) { for (int i = 0; i < avail.length; i++) if (avail[i].equalsIgnoreCase(family)) return avail[i]; return null; }
java
private String fontAvailable(String family, String[] avail) { for (int i = 0; i < avail.length; i++) if (avail[i].equalsIgnoreCase(family)) return avail[i]; return null; }
[ "private", "String", "fontAvailable", "(", "String", "family", ",", "String", "[", "]", "avail", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "avail", ".", "length", ";", "i", "++", ")", "if", "(", "avail", "[", "i", "]", ".", "eq...
Returns true if the font family is available. @return The exact name of the font family or null if it's not available
[ "Returns", "true", "if", "the", "font", "family", "is", "available", "." ]
train
https://github.com/radkovo/CSSBox/blob/38aaf8f22d233d7b4dbc12a56cdbc72b447bc559/src/main/java/org/fit/cssbox/layout/VisualContext.java#L737-L742
json-path/JsonPath
json-path/src/main/java/com/jayway/jsonpath/JsonPath.java
JsonPath.read
@SuppressWarnings({"unchecked"}) public <T> T read(Object jsonObject) { return read(jsonObject, Configuration.defaultConfiguration()); }
java
@SuppressWarnings({"unchecked"}) public <T> T read(Object jsonObject) { return read(jsonObject, Configuration.defaultConfiguration()); }
[ "@", "SuppressWarnings", "(", "{", "\"unchecked\"", "}", ")", "public", "<", "T", ">", "T", "read", "(", "Object", "jsonObject", ")", "{", "return", "read", "(", "jsonObject", ",", "Configuration", ".", "defaultConfiguration", "(", ")", ")", ";", "}" ]
Applies this JsonPath to the provided json document. Note that the document must be identified as either a List or Map by the {@link JsonProvider} @param jsonObject a container Object @param <T> expected return type @return object(s) matched by the given path
[ "Applies", "this", "JsonPath", "to", "the", "provided", "json", "document", ".", "Note", "that", "the", "document", "must", "be", "identified", "as", "either", "a", "List", "or", "Map", "by", "the", "{", "@link", "JsonProvider", "}" ]
train
https://github.com/json-path/JsonPath/blob/5a09489c3252b74bbf81992aadb3073be59c04f9/json-path/src/main/java/com/jayway/jsonpath/JsonPath.java#L151-L154
UrielCh/ovh-java-sdk
ovh-java-sdk-sslGateway/src/main/java/net/minidev/ovh/api/ApiOvhSslGateway.java
ApiOvhSslGateway.serviceName_renewCertificate_POST
public ArrayList<String> serviceName_renewCertificate_POST(String serviceName, String domain) throws IOException { String qPath = "/sslGateway/{serviceName}/renewCertificate"; StringBuilder sb = path(qPath, serviceName); HashMap<String, Object>o = new HashMap<String, Object>(); addBody(o, "domain", domain); S...
java
public ArrayList<String> serviceName_renewCertificate_POST(String serviceName, String domain) throws IOException { String qPath = "/sslGateway/{serviceName}/renewCertificate"; StringBuilder sb = path(qPath, serviceName); HashMap<String, Object>o = new HashMap<String, Object>(); addBody(o, "domain", domain); S...
[ "public", "ArrayList", "<", "String", ">", "serviceName_renewCertificate_POST", "(", "String", "serviceName", ",", "String", "domain", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/sslGateway/{serviceName}/renewCertificate\"", ";", "StringBuilder", "sb", ...
Renew your SSL certificates REST: POST /sslGateway/{serviceName}/renewCertificate @param domain [required] Domain on which you want to renew certificate @param serviceName [required] The internal name of your SSL Gateway API beta
[ "Renew", "your", "SSL", "certificates" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-sslGateway/src/main/java/net/minidev/ovh/api/ApiOvhSslGateway.java#L93-L100
cogroo/cogroo4
lang/pt_br/cogroo-addon/src/org/cogroo/addon/dialogs/reporterror/DialogBuilder.java
DialogBuilder.createUniqueName
public static String createUniqueName(XNameAccess _xElementContainer, String _sElementName) { boolean bElementexists = true; int i = 1; String sIncSuffix = ""; String BaseName = _sElementName; while (bElementexists) { bElementexists = _xElementContainer.hasByName(_sEl...
java
public static String createUniqueName(XNameAccess _xElementContainer, String _sElementName) { boolean bElementexists = true; int i = 1; String sIncSuffix = ""; String BaseName = _sElementName; while (bElementexists) { bElementexists = _xElementContainer.hasByName(_sEl...
[ "public", "static", "String", "createUniqueName", "(", "XNameAccess", "_xElementContainer", ",", "String", "_sElementName", ")", "{", "boolean", "bElementexists", "=", "true", ";", "int", "i", "=", "1", ";", "String", "sIncSuffix", "=", "\"\"", ";", "String", ...
makes a String unique by appending a numerical suffix @param _xElementContainer the com.sun.star.container.XNameAccess container that the new Element is going to be inserted to @param _sElementName the StemName of the Element
[ "makes", "a", "String", "unique", "by", "appending", "a", "numerical", "suffix" ]
train
https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/lang/pt_br/cogroo-addon/src/org/cogroo/addon/dialogs/reporterror/DialogBuilder.java#L579-L592
google/closure-compiler
src/com/google/javascript/jscomp/CheckJSDoc.java
CheckJSDoc.validateDeprecatedJsDoc
private void validateDeprecatedJsDoc(Node n, JSDocInfo info) { if (info != null && info.isExpose()) { report(n, ANNOTATION_DEPRECATED, "@expose", "Use @nocollapse or @export instead."); } }
java
private void validateDeprecatedJsDoc(Node n, JSDocInfo info) { if (info != null && info.isExpose()) { report(n, ANNOTATION_DEPRECATED, "@expose", "Use @nocollapse or @export instead."); } }
[ "private", "void", "validateDeprecatedJsDoc", "(", "Node", "n", ",", "JSDocInfo", "info", ")", "{", "if", "(", "info", "!=", "null", "&&", "info", ".", "isExpose", "(", ")", ")", "{", "report", "(", "n", ",", "ANNOTATION_DEPRECATED", ",", "\"@expose\"", ...
Checks that deprecated annotations such as @expose are not present
[ "Checks", "that", "deprecated", "annotations", "such", "as" ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/CheckJSDoc.java#L387-L392
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-nlp-parent/deeplearning4j-nlp/src/main/java/org/deeplearning4j/models/paragraphvectors/ParagraphVectors.java
ParagraphVectors.similarityToLabel
public double similarityToLabel(List<VocabWord> document, String label) { if (document.isEmpty()) throw new IllegalStateException("Document has no words inside"); /* INDArray arr = Nd4j.create(document.size(), this.layerSize); for (int i = 0; i < document.size(); i++) { ...
java
public double similarityToLabel(List<VocabWord> document, String label) { if (document.isEmpty()) throw new IllegalStateException("Document has no words inside"); /* INDArray arr = Nd4j.create(document.size(), this.layerSize); for (int i = 0; i < document.size(); i++) { ...
[ "public", "double", "similarityToLabel", "(", "List", "<", "VocabWord", ">", "document", ",", "String", "label", ")", "{", "if", "(", "document", ".", "isEmpty", "(", ")", ")", "throw", "new", "IllegalStateException", "(", "\"Document has no words inside\"", ")"...
This method returns similarity of the document to specific label, based on mean value @param document @param label @return
[ "This", "method", "returns", "similarity", "of", "the", "document", "to", "specific", "label", "based", "on", "mean", "value" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-nlp-parent/deeplearning4j-nlp/src/main/java/org/deeplearning4j/models/paragraphvectors/ParagraphVectors.java#L695-L710
Ordinastie/MalisisCore
src/main/java/net/malisis/core/renderer/animation/transformation/ParallelTransformation.java
ParallelTransformation.doTransform
@SuppressWarnings({ "unchecked", "rawtypes" }) @Override protected void doTransform(ITransformable transformable, float comp) { if (listTransformations.size() == 0) return; for (Transformation transformation : listTransformations) transformation.transform(transformable, elapsedTimeCurrentLoop); }
java
@SuppressWarnings({ "unchecked", "rawtypes" }) @Override protected void doTransform(ITransformable transformable, float comp) { if (listTransformations.size() == 0) return; for (Transformation transformation : listTransformations) transformation.transform(transformable, elapsedTimeCurrentLoop); }
[ "@", "SuppressWarnings", "(", "{", "\"unchecked\"", ",", "\"rawtypes\"", "}", ")", "@", "Override", "protected", "void", "doTransform", "(", "ITransformable", "transformable", ",", "float", "comp", ")", "{", "if", "(", "listTransformations", ".", "size", "(", ...
Calculates the tranformation. @param transformable the transformable @param comp the comp
[ "Calculates", "the", "tranformation", "." ]
train
https://github.com/Ordinastie/MalisisCore/blob/4f8e1fa462d5c372fc23414482ba9f429881cc54/src/main/java/net/malisis/core/renderer/animation/transformation/ParallelTransformation.java#L82-L91
Microsoft/malmo
Minecraft/src/main/java/com/microsoft/Malmo/MissionHandlers/RewardForSendingMatchingChatMessageImplementation.java
RewardForSendingMatchingChatMessageImplementation.prepare
@Override public void prepare(MissionInit missionInit) { super.prepare(missionInit); // We need to see chat commands as they come in. // Following the example of RewardForSendingCommandImplementation. MissionBehaviour mb = parentBehaviour(); ICommandHandler oldch = mb.command...
java
@Override public void prepare(MissionInit missionInit) { super.prepare(missionInit); // We need to see chat commands as they come in. // Following the example of RewardForSendingCommandImplementation. MissionBehaviour mb = parentBehaviour(); ICommandHandler oldch = mb.command...
[ "@", "Override", "public", "void", "prepare", "(", "MissionInit", "missionInit", ")", "{", "super", ".", "prepare", "(", "missionInit", ")", ";", "// We need to see chat commands as they come in.", "// Following the example of RewardForSendingCommandImplementation.", "MissionBe...
Called once before the mission starts - use for any necessary initialisation. @param missionInit
[ "Called", "once", "before", "the", "mission", "starts", "-", "use", "for", "any", "necessary", "initialisation", "." ]
train
https://github.com/Microsoft/malmo/blob/4139cd6f3e52f6e893a931a1d4b70d35f8e70e5a/Minecraft/src/main/java/com/microsoft/Malmo/MissionHandlers/RewardForSendingMatchingChatMessageImplementation.java#L86-L117
alkacon/opencms-core
src/org/opencms/ui/CmsVaadinUtils.java
CmsVaadinUtils.readAndLocalizeDesign
protected static void readAndLocalizeDesign( Component component, InputStream designStream, CmsMessages messages, Map<String, String> macros) { try { byte[] designBytes = CmsFileUtil.readFully(designStream, true); final String encoding = "UTF-8"; ...
java
protected static void readAndLocalizeDesign( Component component, InputStream designStream, CmsMessages messages, Map<String, String> macros) { try { byte[] designBytes = CmsFileUtil.readFully(designStream, true); final String encoding = "UTF-8"; ...
[ "protected", "static", "void", "readAndLocalizeDesign", "(", "Component", "component", ",", "InputStream", "designStream", ",", "CmsMessages", "messages", ",", "Map", "<", "String", ",", "String", ">", "macros", ")", "{", "try", "{", "byte", "[", "]", "designB...
Reads the given design and resolves the given macros and localizations.<p> @param component the component whose design to read @param designStream stream to read the design from @param messages the message bundle to use for localization in the design (may be null) @param macros other macros to substitute in the macro ...
[ "Reads", "the", "given", "design", "and", "resolves", "the", "given", "macros", "and", "localizations", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/CmsVaadinUtils.java#L1295-L1336
lessthanoptimal/BoofCV
main/boofcv-sfm/src/main/java/boofcv/alg/sfm/d3/VisOdomQuadPnP.java
VisOdomQuadPnP.associateL2R
private void associateL2R( T left , T right ) { // make the previous new observations into the new old ones ImageInfo<TD> tmp = featsLeft1; featsLeft1 = featsLeft0; featsLeft0 = tmp; tmp = featsRight1; featsRight1 = featsRight0; featsRight0 = tmp; // detect and associate features in the two images featsL...
java
private void associateL2R( T left , T right ) { // make the previous new observations into the new old ones ImageInfo<TD> tmp = featsLeft1; featsLeft1 = featsLeft0; featsLeft0 = tmp; tmp = featsRight1; featsRight1 = featsRight0; featsRight0 = tmp; // detect and associate features in the two images featsL...
[ "private", "void", "associateL2R", "(", "T", "left", ",", "T", "right", ")", "{", "// make the previous new observations into the new old ones", "ImageInfo", "<", "TD", ">", "tmp", "=", "featsLeft1", ";", "featsLeft1", "=", "featsLeft0", ";", "featsLeft0", "=", "t...
Associates image features from the left and right camera together while applying epipolar constraints. @param left Image from left camera @param right Image from right camera
[ "Associates", "image", "features", "from", "the", "left", "and", "right", "camera", "together", "while", "applying", "epipolar", "constraints", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-sfm/src/main/java/boofcv/alg/sfm/d3/VisOdomQuadPnP.java#L203-L239
apptik/jus
rx-jus/src/main/java/io/apptik/comm/jus/rx/queue/RxRequestQueue.java
RxRequestQueue.resultObservable
public static Observable<ResultEvent<?>> resultObservable( RequestQueue queue, RequestQueue.RequestFilter filter) { return Observable.create(new QRequestResponseOnSubscribe(queue, filter)); }
java
public static Observable<ResultEvent<?>> resultObservable( RequestQueue queue, RequestQueue.RequestFilter filter) { return Observable.create(new QRequestResponseOnSubscribe(queue, filter)); }
[ "public", "static", "Observable", "<", "ResultEvent", "<", "?", ">", ">", "resultObservable", "(", "RequestQueue", "queue", ",", "RequestQueue", ".", "RequestFilter", "filter", ")", "{", "return", "Observable", ".", "create", "(", "new", "QRequestResponseOnSubscri...
Returns {@link Observable} of the successful results coming as {@link ResultEvent} @param queue the {@link RequestQueue} to listen to @param filter the {@link io.apptik.comm.jus.RequestQueue.RequestFilter} which will filter the requests to hook to. Set null for no filtering. @return {@link Observable} of results
[ "Returns", "{", "@link", "Observable", "}", "of", "the", "successful", "results", "coming", "as", "{", "@link", "ResultEvent", "}" ]
train
https://github.com/apptik/jus/blob/8a37a21b41f897d68eaeaab07368ec22a1e5a60e/rx-jus/src/main/java/io/apptik/comm/jus/rx/queue/RxRequestQueue.java#L63-L66
mikepenz/FastAdapter
library-extensions/src/main/java/com/mikepenz/fastadapter_extensions/UndoHelper.java
UndoHelper.withSnackBar
public void withSnackBar(@NonNull Snackbar snackBar, String actionText) { mSnackBar = snackBar; mSnackbarActionText = actionText; mSnackBar.addCallback(mSnackbarCallback) .setAction(actionText, new View.OnClickListener() { @Override public void onClick(Vi...
java
public void withSnackBar(@NonNull Snackbar snackBar, String actionText) { mSnackBar = snackBar; mSnackbarActionText = actionText; mSnackBar.addCallback(mSnackbarCallback) .setAction(actionText, new View.OnClickListener() { @Override public void onClick(Vi...
[ "public", "void", "withSnackBar", "(", "@", "NonNull", "Snackbar", "snackBar", ",", "String", "actionText", ")", "{", "mSnackBar", "=", "snackBar", ";", "mSnackbarActionText", "=", "actionText", ";", "mSnackBar", ".", "addCallback", "(", "mSnackbarCallback", ")", ...
an optional method to add a {@link Snackbar} of your own with custom styling. note that using this method will override your custom action @param snackBar your own Snackbar @param actionText the text to show for the Undo Action
[ "an", "optional", "method", "to", "add", "a", "{", "@link", "Snackbar", "}", "of", "your", "own", "with", "custom", "styling", ".", "note", "that", "using", "this", "method", "will", "override", "your", "custom", "action" ]
train
https://github.com/mikepenz/FastAdapter/blob/3b2412abe001ba58422e0125846b704d4dba4ae9/library-extensions/src/main/java/com/mikepenz/fastadapter_extensions/UndoHelper.java#L74-L85
pgjdbc/pgjdbc
pgjdbc/src/main/java/org/postgresql/core/Utils.java
Utils.doAppendEscapedIdentifier
private static void doAppendEscapedIdentifier(Appendable sbuf, String value) throws SQLException { try { sbuf.append('"'); for (int i = 0; i < value.length(); ++i) { char ch = value.charAt(i); if (ch == '\0') { throw new PSQLException(GT.tr("Zero bytes may not occur in identif...
java
private static void doAppendEscapedIdentifier(Appendable sbuf, String value) throws SQLException { try { sbuf.append('"'); for (int i = 0; i < value.length(); ++i) { char ch = value.charAt(i); if (ch == '\0') { throw new PSQLException(GT.tr("Zero bytes may not occur in identif...
[ "private", "static", "void", "doAppendEscapedIdentifier", "(", "Appendable", "sbuf", ",", "String", "value", ")", "throws", "SQLException", "{", "try", "{", "sbuf", ".", "append", "(", "'", "'", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<"...
Common part for appendEscapedIdentifier. @param sbuf Either StringBuffer or StringBuilder as we do not expect any IOException to be thrown. @param value value to append
[ "Common", "part", "for", "appendEscapedIdentifier", "." ]
train
https://github.com/pgjdbc/pgjdbc/blob/95ba7b261e39754674c5817695ae5ebf9a341fae/pgjdbc/src/main/java/org/postgresql/core/Utils.java#L152-L173
keenon/loglinear
src/main/java/com/github/keenon/loglinear/model/GraphicalModel.java
GraphicalModel.addStaticBinaryFactor
public Factor addStaticBinaryFactor(int a, int cardA, int b, int cardB, BiFunction<Integer, Integer, Double> value) { return addStaticFactor(new int[]{a, b}, new int[]{cardA, cardB}, assignment -> value.apply(assignment[0], assignment[1])); }
java
public Factor addStaticBinaryFactor(int a, int cardA, int b, int cardB, BiFunction<Integer, Integer, Double> value) { return addStaticFactor(new int[]{a, b}, new int[]{cardA, cardB}, assignment -> value.apply(assignment[0], assignment[1])); }
[ "public", "Factor", "addStaticBinaryFactor", "(", "int", "a", ",", "int", "cardA", ",", "int", "b", ",", "int", "cardB", ",", "BiFunction", "<", "Integer", ",", "Integer", ",", "Double", ">", "value", ")", "{", "return", "addStaticFactor", "(", "new", "i...
Add a binary factor, where we just want to hard-code the value of the factor. @param a The index of the first variable. @param cardA The cardinality (i.e, dimension) of the first factor @param b The index of the second variable @param cardB The cardinality (i.e, dimension) of the second factor @param value A mapping f...
[ "Add", "a", "binary", "factor", "where", "we", "just", "want", "to", "hard", "-", "code", "the", "value", "of", "the", "factor", "." ]
train
https://github.com/keenon/loglinear/blob/fa0c370ab6782015412f676ef2ab11c97be58e29/src/main/java/com/github/keenon/loglinear/model/GraphicalModel.java#L489-L491
avianey/facebook-api-android-maven
facebook/src/main/java/com/facebook/TokenCachingStrategy.java
TokenCachingStrategy.putPermissions
public static void putPermissions(Bundle bundle, List<String> value) { Validate.notNull(bundle, "bundle"); Validate.notNull(value, "value"); ArrayList<String> arrayList; if (value instanceof ArrayList<?>) { arrayList = (ArrayList<String>) value; } else { ...
java
public static void putPermissions(Bundle bundle, List<String> value) { Validate.notNull(bundle, "bundle"); Validate.notNull(value, "value"); ArrayList<String> arrayList; if (value instanceof ArrayList<?>) { arrayList = (ArrayList<String>) value; } else { ...
[ "public", "static", "void", "putPermissions", "(", "Bundle", "bundle", ",", "List", "<", "String", ">", "value", ")", "{", "Validate", ".", "notNull", "(", "bundle", ",", "\"bundle\"", ")", ";", "Validate", ".", "notNull", "(", "value", ",", "\"value\"", ...
Puts the list of permissions into a Bundle. @param bundle A Bundle in which the list of permissions should be stored. @param value The List&lt;String&gt; representing the list of permissions, or null. @throws NullPointerException if the passed in Bundle or permissions list are null
[ "Puts", "the", "list", "of", "permissions", "into", "a", "Bundle", "." ]
train
https://github.com/avianey/facebook-api-android-maven/blob/ae6c7aa7ae45739ee19f18c1983e05f7e35b9ede/facebook/src/main/java/com/facebook/TokenCachingStrategy.java#L262-L273
threerings/nenya
tools/src/main/java/com/threerings/cast/tools/xml/ActionRuleSet.java
ActionRuleSet.addRuleInstances
@Override public void addRuleInstances (Digester digester) { // this creates the appropriate instance when we encounter a // <action> tag digester.addObjectCreate(_prefix + ACTION_PATH, ActionSequence.class.getName()); // grab the name attribute ...
java
@Override public void addRuleInstances (Digester digester) { // this creates the appropriate instance when we encounter a // <action> tag digester.addObjectCreate(_prefix + ACTION_PATH, ActionSequence.class.getName()); // grab the name attribute ...
[ "@", "Override", "public", "void", "addRuleInstances", "(", "Digester", "digester", ")", "{", "// this creates the appropriate instance when we encounter a", "// <action> tag", "digester", ".", "addObjectCreate", "(", "_prefix", "+", "ACTION_PATH", ",", "ActionSequence", "....
Adds the necessary rules to the digester to parse our actions.
[ "Adds", "the", "necessary", "rules", "to", "the", "digester", "to", "parse", "our", "actions", "." ]
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/tools/src/main/java/com/threerings/cast/tools/xml/ActionRuleSet.java#L70-L121
joniles/mpxj
src/main/java/net/sf/mpxj/mpp/ResourceAssignmentFactory.java
ResourceAssignmentFactory.processHyperlinkData
private void processHyperlinkData(ResourceAssignment assignment, byte[] data) { if (data != null) { int offset = 12; offset += 12; String hyperlink = MPPUtility.getUnicodeString(data, offset); offset += ((hyperlink.length() + 1) * 2); offset += 12; ...
java
private void processHyperlinkData(ResourceAssignment assignment, byte[] data) { if (data != null) { int offset = 12; offset += 12; String hyperlink = MPPUtility.getUnicodeString(data, offset); offset += ((hyperlink.length() + 1) * 2); offset += 12; ...
[ "private", "void", "processHyperlinkData", "(", "ResourceAssignment", "assignment", ",", "byte", "[", "]", "data", ")", "{", "if", "(", "data", "!=", "null", ")", "{", "int", "offset", "=", "12", ";", "offset", "+=", "12", ";", "String", "hyperlink", "="...
Extract assignment hyperlink data. @param assignment assignment instance @param data hyperlink data
[ "Extract", "assignment", "hyperlink", "data", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/ResourceAssignmentFactory.java#L277-L303
FedericoPecora/meta-csp-framework
src/main/java/org/metacsp/multi/spatioTemporal/paths/TrajectoryEnvelope.java
TrajectoryEnvelope.makeFootprint
public Geometry makeFootprint(double x, double y, double theta) { AffineTransformation at = new AffineTransformation(); at.rotate(theta); at.translate(x,y); Geometry rect = at.transform(footprint); return rect; }
java
public Geometry makeFootprint(double x, double y, double theta) { AffineTransformation at = new AffineTransformation(); at.rotate(theta); at.translate(x,y); Geometry rect = at.transform(footprint); return rect; }
[ "public", "Geometry", "makeFootprint", "(", "double", "x", ",", "double", "y", ",", "double", "theta", ")", "{", "AffineTransformation", "at", "=", "new", "AffineTransformation", "(", ")", ";", "at", ".", "rotate", "(", "theta", ")", ";", "at", ".", "tra...
Returns a {@link Geometry} representing the footprint of the robot in a given pose. @param x The x coordinate of the pose used to create the footprint. @param y The y coordinate of the pose used to create the footprint. @param theta The orientation of the pose used to create the footprint. @return A {@link Geometry} re...
[ "Returns", "a", "{" ]
train
https://github.com/FedericoPecora/meta-csp-framework/blob/42aaef2e2b76d0f738427f0dd9653c4f62b40517/src/main/java/org/metacsp/multi/spatioTemporal/paths/TrajectoryEnvelope.java#L631-L637
spotify/helios
helios-services/src/main/java/com/spotify/helios/master/ZooKeeperMasterModel.java
ZooKeeperMasterModel.getDeploymentGroups
@Override public Map<String, DeploymentGroup> getDeploymentGroups() { log.debug("getting deployment groups"); final String folder = Paths.configDeploymentGroups(); final ZooKeeperClient client = provider.get("getDeploymentGroups"); try { final List<String> names; try { names = clie...
java
@Override public Map<String, DeploymentGroup> getDeploymentGroups() { log.debug("getting deployment groups"); final String folder = Paths.configDeploymentGroups(); final ZooKeeperClient client = provider.get("getDeploymentGroups"); try { final List<String> names; try { names = clie...
[ "@", "Override", "public", "Map", "<", "String", ",", "DeploymentGroup", ">", "getDeploymentGroups", "(", ")", "{", "log", ".", "debug", "(", "\"getting deployment groups\"", ")", ";", "final", "String", "folder", "=", "Paths", ".", "configDeploymentGroups", "("...
Returns a {@link Map} of deployment group name to {@link DeploymentGroup} objects for all of the deployment groups known.
[ "Returns", "a", "{" ]
train
https://github.com/spotify/helios/blob/c9000bc1d6908651570be8b057d4981bba4df5b4/helios-services/src/main/java/com/spotify/helios/master/ZooKeeperMasterModel.java#L1249-L1277
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/internal/config/MergePolicyValidator.java
MergePolicyValidator.checkMapMergePolicy
static void checkMapMergePolicy(MapConfig mapConfig, MergePolicyProvider mergePolicyProvider) { String mergePolicyClassName = mapConfig.getMergePolicyConfig().getPolicy(); Object mergePolicyInstance = getMergePolicyInstance(mergePolicyProvider, mergePolicyClassName); List<Class> requiredMergeTyp...
java
static void checkMapMergePolicy(MapConfig mapConfig, MergePolicyProvider mergePolicyProvider) { String mergePolicyClassName = mapConfig.getMergePolicyConfig().getPolicy(); Object mergePolicyInstance = getMergePolicyInstance(mergePolicyProvider, mergePolicyClassName); List<Class> requiredMergeTyp...
[ "static", "void", "checkMapMergePolicy", "(", "MapConfig", "mapConfig", ",", "MergePolicyProvider", "mergePolicyProvider", ")", "{", "String", "mergePolicyClassName", "=", "mapConfig", ".", "getMergePolicyConfig", "(", ")", ".", "getPolicy", "(", ")", ";", "Object", ...
Checks the merge policy configuration of the given {@link MapConfig}. @param mapConfig the {@link MapConfig} @param mergePolicyProvider the {@link MergePolicyProvider} to resolve merge policy classes
[ "Checks", "the", "merge", "policy", "configuration", "of", "the", "given", "{", "@link", "MapConfig", "}", "." ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/config/MergePolicyValidator.java#L140-L147
xiancloud/xian
xian-core/src/main/java/info/xiancloud/core/support/cache/api/CacheObjectUtil.java
CacheObjectUtil.luaScript
public static Object luaScript(String scripts, int keyCount, List<String> params) { return luaScript(CacheService.CACHE_CONFIG_BEAN, scripts, keyCount, params); }
java
public static Object luaScript(String scripts, int keyCount, List<String> params) { return luaScript(CacheService.CACHE_CONFIG_BEAN, scripts, keyCount, params); }
[ "public", "static", "Object", "luaScript", "(", "String", "scripts", ",", "int", "keyCount", ",", "List", "<", "String", ">", "params", ")", "{", "return", "luaScript", "(", "CacheService", ".", "CACHE_CONFIG_BEAN", ",", "scripts", ",", "keyCount", ",", "par...
execute the lua script @param scripts the script to be executed. @param keyCount the key count @param params the parameters @return the result object
[ "execute", "the", "lua", "script" ]
train
https://github.com/xiancloud/xian/blob/1948e088545553d2745b2c86d8b5a64988bb850e/xian-core/src/main/java/info/xiancloud/core/support/cache/api/CacheObjectUtil.java#L35-L37
fhoeben/hsac-fitnesse-fixtures
src/main/java/nl/hsac/fitnesse/fixture/slim/web/SeleniumDriverSetup.java
SeleniumDriverSetup.setPropertyValue
public boolean setPropertyValue(String propName, String value) { if (OVERRIDE_ACTIVE) { return true; } System.setProperty(propName, value); return true; }
java
public boolean setPropertyValue(String propName, String value) { if (OVERRIDE_ACTIVE) { return true; } System.setProperty(propName, value); return true; }
[ "public", "boolean", "setPropertyValue", "(", "String", "propName", ",", "String", "value", ")", "{", "if", "(", "OVERRIDE_ACTIVE", ")", "{", "return", "true", ";", "}", "System", ".", "setProperty", "(", "propName", ",", "value", ")", ";", "return", "true...
Sets system property (needed by the WebDriver to be set up). @param propName name of property to set. @param value value to set. @return true.
[ "Sets", "system", "property", "(", "needed", "by", "the", "WebDriver", "to", "be", "set", "up", ")", "." ]
train
https://github.com/fhoeben/hsac-fitnesse-fixtures/blob/4e9018d7386a9aa65bfcbf07eb28ae064edd1732/src/main/java/nl/hsac/fitnesse/fixture/slim/web/SeleniumDriverSetup.java#L45-L52
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPDefinitionSpecificationOptionValuePersistenceImpl.java
CPDefinitionSpecificationOptionValuePersistenceImpl.findByCPDefinitionId
@Override public List<CPDefinitionSpecificationOptionValue> findByCPDefinitionId( long CPDefinitionId, int start, int end) { return findByCPDefinitionId(CPDefinitionId, start, end, null); }
java
@Override public List<CPDefinitionSpecificationOptionValue> findByCPDefinitionId( long CPDefinitionId, int start, int end) { return findByCPDefinitionId(CPDefinitionId, start, end, null); }
[ "@", "Override", "public", "List", "<", "CPDefinitionSpecificationOptionValue", ">", "findByCPDefinitionId", "(", "long", "CPDefinitionId", ",", "int", "start", ",", "int", "end", ")", "{", "return", "findByCPDefinitionId", "(", "CPDefinitionId", ",", "start", ",", ...
Returns a range of all the cp definition specification option values where CPDefinitionId = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers t...
[ "Returns", "a", "range", "of", "all", "the", "cp", "definition", "specification", "option", "values", "where", "CPDefinitionId", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPDefinitionSpecificationOptionValuePersistenceImpl.java#L2092-L2096
ReactiveX/RxJavaAsyncUtil
src/main/java/rx/util/async/Async.java
Async.toAsyncThrowing
public static <T1, T2, T3, T4, T5, T6, T7, T8, R> Func8<T1, T2, T3, T4, T5, T6, T7, T8, Observable<R>> toAsyncThrowing(final ThrowingFunc8<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? super T7, ? super T8, ? extends R> func, final Scheduler scheduler) { return new Func8<T1, T2, T3, ...
java
public static <T1, T2, T3, T4, T5, T6, T7, T8, R> Func8<T1, T2, T3, T4, T5, T6, T7, T8, Observable<R>> toAsyncThrowing(final ThrowingFunc8<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? super T7, ? super T8, ? extends R> func, final Scheduler scheduler) { return new Func8<T1, T2, T3, ...
[ "public", "static", "<", "T1", ",", "T2", ",", "T3", ",", "T4", ",", "T5", ",", "T6", ",", "T7", ",", "T8", ",", "R", ">", "Func8", "<", "T1", ",", "T2", ",", "T3", ",", "T4", ",", "T5", ",", "T6", ",", "T7", ",", "T8", ",", "Observable",...
Convert a synchronous function call into an asynchronous function call through an Observable. <p> <img width="640" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/toAsync.s.png" alt=""> @param <T1> the first parameter type @param <T2> the second parameter type @param <T3> the third parameter type...
[ "Convert", "a", "synchronous", "function", "call", "into", "an", "asynchronous", "function", "call", "through", "an", "Observable", ".", "<p", ">", "<img", "width", "=", "640", "src", "=", "https", ":", "//", "raw", ".", "github", ".", "com", "/", "wiki"...
train
https://github.com/ReactiveX/RxJavaAsyncUtil/blob/6294e1da30e639df79f76399906229314c14e74d/src/main/java/rx/util/async/Async.java#L1505-L1512
Azure/azure-sdk-for-java
signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRsInner.java
SignalRsInner.updateAsync
public Observable<SignalRResourceInner> updateAsync(String resourceGroupName, String resourceName) { return updateWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1<ServiceResponse<SignalRResourceInner>, SignalRResourceInner>() { @Override public SignalRResourceInner...
java
public Observable<SignalRResourceInner> updateAsync(String resourceGroupName, String resourceName) { return updateWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1<ServiceResponse<SignalRResourceInner>, SignalRResourceInner>() { @Override public SignalRResourceInner...
[ "public", "Observable", "<", "SignalRResourceInner", ">", "updateAsync", "(", "String", "resourceGroupName", ",", "String", "resourceName", ")", "{", "return", "updateWithServiceResponseAsync", "(", "resourceGroupName", ",", "resourceName", ")", ".", "map", "(", "new"...
Operation to update an exiting SignalR service. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param resourceName The name of the SignalR resource. @throws IllegalArgumentException thrown if parameters fa...
[ "Operation", "to", "update", "an", "exiting", "SignalR", "service", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRsInner.java#L1469-L1476
lievendoclo/Valkyrie-RCP
valkyrie-rcp-core/src/main/java/org/valkyriercp/application/session/ApplicationSession.java
ApplicationSession.getAttribute
public Object getAttribute(String key, Object defaultValue) { Object attributeValue = getUserAttribute(key, null); if (attributeValue != null) return attributeValue; attributeValue = getSessionAttribute(key, null); if (attributeValue != null) return attributeV...
java
public Object getAttribute(String key, Object defaultValue) { Object attributeValue = getUserAttribute(key, null); if (attributeValue != null) return attributeValue; attributeValue = getSessionAttribute(key, null); if (attributeValue != null) return attributeV...
[ "public", "Object", "getAttribute", "(", "String", "key", ",", "Object", "defaultValue", ")", "{", "Object", "attributeValue", "=", "getUserAttribute", "(", "key", ",", "null", ")", ";", "if", "(", "attributeValue", "!=", "null", ")", "return", "attributeValue...
Get a value from the user OR session attributes map. @param key name of the attribute @param defaultValue a default value to return if no value is found. @return the attribute value
[ "Get", "a", "value", "from", "the", "user", "OR", "session", "attributes", "map", "." ]
train
https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/application/session/ApplicationSession.java#L329-L338
alkacon/opencms-core
src/org/opencms/ui/apps/CmsFileExplorer.java
CmsFileExplorer.createSiteSelect
private ComboBox createSiteSelect(CmsObject cms) { final IndexedContainer availableSites = CmsVaadinUtils.getAvailableSitesContainer(cms, SITE_CAPTION); ComboBox combo = new ComboBox(null, availableSites); combo.setTextInputAllowed(true); combo.setNullSelectionAllowed(false); co...
java
private ComboBox createSiteSelect(CmsObject cms) { final IndexedContainer availableSites = CmsVaadinUtils.getAvailableSitesContainer(cms, SITE_CAPTION); ComboBox combo = new ComboBox(null, availableSites); combo.setTextInputAllowed(true); combo.setNullSelectionAllowed(false); co...
[ "private", "ComboBox", "createSiteSelect", "(", "CmsObject", "cms", ")", "{", "final", "IndexedContainer", "availableSites", "=", "CmsVaadinUtils", ".", "getAvailableSitesContainer", "(", "cms", ",", "SITE_CAPTION", ")", ";", "ComboBox", "combo", "=", "new", "ComboB...
Creates the site selector combo box.<p> @param cms the current cms context @return the combo box
[ "Creates", "the", "site", "selector", "combo", "box", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/CmsFileExplorer.java#L1730-L1760
Javen205/IJPay
src/main/java/com/jpay/unionpay/AcpService.java
AcpService.createAutoFormHtml
public static String createAutoFormHtml(String reqUrl, Map<String, String> hiddens,String encoding) { StringBuffer sf = new StringBuffer(); sf.append("<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset="+encoding+"\"/></head><body>"); sf.append("<form id = \"pay_form\" action=\"" + reqUrl ...
java
public static String createAutoFormHtml(String reqUrl, Map<String, String> hiddens,String encoding) { StringBuffer sf = new StringBuffer(); sf.append("<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset="+encoding+"\"/></head><body>"); sf.append("<form id = \"pay_form\" action=\"" + reqUrl ...
[ "public", "static", "String", "createAutoFormHtml", "(", "String", "reqUrl", ",", "Map", "<", "String", ",", "String", ">", "hiddens", ",", "String", "encoding", ")", "{", "StringBuffer", "sf", "=", "new", "StringBuffer", "(", ")", ";", "sf", ".", "append"...
功能:前台交易构造HTTP POST自动提交表单<br> @param action 表单提交地址<br> @param hiddens 以MAP形式存储的表单键值<br> @param encoding 上送请求报文域encoding字段的值<br> @return 构造好的HTTP POST交易表单<br>
[ "功能:前台交易构造HTTP", "POST自动提交表单<br", ">" ]
train
https://github.com/Javen205/IJPay/blob/78da6be4b70675abc6a41df74817532fa257ef29/src/main/java/com/jpay/unionpay/AcpService.java#L88-L111
languagetool-org/languagetool
languagetool-core/src/main/java/org/languagetool/rules/ngrams/GoogleToken.java
GoogleToken.getGoogleTokens
static List<GoogleToken> getGoogleTokens(AnalyzedSentence sentence, boolean addStartToken, Tokenizer wordTokenizer) { List<GoogleToken> result = new ArrayList<>(); if (addStartToken) { result.add(new GoogleToken(LanguageModel.GOOGLE_SENTENCE_START, 0, 0)); } List<String> tokens = wordTokenizer.tok...
java
static List<GoogleToken> getGoogleTokens(AnalyzedSentence sentence, boolean addStartToken, Tokenizer wordTokenizer) { List<GoogleToken> result = new ArrayList<>(); if (addStartToken) { result.add(new GoogleToken(LanguageModel.GOOGLE_SENTENCE_START, 0, 0)); } List<String> tokens = wordTokenizer.tok...
[ "static", "List", "<", "GoogleToken", ">", "getGoogleTokens", "(", "AnalyzedSentence", "sentence", ",", "boolean", "addStartToken", ",", "Tokenizer", "wordTokenizer", ")", "{", "List", "<", "GoogleToken", ">", "result", "=", "new", "ArrayList", "<>", "(", ")", ...
so we use getTokenizer() and simple ignore the LT tokens. Also adds POS tags from original sentence if trivially possible.
[ "so", "we", "use", "getTokenizer", "()", "and", "simple", "ignore", "the", "LT", "tokens", ".", "Also", "adds", "POS", "tags", "from", "original", "sentence", "if", "trivially", "possible", "." ]
train
https://github.com/languagetool-org/languagetool/blob/b7a3d63883d242fb2525877c6382681c57a0a142/languagetool-core/src/main/java/org/languagetool/rules/ngrams/GoogleToken.java#L86-L103
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/factory/util/PropertiesConfigHelper.java
PropertiesConfigHelper.getCustomBundleProperty
public String getCustomBundleProperty(String bundleName, String key, String defaultValue) { return props.getProperty(prefix + PropertiesBundleConstant.BUNDLE_FACTORY_CUSTOM_PROPERTY + bundleName + key, defaultValue); }
java
public String getCustomBundleProperty(String bundleName, String key, String defaultValue) { return props.getProperty(prefix + PropertiesBundleConstant.BUNDLE_FACTORY_CUSTOM_PROPERTY + bundleName + key, defaultValue); }
[ "public", "String", "getCustomBundleProperty", "(", "String", "bundleName", ",", "String", "key", ",", "String", "defaultValue", ")", "{", "return", "props", ".", "getProperty", "(", "prefix", "+", "PropertiesBundleConstant", ".", "BUNDLE_FACTORY_CUSTOM_PROPERTY", "+"...
Returns the value of the custom bundle property, or the default value if no value is defined @param bundleName the bundle name @param key the key of the property @param defaultValue the default value @return the value of the custom bundle property, or the default value if no value is defined
[ "Returns", "the", "value", "of", "the", "custom", "bundle", "property", "or", "the", "default", "value", "if", "no", "value", "is", "defined" ]
train
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/factory/util/PropertiesConfigHelper.java#L138-L141
xm-online/xm-commons
xm-commons-security/src/main/java/com/icthh/xm/commons/security/oauth2/OAuth2JwtAccessTokenConverter.java
OAuth2JwtAccessTokenConverter.extractAuthentication
@Override public OAuth2Authentication extractAuthentication(Map<String, ?> claims) { OAuth2Authentication authentication = super.extractAuthentication(claims); authentication.setDetails(claims); return authentication; }
java
@Override public OAuth2Authentication extractAuthentication(Map<String, ?> claims) { OAuth2Authentication authentication = super.extractAuthentication(claims); authentication.setDetails(claims); return authentication; }
[ "@", "Override", "public", "OAuth2Authentication", "extractAuthentication", "(", "Map", "<", "String", ",", "?", ">", "claims", ")", "{", "OAuth2Authentication", "authentication", "=", "super", ".", "extractAuthentication", "(", "claims", ")", ";", "authentication",...
Extract JWT claims and set it to OAuth2Authentication decoded details. Here is how to get details: <pre> <code> SecurityContext securityContext = SecurityContextHolder.getContext(); Authentication authentication = securityContext.getAuthentication(); if (authentication != null) { Object details = authentication.getDet...
[ "Extract", "JWT", "claims", "and", "set", "it", "to", "OAuth2Authentication", "decoded", "details", ".", "Here", "is", "how", "to", "get", "details", ":" ]
train
https://github.com/xm-online/xm-commons/blob/43eb2273adb96f40830d7b905ee3a767b8715caf/xm-commons-security/src/main/java/com/icthh/xm/commons/security/oauth2/OAuth2JwtAccessTokenConverter.java#L103-L108
Samsung/GearVRf
GVRf/Framework/framework/src/main/java/org/gearvrf/debug/GVRConsoleFactory.java
GVRConsoleFactory.createConsoleShell
public static Shell createConsoleShell(String prompt, String appName, Object mainHandler, BufferedReader in, PrintStream out, PrintStream err, ConsoleIO.PromptListener promptListener) { ConsoleIO io = new ConsoleIO(in, out, er...
java
public static Shell createConsoleShell(String prompt, String appName, Object mainHandler, BufferedReader in, PrintStream out, PrintStream err, ConsoleIO.PromptListener promptListener) { ConsoleIO io = new ConsoleIO(in, out, er...
[ "public", "static", "Shell", "createConsoleShell", "(", "String", "prompt", ",", "String", "appName", ",", "Object", "mainHandler", ",", "BufferedReader", "in", ",", "PrintStream", "out", ",", "PrintStream", "err", ",", "ConsoleIO", ".", "PromptListener", "promptL...
Facade method for operating the Shell allowing specification of auxiliary handlers (i.e. handlers that are to be passed to all subshells). Run the obtained Shell with commandLoop(). @see org.gearvrf.debug.cli.Shell#Shell(org.gearvrf.debug.cli.Shell.Settings, org.gearvrf.debug.cli.CommandTable, java.util.List) @param...
[ "Facade", "method", "for", "operating", "the", "Shell", "allowing", "specification", "of", "auxiliary", "handlers", "(", "i", ".", "e", ".", "handlers", "that", "are", "to", "be", "passed", "to", "all", "subshells", ")", "." ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/debug/GVRConsoleFactory.java#L61-L84
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/XfaForm.java
XfaForm.findFieldName
public String findFieldName(String name, AcroFields af) { HashMap items = af.getFields(); if (items.containsKey(name)) return name; if (acroFieldsSom == null) { if (items.isEmpty() && xfaPresent) acroFieldsSom = new AcroFieldsSearch(datasetsSom.getName2Node().keySe...
java
public String findFieldName(String name, AcroFields af) { HashMap items = af.getFields(); if (items.containsKey(name)) return name; if (acroFieldsSom == null) { if (items.isEmpty() && xfaPresent) acroFieldsSom = new AcroFieldsSearch(datasetsSom.getName2Node().keySe...
[ "public", "String", "findFieldName", "(", "String", "name", ",", "AcroFields", "af", ")", "{", "HashMap", "items", "=", "af", ".", "getFields", "(", ")", ";", "if", "(", "items", ".", "containsKey", "(", "name", ")", ")", "return", "name", ";", "if", ...
Finds the complete field name contained in the "classic" forms from a partial name. @param name the complete or partial name @param af the fields @return the complete name or <CODE>null</CODE> if not found
[ "Finds", "the", "complete", "field", "name", "contained", "in", "the", "classic", "forms", "from", "a", "partial", "name", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/XfaForm.java#L277-L290
Azure/azure-sdk-for-java
sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabasesInner.java
DatabasesInner.listByRecommendedElasticPool
public List<DatabaseInner> listByRecommendedElasticPool(String resourceGroupName, String serverName, String recommendedElasticPoolName) { return listByRecommendedElasticPoolWithServiceResponseAsync(resourceGroupName, serverName, recommendedElasticPoolName).toBlocking().single().body(); }
java
public List<DatabaseInner> listByRecommendedElasticPool(String resourceGroupName, String serverName, String recommendedElasticPoolName) { return listByRecommendedElasticPoolWithServiceResponseAsync(resourceGroupName, serverName, recommendedElasticPoolName).toBlocking().single().body(); }
[ "public", "List", "<", "DatabaseInner", ">", "listByRecommendedElasticPool", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "recommendedElasticPoolName", ")", "{", "return", "listByRecommendedElasticPoolWithServiceResponseAsync", "(", "resourc...
Returns a list of databases inside a recommented elastic pool. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @param recommendedElasticPoolName The name of the rec...
[ "Returns", "a", "list", "of", "databases", "inside", "a", "recommented", "elastic", "pool", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabasesInner.java#L1639-L1641
landawn/AbacusUtil
src/com/landawn/abacus/util/Fraction.java
Fraction.addAndCheck
private static int addAndCheck(final int x, final int y) { final long s = (long) x + (long) y; if (s < Integer.MIN_VALUE || s > Integer.MAX_VALUE) { throw new ArithmeticException("overflow: add"); } return (int) s; }
java
private static int addAndCheck(final int x, final int y) { final long s = (long) x + (long) y; if (s < Integer.MIN_VALUE || s > Integer.MAX_VALUE) { throw new ArithmeticException("overflow: add"); } return (int) s; }
[ "private", "static", "int", "addAndCheck", "(", "final", "int", "x", ",", "final", "int", "y", ")", "{", "final", "long", "s", "=", "(", "long", ")", "x", "+", "(", "long", ")", "y", ";", "if", "(", "s", "<", "Integer", ".", "MIN_VALUE", "||", ...
Add two integers, checking for overflow. @param x an addend @param y an addend @return the sum <code>x+y</code> @throws ArithmeticException if the result can not be represented as an int
[ "Add", "two", "integers", "checking", "for", "overflow", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/Fraction.java#L800-L806
chr78rm/tracelogger
src/main/java/de/christofreichardt/diagnosis/AbstractTracer.java
AbstractTracer.logMessage
public void logMessage(LogLevel logLevel, String message, Class clazz, String methodName) { Date timeStamp = new Date(); char border[] = new char[logLevel.toString().length() + 4]; Arrays.fill(border, '*'); synchronized (this.syncObject) { this.tracePrintStream.println(border); this....
java
public void logMessage(LogLevel logLevel, String message, Class clazz, String methodName) { Date timeStamp = new Date(); char border[] = new char[logLevel.toString().length() + 4]; Arrays.fill(border, '*'); synchronized (this.syncObject) { this.tracePrintStream.println(border); this....
[ "public", "void", "logMessage", "(", "LogLevel", "logLevel", ",", "String", "message", ",", "Class", "clazz", ",", "String", "methodName", ")", "{", "Date", "timeStamp", "=", "new", "Date", "(", ")", ";", "char", "border", "[", "]", "=", "new", "char", ...
Logs a message with the given logLevel and the originating class. @param logLevel one of the predefined levels INFO, WARNING, ERROR, FATAL and SEVERE @param message the to be logged message @param clazz the originating class @param methodName the originating method
[ "Logs", "a", "message", "with", "the", "given", "logLevel", "and", "the", "originating", "class", "." ]
train
https://github.com/chr78rm/tracelogger/blob/ad22452b20f8111ad4d367302c2b26a100a20200/src/main/java/de/christofreichardt/diagnosis/AbstractTracer.java#L521-L532
google/closure-compiler
src/com/google/javascript/jscomp/CheckAccessControls.java
CheckAccessControls.shouldEmitDeprecationWarning
private boolean shouldEmitDeprecationWarning(NodeTraversal t, Node n) { // In the global scope, there are only two kinds of accesses that should // be flagged for warnings: // 1) Calls of deprecated functions and methods. // 2) Instantiations of deprecated classes. // For now, we just let everything...
java
private boolean shouldEmitDeprecationWarning(NodeTraversal t, Node n) { // In the global scope, there are only two kinds of accesses that should // be flagged for warnings: // 1) Calls of deprecated functions and methods. // 2) Instantiations of deprecated classes. // For now, we just let everything...
[ "private", "boolean", "shouldEmitDeprecationWarning", "(", "NodeTraversal", "t", ",", "Node", "n", ")", "{", "// In the global scope, there are only two kinds of accesses that should", "// be flagged for warnings:", "// 1) Calls of deprecated functions and methods.", "// 2) Instantiation...
Determines whether a deprecation warning should be emitted. @param t The current traversal. @param n The node which we are checking. @param parent The parent of the node which we are checking.
[ "Determines", "whether", "a", "deprecation", "warning", "should", "be", "emitted", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/CheckAccessControls.java#L1057-L1070
lightblueseas/swing-components
src/main/java/de/alpharogroup/swing/dialog/factories/JDialogFactory.java
JDialogFactory.newJDialog
public static JDialog newJDialog(@NonNull JOptionPane pane, String title) { return newJDialog(null, pane, title); }
java
public static JDialog newJDialog(@NonNull JOptionPane pane, String title) { return newJDialog(null, pane, title); }
[ "public", "static", "JDialog", "newJDialog", "(", "@", "NonNull", "JOptionPane", "pane", ",", "String", "title", ")", "{", "return", "newJDialog", "(", "null", ",", "pane", ",", "title", ")", ";", "}" ]
Factory method for create a {@link JDialog} object over the given {@link JOptionPane} @param pane the pane @param title the title @return the new {@link JDialog}
[ "Factory", "method", "for", "create", "a", "{", "@link", "JDialog", "}", "object", "over", "the", "given", "{", "@link", "JOptionPane", "}" ]
train
https://github.com/lightblueseas/swing-components/blob/4045e85cabd8f0ce985cbfff134c3c9873930c79/src/main/java/de/alpharogroup/swing/dialog/factories/JDialogFactory.java#L113-L116
Alluxio/alluxio
core/common/src/main/java/alluxio/concurrent/jsr/CompletableFuture.java
CompletableFuture.completeOnTimeout
public CompletableFuture<T> completeOnTimeout(T value, long timeout, TimeUnit unit) { Objects.requireNonNull(unit); if (result == null) whenComplete( new Canceller(Delayer.delay(new DelayedCompleter<T>(this, value), timeout, unit))); return this; }
java
public CompletableFuture<T> completeOnTimeout(T value, long timeout, TimeUnit unit) { Objects.requireNonNull(unit); if (result == null) whenComplete( new Canceller(Delayer.delay(new DelayedCompleter<T>(this, value), timeout, unit))); return this; }
[ "public", "CompletableFuture", "<", "T", ">", "completeOnTimeout", "(", "T", "value", ",", "long", "timeout", ",", "TimeUnit", "unit", ")", "{", "Objects", ".", "requireNonNull", "(", "unit", ")", ";", "if", "(", "result", "==", "null", ")", "whenComplete"...
Completes this CompletableFuture with the given value if not otherwise completed before the given timeout. @param value the value to use upon timeout @param timeout how long to wait before completing normally with the given value, in units of {@code unit} @param unit a {@code TimeUnit} determining how to interpret the...
[ "Completes", "this", "CompletableFuture", "with", "the", "given", "value", "if", "not", "otherwise", "completed", "before", "the", "given", "timeout", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/common/src/main/java/alluxio/concurrent/jsr/CompletableFuture.java#L1860-L1866
likethecolor/Alchemy-API
src/main/java/com/likethecolor/alchemy/api/parser/json/NamedEntityParser.java
NamedEntityParser.isValidNamedEntity
private boolean isValidNamedEntity(final Double score, final String text) { return !StringUtils.isBlank(text) || score != null; }
java
private boolean isValidNamedEntity(final Double score, final String text) { return !StringUtils.isBlank(text) || score != null; }
[ "private", "boolean", "isValidNamedEntity", "(", "final", "Double", "score", ",", "final", "String", "text", ")", "{", "return", "!", "StringUtils", ".", "isBlank", "(", "text", ")", "||", "score", "!=", "null", ";", "}" ]
Return true if at least one of the values is not null/empty. @param score relevance score @param text detected entity text @return true if at least one of the values is not null/empty
[ "Return", "true", "if", "at", "least", "one", "of", "the", "values", "is", "not", "null", "/", "empty", "." ]
train
https://github.com/likethecolor/Alchemy-API/blob/5208cfc92a878ceeaff052787af29da92d98db7e/src/main/java/com/likethecolor/alchemy/api/parser/json/NamedEntityParser.java#L129-L132
Azure/azure-sdk-for-java
network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/RouteFiltersInner.java
RouteFiltersInner.getByResourceGroup
public RouteFilterInner getByResourceGroup(String resourceGroupName, String routeFilterName, String expand) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, routeFilterName, expand).toBlocking().single().body(); }
java
public RouteFilterInner getByResourceGroup(String resourceGroupName, String routeFilterName, String expand) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, routeFilterName, expand).toBlocking().single().body(); }
[ "public", "RouteFilterInner", "getByResourceGroup", "(", "String", "resourceGroupName", ",", "String", "routeFilterName", ",", "String", "expand", ")", "{", "return", "getByResourceGroupWithServiceResponseAsync", "(", "resourceGroupName", ",", "routeFilterName", ",", "expan...
Gets the specified route filter. @param resourceGroupName The name of the resource group. @param routeFilterName The name of the route filter. @param expand Expands referenced express route bgp peering resources. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if...
[ "Gets", "the", "specified", "route", "filter", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/RouteFiltersInner.java#L355-L357
nohana/Amalgam
amalgam/src/main/java/com/amalgam/app/DialogFragmentUtils.java
DialogFragmentUtils.supportDismissOnLoaderCallback
public static void supportDismissOnLoaderCallback(Handler handler, final android.support.v4.app.FragmentManager manager, final String tag) { handler.post(new Runnable() { @Override public void run() { android.support.v4.app.DialogFragment fragment = (android.support.v4.ap...
java
public static void supportDismissOnLoaderCallback(Handler handler, final android.support.v4.app.FragmentManager manager, final String tag) { handler.post(new Runnable() { @Override public void run() { android.support.v4.app.DialogFragment fragment = (android.support.v4.ap...
[ "public", "static", "void", "supportDismissOnLoaderCallback", "(", "Handler", "handler", ",", "final", "android", ".", "support", ".", "v4", ".", "app", ".", "FragmentManager", "manager", ",", "final", "String", "tag", ")", "{", "handler", ".", "post", "(", ...
Dismiss {@link android.support.v4.app.DialogFragment} for the tag on the loader callbacks with the specified {@link android.os.Handler}. @param handler the handler, in most case, this handler is the main handler. @param manager the manager. @param tag the tag string that is related to the {@link android.support.v4.app....
[ "Dismiss", "{" ]
train
https://github.com/nohana/Amalgam/blob/57809ddbfe7897e979cf507982ce0b3aa5e0ed8a/amalgam/src/main/java/com/amalgam/app/DialogFragmentUtils.java#L104-L114
alkacon/opencms-core
src/org/opencms/ade/configuration/CmsADEManager.java
CmsADEManager.getDetailPage
public String getDetailPage(CmsObject cms, String pageRootPath, String originPath) { return getDetailPage(cms, pageRootPath, originPath, null); }
java
public String getDetailPage(CmsObject cms, String pageRootPath, String originPath) { return getDetailPage(cms, pageRootPath, originPath, null); }
[ "public", "String", "getDetailPage", "(", "CmsObject", "cms", ",", "String", "pageRootPath", ",", "String", "originPath", ")", "{", "return", "getDetailPage", "(", "cms", ",", "pageRootPath", ",", "originPath", ",", "null", ")", ";", "}" ]
Gets the detail page for a content element.<p> @param cms the CMS context @param pageRootPath the element's root path @param originPath the path in which the the detail page is being requested @return the detail page for the content element
[ "Gets", "the", "detail", "page", "for", "a", "content", "element", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/configuration/CmsADEManager.java#L427-L430
mgm-tp/jfunk
jfunk-common/src/main/java/com/mgmtp/jfunk/common/cli/CliUtils.java
CliUtils.executeCommandLine
public static CliOutput executeCommandLine(final Commandline cli, final String loggerName) { return executeCommandLine(cli, loggerName, null); }
java
public static CliOutput executeCommandLine(final Commandline cli, final String loggerName) { return executeCommandLine(cli, loggerName, null); }
[ "public", "static", "CliOutput", "executeCommandLine", "(", "final", "Commandline", "cli", ",", "final", "String", "loggerName", ")", "{", "return", "executeCommandLine", "(", "cli", ",", "loggerName", ",", "null", ")", ";", "}" ]
Executes the specified command line and blocks until the process has finished. The output of the process is captured, returned, as well as logged with info (stdout) and error (stderr) level, respectively. @param cli the command line @param loggerName the name of the logger to use (passed to {@link LoggerFactory#getLog...
[ "Executes", "the", "specified", "command", "line", "and", "blocks", "until", "the", "process", "has", "finished", ".", "The", "output", "of", "the", "process", "is", "captured", "returned", "as", "well", "as", "logged", "with", "info", "(", "stdout", ")", ...
train
https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-common/src/main/java/com/mgmtp/jfunk/common/cli/CliUtils.java#L62-L64
gallandarakhneorg/afc
core/maths/mathgeom/src/main/java/org/arakhne/afc/math/geometry/d1/Transform1D.java
Transform1D.toTransform2D
@Pure public final Transform2D toTransform2D(Segment1D<?, ?> segment) { assert segment != null : AssertMessages.notNullParameter(0); final Point2D<?, ?> a = segment.getFirstPoint(); if (a == null) { return null; } final Point2D<?, ?> b = segment.getLastPoint(); if (b == null) { return null; } ret...
java
@Pure public final Transform2D toTransform2D(Segment1D<?, ?> segment) { assert segment != null : AssertMessages.notNullParameter(0); final Point2D<?, ?> a = segment.getFirstPoint(); if (a == null) { return null; } final Point2D<?, ?> b = segment.getLastPoint(); if (b == null) { return null; } ret...
[ "@", "Pure", "public", "final", "Transform2D", "toTransform2D", "(", "Segment1D", "<", "?", ",", "?", ">", "segment", ")", "{", "assert", "segment", "!=", "null", ":", "AssertMessages", ".", "notNullParameter", "(", "0", ")", ";", "final", "Point2D", "<", ...
Replies a 2D transformation that is corresponding to this transformation. @param segment is the segment. @return the 2D transformation or <code>null</code> if the segment could not be mapped to 2D.
[ "Replies", "a", "2D", "transformation", "that", "is", "corresponding", "to", "this", "transformation", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/src/main/java/org/arakhne/afc/math/geometry/d1/Transform1D.java#L614-L626
facebookarchive/hadoop-20
src/contrib/corona/src/java/org/apache/hadoop/mapred/CoronaJobHistory.java
CoronaJobHistory.logTaskUpdates
public void logTaskUpdates(TaskID taskId, long finishTime) { if (disableHistory) { return; } JobID id = taskId.getJobID(); if (!this.jobId.equals(id)) { throw new RuntimeException("JobId from task: " + id + " does not match expected: " + jobId); } i...
java
public void logTaskUpdates(TaskID taskId, long finishTime) { if (disableHistory) { return; } JobID id = taskId.getJobID(); if (!this.jobId.equals(id)) { throw new RuntimeException("JobId from task: " + id + " does not match expected: " + jobId); } i...
[ "public", "void", "logTaskUpdates", "(", "TaskID", "taskId", ",", "long", "finishTime", ")", "{", "if", "(", "disableHistory", ")", "{", "return", ";", "}", "JobID", "id", "=", "taskId", ".", "getJobID", "(", ")", ";", "if", "(", "!", "this", ".", "j...
Update the finish time of task. @param taskId task id @param finishTime finish time of task in ms
[ "Update", "the", "finish", "time", "of", "task", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/corona/src/java/org/apache/hadoop/mapred/CoronaJobHistory.java#L536-L553
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/abst/geo/bundle/PruneStructureFromSceneMetric.java
PruneStructureFromSceneMetric.prunePoints
public void prunePoints(int neighbors , double distance ) { // Use a nearest neighbor search to find near by points Point3D_F64 worldX = new Point3D_F64(); List<Point3D_F64> cloud = new ArrayList<>(); for (int i = 0; i < structure.points.length; i++) { SceneStructureMetric.Point structureP = structure.point...
java
public void prunePoints(int neighbors , double distance ) { // Use a nearest neighbor search to find near by points Point3D_F64 worldX = new Point3D_F64(); List<Point3D_F64> cloud = new ArrayList<>(); for (int i = 0; i < structure.points.length; i++) { SceneStructureMetric.Point structureP = structure.point...
[ "public", "void", "prunePoints", "(", "int", "neighbors", ",", "double", "distance", ")", "{", "// Use a nearest neighbor search to find near by points", "Point3D_F64", "worldX", "=", "new", "Point3D_F64", "(", ")", ";", "List", "<", "Point3D_F64", ">", "cloud", "="...
Prune a feature it has fewer than X neighbors within Y distance. Observations associated with this feature are also pruned. Call {@link #pruneViews(int)} to makes sure the graph is valid. @param neighbors Number of other features which need to be near by @param distance Maximum distance a point can be to be considere...
[ "Prune", "a", "feature", "it", "has", "fewer", "than", "X", "neighbors", "within", "Y", "distance", ".", "Observations", "associated", "with", "this", "feature", "are", "also", "pruned", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/abst/geo/bundle/PruneStructureFromSceneMetric.java#L235-L286
OpenLiberty/open-liberty
dev/com.ibm.ws.install/src/com/ibm/ws/install/internal/AbstractDirector.java
AbstractDirector.containFeature
boolean containFeature(Map<String, ProvisioningFeatureDefinition> installedFeatures, String feature) { if (installedFeatures.containsKey(feature)) return true; for (ProvisioningFeatureDefinition pfd : installedFeatures.values()) { String shortName = InstallUtils.getShortName(pfd)...
java
boolean containFeature(Map<String, ProvisioningFeatureDefinition> installedFeatures, String feature) { if (installedFeatures.containsKey(feature)) return true; for (ProvisioningFeatureDefinition pfd : installedFeatures.values()) { String shortName = InstallUtils.getShortName(pfd)...
[ "boolean", "containFeature", "(", "Map", "<", "String", ",", "ProvisioningFeatureDefinition", ">", "installedFeatures", ",", "String", "feature", ")", "{", "if", "(", "installedFeatures", ".", "containsKey", "(", "feature", ")", ")", "return", "true", ";", "for"...
Checks if the feature is in installedFeatures @param installedFeatures the map of installed features @param feature the feature to look for @return true if feature is in installedFeatures
[ "Checks", "if", "the", "feature", "is", "in", "installedFeatures" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.install/src/com/ibm/ws/install/internal/AbstractDirector.java#L154-L163
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/geo/PerspectiveOps.java
PerspectiveOps.renderPixel
public static Point2D_F64 renderPixel( Se3_F64 worldToCamera , DMatrixRMaj K , Point3D_F64 X ) { return ImplPerspectiveOps_F64.renderPixel(worldToCamera,K,X); // if( K == null ) // return renderPixel(worldToCamera,X); // return ImplPerspectiveOps_F64.renderPixel(worldToCamera, // K.data[0], K.data[1], K.data[2...
java
public static Point2D_F64 renderPixel( Se3_F64 worldToCamera , DMatrixRMaj K , Point3D_F64 X ) { return ImplPerspectiveOps_F64.renderPixel(worldToCamera,K,X); // if( K == null ) // return renderPixel(worldToCamera,X); // return ImplPerspectiveOps_F64.renderPixel(worldToCamera, // K.data[0], K.data[1], K.data[2...
[ "public", "static", "Point2D_F64", "renderPixel", "(", "Se3_F64", "worldToCamera", ",", "DMatrixRMaj", "K", ",", "Point3D_F64", "X", ")", "{", "return", "ImplPerspectiveOps_F64", ".", "renderPixel", "(", "worldToCamera", ",", "K", ",", "X", ")", ";", "//\t\tif( ...
Renders a point in world coordinates into the image plane in pixels or normalized image coordinates. @param worldToCamera Transform from world to camera frame @param K Optional. Intrinsic camera calibration matrix. If null then normalized image coordinates are returned. @param X 3D Point in world reference frame.. @...
[ "Renders", "a", "point", "in", "world", "coordinates", "into", "the", "image", "plane", "in", "pixels", "or", "normalized", "image", "coordinates", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/PerspectiveOps.java#L513-L519
op4j/op4j
src/main/java/org/op4j/Op.java
Op.onArrayFor
public static <T> Level0ArrayOperator<Integer[],Integer> onArrayFor(final Integer... elements) { return onArrayOf(Types.INTEGER, VarArgsUtil.asRequiredObjectArray(elements)); }
java
public static <T> Level0ArrayOperator<Integer[],Integer> onArrayFor(final Integer... elements) { return onArrayOf(Types.INTEGER, VarArgsUtil.asRequiredObjectArray(elements)); }
[ "public", "static", "<", "T", ">", "Level0ArrayOperator", "<", "Integer", "[", "]", ",", "Integer", ">", "onArrayFor", "(", "final", "Integer", "...", "elements", ")", "{", "return", "onArrayOf", "(", "Types", ".", "INTEGER", ",", "VarArgsUtil", ".", "asRe...
<p> Creates an array with the specified elements and an <i>operation expression</i> on it. </p> @param elements the elements of the array being created @return an operator, ready for chaining
[ "<p", ">", "Creates", "an", "array", "with", "the", "specified", "elements", "and", "an", "<i", ">", "operation", "expression<", "/", "i", ">", "on", "it", ".", "<", "/", "p", ">" ]
train
https://github.com/op4j/op4j/blob/b577596dfe462089d3dd169666defc6de7ad289a/src/main/java/org/op4j/Op.java#L906-L908
versionone/VersionOne.SDK.Java.ObjectModel
src/main/java/com/versionone/om/V1InstanceCreator.java
V1InstanceCreator.buildProject
public BuildProject buildProject(String name, String reference) { return buildProject(name, reference, null); }
java
public BuildProject buildProject(String name, String reference) { return buildProject(name, reference, null); }
[ "public", "BuildProject", "buildProject", "(", "String", "name", ",", "String", "reference", ")", "{", "return", "buildProject", "(", "name", ",", "reference", ",", "null", ")", ";", "}" ]
Create a new Build Project with a name and reference. @param name Initial name. @param reference Reference value. @return A newly minted Build Project that exists in the VersionOne system.
[ "Create", "a", "new", "Build", "Project", "with", "a", "name", "and", "reference", "." ]
train
https://github.com/versionone/VersionOne.SDK.Java.ObjectModel/blob/59d35b67c849299631bca45ee94143237eb2ae1a/src/main/java/com/versionone/om/V1InstanceCreator.java#L865-L867
avianey/facebook-api-android-maven
facebook/src/main/java/com/facebook/TokenCachingStrategy.java
TokenCachingStrategy.putToken
public static void putToken(Bundle bundle, String value) { Validate.notNull(bundle, "bundle"); Validate.notNull(value, "value"); bundle.putString(TOKEN_KEY, value); }
java
public static void putToken(Bundle bundle, String value) { Validate.notNull(bundle, "bundle"); Validate.notNull(value, "value"); bundle.putString(TOKEN_KEY, value); }
[ "public", "static", "void", "putToken", "(", "Bundle", "bundle", ",", "String", "value", ")", "{", "Validate", ".", "notNull", "(", "bundle", ",", "\"bundle\"", ")", ";", "Validate", ".", "notNull", "(", "value", ",", "\"value\"", ")", ";", "bundle", "."...
Puts the token value into a Bundle. @param bundle A Bundle in which the token value should be stored. @param value The String representing the token value, or null. @throws NullPointerException if the passed in Bundle or token value are null
[ "Puts", "the", "token", "value", "into", "a", "Bundle", "." ]
train
https://github.com/avianey/facebook-api-android-maven/blob/ae6c7aa7ae45739ee19f18c1983e05f7e35b9ede/facebook/src/main/java/com/facebook/TokenCachingStrategy.java#L170-L174
apache/groovy
src/main/groovy/groovy/lang/MetaClassImpl.java
MetaClassImpl.getStaticMethods
private Object getStaticMethods(Class sender, String name) { final MetaMethodIndex.Entry entry = metaMethodIndex.getMethods(sender, name); if (entry == null) return FastArray.EMPTY_LIST; Object answer = entry.staticMethods; if (answer == null) return FastArray.EMP...
java
private Object getStaticMethods(Class sender, String name) { final MetaMethodIndex.Entry entry = metaMethodIndex.getMethods(sender, name); if (entry == null) return FastArray.EMPTY_LIST; Object answer = entry.staticMethods; if (answer == null) return FastArray.EMP...
[ "private", "Object", "getStaticMethods", "(", "Class", "sender", ",", "String", "name", ")", "{", "final", "MetaMethodIndex", ".", "Entry", "entry", "=", "metaMethodIndex", ".", "getMethods", "(", "sender", ",", "name", ")", ";", "if", "(", "entry", "==", ...
Returns all the normal static methods on this class for the given name @return all the normal static methods available on this class for the given name
[ "Returns", "all", "the", "normal", "static", "methods", "on", "this", "class", "for", "the", "given", "name" ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/groovy/groovy/lang/MetaClassImpl.java#L748-L756
JOML-CI/JOML
src/org/joml/Vector3f.java
Vector3f.setComponent
public Vector3f setComponent(int component, float value) throws IllegalArgumentException { switch (component) { case 0: x = value; break; case 1: y = value; break; case 2: z = value; ...
java
public Vector3f setComponent(int component, float value) throws IllegalArgumentException { switch (component) { case 0: x = value; break; case 1: y = value; break; case 2: z = value; ...
[ "public", "Vector3f", "setComponent", "(", "int", "component", ",", "float", "value", ")", "throws", "IllegalArgumentException", "{", "switch", "(", "component", ")", "{", "case", "0", ":", "x", "=", "value", ";", "break", ";", "case", "1", ":", "y", "="...
Set the value of the specified component of this vector. @param component the component whose value to set, within <code>[0..2]</code> @param value the value to set @return this @throws IllegalArgumentException if <code>component</code> is not within <code>[0..2]</code>
[ "Set", "the", "value", "of", "the", "specified", "component", "of", "this", "vector", "." ]
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Vector3f.java#L430-L445
loldevs/riotapi
rest/src/main/java/net/boreeas/riotapi/rest/ThrottledApiHandler.java
ThrottledApiHandler.getMasteryPagesMultipleUsers
public Future<Map<Integer, Set<MasteryPage>>> getMasteryPagesMultipleUsers(Integer... ids) { return new ApiFuture<>(() -> handler.getMasteryPagesMultipleUsers(ids)); }
java
public Future<Map<Integer, Set<MasteryPage>>> getMasteryPagesMultipleUsers(Integer... ids) { return new ApiFuture<>(() -> handler.getMasteryPagesMultipleUsers(ids)); }
[ "public", "Future", "<", "Map", "<", "Integer", ",", "Set", "<", "MasteryPage", ">", ">", ">", "getMasteryPagesMultipleUsers", "(", "Integer", "...", "ids", ")", "{", "return", "new", "ApiFuture", "<>", "(", "(", ")", "->", "handler", ".", "getMasteryPages...
Retrieve mastery pages for multiple users @param ids The ids of the users @return A map, mapping player ids to their respective mastery pages @see <a href=https://developer.riotgames.com/api/methods#!/620/1933>Official API documentation</a>
[ "Retrieve", "mastery", "pages", "for", "multiple", "users" ]
train
https://github.com/loldevs/riotapi/blob/0b8aac407aa5289845f249024f9732332855544f/rest/src/main/java/net/boreeas/riotapi/rest/ThrottledApiHandler.java#L1131-L1133
gwtplus/google-gin
src/main/java/com/google/gwt/inject/rebind/util/MethodCallUtil.java
MethodCallUtil.createConstructorInjection
public SourceSnippet createConstructorInjection( MethodLiteral<?, Constructor<?>> constructor, NameGenerator nameGenerator, List<InjectorMethod> methodsOutput) throws NoSourceNameException { return createMethodCallWithInjection(constructor, null, nameGenerator, methodsOutput); }
java
public SourceSnippet createConstructorInjection( MethodLiteral<?, Constructor<?>> constructor, NameGenerator nameGenerator, List<InjectorMethod> methodsOutput) throws NoSourceNameException { return createMethodCallWithInjection(constructor, null, nameGenerator, methodsOutput); }
[ "public", "SourceSnippet", "createConstructorInjection", "(", "MethodLiteral", "<", "?", ",", "Constructor", "<", "?", ">", ">", "constructor", ",", "NameGenerator", "nameGenerator", ",", "List", "<", "InjectorMethod", ">", "methodsOutput", ")", "throws", "NoSourceN...
Creates a constructor injecting method and returns a string that invokes the new method. The new method returns the constructed object. @param constructor constructor to call @param nameGenerator NameGenerator to be used for ensuring method name uniqueness @param methodsOutput a list where all new methods created by ...
[ "Creates", "a", "constructor", "injecting", "method", "and", "returns", "a", "string", "that", "invokes", "the", "new", "method", ".", "The", "new", "method", "returns", "the", "constructed", "object", "." ]
train
https://github.com/gwtplus/google-gin/blob/595e61ee0d2fa508815c016e924ec0e5cea2a2aa/src/main/java/com/google/gwt/inject/rebind/util/MethodCallUtil.java#L52-L56
jboss-integration/fuse-bxms-integ
switchyard/switchyard-component-common-knowledge/src/main/java/org/switchyard/component/common/knowledge/config/builder/patch/PatchedRuntimeEnvironmentBuilder.java
PatchedRuntimeEnvironmentBuilder.addConfiguration
public RuntimeEnvironmentBuilder addConfiguration(String name, String value) { if (name == null || value == null) { return this; } _runtimeEnvironment.addToConfiguration(name, value); return this; }
java
public RuntimeEnvironmentBuilder addConfiguration(String name, String value) { if (name == null || value == null) { return this; } _runtimeEnvironment.addToConfiguration(name, value); return this; }
[ "public", "RuntimeEnvironmentBuilder", "addConfiguration", "(", "String", "name", ",", "String", "value", ")", "{", "if", "(", "name", "==", "null", "||", "value", "==", "null", ")", "{", "return", "this", ";", "}", "_runtimeEnvironment", ".", "addToConfigurat...
Adds a configuration name/value pair. @param name name @param value value @return this RuntimeEnvironmentBuilder
[ "Adds", "a", "configuration", "name", "/", "value", "pair", "." ]
train
https://github.com/jboss-integration/fuse-bxms-integ/blob/ca5c012bf867ea15d1250f0991af3cd7e708aaaf/switchyard/switchyard-component-common-knowledge/src/main/java/org/switchyard/component/common/knowledge/config/builder/patch/PatchedRuntimeEnvironmentBuilder.java#L387-L394
looly/hutool
hutool-crypto/src/main/java/cn/hutool/crypto/KeyUtil.java
KeyUtil.generatePBEKey
public static SecretKey generatePBEKey(String algorithm, char[] key) { if (StrUtil.isBlank(algorithm) || false == algorithm.startsWith("PBE")) { throw new CryptoException("Algorithm [{}] is not a PBE algorithm!"); } if (null == key) { key = RandomUtil.randomString(32).toCharArray(); } PBEKeySpe...
java
public static SecretKey generatePBEKey(String algorithm, char[] key) { if (StrUtil.isBlank(algorithm) || false == algorithm.startsWith("PBE")) { throw new CryptoException("Algorithm [{}] is not a PBE algorithm!"); } if (null == key) { key = RandomUtil.randomString(32).toCharArray(); } PBEKeySpe...
[ "public", "static", "SecretKey", "generatePBEKey", "(", "String", "algorithm", ",", "char", "[", "]", "key", ")", "{", "if", "(", "StrUtil", ".", "isBlank", "(", "algorithm", ")", "||", "false", "==", "algorithm", ".", "startsWith", "(", "\"PBE\"", ")", ...
生成PBE {@link SecretKey} @param algorithm PBE算法,包括:PBEWithMD5AndDES、PBEWithSHA1AndDESede、PBEWithSHA1AndRC2_40等 @param key 密钥 @return {@link SecretKey}
[ "生成PBE", "{", "@link", "SecretKey", "}" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-crypto/src/main/java/cn/hutool/crypto/KeyUtil.java#L169-L179
cdk/cdk
base/core/src/main/java/org/openscience/cdk/graph/Cycles.java
Cycles._invoke
private static Cycles _invoke(CycleFinder finder, IAtomContainer container) { return _invoke(finder, container, container.getAtomCount()); }
java
private static Cycles _invoke(CycleFinder finder, IAtomContainer container) { return _invoke(finder, container, container.getAtomCount()); }
[ "private", "static", "Cycles", "_invoke", "(", "CycleFinder", "finder", ",", "IAtomContainer", "container", ")", "{", "return", "_invoke", "(", "finder", ",", "container", ",", "container", ".", "getAtomCount", "(", ")", ")", ";", "}" ]
Internal method to wrap cycle computations which <i>should</i> be tractable. That is they currently won't throw the exception - if the method does throw an exception an internal error is triggered as a sanity check. @param finder the cycle finding method @param container the molecule to find the cycles of @return t...
[ "Internal", "method", "to", "wrap", "cycle", "computations", "which", "<i", ">", "should<", "/", "i", ">", "be", "tractable", ".", "That", "is", "they", "currently", "won", "t", "throw", "the", "exception", "-", "if", "the", "method", "does", "throw", "a...
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/graph/Cycles.java#L691-L693
facebookarchive/hadoop-20
src/hdfs/org/apache/hadoop/hdfs/server/namenode/BlocksMap.java
BlocksMap.addNode
boolean addNode(Block b, DatanodeDescriptor node, int replication) { // insert into the map if not there yet BlockInfo info = checkBlockInfo(b, replication); // add block to the data-node list and the node to the block info return node.addBlock(info); }
java
boolean addNode(Block b, DatanodeDescriptor node, int replication) { // insert into the map if not there yet BlockInfo info = checkBlockInfo(b, replication); // add block to the data-node list and the node to the block info return node.addBlock(info); }
[ "boolean", "addNode", "(", "Block", "b", ",", "DatanodeDescriptor", "node", ",", "int", "replication", ")", "{", "// insert into the map if not there yet", "BlockInfo", "info", "=", "checkBlockInfo", "(", "b", ",", "replication", ")", ";", "// add block to the data-no...
returns true if the node does not already exists and is added. false if the node already exists.
[ "returns", "true", "if", "the", "node", "does", "not", "already", "exists", "and", "is", "added", ".", "false", "if", "the", "node", "already", "exists", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/server/namenode/BlocksMap.java#L543-L548
ttddyy/datasource-proxy
src/main/java/net/ttddyy/dsproxy/listener/logging/DefaultJsonQueryLogEntryCreator.java
DefaultJsonQueryLogEntryCreator.writeQueriesEntry
protected void writeQueriesEntry(StringBuilder sb, ExecutionInfo execInfo, List<QueryInfo> queryInfoList) { sb.append("\"query\":["); for (QueryInfo queryInfo : queryInfoList) { sb.append("\""); sb.append(escapeSpecialCharacter(queryInfo.getQuery())); sb.append("\",")...
java
protected void writeQueriesEntry(StringBuilder sb, ExecutionInfo execInfo, List<QueryInfo> queryInfoList) { sb.append("\"query\":["); for (QueryInfo queryInfo : queryInfoList) { sb.append("\""); sb.append(escapeSpecialCharacter(queryInfo.getQuery())); sb.append("\",")...
[ "protected", "void", "writeQueriesEntry", "(", "StringBuilder", "sb", ",", "ExecutionInfo", "execInfo", ",", "List", "<", "QueryInfo", ">", "queryInfoList", ")", "{", "sb", ".", "append", "(", "\"\\\"query\\\":[\"", ")", ";", "for", "(", "QueryInfo", "queryInfo"...
Write queries as json. <p>default: "query":["select 1","select 2"], @param sb StringBuilder to write @param execInfo execution info @param queryInfoList query info list
[ "Write", "queries", "as", "json", "." ]
train
https://github.com/ttddyy/datasource-proxy/blob/62163ccf9a569a99aa3ad9f9151a32567447a62e/src/main/java/net/ttddyy/dsproxy/listener/logging/DefaultJsonQueryLogEntryCreator.java#L197-L206
CenturyLinkCloud/mdw
mdw-services/src/com/centurylink/mdw/service/data/process/EngineDataAccessCache.java
EngineDataAccessCache.updateDocumentContent
public synchronized void updateDocumentContent(Long docid, String content) throws SQLException { if (cache_document==CACHE_OFF) { edadb.updateDocumentContent(docid, content); } else if (cache_document==CACHE_ONLY) { Document docvo = documentCache.get(docid); if (docvo...
java
public synchronized void updateDocumentContent(Long docid, String content) throws SQLException { if (cache_document==CACHE_OFF) { edadb.updateDocumentContent(docid, content); } else if (cache_document==CACHE_ONLY) { Document docvo = documentCache.get(docid); if (docvo...
[ "public", "synchronized", "void", "updateDocumentContent", "(", "Long", "docid", ",", "String", "content", ")", "throws", "SQLException", "{", "if", "(", "cache_document", "==", "CACHE_OFF", ")", "{", "edadb", ".", "updateDocumentContent", "(", "docid", ",", "co...
Update the content (actual document object) bound to the given document reference object. @param docid @param content @throws DataAccessException
[ "Update", "the", "content", "(", "actual", "document", "object", ")", "bound", "to", "the", "given", "document", "reference", "object", "." ]
train
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/service/data/process/EngineDataAccessCache.java#L152-L163
rhuss/jolokia
agent/core/src/main/java/org/jolokia/detector/AbstractServerDetector.java
AbstractServerDetector.isClassLoaded
protected boolean isClassLoaded(String className, Instrumentation instrumentation) { if (instrumentation == null || className == null) { throw new IllegalArgumentException("instrumentation and className must not be null"); } Class<?>[] classes = instrumentation.getAllLoadedClasses();...
java
protected boolean isClassLoaded(String className, Instrumentation instrumentation) { if (instrumentation == null || className == null) { throw new IllegalArgumentException("instrumentation and className must not be null"); } Class<?>[] classes = instrumentation.getAllLoadedClasses();...
[ "protected", "boolean", "isClassLoaded", "(", "String", "className", ",", "Instrumentation", "instrumentation", ")", "{", "if", "(", "instrumentation", "==", "null", "||", "className", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"ins...
Tests if the given class name has been loaded by the JVM. Don't use this method in case you have access to the class loader which will be loading the class because the used approach is not very efficient. @param className the name of the class to check @param instrumentation @return true if the class has been loaded by...
[ "Tests", "if", "the", "given", "class", "name", "has", "been", "loaded", "by", "the", "JVM", ".", "Don", "t", "use", "this", "method", "in", "case", "you", "have", "access", "to", "the", "class", "loader", "which", "will", "be", "loading", "the", "clas...
train
https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/core/src/main/java/org/jolokia/detector/AbstractServerDetector.java#L183-L194
dlemmermann/CalendarFX
CalendarFXRecurrence/src/main/java/com/google/ical/iter/Util.java
Util.rollToNextWeekStart
static void rollToNextWeekStart(DTBuilder builder, Weekday wkst) { DateValue bd = builder.toDate(); builder.day += (7 - ((7 + (Weekday.valueOf(bd).javaDayNum - wkst.javaDayNum)) % 7)) % 7; builder.normalize(); }
java
static void rollToNextWeekStart(DTBuilder builder, Weekday wkst) { DateValue bd = builder.toDate(); builder.day += (7 - ((7 + (Weekday.valueOf(bd).javaDayNum - wkst.javaDayNum)) % 7)) % 7; builder.normalize(); }
[ "static", "void", "rollToNextWeekStart", "(", "DTBuilder", "builder", ",", "Weekday", "wkst", ")", "{", "DateValue", "bd", "=", "builder", ".", "toDate", "(", ")", ";", "builder", ".", "day", "+=", "(", "7", "-", "(", "(", "7", "+", "(", "Weekday", "...
advances builder to the earliest day on or after builder that falls on wkst. @param builder non null. @param wkst the day of the week that the week starts on
[ "advances", "builder", "to", "the", "earliest", "day", "on", "or", "after", "builder", "that", "falls", "on", "wkst", "." ]
train
https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXRecurrence/src/main/java/com/google/ical/iter/Util.java#L41-L47
youngmonkeys/ezyfox-sfs2x
src/main/java/com/tvd12/ezyfox/sfs2x/serverhandler/RoomExtensionDestroyEventHandler.java
RoomExtensionDestroyEventHandler.notifyHandler
protected void notifyHandler(ServerHandlerClass handler, Object zoneAgent) { ReflectMethodUtil.invokeHandleMethod(handler.getHandleMethod(), handler.newInstance(), context, zoneAgent); }
java
protected void notifyHandler(ServerHandlerClass handler, Object zoneAgent) { ReflectMethodUtil.invokeHandleMethod(handler.getHandleMethod(), handler.newInstance(), context, zoneAgent); }
[ "protected", "void", "notifyHandler", "(", "ServerHandlerClass", "handler", ",", "Object", "zoneAgent", ")", "{", "ReflectMethodUtil", ".", "invokeHandleMethod", "(", "handler", ".", "getHandleMethod", "(", ")", ",", "handler", ".", "newInstance", "(", ")", ",", ...
Propagate event to handler @param handler structure of handler class @param zoneAgent the zone agent
[ "Propagate", "event", "to", "handler" ]
train
https://github.com/youngmonkeys/ezyfox-sfs2x/blob/7e004033a3b551c3ae970a0c8f45db7b1ec144de/src/main/java/com/tvd12/ezyfox/sfs2x/serverhandler/RoomExtensionDestroyEventHandler.java#L85-L88
glyptodon/guacamole-client
extensions/guacamole-auth-cas/src/main/java/org/apache/guacamole/auth/cas/ticket/TicketValidationService.java
TicketValidationService.validateTicket
public String validateTicket(String ticket, Credentials credentials) throws GuacamoleException { // Retrieve the configured CAS URL, establish a ticket validator, // and then attempt to validate the supplied ticket. If that succeeds, // grab the principal returned by the validator. URI...
java
public String validateTicket(String ticket, Credentials credentials) throws GuacamoleException { // Retrieve the configured CAS URL, establish a ticket validator, // and then attempt to validate the supplied ticket. If that succeeds, // grab the principal returned by the validator. URI...
[ "public", "String", "validateTicket", "(", "String", "ticket", ",", "Credentials", "credentials", ")", "throws", "GuacamoleException", "{", "// Retrieve the configured CAS URL, establish a ticket validator,", "// and then attempt to validate the supplied ticket. If that succeeds,", "/...
Validates and parses the given ID ticket, returning the username provided by the CAS server in the ticket. If the ticket is invalid an exception is thrown. @param ticket The ID ticket to validate and parse. @param credentials The Credentials object to store retrieved username and password values in. @return The use...
[ "Validates", "and", "parses", "the", "given", "ID", "ticket", "returning", "the", "username", "provided", "by", "the", "CAS", "server", "in", "the", "ticket", ".", "If", "the", "ticket", "is", "invalid", "an", "exception", "is", "thrown", "." ]
train
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-cas/src/main/java/org/apache/guacamole/auth/cas/ticket/TicketValidationService.java#L82-L120
cdk/cdk
base/standard/src/main/java/org/openscience/cdk/geometry/BondTools.java
BondTools.stereosAreOpposite
public static boolean stereosAreOpposite(IAtomContainer container, IAtom atom) { List<IAtom> atoms = container.getConnectedAtomsList(atom); TreeMap<Double, Integer> hm = new TreeMap<Double, Integer>(); for (int i = 1; i < atoms.size(); i++) { hm.put(giveAngle(atom, atoms.get(0), atom...
java
public static boolean stereosAreOpposite(IAtomContainer container, IAtom atom) { List<IAtom> atoms = container.getConnectedAtomsList(atom); TreeMap<Double, Integer> hm = new TreeMap<Double, Integer>(); for (int i = 1; i < atoms.size(); i++) { hm.put(giveAngle(atom, atoms.get(0), atom...
[ "public", "static", "boolean", "stereosAreOpposite", "(", "IAtomContainer", "container", ",", "IAtom", "atom", ")", "{", "List", "<", "IAtom", ">", "atoms", "=", "container", ".", "getConnectedAtomsList", "(", "atom", ")", ";", "TreeMap", "<", "Double", ",", ...
Says if of four atoms connected two one atom the up and down bonds are opposite or not, i. e.if it's tetrehedral or square planar. The method does not check if there are four atoms and if two or up and two are down @param atom The atom which is the center @param container The atomContainer the atom is in @...
[ "Says", "if", "of", "four", "atoms", "connected", "two", "one", "atom", "the", "up", "and", "down", "bonds", "are", "opposite", "or", "not", "i", ".", "e", ".", "if", "it", "s", "tetrehedral", "or", "square", "planar", ".", "The", "method", "does", "...
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/geometry/BondTools.java#L511-L521
calimero-project/calimero-core
src/tuwien/auto/calimero/dptxlator/TranslatorTypes.java
TranslatorTypes.hasTranslator
public static boolean hasTranslator(final int mainNumber, final String dptId) { try { final MainType t = getMainType(getMainNumber(mainNumber, dptId)); if (t != null) return t.getSubTypes().get(dptId) != null; } catch (final NumberFormatException e) {} catch (final KNXException e) {} return false; ...
java
public static boolean hasTranslator(final int mainNumber, final String dptId) { try { final MainType t = getMainType(getMainNumber(mainNumber, dptId)); if (t != null) return t.getSubTypes().get(dptId) != null; } catch (final NumberFormatException e) {} catch (final KNXException e) {} return false; ...
[ "public", "static", "boolean", "hasTranslator", "(", "final", "int", "mainNumber", ",", "final", "String", "dptId", ")", "{", "try", "{", "final", "MainType", "t", "=", "getMainType", "(", "getMainNumber", "(", "mainNumber", ",", "dptId", ")", ")", ";", "i...
Does a lookup if the specified DPT is supported by a DPT translator. @param mainNumber data type main number, number &ge; 0; use 0 to infer translator type from <code>dptId</code> argument only @param dptId datapoint type ID to lookup this particular kind of value translation @return <code>true</code> iff translator w...
[ "Does", "a", "lookup", "if", "the", "specified", "DPT", "is", "supported", "by", "a", "DPT", "translator", "." ]
train
https://github.com/calimero-project/calimero-core/blob/7e6f547c6bd75fa985bfeb5b47ba671df2ea01e8/src/tuwien/auto/calimero/dptxlator/TranslatorTypes.java#L533-L543
westnordost/osmapi
src/main/java/de/westnordost/osmapi/changesets/ChangesetsDao.java
ChangesetsDao.getData
public void getData(long id, MapDataChangesHandler handler, MapDataFactory factory) { osm.makeAuthenticatedRequest(CHANGESET + "/" + id + "/download", null, new MapDataChangesParser(handler, factory)); }
java
public void getData(long id, MapDataChangesHandler handler, MapDataFactory factory) { osm.makeAuthenticatedRequest(CHANGESET + "/" + id + "/download", null, new MapDataChangesParser(handler, factory)); }
[ "public", "void", "getData", "(", "long", "id", ",", "MapDataChangesHandler", "handler", ",", "MapDataFactory", "factory", ")", "{", "osm", ".", "makeAuthenticatedRequest", "(", "CHANGESET", "+", "\"/\"", "+", "id", "+", "\"/download\"", ",", "null", ",", "new...
Get map data changes associated with the given changeset. @throws OsmAuthorizationException if not logged in @throws OsmNotFoundException if changeset with the given id does not exist
[ "Get", "map", "data", "changes", "associated", "with", "the", "given", "changeset", "." ]
train
https://github.com/westnordost/osmapi/blob/dda6978fd12e117d0cf17812bc22037f61e22c4b/src/main/java/de/westnordost/osmapi/changesets/ChangesetsDao.java#L193-L197
OpenLiberty/open-liberty
dev/com.ibm.ws.mongo/src/com/ibm/ws/mongo/internal/MongoService.java
MongoService.assertLibrary
private void assertLibrary(ClassLoader loader, boolean sslEnabled) { Class<?> MongoClient = loadClass(loader, com_mongodb_MongoClient); int minor = -1, major = -1; if (MongoClient == null) { // Version 1.0 of the mongo driver used these static variables, but were deprecated in a subs...
java
private void assertLibrary(ClassLoader loader, boolean sslEnabled) { Class<?> MongoClient = loadClass(loader, com_mongodb_MongoClient); int minor = -1, major = -1; if (MongoClient == null) { // Version 1.0 of the mongo driver used these static variables, but were deprecated in a subs...
[ "private", "void", "assertLibrary", "(", "ClassLoader", "loader", ",", "boolean", "sslEnabled", ")", "{", "Class", "<", "?", ">", "MongoClient", "=", "loadClass", "(", "loader", ",", "com_mongodb_MongoClient", ")", ";", "int", "minor", "=", "-", "1", ",", ...
This private worker method will assert that the configured shared library has the correct level of the mongoDB java driver. It will throw a RuntimeException if it is : <li> unable to locate com.mongodb.Mongo.class or com.mongodb.MongoDB.class <li> if the configured library is less than the min supported level
[ "This", "private", "worker", "method", "will", "assert", "that", "the", "configured", "shared", "library", "has", "the", "correct", "level", "of", "the", "mongoDB", "java", "driver", ".", "It", "will", "throw", "a", "RuntimeException", "if", "it", "is", ":",...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.mongo/src/com/ibm/ws/mongo/internal/MongoService.java#L823-L871
looly/hutool
hutool-core/src/main/java/cn/hutool/core/date/format/FastDateFormat.java
FastDateFormat.getTimeInstance
public static FastDateFormat getTimeInstance(final int style, final TimeZone timeZone, final Locale locale) { return cache.getTimeInstance(style, timeZone, locale); }
java
public static FastDateFormat getTimeInstance(final int style, final TimeZone timeZone, final Locale locale) { return cache.getTimeInstance(style, timeZone, locale); }
[ "public", "static", "FastDateFormat", "getTimeInstance", "(", "final", "int", "style", ",", "final", "TimeZone", "timeZone", ",", "final", "Locale", "locale", ")", "{", "return", "cache", ".", "getTimeInstance", "(", "style", ",", "timeZone", ",", "locale", ")...
获得 {@link FastDateFormat} 实例<br> 支持缓存 @param style time style: FULL, LONG, MEDIUM, or SHORT @param timeZone optional time zone, overrides time zone of formatted time @param locale {@link Locale} 日期地理位置 @return 本地化 {@link FastDateFormat}
[ "获得", "{", "@link", "FastDateFormat", "}", "实例<br", ">", "支持缓存" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/date/format/FastDateFormat.java#L207-L209
rey5137/material
app/src/main/java/com/rey/material/app/Recurring.java
Recurring.getDay
private static int getDay(Calendar cal, int dayOfWeek, int orderNum){ int day = cal.getActualMaximum(Calendar.DAY_OF_MONTH); cal.set(Calendar.DAY_OF_MONTH, day); int lastWeekday = cal.get(Calendar.DAY_OF_WEEK); int shift = lastWeekday >= dayOfWeek ? (lastWeekday - dayOfWeek) : (lastWeek...
java
private static int getDay(Calendar cal, int dayOfWeek, int orderNum){ int day = cal.getActualMaximum(Calendar.DAY_OF_MONTH); cal.set(Calendar.DAY_OF_MONTH, day); int lastWeekday = cal.get(Calendar.DAY_OF_WEEK); int shift = lastWeekday >= dayOfWeek ? (lastWeekday - dayOfWeek) : (lastWeek...
[ "private", "static", "int", "getDay", "(", "Calendar", "cal", ",", "int", "dayOfWeek", ",", "int", "orderNum", ")", "{", "int", "day", "=", "cal", ".", "getActualMaximum", "(", "Calendar", ".", "DAY_OF_MONTH", ")", ";", "cal", ".", "set", "(", "Calendar"...
Get the day in month of the current month of Calendar. @param cal @param dayOfWeek The day of week. @param orderNum The order number, 0 mean the first, -1 mean the last. @return The day int month
[ "Get", "the", "day", "in", "month", "of", "the", "current", "month", "of", "Calendar", "." ]
train
https://github.com/rey5137/material/blob/1bbcac2686a0023ef7720d3fe455bb116d115af8/app/src/main/java/com/rey/material/app/Recurring.java#L331-L351
alkacon/opencms-core
src/org/opencms/module/CmsModuleXmlHandler.java
CmsModuleXmlHandler.addParameter
public void addParameter(String key, String value) { if (CmsStringUtil.isNotEmpty(key)) { key = key.trim(); } if (CmsStringUtil.isNotEmpty(value)) { value = value.trim(); } m_parameters.put(key, value); if (LOG.isDebugEnabled()) { LOG....
java
public void addParameter(String key, String value) { if (CmsStringUtil.isNotEmpty(key)) { key = key.trim(); } if (CmsStringUtil.isNotEmpty(value)) { value = value.trim(); } m_parameters.put(key, value); if (LOG.isDebugEnabled()) { LOG....
[ "public", "void", "addParameter", "(", "String", "key", ",", "String", "value", ")", "{", "if", "(", "CmsStringUtil", ".", "isNotEmpty", "(", "key", ")", ")", "{", "key", "=", "key", ".", "trim", "(", ")", ";", "}", "if", "(", "CmsStringUtil", ".", ...
Adds a module parameter to the module configuration.<p> @param key the parameter key @param value the parameter value
[ "Adds", "a", "module", "parameter", "to", "the", "module", "configuration", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/module/CmsModuleXmlHandler.java#L611-L623
OpenLiberty/open-liberty
dev/com.ibm.ws.jdbc/src/com/ibm/ws/rsadapter/impl/WSConnectionRequestInfoImpl.java
WSConnectionRequestInfoImpl.matchSchema
private final boolean matchSchema(WSConnectionRequestInfoImpl cri){ // At least one of the CRIs should know the default value. String defaultValue = defaultSchema == null ? cri.defaultSchema : defaultSchema; return match(ivSchema, cri.ivSchema) || ivSchema == null && match(defaul...
java
private final boolean matchSchema(WSConnectionRequestInfoImpl cri){ // At least one of the CRIs should know the default value. String defaultValue = defaultSchema == null ? cri.defaultSchema : defaultSchema; return match(ivSchema, cri.ivSchema) || ivSchema == null && match(defaul...
[ "private", "final", "boolean", "matchSchema", "(", "WSConnectionRequestInfoImpl", "cri", ")", "{", "// At least one of the CRIs should know the default value.", "String", "defaultValue", "=", "defaultSchema", "==", "null", "?", "cri", ".", "defaultSchema", ":", "defaultSche...
Determine if the schema property matches. It is considered to match if - Both schema values are unspecified. - Both schema values are the same value. - One of the schema values is unspecified and the other CRI requested the default value. @return true if the schema match, otherwise false.
[ "Determine", "if", "the", "schema", "property", "matches", ".", "It", "is", "considered", "to", "match", "if", "-", "Both", "schema", "values", "are", "unspecified", ".", "-", "Both", "schema", "values", "are", "the", "same", "value", ".", "-", "One", "o...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jdbc/src/com/ibm/ws/rsadapter/impl/WSConnectionRequestInfoImpl.java#L591-L598
couchbase/java-dcp-client
src/main/java/com/couchbase/client/dcp/config/DcpControl.java
DcpControl.put
public DcpControl put(final Names name, final String value) { // Provide a default NOOP interval because the client needs // to know the interval in order to detect dead connections. if (name == Names.ENABLE_NOOP && get(Names.SET_NOOP_INTERVAL) == null) { put(Names.SET_NOOP_INTERVAL, Integer.toString(...
java
public DcpControl put(final Names name, final String value) { // Provide a default NOOP interval because the client needs // to know the interval in order to detect dead connections. if (name == Names.ENABLE_NOOP && get(Names.SET_NOOP_INTERVAL) == null) { put(Names.SET_NOOP_INTERVAL, Integer.toString(...
[ "public", "DcpControl", "put", "(", "final", "Names", "name", ",", "final", "String", "value", ")", "{", "// Provide a default NOOP interval because the client needs", "// to know the interval in order to detect dead connections.", "if", "(", "name", "==", "Names", ".", "EN...
Store/Override a control parameter. @param name the name of the control parameter. @param value the stringified version what it should be set to. @return the {@link DcpControl} instance for chainability.
[ "Store", "/", "Override", "a", "control", "parameter", "." ]
train
https://github.com/couchbase/java-dcp-client/blob/75359d8c081d6c575f8087cf7c28d24ab24c6421/src/main/java/com/couchbase/client/dcp/config/DcpControl.java#L81-L90
OpenTSDB/opentsdb
src/tsd/HttpSerializer.java
HttpSerializer.formatThreadStatsV1
public ChannelBuffer formatThreadStatsV1(final List<Map<String, Object>> stats) { throw new BadRequestException(HttpResponseStatus.NOT_IMPLEMENTED, "The requested API endpoint has not been implemented", this.getClass().getCanonicalName() + " has not implemented formatThreadStatsV1"); }
java
public ChannelBuffer formatThreadStatsV1(final List<Map<String, Object>> stats) { throw new BadRequestException(HttpResponseStatus.NOT_IMPLEMENTED, "The requested API endpoint has not been implemented", this.getClass().getCanonicalName() + " has not implemented formatThreadStatsV1"); }
[ "public", "ChannelBuffer", "formatThreadStatsV1", "(", "final", "List", "<", "Map", "<", "String", ",", "Object", ">", ">", "stats", ")", "{", "throw", "new", "BadRequestException", "(", "HttpResponseStatus", ".", "NOT_IMPLEMENTED", ",", "\"The requested API endpoin...
Format a list of thread statistics @param stats The thread statistics list to format @return A ChannelBuffer object to pass on to the caller @throws BadRequestException if the plugin has not implemented this method @since 2.2
[ "Format", "a", "list", "of", "thread", "statistics" ]
train
https://github.com/OpenTSDB/opentsdb/blob/3fc2d491c3c1ad397252c0a80203a69a3f9e3ef3/src/tsd/HttpSerializer.java#L726-L731
maxirosson/jdroid-android
jdroid-android-core/src/main/java/com/jdroid/android/utils/SharedPreferencesHelper.java
SharedPreferencesHelper.loadPreferenceAsFloat
public Float loadPreferenceAsFloat(String key, Float defaultValue) { Float value = defaultValue; if (hasPreference(key)) { value = getSharedPreferences().getFloat(key, 0); } logLoad(key, value); return value; }
java
public Float loadPreferenceAsFloat(String key, Float defaultValue) { Float value = defaultValue; if (hasPreference(key)) { value = getSharedPreferences().getFloat(key, 0); } logLoad(key, value); return value; }
[ "public", "Float", "loadPreferenceAsFloat", "(", "String", "key", ",", "Float", "defaultValue", ")", "{", "Float", "value", "=", "defaultValue", ";", "if", "(", "hasPreference", "(", "key", ")", ")", "{", "value", "=", "getSharedPreferences", "(", ")", ".", ...
Retrieve a Float value from the preferences. @param key The name of the preference to retrieve @param defaultValue Value to return if this preference does not exist @return the preference value if it exists, or defaultValue.
[ "Retrieve", "a", "Float", "value", "from", "the", "preferences", "." ]
train
https://github.com/maxirosson/jdroid-android/blob/1ba9cae56a16fa36bdb2c9c04379853f0300707f/jdroid-android-core/src/main/java/com/jdroid/android/utils/SharedPreferencesHelper.java#L281-L288
jboss/jboss-servlet-api_spec
src/main/java/javax/servlet/http/HttpUtils.java
HttpUtils.parseQueryString
public static Hashtable<String, String[]> parseQueryString(String s) { String valArray[] = null; if (s == null) { throw new IllegalArgumentException(); } Hashtable<String, String[]> ht = new Hashtable<String, String[]>(); StringBuilder sb = new StringBuilder(); ...
java
public static Hashtable<String, String[]> parseQueryString(String s) { String valArray[] = null; if (s == null) { throw new IllegalArgumentException(); } Hashtable<String, String[]> ht = new Hashtable<String, String[]>(); StringBuilder sb = new StringBuilder(); ...
[ "public", "static", "Hashtable", "<", "String", ",", "String", "[", "]", ">", "parseQueryString", "(", "String", "s", ")", "{", "String", "valArray", "[", "]", "=", "null", ";", "if", "(", "s", "==", "null", ")", "{", "throw", "new", "IllegalArgumentEx...
Parses a query string passed from the client to the server and builds a <code>HashTable</code> object with key-value pairs. The query string should be in the form of a string packaged by the GET or POST method, that is, it should have key-value pairs in the form <i>key=value</i>, with each pair separated from the next ...
[ "Parses", "a", "query", "string", "passed", "from", "the", "client", "to", "the", "server", "and", "builds", "a", "<code", ">", "HashTable<", "/", "code", ">", "object", "with", "key", "-", "value", "pairs", ".", "The", "query", "string", "should", "be",...
train
https://github.com/jboss/jboss-servlet-api_spec/blob/5bc96f2b833c072baff6eb8ae49bc7b5e503e9b2/src/main/java/javax/servlet/http/HttpUtils.java#L117-L153
kaazing/gateway
samples/security/TokenLoginModule.java
TokenLoginModule.processToken
private void processToken(String tokenData) throws JSONException, LoginException { JSONObject json = new JSONObject(tokenData); // Validate that the token hasn't expired. ZonedDateTime expires = ZonedDateTime.parse(json.getString("tokenExpires")); ZonedDateTime now = ZonedDateTime.now(...
java
private void processToken(String tokenData) throws JSONException, LoginException { JSONObject json = new JSONObject(tokenData); // Validate that the token hasn't expired. ZonedDateTime expires = ZonedDateTime.parse(json.getString("tokenExpires")); ZonedDateTime now = ZonedDateTime.now(...
[ "private", "void", "processToken", "(", "String", "tokenData", ")", "throws", "JSONException", ",", "LoginException", "{", "JSONObject", "json", "=", "new", "JSONObject", "(", "tokenData", ")", ";", "// Validate that the token hasn't expired.", "ZonedDateTime", "expires...
Validate the token and extract the username to add to shared state. An exception is thrown if the token is found to be invalid This method expects the token to be in JSON format: { username: "joe", nonce: "5171483440790326", tokenExpires: "2017-04-20T15:48:49.187Z" }
[ "Validate", "the", "token", "and", "extract", "the", "username", "to", "add", "to", "shared", "state", ".", "An", "exception", "is", "thrown", "if", "the", "token", "is", "found", "to", "be", "invalid" ]
train
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/samples/security/TokenLoginModule.java#L199-L230
sdl/odata
odata_renderer/src/main/java/com/sdl/odata/renderer/metadata/MetadataDocumentWriter.java
MetadataDocumentWriter.writeMetadataDocument
public void writeMetadataDocument() throws ODataRenderException { try { xmlWriter.writeStartElement(EDMX_NS, EDMX); xmlWriter.writeNamespace(EDMX_PREFIX, EDMX_NS); xmlWriter.writeAttribute(VERSION, ODATA_VERSION); xmlWriter.writeStartElement(EDMX_NS, EDMX_DATA_SE...
java
public void writeMetadataDocument() throws ODataRenderException { try { xmlWriter.writeStartElement(EDMX_NS, EDMX); xmlWriter.writeNamespace(EDMX_PREFIX, EDMX_NS); xmlWriter.writeAttribute(VERSION, ODATA_VERSION); xmlWriter.writeStartElement(EDMX_NS, EDMX_DATA_SE...
[ "public", "void", "writeMetadataDocument", "(", ")", "throws", "ODataRenderException", "{", "try", "{", "xmlWriter", ".", "writeStartElement", "(", "EDMX_NS", ",", "EDMX", ")", ";", "xmlWriter", ".", "writeNamespace", "(", "EDMX_PREFIX", ",", "EDMX_NS", ")", ";"...
Write the 'Metadata Document'. @throws ODataRenderException if unable to render metadata document
[ "Write", "the", "Metadata", "Document", "." ]
train
https://github.com/sdl/odata/blob/eb747d73e9af0f4e59a25b82ed656e526a7e2189/odata_renderer/src/main/java/com/sdl/odata/renderer/metadata/MetadataDocumentWriter.java#L122-L166
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/lss/LssClient.java
LssClient.getDomainSummaryStatistics
public GetDomainSummaryStatisticsResponse getDomainSummaryStatistics(String startTime, String endTime) { GetDomainSummaryStatisticsRequest request = new GetDomainSummaryStatisticsRequest(); request.withStartTime(startTime).withEndTime(endTime); return getDomainSummaryStatistics(request); }
java
public GetDomainSummaryStatisticsResponse getDomainSummaryStatistics(String startTime, String endTime) { GetDomainSummaryStatisticsRequest request = new GetDomainSummaryStatisticsRequest(); request.withStartTime(startTime).withEndTime(endTime); return getDomainSummaryStatistics(request); }
[ "public", "GetDomainSummaryStatisticsResponse", "getDomainSummaryStatistics", "(", "String", "startTime", ",", "String", "endTime", ")", "{", "GetDomainSummaryStatisticsRequest", "request", "=", "new", "GetDomainSummaryStatisticsRequest", "(", ")", ";", "request", ".", "wit...
get all domains' summary statistics in the live stream service. @param startTime start time @param endTime start time @return the response
[ "get", "all", "domains", "summary", "statistics", "in", "the", "live", "stream", "service", "." ]
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/lss/LssClient.java#L1840-L1844
Mozu/mozu-java
mozu-javaasync-core/src/main/java/com/mozu/api/urls/platform/entitylists/EntityUrl.java
EntityUrl.getEntityUrl
public static MozuUrl getEntityUrl(String entityListFullName, String id, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/platform/entitylists/{entityListFullName}/entities/{id}?responseFields={responseFields}"); formatter.formatUrl("entityListFullName", entityListFullName); formatter...
java
public static MozuUrl getEntityUrl(String entityListFullName, String id, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/platform/entitylists/{entityListFullName}/entities/{id}?responseFields={responseFields}"); formatter.formatUrl("entityListFullName", entityListFullName); formatter...
[ "public", "static", "MozuUrl", "getEntityUrl", "(", "String", "entityListFullName", ",", "String", "id", ",", "String", "responseFields", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/platform/entitylists/{entityListFullName}/entities/{id}?...
Get Resource Url for GetEntity @param entityListFullName The full name of the EntityList including namespace in name@nameSpace format @param id Unique identifier of the customer segment to retrieve. @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside...
[ "Get", "Resource", "Url", "for", "GetEntity" ]
train
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/platform/entitylists/EntityUrl.java#L23-L30
moparisthebest/beehive
beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/scoping/ScopedServletUtils.java
ScopedServletUtils.getRelativeURI
public static final String getRelativeURI( String contextPath, String uri ) { String requestUrl = uri; int overlap = requestUrl.indexOf( contextPath + '/' ); assert overlap != -1 : "contextPath: " + contextPath + ", uri: " + uri; return requestUrl.substring( overlap + contextPath.len...
java
public static final String getRelativeURI( String contextPath, String uri ) { String requestUrl = uri; int overlap = requestUrl.indexOf( contextPath + '/' ); assert overlap != -1 : "contextPath: " + contextPath + ", uri: " + uri; return requestUrl.substring( overlap + contextPath.len...
[ "public", "static", "final", "String", "getRelativeURI", "(", "String", "contextPath", ",", "String", "uri", ")", "{", "String", "requestUrl", "=", "uri", ";", "int", "overlap", "=", "requestUrl", ".", "indexOf", "(", "contextPath", "+", "'", "'", ")", ";"...
Get a URI relative to a given webapp root. @param contextPath the webapp context path, e.g., "/myWebapp" @param uri the URI which should be made relative.
[ "Get", "a", "URI", "relative", "to", "a", "given", "webapp", "root", "." ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/scoping/ScopedServletUtils.java#L395-L401
rvs-fluid-it/mvn-fluid-cd
mvn-ext-freeze/src/main/java/be/fluid_it/mvn/cd/x/freeze/replace/FreezeHandler.java
FreezeHandler.getName
private String getName(String s1, String s2) { if (s1 == null || "".equals(s1)) return s2; else return s1; }
java
private String getName(String s1, String s2) { if (s1 == null || "".equals(s1)) return s2; else return s1; }
[ "private", "String", "getName", "(", "String", "s1", ",", "String", "s2", ")", "{", "if", "(", "s1", "==", "null", "||", "\"\"", ".", "equals", "(", "s1", ")", ")", "return", "s2", ";", "else", "return", "s1", ";", "}" ]
If the first String parameter is nonempty, return it, else return the second string parameter. @param s1 The string to be tested. @param s2 The alternate String. @return s1 if it isn't empty, else s2.
[ "If", "the", "first", "String", "parameter", "is", "nonempty", "return", "it", "else", "return", "the", "second", "string", "parameter", "." ]
train
https://github.com/rvs-fluid-it/mvn-fluid-cd/blob/2aad8ed1cb40f94bd24bad7e6a127956cc277077/mvn-ext-freeze/src/main/java/be/fluid_it/mvn/cd/x/freeze/replace/FreezeHandler.java#L261-L264
wellner/jcarafe
jcarafe-core/src/main/java/cern/colt/list/BooleanArrayList.java
BooleanArrayList.replaceFromToWithFrom
public void replaceFromToWithFrom(int from, int to, AbstractBooleanList other, int otherFrom) { // overridden for performance only. if (! (other instanceof BooleanArrayList)) { // slower super.replaceFromToWithFrom(from,to,other,otherFrom); return; } int length=to-from+1; if (length>0) { checkRang...
java
public void replaceFromToWithFrom(int from, int to, AbstractBooleanList other, int otherFrom) { // overridden for performance only. if (! (other instanceof BooleanArrayList)) { // slower super.replaceFromToWithFrom(from,to,other,otherFrom); return; } int length=to-from+1; if (length>0) { checkRang...
[ "public", "void", "replaceFromToWithFrom", "(", "int", "from", ",", "int", "to", ",", "AbstractBooleanList", "other", ",", "int", "otherFrom", ")", "{", "// overridden for performance only.\r", "if", "(", "!", "(", "other", "instanceof", "BooleanArrayList", ")", "...
Replaces a number of elements in the receiver with the same number of elements of another list. Replaces elements in the receiver, between <code>from</code> (inclusive) and <code>to</code> (inclusive), with elements of <code>other</code>, starting from <code>otherFrom</code> (inclusive). @param from the position of th...
[ "Replaces", "a", "number", "of", "elements", "in", "the", "receiver", "with", "the", "same", "number", "of", "elements", "of", "another", "list", ".", "Replaces", "elements", "in", "the", "receiver", "between", "<code", ">", "from<", "/", "code", ">", "(",...
train
https://github.com/wellner/jcarafe/blob/ab8b0a83dbf600fe80c27711815c90bd3055b217/jcarafe-core/src/main/java/cern/colt/list/BooleanArrayList.java#L365-L378
alkacon/opencms-core
src/org/opencms/jlan/CmsByteBuffer.java
CmsByteBuffer.writeBytes
public void writeBytes(byte[] src, int srcStart, int destStart, int len) { int newEnd = destStart + len; ensureCapacity(newEnd); if (newEnd > m_size) { m_size = newEnd; } System.arraycopy(src, srcStart, m_buffer, destStart, len); }
java
public void writeBytes(byte[] src, int srcStart, int destStart, int len) { int newEnd = destStart + len; ensureCapacity(newEnd); if (newEnd > m_size) { m_size = newEnd; } System.arraycopy(src, srcStart, m_buffer, destStart, len); }
[ "public", "void", "writeBytes", "(", "byte", "[", "]", "src", ",", "int", "srcStart", ",", "int", "destStart", ",", "int", "len", ")", "{", "int", "newEnd", "=", "destStart", "+", "len", ";", "ensureCapacity", "(", "newEnd", ")", ";", "if", "(", "new...
Writes some bytes to this buffer, expanding the buffer if necessary.<p> @param src the source from which to write the bytes @param srcStart the start index in the source array @param destStart the start index in this buffer @param len the number of bytes to write
[ "Writes", "some", "bytes", "to", "this", "buffer", "expanding", "the", "buffer", "if", "necessary", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jlan/CmsByteBuffer.java#L149-L157