repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 | partition stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|
cenobites/struts2-json-plugin | src/main/java/es/cenobit/struts2/json/PackageBasedActionConfigBuilder.java | PackageBasedActionConfigBuilder.checkPackageLocators | protected boolean checkPackageLocators(String classPackageName) {
if (packageLocators != null && !disablePackageLocatorsScanning && classPackageName.length() > 0
&& (packageLocatorsBasePackage == null || classPackageName.startsWith(packageLocatorsBasePackage))) {
for (String packageLocator : packageLocators) {... | java | protected boolean checkPackageLocators(String classPackageName) {
if (packageLocators != null && !disablePackageLocatorsScanning && classPackageName.length() > 0
&& (packageLocatorsBasePackage == null || classPackageName.startsWith(packageLocatorsBasePackage))) {
for (String packageLocator : packageLocators) {... | [
"protected",
"boolean",
"checkPackageLocators",
"(",
"String",
"classPackageName",
")",
"{",
"if",
"(",
"packageLocators",
"!=",
"null",
"&&",
"!",
"disablePackageLocatorsScanning",
"&&",
"classPackageName",
".",
"length",
"(",
")",
">",
"0",
"&&",
"(",
"packageLo... | Checks if class package match provided list of package locators
@param classPackageName
name of class package
@return true if class package is on the {@link #packageLocators} list | [
"Checks",
"if",
"class",
"package",
"match",
"provided",
"list",
"of",
"package",
"locators"
] | 00f948942d85b6f696d46672332ff7b3942ecb1b | https://github.com/cenobites/struts2-json-plugin/blob/00f948942d85b6f696d46672332ff7b3942ecb1b/src/main/java/es/cenobit/struts2/json/PackageBasedActionConfigBuilder.java#L439-L450 | train |
openEHR/adl2-core | adl2core-model-rm-openehr/src/main/java/org/openehr/adl/rm/RmPath.java | RmPath.parseSegments | private static List<Segment> parseSegments(String origPathStr) {
String pathStr = origPathStr;
if (!pathStr.startsWith("/")) {
pathStr = pathStr + "/";
}
List<Segment> result = new ArrayList<>();
for (String segmentStr : PATH_SPLITTER.split(pathStr)) {
Ma... | java | private static List<Segment> parseSegments(String origPathStr) {
String pathStr = origPathStr;
if (!pathStr.startsWith("/")) {
pathStr = pathStr + "/";
}
List<Segment> result = new ArrayList<>();
for (String segmentStr : PATH_SPLITTER.split(pathStr)) {
Ma... | [
"private",
"static",
"List",
"<",
"Segment",
">",
"parseSegments",
"(",
"String",
"origPathStr",
")",
"{",
"String",
"pathStr",
"=",
"origPathStr",
";",
"if",
"(",
"!",
"pathStr",
".",
"startsWith",
"(",
"\"/\"",
")",
")",
"{",
"pathStr",
"=",
"pathStr",
... | currently does not support paths with name constrains | [
"currently",
"does",
"not",
"support",
"paths",
"with",
"name",
"constrains"
] | dd5c1c0fe7ef5e43fbfaf6a0389990ba5380e22c | https://github.com/openEHR/adl2-core/blob/dd5c1c0fe7ef5e43fbfaf6a0389990ba5380e22c/adl2core-model-rm-openehr/src/main/java/org/openehr/adl/rm/RmPath.java#L163-L181 | train |
transloadit/java-sdk | src/main/java/com/transloadit/sdk/Request.java | Request.get | okhttp3.Response get(String url, Map<String, Object> params)
throws RequestException, LocalOperationException {
String fullUrl = getFullUrl(url);
okhttp3.Request request = new okhttp3.Request.Builder()
.url(addUrlParams(fullUrl, toPayload(params)))
.addHeader... | java | okhttp3.Response get(String url, Map<String, Object> params)
throws RequestException, LocalOperationException {
String fullUrl = getFullUrl(url);
okhttp3.Request request = new okhttp3.Request.Builder()
.url(addUrlParams(fullUrl, toPayload(params)))
.addHeader... | [
"okhttp3",
".",
"Response",
"get",
"(",
"String",
"url",
",",
"Map",
"<",
"String",
",",
"Object",
">",
"params",
")",
"throws",
"RequestException",
",",
"LocalOperationException",
"{",
"String",
"fullUrl",
"=",
"getFullUrl",
"(",
"url",
")",
";",
"okhttp3",... | Makes http GET request.
@param url url to makes request to
@param params data to add to params field
@return {@link okhttp3.Response}
@throws RequestException
@throws LocalOperationException | [
"Makes",
"http",
"GET",
"request",
"."
] | 9326c540a66f77b3d907d0b2c05bff1145ca14f7 | https://github.com/transloadit/java-sdk/blob/9326c540a66f77b3d907d0b2c05bff1145ca14f7/src/main/java/com/transloadit/sdk/Request.java#L62-L76 | train |
transloadit/java-sdk | src/main/java/com/transloadit/sdk/Request.java | Request.delete | okhttp3.Response delete(String url, Map<String, Object> params)
throws RequestException, LocalOperationException {
okhttp3.Request request = new okhttp3.Request.Builder()
.url(getFullUrl(url))
.delete(getBody(toPayload(params), null))
.addHeader("Trans... | java | okhttp3.Response delete(String url, Map<String, Object> params)
throws RequestException, LocalOperationException {
okhttp3.Request request = new okhttp3.Request.Builder()
.url(getFullUrl(url))
.delete(getBody(toPayload(params), null))
.addHeader("Trans... | [
"okhttp3",
".",
"Response",
"delete",
"(",
"String",
"url",
",",
"Map",
"<",
"String",
",",
"Object",
">",
"params",
")",
"throws",
"RequestException",
",",
"LocalOperationException",
"{",
"okhttp3",
".",
"Request",
"request",
"=",
"new",
"okhttp3",
".",
"Re... | Makes http DELETE request
@param url url to makes request to
@param params data to add to params field
@return {@link okhttp3.Response}
@throws RequestException
@throws LocalOperationException | [
"Makes",
"http",
"DELETE",
"request"
] | 9326c540a66f77b3d907d0b2c05bff1145ca14f7 | https://github.com/transloadit/java-sdk/blob/9326c540a66f77b3d907d0b2c05bff1145ca14f7/src/main/java/com/transloadit/sdk/Request.java#L127-L140 | train |
transloadit/java-sdk | src/main/java/com/transloadit/sdk/Request.java | Request.getFullUrl | private String getFullUrl(String url) {
return url.startsWith("https://") || url.startsWith("http://") ? url : transloadit.getHostUrl() + url;
} | java | private String getFullUrl(String url) {
return url.startsWith("https://") || url.startsWith("http://") ? url : transloadit.getHostUrl() + url;
} | [
"private",
"String",
"getFullUrl",
"(",
"String",
"url",
")",
"{",
"return",
"url",
".",
"startsWith",
"(",
"\"https://\"",
")",
"||",
"url",
".",
"startsWith",
"(",
"\"http://\"",
")",
"?",
"url",
":",
"transloadit",
".",
"getHostUrl",
"(",
")",
"+",
"u... | Converts url path to the Transloadit full url.
Returns the url passed if it is already full.
@param url
@return String | [
"Converts",
"url",
"path",
"to",
"the",
"Transloadit",
"full",
"url",
".",
"Returns",
"the",
"url",
"passed",
"if",
"it",
"is",
"already",
"full",
"."
] | 9326c540a66f77b3d907d0b2c05bff1145ca14f7 | https://github.com/transloadit/java-sdk/blob/9326c540a66f77b3d907d0b2c05bff1145ca14f7/src/main/java/com/transloadit/sdk/Request.java#L173-L175 | train |
transloadit/java-sdk | src/main/java/com/transloadit/sdk/Request.java | Request.toPayload | private Map<String, String> toPayload(Map<String, Object> data) throws LocalOperationException {
Map<String, Object> dataClone = new HashMap<String, Object>(data);
dataClone.put("auth", getAuthData());
Map<String, String> payload = new HashMap<String, String>();
payload.put("params", js... | java | private Map<String, String> toPayload(Map<String, Object> data) throws LocalOperationException {
Map<String, Object> dataClone = new HashMap<String, Object>(data);
dataClone.put("auth", getAuthData());
Map<String, String> payload = new HashMap<String, String>();
payload.put("params", js... | [
"private",
"Map",
"<",
"String",
",",
"String",
">",
"toPayload",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"data",
")",
"throws",
"LocalOperationException",
"{",
"Map",
"<",
"String",
",",
"Object",
">",
"dataClone",
"=",
"new",
"HashMap",
"<",
"St... | Returns data tree structured as Transloadit expects it.
@param data
@return {@link Map}
@throws LocalOperationException | [
"Returns",
"data",
"tree",
"structured",
"as",
"Transloadit",
"expects",
"it",
"."
] | 9326c540a66f77b3d907d0b2c05bff1145ca14f7 | https://github.com/transloadit/java-sdk/blob/9326c540a66f77b3d907d0b2c05bff1145ca14f7/src/main/java/com/transloadit/sdk/Request.java#L254-L265 | train |
transloadit/java-sdk | src/main/java/com/transloadit/sdk/Request.java | Request.jsonifyData | private String jsonifyData(Map<String, ? extends Object> data) {
JSONObject jsonData = new JSONObject(data);
return jsonData.toString();
} | java | private String jsonifyData(Map<String, ? extends Object> data) {
JSONObject jsonData = new JSONObject(data);
return jsonData.toString();
} | [
"private",
"String",
"jsonifyData",
"(",
"Map",
"<",
"String",
",",
"?",
"extends",
"Object",
">",
"data",
")",
"{",
"JSONObject",
"jsonData",
"=",
"new",
"JSONObject",
"(",
"data",
")",
";",
"return",
"jsonData",
".",
"toString",
"(",
")",
";",
"}"
] | converts Map of data to json string
@param data map data to converted to json
@return {@link String} | [
"converts",
"Map",
"of",
"data",
"to",
"json",
"string"
] | 9326c540a66f77b3d907d0b2c05bff1145ca14f7 | https://github.com/transloadit/java-sdk/blob/9326c540a66f77b3d907d0b2c05bff1145ca14f7/src/main/java/com/transloadit/sdk/Request.java#L273-L277 | train |
wcm-io/wcm-io-sling | commons/src/main/java/io/wcm/sling/commons/request/RequestParam.java | RequestParam.convertISO88591toUTF8 | private static String convertISO88591toUTF8(String value) {
try {
return new String(value.getBytes(CharEncoding.ISO_8859_1), CharEncoding.UTF_8);
}
catch (UnsupportedEncodingException ex) {
// ignore and fallback to original encoding
return value;
}
} | java | private static String convertISO88591toUTF8(String value) {
try {
return new String(value.getBytes(CharEncoding.ISO_8859_1), CharEncoding.UTF_8);
}
catch (UnsupportedEncodingException ex) {
// ignore and fallback to original encoding
return value;
}
} | [
"private",
"static",
"String",
"convertISO88591toUTF8",
"(",
"String",
"value",
")",
"{",
"try",
"{",
"return",
"new",
"String",
"(",
"value",
".",
"getBytes",
"(",
"CharEncoding",
".",
"ISO_8859_1",
")",
",",
"CharEncoding",
".",
"UTF_8",
")",
";",
"}",
"... | Converts a string from ISO-8559-1 encoding to UTF-8.
@param value ISO-8559-1 value
@return UTF-8 value | [
"Converts",
"a",
"string",
"from",
"ISO",
"-",
"8559",
"-",
"1",
"encoding",
"to",
"UTF",
"-",
"8",
"."
] | 90adbe432469378794b5695c72e9cdfa2b7d36f1 | https://github.com/wcm-io/wcm-io-sling/blob/90adbe432469378794b5695c72e9cdfa2b7d36f1/commons/src/main/java/io/wcm/sling/commons/request/RequestParam.java#L308-L316 | train |
cenobites/struts2-json-plugin | src/main/java/es/cenobit/struts2/json/JsonActionInvocation.java | JsonActionInvocation.getResult | @Override
public Result getResult() throws Exception {
Result returnResult = result;
// If we've chained to other Actions, we need to find the last result
while (returnResult instanceof ActionChainResult) {
ActionProxy aProxy = ((ActionChainResult) returnResult).getProxy();
if (aProxy != null) {
Resu... | java | @Override
public Result getResult() throws Exception {
Result returnResult = result;
// If we've chained to other Actions, we need to find the last result
while (returnResult instanceof ActionChainResult) {
ActionProxy aProxy = ((ActionChainResult) returnResult).getProxy();
if (aProxy != null) {
Resu... | [
"@",
"Override",
"public",
"Result",
"getResult",
"(",
")",
"throws",
"Exception",
"{",
"Result",
"returnResult",
"=",
"result",
";",
"// If we've chained to other Actions, we need to find the last result",
"while",
"(",
"returnResult",
"instanceof",
"ActionChainResult",
")... | If the DefaultActionInvocation has been executed before and the Result is
an instance of ActionChainResult, this method will walk down the chain of
ActionChainResults until it finds a non-chain result, which will be
returned. If the DefaultActionInvocation's result has not been executed
before, the Result instance will... | [
"If",
"the",
"DefaultActionInvocation",
"has",
"been",
"executed",
"before",
"and",
"the",
"Result",
"is",
"an",
"instance",
"of",
"ActionChainResult",
"this",
"method",
"will",
"walk",
"down",
"the",
"chain",
"of",
"ActionChainResults",
"until",
"it",
"finds",
... | 00f948942d85b6f696d46672332ff7b3942ecb1b | https://github.com/cenobites/struts2-json-plugin/blob/00f948942d85b6f696d46672332ff7b3942ecb1b/src/main/java/es/cenobit/struts2/json/JsonActionInvocation.java#L88-L110 | train |
cenobites/struts2-json-plugin | src/main/java/es/cenobit/struts2/json/JsonActionInvocation.java | JsonActionInvocation.executeResult | private void executeResult() throws Exception {
result = createResult();
String timerKey = "executeResult: " + getResultCode();
try {
UtilTimerStack.push(timerKey);
if (result != null) {
result.execute(this);
} else if (resultCode != null && !Action.NONE.equals(resultCode)) {
throw new Configura... | java | private void executeResult() throws Exception {
result = createResult();
String timerKey = "executeResult: " + getResultCode();
try {
UtilTimerStack.push(timerKey);
if (result != null) {
result.execute(this);
} else if (resultCode != null && !Action.NONE.equals(resultCode)) {
throw new Configura... | [
"private",
"void",
"executeResult",
"(",
")",
"throws",
"Exception",
"{",
"result",
"=",
"createResult",
"(",
")",
";",
"String",
"timerKey",
"=",
"\"executeResult: \"",
"+",
"getResultCode",
"(",
")",
";",
"try",
"{",
"UtilTimerStack",
".",
"push",
"(",
"ti... | Uses getResult to get the final Result and executes it
@throws ConfigurationException
If not result can be found with the returned code | [
"Uses",
"getResult",
"to",
"get",
"the",
"final",
"Result",
"and",
"executes",
"it"
] | 00f948942d85b6f696d46672332ff7b3942ecb1b | https://github.com/cenobites/struts2-json-plugin/blob/00f948942d85b6f696d46672332ff7b3942ecb1b/src/main/java/es/cenobit/struts2/json/JsonActionInvocation.java#L259-L279 | train |
taimos/dvalin | jaxrs/src/main/java/de/taimos/dvalin/jaxrs/websocket/ServerJSONWebSocketAdapter.java | ServerJSONWebSocketAdapter.convert | protected <C> C convert(Object object, Class<C> targetClass) {
return this.mapper.convertValue(object, targetClass);
} | java | protected <C> C convert(Object object, Class<C> targetClass) {
return this.mapper.convertValue(object, targetClass);
} | [
"protected",
"<",
"C",
">",
"C",
"convert",
"(",
"Object",
"object",
",",
"Class",
"<",
"C",
">",
"targetClass",
")",
"{",
"return",
"this",
".",
"mapper",
".",
"convertValue",
"(",
"object",
",",
"targetClass",
")",
";",
"}"
] | convert object into another class using the JSON mapper
@param <C> the generic target type
@param object the object to convert
@param targetClass the class of the target object
@return the converted object
@throws IllegalArgumentException if conversion fails | [
"convert",
"object",
"into",
"another",
"class",
"using",
"the",
"JSON",
"mapper"
] | ff8f1bf594e43d7e8ca8de0b4da9f923b66a1a47 | https://github.com/taimos/dvalin/blob/ff8f1bf594e43d7e8ca8de0b4da9f923b66a1a47/jaxrs/src/main/java/de/taimos/dvalin/jaxrs/websocket/ServerJSONWebSocketAdapter.java#L102-L104 | train |
taimos/dvalin | jaxrs/src/main/java/de/taimos/dvalin/jaxrs/websocket/ServerJSONWebSocketAdapter.java | ServerJSONWebSocketAdapter.sendObjectToSocket | protected final void sendObjectToSocket(Object objectToSend, WriteCallback cb) {
Session sess = this.getSession();
if (sess != null) {
String json;
try {
json = this.mapper.writeValueAsString(objectToSend);
} catch (JsonProcessingException e) {
... | java | protected final void sendObjectToSocket(Object objectToSend, WriteCallback cb) {
Session sess = this.getSession();
if (sess != null) {
String json;
try {
json = this.mapper.writeValueAsString(objectToSend);
} catch (JsonProcessingException e) {
... | [
"protected",
"final",
"void",
"sendObjectToSocket",
"(",
"Object",
"objectToSend",
",",
"WriteCallback",
"cb",
")",
"{",
"Session",
"sess",
"=",
"this",
".",
"getSession",
"(",
")",
";",
"if",
"(",
"sess",
"!=",
"null",
")",
"{",
"String",
"json",
";",
"... | send object to client and serialize it using JSON
@param objectToSend the object to send
@param cb the callback after sending the message | [
"send",
"object",
"to",
"client",
"and",
"serialize",
"it",
"using",
"JSON"
] | ff8f1bf594e43d7e8ca8de0b4da9f923b66a1a47 | https://github.com/taimos/dvalin/blob/ff8f1bf594e43d7e8ca8de0b4da9f923b66a1a47/jaxrs/src/main/java/de/taimos/dvalin/jaxrs/websocket/ServerJSONWebSocketAdapter.java#L133-L144 | train |
dhemery/victor | src/main/java/com/dhemery/victor/discovery/IosApplicationBundle.java | IosApplicationBundle.deviceTypes | public List<String> deviceTypes() {
Integer count = json().size(DEVICE_FAMILIES);
List<String> deviceTypes = new ArrayList<String>(count);
for(int i = 0 ; i < count ; i++) {
String familyNumber = json().stringValue(DEVICE_FAMILIES, i);
if(familyNumber.equals("1")) deviceT... | java | public List<String> deviceTypes() {
Integer count = json().size(DEVICE_FAMILIES);
List<String> deviceTypes = new ArrayList<String>(count);
for(int i = 0 ; i < count ; i++) {
String familyNumber = json().stringValue(DEVICE_FAMILIES, i);
if(familyNumber.equals("1")) deviceT... | [
"public",
"List",
"<",
"String",
">",
"deviceTypes",
"(",
")",
"{",
"Integer",
"count",
"=",
"json",
"(",
")",
".",
"size",
"(",
"DEVICE_FAMILIES",
")",
";",
"List",
"<",
"String",
">",
"deviceTypes",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
... | The list of device types on which this application can run. | [
"The",
"list",
"of",
"device",
"types",
"on",
"which",
"this",
"application",
"can",
"run",
"."
] | 52fa85737f01965cc2b15bf62d9b86b5ad6a974b | https://github.com/dhemery/victor/blob/52fa85737f01965cc2b15bf62d9b86b5ad6a974b/src/main/java/com/dhemery/victor/discovery/IosApplicationBundle.java#L26-L35 | train |
taimos/dvalin | jaxrs/src/main/java/de/taimos/dvalin/jaxrs/JaxRsAnnotationScanner.java | JaxRsAnnotationScanner.hasAnnotation | public static boolean hasAnnotation(Method method, Class<? extends Annotation> annotation) {
return !searchForAnnotation(method, annotation).isEmpty();
} | java | public static boolean hasAnnotation(Method method, Class<? extends Annotation> annotation) {
return !searchForAnnotation(method, annotation).isEmpty();
} | [
"public",
"static",
"boolean",
"hasAnnotation",
"(",
"Method",
"method",
",",
"Class",
"<",
"?",
"extends",
"Annotation",
">",
"annotation",
")",
"{",
"return",
"!",
"searchForAnnotation",
"(",
"method",
",",
"annotation",
")",
".",
"isEmpty",
"(",
")",
";",... | Checks if there is an annotation of the given type on this method or on type level for all interfaces and superclasses
@param method the method to scan
@param annotation the annotation to search for
@return <i>true</i> if the given annotation is present on method or type level annotations in the type hierarchy | [
"Checks",
"if",
"there",
"is",
"an",
"annotation",
"of",
"the",
"given",
"type",
"on",
"this",
"method",
"or",
"on",
"type",
"level",
"for",
"all",
"interfaces",
"and",
"superclasses"
] | ff8f1bf594e43d7e8ca8de0b4da9f923b66a1a47 | https://github.com/taimos/dvalin/blob/ff8f1bf594e43d7e8ca8de0b4da9f923b66a1a47/jaxrs/src/main/java/de/taimos/dvalin/jaxrs/JaxRsAnnotationScanner.java#L48-L50 | train |
taimos/dvalin | jaxrs/src/main/java/de/taimos/dvalin/jaxrs/JaxRsAnnotationScanner.java | JaxRsAnnotationScanner.searchForAnnotation | public static <T extends Annotation> List<T> searchForAnnotation(Method method, Class<T> annotation) {
if (method == null) {
return Lists.newArrayList();
}
return searchClasses(method, annotation, method.getDeclaringClass());
} | java | public static <T extends Annotation> List<T> searchForAnnotation(Method method, Class<T> annotation) {
if (method == null) {
return Lists.newArrayList();
}
return searchClasses(method, annotation, method.getDeclaringClass());
} | [
"public",
"static",
"<",
"T",
"extends",
"Annotation",
">",
"List",
"<",
"T",
">",
"searchForAnnotation",
"(",
"Method",
"method",
",",
"Class",
"<",
"T",
">",
"annotation",
")",
"{",
"if",
"(",
"method",
"==",
"null",
")",
"{",
"return",
"Lists",
".",... | Searches for all annotations of the given type on this method or on type level for all interfaces and superclasses
@param method the method to scan
@param annotation the annotation to search for
@param <T> the type of the annotation
@return the list of all method or type level annotations in the type hierar... | [
"Searches",
"for",
"all",
"annotations",
"of",
"the",
"given",
"type",
"on",
"this",
"method",
"or",
"on",
"type",
"level",
"for",
"all",
"interfaces",
"and",
"superclasses"
] | ff8f1bf594e43d7e8ca8de0b4da9f923b66a1a47 | https://github.com/taimos/dvalin/blob/ff8f1bf594e43d7e8ca8de0b4da9f923b66a1a47/jaxrs/src/main/java/de/taimos/dvalin/jaxrs/JaxRsAnnotationScanner.java#L60-L65 | train |
transloadit/java-sdk | src/main/java/com/transloadit/sdk/OptionsBuilder.java | OptionsBuilder.addStep | public void addStep(String name, String robot, Map<String, Object> options){
steps.addStep(name, robot, options);
} | java | public void addStep(String name, String robot, Map<String, Object> options){
steps.addStep(name, robot, options);
} | [
"public",
"void",
"addStep",
"(",
"String",
"name",
",",
"String",
"robot",
",",
"Map",
"<",
"String",
",",
"Object",
">",
"options",
")",
"{",
"steps",
".",
"addStep",
"(",
"name",
",",
"robot",
",",
"options",
")",
";",
"}"
] | Adds a step to the steps.
@param name {@link String} name of the step
@param robot {@link String} name of the robot used by the step.
@param options {@link Map} extra options required for the step. | [
"Adds",
"a",
"step",
"to",
"the",
"steps",
"."
] | 9326c540a66f77b3d907d0b2c05bff1145ca14f7 | https://github.com/transloadit/java-sdk/blob/9326c540a66f77b3d907d0b2c05bff1145ca14f7/src/main/java/com/transloadit/sdk/OptionsBuilder.java#L20-L22 | train |
openEHR/adl2-core | adl2core-parser/src/main/java/org/openehr/adl/flattener/ArchetypeMerger.java | ArchetypeMerger.merge | void merge(Archetype flatParent, Archetype specialized) {
expandAttributeNodes(specialized.getDefinition());
flattenCObject(RmPath.ROOT, null, flatParent.getDefinition(), specialized.getDefinition());
mergeOntologies(flatParent.getTerminology(), specialized.getTerminology());
if (flat... | java | void merge(Archetype flatParent, Archetype specialized) {
expandAttributeNodes(specialized.getDefinition());
flattenCObject(RmPath.ROOT, null, flatParent.getDefinition(), specialized.getDefinition());
mergeOntologies(flatParent.getTerminology(), specialized.getTerminology());
if (flat... | [
"void",
"merge",
"(",
"Archetype",
"flatParent",
",",
"Archetype",
"specialized",
")",
"{",
"expandAttributeNodes",
"(",
"specialized",
".",
"getDefinition",
"(",
")",
")",
";",
"flattenCObject",
"(",
"RmPath",
".",
"ROOT",
",",
"null",
",",
"flatParent",
".",... | Merges a specialized archetype with its parent. Merge will be done in-place on the specialized parameter.
@param flatParent Flat parent archetype
@param specialized Specialized archetype | [
"Merges",
"a",
"specialized",
"archetype",
"with",
"its",
"parent",
".",
"Merge",
"will",
"be",
"done",
"in",
"-",
"place",
"on",
"the",
"specialized",
"parameter",
"."
] | dd5c1c0fe7ef5e43fbfaf6a0389990ba5380e22c | https://github.com/openEHR/adl2-core/blob/dd5c1c0fe7ef5e43fbfaf6a0389990ba5380e22c/adl2core-parser/src/main/java/org/openehr/adl/flattener/ArchetypeMerger.java#L61-L74 | train |
taimos/dvalin | mongodb/src/main/java/de/taimos/dvalin/mongo/ChangelogUtil.java | ChangelogUtil.addTTLIndex | public static void addTTLIndex(DBCollection collection, String field, int ttl) {
if (ttl <= 0) {
throw new IllegalArgumentException("TTL must be positive");
}
collection.createIndex(new BasicDBObject(field, 1), new BasicDBObject("expireAfterSeconds", ttl));
} | java | public static void addTTLIndex(DBCollection collection, String field, int ttl) {
if (ttl <= 0) {
throw new IllegalArgumentException("TTL must be positive");
}
collection.createIndex(new BasicDBObject(field, 1), new BasicDBObject("expireAfterSeconds", ttl));
} | [
"public",
"static",
"void",
"addTTLIndex",
"(",
"DBCollection",
"collection",
",",
"String",
"field",
",",
"int",
"ttl",
")",
"{",
"if",
"(",
"ttl",
"<=",
"0",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"TTL must be positive\"",
")",
";",
"... | adds a TTL index to the given collection. The TTL must be a positive integer.
@param collection the collection to use for the TTL index
@param field the field to use for the TTL index
@param ttl the TTL to set on the given field
@throws IllegalArgumentException if the TTL is less or equal 0 | [
"adds",
"a",
"TTL",
"index",
"to",
"the",
"given",
"collection",
".",
"The",
"TTL",
"must",
"be",
"a",
"positive",
"integer",
"."
] | ff8f1bf594e43d7e8ca8de0b4da9f923b66a1a47 | https://github.com/taimos/dvalin/blob/ff8f1bf594e43d7e8ca8de0b4da9f923b66a1a47/mongodb/src/main/java/de/taimos/dvalin/mongo/ChangelogUtil.java#L47-L52 | train |
taimos/dvalin | mongodb/src/main/java/de/taimos/dvalin/mongo/ChangelogUtil.java | ChangelogUtil.addIndex | public static void addIndex(DBCollection collection, String field, boolean asc, boolean background) {
int dir = (asc) ? 1 : -1;
collection.createIndex(new BasicDBObject(field, dir), new BasicDBObject("background", background));
} | java | public static void addIndex(DBCollection collection, String field, boolean asc, boolean background) {
int dir = (asc) ? 1 : -1;
collection.createIndex(new BasicDBObject(field, dir), new BasicDBObject("background", background));
} | [
"public",
"static",
"void",
"addIndex",
"(",
"DBCollection",
"collection",
",",
"String",
"field",
",",
"boolean",
"asc",
",",
"boolean",
"background",
")",
"{",
"int",
"dir",
"=",
"(",
"asc",
")",
"?",
"1",
":",
"-",
"1",
";",
"collection",
".",
"crea... | Add an index on the given collection and field
@param collection the collection to use for the index
@param field the field to use for the index
@param asc the sorting direction. <code>true</code> to sort ascending; <code>false</code> to sort descending
@param background iff <code>true</code> the index is ... | [
"Add",
"an",
"index",
"on",
"the",
"given",
"collection",
"and",
"field"
] | ff8f1bf594e43d7e8ca8de0b4da9f923b66a1a47 | https://github.com/taimos/dvalin/blob/ff8f1bf594e43d7e8ca8de0b4da9f923b66a1a47/mongodb/src/main/java/de/taimos/dvalin/mongo/ChangelogUtil.java#L62-L65 | train |
openEHR/adl2-core | adl2core-parser/src/main/java/org/openehr/adl/validator/ArchetypeValidator.java | ArchetypeValidator.checkRmModelConformance | void checkRmModelConformance() {
final AmVisitor<AmObject, AmConstraintContext> visitor = AmVisitors.preorder(new ConformanceVisitor());
ArchetypeWalker.walkConstraints(visitor, archetype, new AmConstraintContext());
} | java | void checkRmModelConformance() {
final AmVisitor<AmObject, AmConstraintContext> visitor = AmVisitors.preorder(new ConformanceVisitor());
ArchetypeWalker.walkConstraints(visitor, archetype, new AmConstraintContext());
} | [
"void",
"checkRmModelConformance",
"(",
")",
"{",
"final",
"AmVisitor",
"<",
"AmObject",
",",
"AmConstraintContext",
">",
"visitor",
"=",
"AmVisitors",
".",
"preorder",
"(",
"new",
"ConformanceVisitor",
"(",
")",
")",
";",
"ArchetypeWalker",
".",
"walkConstraints"... | Check if information model entity referenced by archetype
has right name or type | [
"Check",
"if",
"information",
"model",
"entity",
"referenced",
"by",
"archetype",
"has",
"right",
"name",
"or",
"type"
] | dd5c1c0fe7ef5e43fbfaf6a0389990ba5380e22c | https://github.com/openEHR/adl2-core/blob/dd5c1c0fe7ef5e43fbfaf6a0389990ba5380e22c/adl2core-parser/src/main/java/org/openehr/adl/validator/ArchetypeValidator.java#L76-L79 | train |
resource4j/resource4j | core/src/main/java/com/github/resource4j/ResourceKey.java | ResourceKey.key | public static ResourceKey key(Enum<?> value) {
return new ResourceKey(value.getClass().getName(), value.name());
} | java | public static ResourceKey key(Enum<?> value) {
return new ResourceKey(value.getClass().getName(), value.name());
} | [
"public",
"static",
"ResourceKey",
"key",
"(",
"Enum",
"<",
"?",
">",
"value",
")",
"{",
"return",
"new",
"ResourceKey",
"(",
"value",
".",
"getClass",
"(",
")",
".",
"getName",
"(",
")",
",",
"value",
".",
"name",
"(",
")",
")",
";",
"}"
] | Creates a resource key for given enumeration value. By convention,
resource bundle for enumerations has the name of enumeration class
and value identifier is the same as enumeration value name.
@param value the enumeration value
@return the resource key | [
"Creates",
"a",
"resource",
"key",
"for",
"given",
"enumeration",
"value",
".",
"By",
"convention",
"resource",
"bundle",
"for",
"enumerations",
"has",
"the",
"name",
"of",
"enumeration",
"class",
"and",
"value",
"identifier",
"is",
"the",
"same",
"as",
"enume... | 6100443b9a78edc8a5867e1e075f7ee12e6698ca | https://github.com/resource4j/resource4j/blob/6100443b9a78edc8a5867e1e075f7ee12e6698ca/core/src/main/java/com/github/resource4j/ResourceKey.java#L101-L103 | train |
resource4j/resource4j | core/src/main/java/com/github/resource4j/ResourceKey.java | ResourceKey.key | public static ResourceKey key(Class<?> clazz, String id) {
return new ResourceKey(clazz.getName(), id);
} | java | public static ResourceKey key(Class<?> clazz, String id) {
return new ResourceKey(clazz.getName(), id);
} | [
"public",
"static",
"ResourceKey",
"key",
"(",
"Class",
"<",
"?",
">",
"clazz",
",",
"String",
"id",
")",
"{",
"return",
"new",
"ResourceKey",
"(",
"clazz",
".",
"getName",
"(",
")",
",",
"id",
")",
";",
"}"
] | Creates a resource key with given id for bundle specified by given class.
@param clazz the class owning the bundle.
@param id value identifier
@return the resource key | [
"Creates",
"a",
"resource",
"key",
"with",
"given",
"id",
"for",
"bundle",
"specified",
"by",
"given",
"class",
"."
] | 6100443b9a78edc8a5867e1e075f7ee12e6698ca | https://github.com/resource4j/resource4j/blob/6100443b9a78edc8a5867e1e075f7ee12e6698ca/core/src/main/java/com/github/resource4j/ResourceKey.java#L111-L113 | train |
resource4j/resource4j | core/src/main/java/com/github/resource4j/ResourceKey.java | ResourceKey.key | public static ResourceKey key(Class<?> clazz, Enum<?> value) {
return new ResourceKey(clazz.getName(), value.name());
} | java | public static ResourceKey key(Class<?> clazz, Enum<?> value) {
return new ResourceKey(clazz.getName(), value.name());
} | [
"public",
"static",
"ResourceKey",
"key",
"(",
"Class",
"<",
"?",
">",
"clazz",
",",
"Enum",
"<",
"?",
">",
"value",
")",
"{",
"return",
"new",
"ResourceKey",
"(",
"clazz",
".",
"getName",
"(",
")",
",",
"value",
".",
"name",
"(",
")",
")",
";",
... | Creates a resource key with id defined as enumeration value name and bundle specified by given class.
@param clazz the class owning the bundle
@param value enumeration value used to define key id
@return the resource key | [
"Creates",
"a",
"resource",
"key",
"with",
"id",
"defined",
"as",
"enumeration",
"value",
"name",
"and",
"bundle",
"specified",
"by",
"given",
"class",
"."
] | 6100443b9a78edc8a5867e1e075f7ee12e6698ca | https://github.com/resource4j/resource4j/blob/6100443b9a78edc8a5867e1e075f7ee12e6698ca/core/src/main/java/com/github/resource4j/ResourceKey.java#L121-L123 | train |
resource4j/resource4j | core/src/main/java/com/github/resource4j/ResourceKey.java | ResourceKey.key | public static ResourceKey key(Enum<?> enumValue, String key) {
return new ResourceKey(enumValue.getClass().getName(), enumValue.name()).child(key);
} | java | public static ResourceKey key(Enum<?> enumValue, String key) {
return new ResourceKey(enumValue.getClass().getName(), enumValue.name()).child(key);
} | [
"public",
"static",
"ResourceKey",
"key",
"(",
"Enum",
"<",
"?",
">",
"enumValue",
",",
"String",
"key",
")",
"{",
"return",
"new",
"ResourceKey",
"(",
"enumValue",
".",
"getClass",
"(",
")",
".",
"getName",
"(",
")",
",",
"enumValue",
".",
"name",
"("... | Creates a resource key defined as a child of key defined by enumeration value.
@see #key(Enum)
@see #child(String)
@param enumValue the enumeration value defining the parent key
@param key the child id
@return the resource key | [
"Creates",
"a",
"resource",
"key",
"defined",
"as",
"a",
"child",
"of",
"key",
"defined",
"by",
"enumeration",
"value",
"."
] | 6100443b9a78edc8a5867e1e075f7ee12e6698ca | https://github.com/resource4j/resource4j/blob/6100443b9a78edc8a5867e1e075f7ee12e6698ca/core/src/main/java/com/github/resource4j/ResourceKey.java#L142-L144 | train |
Quickhull3d/quickhull3d | src/main/java/com/github/quickhull3d/Vector3d.java | Vector3d.set | public void set(int i, double value) {
switch (i) {
case 0: {
x = value;
break;
}
case 1: {
y = value;
break;
}
case 2: {
z = value;
break;
}
... | java | public void set(int i, double value) {
switch (i) {
case 0: {
x = value;
break;
}
case 1: {
y = value;
break;
}
case 2: {
z = value;
break;
}
... | [
"public",
"void",
"set",
"(",
"int",
"i",
",",
"double",
"value",
")",
"{",
"switch",
"(",
"i",
")",
"{",
"case",
"0",
":",
"{",
"x",
"=",
"value",
";",
"break",
";",
"}",
"case",
"1",
":",
"{",
"y",
"=",
"value",
";",
"break",
";",
"}",
"c... | Sets a single element of this vector. Elements 0, 1, and 2 correspond to
x, y, and z.
@param i
element index
@param value
element value
@return element value throws ArrayIndexOutOfBoundsException if i is not
in the range 0 to 2. | [
"Sets",
"a",
"single",
"element",
"of",
"this",
"vector",
".",
"Elements",
"0",
"1",
"and",
"2",
"correspond",
"to",
"x",
"y",
"and",
"z",
"."
] | 3f80953b86c46385e84730e5d2a1745cbfa12703 | https://github.com/Quickhull3d/quickhull3d/blob/3f80953b86c46385e84730e5d2a1745cbfa12703/src/main/java/com/github/quickhull3d/Vector3d.java#L131-L149 | train |
Quickhull3d/quickhull3d | src/main/java/com/github/quickhull3d/Vector3d.java | Vector3d.set | public void set(Vector3d v1) {
x = v1.x;
y = v1.y;
z = v1.z;
} | java | public void set(Vector3d v1) {
x = v1.x;
y = v1.y;
z = v1.z;
} | [
"public",
"void",
"set",
"(",
"Vector3d",
"v1",
")",
"{",
"x",
"=",
"v1",
".",
"x",
";",
"y",
"=",
"v1",
".",
"y",
";",
"z",
"=",
"v1",
".",
"z",
";",
"}"
] | Sets the values of this vector to those of v1.
@param v1
vector whose values are copied | [
"Sets",
"the",
"values",
"of",
"this",
"vector",
"to",
"those",
"of",
"v1",
"."
] | 3f80953b86c46385e84730e5d2a1745cbfa12703 | https://github.com/Quickhull3d/quickhull3d/blob/3f80953b86c46385e84730e5d2a1745cbfa12703/src/main/java/com/github/quickhull3d/Vector3d.java#L157-L161 | train |
Quickhull3d/quickhull3d | src/main/java/com/github/quickhull3d/Vector3d.java | Vector3d.add | public void add(Vector3d v1, Vector3d v2) {
x = v1.x + v2.x;
y = v1.y + v2.y;
z = v1.z + v2.z;
} | java | public void add(Vector3d v1, Vector3d v2) {
x = v1.x + v2.x;
y = v1.y + v2.y;
z = v1.z + v2.z;
} | [
"public",
"void",
"add",
"(",
"Vector3d",
"v1",
",",
"Vector3d",
"v2",
")",
"{",
"x",
"=",
"v1",
".",
"x",
"+",
"v2",
".",
"x",
";",
"y",
"=",
"v1",
".",
"y",
"+",
"v2",
".",
"y",
";",
"z",
"=",
"v1",
".",
"z",
"+",
"v2",
".",
"z",
";",... | Adds vector v1 to v2 and places the result in this vector.
@param v1
left-hand vector
@param v2
right-hand vector | [
"Adds",
"vector",
"v1",
"to",
"v2",
"and",
"places",
"the",
"result",
"in",
"this",
"vector",
"."
] | 3f80953b86c46385e84730e5d2a1745cbfa12703 | https://github.com/Quickhull3d/quickhull3d/blob/3f80953b86c46385e84730e5d2a1745cbfa12703/src/main/java/com/github/quickhull3d/Vector3d.java#L171-L175 | train |
Quickhull3d/quickhull3d | src/main/java/com/github/quickhull3d/Vector3d.java | Vector3d.add | public void add(Vector3d v1) {
x += v1.x;
y += v1.y;
z += v1.z;
} | java | public void add(Vector3d v1) {
x += v1.x;
y += v1.y;
z += v1.z;
} | [
"public",
"void",
"add",
"(",
"Vector3d",
"v1",
")",
"{",
"x",
"+=",
"v1",
".",
"x",
";",
"y",
"+=",
"v1",
".",
"y",
";",
"z",
"+=",
"v1",
".",
"z",
";",
"}"
] | Adds this vector to v1 and places the result in this vector.
@param v1
right-hand vector | [
"Adds",
"this",
"vector",
"to",
"v1",
"and",
"places",
"the",
"result",
"in",
"this",
"vector",
"."
] | 3f80953b86c46385e84730e5d2a1745cbfa12703 | https://github.com/Quickhull3d/quickhull3d/blob/3f80953b86c46385e84730e5d2a1745cbfa12703/src/main/java/com/github/quickhull3d/Vector3d.java#L183-L187 | train |
Quickhull3d/quickhull3d | src/main/java/com/github/quickhull3d/Vector3d.java | Vector3d.sub | public void sub(Vector3d v1, Vector3d v2) {
x = v1.x - v2.x;
y = v1.y - v2.y;
z = v1.z - v2.z;
} | java | public void sub(Vector3d v1, Vector3d v2) {
x = v1.x - v2.x;
y = v1.y - v2.y;
z = v1.z - v2.z;
} | [
"public",
"void",
"sub",
"(",
"Vector3d",
"v1",
",",
"Vector3d",
"v2",
")",
"{",
"x",
"=",
"v1",
".",
"x",
"-",
"v2",
".",
"x",
";",
"y",
"=",
"v1",
".",
"y",
"-",
"v2",
".",
"y",
";",
"z",
"=",
"v1",
".",
"z",
"-",
"v2",
".",
"z",
";",... | Subtracts vector v1 from v2 and places the result in this vector.
@param v1
left-hand vector
@param v2
right-hand vector | [
"Subtracts",
"vector",
"v1",
"from",
"v2",
"and",
"places",
"the",
"result",
"in",
"this",
"vector",
"."
] | 3f80953b86c46385e84730e5d2a1745cbfa12703 | https://github.com/Quickhull3d/quickhull3d/blob/3f80953b86c46385e84730e5d2a1745cbfa12703/src/main/java/com/github/quickhull3d/Vector3d.java#L197-L201 | train |
Quickhull3d/quickhull3d | src/main/java/com/github/quickhull3d/Vector3d.java | Vector3d.sub | public void sub(Vector3d v1) {
x -= v1.x;
y -= v1.y;
z -= v1.z;
} | java | public void sub(Vector3d v1) {
x -= v1.x;
y -= v1.y;
z -= v1.z;
} | [
"public",
"void",
"sub",
"(",
"Vector3d",
"v1",
")",
"{",
"x",
"-=",
"v1",
".",
"x",
";",
"y",
"-=",
"v1",
".",
"y",
";",
"z",
"-=",
"v1",
".",
"z",
";",
"}"
] | Subtracts v1 from this vector and places the result in this vector.
@param v1
right-hand vector | [
"Subtracts",
"v1",
"from",
"this",
"vector",
"and",
"places",
"the",
"result",
"in",
"this",
"vector",
"."
] | 3f80953b86c46385e84730e5d2a1745cbfa12703 | https://github.com/Quickhull3d/quickhull3d/blob/3f80953b86c46385e84730e5d2a1745cbfa12703/src/main/java/com/github/quickhull3d/Vector3d.java#L209-L213 | train |
Quickhull3d/quickhull3d | src/main/java/com/github/quickhull3d/Vector3d.java | Vector3d.distance | public double distance(Vector3d v) {
double dx = x - v.x;
double dy = y - v.y;
double dz = z - v.z;
return Math.sqrt(dx * dx + dy * dy + dz * dz);
} | java | public double distance(Vector3d v) {
double dx = x - v.x;
double dy = y - v.y;
double dz = z - v.z;
return Math.sqrt(dx * dx + dy * dy + dz * dz);
} | [
"public",
"double",
"distance",
"(",
"Vector3d",
"v",
")",
"{",
"double",
"dx",
"=",
"x",
"-",
"v",
".",
"x",
";",
"double",
"dy",
"=",
"y",
"-",
"v",
".",
"y",
";",
"double",
"dz",
"=",
"z",
"-",
"v",
".",
"z",
";",
"return",
"Math",
".",
... | Returns the Euclidean distance between this vector and vector v.
@return distance between this vector and v | [
"Returns",
"the",
"Euclidean",
"distance",
"between",
"this",
"vector",
"and",
"vector",
"v",
"."
] | 3f80953b86c46385e84730e5d2a1745cbfa12703 | https://github.com/Quickhull3d/quickhull3d/blob/3f80953b86c46385e84730e5d2a1745cbfa12703/src/main/java/com/github/quickhull3d/Vector3d.java#L267-L273 | train |
Quickhull3d/quickhull3d | src/main/java/com/github/quickhull3d/Vector3d.java | Vector3d.distanceSquared | public double distanceSquared(Vector3d v) {
double dx = x - v.x;
double dy = y - v.y;
double dz = z - v.z;
return dx * dx + dy * dy + dz * dz;
} | java | public double distanceSquared(Vector3d v) {
double dx = x - v.x;
double dy = y - v.y;
double dz = z - v.z;
return dx * dx + dy * dy + dz * dz;
} | [
"public",
"double",
"distanceSquared",
"(",
"Vector3d",
"v",
")",
"{",
"double",
"dx",
"=",
"x",
"-",
"v",
".",
"x",
";",
"double",
"dy",
"=",
"y",
"-",
"v",
".",
"y",
";",
"double",
"dz",
"=",
"z",
"-",
"v",
".",
"z",
";",
"return",
"dx",
"*... | Returns the squared of the Euclidean distance between this vector and
vector v.
@return squared distance between this vector and v | [
"Returns",
"the",
"squared",
"of",
"the",
"Euclidean",
"distance",
"between",
"this",
"vector",
"and",
"vector",
"v",
"."
] | 3f80953b86c46385e84730e5d2a1745cbfa12703 | https://github.com/Quickhull3d/quickhull3d/blob/3f80953b86c46385e84730e5d2a1745cbfa12703/src/main/java/com/github/quickhull3d/Vector3d.java#L281-L287 | train |
Quickhull3d/quickhull3d | src/main/java/com/github/quickhull3d/Vector3d.java | Vector3d.dot | public double dot(Vector3d v1) {
return x * v1.x + y * v1.y + z * v1.z;
} | java | public double dot(Vector3d v1) {
return x * v1.x + y * v1.y + z * v1.z;
} | [
"public",
"double",
"dot",
"(",
"Vector3d",
"v1",
")",
"{",
"return",
"x",
"*",
"v1",
".",
"x",
"+",
"y",
"*",
"v1",
".",
"y",
"+",
"z",
"*",
"v1",
".",
"z",
";",
"}"
] | Returns the dot product of this vector and v1.
@param v1
right-hand vector
@return dot product | [
"Returns",
"the",
"dot",
"product",
"of",
"this",
"vector",
"and",
"v1",
"."
] | 3f80953b86c46385e84730e5d2a1745cbfa12703 | https://github.com/Quickhull3d/quickhull3d/blob/3f80953b86c46385e84730e5d2a1745cbfa12703/src/main/java/com/github/quickhull3d/Vector3d.java#L296-L298 | train |
Quickhull3d/quickhull3d | src/main/java/com/github/quickhull3d/Vector3d.java | Vector3d.normalize | public void normalize() {
double lenSqr = x * x + y * y + z * z;
double err = lenSqr - 1;
if (err > (2 * DOUBLE_PREC) || err < -(2 * DOUBLE_PREC)) {
double len = Math.sqrt(lenSqr);
x /= len;
y /= len;
z /= len;
}
} | java | public void normalize() {
double lenSqr = x * x + y * y + z * z;
double err = lenSqr - 1;
if (err > (2 * DOUBLE_PREC) || err < -(2 * DOUBLE_PREC)) {
double len = Math.sqrt(lenSqr);
x /= len;
y /= len;
z /= len;
}
} | [
"public",
"void",
"normalize",
"(",
")",
"{",
"double",
"lenSqr",
"=",
"x",
"*",
"x",
"+",
"y",
"*",
"y",
"+",
"z",
"*",
"z",
";",
"double",
"err",
"=",
"lenSqr",
"-",
"1",
";",
"if",
"(",
"err",
">",
"(",
"2",
"*",
"DOUBLE_PREC",
")",
"||",
... | Normalizes this vector in place. | [
"Normalizes",
"this",
"vector",
"in",
"place",
"."
] | 3f80953b86c46385e84730e5d2a1745cbfa12703 | https://github.com/Quickhull3d/quickhull3d/blob/3f80953b86c46385e84730e5d2a1745cbfa12703/src/main/java/com/github/quickhull3d/Vector3d.java#L303-L312 | train |
Quickhull3d/quickhull3d | src/main/java/com/github/quickhull3d/Vector3d.java | Vector3d.cross | public void cross(Vector3d v1, Vector3d v2) {
double tmpx = v1.y * v2.z - v1.z * v2.y;
double tmpy = v1.z * v2.x - v1.x * v2.z;
double tmpz = v1.x * v2.y - v1.y * v2.x;
x = tmpx;
y = tmpy;
z = tmpz;
} | java | public void cross(Vector3d v1, Vector3d v2) {
double tmpx = v1.y * v2.z - v1.z * v2.y;
double tmpy = v1.z * v2.x - v1.x * v2.z;
double tmpz = v1.x * v2.y - v1.y * v2.x;
x = tmpx;
y = tmpy;
z = tmpz;
} | [
"public",
"void",
"cross",
"(",
"Vector3d",
"v1",
",",
"Vector3d",
"v2",
")",
"{",
"double",
"tmpx",
"=",
"v1",
".",
"y",
"*",
"v2",
".",
"z",
"-",
"v1",
".",
"z",
"*",
"v2",
".",
"y",
";",
"double",
"tmpy",
"=",
"v1",
".",
"z",
"*",
"v2",
... | Computes the cross product of v1 and v2 and places the result in this
vector.
@param v1
left-hand vector
@param v2
right-hand vector | [
"Computes",
"the",
"cross",
"product",
"of",
"v1",
"and",
"v2",
"and",
"places",
"the",
"result",
"in",
"this",
"vector",
"."
] | 3f80953b86c46385e84730e5d2a1745cbfa12703 | https://github.com/Quickhull3d/quickhull3d/blob/3f80953b86c46385e84730e5d2a1745cbfa12703/src/main/java/com/github/quickhull3d/Vector3d.java#L348-L356 | train |
Quickhull3d/quickhull3d | src/main/java/com/github/quickhull3d/Vector3d.java | Vector3d.setRandom | protected void setRandom(double lower, double upper, Random generator) {
double range = upper - lower;
x = generator.nextDouble() * range + lower;
y = generator.nextDouble() * range + lower;
z = generator.nextDouble() * range + lower;
} | java | protected void setRandom(double lower, double upper, Random generator) {
double range = upper - lower;
x = generator.nextDouble() * range + lower;
y = generator.nextDouble() * range + lower;
z = generator.nextDouble() * range + lower;
} | [
"protected",
"void",
"setRandom",
"(",
"double",
"lower",
",",
"double",
"upper",
",",
"Random",
"generator",
")",
"{",
"double",
"range",
"=",
"upper",
"-",
"lower",
";",
"x",
"=",
"generator",
".",
"nextDouble",
"(",
")",
"*",
"range",
"+",
"lower",
... | Sets the elements of this vector to uniformly distributed random values
in a specified range, using a supplied random number generator.
@param lower
lower random value (inclusive)
@param upper
upper random value (exclusive)
@param generator
random number generator | [
"Sets",
"the",
"elements",
"of",
"this",
"vector",
"to",
"uniformly",
"distributed",
"random",
"values",
"in",
"a",
"specified",
"range",
"using",
"a",
"supplied",
"random",
"number",
"generator",
"."
] | 3f80953b86c46385e84730e5d2a1745cbfa12703 | https://github.com/Quickhull3d/quickhull3d/blob/3f80953b86c46385e84730e5d2a1745cbfa12703/src/main/java/com/github/quickhull3d/Vector3d.java#L369-L375 | train |
yatechorg/jedis-utils | src/main/java/org/yatech/jedis/utils/lua/LuaScriptBlockBuilder.java | LuaScriptBlockBuilder.endBlockReturn | public LuaScriptBlock endBlockReturn(LuaValue value) {
add(new LuaAstReturnStatement(argument(value)));
return new LuaScriptBlock(script);
} | java | public LuaScriptBlock endBlockReturn(LuaValue value) {
add(new LuaAstReturnStatement(argument(value)));
return new LuaScriptBlock(script);
} | [
"public",
"LuaScriptBlock",
"endBlockReturn",
"(",
"LuaValue",
"value",
")",
"{",
"add",
"(",
"new",
"LuaAstReturnStatement",
"(",
"argument",
"(",
"value",
")",
")",
")",
";",
"return",
"new",
"LuaScriptBlock",
"(",
"script",
")",
";",
"}"
] | End the script block, adding a return value statement
@param value the value to return
@return the new {@link LuaScriptBlock} instance | [
"End",
"the",
"script",
"block",
"adding",
"a",
"return",
"value",
"statement"
] | 1951609fa6697df4f69be76e7d66b9284924bd97 | https://github.com/yatechorg/jedis-utils/blob/1951609fa6697df4f69be76e7d66b9284924bd97/src/main/java/org/yatech/jedis/utils/lua/LuaScriptBlockBuilder.java#L54-L57 | train |
yatechorg/jedis-utils | src/main/java/org/yatech/jedis/utils/lua/LuaConditions.java | LuaConditions.isNull | public static LuaCondition isNull(LuaValue value) {
LuaAstExpression expression;
if (value instanceof LuaLocal) {
expression = new LuaAstLocal(((LuaLocal) value).getName());
} else {
throw new IllegalArgumentException("Unexpected value type: " + value.getClass().getName()... | java | public static LuaCondition isNull(LuaValue value) {
LuaAstExpression expression;
if (value instanceof LuaLocal) {
expression = new LuaAstLocal(((LuaLocal) value).getName());
} else {
throw new IllegalArgumentException("Unexpected value type: " + value.getClass().getName()... | [
"public",
"static",
"LuaCondition",
"isNull",
"(",
"LuaValue",
"value",
")",
"{",
"LuaAstExpression",
"expression",
";",
"if",
"(",
"value",
"instanceof",
"LuaLocal",
")",
"{",
"expression",
"=",
"new",
"LuaAstLocal",
"(",
"(",
"(",
"LuaLocal",
")",
"value",
... | IS NULL predicate
@param value the value for which to check
@return a {@link LuaCondition} instance | [
"IS",
"NULL",
"predicate"
] | 1951609fa6697df4f69be76e7d66b9284924bd97 | https://github.com/yatechorg/jedis-utils/blob/1951609fa6697df4f69be76e7d66b9284924bd97/src/main/java/org/yatech/jedis/utils/lua/LuaConditions.java#L22-L30 | train |
Quickhull3d/quickhull3d | src/main/java/com/github/quickhull3d/HalfEdge.java | HalfEdge.getVertexString | public String getVertexString() {
if (tail() != null) {
return "" + tail().index + "-" + head().index;
} else {
return "?-" + head().index;
}
} | java | public String getVertexString() {
if (tail() != null) {
return "" + tail().index + "-" + head().index;
} else {
return "?-" + head().index;
}
} | [
"public",
"String",
"getVertexString",
"(",
")",
"{",
"if",
"(",
"tail",
"(",
")",
"!=",
"null",
")",
"{",
"return",
"\"\"",
"+",
"tail",
"(",
")",
".",
"index",
"+",
"\"-\"",
"+",
"head",
"(",
")",
".",
"index",
";",
"}",
"else",
"{",
"return",
... | Produces a string identifying this half-edge by the point index values of
its tail and head vertices.
@return identifying string | [
"Produces",
"a",
"string",
"identifying",
"this",
"half",
"-",
"edge",
"by",
"the",
"point",
"index",
"values",
"of",
"its",
"tail",
"and",
"head",
"vertices",
"."
] | 3f80953b86c46385e84730e5d2a1745cbfa12703 | https://github.com/Quickhull3d/quickhull3d/blob/3f80953b86c46385e84730e5d2a1745cbfa12703/src/main/java/com/github/quickhull3d/HalfEdge.java#L186-L192 | train |
Quickhull3d/quickhull3d | src/main/java/com/github/quickhull3d/Face.java | Face.createTriangle | public static Face createTriangle(Vertex v0, Vertex v1, Vertex v2, double minArea) {
Face face = new Face();
HalfEdge he0 = new HalfEdge(v0, face);
HalfEdge he1 = new HalfEdge(v1, face);
HalfEdge he2 = new HalfEdge(v2, face);
he0.prev = he2;
he0.next = he1;
he1.p... | java | public static Face createTriangle(Vertex v0, Vertex v1, Vertex v2, double minArea) {
Face face = new Face();
HalfEdge he0 = new HalfEdge(v0, face);
HalfEdge he1 = new HalfEdge(v1, face);
HalfEdge he2 = new HalfEdge(v2, face);
he0.prev = he2;
he0.next = he1;
he1.p... | [
"public",
"static",
"Face",
"createTriangle",
"(",
"Vertex",
"v0",
",",
"Vertex",
"v1",
",",
"Vertex",
"v2",
",",
"double",
"minArea",
")",
"{",
"Face",
"face",
"=",
"new",
"Face",
"(",
")",
";",
"HalfEdge",
"he0",
"=",
"new",
"HalfEdge",
"(",
"v0",
... | Constructs a triangule Face from vertices v0, v1, and v2.
@param v0
first vertex
@param v1
second vertex
@param v2
third vertex | [
"Constructs",
"a",
"triangule",
"Face",
"from",
"vertices",
"v0",
"v1",
"and",
"v2",
"."
] | 3f80953b86c46385e84730e5d2a1745cbfa12703 | https://github.com/Quickhull3d/quickhull3d/blob/3f80953b86c46385e84730e5d2a1745cbfa12703/src/main/java/com/github/quickhull3d/Face.java#L108-L126 | train |
Quickhull3d/quickhull3d | src/main/java/com/github/quickhull3d/Face.java | Face.distanceToPlane | public double distanceToPlane(Point3d p) {
return normal.x * p.x + normal.y * p.y + normal.z * p.z - planeOffset;
} | java | public double distanceToPlane(Point3d p) {
return normal.x * p.x + normal.y * p.y + normal.z * p.z - planeOffset;
} | [
"public",
"double",
"distanceToPlane",
"(",
"Point3d",
"p",
")",
"{",
"return",
"normal",
".",
"x",
"*",
"p",
".",
"x",
"+",
"normal",
".",
"y",
"*",
"p",
".",
"y",
"+",
"normal",
".",
"z",
"*",
"p",
".",
"z",
"-",
"planeOffset",
";",
"}"
] | Computes the distance from a point p to the plane of this face.
@param p
the point
@return distance from the point to the plane | [
"Computes",
"the",
"distance",
"from",
"a",
"point",
"p",
"to",
"the",
"plane",
"of",
"this",
"face",
"."
] | 3f80953b86c46385e84730e5d2a1745cbfa12703 | https://github.com/Quickhull3d/quickhull3d/blob/3f80953b86c46385e84730e5d2a1745cbfa12703/src/main/java/com/github/quickhull3d/Face.java#L216-L218 | train |
Quickhull3d/quickhull3d | src/main/java/com/github/quickhull3d/Face.java | Face.getEdge | public HalfEdge getEdge(int i) {
HalfEdge he = he0;
while (i > 0) {
he = he.next;
i--;
}
while (i < 0) {
he = he.prev;
i++;
}
return he;
} | java | public HalfEdge getEdge(int i) {
HalfEdge he = he0;
while (i > 0) {
he = he.next;
i--;
}
while (i < 0) {
he = he.prev;
i++;
}
return he;
} | [
"public",
"HalfEdge",
"getEdge",
"(",
"int",
"i",
")",
"{",
"HalfEdge",
"he",
"=",
"he0",
";",
"while",
"(",
"i",
">",
"0",
")",
"{",
"he",
"=",
"he",
".",
"next",
";",
"i",
"--",
";",
"}",
"while",
"(",
"i",
"<",
"0",
")",
"{",
"he",
"=",
... | Gets the i-th half-edge associated with the face.
@param i
the half-edge index, in the range 0-2.
@return the half-edge | [
"Gets",
"the",
"i",
"-",
"th",
"half",
"-",
"edge",
"associated",
"with",
"the",
"face",
"."
] | 3f80953b86c46385e84730e5d2a1745cbfa12703 | https://github.com/Quickhull3d/quickhull3d/blob/3f80953b86c46385e84730e5d2a1745cbfa12703/src/main/java/com/github/quickhull3d/Face.java#L252-L263 | train |
Quickhull3d/quickhull3d | src/main/java/com/github/quickhull3d/Face.java | Face.areaSquared | public double areaSquared(HalfEdge hedge0, HalfEdge hedge1) {
Point3d p0 = hedge0.tail().pnt;
Point3d p1 = hedge0.head().pnt;
Point3d p2 = hedge1.head().pnt;
double dx1 = p1.x - p0.x;
double dy1 = p1.y - p0.y;
double dz1 = p1.z - p0.z;
double dx2 = p2.x - p0.x;
... | java | public double areaSquared(HalfEdge hedge0, HalfEdge hedge1) {
Point3d p0 = hedge0.tail().pnt;
Point3d p1 = hedge0.head().pnt;
Point3d p2 = hedge1.head().pnt;
double dx1 = p1.x - p0.x;
double dy1 = p1.y - p0.y;
double dz1 = p1.z - p0.z;
double dx2 = p2.x - p0.x;
... | [
"public",
"double",
"areaSquared",
"(",
"HalfEdge",
"hedge0",
",",
"HalfEdge",
"hedge1",
")",
"{",
"Point3d",
"p0",
"=",
"hedge0",
".",
"tail",
"(",
")",
".",
"pnt",
";",
"Point3d",
"p1",
"=",
"hedge0",
".",
"head",
"(",
")",
".",
"pnt",
";",
"Point3... | return the squared area of the triangle defined by the half edge hedge0
and the point at the head of hedge1.
@param hedge0
@param hedge1
@return | [
"return",
"the",
"squared",
"area",
"of",
"the",
"triangle",
"defined",
"by",
"the",
"half",
"edge",
"hedge0",
"and",
"the",
"point",
"at",
"the",
"head",
"of",
"hedge1",
"."
] | 3f80953b86c46385e84730e5d2a1745cbfa12703 | https://github.com/Quickhull3d/quickhull3d/blob/3f80953b86c46385e84730e5d2a1745cbfa12703/src/main/java/com/github/quickhull3d/Face.java#L408-L426 | train |
linkhub-sdk/popbill.sdk.java | src/main/java/com/popbill/api/BaseServiceImp.java | BaseServiceImp.fromJsonString | protected <T> T fromJsonString(String json, Class<T> clazz) {
return _gsonParser.fromJson(json, clazz);
} | java | protected <T> T fromJsonString(String json, Class<T> clazz) {
return _gsonParser.fromJson(json, clazz);
} | [
"protected",
"<",
"T",
">",
"T",
"fromJsonString",
"(",
"String",
"json",
",",
"Class",
"<",
"T",
">",
"clazz",
")",
"{",
"return",
"_gsonParser",
".",
"fromJson",
"(",
"json",
",",
"clazz",
")",
";",
"}"
] | Convert JsonString to Object of Clazz
@param json
@param clazz
@return Object of Clazz | [
"Convert",
"JsonString",
"to",
"Object",
"of",
"Clazz"
] | 63a341fefe96d60a368776638f3d4c81888238b7 | https://github.com/linkhub-sdk/popbill.sdk.java/blob/63a341fefe96d60a368776638f3d4c81888238b7/src/main/java/com/popbill/api/BaseServiceImp.java#L464-L466 | train |
yatechorg/jedis-utils | src/main/java/org/yatech/jedis/utils/lua/LuaScriptBuilder.java | LuaScriptBuilder.endScript | public LuaScript endScript(LuaScriptConfig config) {
if (!endsWithReturnStatement()) {
add(new LuaAstReturnStatement());
}
String scriptText = buildScriptText();
return new BasicLuaScript(scriptText, config);
} | java | public LuaScript endScript(LuaScriptConfig config) {
if (!endsWithReturnStatement()) {
add(new LuaAstReturnStatement());
}
String scriptText = buildScriptText();
return new BasicLuaScript(scriptText, config);
} | [
"public",
"LuaScript",
"endScript",
"(",
"LuaScriptConfig",
"config",
")",
"{",
"if",
"(",
"!",
"endsWithReturnStatement",
"(",
")",
")",
"{",
"add",
"(",
"new",
"LuaAstReturnStatement",
"(",
")",
")",
";",
"}",
"String",
"scriptText",
"=",
"buildScriptText",
... | End building the script
@param config the configuration for the script to build
@return the new {@link LuaScript} instance | [
"End",
"building",
"the",
"script"
] | 1951609fa6697df4f69be76e7d66b9284924bd97 | https://github.com/yatechorg/jedis-utils/blob/1951609fa6697df4f69be76e7d66b9284924bd97/src/main/java/org/yatech/jedis/utils/lua/LuaScriptBuilder.java#L78-L84 | train |
yatechorg/jedis-utils | src/main/java/org/yatech/jedis/utils/lua/LuaScriptBuilder.java | LuaScriptBuilder.endScriptReturn | public LuaScript endScriptReturn(LuaValue value, LuaScriptConfig config) {
add(new LuaAstReturnStatement(argument(value)));
String scriptText = buildScriptText();
return new BasicLuaScript(scriptText, config);
} | java | public LuaScript endScriptReturn(LuaValue value, LuaScriptConfig config) {
add(new LuaAstReturnStatement(argument(value)));
String scriptText = buildScriptText();
return new BasicLuaScript(scriptText, config);
} | [
"public",
"LuaScript",
"endScriptReturn",
"(",
"LuaValue",
"value",
",",
"LuaScriptConfig",
"config",
")",
"{",
"add",
"(",
"new",
"LuaAstReturnStatement",
"(",
"argument",
"(",
"value",
")",
")",
")",
";",
"String",
"scriptText",
"=",
"buildScriptText",
"(",
... | End building the script, adding a return value statement
@param config the configuration for the script to build
@param value the value to return
@return the new {@link LuaScript} instance | [
"End",
"building",
"the",
"script",
"adding",
"a",
"return",
"value",
"statement"
] | 1951609fa6697df4f69be76e7d66b9284924bd97 | https://github.com/yatechorg/jedis-utils/blob/1951609fa6697df4f69be76e7d66b9284924bd97/src/main/java/org/yatech/jedis/utils/lua/LuaScriptBuilder.java#L100-L104 | train |
yatechorg/jedis-utils | src/main/java/org/yatech/jedis/utils/lua/LuaScriptBuilder.java | LuaScriptBuilder.endPreparedScript | public LuaPreparedScript endPreparedScript(LuaScriptConfig config) {
if (!endsWithReturnStatement()) {
add(new LuaAstReturnStatement());
}
String scriptText = buildScriptText();
ArrayList<LuaKeyArgument> keyList = new ArrayList<>(keyArg2AstArg.keySet());
ArrayList<Lua... | java | public LuaPreparedScript endPreparedScript(LuaScriptConfig config) {
if (!endsWithReturnStatement()) {
add(new LuaAstReturnStatement());
}
String scriptText = buildScriptText();
ArrayList<LuaKeyArgument> keyList = new ArrayList<>(keyArg2AstArg.keySet());
ArrayList<Lua... | [
"public",
"LuaPreparedScript",
"endPreparedScript",
"(",
"LuaScriptConfig",
"config",
")",
"{",
"if",
"(",
"!",
"endsWithReturnStatement",
"(",
")",
")",
"{",
"add",
"(",
"new",
"LuaAstReturnStatement",
"(",
")",
")",
";",
"}",
"String",
"scriptText",
"=",
"bu... | End building the prepared script
@param config the configuration for the script to build
@return the new {@link LuaPreparedScript} instance | [
"End",
"building",
"the",
"prepared",
"script"
] | 1951609fa6697df4f69be76e7d66b9284924bd97 | https://github.com/yatechorg/jedis-utils/blob/1951609fa6697df4f69be76e7d66b9284924bd97/src/main/java/org/yatech/jedis/utils/lua/LuaScriptBuilder.java#L125-L137 | train |
yatechorg/jedis-utils | src/main/java/org/yatech/jedis/utils/lua/LuaScriptBuilder.java | LuaScriptBuilder.endPreparedScriptReturn | public LuaPreparedScript endPreparedScriptReturn(LuaValue value, LuaScriptConfig config) {
add(new LuaAstReturnStatement(argument(value)));
return endPreparedScript(config);
} | java | public LuaPreparedScript endPreparedScriptReturn(LuaValue value, LuaScriptConfig config) {
add(new LuaAstReturnStatement(argument(value)));
return endPreparedScript(config);
} | [
"public",
"LuaPreparedScript",
"endPreparedScriptReturn",
"(",
"LuaValue",
"value",
",",
"LuaScriptConfig",
"config",
")",
"{",
"add",
"(",
"new",
"LuaAstReturnStatement",
"(",
"argument",
"(",
"value",
")",
")",
")",
";",
"return",
"endPreparedScript",
"(",
"conf... | End building the prepared script, adding a return value statement
@param value the value to return
@param config the configuration for the script to build
@return the new {@link LuaPreparedScript} instance | [
"End",
"building",
"the",
"prepared",
"script",
"adding",
"a",
"return",
"value",
"statement"
] | 1951609fa6697df4f69be76e7d66b9284924bd97 | https://github.com/yatechorg/jedis-utils/blob/1951609fa6697df4f69be76e7d66b9284924bd97/src/main/java/org/yatech/jedis/utils/lua/LuaScriptBuilder.java#L153-L156 | train |
NessComputing/components-ness-pg | src/main/java/com/nesscomputing/db/postgres/embedded/EmbeddedPostgreSQLController.java | EmbeddedPostgreSQLController.getCluster | private synchronized static Cluster getCluster(URI baseUrl, String[] personalities) throws IOException
{
final Entry<URI, Set<String>> key = Maps.immutableEntry(baseUrl, (Set<String>)ImmutableSet.copyOf(personalities));
Cluster result = CLUSTERS.get(key);
if (result != null) {
r... | java | private synchronized static Cluster getCluster(URI baseUrl, String[] personalities) throws IOException
{
final Entry<URI, Set<String>> key = Maps.immutableEntry(baseUrl, (Set<String>)ImmutableSet.copyOf(personalities));
Cluster result = CLUSTERS.get(key);
if (result != null) {
r... | [
"private",
"synchronized",
"static",
"Cluster",
"getCluster",
"(",
"URI",
"baseUrl",
",",
"String",
"[",
"]",
"personalities",
")",
"throws",
"IOException",
"{",
"final",
"Entry",
"<",
"URI",
",",
"Set",
"<",
"String",
">",
">",
"key",
"=",
"Maps",
".",
... | Each schema set has its own database cluster. The template1 database has the schema preloaded so that
each test case need only create a new database and not re-invoke Migratory. | [
"Each",
"schema",
"set",
"has",
"its",
"own",
"database",
"cluster",
".",
"The",
"template1",
"database",
"has",
"the",
"schema",
"preloaded",
"so",
"that",
"each",
"test",
"case",
"need",
"only",
"create",
"a",
"new",
"database",
"and",
"not",
"re",
"-",
... | e983d6075645ea1bf51cc5fc16901e5aab0f5c70 | https://github.com/NessComputing/components-ness-pg/blob/e983d6075645ea1bf51cc5fc16901e5aab0f5c70/src/main/java/com/nesscomputing/db/postgres/embedded/EmbeddedPostgreSQLController.java#L77-L105 | train |
NessComputing/components-ness-pg | src/main/java/com/nesscomputing/db/postgres/embedded/EmbeddedPostgreSQLController.java | EmbeddedPostgreSQLController.getConfigurationTweak | public ImmutableMap<String, String> getConfigurationTweak(String dbModuleName)
{
final DbInfo db = cluster.getNextDb();
return ImmutableMap.of("ness.db." + dbModuleName + ".uri", getJdbcUri(db),
"ness.db." + dbModuleName + ".ds.user", db.user);
} | java | public ImmutableMap<String, String> getConfigurationTweak(String dbModuleName)
{
final DbInfo db = cluster.getNextDb();
return ImmutableMap.of("ness.db." + dbModuleName + ".uri", getJdbcUri(db),
"ness.db." + dbModuleName + ".ds.user", db.user);
} | [
"public",
"ImmutableMap",
"<",
"String",
",",
"String",
">",
"getConfigurationTweak",
"(",
"String",
"dbModuleName",
")",
"{",
"final",
"DbInfo",
"db",
"=",
"cluster",
".",
"getNextDb",
"(",
")",
";",
"return",
"ImmutableMap",
".",
"of",
"(",
"\"ness.db.\"",
... | Return configuration tweaks in a format appropriate for ness-jdbc DatabaseModule. | [
"Return",
"configuration",
"tweaks",
"in",
"a",
"format",
"appropriate",
"for",
"ness",
"-",
"jdbc",
"DatabaseModule",
"."
] | e983d6075645ea1bf51cc5fc16901e5aab0f5c70 | https://github.com/NessComputing/components-ness-pg/blob/e983d6075645ea1bf51cc5fc16901e5aab0f5c70/src/main/java/com/nesscomputing/db/postgres/embedded/EmbeddedPostgreSQLController.java#L143-L148 | train |
yatechorg/jedis-utils | src/main/java/org/yatech/jedis/collections/JedisMap.java | JedisMap.remove | public long remove(final String... fields) {
return doWithJedis(new JedisCallable<Long>() {
@Override
public Long call(Jedis jedis) {
return jedis.hdel(getKey(), fields);
}
});
} | java | public long remove(final String... fields) {
return doWithJedis(new JedisCallable<Long>() {
@Override
public Long call(Jedis jedis) {
return jedis.hdel(getKey(), fields);
}
});
} | [
"public",
"long",
"remove",
"(",
"final",
"String",
"...",
"fields",
")",
"{",
"return",
"doWithJedis",
"(",
"new",
"JedisCallable",
"<",
"Long",
">",
"(",
")",
"{",
"@",
"Override",
"public",
"Long",
"call",
"(",
"Jedis",
"jedis",
")",
"{",
"return",
... | Remove multiple fields from the map
@param fields the fields to remove
@return the number of fields removed | [
"Remove",
"multiple",
"fields",
"from",
"the",
"map"
] | 1951609fa6697df4f69be76e7d66b9284924bd97 | https://github.com/yatechorg/jedis-utils/blob/1951609fa6697df4f69be76e7d66b9284924bd97/src/main/java/org/yatech/jedis/collections/JedisMap.java#L121-L128 | train |
yatechorg/jedis-utils | src/main/java/org/yatech/jedis/collections/JedisSortedSet.java | JedisSortedSet.score | public Double score(final String member) {
return doWithJedis(new JedisCallable<Double>() {
@Override
public Double call(Jedis jedis) {
return jedis.zscore(getKey(), member);
}
});
} | java | public Double score(final String member) {
return doWithJedis(new JedisCallable<Double>() {
@Override
public Double call(Jedis jedis) {
return jedis.zscore(getKey(), member);
}
});
} | [
"public",
"Double",
"score",
"(",
"final",
"String",
"member",
")",
"{",
"return",
"doWithJedis",
"(",
"new",
"JedisCallable",
"<",
"Double",
">",
"(",
")",
"{",
"@",
"Override",
"public",
"Double",
"call",
"(",
"Jedis",
"jedis",
")",
"{",
"return",
"jed... | Return the score of the specified element of the sorted set at key.
@param member
@return The score value or <code>null</code> if the element does not exist in the set. | [
"Return",
"the",
"score",
"of",
"the",
"specified",
"element",
"of",
"the",
"sorted",
"set",
"at",
"key",
"."
] | 1951609fa6697df4f69be76e7d66b9284924bd97 | https://github.com/yatechorg/jedis-utils/blob/1951609fa6697df4f69be76e7d66b9284924bd97/src/main/java/org/yatech/jedis/collections/JedisSortedSet.java#L100-L107 | train |
yatechorg/jedis-utils | src/main/java/org/yatech/jedis/collections/JedisSortedSet.java | JedisSortedSet.add | public boolean add(final String member, final double score) {
return doWithJedis(new JedisCallable<Boolean>() {
@Override
public Boolean call(Jedis jedis) {
return jedis.zadd(getKey(), score, member) > 0;
}
});
} | java | public boolean add(final String member, final double score) {
return doWithJedis(new JedisCallable<Boolean>() {
@Override
public Boolean call(Jedis jedis) {
return jedis.zadd(getKey(), score, member) > 0;
}
});
} | [
"public",
"boolean",
"add",
"(",
"final",
"String",
"member",
",",
"final",
"double",
"score",
")",
"{",
"return",
"doWithJedis",
"(",
"new",
"JedisCallable",
"<",
"Boolean",
">",
"(",
")",
"{",
"@",
"Override",
"public",
"Boolean",
"call",
"(",
"Jedis",
... | Add an element assigned with its score
@param member the member to add
@param score the score to assign
@return <code>true</code> if the set has been changed | [
"Add",
"an",
"element",
"assigned",
"with",
"its",
"score"
] | 1951609fa6697df4f69be76e7d66b9284924bd97 | https://github.com/yatechorg/jedis-utils/blob/1951609fa6697df4f69be76e7d66b9284924bd97/src/main/java/org/yatech/jedis/collections/JedisSortedSet.java#L146-L153 | train |
yatechorg/jedis-utils | src/main/java/org/yatech/jedis/collections/JedisSortedSet.java | JedisSortedSet.addAll | public long addAll(final Map<String, Double> scoredMember) {
return doWithJedis(new JedisCallable<Long>() {
@Override
public Long call(Jedis jedis) {
return jedis.zadd(getKey(), scoredMember);
}
});
} | java | public long addAll(final Map<String, Double> scoredMember) {
return doWithJedis(new JedisCallable<Long>() {
@Override
public Long call(Jedis jedis) {
return jedis.zadd(getKey(), scoredMember);
}
});
} | [
"public",
"long",
"addAll",
"(",
"final",
"Map",
"<",
"String",
",",
"Double",
">",
"scoredMember",
")",
"{",
"return",
"doWithJedis",
"(",
"new",
"JedisCallable",
"<",
"Long",
">",
"(",
")",
"{",
"@",
"Override",
"public",
"Long",
"call",
"(",
"Jedis",
... | Adds to this set all of the elements in the specified map of members and their score.
@param scoredMember the members to add together with their scores
@return the number of members actually added | [
"Adds",
"to",
"this",
"set",
"all",
"of",
"the",
"elements",
"in",
"the",
"specified",
"map",
"of",
"members",
"and",
"their",
"score",
"."
] | 1951609fa6697df4f69be76e7d66b9284924bd97 | https://github.com/yatechorg/jedis-utils/blob/1951609fa6697df4f69be76e7d66b9284924bd97/src/main/java/org/yatech/jedis/collections/JedisSortedSet.java#L174-L181 | train |
yatechorg/jedis-utils | src/main/java/org/yatech/jedis/collections/JedisSortedSet.java | JedisSortedSet.rangeByRank | public Set<String> rangeByRank(final long start, final long end) {
return doWithJedis(new JedisCallable<Set<String>>() {
@Override
public Set<String> call(Jedis jedis) {
return jedis.zrange(getKey(), start, end);
}
});
} | java | public Set<String> rangeByRank(final long start, final long end) {
return doWithJedis(new JedisCallable<Set<String>>() {
@Override
public Set<String> call(Jedis jedis) {
return jedis.zrange(getKey(), start, end);
}
});
} | [
"public",
"Set",
"<",
"String",
">",
"rangeByRank",
"(",
"final",
"long",
"start",
",",
"final",
"long",
"end",
")",
"{",
"return",
"doWithJedis",
"(",
"new",
"JedisCallable",
"<",
"Set",
"<",
"String",
">",
">",
"(",
")",
"{",
"@",
"Override",
"public... | Returns the specified range of elements in the sorted set.
The elements are considered to be ordered from the lowest to the highest score.
Lexicographical order is used for elements with equal score.
Both start and stop are zero-based inclusive indexes. They can also be negative numbers indicating offsets from
the end ... | [
"Returns",
"the",
"specified",
"range",
"of",
"elements",
"in",
"the",
"sorted",
"set",
".",
"The",
"elements",
"are",
"considered",
"to",
"be",
"ordered",
"from",
"the",
"lowest",
"to",
"the",
"highest",
"score",
".",
"Lexicographical",
"order",
"is",
"used... | 1951609fa6697df4f69be76e7d66b9284924bd97 | https://github.com/yatechorg/jedis-utils/blob/1951609fa6697df4f69be76e7d66b9284924bd97/src/main/java/org/yatech/jedis/collections/JedisSortedSet.java#L284-L291 | train |
yatechorg/jedis-utils | src/main/java/org/yatech/jedis/collections/JedisSortedSet.java | JedisSortedSet.rangeByRankReverse | public Set<String> rangeByRankReverse(final long start, final long end) {
return doWithJedis(new JedisCallable<Set<String>>() {
@Override
public Set<String> call(Jedis jedis) {
return jedis.zrevrange(getKey(), start, end);
}
});
} | java | public Set<String> rangeByRankReverse(final long start, final long end) {
return doWithJedis(new JedisCallable<Set<String>>() {
@Override
public Set<String> call(Jedis jedis) {
return jedis.zrevrange(getKey(), start, end);
}
});
} | [
"public",
"Set",
"<",
"String",
">",
"rangeByRankReverse",
"(",
"final",
"long",
"start",
",",
"final",
"long",
"end",
")",
"{",
"return",
"doWithJedis",
"(",
"new",
"JedisCallable",
"<",
"Set",
"<",
"String",
">",
">",
"(",
")",
"{",
"@",
"Override",
... | Returns the specified range of elements in the sorted set.
The elements are considered to be ordered from the highest to the lowest score.
Descending lexicographical order is used for elements with equal score.
Both start and stop are zero-based inclusive indexes. They can also be negative numbers indicating offsets fr... | [
"Returns",
"the",
"specified",
"range",
"of",
"elements",
"in",
"the",
"sorted",
"set",
".",
"The",
"elements",
"are",
"considered",
"to",
"be",
"ordered",
"from",
"the",
"highest",
"to",
"the",
"lowest",
"score",
".",
"Descending",
"lexicographical",
"order",... | 1951609fa6697df4f69be76e7d66b9284924bd97 | https://github.com/yatechorg/jedis-utils/blob/1951609fa6697df4f69be76e7d66b9284924bd97/src/main/java/org/yatech/jedis/collections/JedisSortedSet.java#L303-L310 | train |
yatechorg/jedis-utils | src/main/java/org/yatech/jedis/collections/JedisSortedSet.java | JedisSortedSet.countByLex | public long countByLex(final LexRange lexRange) {
return doWithJedis(new JedisCallable<Long>() {
@Override
public Long call(Jedis jedis) {
return jedis.zlexcount(getKey(), lexRange.from(), lexRange.to());
}
});
} | java | public long countByLex(final LexRange lexRange) {
return doWithJedis(new JedisCallable<Long>() {
@Override
public Long call(Jedis jedis) {
return jedis.zlexcount(getKey(), lexRange.from(), lexRange.to());
}
});
} | [
"public",
"long",
"countByLex",
"(",
"final",
"LexRange",
"lexRange",
")",
"{",
"return",
"doWithJedis",
"(",
"new",
"JedisCallable",
"<",
"Long",
">",
"(",
")",
"{",
"@",
"Override",
"public",
"Long",
"call",
"(",
"Jedis",
"jedis",
")",
"{",
"return",
"... | When all the elements in a sorted set are inserted with the same score, in order to force lexicographical
ordering, this command returns the number of elements in the sorted set with a value in the given range.
@param lexRange
@return the number of elements in the specified range. | [
"When",
"all",
"the",
"elements",
"in",
"a",
"sorted",
"set",
"are",
"inserted",
"with",
"the",
"same",
"score",
"in",
"order",
"to",
"force",
"lexicographical",
"ordering",
"this",
"command",
"returns",
"the",
"number",
"of",
"elements",
"in",
"the",
"sorte... | 1951609fa6697df4f69be76e7d66b9284924bd97 | https://github.com/yatechorg/jedis-utils/blob/1951609fa6697df4f69be76e7d66b9284924bd97/src/main/java/org/yatech/jedis/collections/JedisSortedSet.java#L336-L343 | train |
yatechorg/jedis-utils | src/main/java/org/yatech/jedis/collections/JedisSortedSet.java | JedisSortedSet.rangeByLex | public Set<String> rangeByLex(final LexRange lexRange) {
return doWithJedis(new JedisCallable<Set<String>>() {
@Override
public Set<String> call(Jedis jedis) {
if (lexRange.hasLimit()) {
return jedis.zrangeByLex(getKey(), lexRange.from(), lexRange.to()... | java | public Set<String> rangeByLex(final LexRange lexRange) {
return doWithJedis(new JedisCallable<Set<String>>() {
@Override
public Set<String> call(Jedis jedis) {
if (lexRange.hasLimit()) {
return jedis.zrangeByLex(getKey(), lexRange.from(), lexRange.to()... | [
"public",
"Set",
"<",
"String",
">",
"rangeByLex",
"(",
"final",
"LexRange",
"lexRange",
")",
"{",
"return",
"doWithJedis",
"(",
"new",
"JedisCallable",
"<",
"Set",
"<",
"String",
">",
">",
"(",
")",
"{",
"@",
"Override",
"public",
"Set",
"<",
"String",
... | When all the elements in a sorted set are inserted with the same score, in order to force lexicographical
ordering, this command returns all the elements in the sorted set with a value in the given range.
If the elements in the sorted set have different scores, the returned elements are unspecified.
@param lexRange
@re... | [
"When",
"all",
"the",
"elements",
"in",
"a",
"sorted",
"set",
"are",
"inserted",
"with",
"the",
"same",
"score",
"in",
"order",
"to",
"force",
"lexicographical",
"ordering",
"this",
"command",
"returns",
"all",
"the",
"elements",
"in",
"the",
"sorted",
"set"... | 1951609fa6697df4f69be76e7d66b9284924bd97 | https://github.com/yatechorg/jedis-utils/blob/1951609fa6697df4f69be76e7d66b9284924bd97/src/main/java/org/yatech/jedis/collections/JedisSortedSet.java#L352-L363 | train |
yatechorg/jedis-utils | src/main/java/org/yatech/jedis/collections/JedisSortedSet.java | JedisSortedSet.rangeByLexReverse | public Set<String> rangeByLexReverse(final LexRange lexRange) {
return doWithJedis(new JedisCallable<Set<String>>() {
@Override
public Set<String> call(Jedis jedis) {
if (lexRange.hasLimit()) {
return jedis.zrevrangeByLex(getKey(), lexRange.fromReverse... | java | public Set<String> rangeByLexReverse(final LexRange lexRange) {
return doWithJedis(new JedisCallable<Set<String>>() {
@Override
public Set<String> call(Jedis jedis) {
if (lexRange.hasLimit()) {
return jedis.zrevrangeByLex(getKey(), lexRange.fromReverse... | [
"public",
"Set",
"<",
"String",
">",
"rangeByLexReverse",
"(",
"final",
"LexRange",
"lexRange",
")",
"{",
"return",
"doWithJedis",
"(",
"new",
"JedisCallable",
"<",
"Set",
"<",
"String",
">",
">",
"(",
")",
"{",
"@",
"Override",
"public",
"Set",
"<",
"St... | When all the elements in a sorted set are inserted with the same score, in order to force lexicographical
ordering, this command returns all the elements in the sorted set with a value in the given range.
@param lexRange
@return the range of elements | [
"When",
"all",
"the",
"elements",
"in",
"a",
"sorted",
"set",
"are",
"inserted",
"with",
"the",
"same",
"score",
"in",
"order",
"to",
"force",
"lexicographical",
"ordering",
"this",
"command",
"returns",
"all",
"the",
"elements",
"in",
"the",
"sorted",
"set"... | 1951609fa6697df4f69be76e7d66b9284924bd97 | https://github.com/yatechorg/jedis-utils/blob/1951609fa6697df4f69be76e7d66b9284924bd97/src/main/java/org/yatech/jedis/collections/JedisSortedSet.java#L371-L382 | train |
yatechorg/jedis-utils | src/main/java/org/yatech/jedis/collections/JedisSortedSet.java | JedisSortedSet.removeRangeByLex | public long removeRangeByLex(final LexRange lexRange) {
return doWithJedis(new JedisCallable<Long>() {
@Override
public Long call(Jedis jedis) {
return jedis.zremrangeByLex(getKey(), lexRange.from(), lexRange.to());
}
});
} | java | public long removeRangeByLex(final LexRange lexRange) {
return doWithJedis(new JedisCallable<Long>() {
@Override
public Long call(Jedis jedis) {
return jedis.zremrangeByLex(getKey(), lexRange.from(), lexRange.to());
}
});
} | [
"public",
"long",
"removeRangeByLex",
"(",
"final",
"LexRange",
"lexRange",
")",
"{",
"return",
"doWithJedis",
"(",
"new",
"JedisCallable",
"<",
"Long",
">",
"(",
")",
"{",
"@",
"Override",
"public",
"Long",
"call",
"(",
"Jedis",
"jedis",
")",
"{",
"return... | When all the elements in a sorted set are inserted with the same score, in order to force lexicographical
ordering, this command removes all elements in the sorted set between the lexicographical range specified.
@param lexRange
@return the number of elements removed. | [
"When",
"all",
"the",
"elements",
"in",
"a",
"sorted",
"set",
"are",
"inserted",
"with",
"the",
"same",
"score",
"in",
"order",
"to",
"force",
"lexicographical",
"ordering",
"this",
"command",
"removes",
"all",
"elements",
"in",
"the",
"sorted",
"set",
"betw... | 1951609fa6697df4f69be76e7d66b9284924bd97 | https://github.com/yatechorg/jedis-utils/blob/1951609fa6697df4f69be76e7d66b9284924bd97/src/main/java/org/yatech/jedis/collections/JedisSortedSet.java#L390-L397 | train |
yatechorg/jedis-utils | src/main/java/org/yatech/jedis/collections/JedisSortedSet.java | JedisSortedSet.rangeByScoreReverse | public Set<String> rangeByScoreReverse(final ScoreRange scoreRange) {
return doWithJedis(new JedisCallable<Set<String>>() {
@Override
public Set<String> call(Jedis jedis) {
if (scoreRange.hasLimit()) {
return jedis.zrevrangeByScore(getKey(), scoreRange... | java | public Set<String> rangeByScoreReverse(final ScoreRange scoreRange) {
return doWithJedis(new JedisCallable<Set<String>>() {
@Override
public Set<String> call(Jedis jedis) {
if (scoreRange.hasLimit()) {
return jedis.zrevrangeByScore(getKey(), scoreRange... | [
"public",
"Set",
"<",
"String",
">",
"rangeByScoreReverse",
"(",
"final",
"ScoreRange",
"scoreRange",
")",
"{",
"return",
"doWithJedis",
"(",
"new",
"JedisCallable",
"<",
"Set",
"<",
"String",
">",
">",
"(",
")",
"{",
"@",
"Override",
"public",
"Set",
"<",... | Returns all the elements in the sorted set with a score in the given range.
In contrary to the default ordering of sorted sets, for this command the elements are considered to be ordered
from high to low scores.
The elements having the same score are returned in reverse lexicographical order.
@param scoreRange
@return ... | [
"Returns",
"all",
"the",
"elements",
"in",
"the",
"sorted",
"set",
"with",
"a",
"score",
"in",
"the",
"given",
"range",
".",
"In",
"contrary",
"to",
"the",
"default",
"ordering",
"of",
"sorted",
"sets",
"for",
"this",
"command",
"the",
"elements",
"are",
... | 1951609fa6697df4f69be76e7d66b9284924bd97 | https://github.com/yatechorg/jedis-utils/blob/1951609fa6697df4f69be76e7d66b9284924bd97/src/main/java/org/yatech/jedis/collections/JedisSortedSet.java#L428-L439 | train |
yatechorg/jedis-utils | src/main/java/org/yatech/jedis/collections/JedisSortedSet.java | JedisSortedSet.removeRangeByScore | public long removeRangeByScore(final ScoreRange scoreRange) {
return doWithJedis(new JedisCallable<Long>() {
@Override
public Long call(Jedis jedis) {
return jedis.zremrangeByScore(getKey(), scoreRange.from(), scoreRange.to());
}
});
} | java | public long removeRangeByScore(final ScoreRange scoreRange) {
return doWithJedis(new JedisCallable<Long>() {
@Override
public Long call(Jedis jedis) {
return jedis.zremrangeByScore(getKey(), scoreRange.from(), scoreRange.to());
}
});
} | [
"public",
"long",
"removeRangeByScore",
"(",
"final",
"ScoreRange",
"scoreRange",
")",
"{",
"return",
"doWithJedis",
"(",
"new",
"JedisCallable",
"<",
"Long",
">",
"(",
")",
"{",
"@",
"Override",
"public",
"Long",
"call",
"(",
"Jedis",
"jedis",
")",
"{",
"... | Removes all elements in the sorted set with a score in the given range.
@param scoreRange
@return the number of elements removed. | [
"Removes",
"all",
"elements",
"in",
"the",
"sorted",
"set",
"with",
"a",
"score",
"in",
"the",
"given",
"range",
"."
] | 1951609fa6697df4f69be76e7d66b9284924bd97 | https://github.com/yatechorg/jedis-utils/blob/1951609fa6697df4f69be76e7d66b9284924bd97/src/main/java/org/yatech/jedis/collections/JedisSortedSet.java#L446-L453 | train |
Quickhull3d/quickhull3d | src/main/java/com/github/quickhull3d/QuickHull3D.java | QuickHull3D.build | public void build(double[] coords, int nump) throws IllegalArgumentException {
if (nump < 4) {
throw new IllegalArgumentException("Less than four input points specified");
}
if (coords.length / 3 < nump) {
throw new IllegalArgumentException("Coordinate array too small for... | java | public void build(double[] coords, int nump) throws IllegalArgumentException {
if (nump < 4) {
throw new IllegalArgumentException("Less than four input points specified");
}
if (coords.length / 3 < nump) {
throw new IllegalArgumentException("Coordinate array too small for... | [
"public",
"void",
"build",
"(",
"double",
"[",
"]",
"coords",
",",
"int",
"nump",
")",
"throws",
"IllegalArgumentException",
"{",
"if",
"(",
"nump",
"<",
"4",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Less than four input points specified\"",
... | Constructs the convex hull of a set of points whose coordinates are given
by an array of doubles.
@param coords
x, y, and z coordinates of each input point. The length of
this array must be at least three times <code>nump</code>.
@param nump
number of input points
@throws IllegalArgumentException
the number of input p... | [
"Constructs",
"the",
"convex",
"hull",
"of",
"a",
"set",
"of",
"points",
"whose",
"coordinates",
"are",
"given",
"by",
"an",
"array",
"of",
"doubles",
"."
] | 3f80953b86c46385e84730e5d2a1745cbfa12703 | https://github.com/Quickhull3d/quickhull3d/blob/3f80953b86c46385e84730e5d2a1745cbfa12703/src/main/java/com/github/quickhull3d/QuickHull3D.java#L462-L472 | train |
Quickhull3d/quickhull3d | src/main/java/com/github/quickhull3d/QuickHull3D.java | QuickHull3D.build | public void build(Point3d[] points, int nump) throws IllegalArgumentException {
if (nump < 4) {
throw new IllegalArgumentException("Less than four input points specified");
}
if (points.length < nump) {
throw new IllegalArgumentException("Point array too small for specifi... | java | public void build(Point3d[] points, int nump) throws IllegalArgumentException {
if (nump < 4) {
throw new IllegalArgumentException("Less than four input points specified");
}
if (points.length < nump) {
throw new IllegalArgumentException("Point array too small for specifi... | [
"public",
"void",
"build",
"(",
"Point3d",
"[",
"]",
"points",
",",
"int",
"nump",
")",
"throws",
"IllegalArgumentException",
"{",
"if",
"(",
"nump",
"<",
"4",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Less than four input points specified\"",
... | Constructs the convex hull of a set of points.
@param points
input points
@param nump
number of input points
@throws IllegalArgumentException
the number of input points is less than four or greater then
the length of <code>points</code>, or the points appear to be
coincident, colinear, or coplanar. | [
"Constructs",
"the",
"convex",
"hull",
"of",
"a",
"set",
"of",
"points",
"."
] | 3f80953b86c46385e84730e5d2a1745cbfa12703 | https://github.com/Quickhull3d/quickhull3d/blob/3f80953b86c46385e84730e5d2a1745cbfa12703/src/main/java/com/github/quickhull3d/QuickHull3D.java#L499-L509 | train |
Quickhull3d/quickhull3d | src/main/java/com/github/quickhull3d/QuickHull3D.java | QuickHull3D.getVertices | public Point3d[] getVertices() {
Point3d[] vtxs = new Point3d[numVertices];
for (int i = 0; i < numVertices; i++) {
vtxs[i] = pointBuffer[vertexPointIndices[i]].pnt;
}
return vtxs;
} | java | public Point3d[] getVertices() {
Point3d[] vtxs = new Point3d[numVertices];
for (int i = 0; i < numVertices; i++) {
vtxs[i] = pointBuffer[vertexPointIndices[i]].pnt;
}
return vtxs;
} | [
"public",
"Point3d",
"[",
"]",
"getVertices",
"(",
")",
"{",
"Point3d",
"[",
"]",
"vtxs",
"=",
"new",
"Point3d",
"[",
"numVertices",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"numVertices",
";",
"i",
"++",
")",
"{",
"vtxs",
"[",
... | Returns the vertex points in this hull.
@return array of vertex points
@see QuickHull3D#getVertices(double[])
@see QuickHull3D#getFaces() | [
"Returns",
"the",
"vertex",
"points",
"in",
"this",
"hull",
"."
] | 3f80953b86c46385e84730e5d2a1745cbfa12703 | https://github.com/Quickhull3d/quickhull3d/blob/3f80953b86c46385e84730e5d2a1745cbfa12703/src/main/java/com/github/quickhull3d/QuickHull3D.java#L763-L769 | train |
Quickhull3d/quickhull3d | src/main/java/com/github/quickhull3d/QuickHull3D.java | QuickHull3D.getVertices | public int getVertices(double[] coords) {
for (int i = 0; i < numVertices; i++) {
Point3d pnt = pointBuffer[vertexPointIndices[i]].pnt;
coords[i * 3 + 0] = pnt.x;
coords[i * 3 + 1] = pnt.y;
coords[i * 3 + 2] = pnt.z;
}
return numVertices;
} | java | public int getVertices(double[] coords) {
for (int i = 0; i < numVertices; i++) {
Point3d pnt = pointBuffer[vertexPointIndices[i]].pnt;
coords[i * 3 + 0] = pnt.x;
coords[i * 3 + 1] = pnt.y;
coords[i * 3 + 2] = pnt.z;
}
return numVertices;
} | [
"public",
"int",
"getVertices",
"(",
"double",
"[",
"]",
"coords",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"numVertices",
";",
"i",
"++",
")",
"{",
"Point3d",
"pnt",
"=",
"pointBuffer",
"[",
"vertexPointIndices",
"[",
"i",
"]",
"... | Returns the coordinates of the vertex points of this hull.
@param coords
returns the x, y, z coordinates of each vertex. This length of
this array must be at least three times the number of
vertices.
@return the number of vertices
@see QuickHull3D#getVertices()
@see QuickHull3D#getFaces() | [
"Returns",
"the",
"coordinates",
"of",
"the",
"vertex",
"points",
"of",
"this",
"hull",
"."
] | 3f80953b86c46385e84730e5d2a1745cbfa12703 | https://github.com/Quickhull3d/quickhull3d/blob/3f80953b86c46385e84730e5d2a1745cbfa12703/src/main/java/com/github/quickhull3d/QuickHull3D.java#L782-L790 | train |
Quickhull3d/quickhull3d | src/main/java/com/github/quickhull3d/QuickHull3D.java | QuickHull3D.getVertexPointIndices | public int[] getVertexPointIndices() {
int[] indices = new int[numVertices];
for (int i = 0; i < numVertices; i++) {
indices[i] = vertexPointIndices[i];
}
return indices;
} | java | public int[] getVertexPointIndices() {
int[] indices = new int[numVertices];
for (int i = 0; i < numVertices; i++) {
indices[i] = vertexPointIndices[i];
}
return indices;
} | [
"public",
"int",
"[",
"]",
"getVertexPointIndices",
"(",
")",
"{",
"int",
"[",
"]",
"indices",
"=",
"new",
"int",
"[",
"numVertices",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"numVertices",
";",
"i",
"++",
")",
"{",
"indices",
"... | Returns an array specifing the index of each hull vertex with respect to
the original input points.
@return vertex indices with respect to the original points | [
"Returns",
"an",
"array",
"specifing",
"the",
"index",
"of",
"each",
"hull",
"vertex",
"with",
"respect",
"to",
"the",
"original",
"input",
"points",
"."
] | 3f80953b86c46385e84730e5d2a1745cbfa12703 | https://github.com/Quickhull3d/quickhull3d/blob/3f80953b86c46385e84730e5d2a1745cbfa12703/src/main/java/com/github/quickhull3d/QuickHull3D.java#L798-L804 | train |
yatechorg/jedis-utils | src/main/java/org/yatech/jedis/collections/JedisSet.java | JedisSet.addAll | public long addAll(final String... members) {
return doWithJedis(new JedisCallable<Long>() {
@Override
public Long call(Jedis jedis) {
return jedis.sadd(getKey(), members);
}
});
} | java | public long addAll(final String... members) {
return doWithJedis(new JedisCallable<Long>() {
@Override
public Long call(Jedis jedis) {
return jedis.sadd(getKey(), members);
}
});
} | [
"public",
"long",
"addAll",
"(",
"final",
"String",
"...",
"members",
")",
"{",
"return",
"doWithJedis",
"(",
"new",
"JedisCallable",
"<",
"Long",
">",
"(",
")",
"{",
"@",
"Override",
"public",
"Long",
"call",
"(",
"Jedis",
"jedis",
")",
"{",
"return",
... | Adds to this set all of the elements in the specified members array
@param members the members to add
@return the number of members actually added | [
"Adds",
"to",
"this",
"set",
"all",
"of",
"the",
"elements",
"in",
"the",
"specified",
"members",
"array"
] | 1951609fa6697df4f69be76e7d66b9284924bd97 | https://github.com/yatechorg/jedis-utils/blob/1951609fa6697df4f69be76e7d66b9284924bd97/src/main/java/org/yatech/jedis/collections/JedisSet.java#L98-L105 | train |
yatechorg/jedis-utils | src/main/java/org/yatech/jedis/collections/JedisSet.java | JedisSet.removeAll | public long removeAll(final String... members) {
return doWithJedis(new JedisCallable<Long>() {
@Override
public Long call(Jedis jedis) {
return jedis.srem(getKey(), members);
}
});
} | java | public long removeAll(final String... members) {
return doWithJedis(new JedisCallable<Long>() {
@Override
public Long call(Jedis jedis) {
return jedis.srem(getKey(), members);
}
});
} | [
"public",
"long",
"removeAll",
"(",
"final",
"String",
"...",
"members",
")",
"{",
"return",
"doWithJedis",
"(",
"new",
"JedisCallable",
"<",
"Long",
">",
"(",
")",
"{",
"@",
"Override",
"public",
"Long",
"call",
"(",
"Jedis",
"jedis",
")",
"{",
"return"... | Removes from this set all of its elements that are contained in the specified members array
@param members the members to remove
@return the number of members actually removed | [
"Removes",
"from",
"this",
"set",
"all",
"of",
"its",
"elements",
"that",
"are",
"contained",
"in",
"the",
"specified",
"members",
"array"
] | 1951609fa6697df4f69be76e7d66b9284924bd97 | https://github.com/yatechorg/jedis-utils/blob/1951609fa6697df4f69be76e7d66b9284924bd97/src/main/java/org/yatech/jedis/collections/JedisSet.java#L117-L124 | train |
yatechorg/jedis-utils | src/main/java/org/yatech/jedis/collections/JedisSet.java | JedisSet.pop | public String pop() {
return doWithJedis(new JedisCallable<String>() {
@Override
public String call(Jedis jedis) {
return jedis.spop(getKey());
}
});
} | java | public String pop() {
return doWithJedis(new JedisCallable<String>() {
@Override
public String call(Jedis jedis) {
return jedis.spop(getKey());
}
});
} | [
"public",
"String",
"pop",
"(",
")",
"{",
"return",
"doWithJedis",
"(",
"new",
"JedisCallable",
"<",
"String",
">",
"(",
")",
"{",
"@",
"Override",
"public",
"String",
"call",
"(",
"Jedis",
"jedis",
")",
"{",
"return",
"jedis",
".",
"spop",
"(",
"getKe... | Removes and returns a random element from the set.
@return the removed element, or <code>null</code> when the key does not exist. | [
"Removes",
"and",
"returns",
"a",
"random",
"element",
"from",
"the",
"set",
"."
] | 1951609fa6697df4f69be76e7d66b9284924bd97 | https://github.com/yatechorg/jedis-utils/blob/1951609fa6697df4f69be76e7d66b9284924bd97/src/main/java/org/yatech/jedis/collections/JedisSet.java#L172-L179 | train |
arakelian/key-value-store | src/main/java/com/arakelian/store/AbstractStore.java | AbstractStore.idsOf | protected Object[] idsOf(final List<?> idsOrValues) {
// convert list to array that we can mutate
final Object[] ids = idsOrValues.toArray();
// mutate array to contain only non-empty ids
int length = 0;
for (int i = 0; i < ids.length;) {
final Object p = ids[i++];
... | java | protected Object[] idsOf(final List<?> idsOrValues) {
// convert list to array that we can mutate
final Object[] ids = idsOrValues.toArray();
// mutate array to contain only non-empty ids
int length = 0;
for (int i = 0; i < ids.length;) {
final Object p = ids[i++];
... | [
"protected",
"Object",
"[",
"]",
"idsOf",
"(",
"final",
"List",
"<",
"?",
">",
"idsOrValues",
")",
"{",
"// convert list to array that we can mutate",
"final",
"Object",
"[",
"]",
"ids",
"=",
"idsOrValues",
".",
"toArray",
"(",
")",
";",
"// mutate array to cont... | Returns an array of non-empty ids from the given list of ids or values.
@param idsOrValues
list of ids and/or values
@return array of non-empty ids | [
"Returns",
"an",
"array",
"of",
"non",
"-",
"empty",
"ids",
"from",
"the",
"given",
"list",
"of",
"ids",
"or",
"values",
"."
] | b4a5b67bb6ce7cd1ba6b6688ea0ae6ccae06a764 | https://github.com/arakelian/key-value-store/blob/b4a5b67bb6ce7cd1ba6b6688ea0ae6ccae06a764/src/main/java/com/arakelian/store/AbstractStore.java#L108-L147 | train |
yatechorg/jedis-utils | src/main/java/org/yatech/jedis/collections/JedisList.java | JedisList.indexOf | public long indexOf(final String element) {
return doWithJedis(new JedisCallable<Long>() {
@Override
public Long call(Jedis jedis) {
return doIndexOf(jedis, element);
}
});
} | java | public long indexOf(final String element) {
return doWithJedis(new JedisCallable<Long>() {
@Override
public Long call(Jedis jedis) {
return doIndexOf(jedis, element);
}
});
} | [
"public",
"long",
"indexOf",
"(",
"final",
"String",
"element",
")",
"{",
"return",
"doWithJedis",
"(",
"new",
"JedisCallable",
"<",
"Long",
">",
"(",
")",
"{",
"@",
"Override",
"public",
"Long",
"call",
"(",
"Jedis",
"jedis",
")",
"{",
"return",
"doInde... | Find the index of the first matching element in the list
@param element the element value to find
@return the index of the first matching element, or <code>-1</code> if none found | [
"Find",
"the",
"index",
"of",
"the",
"first",
"matching",
"element",
"in",
"the",
"list"
] | 1951609fa6697df4f69be76e7d66b9284924bd97 | https://github.com/yatechorg/jedis-utils/blob/1951609fa6697df4f69be76e7d66b9284924bd97/src/main/java/org/yatech/jedis/collections/JedisList.java#L189-L196 | train |
yatechorg/jedis-utils | src/main/java/org/yatech/jedis/collections/JedisList.java | JedisList.get | public String get(final long index) {
return doWithJedis(new JedisCallable<String>() {
@Override
public String call(Jedis jedis) {
return jedis.lindex(getKey(), index);
}
});
} | java | public String get(final long index) {
return doWithJedis(new JedisCallable<String>() {
@Override
public String call(Jedis jedis) {
return jedis.lindex(getKey(), index);
}
});
} | [
"public",
"String",
"get",
"(",
"final",
"long",
"index",
")",
"{",
"return",
"doWithJedis",
"(",
"new",
"JedisCallable",
"<",
"String",
">",
"(",
")",
"{",
"@",
"Override",
"public",
"String",
"call",
"(",
"Jedis",
"jedis",
")",
"{",
"return",
"jedis",
... | Get the element value in the list by index
@param index the position in the list from which to get the element
@return the element value | [
"Get",
"the",
"element",
"value",
"in",
"the",
"list",
"by",
"index"
] | 1951609fa6697df4f69be76e7d66b9284924bd97 | https://github.com/yatechorg/jedis-utils/blob/1951609fa6697df4f69be76e7d66b9284924bd97/src/main/java/org/yatech/jedis/collections/JedisList.java#L213-L220 | train |
yatechorg/jedis-utils | src/main/java/org/yatech/jedis/collections/JedisList.java | JedisList.subList | public List<String> subList(final long fromIndex, final long toIndex) {
return doWithJedis(new JedisCallable<List<String>>() {
@Override
public List<String> call(Jedis jedis) {
return jedis.lrange(getKey(), fromIndex, toIndex);
}
});
} | java | public List<String> subList(final long fromIndex, final long toIndex) {
return doWithJedis(new JedisCallable<List<String>>() {
@Override
public List<String> call(Jedis jedis) {
return jedis.lrange(getKey(), fromIndex, toIndex);
}
});
} | [
"public",
"List",
"<",
"String",
">",
"subList",
"(",
"final",
"long",
"fromIndex",
",",
"final",
"long",
"toIndex",
")",
"{",
"return",
"doWithJedis",
"(",
"new",
"JedisCallable",
"<",
"List",
"<",
"String",
">",
">",
"(",
")",
"{",
"@",
"Override",
"... | Get a sub-list of this list
@param fromIndex index of the first element in the sub-list (inclusive)
@param toIndex index of the last element in the sub-list (inclusive)
@return the sub-list | [
"Get",
"a",
"sub",
"-",
"list",
"of",
"this",
"list"
] | 1951609fa6697df4f69be76e7d66b9284924bd97 | https://github.com/yatechorg/jedis-utils/blob/1951609fa6697df4f69be76e7d66b9284924bd97/src/main/java/org/yatech/jedis/collections/JedisList.java#L228-L235 | train |
yatechorg/jedis-utils | src/main/java/org/yatech/jedis/collections/JedisKeysScanner.java | JedisKeysScanner.ensureNext | private void ensureNext() {
// Check if the current scan result has more keys (i.e. the index did not reach the end of the result list)
if (resultIndex < scanResult.getResult().size()) {
return;
}
// Since the current scan result was fully iterated,
// if there is ano... | java | private void ensureNext() {
// Check if the current scan result has more keys (i.e. the index did not reach the end of the result list)
if (resultIndex < scanResult.getResult().size()) {
return;
}
// Since the current scan result was fully iterated,
// if there is ano... | [
"private",
"void",
"ensureNext",
"(",
")",
"{",
"// Check if the current scan result has more keys (i.e. the index did not reach the end of the result list)",
"if",
"(",
"resultIndex",
"<",
"scanResult",
".",
"getResult",
"(",
")",
".",
"size",
"(",
")",
")",
"{",
"return... | Make sure the result index points to the next available key in the scan result, if exists. | [
"Make",
"sure",
"the",
"result",
"index",
"points",
"to",
"the",
"next",
"available",
"key",
"in",
"the",
"scan",
"result",
"if",
"exists",
"."
] | 1951609fa6697df4f69be76e7d66b9284924bd97 | https://github.com/yatechorg/jedis-utils/blob/1951609fa6697df4f69be76e7d66b9284924bd97/src/main/java/org/yatech/jedis/collections/JedisKeysScanner.java#L129-L141 | train |
Quickhull3d/quickhull3d | src/main/java/com/github/quickhull3d/VertexList.java | VertexList.addAll | public void addAll(Vertex vtx) {
if (head == null) {
head = vtx;
} else {
tail.next = vtx;
}
vtx.prev = tail;
while (vtx.next != null) {
vtx = vtx.next;
}
tail = vtx;
} | java | public void addAll(Vertex vtx) {
if (head == null) {
head = vtx;
} else {
tail.next = vtx;
}
vtx.prev = tail;
while (vtx.next != null) {
vtx = vtx.next;
}
tail = vtx;
} | [
"public",
"void",
"addAll",
"(",
"Vertex",
"vtx",
")",
"{",
"if",
"(",
"head",
"==",
"null",
")",
"{",
"head",
"=",
"vtx",
";",
"}",
"else",
"{",
"tail",
".",
"next",
"=",
"vtx",
";",
"}",
"vtx",
".",
"prev",
"=",
"tail",
";",
"while",
"(",
"... | Adds a chain of vertices to the end of this list. | [
"Adds",
"a",
"chain",
"of",
"vertices",
"to",
"the",
"end",
"of",
"this",
"list",
"."
] | 3f80953b86c46385e84730e5d2a1745cbfa12703 | https://github.com/Quickhull3d/quickhull3d/blob/3f80953b86c46385e84730e5d2a1745cbfa12703/src/main/java/com/github/quickhull3d/VertexList.java#L65-L76 | train |
Quickhull3d/quickhull3d | src/main/java/com/github/quickhull3d/VertexList.java | VertexList.delete | public void delete(Vertex vtx) {
if (vtx.prev == null) {
head = vtx.next;
} else {
vtx.prev.next = vtx.next;
}
if (vtx.next == null) {
tail = vtx.prev;
} else {
vtx.next.prev = vtx.prev;
}
} | java | public void delete(Vertex vtx) {
if (vtx.prev == null) {
head = vtx.next;
} else {
vtx.prev.next = vtx.next;
}
if (vtx.next == null) {
tail = vtx.prev;
} else {
vtx.next.prev = vtx.prev;
}
} | [
"public",
"void",
"delete",
"(",
"Vertex",
"vtx",
")",
"{",
"if",
"(",
"vtx",
".",
"prev",
"==",
"null",
")",
"{",
"head",
"=",
"vtx",
".",
"next",
";",
"}",
"else",
"{",
"vtx",
".",
"prev",
".",
"next",
"=",
"vtx",
".",
"next",
";",
"}",
"if... | Deletes a vertex from this list. | [
"Deletes",
"a",
"vertex",
"from",
"this",
"list",
"."
] | 3f80953b86c46385e84730e5d2a1745cbfa12703 | https://github.com/Quickhull3d/quickhull3d/blob/3f80953b86c46385e84730e5d2a1745cbfa12703/src/main/java/com/github/quickhull3d/VertexList.java#L81-L92 | train |
Quickhull3d/quickhull3d | src/main/java/com/github/quickhull3d/VertexList.java | VertexList.delete | public void delete(Vertex vtx1, Vertex vtx2) {
if (vtx1.prev == null) {
head = vtx2.next;
} else {
vtx1.prev.next = vtx2.next;
}
if (vtx2.next == null) {
tail = vtx1.prev;
} else {
vtx2.next.prev = vtx1.prev;
}
} | java | public void delete(Vertex vtx1, Vertex vtx2) {
if (vtx1.prev == null) {
head = vtx2.next;
} else {
vtx1.prev.next = vtx2.next;
}
if (vtx2.next == null) {
tail = vtx1.prev;
} else {
vtx2.next.prev = vtx1.prev;
}
} | [
"public",
"void",
"delete",
"(",
"Vertex",
"vtx1",
",",
"Vertex",
"vtx2",
")",
"{",
"if",
"(",
"vtx1",
".",
"prev",
"==",
"null",
")",
"{",
"head",
"=",
"vtx2",
".",
"next",
";",
"}",
"else",
"{",
"vtx1",
".",
"prev",
".",
"next",
"=",
"vtx2",
... | Deletes a chain of vertices from this list. | [
"Deletes",
"a",
"chain",
"of",
"vertices",
"from",
"this",
"list",
"."
] | 3f80953b86c46385e84730e5d2a1745cbfa12703 | https://github.com/Quickhull3d/quickhull3d/blob/3f80953b86c46385e84730e5d2a1745cbfa12703/src/main/java/com/github/quickhull3d/VertexList.java#L97-L108 | train |
Quickhull3d/quickhull3d | src/main/java/com/github/quickhull3d/VertexList.java | VertexList.insertBefore | public void insertBefore(Vertex vtx, Vertex next) {
vtx.prev = next.prev;
if (next.prev == null) {
head = vtx;
} else {
next.prev.next = vtx;
}
vtx.next = next;
next.prev = vtx;
} | java | public void insertBefore(Vertex vtx, Vertex next) {
vtx.prev = next.prev;
if (next.prev == null) {
head = vtx;
} else {
next.prev.next = vtx;
}
vtx.next = next;
next.prev = vtx;
} | [
"public",
"void",
"insertBefore",
"(",
"Vertex",
"vtx",
",",
"Vertex",
"next",
")",
"{",
"vtx",
".",
"prev",
"=",
"next",
".",
"prev",
";",
"if",
"(",
"next",
".",
"prev",
"==",
"null",
")",
"{",
"head",
"=",
"vtx",
";",
"}",
"else",
"{",
"next",... | Inserts a vertex into this list before another specificed vertex. | [
"Inserts",
"a",
"vertex",
"into",
"this",
"list",
"before",
"another",
"specificed",
"vertex",
"."
] | 3f80953b86c46385e84730e5d2a1745cbfa12703 | https://github.com/Quickhull3d/quickhull3d/blob/3f80953b86c46385e84730e5d2a1745cbfa12703/src/main/java/com/github/quickhull3d/VertexList.java#L113-L122 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/platforms/Oracle9iLobHandler.java | Oracle9iLobHandler.freeTempLOB | private static void freeTempLOB(ClobWrapper clob, BlobWrapper blob)
{
try
{
if (clob != null)
{
// If the CLOB is open, close it
if (clob.isOpen())
{
clob.close();
}
// Free the memory used by this CLOB
clob.freeTemporary();
}
if (blob != null)
{
... | java | private static void freeTempLOB(ClobWrapper clob, BlobWrapper blob)
{
try
{
if (clob != null)
{
// If the CLOB is open, close it
if (clob.isOpen())
{
clob.close();
}
// Free the memory used by this CLOB
clob.freeTemporary();
}
if (blob != null)
{
... | [
"private",
"static",
"void",
"freeTempLOB",
"(",
"ClobWrapper",
"clob",
",",
"BlobWrapper",
"blob",
")",
"{",
"try",
"{",
"if",
"(",
"clob",
"!=",
"null",
")",
"{",
"// If the CLOB is open, close it\r",
"if",
"(",
"clob",
".",
"isOpen",
"(",
")",
")",
"{",... | Frees the temporary LOBs when an exception is raised in the application
or when the LOBs are no longer needed. If the LOBs are not freed, the
space used by these LOBs are not reclaimed.
@param clob CLOB-wrapper to free or null
@param blob BLOB-wrapper to free or null | [
"Frees",
"the",
"temporary",
"LOBs",
"when",
"an",
"exception",
"is",
"raised",
"in",
"the",
"application",
"or",
"when",
"the",
"LOBs",
"are",
"no",
"longer",
"needed",
".",
"If",
"the",
"LOBs",
"are",
"not",
"freed",
"the",
"space",
"used",
"by",
"thes... | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/platforms/Oracle9iLobHandler.java#L347-L379 | train |
kuali/ojb-1.0.4 | src/xdoclet/java/src/xdoclet/modules/ojb/constraints/CollectionDescriptorConstraints.java | CollectionDescriptorConstraints.check | public void check(CollectionDescriptorDef collDef, String checkLevel) throws ConstraintException
{
ensureElementClassRef(collDef, checkLevel);
checkInheritedForeignkey(collDef, checkLevel);
ensureCollectionClass(collDef, checkLevel);
checkProxyPrefetchingLimit(collDef, checkLeve... | java | public void check(CollectionDescriptorDef collDef, String checkLevel) throws ConstraintException
{
ensureElementClassRef(collDef, checkLevel);
checkInheritedForeignkey(collDef, checkLevel);
ensureCollectionClass(collDef, checkLevel);
checkProxyPrefetchingLimit(collDef, checkLeve... | [
"public",
"void",
"check",
"(",
"CollectionDescriptorDef",
"collDef",
",",
"String",
"checkLevel",
")",
"throws",
"ConstraintException",
"{",
"ensureElementClassRef",
"(",
"collDef",
",",
"checkLevel",
")",
";",
"checkInheritedForeignkey",
"(",
"collDef",
",",
"checkL... | Checks the given collection descriptor.
@param collDef The collection descriptor
@param checkLevel The amount of checks to perform
@exception ConstraintException If a constraint has been violated | [
"Checks",
"the",
"given",
"collection",
"descriptor",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/xdoclet/java/src/xdoclet/modules/ojb/constraints/CollectionDescriptorConstraints.java#L47-L55 | train |
kuali/ojb-1.0.4 | src/xdoclet/java/src/xdoclet/modules/ojb/constraints/CollectionDescriptorConstraints.java | CollectionDescriptorConstraints.ensureElementClassRef | private void ensureElementClassRef(CollectionDescriptorDef collDef, String checkLevel) throws ConstraintException
{
if (CHECKLEVEL_NONE.equals(checkLevel))
{
return;
}
String arrayElementClassName = collDef.getProperty(PropertyHelper.OJB_PROPERTY_ARRAY_ELEMENT_CLA... | java | private void ensureElementClassRef(CollectionDescriptorDef collDef, String checkLevel) throws ConstraintException
{
if (CHECKLEVEL_NONE.equals(checkLevel))
{
return;
}
String arrayElementClassName = collDef.getProperty(PropertyHelper.OJB_PROPERTY_ARRAY_ELEMENT_CLA... | [
"private",
"void",
"ensureElementClassRef",
"(",
"CollectionDescriptorDef",
"collDef",
",",
"String",
"checkLevel",
")",
"throws",
"ConstraintException",
"{",
"if",
"(",
"CHECKLEVEL_NONE",
".",
"equals",
"(",
"checkLevel",
")",
")",
"{",
"return",
";",
"}",
"Strin... | Ensures that the given collection descriptor has a valid element-class-ref property.
@param collDef The collection descriptor
@param checkLevel The current check level (this constraint is checked in basic and strict)
@exception ConstraintException If element-class-ref could not be determined or is invalid | [
"Ensures",
"that",
"the",
"given",
"collection",
"descriptor",
"has",
"a",
"valid",
"element",
"-",
"class",
"-",
"ref",
"property",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/xdoclet/java/src/xdoclet/modules/ojb/constraints/CollectionDescriptorConstraints.java#L64-L118 | train |
kuali/ojb-1.0.4 | src/xdoclet/java/src/xdoclet/modules/ojb/constraints/CollectionDescriptorConstraints.java | CollectionDescriptorConstraints.ensureCollectionClass | private void ensureCollectionClass(CollectionDescriptorDef collDef, String checkLevel) throws ConstraintException
{
if (CHECKLEVEL_NONE.equals(checkLevel))
{
return;
}
if (collDef.hasProperty(PropertyHelper.OJB_PROPERTY_ARRAY_ELEMENT_CLASS_REF))
{
... | java | private void ensureCollectionClass(CollectionDescriptorDef collDef, String checkLevel) throws ConstraintException
{
if (CHECKLEVEL_NONE.equals(checkLevel))
{
return;
}
if (collDef.hasProperty(PropertyHelper.OJB_PROPERTY_ARRAY_ELEMENT_CLASS_REF))
{
... | [
"private",
"void",
"ensureCollectionClass",
"(",
"CollectionDescriptorDef",
"collDef",
",",
"String",
"checkLevel",
")",
"throws",
"ConstraintException",
"{",
"if",
"(",
"CHECKLEVEL_NONE",
".",
"equals",
"(",
"checkLevel",
")",
")",
"{",
"return",
";",
"}",
"if",
... | Ensures that the given collection descriptor has the collection-class property if necessary.
@param collDef The collection descriptor
@param checkLevel The current check level (this constraint is checked in basic (partly) and strict)
@exception ConstraintException If collection-class is given for an array or if no ... | [
"Ensures",
"that",
"the",
"given",
"collection",
"descriptor",
"has",
"the",
"collection",
"-",
"class",
"property",
"if",
"necessary",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/xdoclet/java/src/xdoclet/modules/ojb/constraints/CollectionDescriptorConstraints.java#L157-L218 | train |
kuali/ojb-1.0.4 | src/xdoclet/java/src/xdoclet/modules/ojb/constraints/CollectionDescriptorConstraints.java | CollectionDescriptorConstraints.checkOrderby | private void checkOrderby(CollectionDescriptorDef collDef, String checkLevel) throws ConstraintException
{
if (CHECKLEVEL_NONE.equals(checkLevel))
{
return;
}
String orderbySpec = collDef.getProperty(PropertyHelper.OJB_PROPERTY_ORDERBY);
if ((orderbySpe... | java | private void checkOrderby(CollectionDescriptorDef collDef, String checkLevel) throws ConstraintException
{
if (CHECKLEVEL_NONE.equals(checkLevel))
{
return;
}
String orderbySpec = collDef.getProperty(PropertyHelper.OJB_PROPERTY_ORDERBY);
if ((orderbySpe... | [
"private",
"void",
"checkOrderby",
"(",
"CollectionDescriptorDef",
"collDef",
",",
"String",
"checkLevel",
")",
"throws",
"ConstraintException",
"{",
"if",
"(",
"CHECKLEVEL_NONE",
".",
"equals",
"(",
"checkLevel",
")",
")",
"{",
"return",
";",
"}",
"String",
"or... | Checks the orderby attribute.
@param collDef The collection descriptor
@param checkLevel The current check level (this constraint is checked in basic and strict)
@exception ConstraintException If the value for orderby is invalid (unknown field or ordering) | [
"Checks",
"the",
"orderby",
"attribute",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/xdoclet/java/src/xdoclet/modules/ojb/constraints/CollectionDescriptorConstraints.java#L227-L275 | train |
kuali/ojb-1.0.4 | src/xdoclet/java/src/xdoclet/modules/ojb/constraints/CollectionDescriptorConstraints.java | CollectionDescriptorConstraints.checkQueryCustomizer | private void checkQueryCustomizer(CollectionDescriptorDef collDef, String checkLevel) throws ConstraintException
{
if (!CHECKLEVEL_STRICT.equals(checkLevel))
{
return;
}
String queryCustomizerName = collDef.getProperty(PropertyHelper.OJB_PROPERTY_QUERY_CU... | java | private void checkQueryCustomizer(CollectionDescriptorDef collDef, String checkLevel) throws ConstraintException
{
if (!CHECKLEVEL_STRICT.equals(checkLevel))
{
return;
}
String queryCustomizerName = collDef.getProperty(PropertyHelper.OJB_PROPERTY_QUERY_CU... | [
"private",
"void",
"checkQueryCustomizer",
"(",
"CollectionDescriptorDef",
"collDef",
",",
"String",
"checkLevel",
")",
"throws",
"ConstraintException",
"{",
"if",
"(",
"!",
"CHECKLEVEL_STRICT",
".",
"equals",
"(",
"checkLevel",
")",
")",
"{",
"return",
";",
"}",
... | Checks the query-customizer setting of the given collection descriptor.
@param collDef The collection descriptor
@param checkLevel The current check level (this constraint is only checked in strict)
@exception ConstraintException If the constraint has been violated | [
"Checks",
"the",
"query",
"-",
"customizer",
"setting",
"of",
"the",
"given",
"collection",
"descriptor",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/xdoclet/java/src/xdoclet/modules/ojb/constraints/CollectionDescriptorConstraints.java#L284-L311 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/util/ClassHelper.java | ClassHelper.getClass | public static Class getClass(String className, boolean initialize) throws ClassNotFoundException
{
return Class.forName(className, initialize, getClassLoader());
} | java | public static Class getClass(String className, boolean initialize) throws ClassNotFoundException
{
return Class.forName(className, initialize, getClassLoader());
} | [
"public",
"static",
"Class",
"getClass",
"(",
"String",
"className",
",",
"boolean",
"initialize",
")",
"throws",
"ClassNotFoundException",
"{",
"return",
"Class",
".",
"forName",
"(",
"className",
",",
"initialize",
",",
"getClassLoader",
"(",
")",
")",
";",
... | Retrieves the class object for the given qualified class name.
@param className The qualified name of the class
@param initialize Whether the class shall be initialized
@return The class object | [
"Retrieves",
"the",
"class",
"object",
"for",
"the",
"given",
"qualified",
"class",
"name",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/util/ClassHelper.java#L120-L123 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/util/ClassHelper.java | ClassHelper.newInstance | public static Object newInstance(Class target, Class[] types, Object[] args) throws InstantiationException,
IllegalAccessException,
IllegalArg... | java | public static Object newInstance(Class target, Class[] types, Object[] args) throws InstantiationException,
IllegalAccessException,
IllegalArg... | [
"public",
"static",
"Object",
"newInstance",
"(",
"Class",
"target",
",",
"Class",
"[",
"]",
"types",
",",
"Object",
"[",
"]",
"args",
")",
"throws",
"InstantiationException",
",",
"IllegalAccessException",
",",
"IllegalArgumentException",
",",
"InvocationTargetExce... | Returns a new instance of the given class, using the constructor with the specified parameter types.
@param target The class to instantiate
@param types The parameter types
@param args The arguments
@return The instance | [
"Returns",
"a",
"new",
"instance",
"of",
"the",
"given",
"class",
"using",
"the",
"constructor",
"with",
"the",
"specified",
"parameter",
"types",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/util/ClassHelper.java#L180-L188 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/util/ClassHelper.java | ClassHelper.getField | public static Field getField(Class clazz, String fieldName)
{
try
{
return clazz.getField(fieldName);
}
catch (Exception ignored)
{}
return null;
} | java | public static Field getField(Class clazz, String fieldName)
{
try
{
return clazz.getField(fieldName);
}
catch (Exception ignored)
{}
return null;
} | [
"public",
"static",
"Field",
"getField",
"(",
"Class",
"clazz",
",",
"String",
"fieldName",
")",
"{",
"try",
"{",
"return",
"clazz",
".",
"getField",
"(",
"fieldName",
")",
";",
"}",
"catch",
"(",
"Exception",
"ignored",
")",
"{",
"}",
"return",
"null",
... | Determines the field via reflection look-up.
@param clazz The java class to search in
@param fieldName The field's name
@return The field object or <code>null</code> if no matching field was found | [
"Determines",
"the",
"field",
"via",
"reflection",
"look",
"-",
"up",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/util/ClassHelper.java#L251-L260 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/util/ClassHelper.java | ClassHelper.newInstance | public static Object newInstance(String className) throws InstantiationException,
IllegalAccessException,
ClassNotFoundException
{
return newInstance(getClass(className));
} | java | public static Object newInstance(String className) throws InstantiationException,
IllegalAccessException,
ClassNotFoundException
{
return newInstance(getClass(className));
} | [
"public",
"static",
"Object",
"newInstance",
"(",
"String",
"className",
")",
"throws",
"InstantiationException",
",",
"IllegalAccessException",
",",
"ClassNotFoundException",
"{",
"return",
"newInstance",
"(",
"getClass",
"(",
"className",
")",
")",
";",
"}"
] | Returns a new instance of the class with the given qualified name using the default or
or a no-arg constructor.
@param className The qualified name of the class to instantiate | [
"Returns",
"a",
"new",
"instance",
"of",
"the",
"class",
"with",
"the",
"given",
"qualified",
"name",
"using",
"the",
"default",
"or",
"or",
"a",
"no",
"-",
"arg",
"constructor",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/util/ClassHelper.java#L285-L290 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/util/ClassHelper.java | ClassHelper.newInstance | public static Object newInstance(String className, Class[] types, Object[] args) throws InstantiationException,
IllegalAccessException,
... | java | public static Object newInstance(String className, Class[] types, Object[] args) throws InstantiationException,
IllegalAccessException,
... | [
"public",
"static",
"Object",
"newInstance",
"(",
"String",
"className",
",",
"Class",
"[",
"]",
"types",
",",
"Object",
"[",
"]",
"args",
")",
"throws",
"InstantiationException",
",",
"IllegalAccessException",
",",
"IllegalArgumentException",
",",
"InvocationTarget... | Returns a new instance of the class with the given qualified name using the constructor with
the specified signature.
@param className The qualified name of the class to instantiate
@param types The parameter types
@param args The arguments
@return The instance | [
"Returns",
"a",
"new",
"instance",
"of",
"the",
"class",
"with",
"the",
"given",
"qualified",
"name",
"using",
"the",
"constructor",
"with",
"the",
"specified",
"signature",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/util/ClassHelper.java#L301-L310 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/util/ClassHelper.java | ClassHelper.newInstance | public static Object newInstance(Class target, Class type, Object arg) throws InstantiationException,
IllegalAccessException,
IllegalArgumentException,
... | java | public static Object newInstance(Class target, Class type, Object arg) throws InstantiationException,
IllegalAccessException,
IllegalArgumentException,
... | [
"public",
"static",
"Object",
"newInstance",
"(",
"Class",
"target",
",",
"Class",
"type",
",",
"Object",
"arg",
")",
"throws",
"InstantiationException",
",",
"IllegalAccessException",
",",
"IllegalArgumentException",
",",
"InvocationTargetException",
",",
"NoSuchMethod... | Returns a new instance of the given class using the constructor with the specified parameter.
@param target The class to instantiate
@param type The types of the single parameter of the constructor
@param arg The argument
@return The instance | [
"Returns",
"a",
"new",
"instance",
"of",
"the",
"given",
"class",
"using",
"the",
"constructor",
"with",
"the",
"specified",
"parameter",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/util/ClassHelper.java#L320-L328 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/util/ClassHelper.java | ClassHelper.newInstance | public static Object newInstance(String className, Class type, Object arg) throws InstantiationException,
IllegalAccessException,
IllegalArgumentE... | java | public static Object newInstance(String className, Class type, Object arg) throws InstantiationException,
IllegalAccessException,
IllegalArgumentE... | [
"public",
"static",
"Object",
"newInstance",
"(",
"String",
"className",
",",
"Class",
"type",
",",
"Object",
"arg",
")",
"throws",
"InstantiationException",
",",
"IllegalAccessException",
",",
"IllegalArgumentException",
",",
"InvocationTargetException",
",",
"NoSuchMe... | Returns a new instance of the class with the given qualified name using the constructor with
the specified parameter.
@param className The qualified name of the class to instantiate
@param type The types of the single parameter of the constructor
@param arg The argument
@return The instance | [
"Returns",
"a",
"new",
"instance",
"of",
"the",
"class",
"with",
"the",
"given",
"qualified",
"name",
"using",
"the",
"constructor",
"with",
"the",
"specified",
"parameter",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/util/ClassHelper.java#L339-L348 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/util/ClassHelper.java | ClassHelper.buildNewObjectInstance | public static Object buildNewObjectInstance(ClassDescriptor cld)
{
Object result = null;
// If either the factory class and/or factory method is null,
// just follow the normal code path and create via constructor
if ((cld.getFactoryClass() == null) || (cld.getFactoryMethod() ... | java | public static Object buildNewObjectInstance(ClassDescriptor cld)
{
Object result = null;
// If either the factory class and/or factory method is null,
// just follow the normal code path and create via constructor
if ((cld.getFactoryClass() == null) || (cld.getFactoryMethod() ... | [
"public",
"static",
"Object",
"buildNewObjectInstance",
"(",
"ClassDescriptor",
"cld",
")",
"{",
"Object",
"result",
"=",
"null",
";",
"// If either the factory class and/or factory method is null,\r",
"// just follow the normal code path and create via constructor\r",
"if",
"(",
... | Builds a new instance for the class represented by the given class descriptor.
@param cld The class descriptor
@return The instance | [
"Builds",
"a",
"new",
"instance",
"for",
"the",
"class",
"represented",
"by",
"the",
"given",
"class",
"descriptor",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/util/ClassHelper.java#L388-L442 | train |
geomajas/geomajas-project-server | impl/src/main/java/org/geomajas/internal/rendering/painter/tile/StringContentTilePainter.java | StringContentTilePainter.createFeatureDocument | private GraphicsDocument createFeatureDocument(StringWriter writer) throws RenderException {
if (TileMetadata.PARAM_SVG_RENDERER.equalsIgnoreCase(renderer)) {
DefaultSvgDocument document = new DefaultSvgDocument(writer, false);
document.setMaximumFractionDigits(MAXIMUM_FRACTION_DIGITS);
document.registerWrit... | java | private GraphicsDocument createFeatureDocument(StringWriter writer) throws RenderException {
if (TileMetadata.PARAM_SVG_RENDERER.equalsIgnoreCase(renderer)) {
DefaultSvgDocument document = new DefaultSvgDocument(writer, false);
document.setMaximumFractionDigits(MAXIMUM_FRACTION_DIGITS);
document.registerWrit... | [
"private",
"GraphicsDocument",
"createFeatureDocument",
"(",
"StringWriter",
"writer",
")",
"throws",
"RenderException",
"{",
"if",
"(",
"TileMetadata",
".",
"PARAM_SVG_RENDERER",
".",
"equalsIgnoreCase",
"(",
"renderer",
")",
")",
"{",
"DefaultSvgDocument",
"document",... | Create a document that parses the tile's featureFragment, using GraphicsWriter classes.
@param writer
writer
@return document
@throws RenderException
oops | [
"Create",
"a",
"document",
"that",
"parses",
"the",
"tile",
"s",
"featureFragment",
"using",
"GraphicsWriter",
"classes",
"."
] | 904b7d7deed1350d28955589098dd1e0a786d76e | https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/impl/src/main/java/org/geomajas/internal/rendering/painter/tile/StringContentTilePainter.java#L250-L269 | train |
geomajas/geomajas-project-server | impl/src/main/java/org/geomajas/internal/rendering/painter/tile/StringContentTilePainter.java | StringContentTilePainter.createLabelDocument | private GraphicsDocument createLabelDocument(StringWriter writer, LabelStyleInfo labelStyleInfo)
throws RenderException {
if (TileMetadata.PARAM_SVG_RENDERER.equalsIgnoreCase(renderer)) {
DefaultSvgDocument document = new DefaultSvgDocument(writer, false);
document.setMaximumFractionDigits(MAXIMUM_FRACTION_... | java | private GraphicsDocument createLabelDocument(StringWriter writer, LabelStyleInfo labelStyleInfo)
throws RenderException {
if (TileMetadata.PARAM_SVG_RENDERER.equalsIgnoreCase(renderer)) {
DefaultSvgDocument document = new DefaultSvgDocument(writer, false);
document.setMaximumFractionDigits(MAXIMUM_FRACTION_... | [
"private",
"GraphicsDocument",
"createLabelDocument",
"(",
"StringWriter",
"writer",
",",
"LabelStyleInfo",
"labelStyleInfo",
")",
"throws",
"RenderException",
"{",
"if",
"(",
"TileMetadata",
".",
"PARAM_SVG_RENDERER",
".",
"equalsIgnoreCase",
"(",
"renderer",
")",
")",... | Create a document that parses the tile's labelFragment, using GraphicsWriter classes.
@param writer
writer
@param labelStyleInfo
label style info
@return graphics document
@throws RenderException
cannot render | [
"Create",
"a",
"document",
"that",
"parses",
"the",
"tile",
"s",
"labelFragment",
"using",
"GraphicsWriter",
"classes",
"."
] | 904b7d7deed1350d28955589098dd1e0a786d76e | https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/impl/src/main/java/org/geomajas/internal/rendering/painter/tile/StringContentTilePainter.java#L282-L304 | train |
geomajas/geomajas-project-server | impl/src/main/java/org/geomajas/internal/rendering/painter/tile/StringContentTilePainter.java | StringContentTilePainter.getTransformer | private GeometryCoordinateSequenceTransformer getTransformer() {
if (unitToPixel == null) {
unitToPixel = new GeometryCoordinateSequenceTransformer();
unitToPixel.setMathTransform(ProjectiveTransform.create(new AffineTransform(scale, 0, 0, -scale, -scale
* panOrigin.x, scale * panOrigin.y)));
}
return ... | java | private GeometryCoordinateSequenceTransformer getTransformer() {
if (unitToPixel == null) {
unitToPixel = new GeometryCoordinateSequenceTransformer();
unitToPixel.setMathTransform(ProjectiveTransform.create(new AffineTransform(scale, 0, 0, -scale, -scale
* panOrigin.x, scale * panOrigin.y)));
}
return ... | [
"private",
"GeometryCoordinateSequenceTransformer",
"getTransformer",
"(",
")",
"{",
"if",
"(",
"unitToPixel",
"==",
"null",
")",
"{",
"unitToPixel",
"=",
"new",
"GeometryCoordinateSequenceTransformer",
"(",
")",
";",
"unitToPixel",
".",
"setMathTransform",
"(",
"Proj... | Get transformer to use.
@return transformation to apply | [
"Get",
"transformer",
"to",
"use",
"."
] | 904b7d7deed1350d28955589098dd1e0a786d76e | https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/impl/src/main/java/org/geomajas/internal/rendering/painter/tile/StringContentTilePainter.java#L311-L318 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/util/batch/PreparedStatementInvocationHandler.java | PreparedStatementInvocationHandler.doExecute | private void doExecute(Connection conn) throws SQLException
{
PreparedStatement stmt;
int size;
size = _methods.size();
if ( size == 0 )
{
return;
}
stmt = conn.prepareStatement(_sql);
try
{
m_platform.afte... | java | private void doExecute(Connection conn) throws SQLException
{
PreparedStatement stmt;
int size;
size = _methods.size();
if ( size == 0 )
{
return;
}
stmt = conn.prepareStatement(_sql);
try
{
m_platform.afte... | [
"private",
"void",
"doExecute",
"(",
"Connection",
"conn",
")",
"throws",
"SQLException",
"{",
"PreparedStatement",
"stmt",
";",
"int",
"size",
";",
"size",
"=",
"_methods",
".",
"size",
"(",
")",
";",
"if",
"(",
"size",
"==",
"0",
")",
"{",
"return",
... | This method performs database modification at the very and of transaction. | [
"This",
"method",
"performs",
"database",
"modification",
"at",
"the",
"very",
"and",
"of",
"transaction",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/util/batch/PreparedStatementInvocationHandler.java#L135-L253 | train |
gsi-upm/BeastTool | beast-tool/src/main/java/es/upm/dit/gsi/beast/platform/jadex/JadexAgentIntrospector.java | JadexAgentIntrospector.getBeliefValue | public Object getBeliefValue(String agent_name, final String belief_name,
Connector connector) {
((IExternalAccess) connector.getAgentsExternalAccess(agent_name))
.scheduleStep(new IComponentStep<Integer>() {
public IFuture<Integer> execute(IInternalAccess ia) {... | java | public Object getBeliefValue(String agent_name, final String belief_name,
Connector connector) {
((IExternalAccess) connector.getAgentsExternalAccess(agent_name))
.scheduleStep(new IComponentStep<Integer>() {
public IFuture<Integer> execute(IInternalAccess ia) {... | [
"public",
"Object",
"getBeliefValue",
"(",
"String",
"agent_name",
",",
"final",
"String",
"belief_name",
",",
"Connector",
"connector",
")",
"{",
"(",
"(",
"IExternalAccess",
")",
"connector",
".",
"getAgentsExternalAccess",
"(",
"agent_name",
")",
")",
".",
"s... | This method takes the value of an agent's belief through its external
access
@param agent_name
The name of the agent
@param belief_name
The name of the belief inside agent's adf
@param connector
The connector to get the external access
@return belief_value The value of the requested belief | [
"This",
"method",
"takes",
"the",
"value",
"of",
"an",
"agent",
"s",
"belief",
"through",
"its",
"external",
"access"
] | cc7fdc75cb818c5d60802aaf32c27829e0ca144c | https://github.com/gsi-upm/BeastTool/blob/cc7fdc75cb818c5d60802aaf32c27829e0ca144c/beast-tool/src/main/java/es/upm/dit/gsi/beast/platform/jadex/JadexAgentIntrospector.java#L62-L76 | train |
gsi-upm/BeastTool | beast-tool/src/main/java/es/upm/dit/gsi/beast/platform/jadex/JadexAgentIntrospector.java | JadexAgentIntrospector.setBeliefValue | public void setBeliefValue(String agent_name, final String belief_name,
final Object new_value, Connector connector) {
((IExternalAccess) connector.getAgentsExternalAccess(agent_name))
.scheduleStep(new IComponentStep<Integer>() {
public IFuture<Integer> execute... | java | public void setBeliefValue(String agent_name, final String belief_name,
final Object new_value, Connector connector) {
((IExternalAccess) connector.getAgentsExternalAccess(agent_name))
.scheduleStep(new IComponentStep<Integer>() {
public IFuture<Integer> execute... | [
"public",
"void",
"setBeliefValue",
"(",
"String",
"agent_name",
",",
"final",
"String",
"belief_name",
",",
"final",
"Object",
"new_value",
",",
"Connector",
"connector",
")",
"{",
"(",
"(",
"IExternalAccess",
")",
"connector",
".",
"getAgentsExternalAccess",
"("... | This method changes the value of an agent's belief through its external
access
@param agent_name
The name of the agent to change a belief
@param belief_name
The name of the belief to change
@param new_value
The new value of the belief to be changed
@param connector
The connector to get the external access | [
"This",
"method",
"changes",
"the",
"value",
"of",
"an",
"agent",
"s",
"belief",
"through",
"its",
"external",
"access"
] | cc7fdc75cb818c5d60802aaf32c27829e0ca144c | https://github.com/gsi-upm/BeastTool/blob/cc7fdc75cb818c5d60802aaf32c27829e0ca144c/beast-tool/src/main/java/es/upm/dit/gsi/beast/platform/jadex/JadexAgentIntrospector.java#L91-L104 | train |
gsi-upm/BeastTool | beast-tool/src/main/java/es/upm/dit/gsi/beast/platform/jadex/JadexAgentIntrospector.java | JadexAgentIntrospector.getAgentPlans | public IPlan[] getAgentPlans(final String agent_name, Connector connector) {
((IExternalAccess) connector.getAgentsExternalAccess(agent_name))
.scheduleStep(new IComponentStep<Plan>() {
public IFuture<Plan> execute(IInternalAccess ia) {
IBDIInternalA... | java | public IPlan[] getAgentPlans(final String agent_name, Connector connector) {
((IExternalAccess) connector.getAgentsExternalAccess(agent_name))
.scheduleStep(new IComponentStep<Plan>() {
public IFuture<Plan> execute(IInternalAccess ia) {
IBDIInternalA... | [
"public",
"IPlan",
"[",
"]",
"getAgentPlans",
"(",
"final",
"String",
"agent_name",
",",
"Connector",
"connector",
")",
"{",
"(",
"(",
"IExternalAccess",
")",
"connector",
".",
"getAgentsExternalAccess",
"(",
"agent_name",
")",
")",
".",
"scheduleStep",
"(",
"... | This method prints plan information of an agent through its external
access. It can be used to check the correct behaviour of the agent.
@param agent_name
The name of the agent
@param connector
The connector to get the external access
@return plans the IPlan[] with all the information, so the tester can
look for infor... | [
"This",
"method",
"prints",
"plan",
"information",
"of",
"an",
"agent",
"through",
"its",
"external",
"access",
".",
"It",
"can",
"be",
"used",
"to",
"check",
"the",
"correct",
"behaviour",
"of",
"the",
"agent",
"."
] | cc7fdc75cb818c5d60802aaf32c27829e0ca144c | https://github.com/gsi-upm/BeastTool/blob/cc7fdc75cb818c5d60802aaf32c27829e0ca144c/beast-tool/src/main/java/es/upm/dit/gsi/beast/platform/jadex/JadexAgentIntrospector.java#L117-L130 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.