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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
OpenLiberty/open-liberty | dev/com.ibm.jbatch.container/src/com/ibm/jbatch/container/controller/impl/ChunkStepControllerImpl.java | ChunkStepControllerImpl.initStepTransactionTimeout | private int initStepTransactionTimeout() {
logger.entering(sourceClass, "initStepTransactionTimeout");
Properties p = runtimeStepExecution.getProperties();
int timeout = DEFAULT_TRAN_TIMEOUT_SECONDS; // default as per spec.
if (p != null && !p.isEmpty()) {
String propertyTim... | java | private int initStepTransactionTimeout() {
logger.entering(sourceClass, "initStepTransactionTimeout");
Properties p = runtimeStepExecution.getProperties();
int timeout = DEFAULT_TRAN_TIMEOUT_SECONDS; // default as per spec.
if (p != null && !p.isEmpty()) {
String propertyTim... | [
"private",
"int",
"initStepTransactionTimeout",
"(",
")",
"{",
"logger",
".",
"entering",
"(",
"sourceClass",
",",
"\"initStepTransactionTimeout\"",
")",
";",
"Properties",
"p",
"=",
"runtimeStepExecution",
".",
"getProperties",
"(",
")",
";",
"int",
"timeout",
"=... | Note we can rely on the StepContext properties already having been set at this point.
@return global transaction timeout defined in step properties. default
timeout value is 180 | [
"Note",
"we",
"can",
"rely",
"on",
"the",
"StepContext",
"properties",
"already",
"having",
"been",
"set",
"at",
"this",
"point",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.jbatch.container/src/com/ibm/jbatch/container/controller/impl/ChunkStepControllerImpl.java#L1072-L1088 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.javaee.ddmodel/src/com/ibm/ws/javaee/ddmodel/AnySimpleType.java | AnySimpleType.replaceWhitespace | @Trivial
private static String replaceWhitespace(String value) {
final int length = value.length();
for (int i = 0; i < length; ++i) {
char c = value.charAt(i);
if (c < 0x20 && (c == 0x9 || c == 0xA || c == 0xD)) {
return replace0(value, i, length);
... | java | @Trivial
private static String replaceWhitespace(String value) {
final int length = value.length();
for (int i = 0; i < length; ++i) {
char c = value.charAt(i);
if (c < 0x20 && (c == 0x9 || c == 0xA || c == 0xD)) {
return replace0(value, i, length);
... | [
"@",
"Trivial",
"private",
"static",
"String",
"replaceWhitespace",
"(",
"String",
"value",
")",
"{",
"final",
"int",
"length",
"=",
"value",
".",
"length",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"++",
"i",
"... | Replaces all occurrences of 0x9, 0xA and 0xD with 0x20. | [
"Replaces",
"all",
"occurrences",
"of",
"0x9",
"0xA",
"and",
"0xD",
"with",
"0x20",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.javaee.ddmodel/src/com/ibm/ws/javaee/ddmodel/AnySimpleType.java#L179-L189 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/store/MessageProcessorStore.java | MessageProcessorStore.setMessagingEngineUuid | private void setMessagingEngineUuid(SIBUuid8 uuid)
{
if (tc.isEntryEnabled())
SibTr.entry(tc, "setMessagingEngineUuid", new Object[] { uuid });
messagingEngineUuid = uuid;
if (tc.isEntryEnabled())
SibTr.exit(tc, "setMessagingEngineUuid");
} | java | private void setMessagingEngineUuid(SIBUuid8 uuid)
{
if (tc.isEntryEnabled())
SibTr.entry(tc, "setMessagingEngineUuid", new Object[] { uuid });
messagingEngineUuid = uuid;
if (tc.isEntryEnabled())
SibTr.exit(tc, "setMessagingEngineUuid");
} | [
"private",
"void",
"setMessagingEngineUuid",
"(",
"SIBUuid8",
"uuid",
")",
"{",
"if",
"(",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"SibTr",
".",
"entry",
"(",
"tc",
",",
"\"setMessagingEngineUuid\"",
",",
"new",
"Object",
"[",
"]",
"{",
"uuid",
"}",
... | Set the messagingEngineUuid.
@param uuid | [
"Set",
"the",
"messagingEngineUuid",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/store/MessageProcessorStore.java#L129-L138 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.config/src/com/ibm/ws/config/xml/internal/nester/Nester.java | Nester.nest | public static Map<String, List<Map<String, Object>>> nest(Map<String, Object> map, String... keys) {
Map<String, List<Map<String, Object>>> result = new HashMap<String, List<Map<String, Object>>>(keys.length);
String keyMatch = "";
for (String key : keys) {
result.put(key, new ArrayL... | java | public static Map<String, List<Map<String, Object>>> nest(Map<String, Object> map, String... keys) {
Map<String, List<Map<String, Object>>> result = new HashMap<String, List<Map<String, Object>>>(keys.length);
String keyMatch = "";
for (String key : keys) {
result.put(key, new ArrayL... | [
"public",
"static",
"Map",
"<",
"String",
",",
"List",
"<",
"Map",
"<",
"String",
",",
"Object",
">",
">",
">",
"nest",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"map",
",",
"String",
"...",
"keys",
")",
"{",
"Map",
"<",
"String",
",",
"List... | Extracts all sub configurations starting with any of the specified keys
@param map flattened properties
@param keys keys of interest
@return map keyed by (supplied) key of lists of extracted nested configurations | [
"Extracts",
"all",
"sub",
"configurations",
"starting",
"with",
"any",
"of",
"the",
"specified",
"keys"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.config/src/com/ibm/ws/config/xml/internal/nester/Nester.java#L90-L109 | train |
OpenLiberty/open-liberty | dev/wlp.lib.extract/src/wlp/lib/extract/SelfExtractRun.java | SelfExtractRun.getUserHome | private static String getUserHome() {
String home;
if (platformType == SelfExtractUtils.PlatformType_CYGWIN) {
home = System.getenv("HOME");
} else {
home = System.getProperty("user.home");
}
return home;
} | java | private static String getUserHome() {
String home;
if (platformType == SelfExtractUtils.PlatformType_CYGWIN) {
home = System.getenv("HOME");
} else {
home = System.getProperty("user.home");
}
return home;
} | [
"private",
"static",
"String",
"getUserHome",
"(",
")",
"{",
"String",
"home",
";",
"if",
"(",
"platformType",
"==",
"SelfExtractUtils",
".",
"PlatformType_CYGWIN",
")",
"{",
"home",
"=",
"System",
".",
"getenv",
"(",
"\"HOME\"",
")",
";",
"}",
"else",
"{"... | Determine user home based on platform type.
Java user.home property is correct in all cases except
for cygwin. For cygwin, user.home is Windows home,
so use HOME env var instead.
@return user home directory | [
"Determine",
"user",
"home",
"based",
"on",
"platform",
"type",
".",
"Java",
"user",
".",
"home",
"property",
"is",
"correct",
"in",
"all",
"cases",
"except",
"for",
"cygwin",
".",
"For",
"cygwin",
"user",
".",
"home",
"is",
"Windows",
"home",
"so",
"use... | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/wlp.lib.extract/src/wlp/lib/extract/SelfExtractRun.java#L53-L63 | train |
OpenLiberty/open-liberty | dev/wlp.lib.extract/src/wlp/lib/extract/SelfExtractRun.java | SelfExtractRun.createIfNeeded | private static String createIfNeeded(String dir) {
File f = new File(dir);
if (f.exists()) {
return dir;
} else {
boolean success = f.mkdirs();
if (success)
return dir;
else
return null;
}
} | java | private static String createIfNeeded(String dir) {
File f = new File(dir);
if (f.exists()) {
return dir;
} else {
boolean success = f.mkdirs();
if (success)
return dir;
else
return null;
}
} | [
"private",
"static",
"String",
"createIfNeeded",
"(",
"String",
"dir",
")",
"{",
"File",
"f",
"=",
"new",
"File",
"(",
"dir",
")",
";",
"if",
"(",
"f",
".",
"exists",
"(",
")",
")",
"{",
"return",
"dir",
";",
"}",
"else",
"{",
"boolean",
"success",... | Create input directory if it does not exist
@return directory name | [
"Create",
"input",
"directory",
"if",
"it",
"does",
"not",
"exist"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/wlp.lib.extract/src/wlp/lib/extract/SelfExtractRun.java#L80-L91 | train |
OpenLiberty/open-liberty | dev/wlp.lib.extract/src/wlp/lib/extract/SelfExtractRun.java | SelfExtractRun.jarFileName | private static String jarFileName() {
// do this first so we can access extractor, ok to invoke more than once
createExtractor();
// get <name> from path/<name>.jar
String fullyQualifiedFileName = extractor.container.getName();
int lastSeparator = fullyQualifiedFileName.lastIndex... | java | private static String jarFileName() {
// do this first so we can access extractor, ok to invoke more than once
createExtractor();
// get <name> from path/<name>.jar
String fullyQualifiedFileName = extractor.container.getName();
int lastSeparator = fullyQualifiedFileName.lastIndex... | [
"private",
"static",
"String",
"jarFileName",
"(",
")",
"{",
"// do this first so we can access extractor, ok to invoke more than once",
"createExtractor",
"(",
")",
";",
"// get <name> from path/<name>.jar",
"String",
"fullyQualifiedFileName",
"=",
"extractor",
".",
"container",... | Return jar file name from input archive
@return <name> from path/<name>.jar | [
"Return",
"jar",
"file",
"name",
"from",
"input",
"archive"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/wlp.lib.extract/src/wlp/lib/extract/SelfExtractRun.java#L98-L110 | train |
OpenLiberty/open-liberty | dev/wlp.lib.extract/src/wlp/lib/extract/SelfExtractRun.java | SelfExtractRun.disable2PC | private static void disable2PC(String extractDirectory, String serverName) throws IOException {
String fileName = extractDirectory + File.separator + "wlp" + File.separator + "usr" + File.separator + "servers" + File.separator + serverName + File.separator
+ "jvm.options";
Buff... | java | private static void disable2PC(String extractDirectory, String serverName) throws IOException {
String fileName = extractDirectory + File.separator + "wlp" + File.separator + "usr" + File.separator + "servers" + File.separator + serverName + File.separator
+ "jvm.options";
Buff... | [
"private",
"static",
"void",
"disable2PC",
"(",
"String",
"extractDirectory",
",",
"String",
"serverName",
")",
"throws",
"IOException",
"{",
"String",
"fileName",
"=",
"extractDirectory",
"+",
"File",
".",
"separator",
"+",
"\"wlp\"",
"+",
"File",
".",
"separat... | Write property into jvm.options to disable 2PC transactions.
2PC transactions are disabled by default because default transaction
log is stored in extract directory and therefore foils transaction
recovery if the server terminates unexpectedly.
@param extractDirectory
@param serverName
@throws IOException | [
"Write",
"property",
"into",
"jvm",
".",
"options",
"to",
"disable",
"2PC",
"transactions",
".",
"2PC",
"transactions",
"are",
"disabled",
"by",
"default",
"because",
"default",
"transaction",
"log",
"is",
"stored",
"in",
"extract",
"directory",
"and",
"therefor... | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/wlp.lib.extract/src/wlp/lib/extract/SelfExtractRun.java#L176-L218 | train |
OpenLiberty/open-liberty | dev/wlp.lib.extract/src/wlp/lib/extract/SelfExtractRun.java | SelfExtractRun.runServer | private static int runServer(String extractDirectory, String serverName, String[] args) throws IOException, InterruptedException {
int rc = 0;
Runtime rt = Runtime.getRuntime();
String action = "run";
if (System.getenv("WLP_JAR_DEBUG") != null)
action = "debug";
//... | java | private static int runServer(String extractDirectory, String serverName, String[] args) throws IOException, InterruptedException {
int rc = 0;
Runtime rt = Runtime.getRuntime();
String action = "run";
if (System.getenv("WLP_JAR_DEBUG") != null)
action = "debug";
//... | [
"private",
"static",
"int",
"runServer",
"(",
"String",
"extractDirectory",
",",
"String",
"serverName",
",",
"String",
"[",
"]",
"args",
")",
"throws",
"IOException",
",",
"InterruptedException",
"{",
"int",
"rc",
"=",
"0",
";",
"Runtime",
"rt",
"=",
"Runti... | Run server extracted from jar
If environment variable WLP_JAR_DEBUG is set, use 'server debug' instead
@param extractDirectory
@param serverName
@return server run return code
@throws IOException
@throws InterruptedException | [
"Run",
"server",
"extracted",
"from",
"jar",
"If",
"environment",
"variable",
"WLP_JAR_DEBUG",
"is",
"set",
"use",
"server",
"debug",
"instead"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/wlp.lib.extract/src/wlp/lib/extract/SelfExtractRun.java#L230-L277 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.jca.cm/src/com/ibm/ejs/j2c/J2CGlobalConfigProperties.java | J2CGlobalConfigProperties.isInitialized | private void isInitialized(boolean condition, String propName) {
if (condition == true) {
IllegalStateException e = new IllegalStateException("J2CGlobalConfigProperties: internal error. Set once property already set.");
Tr.error(tc, "SET_ONCE_PROP_ALREADY_SET_J2CA0159", (Object) null);
... | java | private void isInitialized(boolean condition, String propName) {
if (condition == true) {
IllegalStateException e = new IllegalStateException("J2CGlobalConfigProperties: internal error. Set once property already set.");
Tr.error(tc, "SET_ONCE_PROP_ALREADY_SET_J2CA0159", (Object) null);
... | [
"private",
"void",
"isInitialized",
"(",
"boolean",
"condition",
",",
"String",
"propName",
")",
"{",
"if",
"(",
"condition",
"==",
"true",
")",
"{",
"IllegalStateException",
"e",
"=",
"new",
"IllegalStateException",
"(",
"\"J2CGlobalConfigProperties: internal error. ... | Utility method for set once methods. | [
"Utility",
"method",
"for",
"set",
"once",
"methods",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jca.cm/src/com/ibm/ejs/j2c/J2CGlobalConfigProperties.java#L784-L790 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.jca.cm/src/com/ibm/ejs/j2c/J2CGlobalConfigProperties.java | J2CGlobalConfigProperties.applyRequestGroupConfigChanges | public synchronized final void applyRequestGroupConfigChanges() {
// Note: on the following call the "false,true" forces the change notification
// to be sent. The listener will then pick up all property values in the
// group.
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabl... | java | public synchronized final void applyRequestGroupConfigChanges() {
// Note: on the following call the "false,true" forces the change notification
// to be sent. The listener will then pick up all property values in the
// group.
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabl... | [
"public",
"synchronized",
"final",
"void",
"applyRequestGroupConfigChanges",
"(",
")",
"{",
"// Note: on the following call the \"false,true\" forces the change notification",
"// to be sent. The listener will then pick up all property values in the",
"// group.",
"if",
"(",
"TraceCompone... | Request Stat variable group | [
"Request",
"Stat",
"variable",
"group"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jca.cm/src/com/ibm/ejs/j2c/J2CGlobalConfigProperties.java#L895-L906 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.comms.server/src/com/ibm/ws/sib/comms/server/IdToObjectMap.java | IdToObjectMap.get | public Object get(int key) throws SIErrorException // D214655
{
if (tc.isEntryEnabled()) SibTr.entry(tc, "get");
if (tc.isDebugEnabled()) SibTr.debug(tc, "key: "+key); // f174137
captiveComparitorKey.setValue(key);
if (t... | java | public Object get(int key) throws SIErrorException // D214655
{
if (tc.isEntryEnabled()) SibTr.entry(tc, "get");
if (tc.isDebugEnabled()) SibTr.debug(tc, "key: "+key); // f174137
captiveComparitorKey.setValue(key);
if (t... | [
"public",
"Object",
"get",
"(",
"int",
"key",
")",
"throws",
"SIErrorException",
"// D214655",
"{",
"if",
"(",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"SibTr",
".",
"entry",
"(",
"tc",
",",
"\"get\"",
")",
";",
"if",
"(",
"tc",
".",
"isDebugEnabled... | Retrives the object associated with a particular key from the map.
@param key
@return Object
@throws SIErrorException if the element did not exist | [
"Retrives",
"the",
"object",
"associated",
"with",
"a",
"particular",
"key",
"from",
"the",
"map",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.comms.server/src/com/ibm/ws/sib/comms/server/IdToObjectMap.java#L113-L137 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.comms.server/src/com/ibm/ws/sib/comms/server/IdToObjectMap.java | IdToObjectMap.remove | public Object remove(int key) throws SIErrorException // D214655
{
if (tc.isEntryEnabled()) SibTr.entry(tc, "remove", ""+key);
captiveComparitorKey.setValue(key);
// Start D214655
Object retObject = map.remove(captiveComparitorKey);
if (retObject == n... | java | public Object remove(int key) throws SIErrorException // D214655
{
if (tc.isEntryEnabled()) SibTr.entry(tc, "remove", ""+key);
captiveComparitorKey.setValue(key);
// Start D214655
Object retObject = map.remove(captiveComparitorKey);
if (retObject == n... | [
"public",
"Object",
"remove",
"(",
"int",
"key",
")",
"throws",
"SIErrorException",
"// D214655",
"{",
"if",
"(",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"SibTr",
".",
"entry",
"(",
"tc",
",",
"\"remove\"",
",",
"\"\"",
"+",
"key",
")",
";",
"capti... | Removes an object from the map.
@param key
@return Object
@throws SIErrorException if the element did not exist | [
"Removes",
"an",
"object",
"from",
"the",
"map",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.comms.server/src/com/ibm/ws/sib/comms/server/IdToObjectMap.java#L145-L166 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.comms.server/src/com/ibm/ws/sib/comms/server/IdToObjectMap.java | IdToObjectMap.iterator | public Iterator iterator()
{
if (tc.isEntryEnabled()) SibTr.entry(tc, "iterator");
if (tc.isEntryEnabled()) SibTr.exit(tc, "iterator");
return map.values().iterator();
} | java | public Iterator iterator()
{
if (tc.isEntryEnabled()) SibTr.entry(tc, "iterator");
if (tc.isEntryEnabled()) SibTr.exit(tc, "iterator");
return map.values().iterator();
} | [
"public",
"Iterator",
"iterator",
"(",
")",
"{",
"if",
"(",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"SibTr",
".",
"entry",
"(",
"tc",
",",
"\"iterator\"",
")",
";",
"if",
"(",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"SibTr",
".",
"exit",
"(... | Returns an iterator with which to browse the values
@return Iterator | [
"Returns",
"an",
"iterator",
"with",
"which",
"to",
"browse",
"the",
"values"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.comms.server/src/com/ibm/ws/sib/comms/server/IdToObjectMap.java#L174-L180 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.comms.server/src/com/ibm/ws/sib/comms/server/IdToObjectMap.java | IdToObjectMap.containsKey | public boolean containsKey(int id)
{
if (tc.isEntryEnabled()) SibTr.entry(tc, "get", ""+id);
captiveComparitorKey.setValue(id);
final boolean result = map.containsKey(captiveComparitorKey);
if (tc.isEntryEnabled()) SibTr.exit(tc, "get", ""+result);
return result;
} | java | public boolean containsKey(int id)
{
if (tc.isEntryEnabled()) SibTr.entry(tc, "get", ""+id);
captiveComparitorKey.setValue(id);
final boolean result = map.containsKey(captiveComparitorKey);
if (tc.isEntryEnabled()) SibTr.exit(tc, "get", ""+result);
return result;
} | [
"public",
"boolean",
"containsKey",
"(",
"int",
"id",
")",
"{",
"if",
"(",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"SibTr",
".",
"entry",
"(",
"tc",
",",
"\"get\"",
",",
"\"\"",
"+",
"id",
")",
";",
"captiveComparitorKey",
".",
"setValue",
"(",
"... | Determines if the specified id is present in the IdToObjectMap
@param id the id to check
@return boolean true if (and only if) the id is present in the
map. | [
"Determines",
"if",
"the",
"specified",
"id",
"is",
"present",
"in",
"the",
"IdToObjectMap"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.comms.server/src/com/ibm/ws/sib/comms/server/IdToObjectMap.java#L203-L212 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/JIT_Debug.java | JIT_Debug.checkCast | public static Object checkCast(Object value, Object object, String valueClassName)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
{
ClassLoader valueLoader = value == null ? null :
AccessController.doPrivileged(new GetClassLoaderPrivileged(... | java | public static Object checkCast(Object value, Object object, String valueClassName)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
{
ClassLoader valueLoader = value == null ? null :
AccessController.doPrivileged(new GetClassLoaderPrivileged(... | [
"public",
"static",
"Object",
"checkCast",
"(",
"Object",
"value",
",",
"Object",
"object",
",",
"String",
"valueClassName",
")",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isDebugEnabled",
"(",
")",
")",
"{",
... | Called by JIT-deployed code that is performing a checkcast. For the
convenience of generated code, the input value is returned directly.
@param value the value being cast
@param object the object performing the cast
@param valueClassName the expected class name
@return value | [
"Called",
"by",
"JIT",
"-",
"deployed",
"code",
"that",
"is",
"performing",
"a",
"checkcast",
".",
"For",
"the",
"convenience",
"of",
"generated",
"code",
"the",
"input",
"value",
"is",
"returned",
"directly",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/JIT_Debug.java#L39-L72 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java | GBSTree.getNode | GBSNode getNode(Object newKey)
{
GBSNode p;
if (_nodePool == null)
p = new GBSNode(this, newKey);
else
{
p = _nodePool;
_nodePool = p.rightChild();
p.reset(newKey);
}
return p;
} | java | GBSNode getNode(Object newKey)
{
GBSNode p;
if (_nodePool == null)
p = new GBSNode(this, newKey);
else
{
p = _nodePool;
_nodePool = p.rightChild();
p.reset(newKey);
}
return p;
} | [
"GBSNode",
"getNode",
"(",
"Object",
"newKey",
")",
"{",
"GBSNode",
"p",
";",
"if",
"(",
"_nodePool",
"==",
"null",
")",
"p",
"=",
"new",
"GBSNode",
"(",
"this",
",",
"newKey",
")",
";",
"else",
"{",
"p",
"=",
"_nodePool",
";",
"_nodePool",
"=",
"p... | Allocate a new node for the tree.
@param newKey The initial key for the new node.
@return The new node. | [
"Allocate",
"a",
"new",
"node",
"for",
"the",
"tree",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java#L344-L356 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java | GBSTree.prePopulate | public void prePopulate(int x)
{
for (int i = 0; i < x; i++)
{
GBSNode p = new GBSNode(this);
releaseNode(p);
}
} | java | public void prePopulate(int x)
{
for (int i = 0; i < x; i++)
{
GBSNode p = new GBSNode(this);
releaseNode(p);
}
} | [
"public",
"void",
"prePopulate",
"(",
"int",
"x",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"x",
";",
"i",
"++",
")",
"{",
"GBSNode",
"p",
"=",
"new",
"GBSNode",
"(",
"this",
")",
";",
"releaseNode",
"(",
"p",
")",
";",
"}",
... | Add some number of free nodes to the node pool for testing.
@param x The number of nodes to add. | [
"Add",
"some",
"number",
"of",
"free",
"nodes",
"to",
"the",
"node",
"pool",
"for",
"testing",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java#L363-L370 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java | GBSTree.maximumFringeImbalance | public int maximumFringeImbalance()
{
int maxBal;
GBSNode q = root();
if (q.leftChild() == null)
{
maxBal = kFactor() - 1;
if (maxBal < 3)
maxBal = 3;
}
else
{
if ((kFactor() % 3) == 0)
maxBal... | java | public int maximumFringeImbalance()
{
int maxBal;
GBSNode q = root();
if (q.leftChild() == null)
{
maxBal = kFactor() - 1;
if (maxBal < 3)
maxBal = 3;
}
else
{
if ((kFactor() % 3) == 0)
maxBal... | [
"public",
"int",
"maximumFringeImbalance",
"(",
")",
"{",
"int",
"maxBal",
";",
"GBSNode",
"q",
"=",
"root",
"(",
")",
";",
"if",
"(",
"q",
".",
"leftChild",
"(",
")",
"==",
"null",
")",
"{",
"maxBal",
"=",
"kFactor",
"(",
")",
"-",
"1",
";",
"if... | Return the maximum imbalance allowed for a fringe.
<p>This depends on the K Factor and on whether or not the tree is
a special case of a single fringe.</p> | [
"Return",
"the",
"maximum",
"imbalance",
"allowed",
"for",
"a",
"fringe",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java#L505-L523 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java | GBSTree.calcTZeroDepth | private int calcTZeroDepth(int proposedK)
{
int d = -1;
if ( (proposedK >= 0) && (proposedK < _t0_d.length) )
d = _t0_d[proposedK];
if (d < 0)
{
String x =
"K Factor (" + proposedK + ") is invalid.\n" +
"Valid K factors are: " + kFactor... | java | private int calcTZeroDepth(int proposedK)
{
int d = -1;
if ( (proposedK >= 0) && (proposedK < _t0_d.length) )
d = _t0_d[proposedK];
if (d < 0)
{
String x =
"K Factor (" + proposedK + ") is invalid.\n" +
"Valid K factors are: " + kFactor... | [
"private",
"int",
"calcTZeroDepth",
"(",
"int",
"proposedK",
")",
"{",
"int",
"d",
"=",
"-",
"1",
";",
"if",
"(",
"(",
"proposedK",
">=",
"0",
")",
"&&",
"(",
"proposedK",
"<",
"_t0_d",
".",
"length",
")",
")",
"d",
"=",
"_t0_d",
"[",
"proposedK",
... | Set the depth of a T0 sub-tree. | [
"Set",
"the",
"depth",
"of",
"a",
"T0",
"sub",
"-",
"tree",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java#L528-L541 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java | GBSTree.checkForPossibleIndexChange | static boolean checkForPossibleIndexChange(
int v1,
int v2,
Throwable exc,
String msg)
{
... | java | static boolean checkForPossibleIndexChange(
int v1,
int v2,
Throwable exc,
String msg)
{
... | [
"static",
"boolean",
"checkForPossibleIndexChange",
"(",
"int",
"v1",
",",
"int",
"v2",
",",
"Throwable",
"exc",
",",
"String",
"msg",
")",
"{",
"if",
"(",
"v1",
"!=",
"v2",
")",
"return",
"pessimisticNeeded",
";",
"else",
"{",
"GBSTreeException",
"x",
"="... | Process an exception that may have occurred while the index was
changing.
<p>An optimistic search hit an exception that may have been caused by
a change in the index in mid-search. The two parameters v1 and v2
represent the index vno at the time the search started and at the
time the exception was caught. If the two... | [
"Process",
"an",
"exception",
"that",
"may",
"have",
"occurred",
"while",
"the",
"index",
"was",
"changing",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java#L589-L603 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java | GBSTree.iterator | public Iterator iterator()
{
GBSIterator x = new GBSIterator(this);
Iterator q = (Iterator) x;
return q;
} | java | public Iterator iterator()
{
GBSIterator x = new GBSIterator(this);
Iterator q = (Iterator) x;
return q;
} | [
"public",
"Iterator",
"iterator",
"(",
")",
"{",
"GBSIterator",
"x",
"=",
"new",
"GBSIterator",
"(",
"this",
")",
";",
"Iterator",
"q",
"=",
"(",
"Iterator",
")",
"x",
";",
"return",
"q",
";",
"}"
] | Create and return an Iterator positioned on the beginning of the tree.
<p>The Iterator is not actually positioned on the beginning of the
tree. It has no position at all. The first time Iterator.next() is
invoked it will position itself on the beginning of the tree.</p> | [
"Create",
"and",
"return",
"an",
"Iterator",
"positioned",
"on",
"the",
"beginning",
"of",
"the",
"tree",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java#L612-L617 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java | GBSTree.searchEqual | public Object searchEqual(
Object searchKey)
{
SearchComparator comp = searchComparator(SearchComparator.EQ);
Object p = find(comp, searchKey);
return p;
} | java | public Object searchEqual(
Object searchKey)
{
SearchComparator comp = searchComparator(SearchComparator.EQ);
Object p = find(comp, searchKey);
return p;
} | [
"public",
"Object",
"searchEqual",
"(",
"Object",
"searchKey",
")",
"{",
"SearchComparator",
"comp",
"=",
"searchComparator",
"(",
"SearchComparator",
".",
"EQ",
")",
";",
"Object",
"p",
"=",
"find",
"(",
"comp",
",",
"searchKey",
")",
";",
"return",
"p",
... | Find the first key in the index that is equal to the given key.
@param searchKey The key to be found.
@return The first key in the index that is equal to the supplied key
(searchKey). | [
"Find",
"the",
"first",
"key",
"in",
"the",
"index",
"that",
"is",
"equal",
"to",
"the",
"given",
"key",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java#L627-L633 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java | GBSTree.searchGreater | public Object searchGreater(
Object searchKey)
{
SearchComparator comp = searchComparator(SearchComparator.GT);
Object p = find(comp, searchKey);
return p;
} | java | public Object searchGreater(
Object searchKey)
{
SearchComparator comp = searchComparator(SearchComparator.GT);
Object p = find(comp, searchKey);
return p;
} | [
"public",
"Object",
"searchGreater",
"(",
"Object",
"searchKey",
")",
"{",
"SearchComparator",
"comp",
"=",
"searchComparator",
"(",
"SearchComparator",
".",
"GT",
")",
";",
"Object",
"p",
"=",
"find",
"(",
"comp",
",",
"searchKey",
")",
";",
"return",
"p",
... | Find the first key in the index that is greater than the given key.
@param searchKey The key to be found.
@return The first key in the index that is strictly greater than
the supplied key (searchKey). | [
"Find",
"the",
"first",
"key",
"in",
"the",
"index",
"that",
"is",
"greater",
"than",
"the",
"given",
"key",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java#L643-L649 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java | GBSTree.searchGreaterOrEqual | public Object searchGreaterOrEqual(
Object searchKey)
{
SearchComparator comp = searchComparator(SearchComparator.GE);
Object p = find(comp, searchKey);
return p;
} | java | public Object searchGreaterOrEqual(
Object searchKey)
{
SearchComparator comp = searchComparator(SearchComparator.GE);
Object p = find(comp, searchKey);
return p;
} | [
"public",
"Object",
"searchGreaterOrEqual",
"(",
"Object",
"searchKey",
")",
"{",
"SearchComparator",
"comp",
"=",
"searchComparator",
"(",
"SearchComparator",
".",
"GE",
")",
";",
"Object",
"p",
"=",
"find",
"(",
"comp",
",",
"searchKey",
")",
";",
"return",
... | Find the first key in the index that is greater than or equal to
the given key.
@param searchKey The key to be found.
@return The first key in the index that is greater than or equal to
the supplied key (searchKey). | [
"Find",
"the",
"first",
"key",
"in",
"the",
"index",
"that",
"is",
"greater",
"than",
"or",
"equal",
"to",
"the",
"given",
"key",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java#L660-L666 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java | GBSTree.getSearchNode | private SearchNode getSearchNode()
{
Object x = _searchNode.get();
SearchNode g = null;
if (x != null)
{
g = (SearchNode) x;
g.reset();
}
else
{
g = new SearchNode();
x = (Object) g;
_searchNode.set(x... | java | private SearchNode getSearchNode()
{
Object x = _searchNode.get();
SearchNode g = null;
if (x != null)
{
g = (SearchNode) x;
g.reset();
}
else
{
g = new SearchNode();
x = (Object) g;
_searchNode.set(x... | [
"private",
"SearchNode",
"getSearchNode",
"(",
")",
"{",
"Object",
"x",
"=",
"_searchNode",
".",
"get",
"(",
")",
";",
"SearchNode",
"g",
"=",
"null",
";",
"if",
"(",
"x",
"!=",
"null",
")",
"{",
"g",
"=",
"(",
"SearchNode",
")",
"x",
";",
"g",
"... | Find a SearchNode for use by the current thread.
<p>Allocation of a SearchNode is more expensive than serial
reuse. This is a very cheap form of pooling done by attaching a
SearchNode to each thread that calls find.</p> | [
"Find",
"a",
"SearchNode",
"for",
"use",
"by",
"the",
"current",
"thread",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java#L678-L694 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java | GBSTree.optimisticFind | private boolean optimisticFind(
SearchComparator comp,
Object searchKey,
SearchNode point)
{
point.reset();
int v1 = _vno;
if (root() != null)
{
if ((v... | java | private boolean optimisticFind(
SearchComparator comp,
Object searchKey,
SearchNode point)
{
point.reset();
int v1 = _vno;
if (root() != null)
{
if ((v... | [
"private",
"boolean",
"optimisticFind",
"(",
"SearchComparator",
"comp",
",",
"Object",
"searchKey",
",",
"SearchNode",
"point",
")",
"{",
"point",
".",
"reset",
"(",
")",
";",
"int",
"v1",
"=",
"_vno",
";",
"if",
"(",
"root",
"(",
")",
"!=",
"null",
"... | Optimistic find in a GBS Tree | [
"Optimistic",
"find",
"in",
"a",
"GBS",
"Tree"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java#L728-L765 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java | GBSTree.pessimisticFind | private void pessimisticFind(
SearchComparator comp,
Object searchKey,
SearchNode point)
{
point.reset();
synchronized(this)
{
internalFind(comp, searchKey, point);... | java | private void pessimisticFind(
SearchComparator comp,
Object searchKey,
SearchNode point)
{
point.reset();
synchronized(this)
{
internalFind(comp, searchKey, point);... | [
"private",
"void",
"pessimisticFind",
"(",
"SearchComparator",
"comp",
",",
"Object",
"searchKey",
",",
"SearchNode",
"point",
")",
"{",
"point",
".",
"reset",
"(",
")",
";",
"synchronized",
"(",
"this",
")",
"{",
"internalFind",
"(",
"comp",
",",
"searchKey... | Pessimistic find in a GBS Tree | [
"Pessimistic",
"find",
"in",
"a",
"GBS",
"Tree"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java#L771-L783 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java | GBSTree.iteratorFind | synchronized Object iteratorFind(
DeleteStack stack,
SearchComparator comp,
Object searchKey,
SearchNode point)
{
point.reset();
GB... | java | synchronized Object iteratorFind(
DeleteStack stack,
SearchComparator comp,
Object searchKey,
SearchNode point)
{
point.reset();
GB... | [
"synchronized",
"Object",
"iteratorFind",
"(",
"DeleteStack",
"stack",
",",
"SearchComparator",
"comp",
",",
"Object",
"searchKey",
",",
"SearchNode",
"point",
")",
"{",
"point",
".",
"reset",
"(",
")",
";",
"GBSNode",
"p",
"=",
"root",
"(",
")",
";",
"GBS... | Search the index from an Iterator.
<p>Search the index to find one of the following:</p>
<ol>
<li>An index entry that is exactly equal to the supplied key,
<li>An index entry that is strictly greater than the supplied key, or
<li>An index entry that is greater than or equal to the supplied key.
</ol>
<p>This is calle... | [
"Search",
"the",
"index",
"from",
"an",
"Iterator",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java#L860-L932 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java | GBSTree.leftSearch | private void leftSearch(
SearchComparator comp,
GBSNode p,
GBSNode r,
Object searchKey,
SearchNode point)
{
if (r == null) ... | java | private void leftSearch(
SearchComparator comp,
GBSNode p,
GBSNode r,
Object searchKey,
SearchNode point)
{
if (r == null) ... | [
"private",
"void",
"leftSearch",
"(",
"SearchComparator",
"comp",
",",
"GBSNode",
"p",
",",
"GBSNode",
"r",
",",
"Object",
"searchKey",
",",
"SearchNode",
"point",
")",
"{",
"if",
"(",
"r",
"==",
"null",
")",
"/* There is no upper predecessor */",
"{",
... | Search after falling off a left edge.
<p>We have fallen off of the left edge because the search key is
less than the median of the current node. In the example below if
the current node is GHI then the previous node is DEF and the
desired key is greater than E and less than H. If the curent node
is MNO the previous ... | [
"Search",
"after",
"falling",
"off",
"a",
"left",
"edge",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java#L985-L1018 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java | GBSTree.rightSearch | private void rightSearch(
SearchComparator comp,
GBSNode p,
GBSNode l,
Object searchKey,
SearchNode point)
{
int xcc = comp.compa... | java | private void rightSearch(
SearchComparator comp,
GBSNode p,
GBSNode l,
Object searchKey,
SearchNode point)
{
int xcc = comp.compa... | [
"private",
"void",
"rightSearch",
"(",
"SearchComparator",
"comp",
",",
"GBSNode",
"p",
",",
"GBSNode",
"l",
",",
"Object",
"searchKey",
",",
"SearchNode",
"point",
")",
"{",
"int",
"xcc",
"=",
"comp",
".",
"compare",
"(",
"searchKey",
",",
"p",
".",
"ri... | Search after falling off a right edge.
<p>We have fallen off of the right edge because the search key is
greater than the median of the current node. In the example below
if the current node is GHI then the successor node is JKL and the
desired key is greater than H and less than K. If the curent node
is MNO the suc... | [
"Search",
"after",
"falling",
"off",
"a",
"right",
"edge",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java#L1063-L1090 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java | GBSTree.getInsertStack | private InsertStack getInsertStack()
{
Object x = _insertStack.get();
InsertStack g = null;
if (x != null)
{
g = (InsertStack) x;
g.reset();
}
else
{
g = new InsertStack(this);
x = (Object) g;
_insert... | java | private InsertStack getInsertStack()
{
Object x = _insertStack.get();
InsertStack g = null;
if (x != null)
{
g = (InsertStack) x;
g.reset();
}
else
{
g = new InsertStack(this);
x = (Object) g;
_insert... | [
"private",
"InsertStack",
"getInsertStack",
"(",
")",
"{",
"Object",
"x",
"=",
"_insertStack",
".",
"get",
"(",
")",
";",
"InsertStack",
"g",
"=",
"null",
";",
"if",
"(",
"x",
"!=",
"null",
")",
"{",
"g",
"=",
"(",
"InsertStack",
")",
"x",
";",
"g"... | Find an InsertStack for use by the current thread.
<p>Allocation of an InsertStack is more expensive than serial
reuse. This is a very cheap form of pooling done by attaching an
InsertStack to each thread that calls insert.</p> | [
"Find",
"an",
"InsertStack",
"for",
"use",
"by",
"the",
"current",
"thread",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java#L1101-L1117 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java | GBSTree.insert | public boolean insert(
Object new1)
{
boolean result;
InsertStack stack = getInsertStack();
if (root() == null)
pessimisticInsert(stack, new1);
else
{
boolean didit = optimisticInsert(stack, new1);
if (di... | java | public boolean insert(
Object new1)
{
boolean result;
InsertStack stack = getInsertStack();
if (root() == null)
pessimisticInsert(stack, new1);
else
{
boolean didit = optimisticInsert(stack, new1);
if (di... | [
"public",
"boolean",
"insert",
"(",
"Object",
"new1",
")",
"{",
"boolean",
"result",
";",
"InsertStack",
"stack",
"=",
"getInsertStack",
"(",
")",
";",
"if",
"(",
"root",
"(",
")",
"==",
"null",
")",
"pessimisticInsert",
"(",
"stack",
",",
"new1",
")",
... | Insert into a GBS Tree.
@param new1 The Object to be inserted.
@return true if the Object was inserted, false if the Object was
a duplicate of one already in the tree. | [
"Insert",
"into",
"a",
"GBS",
"Tree",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java#L1127-L1146 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java | GBSTree.optimisticInsert | private boolean optimisticInsert(
InsertStack stack,
Object new1)
{
InsertNodes point = stack.insertNodes();
int v1 = _vno;
if (root() == null)
return pessimisticNeeded;
if ((v1&1) ... | java | private boolean optimisticInsert(
InsertStack stack,
Object new1)
{
InsertNodes point = stack.insertNodes();
int v1 = _vno;
if (root() == null)
return pessimisticNeeded;
if ((v1&1) ... | [
"private",
"boolean",
"optimisticInsert",
"(",
"InsertStack",
"stack",
",",
"Object",
"new1",
")",
"{",
"InsertNodes",
"point",
"=",
"stack",
".",
"insertNodes",
"(",
")",
";",
"int",
"v1",
"=",
"_vno",
";",
"if",
"(",
"root",
"(",
")",
"==",
"null",
"... | Optimistic insert into a GBS Tree.
@param stack The InsertStack used to do the insert.
@param new1 The Object to be inserted.
@return optimisticWorked if the insert worked, pessimisticNeeded if
the insert failed due to interference from another thread. | [
"Optimistic",
"insert",
"into",
"a",
"GBS",
"Tree",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java#L1158-L1219 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java | GBSTree.pessimisticInsert | private synchronized boolean pessimisticInsert(
InsertStack stack,
Object new1)
{
_vno++;
if ((_vno&1) == 1)
{
if (root() == null)
{
ad... | java | private synchronized boolean pessimisticInsert(
InsertStack stack,
Object new1)
{
_vno++;
if ((_vno&1) == 1)
{
if (root() == null)
{
ad... | [
"private",
"synchronized",
"boolean",
"pessimisticInsert",
"(",
"InsertStack",
"stack",
",",
"Object",
"new1",
")",
"{",
"_vno",
"++",
";",
"if",
"(",
"(",
"_vno",
"&",
"1",
")",
"==",
"1",
")",
"{",
"if",
"(",
"root",
"(",
")",
"==",
"null",
")",
... | Pessimistic insert into a GBS Tree.
@param stack The InsertStack used to do the insert.
@param new1 The Object to be inserted.
@return optimisticWorked as this version always works. | [
"Pessimistic",
"insert",
"into",
"a",
"GBS",
"Tree",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java#L1230-L1265 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java | GBSTree.findInsert | private void findInsert(
InsertNodes point,
InsertStack stack,
Object new1)
{
java.util.Comparator comp = insertComparator();
NodeInsertPoint ip = stack.nodeInsertPoint();
GBSNode p;... | java | private void findInsert(
InsertNodes point,
InsertStack stack,
Object new1)
{
java.util.Comparator comp = insertComparator();
NodeInsertPoint ip = stack.nodeInsertPoint();
GBSNode p;... | [
"private",
"void",
"findInsert",
"(",
"InsertNodes",
"point",
",",
"InsertStack",
"stack",
",",
"Object",
"new1",
")",
"{",
"java",
".",
"util",
".",
"Comparator",
"comp",
"=",
"insertComparator",
"(",
")",
";",
"NodeInsertPoint",
"ip",
"=",
"stack",
".",
... | Find the insert point within the tree.
@param point Returned insert points.
@param stack The InsertStack of nodes traversed.
@param new1 The Object to be inserted. | [
"Find",
"the",
"insert",
"point",
"within",
"the",
"tree",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java#L1274-L1337 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java | GBSTree.leftAdd | private void leftAdd(
GBSNode p,
GBSNode r,
Object new1,
NodeInsertPoint ip,
InsertNodes point)
{
if (r == null) /* There is no upper... | java | private void leftAdd(
GBSNode p,
GBSNode r,
Object new1,
NodeInsertPoint ip,
InsertNodes point)
{
if (r == null) /* There is no upper... | [
"private",
"void",
"leftAdd",
"(",
"GBSNode",
"p",
",",
"GBSNode",
"r",
",",
"Object",
"new1",
",",
"NodeInsertPoint",
"ip",
",",
"InsertNodes",
"point",
")",
"{",
"if",
"(",
"r",
"==",
"null",
")",
"/* There is no upper predecessor */",
"leftAddNoPredec... | Add to predecssor or current.
<ol>
<li>There is no left child.
<li>There might or might not be a right child
<li>INSERT_KEY < MEDIAN of current node
<li>INSERT_KEY > MEDIAN of predecessor (if there is one)
</ol>
<p>In the example below, if the current node is GHI, then the insert
key is greater than E and less ... | [
"Add",
"to",
"predecssor",
"or",
"current",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java#L1382-L1393 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java | GBSTree.leftAddNoPredecessor | private void leftAddNoPredecessor(
GBSNode p,
Object new1,
NodeInsertPoint ip,
InsertNodes point)
{
p.findInsertPointInLeft(new1, i... | java | private void leftAddNoPredecessor(
GBSNode p,
Object new1,
NodeInsertPoint ip,
InsertNodes point)
{
p.findInsertPointInLeft(new1, i... | [
"private",
"void",
"leftAddNoPredecessor",
"(",
"GBSNode",
"p",
",",
"Object",
"new1",
",",
"NodeInsertPoint",
"ip",
",",
"InsertNodes",
"point",
")",
"{",
"p",
".",
"findInsertPointInLeft",
"(",
"new1",
",",
"ip",
")",
";",
"point",
".",
"setInsert",
"(",
... | Add to left side with no predecessor present.
<p>There is no upper predecessor. If key exists it is in left part
of current node.</p>
@param p Current node from which we tried to move left
@param new1 Key being inserted
@param ip Scratch NodeInsertPoint to avoid allocating a new one
@param point Returned insert poin... | [
"Add",
"to",
"left",
"side",
"with",
"no",
"predecessor",
"present",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java#L1406-L1414 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java | GBSTree.leftAddWithPredecessor | private void leftAddWithPredecessor(
GBSNode p,
GBSNode r,
Object new1,
NodeInsertPoint ip,
... | java | private void leftAddWithPredecessor(
GBSNode p,
GBSNode r,
Object new1,
NodeInsertPoint ip,
... | [
"private",
"void",
"leftAddWithPredecessor",
"(",
"GBSNode",
"p",
",",
"GBSNode",
"r",
",",
"Object",
"new1",
",",
"NodeInsertPoint",
"ip",
",",
"InsertNodes",
"point",
")",
"{",
"java",
".",
"util",
".",
"Comparator",
"comp",
"=",
"r",
".",
"insertComparato... | Add to left side with an upper predecessor present.
<p>There is an upper predecessor. If the current key is greater
than the right-most key of the upper predecessor then the insert
point is in the left half of the current node.</p>
<p>Otherwise it is in the right part of the upper predecessor. If
it is not a duplica... | [
"Add",
"to",
"left",
"side",
"with",
"an",
"upper",
"predecessor",
"present",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java#L1434-L1467 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java | GBSTree.rightAdd | private void rightAdd(
GBSNode p,
GBSNode l,
Object new1,
NodeInsertPoint ip,
InsertNodes point)
{
if (l == null) /* There is no... | java | private void rightAdd(
GBSNode p,
GBSNode l,
Object new1,
NodeInsertPoint ip,
InsertNodes point)
{
if (l == null) /* There is no... | [
"private",
"void",
"rightAdd",
"(",
"GBSNode",
"p",
",",
"GBSNode",
"l",
",",
"Object",
"new1",
",",
"NodeInsertPoint",
"ip",
",",
"InsertNodes",
"point",
")",
"{",
"if",
"(",
"l",
"==",
"null",
")",
"/* There is no upper successor */",
"rightAddNoSucc... | Add to current or successor.
<ol>
<li>There is no right child
<li>There may or may not be a left child.
<li>INSERT_KEY > MEDIAN of current node.
<li>INSERT_KEY < MEDIAN of successor (if there is one)
</ol>
<p>In the example below, if the current node is GHI, then the insert
key is greater than H and less than K... | [
"Add",
"to",
"current",
"or",
"successor",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java#L1511-L1522 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java | GBSTree.rightAddNoSuccessor | private void rightAddNoSuccessor(
GBSNode p,
Object new1,
NodeInsertPoint ip,
InsertNodes point)
{
if (p.lessThanHalfFull()) /* No... | java | private void rightAddNoSuccessor(
GBSNode p,
Object new1,
NodeInsertPoint ip,
InsertNodes point)
{
if (p.lessThanHalfFull()) /* No... | [
"private",
"void",
"rightAddNoSuccessor",
"(",
"GBSNode",
"p",
",",
"Object",
"new1",
",",
"NodeInsertPoint",
"ip",
",",
"InsertNodes",
"point",
")",
"{",
"if",
"(",
"p",
".",
"lessThanHalfFull",
"(",
")",
")",
"/* Node not even half full so the insert */",
"/* p... | Add to right side with no upper successor present.
<p>There is no upper successor. If key exists it is in right part
of current node. If curent node is less than half full there can
be no duplicate because the last compare that got us here was with
the right-most key in the current node.</p>
@param p Current node f... | [
"Add",
"to",
"right",
"side",
"with",
"no",
"upper",
"successor",
"present",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java#L1537-L1552 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java | GBSTree.rightAddWithSuccessor | private void rightAddWithSuccessor(
GBSNode p,
GBSNode l,
Object new1,
NodeInsertPoint ip,
Insert... | java | private void rightAddWithSuccessor(
GBSNode p,
GBSNode l,
Object new1,
NodeInsertPoint ip,
Insert... | [
"private",
"void",
"rightAddWithSuccessor",
"(",
"GBSNode",
"p",
",",
"GBSNode",
"l",
",",
"Object",
"new1",
",",
"NodeInsertPoint",
"ip",
",",
"InsertNodes",
"point",
")",
"{",
"java",
".",
"util",
".",
"Comparator",
"comp",
"=",
"l",
".",
"insertComparator... | Add to right side with an upper successor present.
<p>There is an upper successor. If the current key is less than
the left-most key of the upper successor then the insert point is
in the right half of the current node.</p>
<p>Otherwise it is in the left part of the upper successor. If it
is not a duplicate of some ... | [
"Add",
"to",
"right",
"side",
"with",
"an",
"upper",
"successor",
"present",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java#L1571-L1609 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java | GBSTree.finishInsert | private void finishInsert(
InsertNodes point,
InsertStack stack,
Object new1)
{
Object insertKey = new1;
if (point.positionNode() != null)
{
GBSNode p = point.positionNod... | java | private void finishInsert(
InsertNodes point,
InsertStack stack,
Object new1)
{
Object insertKey = new1;
if (point.positionNode() != null)
{
GBSNode p = point.positionNod... | [
"private",
"void",
"finishInsert",
"(",
"InsertNodes",
"point",
",",
"InsertStack",
"stack",
",",
"Object",
"new1",
")",
"{",
"Object",
"insertKey",
"=",
"new1",
";",
"if",
"(",
"point",
".",
"positionNode",
"(",
")",
"!=",
"null",
")",
"{",
"GBSNode",
"... | Do the write phase of the insert.
<p>findInsert does all of the reading needed to find the insert point.
finishInsert does all of the writing required to actually do the insert.
It is called by either optimisticInsert or pessimisticInsert as the
writing phase is the same regardless of the locking strategy.</p>
@param... | [
"Do",
"the",
"write",
"phase",
"of",
"the",
"insert",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java#L1624-L1650 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java | GBSTree.insertFringeMigrate | private void insertFringeMigrate(
InsertStack stack,
GBSNode p,
Object mkey)
{
GBSNode endp = p;
int endIndex = stack.index();
/* Maximum number of right chi... | java | private void insertFringeMigrate(
InsertStack stack,
GBSNode p,
Object mkey)
{
GBSNode endp = p;
int endIndex = stack.index();
/* Maximum number of right chi... | [
"private",
"void",
"insertFringeMigrate",
"(",
"InsertStack",
"stack",
",",
"GBSNode",
"p",
",",
"Object",
"mkey",
")",
"{",
"GBSNode",
"endp",
"=",
"p",
";",
"int",
"endIndex",
"=",
"stack",
".",
"index",
"(",
")",
";",
"/* Maximum number of right child nodes... | Migrate a key from a partial leaf through to the proper place
in its fringe, adding a node to the right side of the fringe
if necessary.
@param stack The stack that has been used to walk the tree
@param p Node from which we are migrating
@param mkey The migrating key. This may be null in which case
there is no k... | [
"Migrate",
"a",
"key",
"from",
"a",
"partial",
"leaf",
"through",
"to",
"the",
"proper",
"place",
"in",
"its",
"fringe",
"adding",
"a",
"node",
"to",
"the",
"right",
"side",
"of",
"the",
"fringe",
"if",
"necessary",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java#L1662-L1692 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java | GBSTree.insertCheckFringeBalance | private void insertCheckFringeBalance(
InsertStack stack,
GBSNode endp,
int endIndex,
int maxBal)
{
... | java | private void insertCheckFringeBalance(
InsertStack stack,
GBSNode endp,
int endIndex,
int maxBal)
{
... | [
"private",
"void",
"insertCheckFringeBalance",
"(",
"InsertStack",
"stack",
",",
"GBSNode",
"endp",
",",
"int",
"endIndex",
",",
"int",
"maxBal",
")",
"{",
"GBSNode",
"fpoint",
"=",
"null",
";",
"/* This points to the first half leaf we */",
"/* find that has a right c... | Check to see if fringe balancing is necessary and do it if needed.
@param stack The stack that has been used to walk the tree
@param endp Last node visited during fringe migration
@param endIndex The index within stack of endp
@param maxBal Maximum fringe imbalance allowed for the tree | [
"Check",
"to",
"see",
"if",
"fringe",
"balancing",
"is",
"necessary",
"and",
"do",
"it",
"if",
"needed",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java#L1702-L1747 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java | GBSTree.getDeleteStack | private DeleteStack getDeleteStack()
{
Object x = _deleteStack.get();
DeleteStack g = null;
if (x != null)
{
g = (DeleteStack) x;
g.reset();
}
else
{
g = new DeleteStack(this);
x = (Object) g;
_delete... | java | private DeleteStack getDeleteStack()
{
Object x = _deleteStack.get();
DeleteStack g = null;
if (x != null)
{
g = (DeleteStack) x;
g.reset();
}
else
{
g = new DeleteStack(this);
x = (Object) g;
_delete... | [
"private",
"DeleteStack",
"getDeleteStack",
"(",
")",
"{",
"Object",
"x",
"=",
"_deleteStack",
".",
"get",
"(",
")",
";",
"DeleteStack",
"g",
"=",
"null",
";",
"if",
"(",
"x",
"!=",
"null",
")",
"{",
"g",
"=",
"(",
"DeleteStack",
")",
"x",
";",
"g"... | Find a DeleteStack for use by the current thread.
<p>Allocation of a DeleteStack is more expensive than serial reuse.
This is a very cheap form of pooling done by attaching a
DeleteStack to each thread that calls delete.</p> | [
"Find",
"a",
"DeleteStack",
"for",
"use",
"by",
"the",
"current",
"thread",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java#L1772-L1788 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java | GBSTree.optimisticDelete | private boolean optimisticDelete(
DeleteStack stack,
Object deleteKey)
{
DeleteNode point = stack.deleteNode();
int v1 = _vno;
if ((v1&1) != 0)
return pessimisticNeeded;
synchronize... | java | private boolean optimisticDelete(
DeleteStack stack,
Object deleteKey)
{
DeleteNode point = stack.deleteNode();
int v1 = _vno;
if ((v1&1) != 0)
return pessimisticNeeded;
synchronize... | [
"private",
"boolean",
"optimisticDelete",
"(",
"DeleteStack",
"stack",
",",
"Object",
"deleteKey",
")",
"{",
"DeleteNode",
"point",
"=",
"stack",
".",
"deleteNode",
"(",
")",
";",
"int",
"v1",
"=",
"_vno",
";",
"if",
"(",
"(",
"v1",
"&",
"1",
")",
"!="... | Optimistic delete from a GBS Tree.
@param stack The DeleteStack used to do the delete.
@param deleteKey The Object to be deleteed.
@return optimisticWorked if the delete worked, pessimisticNeeded if
the delete failed due to interference from another thread. | [
"Optimistic",
"delete",
"from",
"a",
"GBS",
"Tree",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java#L1831-L1887 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java | GBSTree.iteratorSpecialDelete | void iteratorSpecialDelete(
Iterator iter,
GBSNode node,
int index)
{
_vno++;
if ((_vno&1) == 1)
{
node.deleteByLeftShift(index);
node.adjustMedian();
... | java | void iteratorSpecialDelete(
Iterator iter,
GBSNode node,
int index)
{
_vno++;
if ((_vno&1) == 1)
{
node.deleteByLeftShift(index);
node.adjustMedian();
... | [
"void",
"iteratorSpecialDelete",
"(",
"Iterator",
"iter",
",",
"GBSNode",
"node",
",",
"int",
"index",
")",
"{",
"_vno",
"++",
";",
"if",
"(",
"(",
"_vno",
"&",
"1",
")",
"==",
"1",
")",
"{",
"node",
".",
"deleteByLeftShift",
"(",
"index",
")",
";",
... | Allow an Iterator to delete an item by direct removal from a single
node.
<p>The Iterator has determined that the item to be deleted resides
in a leaf node with more than one item in the node. Removal of the
item from the leaf can be done without further modification to the
tree. The Iterator has already synchronize... | [
"Allow",
"an",
"Iterator",
"to",
"delete",
"an",
"item",
"by",
"direct",
"removal",
"from",
"a",
"single",
"node",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java#L1945-L1961 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java | GBSTree.finishDelete | private void finishDelete(
DeleteNode point,
DeleteStack stack,
Object deleteKey)
{
adjustTarget(point);
point.deleteNode().deleteByLeftShift(point.deleteIndex());
deleteFringeMigr... | java | private void finishDelete(
DeleteNode point,
DeleteStack stack,
Object deleteKey)
{
adjustTarget(point);
point.deleteNode().deleteByLeftShift(point.deleteIndex());
deleteFringeMigr... | [
"private",
"void",
"finishDelete",
"(",
"DeleteNode",
"point",
",",
"DeleteStack",
"stack",
",",
"Object",
"deleteKey",
")",
"{",
"adjustTarget",
"(",
"point",
")",
";",
"point",
".",
"deleteNode",
"(",
")",
".",
"deleteByLeftShift",
"(",
"point",
".",
"dele... | Do the write phase of the delete.
<p>findDelete does all of the reading needed to find the delete point.
finishDelete does all of the writing required to actually do the delete.
It is called by either optimisticDelete or pessimisticDelete as the
writing phase is the same regardless of the locking strategy.</p>
@param... | [
"Do",
"the",
"write",
"phase",
"of",
"the",
"delete",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java#L1976-L1985 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java | GBSTree.findDelete | private void findDelete(
DeleteNode point,
DeleteStack stack,
Object deleteKey)
{
java.util.Comparator comp = deleteComparator();
GBSNode p; /* P is used to march down the tre... | java | private void findDelete(
DeleteNode point,
DeleteStack stack,
Object deleteKey)
{
java.util.Comparator comp = deleteComparator();
GBSNode p; /* P is used to march down the tre... | [
"private",
"void",
"findDelete",
"(",
"DeleteNode",
"point",
",",
"DeleteStack",
"stack",
",",
"Object",
"deleteKey",
")",
"{",
"java",
".",
"util",
".",
"Comparator",
"comp",
"=",
"deleteComparator",
"(",
")",
";",
"GBSNode",
"p",
";",
"/* P is used to march ... | Find the delete point within the tree.
@param point The DeleteNode that will identify the delete point.
@param stack The DeleteStack that records nodes traversed.
@param deleteKey Object to be deleted. | [
"Find",
"the",
"delete",
"point",
"within",
"the",
"tree",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java#L2040-L2096 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java | GBSTree.midDelete | private void midDelete(
DeleteStack stack,
GBSNode p,
DeleteNode point)
{
/* Assume no lower predecessor/successor */
point.setDelete(p, p.middleIndex());
GBSNode q = p.lowerPredecessor(stack... | java | private void midDelete(
DeleteStack stack,
GBSNode p,
DeleteNode point)
{
/* Assume no lower predecessor/successor */
point.setDelete(p, p.middleIndex());
GBSNode q = p.lowerPredecessor(stack... | [
"private",
"void",
"midDelete",
"(",
"DeleteStack",
"stack",
",",
"GBSNode",
"p",
",",
"DeleteNode",
"point",
")",
"{",
"/* Assume no lower predecessor/successor */",
"point",
".",
"setDelete",
"(",
"p",
",",
"p",
".",
"middleIndex",
"(",
")",
")",
";",
"GBSNo... | Delete a key with an equal match.
<p>During the search, we happened upon an equal match. If there is
a predecessor at a lower level, we bring it up to fill the hole and
make it the delete key. Otherwise, the one we have found is the
delete key already.</p> | [
"Delete",
"a",
"key",
"with",
"an",
"equal",
"match",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java#L2107-L2132 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java | GBSTree.leftDelete | private void leftDelete(
GBSNode p,
GBSNode r,
Object deleteKey,
DeleteNode point)
{
if (r == null) /* There is no upper predecessor */
... | java | private void leftDelete(
GBSNode p,
GBSNode r,
Object deleteKey,
DeleteNode point)
{
if (r == null) /* There is no upper predecessor */
... | [
"private",
"void",
"leftDelete",
"(",
"GBSNode",
"p",
",",
"GBSNode",
"r",
",",
"Object",
"deleteKey",
",",
"DeleteNode",
"point",
")",
"{",
"if",
"(",
"r",
"==",
"null",
")",
"/* There is no upper predecessor */",
"leftDeleteNoPredecessor",
"(",
"p",
",... | Delete from current or predecessor.
<ol>
<li>There is no left child.
<li> There might or might not be a right child
<li>DELETE_KEY < MEDIAN of current node
<li>DELETE_KEY > MEDIAN of predecessor (if there is one)
</ol>
<p>In the example below, if the current node is GHI, then the delete
key is greater than E a... | [
"Delete",
"from",
"current",
"or",
"predecessor",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java#L2175-L2185 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java | GBSTree.leftDeleteNoPredecessor | private void leftDeleteNoPredecessor(
GBSNode p,
Object deleteKey,
DeleteNode point)
{
int idx = p.findDeleteInLeft(deleteKey);
if (idx >= 0)
... | java | private void leftDeleteNoPredecessor(
GBSNode p,
Object deleteKey,
DeleteNode point)
{
int idx = p.findDeleteInLeft(deleteKey);
if (idx >= 0)
... | [
"private",
"void",
"leftDeleteNoPredecessor",
"(",
"GBSNode",
"p",
",",
"Object",
"deleteKey",
",",
"DeleteNode",
"point",
")",
"{",
"int",
"idx",
"=",
"p",
".",
"findDeleteInLeft",
"(",
"deleteKey",
")",
";",
"if",
"(",
"idx",
">=",
"0",
")",
"point",
"... | Delete from left side with no upper predecessor. | [
"Delete",
"from",
"left",
"side",
"with",
"no",
"upper",
"predecessor",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java#L2190-L2198 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java | GBSTree.leftDeleteWithPredecessor | private void leftDeleteWithPredecessor(
GBSNode p,
GBSNode r,
Object deleteKey,
DeleteNode point)
{
ja... | java | private void leftDeleteWithPredecessor(
GBSNode p,
GBSNode r,
Object deleteKey,
DeleteNode point)
{
ja... | [
"private",
"void",
"leftDeleteWithPredecessor",
"(",
"GBSNode",
"p",
",",
"GBSNode",
"r",
",",
"Object",
"deleteKey",
",",
"DeleteNode",
"point",
")",
"{",
"java",
".",
"util",
".",
"Comparator",
"comp",
"=",
"p",
".",
"deleteComparator",
"(",
")",
";",
"i... | Delete from left side with an upper predecessor present. | [
"Delete",
"from",
"left",
"side",
"with",
"an",
"upper",
"predecessor",
"present",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java#L2203-L2235 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java | GBSTree.rightDelete | private void rightDelete(
GBSNode p,
GBSNode l,
Object deleteKey,
DeleteNode point)
{
if (l == null) /* There is no upper successor ... | java | private void rightDelete(
GBSNode p,
GBSNode l,
Object deleteKey,
DeleteNode point)
{
if (l == null) /* There is no upper successor ... | [
"private",
"void",
"rightDelete",
"(",
"GBSNode",
"p",
",",
"GBSNode",
"l",
",",
"Object",
"deleteKey",
",",
"DeleteNode",
"point",
")",
"{",
"if",
"(",
"l",
"==",
"null",
")",
"/* There is no upper successor */",
"rightDeleteNoSuccessor",
"(",
"p",
",... | Delete from current or successor.
<ol>
<li>There is no right child
<li>There may or may not be a left child.
<li>DELETE_KEY > MEDIAN of current node.
<li>DELETE_KEY < MEDIAN of successor (if there is one)
</ol>
<p>In the example below, if the current node is GHI, then the delete
key is greater than H and less t... | [
"Delete",
"from",
"current",
"or",
"successor",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java#L2278-L2288 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java | GBSTree.rightDeleteNoSuccessor | private void rightDeleteNoSuccessor(
GBSNode p,
Object deleteKey,
DeleteNode point)
{
int idx = p.findDeleteInRight(deleteKey);
if (idx >= 0)
p... | java | private void rightDeleteNoSuccessor(
GBSNode p,
Object deleteKey,
DeleteNode point)
{
int idx = p.findDeleteInRight(deleteKey);
if (idx >= 0)
p... | [
"private",
"void",
"rightDeleteNoSuccessor",
"(",
"GBSNode",
"p",
",",
"Object",
"deleteKey",
",",
"DeleteNode",
"point",
")",
"{",
"int",
"idx",
"=",
"p",
".",
"findDeleteInRight",
"(",
"deleteKey",
")",
";",
"if",
"(",
"idx",
">=",
"0",
")",
"point",
"... | Delete from right side with no successor. | [
"Delete",
"from",
"right",
"side",
"with",
"no",
"successor",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java#L2293-L2301 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java | GBSTree.rightDeleteWithSuccessor | private void rightDeleteWithSuccessor(
GBSNode p,
GBSNode l,
Object deleteKey,
DeleteNode point)
{
java.ut... | java | private void rightDeleteWithSuccessor(
GBSNode p,
GBSNode l,
Object deleteKey,
DeleteNode point)
{
java.ut... | [
"private",
"void",
"rightDeleteWithSuccessor",
"(",
"GBSNode",
"p",
",",
"GBSNode",
"l",
",",
"Object",
"deleteKey",
",",
"DeleteNode",
"point",
")",
"{",
"java",
".",
"util",
".",
"Comparator",
"comp",
"=",
"p",
".",
"deleteComparator",
"(",
")",
";",
"in... | Delete from right side with successor node present. | [
"Delete",
"from",
"right",
"side",
"with",
"successor",
"node",
"present",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java#L2306-L2341 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java | GBSTree.deleteFringeMigrate | private void deleteFringeMigrate(
DeleteStack stack,
GBSNode p)
{
GBSNode endp = p; /* Last node processed */
int endIndex = stack.index(); /* Index to last parent */
... | java | private void deleteFringeMigrate(
DeleteStack stack,
GBSNode p)
{
GBSNode endp = p; /* Last node processed */
int endIndex = stack.index(); /* Index to last parent */
... | [
"private",
"void",
"deleteFringeMigrate",
"(",
"DeleteStack",
"stack",
",",
"GBSNode",
"p",
")",
"{",
"GBSNode",
"endp",
"=",
"p",
";",
"/* Last node processed */",
"int",
"endIndex",
"=",
"stack",
".",
"index",
"(",
")",
";",
"/* Index to last p... | Migrate a hole from a partial leaf through to the proper place
in its fringe, deleting a node from the right side of the fringe
if necessary.
<p>This may cause a fringe t0 tree to degenerate to a linear list
which, in turn, will trigger a height rebalancing.</p>
@param tree The index we are using
@param stack The st... | [
"Migrate",
"a",
"hole",
"from",
"a",
"partial",
"leaf",
"through",
"to",
"the",
"proper",
"place",
"in",
"its",
"fringe",
"deleting",
"a",
"node",
"from",
"the",
"right",
"side",
"of",
"the",
"fringe",
"if",
"necessary",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java#L2356-L2378 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java | GBSTree.deleteCheckFringeBalance | private void deleteCheckFringeBalance(
DeleteStack stack,
GBSNode endp,
int endIndex,
int maxBal)
{
int f... | java | private void deleteCheckFringeBalance(
DeleteStack stack,
GBSNode endp,
int endIndex,
int maxBal)
{
int f... | [
"private",
"void",
"deleteCheckFringeBalance",
"(",
"DeleteStack",
"stack",
",",
"GBSNode",
"endp",
",",
"int",
"endIndex",
",",
"int",
"maxBal",
")",
"{",
"int",
"fDepth",
"=",
"0",
";",
"/* Fringe balance depth */",
"fDepth",
"=",
"0",
";",
"i... | Check to see if fringe balancing is required following a delete
and do the fringe rebalancing if needed. | [
"Check",
"to",
"see",
"if",
"fringe",
"balancing",
"is",
"required",
"following",
"a",
"delete",
"and",
"do",
"the",
"fringe",
"rebalancing",
"if",
"needed",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/gbs/GBSTree.java#L2384-L2441 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.context/src/com/ibm/wsspi/threadcontext/ThreadContextDeserializer.java | ThreadContextDeserializer.deserialize | public static ThreadContextDescriptor deserialize(byte[] bytes, Map<String, String> execProps) throws ClassNotFoundException, IOException {
return new ThreadContextDescriptorImpl(execProps, bytes);
} | java | public static ThreadContextDescriptor deserialize(byte[] bytes, Map<String, String> execProps) throws ClassNotFoundException, IOException {
return new ThreadContextDescriptorImpl(execProps, bytes);
} | [
"public",
"static",
"ThreadContextDescriptor",
"deserialize",
"(",
"byte",
"[",
"]",
"bytes",
",",
"Map",
"<",
"String",
",",
"String",
">",
"execProps",
")",
"throws",
"ClassNotFoundException",
",",
"IOException",
"{",
"return",
"new",
"ThreadContextDescriptorImpl"... | Deserializes a thread context descriptor.
@param bytes bytes obtained from the ThreadContextDescriptor.serialize method.
@param execProps execution properties.
@return a thread context descriptor.
@throws ClassNotFoundException if unable to find a class during deserialization.
@throws IOException if an error occurs du... | [
"Deserializes",
"a",
"thread",
"context",
"descriptor",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.context/src/com/ibm/wsspi/threadcontext/ThreadContextDeserializer.java#L33-L35 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.kernel.boot.core/src/com/ibm/ws/kernel/boot/internal/FileUtils.java | FileUtils.listFiles | public static File[] listFiles(final File target, final List<Pattern> patterns, final boolean include) {
if (patterns == null || patterns.isEmpty())
return target.listFiles();
return target.listFiles(new FilenameFilter() {
@Override
public boolean accept(File dir, S... | java | public static File[] listFiles(final File target, final List<Pattern> patterns, final boolean include) {
if (patterns == null || patterns.isEmpty())
return target.listFiles();
return target.listFiles(new FilenameFilter() {
@Override
public boolean accept(File dir, S... | [
"public",
"static",
"File",
"[",
"]",
"listFiles",
"(",
"final",
"File",
"target",
",",
"final",
"List",
"<",
"Pattern",
">",
"patterns",
",",
"final",
"boolean",
"include",
")",
"{",
"if",
"(",
"patterns",
"==",
"null",
"||",
"patterns",
".",
"isEmpty",... | List files according to the patterns and the pattern type
@param target
@param patterns
@param include
@return | [
"List",
"files",
"according",
"to",
"the",
"patterns",
"and",
"the",
"pattern",
"type"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.boot.core/src/com/ibm/ws/kernel/boot/internal/FileUtils.java#L53-L71 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.kernel.boot.core/src/com/ibm/ws/kernel/boot/internal/FileUtils.java | FileUtils.copyFile | public static void copyFile(File dest, File source) throws IOException {
InputStream input = null;
try {
input = new FileInputStream(source);
createFile(dest, input);
} finally {
Utils.tryToClose(input);
}
} | java | public static void copyFile(File dest, File source) throws IOException {
InputStream input = null;
try {
input = new FileInputStream(source);
createFile(dest, input);
} finally {
Utils.tryToClose(input);
}
} | [
"public",
"static",
"void",
"copyFile",
"(",
"File",
"dest",
",",
"File",
"source",
")",
"throws",
"IOException",
"{",
"InputStream",
"input",
"=",
"null",
";",
"try",
"{",
"input",
"=",
"new",
"FileInputStream",
"(",
"source",
")",
";",
"createFile",
"(",... | Copy from one file to the other
@param dest
@param source
@throws IOException | [
"Copy",
"from",
"one",
"file",
"to",
"the",
"other"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.boot.core/src/com/ibm/ws/kernel/boot/internal/FileUtils.java#L80-L88 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.kernel.boot.core/src/com/ibm/ws/kernel/boot/internal/FileUtils.java | FileUtils.createFile | public static void createFile(final File dest, final InputStream sourceInput) throws IOException {
if (sourceInput == null || dest == null)
return;
FileOutputStream fos = null;
try {
if (!dest.getParentFile().exists()) {
if (!dest.getParentFile().mkdirs()... | java | public static void createFile(final File dest, final InputStream sourceInput) throws IOException {
if (sourceInput == null || dest == null)
return;
FileOutputStream fos = null;
try {
if (!dest.getParentFile().exists()) {
if (!dest.getParentFile().mkdirs()... | [
"public",
"static",
"void",
"createFile",
"(",
"final",
"File",
"dest",
",",
"final",
"InputStream",
"sourceInput",
")",
"throws",
"IOException",
"{",
"if",
"(",
"sourceInput",
"==",
"null",
"||",
"dest",
"==",
"null",
")",
"return",
";",
"FileOutputStream",
... | Read the content from an inputStream and write out to the other file
@param dest
@param sourceInput
@throws IOException | [
"Read",
"the",
"content",
"from",
"an",
"inputStream",
"and",
"write",
"out",
"to",
"the",
"other",
"file"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.boot.core/src/com/ibm/ws/kernel/boot/internal/FileUtils.java#L97-L121 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.kernel.boot.core/src/com/ibm/ws/kernel/boot/internal/FileUtils.java | FileUtils.copyDir | public static void copyDir(File from, File to) throws FileNotFoundException, IOException {
File[] files = from.listFiles();
if (files != null) {
for (File ff : files) {
File tf = new File(to, ff.getName());
if (ff.isDirectory()) {
if (tf.m... | java | public static void copyDir(File from, File to) throws FileNotFoundException, IOException {
File[] files = from.listFiles();
if (files != null) {
for (File ff : files) {
File tf = new File(to, ff.getName());
if (ff.isDirectory()) {
if (tf.m... | [
"public",
"static",
"void",
"copyDir",
"(",
"File",
"from",
",",
"File",
"to",
")",
"throws",
"FileNotFoundException",
",",
"IOException",
"{",
"File",
"[",
"]",
"files",
"=",
"from",
".",
"listFiles",
"(",
")",
";",
"if",
"(",
"files",
"!=",
"null",
"... | Recursively copy the files from one dir to the other.
@param from The directory to copy from, must exist.
@param to The directory to copy to, must exist, must be empty.
@throws IOException
@throws FileNotFoundException | [
"Recursively",
"copy",
"the",
"files",
"from",
"one",
"dir",
"to",
"the",
"other",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.boot.core/src/com/ibm/ws/kernel/boot/internal/FileUtils.java#L162-L177 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.kernel.boot.core/src/com/ibm/ws/kernel/boot/internal/FileUtils.java | FileUtils.isUnderDirectory | public static boolean isUnderDirectory(File child, File parent) {
if (child == null || parent == null)
return false;
URI childUri = child.toURI();
URI relativeUri = parent.toURI().relativize(childUri);
return relativeUri.equals(childUri) ? false : true;
} | java | public static boolean isUnderDirectory(File child, File parent) {
if (child == null || parent == null)
return false;
URI childUri = child.toURI();
URI relativeUri = parent.toURI().relativize(childUri);
return relativeUri.equals(childUri) ? false : true;
} | [
"public",
"static",
"boolean",
"isUnderDirectory",
"(",
"File",
"child",
",",
"File",
"parent",
")",
"{",
"if",
"(",
"child",
"==",
"null",
"||",
"parent",
"==",
"null",
")",
"return",
"false",
";",
"URI",
"childUri",
"=",
"child",
".",
"toURI",
"(",
"... | If child is under parent, will return true, otherwise, return false.
@param child
@param parent
@return | [
"If",
"child",
"is",
"under",
"parent",
"will",
"return",
"true",
"otherwise",
"return",
"false",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.boot.core/src/com/ibm/ws/kernel/boot/internal/FileUtils.java#L218-L226 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.kernel.boot.core/src/com/ibm/ws/kernel/boot/internal/FileUtils.java | FileUtils.normalizeEntryPath | public static String normalizeEntryPath(String entryPath) {
if (entryPath == null || entryPath.isEmpty())
return "";
entryPath = entryPath.replace("\\", "/");
if (entryPath.startsWith("/")) {
if (entryPath.length() == 1) {
entryPath = "";
} e... | java | public static String normalizeEntryPath(String entryPath) {
if (entryPath == null || entryPath.isEmpty())
return "";
entryPath = entryPath.replace("\\", "/");
if (entryPath.startsWith("/")) {
if (entryPath.length() == 1) {
entryPath = "";
} e... | [
"public",
"static",
"String",
"normalizeEntryPath",
"(",
"String",
"entryPath",
")",
"{",
"if",
"(",
"entryPath",
"==",
"null",
"||",
"entryPath",
".",
"isEmpty",
"(",
")",
")",
"return",
"\"\"",
";",
"entryPath",
"=",
"entryPath",
".",
"replace",
"(",
"\"... | Normalize a relative entry path, so that it can be used in an archive.
@param entryPath
@return | [
"Normalize",
"a",
"relative",
"entry",
"path",
"so",
"that",
"it",
"can",
"be",
"used",
"in",
"an",
"archive",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.boot.core/src/com/ibm/ws/kernel/boot/internal/FileUtils.java#L287-L302 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.kernel.boot.core/src/com/ibm/ws/kernel/boot/internal/FileUtils.java | FileUtils.normalizeDirPath | public static String normalizeDirPath(String dirPath) {
if (dirPath == null || dirPath.isEmpty())
return "";
dirPath = dirPath.replace("\\", "/");
if (!dirPath.endsWith("/")) {
dirPath = dirPath + "/";
}
return dirPath;
} | java | public static String normalizeDirPath(String dirPath) {
if (dirPath == null || dirPath.isEmpty())
return "";
dirPath = dirPath.replace("\\", "/");
if (!dirPath.endsWith("/")) {
dirPath = dirPath + "/";
}
return dirPath;
} | [
"public",
"static",
"String",
"normalizeDirPath",
"(",
"String",
"dirPath",
")",
"{",
"if",
"(",
"dirPath",
"==",
"null",
"||",
"dirPath",
".",
"isEmpty",
"(",
")",
")",
"return",
"\"\"",
";",
"dirPath",
"=",
"dirPath",
".",
"replace",
"(",
"\"\\\\\"",
"... | Normalize a path that represents a directory
@param dirPath
@return | [
"Normalize",
"a",
"path",
"that",
"represents",
"a",
"directory"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.boot.core/src/com/ibm/ws/kernel/boot/internal/FileUtils.java#L310-L321 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.jdbc/src/com/ibm/ws/jdbc/internal/JDBCDrivers.java | JDBCDrivers.contains | private static final boolean contains(Collection<String> list, String value) {
for (String item : list)
if (item.contains(value))
return true;
return false;
} | java | private static final boolean contains(Collection<String> list, String value) {
for (String item : list)
if (item.contains(value))
return true;
return false;
} | [
"private",
"static",
"final",
"boolean",
"contains",
"(",
"Collection",
"<",
"String",
">",
"list",
",",
"String",
"value",
")",
"{",
"for",
"(",
"String",
"item",
":",
"list",
")",
"if",
"(",
"item",
".",
"contains",
"(",
"value",
")",
")",
"return",
... | Utility method that determines if some text is found as a substring within the contents of a list.
@param list items through which to search.
@param value text for which to search.
@return true if found, otherwise false. | [
"Utility",
"method",
"that",
"determines",
"if",
"some",
"text",
"is",
"found",
"as",
"a",
"substring",
"within",
"the",
"contents",
"of",
"a",
"list",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jdbc/src/com/ibm/ws/jdbc/internal/JDBCDrivers.java#L255-L260 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.jdbc/src/com/ibm/ws/jdbc/internal/JDBCDrivers.java | JDBCDrivers.getConnectionPoolDataSourceClassName | static String getConnectionPoolDataSourceClassName(String vendorPropertiesPID) {
String[] classNames = classNamesByPID.get(vendorPropertiesPID);
return classNames == null ? null : classNames[1];
} | java | static String getConnectionPoolDataSourceClassName(String vendorPropertiesPID) {
String[] classNames = classNamesByPID.get(vendorPropertiesPID);
return classNames == null ? null : classNames[1];
} | [
"static",
"String",
"getConnectionPoolDataSourceClassName",
"(",
"String",
"vendorPropertiesPID",
")",
"{",
"String",
"[",
"]",
"classNames",
"=",
"classNamesByPID",
".",
"get",
"(",
"vendorPropertiesPID",
")",
";",
"return",
"classNames",
"==",
"null",
"?",
"null",... | Infer the vendor implementation class name for javax.sql.ConnectionPoolDataSource based on the PID of the vendor properties.
A best effort is made for the known vendors.
@param vendorPropertiesPID factory pid of the JDBC vendor properties.
@return name of vendor implementation class for javax.sql.ConnectionPoolDataSou... | [
"Infer",
"the",
"vendor",
"implementation",
"class",
"name",
"for",
"javax",
".",
"sql",
".",
"ConnectionPoolDataSource",
"based",
"on",
"the",
"PID",
"of",
"the",
"vendor",
"properties",
".",
"A",
"best",
"effort",
"is",
"made",
"for",
"the",
"known",
"vend... | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jdbc/src/com/ibm/ws/jdbc/internal/JDBCDrivers.java#L287-L290 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.jdbc/src/com/ibm/ws/jdbc/internal/JDBCDrivers.java | JDBCDrivers.getDataSourceClassName | static String getDataSourceClassName(Collection<String> fileNames) {
for (Map.Entry<String, String[]> entry : classNamesByKey.entrySet())
if (contains(fileNames, entry.getKey())) {
String[] classNames = entry.getValue();
return classNames == null ? null : classNames[... | java | static String getDataSourceClassName(Collection<String> fileNames) {
for (Map.Entry<String, String[]> entry : classNamesByKey.entrySet())
if (contains(fileNames, entry.getKey())) {
String[] classNames = entry.getValue();
return classNames == null ? null : classNames[... | [
"static",
"String",
"getDataSourceClassName",
"(",
"Collection",
"<",
"String",
">",
"fileNames",
")",
"{",
"for",
"(",
"Map",
".",
"Entry",
"<",
"String",
",",
"String",
"[",
"]",
">",
"entry",
":",
"classNamesByKey",
".",
"entrySet",
"(",
")",
")",
"if... | Infer the vendor implementation class name for javax.sql.DataSource based on the JAR or ZIP names.
A best effort is made for the known vendors.
@param fileNames all upper case names of JAR and/or ZIP files for the JDBC driver.
@return name of the vendor implementation class for javax.sql.DataSource. Null if unknown. | [
"Infer",
"the",
"vendor",
"implementation",
"class",
"name",
"for",
"javax",
".",
"sql",
".",
"DataSource",
"based",
"on",
"the",
"JAR",
"or",
"ZIP",
"names",
".",
"A",
"best",
"effort",
"is",
"made",
"for",
"the",
"known",
"vendors",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jdbc/src/com/ibm/ws/jdbc/internal/JDBCDrivers.java#L299-L308 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.jdbc/src/com/ibm/ws/jdbc/internal/JDBCDrivers.java | JDBCDrivers.getDataSourceClassName | static String getDataSourceClassName(String vendorPropertiesPID) {
String[] classNames = classNamesByPID.get(vendorPropertiesPID);
return classNames == null ? null : classNames[0];
} | java | static String getDataSourceClassName(String vendorPropertiesPID) {
String[] classNames = classNamesByPID.get(vendorPropertiesPID);
return classNames == null ? null : classNames[0];
} | [
"static",
"String",
"getDataSourceClassName",
"(",
"String",
"vendorPropertiesPID",
")",
"{",
"String",
"[",
"]",
"classNames",
"=",
"classNamesByPID",
".",
"get",
"(",
"vendorPropertiesPID",
")",
";",
"return",
"classNames",
"==",
"null",
"?",
"null",
":",
"cla... | Infer the vendor implementation class name for javax.sql.DataSource based on the PID of the vendor properties.
A best effort is made for the known vendors.
@param vendorPropertiesPID factory pid of the JDBC vendor properties.
@return name of vendor implementation class for javax.sql.DataSource. Null if unknown. | [
"Infer",
"the",
"vendor",
"implementation",
"class",
"name",
"for",
"javax",
".",
"sql",
".",
"DataSource",
"based",
"on",
"the",
"PID",
"of",
"the",
"vendor",
"properties",
".",
"A",
"best",
"effort",
"is",
"made",
"for",
"the",
"known",
"vendors",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jdbc/src/com/ibm/ws/jdbc/internal/JDBCDrivers.java#L317-L320 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.jdbc/src/com/ibm/ws/jdbc/internal/JDBCDrivers.java | JDBCDrivers.getXADataSourceClassName | static String getXADataSourceClassName(String vendorPropertiesPID) {
String[] classNames = classNamesByPID.get(vendorPropertiesPID);
return classNames == null ? null : classNames[2];
} | java | static String getXADataSourceClassName(String vendorPropertiesPID) {
String[] classNames = classNamesByPID.get(vendorPropertiesPID);
return classNames == null ? null : classNames[2];
} | [
"static",
"String",
"getXADataSourceClassName",
"(",
"String",
"vendorPropertiesPID",
")",
"{",
"String",
"[",
"]",
"classNames",
"=",
"classNamesByPID",
".",
"get",
"(",
"vendorPropertiesPID",
")",
";",
"return",
"classNames",
"==",
"null",
"?",
"null",
":",
"c... | Infer the vendor implementation class name for javax.sql.XADataSource based on the PID of the vendor properties.
A best effort is made for the known vendors.
@param vendorPropertiesPID factory pid of the JDBC vendor properties.
@return name of vendor implementation class for javax.sql.XADataSource. Null if unknown. | [
"Infer",
"the",
"vendor",
"implementation",
"class",
"name",
"for",
"javax",
".",
"sql",
".",
"XADataSource",
"based",
"on",
"the",
"PID",
"of",
"the",
"vendor",
"properties",
".",
"A",
"best",
"effort",
"is",
"made",
"for",
"the",
"known",
"vendors",
"."
... | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jdbc/src/com/ibm/ws/jdbc/internal/JDBCDrivers.java#L347-L350 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.jdbc/src/com/ibm/ws/jdbc/internal/JDBCDrivers.java | JDBCDrivers.tryToLoad | private static String tryToLoad(Class<?> type, ClassLoader loader, String... classNames) {
final boolean trace = TraceComponent.isAnyTracingEnabled();
for (String className : classNames)
try {
Class<?> c = loader.loadClass(className);
boolean isInstance = typ... | java | private static String tryToLoad(Class<?> type, ClassLoader loader, String... classNames) {
final boolean trace = TraceComponent.isAnyTracingEnabled();
for (String className : classNames)
try {
Class<?> c = loader.loadClass(className);
boolean isInstance = typ... | [
"private",
"static",
"String",
"tryToLoad",
"(",
"Class",
"<",
"?",
">",
"type",
",",
"ClassLoader",
"loader",
",",
"String",
"...",
"classNames",
")",
"{",
"final",
"boolean",
"trace",
"=",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
";",
"for",... | Attempt to load the specified class names, returning the first that successfully loads
and is an instance of the specified type.
@param type data source interface
@param loader class loader
@param classNames ordered list of class names to check
@return the first class name that successfully loads and is an instance of... | [
"Attempt",
"to",
"load",
"the",
"specified",
"class",
"names",
"returning",
"the",
"first",
"that",
"successfully",
"loads",
"and",
"is",
"an",
"instance",
"of",
"the",
"specified",
"type",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jdbc/src/com/ibm/ws/jdbc/internal/JDBCDrivers.java#L504-L520 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.security.token.ltpa/src/com/ibm/ws/security/token/ltpa/internal/UserData.java | UserData.getAttributes | protected final String[] getAttributes(String key) {
ArrayList<String> array = this._attributes.get(key);
if (array != null && array.size() > 0) {
String[] type = new String[array.size()];
return array.toArray(type);
}
return null;
} | java | protected final String[] getAttributes(String key) {
ArrayList<String> array = this._attributes.get(key);
if (array != null && array.size() > 0) {
String[] type = new String[array.size()];
return array.toArray(type);
}
return null;
} | [
"protected",
"final",
"String",
"[",
"]",
"getAttributes",
"(",
"String",
"key",
")",
"{",
"ArrayList",
"<",
"String",
">",
"array",
"=",
"this",
".",
"_attributes",
".",
"get",
"(",
"key",
")",
";",
"if",
"(",
"array",
"!=",
"null",
"&&",
"array",
"... | Get the attribute value based on the named value. A string array
is returned containing all values of the attribute previously set.
@param key The name of a attribute
@return A list of the attribute values corresponding with the specified key | [
"Get",
"the",
"attribute",
"value",
"based",
"on",
"the",
"named",
"value",
".",
"A",
"string",
"array",
"is",
"returned",
"containing",
"all",
"values",
"of",
"the",
"attribute",
"previously",
"set",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.token.ltpa/src/com/ibm/ws/security/token/ltpa/internal/UserData.java#L70-L77 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.jmx.connector.client.rest/src/com/ibm/ws/jmx/connector/client/rest/internal/FileTransferClient.java | FileTransferClient.handleOperation | public Object handleOperation(String operation, Object[] params) throws IOException {
if (OPERATION_DOWNLOAD.equals(operation)) {
if (params.length == 2) {
downloadFile((String) params[0], (String) params[1]);
} else {
//partial download
re... | java | public Object handleOperation(String operation, Object[] params) throws IOException {
if (OPERATION_DOWNLOAD.equals(operation)) {
if (params.length == 2) {
downloadFile((String) params[0], (String) params[1]);
} else {
//partial download
re... | [
"public",
"Object",
"handleOperation",
"(",
"String",
"operation",
",",
"Object",
"[",
"]",
"params",
")",
"throws",
"IOException",
"{",
"if",
"(",
"OPERATION_DOWNLOAD",
".",
"equals",
"(",
"operation",
")",
")",
"{",
"if",
"(",
"params",
".",
"length",
"=... | Handle MBean invocation requests | [
"Handle",
"MBean",
"invocation",
"requests"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jmx.connector.client.rest/src/com/ibm/ws/jmx/connector/client/rest/internal/FileTransferClient.java#L85-L105 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/channel/h2internal/H2TCPReadRequestContext.java | H2TCPReadRequestContext.read | @Override
public long read(long numBytes, int timeout) throws IOException {
long readCount = 0;
H2StreamProcessor p = muxLink.getStreamProcessor(streamID);
try {
p.getReadLatch().await(timeout, TimeUnit.MILLISECONDS);
readCount = p.readCount(numBytes, this.getBuffer... | java | @Override
public long read(long numBytes, int timeout) throws IOException {
long readCount = 0;
H2StreamProcessor p = muxLink.getStreamProcessor(streamID);
try {
p.getReadLatch().await(timeout, TimeUnit.MILLISECONDS);
readCount = p.readCount(numBytes, this.getBuffer... | [
"@",
"Override",
"public",
"long",
"read",
"(",
"long",
"numBytes",
",",
"int",
"timeout",
")",
"throws",
"IOException",
"{",
"long",
"readCount",
"=",
"0",
";",
"H2StreamProcessor",
"p",
"=",
"muxLink",
".",
"getStreamProcessor",
"(",
"streamID",
")",
";",
... | Get bytes from the stream processor associated with this read context | [
"Get",
"bytes",
"from",
"the",
"stream",
"processor",
"associated",
"with",
"this",
"read",
"context"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/channel/h2internal/H2TCPReadRequestContext.java#L110-L123 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.security.context/src/com/ibm/ws/security/context/internal/SecurityContextProviderImpl.java | SecurityContextProviderImpl.getConfigNameForRef | @FFDCIgnore(PrivilegedActionException.class)
private String getConfigNameForRef(final String ref) {
String name = null;
if (ref != null) {
final ConfigurationAdmin configAdmin = configAdminRef.getService();
Configuration config;
try {
config = Acce... | java | @FFDCIgnore(PrivilegedActionException.class)
private String getConfigNameForRef(final String ref) {
String name = null;
if (ref != null) {
final ConfigurationAdmin configAdmin = configAdminRef.getService();
Configuration config;
try {
config = Acce... | [
"@",
"FFDCIgnore",
"(",
"PrivilegedActionException",
".",
"class",
")",
"private",
"String",
"getConfigNameForRef",
"(",
"final",
"String",
"ref",
")",
"{",
"String",
"name",
"=",
"null",
";",
"if",
"(",
"ref",
"!=",
"null",
")",
"{",
"final",
"Configuration... | Use the config admin service to get the name for a given service reference
@param ref the service reference string
@return the name or null if there were problems | [
"Use",
"the",
"config",
"admin",
"service",
"to",
"get",
"the",
"name",
"for",
"a",
"given",
"service",
"reference"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.context/src/com/ibm/ws/security/context/internal/SecurityContextProviderImpl.java#L170-L190 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.org.apache.cxf.cxf.rt.rs.client.3.2/src/com/ibm/ws/jaxrs21/clientconfig/JAXRSClientConfigHolder.java | JAXRSClientConfigHolder.addConfig | public static synchronized void addConfig(String id, String uri, Map<String, String> params) {
uriMap.put(id, uri);
configInfo.put(uri, params);
resolvedConfigInfo.clear();
if (uri.endsWith("*")) {
wildcardsPresentInConfigInfo = true;
}
} | java | public static synchronized void addConfig(String id, String uri, Map<String, String> params) {
uriMap.put(id, uri);
configInfo.put(uri, params);
resolvedConfigInfo.clear();
if (uri.endsWith("*")) {
wildcardsPresentInConfigInfo = true;
}
} | [
"public",
"static",
"synchronized",
"void",
"addConfig",
"(",
"String",
"id",
",",
"String",
"uri",
",",
"Map",
"<",
"String",
",",
"String",
">",
"params",
")",
"{",
"uriMap",
".",
"put",
"(",
"id",
",",
"uri",
")",
";",
"configInfo",
".",
"put",
"(... | add a configuration for a URL
We'd like a set of hashmaps keyed by URL, however when osgi calls
deactivate, we have no arguments, so we have to associate a url with
the object id of the service. That allows us to remove the right one.
@param id - the object id of the service instance that added this.
@param url - the ... | [
"add",
"a",
"configuration",
"for",
"a",
"URL",
"We",
"d",
"like",
"a",
"set",
"of",
"hashmaps",
"keyed",
"by",
"URL",
"however",
"when",
"osgi",
"calls",
"deactivate",
"we",
"have",
"no",
"arguments",
"so",
"we",
"have",
"to",
"associate",
"a",
"url",
... | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.org.apache.cxf.cxf.rt.rs.client.3.2/src/com/ibm/ws/jaxrs21/clientconfig/JAXRSClientConfigHolder.java#L54-L61 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/application/viewstate/SessionIdGenerator.java | SessionIdGenerator.generateSessionId | public String generateSessionId()
{
byte random[] = new byte[16];
// Render the result as a String of hexadecimal digits
StringBuilder buffer = new StringBuilder();
int resultLenBytes = 0;
while (resultLenBytes < sessionIdLength)
{
getRandomBytes(rando... | java | public String generateSessionId()
{
byte random[] = new byte[16];
// Render the result as a String of hexadecimal digits
StringBuilder buffer = new StringBuilder();
int resultLenBytes = 0;
while (resultLenBytes < sessionIdLength)
{
getRandomBytes(rando... | [
"public",
"String",
"generateSessionId",
"(",
")",
"{",
"byte",
"random",
"[",
"]",
"=",
"new",
"byte",
"[",
"16",
"]",
";",
"// Render the result as a String of hexadecimal digits",
"StringBuilder",
"buffer",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"int",
"... | Generate and return a new session identifier. | [
"Generate",
"and",
"return",
"a",
"new",
"session",
"identifier",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/application/viewstate/SessionIdGenerator.java#L137-L182 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/matchspace/impl/MatchCache.java | MatchCache.containsKey | public boolean containsKey(Object key) {
FastHashtableEntry tab[] = table;
int hash = key.hashCode();
int index = (hash & 0x7FFFFFFF) % tab.length;
for (FastHashtableEntry e = tab[index] ; e != null ; e = e.next) {
if ((e.hash == hash) && e.key.equals(key)) {
return true;
}
}
... | java | public boolean containsKey(Object key) {
FastHashtableEntry tab[] = table;
int hash = key.hashCode();
int index = (hash & 0x7FFFFFFF) % tab.length;
for (FastHashtableEntry e = tab[index] ; e != null ; e = e.next) {
if ((e.hash == hash) && e.key.equals(key)) {
return true;
}
}
... | [
"public",
"boolean",
"containsKey",
"(",
"Object",
"key",
")",
"{",
"FastHashtableEntry",
"tab",
"[",
"]",
"=",
"table",
";",
"int",
"hash",
"=",
"key",
".",
"hashCode",
"(",
")",
";",
"int",
"index",
"=",
"(",
"hash",
"&",
"0x7FFFFFFF",
")",
"%",
"t... | Tests if the specified object is a key in this hashtable.
@param key possible key.
@return <code>true</code> if the specified object is a key in this
hashtable; <code>false</code> otherwise.
@see java.util.Hashtable#contains(java.lang.Object)
@since JDK1.0 | [
"Tests",
"if",
"the",
"specified",
"object",
"is",
"a",
"key",
"in",
"this",
"hashtable",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/matchspace/impl/MatchCache.java#L269-L279 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/matchspace/impl/MatchCache.java | MatchCache.ableToFilter | private boolean ableToFilter() {
if (filter == null)
return false;
for (int i = table.length; i-- > 0 ;) {
FastHashtableEntry newContents = null, next = null;
for (FastHashtableEntry e = table[i] ; e != null ; e = next) {
next = e.next;
if (filter.shouldRetain(e.key, e.value)) ... | java | private boolean ableToFilter() {
if (filter == null)
return false;
for (int i = table.length; i-- > 0 ;) {
FastHashtableEntry newContents = null, next = null;
for (FastHashtableEntry e = table[i] ; e != null ; e = next) {
next = e.next;
if (filter.shouldRetain(e.key, e.value)) ... | [
"private",
"boolean",
"ableToFilter",
"(",
")",
"{",
"if",
"(",
"filter",
"==",
"null",
")",
"return",
"false",
";",
"for",
"(",
"int",
"i",
"=",
"table",
".",
"length",
";",
"i",
"--",
">",
"0",
";",
")",
"{",
"FastHashtableEntry",
"newContents",
"=... | Avoids the need to rehash when some entries can be "filtered" out of the Hashtable by
an upcall to a separate decision routine.
@return true if filtering was able to reduce the size of the Hashtable sufficiently,
false if rehashing will be needed after all. | [
"Avoids",
"the",
"need",
"to",
"rehash",
"when",
"some",
"entries",
"can",
"be",
"filtered",
"out",
"of",
"the",
"Hashtable",
"by",
"an",
"upcall",
"to",
"a",
"separate",
"decision",
"routine",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/matchspace/impl/MatchCache.java#L340-L357 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/matchspace/impl/MatchCache.java | MatchCache.readObject | private void readObject(java.io.ObjectInputStream s)
throws IOException, ClassNotFoundException
{
// Read in the length, threshold, and loadfactor
s.defaultReadObject();
// Read the original length of the array and number of elements
int origlength = s.readInt();
int elements = s.readInt(... | java | private void readObject(java.io.ObjectInputStream s)
throws IOException, ClassNotFoundException
{
// Read in the length, threshold, and loadfactor
s.defaultReadObject();
// Read the original length of the array and number of elements
int origlength = s.readInt();
int elements = s.readInt(... | [
"private",
"void",
"readObject",
"(",
"java",
".",
"io",
".",
"ObjectInputStream",
"s",
")",
"throws",
"IOException",
",",
"ClassNotFoundException",
"{",
"// Read in the length, threshold, and loadfactor",
"s",
".",
"defaultReadObject",
"(",
")",
";",
"// Read the origi... | readObject is called to restore the state of the hashtable from
a stream. Only the keys and values are serialized since the
hash values may be different when the contents are restored.
Read count elements and insert into the hashtable. | [
"readObject",
"is",
"called",
"to",
"restore",
"the",
"state",
"of",
"the",
"hashtable",
"from",
"a",
"stream",
".",
"Only",
"the",
"keys",
"and",
"values",
"are",
"serialized",
"since",
"the",
"hash",
"values",
"may",
"be",
"different",
"when",
"the",
"co... | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/matchspace/impl/MatchCache.java#L628-L657 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.channel.ssl/src/com/ibm/ws/channel/ssl/internal/SSLChannelData.java | SSLChannelData.getBooleanProperty | public boolean getBooleanProperty(String propertyName) {
boolean booleanValue = false;
// Pull the key from the property map
Object objectValue = this.properties.get(propertyName);
if (objectValue != null) {
if (objectValue instanceof Boolean) {
booleanValue ... | java | public boolean getBooleanProperty(String propertyName) {
boolean booleanValue = false;
// Pull the key from the property map
Object objectValue = this.properties.get(propertyName);
if (objectValue != null) {
if (objectValue instanceof Boolean) {
booleanValue ... | [
"public",
"boolean",
"getBooleanProperty",
"(",
"String",
"propertyName",
")",
"{",
"boolean",
"booleanValue",
"=",
"false",
";",
"// Pull the key from the property map",
"Object",
"objectValue",
"=",
"this",
".",
"properties",
".",
"get",
"(",
"propertyName",
")",
... | Query the boolean property value of the input name.
@param propertyName
@return boolean | [
"Query",
"the",
"boolean",
"property",
"value",
"of",
"the",
"input",
"name",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.channel.ssl/src/com/ibm/ws/channel/ssl/internal/SSLChannelData.java#L272-L285 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.channel.ssl/src/com/ibm/ws/channel/ssl/internal/SSLChannelData.java | SSLChannelData.getStringProperty | public String getStringProperty(String propertyName) {
Object value = this.properties.get(propertyName);
if (null != value && value instanceof String) {
return (String) value;
}
return null;
} | java | public String getStringProperty(String propertyName) {
Object value = this.properties.get(propertyName);
if (null != value && value instanceof String) {
return (String) value;
}
return null;
} | [
"public",
"String",
"getStringProperty",
"(",
"String",
"propertyName",
")",
"{",
"Object",
"value",
"=",
"this",
".",
"properties",
".",
"get",
"(",
"propertyName",
")",
";",
"if",
"(",
"null",
"!=",
"value",
"&&",
"value",
"instanceof",
"String",
")",
"{... | Query the properties for the input name, the value will be null if not
found or was not a String object.
@param propertyName
@return String | [
"Query",
"the",
"properties",
"for",
"the",
"input",
"name",
"the",
"value",
"will",
"be",
"null",
"if",
"not",
"found",
"or",
"was",
"not",
"a",
"String",
"object",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.channel.ssl/src/com/ibm/ws/channel/ssl/internal/SSLChannelData.java#L294-L300 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.channel.ssl/src/com/ibm/ws/channel/ssl/internal/SSLChannelData.java | SSLChannelData.getBooleanProperty | private boolean getBooleanProperty(String key, String defaultValue, StringBuilder errors) {
boolean booleanValue = false;
String stringValue = null;
boolean valueCorrect = false;
// Pull the key from the property map
Object objectValue = this.properties.get(key);
if (obj... | java | private boolean getBooleanProperty(String key, String defaultValue, StringBuilder errors) {
boolean booleanValue = false;
String stringValue = null;
boolean valueCorrect = false;
// Pull the key from the property map
Object objectValue = this.properties.get(key);
if (obj... | [
"private",
"boolean",
"getBooleanProperty",
"(",
"String",
"key",
",",
"String",
"defaultValue",
",",
"StringBuilder",
"errors",
")",
"{",
"boolean",
"booleanValue",
"=",
"false",
";",
"String",
"stringValue",
"=",
"null",
";",
"boolean",
"valueCorrect",
"=",
"f... | Extract String value from property list and convert to boolean.
@param key key to look up in the property map
@param defaultValue used if keynot found in map.
@param errors list of error string accumulating from reading invalid properties
@return value found for key in property map | [
"Extract",
"String",
"value",
"from",
"property",
"list",
"and",
"convert",
"to",
"boolean",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.channel.ssl/src/com/ibm/ws/channel/ssl/internal/SSLChannelData.java#L320-L376 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.channel.ssl/src/com/ibm/ws/channel/ssl/internal/SSLChannelData.java | SSLChannelData.getIntProperty | private int getIntProperty(String key, boolean defaultProvided, int defaultValue, StringBuilder errors) {
String value = getStringProperty(key);
if (null != value) {
try {
int realValue = Integer.parseInt(value);
if (TraceComponent.isAnyTracingEnabled() && tc.... | java | private int getIntProperty(String key, boolean defaultProvided, int defaultValue, StringBuilder errors) {
String value = getStringProperty(key);
if (null != value) {
try {
int realValue = Integer.parseInt(value);
if (TraceComponent.isAnyTracingEnabled() && tc.... | [
"private",
"int",
"getIntProperty",
"(",
"String",
"key",
",",
"boolean",
"defaultProvided",
",",
"int",
"defaultValue",
",",
"StringBuilder",
"errors",
")",
"{",
"String",
"value",
"=",
"getStringProperty",
"(",
"key",
")",
";",
"if",
"(",
"null",
"!=",
"va... | Extract an integer property from the stored values. This might use a
default value if provided and the property was not found.
@param key
@param defaultProvided
@param defaultValue
@param errors
@return int | [
"Extract",
"an",
"integer",
"property",
"from",
"the",
"stored",
"values",
".",
"This",
"might",
"use",
"a",
"default",
"value",
"if",
"provided",
"and",
"the",
"property",
"was",
"not",
"found",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.channel.ssl/src/com/ibm/ws/channel/ssl/internal/SSLChannelData.java#L388-L417 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.msgstore/src/com/ibm/ws/sib/msgstore/list/ReadWriteLock.java | ReadWriteLock.lockExclusive | public synchronized void lockExclusive()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "lockExclusive", this);
boolean interrupted = false;
// If another thread is attempting to lock exclusive,
// wait for it to finish first.
while... | java | public synchronized void lockExclusive()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "lockExclusive", this);
boolean interrupted = false;
// If another thread is attempting to lock exclusive,
// wait for it to finish first.
while... | [
"public",
"synchronized",
"void",
"lockExclusive",
"(",
")",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"SibTr",
".",
"entry",
"(",
"this",
",",
"tc",
",",
"\"lockExclusive\"",
... | This method locks the mutex so no other lockers can get the lock. | [
"This",
"method",
"locks",
"the",
"mutex",
"so",
"no",
"other",
"lockers",
"can",
"get",
"the",
"lock",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.msgstore/src/com/ibm/ws/sib/msgstore/list/ReadWriteLock.java#L158-L201 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/BeanMetaData.java | BeanMetaData.getLocalBusinessInterfaceIndex | public int getLocalBusinessInterfaceIndex(String interfaceName) {
if (ivBusinessLocalInterfaceClasses != null) {
for (int i = 0; i < ivBusinessLocalInterfaceClasses.length; i++) {
String bInterfaceName = ivBusinessLocalInterfaceClasses[i].getName();
if (bInterfaceName... | java | public int getLocalBusinessInterfaceIndex(String interfaceName) {
if (ivBusinessLocalInterfaceClasses != null) {
for (int i = 0; i < ivBusinessLocalInterfaceClasses.length; i++) {
String bInterfaceName = ivBusinessLocalInterfaceClasses[i].getName();
if (bInterfaceName... | [
"public",
"int",
"getLocalBusinessInterfaceIndex",
"(",
"String",
"interfaceName",
")",
"{",
"if",
"(",
"ivBusinessLocalInterfaceClasses",
"!=",
"null",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"ivBusinessLocalInterfaceClasses",
".",
"length",
... | Gets the index of the local business interface.
@param interfaceName the interface to find the index of
@return the index of the interface passed in | [
"Gets",
"the",
"index",
"of",
"the",
"local",
"business",
"interface",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/BeanMetaData.java#L1278-L1292 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/BeanMetaData.java | BeanMetaData.getRequiredLocalBusinessInterfaceIndex | public int getRequiredLocalBusinessInterfaceIndex(String interfaceName) throws IllegalStateException {
int interfaceIndex = getLocalBusinessInterfaceIndex(interfaceName);
if (interfaceIndex == -1) {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
Tr.debug(tc... | java | public int getRequiredLocalBusinessInterfaceIndex(String interfaceName) throws IllegalStateException {
int interfaceIndex = getLocalBusinessInterfaceIndex(interfaceName);
if (interfaceIndex == -1) {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
Tr.debug(tc... | [
"public",
"int",
"getRequiredLocalBusinessInterfaceIndex",
"(",
"String",
"interfaceName",
")",
"throws",
"IllegalStateException",
"{",
"int",
"interfaceIndex",
"=",
"getLocalBusinessInterfaceIndex",
"(",
"interfaceName",
")",
";",
"if",
"(",
"interfaceIndex",
"==",
"-",
... | Gets the index of the local busines interface. This method will throw an
IllegalStateException if a local interface could not be matched. If it is
known that a match must occur on a local business interface, then this
method should be used.
@param interfaceName the interface to find a match on
@return the index of the... | [
"Gets",
"the",
"index",
"of",
"the",
"local",
"busines",
"interface",
".",
"This",
"method",
"will",
"throw",
"an",
"IllegalStateException",
"if",
"a",
"local",
"interface",
"could",
"not",
"be",
"matched",
".",
"If",
"it",
"is",
"known",
"that",
"a",
"mat... | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/BeanMetaData.java#L1333-L1346 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/BeanMetaData.java | BeanMetaData.getRemoteBusinessInterfaceIndex | public int getRemoteBusinessInterfaceIndex(String interfaceName) {
if (ivBusinessRemoteInterfaceClasses != null) {
for (int i = 0; i < ivBusinessRemoteInterfaceClasses.length; i++) {
String bInterface = ivBusinessRemoteInterfaceClasses[i].getName();
if (bInterface.equ... | java | public int getRemoteBusinessInterfaceIndex(String interfaceName) {
if (ivBusinessRemoteInterfaceClasses != null) {
for (int i = 0; i < ivBusinessRemoteInterfaceClasses.length; i++) {
String bInterface = ivBusinessRemoteInterfaceClasses[i].getName();
if (bInterface.equ... | [
"public",
"int",
"getRemoteBusinessInterfaceIndex",
"(",
"String",
"interfaceName",
")",
"{",
"if",
"(",
"ivBusinessRemoteInterfaceClasses",
"!=",
"null",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"ivBusinessRemoteInterfaceClasses",
".",
"length",... | Gets the index of the remote business interface.
@param interfaceName the interface to find the index of
@return the index of the interface passed in | [
"Gets",
"the",
"index",
"of",
"the",
"remote",
"business",
"interface",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/BeanMetaData.java#L1400-L1414 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/BeanMetaData.java | BeanMetaData.getRequiredRemoteBusinessInterfaceIndex | public int getRequiredRemoteBusinessInterfaceIndex(String interfaceName) throws IllegalStateException {
int interfaceIndex = getRemoteBusinessInterfaceIndex(interfaceName);
if (interfaceIndex == -1) {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
Tr.debug(... | java | public int getRequiredRemoteBusinessInterfaceIndex(String interfaceName) throws IllegalStateException {
int interfaceIndex = getRemoteBusinessInterfaceIndex(interfaceName);
if (interfaceIndex == -1) {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
Tr.debug(... | [
"public",
"int",
"getRequiredRemoteBusinessInterfaceIndex",
"(",
"String",
"interfaceName",
")",
"throws",
"IllegalStateException",
"{",
"int",
"interfaceIndex",
"=",
"getRemoteBusinessInterfaceIndex",
"(",
"interfaceName",
")",
";",
"if",
"(",
"interfaceIndex",
"==",
"-"... | Gets the index of the remote busines interface. This method will throw an
IllegalStateException if a remte interface could not be matched. If it is
known that a match must occur on a remote business interface, then this
method should be used.
@param interfaceName the interface to find a match on
@return the index of t... | [
"Gets",
"the",
"index",
"of",
"the",
"remote",
"busines",
"interface",
".",
"This",
"method",
"will",
"throw",
"an",
"IllegalStateException",
"if",
"a",
"remte",
"interface",
"could",
"not",
"be",
"matched",
".",
"If",
"it",
"is",
"known",
"that",
"a",
"ma... | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/BeanMetaData.java#L1455-L1468 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/BeanMetaData.java | BeanMetaData.getMethodLevelCustomFinderMethodSignatures | public String[][] getMethodLevelCustomFinderMethodSignatures(String cfprocessstring) {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
Tr.entry(tc, "getMethodLevelCustomFinderMethodSignatures:" + cfprocessstring);
StringTokenizer st = new StringTokenizer(cfprocessstring, ":... | java | public String[][] getMethodLevelCustomFinderMethodSignatures(String cfprocessstring) {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
Tr.entry(tc, "getMethodLevelCustomFinderMethodSignatures:" + cfprocessstring);
StringTokenizer st = new StringTokenizer(cfprocessstring, ":... | [
"public",
"String",
"[",
"]",
"[",
"]",
"getMethodLevelCustomFinderMethodSignatures",
"(",
"String",
"cfprocessstring",
")",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"Tr",
".",
"e... | d112604.1 | [
"d112604",
".",
"1"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/BeanMetaData.java#L2528-L2570 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/impl/JsMessageImpl.java | JsMessageImpl.transcribeToJmf | public JsMessage transcribeToJmf() throws MessageCopyFailedException
, IncorrectMessageTypeException
, UnsupportedEncodingException {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "transcribe... | java | public JsMessage transcribeToJmf() throws MessageCopyFailedException
, IncorrectMessageTypeException
, UnsupportedEncodingException {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "transcribe... | [
"public",
"JsMessage",
"transcribeToJmf",
"(",
")",
"throws",
"MessageCopyFailedException",
",",
"IncorrectMessageTypeException",
",",
"UnsupportedEncodingException",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled"... | Transcribe this message to pure JMF
Javadoc description supplied by JsMessage interface. | [
"Transcribe",
"this",
"message",
"to",
"pure",
"JMF"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/impl/JsMessageImpl.java#L457-L500 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/impl/JsMessageImpl.java | JsMessageImpl.getApproximateLength | public int getApproximateLength() {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "getApproximateLength");
if (approxLength == -1) approxLength = guessApproxLength();
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "getApproxim... | java | public int getApproximateLength() {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "getApproximateLength");
if (approxLength == -1) approxLength = guessApproxLength();
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "getApproxim... | [
"public",
"int",
"getApproximateLength",
"(",
")",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"SibTr",
".",
"entry",
"(",
"this",
",",
"tc",
",",
"\"getApproximateLength\"",
")",
... | Return an approximate size for the flattened message. It is important that
this method is quick and cheap, rather than highly accurate.
Javadoc description supplied by JsMessage interface. | [
"Return",
"an",
"approximate",
"size",
"for",
"the",
"flattened",
"message",
".",
"It",
"is",
"important",
"that",
"this",
"method",
"is",
"quick",
"and",
"cheap",
"rather",
"than",
"highly",
"accurate",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/impl/JsMessageImpl.java#L583-L590 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/impl/JsMessageImpl.java | JsMessageImpl.createNew | private final JsMessageImpl createNew() throws MessageCopyFailedException {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "createNew");
JsMessageImpl newMsg = null;
Class msgClass = this.getClass();
try {
/* Create the new JsMessage*/
newMsg = (JsMe... | java | private final JsMessageImpl createNew() throws MessageCopyFailedException {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "createNew");
JsMessageImpl newMsg = null;
Class msgClass = this.getClass();
try {
/* Create the new JsMessage*/
newMsg = (JsMe... | [
"private",
"final",
"JsMessageImpl",
"createNew",
"(",
")",
"throws",
"MessageCopyFailedException",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"SibTr",
".",
"entry",
"(",
"this",
",... | Return a new Jsmessage, of the same specialization as this, containing the
given JsMsgObject.
@param newJmo The JsMsgObject the new JsMessage will contain.
@return JsMessage A new JsMessage instance of the appropriate specialization.
@exception MessageCopyFailedException A MessageCopyFailedException is thrown if
ei... | [
"Return",
"a",
"new",
"Jsmessage",
"of",
"the",
"same",
"specialization",
"as",
"this",
"containing",
"the",
"given",
"JsMsgObject",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/impl/JsMessageImpl.java#L871-L900 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/impl/JsMessageImpl.java | JsMessageImpl.createNewGeneralized | private final JsMessageImpl createNewGeneralized(JsMsgObject newJmo) {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "createNewGeneralized");
JsMessageImpl newMsg = null;
/* Now create the new JsMessage */
newMsg = new JsMessageImpl(newJmo);
if (TraceCompo... | java | private final JsMessageImpl createNewGeneralized(JsMsgObject newJmo) {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "createNewGeneralized");
JsMessageImpl newMsg = null;
/* Now create the new JsMessage */
newMsg = new JsMessageImpl(newJmo);
if (TraceCompo... | [
"private",
"final",
"JsMessageImpl",
"createNewGeneralized",
"(",
"JsMsgObject",
"newJmo",
")",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"SibTr",
".",
"entry",
"(",
"this",
",",
... | Return a new JsMessage, generalizing the message to just be a JsMessageImpl.
The new message contains the given JsMsgObject.
@param newJmo The JsMsgObject the new JsMessage will contain.
@return JsMessage A new JsMessage instance at the JsMessageImpl specialization. | [
"Return",
"a",
"new",
"JsMessage",
"generalizing",
"the",
"message",
"to",
"just",
"be",
"a",
"JsMessageImpl",
".",
"The",
"new",
"message",
"contains",
"the",
"given",
"JsMsgObject",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/impl/JsMessageImpl.java#L910-L919 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.webcontainer/src/com/ibm/ws/webcontainer/servlet/RequestUtils.java | RequestUtils.parsePostData | @SuppressWarnings("rawtypes")
public static Hashtable parsePostData(ServletInputStream in, String encoding, boolean multireadPropertyEnabled) /* 157338 add throws */ throws IOException
{
int inputLen;
byte[] postedBytes = null;
String postedBody;
if (com.ibm.ejs.ras.TraceComponen... | java | @SuppressWarnings("rawtypes")
public static Hashtable parsePostData(ServletInputStream in, String encoding, boolean multireadPropertyEnabled) /* 157338 add throws */ throws IOException
{
int inputLen;
byte[] postedBytes = null;
String postedBody;
if (com.ibm.ejs.ras.TraceComponen... | [
"@",
"SuppressWarnings",
"(",
"\"rawtypes\"",
")",
"public",
"static",
"Hashtable",
"parsePostData",
"(",
"ServletInputStream",
"in",
",",
"String",
"encoding",
",",
"boolean",
"multireadPropertyEnabled",
")",
"/* 157338 add throws */",
"throws",
"IOException",
"{",
"in... | begin 231634 Support posts with query parms in chunked body WAS.webcontainer | [
"begin",
"231634",
"Support",
"posts",
"with",
"query",
"parms",
"in",
"chunked",
"body",
"WAS",
".",
"webcontainer"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webcontainer/src/com/ibm/ws/webcontainer/servlet/RequestUtils.java#L349-L423 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/ItemStream.java | ItemStream.findOldestItem | public final Item findOldestItem() throws MessageStoreException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "findOldestItem");
ItemCollection ic = ((ItemCollection) _getMembership());
if (null == ic)
{
if (TraceCom... | java | public final Item findOldestItem() throws MessageStoreException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "findOldestItem");
ItemCollection ic = ((ItemCollection) _getMembership());
if (null == ic)
{
if (TraceCom... | [
"public",
"final",
"Item",
"findOldestItem",
"(",
")",
"throws",
"MessageStoreException",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"SibTr",
".",
"entry",
"(",
"this",
",",
"tc",... | Find the item that has been known to the stream for longest. The item returned
may be in any of the states defined in the state model. The caller should not
assume that the item can be used for any particular purpose.
@return Item may be null.
@throws {@link MessageStoreException} if the item was spilled and could not... | [
"Find",
"the",
"item",
"that",
"has",
"been",
"known",
"to",
"the",
"stream",
"for",
"longest",
".",
"The",
"item",
"returned",
"may",
"be",
"in",
"any",
"of",
"the",
"states",
"defined",
"in",
"the",
"state",
"model",
".",
"The",
"caller",
"should",
"... | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/ItemStream.java#L442-L463 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.channelfw/src/com/ibm/ws/tcpchannel/internal/TCPBaseRequestContext.java | TCPBaseRequestContext.abort | protected void abort() {
if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
Tr.event(tc, "Aborting connection");
}
this.aborted = true;
} | java | protected void abort() {
if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
Tr.event(tc, "Aborting connection");
}
this.aborted = true;
} | [
"protected",
"void",
"abort",
"(",
")",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEventEnabled",
"(",
")",
")",
"{",
"Tr",
".",
"event",
"(",
"tc",
",",
"\"Aborting connection\"",
")",
";",
"}",
"this",
... | Abort this context to trigger immediate exceptions on future IO requests. | [
"Abort",
"this",
"context",
"to",
"trigger",
"immediate",
"exceptions",
"on",
"future",
"IO",
"requests",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.channelfw/src/com/ibm/ws/tcpchannel/internal/TCPBaseRequestContext.java#L92-L97 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.channelfw/src/com/ibm/ws/tcpchannel/internal/TCPBaseRequestContext.java | TCPBaseRequestContext.setTimeoutTime | protected void setTimeoutTime(int time) {
int timeout = time;
if (timeout == TCPRequestContext.NO_TIMEOUT) {
this.timeoutTime = TCPRequestContext.NO_TIMEOUT;
this.timeoutInterval = 0;
} else {
if (timeout == TCPRequestContext.USE_CHANNEL_TIMEOUT) {
... | java | protected void setTimeoutTime(int time) {
int timeout = time;
if (timeout == TCPRequestContext.NO_TIMEOUT) {
this.timeoutTime = TCPRequestContext.NO_TIMEOUT;
this.timeoutInterval = 0;
} else {
if (timeout == TCPRequestContext.USE_CHANNEL_TIMEOUT) {
... | [
"protected",
"void",
"setTimeoutTime",
"(",
"int",
"time",
")",
"{",
"int",
"timeout",
"=",
"time",
";",
"if",
"(",
"timeout",
"==",
"TCPRequestContext",
".",
"NO_TIMEOUT",
")",
"{",
"this",
".",
"timeoutTime",
"=",
"TCPRequestContext",
".",
"NO_TIMEOUT",
";... | Sets the timeout value returned by 'getTimeoutTime'.
@param time | [
"Sets",
"the",
"timeout",
"value",
"returned",
"by",
"getTimeoutTime",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.channelfw/src/com/ibm/ws/tcpchannel/internal/TCPBaseRequestContext.java#L405-L422 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.