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.ws.messaging.runtime/src/com/ibm/ws/sib/matchspace/selector/impl/ParseUtil.java | ParseUtil.convertRange | static Selector convertRange(Selector expr, Selector bound1, Selector bound2) {
return new OperatorImpl(Operator.AND,
new OperatorImpl(Operator.GE, (Selector) expr.clone(), bound1),
new OperatorImpl(Operator.LE, (Selector) expr.clone(), bound2));
} | java | static Selector convertRange(Selector expr, Selector bound1, Selector bound2) {
return new OperatorImpl(Operator.AND,
new OperatorImpl(Operator.GE, (Selector) expr.clone(), bound1),
new OperatorImpl(Operator.LE, (Selector) expr.clone(), bound2));
} | [
"static",
"Selector",
"convertRange",
"(",
"Selector",
"expr",
",",
"Selector",
"bound1",
",",
"Selector",
"bound2",
")",
"{",
"return",
"new",
"OperatorImpl",
"(",
"Operator",
".",
"AND",
",",
"new",
"OperatorImpl",
"(",
"Operator",
".",
"GE",
",",
"(",
"... | Convert a partially parsed BETWEEN expression into its more primitive form as a
conjunction of inequalities.
@param expr the expression whose range is being tested
@param bound1 the lower bound
@param bound2 the upper bound
@return a Selector representing the BETWEEN expression its more primitive form | [
"Convert",
"a",
"partially",
"parsed",
"BETWEEN",
"expression",
"into",
"its",
"more",
"primitive",
"form",
"as",
"a",
"conjunction",
"of",
"inequalities",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/matchspace/selector/impl/ParseUtil.java#L124-L128 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/matchspace/selector/impl/ParseUtil.java | ParseUtil.convertLike | static Selector convertLike(Selector arg, String pattern, String escape) {
try
{
pattern = reduceStringLiteralToken(pattern);
boolean escaped = false;
char esc = 0;
if (escape != null) {
escape = reduceStringLiteralToken(escape);
if (escape.length() != 1)
return... | java | static Selector convertLike(Selector arg, String pattern, String escape) {
try
{
pattern = reduceStringLiteralToken(pattern);
boolean escaped = false;
char esc = 0;
if (escape != null) {
escape = reduceStringLiteralToken(escape);
if (escape.length() != 1)
return... | [
"static",
"Selector",
"convertLike",
"(",
"Selector",
"arg",
",",
"String",
"pattern",
",",
"String",
"escape",
")",
"{",
"try",
"{",
"pattern",
"=",
"reduceStringLiteralToken",
"(",
"pattern",
")",
";",
"boolean",
"escaped",
"=",
"false",
";",
"char",
"esc"... | Convert a partially parsed LIKE expression, in which the pattern and escape are
in the form of token images, to the proper Selector expression to represent
the LIKE expression
@param arg the argument of the like
@param pattern the pattern image (still containing leading and trailing ')
@param escape the escape (still c... | [
"Convert",
"a",
"partially",
"parsed",
"LIKE",
"expression",
"in",
"which",
"the",
"pattern",
"and",
"escape",
"are",
"in",
"the",
"form",
"of",
"token",
"images",
"to",
"the",
"proper",
"Selector",
"expression",
"to",
"represent",
"the",
"LIKE",
"expression"
... | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/matchspace/selector/impl/ParseUtil.java#L139-L167 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.webcontainer.security.admin/src/com/ibm/ws/webcontainer/security/admin/internal/WebAdminSecurityCollaboratorImpl.java | WebAdminSecurityCollaboratorImpl.getSecurityMetadata | @Override
public SecurityMetadata getSecurityMetadata() {
SecurityMetadata sm = super.getSecurityMetadata();
if (sm == null) {
return getDefaultAdminSecurityMetadata();
} else {
return sm;
}
} | java | @Override
public SecurityMetadata getSecurityMetadata() {
SecurityMetadata sm = super.getSecurityMetadata();
if (sm == null) {
return getDefaultAdminSecurityMetadata();
} else {
return sm;
}
} | [
"@",
"Override",
"public",
"SecurityMetadata",
"getSecurityMetadata",
"(",
")",
"{",
"SecurityMetadata",
"sm",
"=",
"super",
".",
"getSecurityMetadata",
"(",
")",
";",
"if",
"(",
"sm",
"==",
"null",
")",
"{",
"return",
"getDefaultAdminSecurityMetadata",
"(",
")"... | Get the effective SecurityMetadata for this application.
First, try to defer to the application collaborator to see if the application
provides data. If so, use it. Otherwise, fallback to the default SecurityMetadata.
{@inheritDoc} | [
"Get",
"the",
"effective",
"SecurityMetadata",
"for",
"this",
"application",
".",
"First",
"try",
"to",
"defer",
"to",
"the",
"application",
"collaborator",
"to",
"see",
"if",
"the",
"application",
"provides",
"data",
".",
"If",
"so",
"use",
"it",
".",
"Othe... | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webcontainer.security.admin/src/com/ibm/ws/webcontainer/security/admin/internal/WebAdminSecurityCollaboratorImpl.java#L128-L136 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.security.csiv2.common/src/com/ibm/ws/transport/iiop/security/ServerSecurityInterceptor.java | ServerSecurityInterceptor.buildPolicyErrorMessage | private void buildPolicyErrorMessage(String msgKey, String defaultMessage, Object... arg1) {
/* The message need to be logged only for level below 'Warning' */
if (TraceComponent.isAnyTracingEnabled() && tc.isWarningEnabled()) {
String messageFromBundle = Tr.formatMessage(tc, msgKey, arg1);
... | java | private void buildPolicyErrorMessage(String msgKey, String defaultMessage, Object... arg1) {
/* The message need to be logged only for level below 'Warning' */
if (TraceComponent.isAnyTracingEnabled() && tc.isWarningEnabled()) {
String messageFromBundle = Tr.formatMessage(tc, msgKey, arg1);
... | [
"private",
"void",
"buildPolicyErrorMessage",
"(",
"String",
"msgKey",
",",
"String",
"defaultMessage",
",",
"Object",
"...",
"arg1",
")",
"{",
"/* The message need to be logged only for level below 'Warning' */",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"("... | Receives the message key like "CSIv2_COMMON_AUTH_LAYER_DISABLED"
from this key we extract the message from the NLS message bundle
which contains the message along with the CWWKS message code.
Example:
CSIv2_CLIENT_POLICY_DOESNT_EXIST_FAILED=CWWKS9568E: The client security policy does not exist.
@param msgCode | [
"Receives",
"the",
"message",
"key",
"like",
"CSIv2_COMMON_AUTH_LAYER_DISABLED",
"from",
"this",
"key",
"we",
"extract",
"the",
"message",
"from",
"the",
"NLS",
"message",
"bundle",
"which",
"contains",
"the",
"message",
"along",
"with",
"the",
"CWWKS",
"message",... | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.csiv2.common/src/com/ibm/ws/transport/iiop/security/ServerSecurityInterceptor.java#L340-L346 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.security.social/src/com/ibm/ws/security/social/web/SelectionPageGenerator.java | SelectionPageGenerator.displaySelectionPage | public void displaySelectionPage(HttpServletRequest request, HttpServletResponse response, SocialTaiRequest socialTaiRequest) throws IOException {
setRequestAndConfigInformation(request, response, socialTaiRequest);
if (selectableConfigs == null || selectableConfigs.isEmpty()) {
sendDisplayE... | java | public void displaySelectionPage(HttpServletRequest request, HttpServletResponse response, SocialTaiRequest socialTaiRequest) throws IOException {
setRequestAndConfigInformation(request, response, socialTaiRequest);
if (selectableConfigs == null || selectableConfigs.isEmpty()) {
sendDisplayE... | [
"public",
"void",
"displaySelectionPage",
"(",
"HttpServletRequest",
"request",
",",
"HttpServletResponse",
"response",
",",
"SocialTaiRequest",
"socialTaiRequest",
")",
"throws",
"IOException",
"{",
"setRequestAndConfigInformation",
"(",
"request",
",",
"response",
",",
... | Generates the sign in page to allow a user to select from the configured social login services. If no services are
configured, the user is redirected to an error page.
@param request
@param response
@param socialTaiRequest
@throws IOException | [
"Generates",
"the",
"sign",
"in",
"page",
"to",
"allow",
"a",
"user",
"to",
"select",
"from",
"the",
"configured",
"social",
"login",
"services",
".",
"If",
"no",
"services",
"are",
"configured",
"the",
"user",
"is",
"redirected",
"to",
"an",
"error",
"pag... | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.social/src/com/ibm/ws/security/social/web/SelectionPageGenerator.java#L89-L96 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.security.social/src/com/ibm/ws/security/social/web/SelectionPageGenerator.java | SelectionPageGenerator.createJavascript | String createJavascript() {
StringBuilder html = new StringBuilder();
html.append("<script>\n");
html.append("function " + createCookieFunctionName + "(value) {\n");
html.append("document.cookie = \"" + ClientConstants.LOGIN_HINT + "=\" + value;\n");
html.append("}\n");
h... | java | String createJavascript() {
StringBuilder html = new StringBuilder();
html.append("<script>\n");
html.append("function " + createCookieFunctionName + "(value) {\n");
html.append("document.cookie = \"" + ClientConstants.LOGIN_HINT + "=\" + value;\n");
html.append("}\n");
h... | [
"String",
"createJavascript",
"(",
")",
"{",
"StringBuilder",
"html",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"html",
".",
"append",
"(",
"\"<script>\\n\"",
")",
";",
"html",
".",
"append",
"(",
"\"function \"",
"+",
"createCookieFunctionName",
"+",
"\"(va... | Creates a JavaScript function for creating a social_login_hint cookie with the value provided to the function. Each
provider button should be configured to call this function when the button is clicked, allowing the login hint to be passed
around in a cookie instead of a request parameter. | [
"Creates",
"a",
"JavaScript",
"function",
"for",
"creating",
"a",
"social_login_hint",
"cookie",
"with",
"the",
"value",
"provided",
"to",
"the",
"function",
".",
"Each",
"provider",
"button",
"should",
"be",
"configured",
"to",
"call",
"this",
"function",
"when... | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.social/src/com/ibm/ws/security/social/web/SelectionPageGenerator.java#L268-L276 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/internal/GenericMessageImpl.java | GenericMessageImpl.parseMessage | public boolean parseMessage(WsByteBuffer buffer, boolean bExtractValue) throws Exception {
final boolean bTrace = TraceComponent.isAnyTracingEnabled();
boolean rc = false;
if (!isFirstLineComplete()) {
if (bTrace && tc.isDebugEnabled()) {
Tr.debug(tc, "Parsing First L... | java | public boolean parseMessage(WsByteBuffer buffer, boolean bExtractValue) throws Exception {
final boolean bTrace = TraceComponent.isAnyTracingEnabled();
boolean rc = false;
if (!isFirstLineComplete()) {
if (bTrace && tc.isDebugEnabled()) {
Tr.debug(tc, "Parsing First L... | [
"public",
"boolean",
"parseMessage",
"(",
"WsByteBuffer",
"buffer",
",",
"boolean",
"bExtractValue",
")",
"throws",
"Exception",
"{",
"final",
"boolean",
"bTrace",
"=",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
";",
"boolean",
"rc",
"=",
"false",
"... | Parse a message from the input buffer. The input flag is whether or not
to save the header value immediately or delay the extraction until the
header value is queried.
@param buffer
@param bExtractValue
@return boolean (true means parsed entire message)
@throws Exception | [
"Parse",
"a",
"message",
"from",
"the",
"input",
"buffer",
".",
"The",
"input",
"flag",
"is",
"whether",
"or",
"not",
"to",
"save",
"the",
"header",
"value",
"immediately",
"or",
"delay",
"the",
"extraction",
"until",
"the",
"header",
"value",
"is",
"queri... | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/internal/GenericMessageImpl.java#L328-L349 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/internal/GenericMessageImpl.java | GenericMessageImpl.marshallMessage | public WsByteBuffer[] marshallMessage() throws MessageSentException {
final boolean bTrace = TraceComponent.isAnyTracingEnabled();
if (bTrace && tc.isEntryEnabled()) {
Tr.entry(tc, "marshallMessage");
}
preMarshallMessage();
WsByteBuffer[] marshalledObj = hasFirstLin... | java | public WsByteBuffer[] marshallMessage() throws MessageSentException {
final boolean bTrace = TraceComponent.isAnyTracingEnabled();
if (bTrace && tc.isEntryEnabled()) {
Tr.entry(tc, "marshallMessage");
}
preMarshallMessage();
WsByteBuffer[] marshalledObj = hasFirstLin... | [
"public",
"WsByteBuffer",
"[",
"]",
"marshallMessage",
"(",
")",
"throws",
"MessageSentException",
"{",
"final",
"boolean",
"bTrace",
"=",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
";",
"if",
"(",
"bTrace",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
... | Marshall a message.
@return WsByteBuffer[]
@throws MessageSentException | [
"Marshall",
"a",
"message",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/internal/GenericMessageImpl.java#L357-L373 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.jaxrs.2.0.common/src/org/apache/cxf/jaxrs/model/URITemplate.java | URITemplate.createTemplate | public static URITemplate createTemplate(Path path, List<Parameter> params, String classNameandPath) {
return createTemplate(path == null ? null : path.value(), params, classNameandPath);
} | java | public static URITemplate createTemplate(Path path, List<Parameter> params, String classNameandPath) {
return createTemplate(path == null ? null : path.value(), params, classNameandPath);
} | [
"public",
"static",
"URITemplate",
"createTemplate",
"(",
"Path",
"path",
",",
"List",
"<",
"Parameter",
">",
"params",
",",
"String",
"classNameandPath",
")",
"{",
"return",
"createTemplate",
"(",
"path",
"==",
"null",
"?",
"null",
":",
"path",
".",
"value"... | Liberty Change start | [
"Liberty",
"Change",
"start"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jaxrs.2.0.common/src/org/apache/cxf/jaxrs/model/URITemplate.java#L362-L365 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.jsp/src/org/apache/jasper/compiler/ELParser.java | ELParser.isELReserved | private boolean isELReserved(String id) {
int i = 0;
int j = reservedWords.length;
while (i < j) {
int k = (i + j) / 2;
int result = reservedWords[k].compareTo(id);
if (result == 0) {
return true;
}
if (result < 0) {
... | java | private boolean isELReserved(String id) {
int i = 0;
int j = reservedWords.length;
while (i < j) {
int k = (i + j) / 2;
int result = reservedWords[k].compareTo(id);
if (result == 0) {
return true;
}
if (result < 0) {
... | [
"private",
"boolean",
"isELReserved",
"(",
"String",
"id",
")",
"{",
"int",
"i",
"=",
"0",
";",
"int",
"j",
"=",
"reservedWords",
".",
"length",
";",
"while",
"(",
"i",
"<",
"j",
")",
"{",
"int",
"k",
"=",
"(",
"i",
"+",
"j",
")",
"/",
"2",
"... | Test if an id is a reserved word in EL | [
"Test",
"if",
"an",
"id",
"is",
"a",
"reserved",
"word",
"in",
"EL"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jsp/src/org/apache/jasper/compiler/ELParser.java#L155-L171 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.kernel.boot.core/src/com/ibm/ws/kernel/internal/classloader/BootstrapChildFirstURLClassloader.java | BootstrapChildFirstURLClassloader.loadClass | @Override
protected synchronized Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException {
synchronized (getClassLoadingLock(name)) {
Class<?> result = null;
if (name == null || name.length() == 0)
return null;
result = findLoadedC... | java | @Override
protected synchronized Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException {
synchronized (getClassLoadingLock(name)) {
Class<?> result = null;
if (name == null || name.length() == 0)
return null;
result = findLoadedC... | [
"@",
"Override",
"protected",
"synchronized",
"Class",
"<",
"?",
">",
"loadClass",
"(",
"String",
"name",
",",
"boolean",
"resolve",
")",
"throws",
"ClassNotFoundException",
"{",
"synchronized",
"(",
"getClassLoadingLock",
"(",
"name",
")",
")",
"{",
"Class",
... | Any changes must be made to both sources | [
"Any",
"changes",
"must",
"be",
"made",
"to",
"both",
"sources"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.boot.core/src/com/ibm/ws/kernel/internal/classloader/BootstrapChildFirstURLClassloader.java#L50-L75 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.artifact.zip/src/com/ibm/ws/artifact/zip/internal/ZipFileContainerUtils.java | ZipFileContainerUtils.allocateOffsets | private static List<Integer> allocateOffsets(List<List<Integer>> offsetsStorage) {
if ( offsetsStorage.isEmpty() ) {
return new ArrayList<Integer>();
} else {
return ( offsetsStorage.remove(0) );
}
} | java | private static List<Integer> allocateOffsets(List<List<Integer>> offsetsStorage) {
if ( offsetsStorage.isEmpty() ) {
return new ArrayList<Integer>();
} else {
return ( offsetsStorage.remove(0) );
}
} | [
"private",
"static",
"List",
"<",
"Integer",
">",
"allocateOffsets",
"(",
"List",
"<",
"List",
"<",
"Integer",
">",
">",
"offsetsStorage",
")",
"{",
"if",
"(",
"offsetsStorage",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"new",
"ArrayList",
"<",
"Inte... | Allocate an offsets list.
If no discarded list is available, allocate a new list.
Otherwise, use one of the discarded lists.
@param offsetsStorage Storage of discarded offset lists.
@return An allocated offsets list. | [
"Allocate",
"an",
"offsets",
"list",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.artifact.zip/src/com/ibm/ws/artifact/zip/internal/ZipFileContainerUtils.java#L225-L231 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.artifact.zip/src/com/ibm/ws/artifact/zip/internal/ZipFileContainerUtils.java | ZipFileContainerUtils.releaseOffsets | private static int[] releaseOffsets(List<List<Integer>> offsetsStorage, List<Integer> offsets) {
int numValues = offsets.size();
int[] extractedValues;
if ( numValues == 0 ) {
extractedValues = EMPTY_OFFSETS_ARRAY;
} else {
extractedValue... | java | private static int[] releaseOffsets(List<List<Integer>> offsetsStorage, List<Integer> offsets) {
int numValues = offsets.size();
int[] extractedValues;
if ( numValues == 0 ) {
extractedValues = EMPTY_OFFSETS_ARRAY;
} else {
extractedValue... | [
"private",
"static",
"int",
"[",
"]",
"releaseOffsets",
"(",
"List",
"<",
"List",
"<",
"Integer",
">",
">",
"offsetsStorage",
",",
"List",
"<",
"Integer",
">",
"offsets",
")",
"{",
"int",
"numValues",
"=",
"offsets",
".",
"size",
"(",
")",
";",
"int",
... | Release an offsets list to storage.
Answer the offsets list converted to a raw array of integers.
@param offsetsStorage Storage into which to place the
offset list.
@param offsets The offset list which is to be released to storage.
@return The offset list converted to a raw list of integers. | [
"Release",
"an",
"offsets",
"list",
"to",
"storage",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.artifact.zip/src/com/ibm/ws/artifact/zip/internal/ZipFileContainerUtils.java#L244-L262 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.artifact.zip/src/com/ibm/ws/artifact/zip/internal/ZipFileContainerUtils.java | ZipFileContainerUtils.collectIteratorData | @Trivial
public static Map<String, IteratorData> collectIteratorData(ZipEntryData[] zipEntryData) {
Map<String, IteratorData> allNestingData = new HashMap<String, IteratorData>();
// Re-use offset lists. There can be a lot of these
// created for a busy tree. Offset lists are only needed
... | java | @Trivial
public static Map<String, IteratorData> collectIteratorData(ZipEntryData[] zipEntryData) {
Map<String, IteratorData> allNestingData = new HashMap<String, IteratorData>();
// Re-use offset lists. There can be a lot of these
// created for a busy tree. Offset lists are only needed
... | [
"@",
"Trivial",
"public",
"static",
"Map",
"<",
"String",
",",
"IteratorData",
">",
"collectIteratorData",
"(",
"ZipEntryData",
"[",
"]",
"zipEntryData",
")",
"{",
"Map",
"<",
"String",
",",
"IteratorData",
">",
"allNestingData",
"=",
"new",
"HashMap",
"<",
... | Collect the iterator data for a collection of zip entries.
Keys of the entries must be paths stripped of leading and trailing slashes.
The entries must be in ascending order per {@link PathUtils#PATH_COMPARATOR}.
Only place data for paths which have no children. In particular, leaf entries,
which should be most of ... | [
"Collect",
"the",
"iterator",
"data",
"for",
"a",
"collection",
"of",
"zip",
"entries",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.artifact.zip/src/com/ibm/ws/artifact/zip/internal/ZipFileContainerUtils.java#L280-L390 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.artifact.zip/src/com/ibm/ws/artifact/zip/internal/ZipFileContainerUtils.java | ZipFileContainerUtils.collectZipEntries | @Trivial
public static ZipEntryData[] collectZipEntries(ZipFile zipFile) {
final List<ZipEntryData> entriesList = new ArrayList<ZipEntryData>();
final Enumeration<? extends ZipEntry> zipEntries = zipFile.entries();
while ( zipEntries.hasMoreElements() ) {
entriesList.add( create... | java | @Trivial
public static ZipEntryData[] collectZipEntries(ZipFile zipFile) {
final List<ZipEntryData> entriesList = new ArrayList<ZipEntryData>();
final Enumeration<? extends ZipEntry> zipEntries = zipFile.entries();
while ( zipEntries.hasMoreElements() ) {
entriesList.add( create... | [
"@",
"Trivial",
"public",
"static",
"ZipEntryData",
"[",
"]",
"collectZipEntries",
"(",
"ZipFile",
"zipFile",
")",
"{",
"final",
"List",
"<",
"ZipEntryData",
">",
"entriesList",
"=",
"new",
"ArrayList",
"<",
"ZipEntryData",
">",
"(",
")",
";",
"final",
"Enum... | Collect data for the entries of a zip file.
Intermediate / implied paths are not added to the result.
Answer the zip entries sorted using the path comparator.
See {@link PathUtils#PATH_COMPARATOR}.
@param zipFile The zip file for which to collect entry data.
@return Sorted data for entries of the zip file. | [
"Collect",
"data",
"for",
"the",
"entries",
"of",
"a",
"zip",
"file",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.artifact.zip/src/com/ibm/ws/artifact/zip/internal/ZipFileContainerUtils.java#L558-L572 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.artifact.zip/src/com/ibm/ws/artifact/zip/internal/ZipFileContainerUtils.java | ZipFileContainerUtils.setLocations | @Trivial
public static Map<String, ZipEntryData> setLocations(ZipEntryData[] entryData) {
Map<String, ZipEntryData> entryDataMap = new HashMap<String, ZipEntryData>(entryData.length);
for ( int entryNo = 0; entryNo < entryData.length; entryNo++ ) {
ZipEntryData entry = entryData[entryNo];
... | java | @Trivial
public static Map<String, ZipEntryData> setLocations(ZipEntryData[] entryData) {
Map<String, ZipEntryData> entryDataMap = new HashMap<String, ZipEntryData>(entryData.length);
for ( int entryNo = 0; entryNo < entryData.length; entryNo++ ) {
ZipEntryData entry = entryData[entryNo];
... | [
"@",
"Trivial",
"public",
"static",
"Map",
"<",
"String",
",",
"ZipEntryData",
">",
"setLocations",
"(",
"ZipEntryData",
"[",
"]",
"entryData",
")",
"{",
"Map",
"<",
"String",
",",
"ZipEntryData",
">",
"entryDataMap",
"=",
"new",
"HashMap",
"<",
"String",
... | Create a table of entry data using the relative paths of the entries as
keys. As a side effect, set the offset of each entry data to its location
int he entry data array.
@param entryData The array of entry data to place in a table.
@return The table of entry data. | [
"Create",
"a",
"table",
"of",
"entry",
"data",
"using",
"the",
"relative",
"paths",
"of",
"the",
"entries",
"as",
"keys",
".",
"As",
"a",
"side",
"effect",
"set",
"the",
"offset",
"of",
"each",
"entry",
"data",
"to",
"its",
"location",
"int",
"he",
"en... | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.artifact.zip/src/com/ibm/ws/artifact/zip/internal/ZipFileContainerUtils.java#L583-L594 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.artifact.zip/src/com/ibm/ws/artifact/zip/internal/ZipFileContainerUtils.java | ZipFileContainerUtils.locatePath | @Trivial
public static int locatePath(ZipEntryData[] entryData, final String r_path) {
ZipEntryData targetData = new SearchZipEntryData(r_path);
// Given:
//
// 0 gp
// 1 gp/p1
// 2 gp/p1/c1
// 3 gp/p2/c2
//
// A search for "a" answers ... | java | @Trivial
public static int locatePath(ZipEntryData[] entryData, final String r_path) {
ZipEntryData targetData = new SearchZipEntryData(r_path);
// Given:
//
// 0 gp
// 1 gp/p1
// 2 gp/p1/c1
// 3 gp/p2/c2
//
// A search for "a" answers ... | [
"@",
"Trivial",
"public",
"static",
"int",
"locatePath",
"(",
"ZipEntryData",
"[",
"]",
"entryData",
",",
"final",
"String",
"r_path",
")",
"{",
"ZipEntryData",
"targetData",
"=",
"new",
"SearchZipEntryData",
"(",
"r_path",
")",
";",
"// Given:",
"//",
"// 0 g... | Locate a path in a collection of entries.
Answer the offset of the entry which has the specified path. If the
path is not found, answer -1 times ( the insertion point of the path
minus one ).
@param entryData The entries which are to be searched.
@param r_path The path to fine in the entries.
@return The offset to ... | [
"Locate",
"a",
"path",
"in",
"a",
"collection",
"of",
"entries",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.artifact.zip/src/com/ibm/ws/artifact/zip/internal/ZipFileContainerUtils.java#L608-L629 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.artifact.zip/src/com/ibm/ws/artifact/zip/internal/ZipFileContainerUtils.java | ZipFileContainerUtils.stripPath | @Trivial
private static String stripPath(String path) {
int pathLen = path.length();
if ( pathLen == 0 ) {
return path;
} else if ( pathLen == 1 ) {
if ( path.charAt(0) == '/' ) {
return "";
} else {
return path;
... | java | @Trivial
private static String stripPath(String path) {
int pathLen = path.length();
if ( pathLen == 0 ) {
return path;
} else if ( pathLen == 1 ) {
if ( path.charAt(0) == '/' ) {
return "";
} else {
return path;
... | [
"@",
"Trivial",
"private",
"static",
"String",
"stripPath",
"(",
"String",
"path",
")",
"{",
"int",
"pathLen",
"=",
"path",
".",
"length",
"(",
")",
";",
"if",
"(",
"pathLen",
"==",
"0",
")",
"{",
"return",
"path",
";",
"}",
"else",
"if",
"(",
"pat... | Paths used in the zip entry table are adjusted to never have a leading
slash and to never have a trailing slash.
@param path The path which is to be adjusted.
@return The path with leading and trailing slashes removed. | [
"Paths",
"used",
"in",
"the",
"zip",
"entry",
"table",
"are",
"adjusted",
"to",
"never",
"have",
"a",
"leading",
"slash",
"and",
"to",
"never",
"have",
"a",
"trailing",
"slash",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.artifact.zip/src/com/ibm/ws/artifact/zip/internal/ZipFileContainerUtils.java#L641-L670 | train |
OpenLiberty/open-liberty | dev/com.ibm.websphere.rest.handler/src/com/ibm/wsspi/rest/config/ConfigBasedRESTHandler.java | ConfigBasedRESTHandler.getDeepestNestedElementName | private static String getDeepestNestedElementName(String configDisplayId) {
int start = configDisplayId.lastIndexOf("]/");
if (start > 1) {
int end = configDisplayId.indexOf('[', start += 2);
if (end > start)
return configDisplayId.substring(start, end);
}... | java | private static String getDeepestNestedElementName(String configDisplayId) {
int start = configDisplayId.lastIndexOf("]/");
if (start > 1) {
int end = configDisplayId.indexOf('[', start += 2);
if (end > start)
return configDisplayId.substring(start, end);
}... | [
"private",
"static",
"String",
"getDeepestNestedElementName",
"(",
"String",
"configDisplayId",
")",
"{",
"int",
"start",
"=",
"configDisplayId",
".",
"lastIndexOf",
"(",
"\"]/\"",
")",
";",
"if",
"(",
"start",
">",
"1",
")",
"{",
"int",
"end",
"=",
"configD... | Returns the most deeply nested element name.
@param configDisplayId config.displayId
@return the most deeply nested element name. Null if there are not any nested elements. | [
"Returns",
"the",
"most",
"deeply",
"nested",
"element",
"name",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.websphere.rest.handler/src/com/ibm/wsspi/rest/config/ConfigBasedRESTHandler.java#L86-L94 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/persistent/filemgr/FileManagerImpl.java | FileManagerImpl.dump_memory | public void dump_memory(Writer out)
throws IOException
{
int qlist_num;
out.write("First quick size: " + first_quick_size + "\n");
out.write("Last quick size: " + last_quick_size + "\n");
out.write("Grain size: " + grain_size + "\n");
out.write("Acceptable waste: " + acc... | java | public void dump_memory(Writer out)
throws IOException
{
int qlist_num;
out.write("First quick size: " + first_quick_size + "\n");
out.write("Last quick size: " + last_quick_size + "\n");
out.write("Grain size: " + grain_size + "\n");
out.write("Acceptable waste: " + acc... | [
"public",
"void",
"dump_memory",
"(",
"Writer",
"out",
")",
"throws",
"IOException",
"{",
"int",
"qlist_num",
";",
"out",
".",
"write",
"(",
"\"First quick size: \"",
"+",
"first_quick_size",
"+",
"\"\\n\"",
")",
";",
"out",
".",
"write",
"(",
"\"Last quick si... | Outputs storage information stored in main memory. Debugging interface,
writes interesting stuff to stdout. | [
"Outputs",
"storage",
"information",
"stored",
"in",
"main",
"memory",
".",
"Debugging",
"interface",
"writes",
"interesting",
"stuff",
"to",
"stdout",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/persistent/filemgr/FileManagerImpl.java#L828-L850 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/jfapchannel/richclient/impl/JFapChannelFactory.java | JFapChannelFactory.createChannel | protected Channel createChannel(ChannelData config) throws ChannelException
{
if (tc.isEntryEnabled()) SibTr.entry(this, tc, "createChannel", config);
Channel retChannel;
if (config.isInbound())
{
if (tc.isDebugEnabled()) SibTr.debug(this, tc, "createChannel", "inbound");
... | java | protected Channel createChannel(ChannelData config) throws ChannelException
{
if (tc.isEntryEnabled()) SibTr.entry(this, tc, "createChannel", config);
Channel retChannel;
if (config.isInbound())
{
if (tc.isDebugEnabled()) SibTr.debug(this, tc, "createChannel", "inbound");
... | [
"protected",
"Channel",
"createChannel",
"(",
"ChannelData",
"config",
")",
"throws",
"ChannelException",
"{",
"if",
"(",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"SibTr",
".",
"entry",
"(",
"this",
",",
"tc",
",",
"\"createChannel\"",
",",
"config",
")",... | Creates a new channel. Uses channel configuration to determine if the channel should be
inbound or outbound.
@see BaseChannelFactory#createChannel(com.ibm.websphere.channelfw.ChannelData) | [
"Creates",
"a",
"new",
"channel",
".",
"Uses",
"channel",
"configuration",
"to",
"determine",
"if",
"the",
"channel",
"should",
"be",
"inbound",
"or",
"outbound",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/jfapchannel/richclient/impl/JFapChannelFactory.java#L60-L102 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/jfapchannel/richclient/impl/JFapChannelFactory.java | JFapChannelFactory.getDeviceInterface | public Class[] getDeviceInterface() // F177053
{
if (tc.isEntryEnabled()) SibTr.entry(this, tc, "getDeviceInterface"); // F177053
// Start D232185
if (devSideInterfaceClasses == null)
{
devSideInterfaceClasses = new Class[1];
devSid... | java | public Class[] getDeviceInterface() // F177053
{
if (tc.isEntryEnabled()) SibTr.entry(this, tc, "getDeviceInterface"); // F177053
// Start D232185
if (devSideInterfaceClasses == null)
{
devSideInterfaceClasses = new Class[1];
devSid... | [
"public",
"Class",
"[",
"]",
"getDeviceInterface",
"(",
")",
"// F177053",
"{",
"if",
"(",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"SibTr",
".",
"entry",
"(",
"this",
",",
"tc",
",",
"\"getDeviceInterface\"",
")",
";",
"// F177053",
"// Start D232185",
... | Returns the device side interfaces which our channels can work with.
This is always the TCPServiceContext. | [
"Returns",
"the",
"device",
"side",
"interfaces",
"which",
"our",
"channels",
"can",
"work",
"with",
".",
"This",
"is",
"always",
"the",
"TCPServiceContext",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/jfapchannel/richclient/impl/JFapChannelFactory.java#L108-L122 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.security.wim.core/src/com/ibm/ws/security/wim/RepositoryManager.java | RepositoryManager.addRepository | private void addRepository(String repositoryId, RepositoryWrapper repositoryHolder) {
repositories.put(repositoryId, repositoryHolder);
try {
numRepos = getNumberOfRepositories();
} catch (WIMException e) {
// okay
}
} | java | private void addRepository(String repositoryId, RepositoryWrapper repositoryHolder) {
repositories.put(repositoryId, repositoryHolder);
try {
numRepos = getNumberOfRepositories();
} catch (WIMException e) {
// okay
}
} | [
"private",
"void",
"addRepository",
"(",
"String",
"repositoryId",
",",
"RepositoryWrapper",
"repositoryHolder",
")",
"{",
"repositories",
".",
"put",
"(",
"repositoryId",
",",
"repositoryHolder",
")",
";",
"try",
"{",
"numRepos",
"=",
"getNumberOfRepositories",
"("... | Pair adding to the repositories map and resetting the numRepos int.
@param repositoryId
@param repositoryHolder | [
"Pair",
"adding",
"to",
"the",
"repositories",
"map",
"and",
"resetting",
"the",
"numRepos",
"int",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.wim.core/src/com/ibm/ws/security/wim/RepositoryManager.java#L77-L84 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.security.wim.core/src/com/ibm/ws/security/wim/RepositoryManager.java | RepositoryManager.getRepositoryIdByUniqueName | protected String getRepositoryIdByUniqueName(String uniqueName) throws WIMException {
boolean isDn = UniqueNameHelper.isDN(uniqueName) != null;
if (isDn)
uniqueName = UniqueNameHelper.getValidUniqueName(uniqueName).trim();
String repo = null;
int repoMatch = -1;
int ... | java | protected String getRepositoryIdByUniqueName(String uniqueName) throws WIMException {
boolean isDn = UniqueNameHelper.isDN(uniqueName) != null;
if (isDn)
uniqueName = UniqueNameHelper.getValidUniqueName(uniqueName).trim();
String repo = null;
int repoMatch = -1;
int ... | [
"protected",
"String",
"getRepositoryIdByUniqueName",
"(",
"String",
"uniqueName",
")",
"throws",
"WIMException",
"{",
"boolean",
"isDn",
"=",
"UniqueNameHelper",
".",
"isDN",
"(",
"uniqueName",
")",
"!=",
"null",
";",
"if",
"(",
"isDn",
")",
"uniqueName",
"=",
... | Returns the id of the repository to which the uniqueName belongs to.
@throws InvalidUniqueNameException | [
"Returns",
"the",
"id",
"of",
"the",
"repository",
"to",
"which",
"the",
"uniqueName",
"belongs",
"to",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.wim.core/src/com/ibm/ws/security/wim/RepositoryManager.java#L137-L167 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.recoverylog/src/com/ibm/ws/recoverylog/spi/FileFailureScope.java | FileFailureScope.isSameExecutionZone | @Override
public boolean isSameExecutionZone(FailureScope anotherScope)
{
if (tc.isEntryEnabled())
Tr.entry(tc, "isSameExecutionZone", anotherScope);
boolean isSameZone = equals(anotherScope);
if (tc.isEntryEnabled())
Tr.exit(tc, "isSameExecutionZone", new Boole... | java | @Override
public boolean isSameExecutionZone(FailureScope anotherScope)
{
if (tc.isEntryEnabled())
Tr.entry(tc, "isSameExecutionZone", anotherScope);
boolean isSameZone = equals(anotherScope);
if (tc.isEntryEnabled())
Tr.exit(tc, "isSameExecutionZone", new Boole... | [
"@",
"Override",
"public",
"boolean",
"isSameExecutionZone",
"(",
"FailureScope",
"anotherScope",
")",
"{",
"if",
"(",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"Tr",
".",
"entry",
"(",
"tc",
",",
"\"isSameExecutionZone\"",
",",
"anotherScope",
")",
";",
"... | Returns true if this failure scope represents the same general recovery scope as
the input parameter. For instance, if more than one FailureScope was created
which referenced the same server, they would be in the same execution zone.
@param anotherScope Failure scope to test
@return boolean Flag indicating if the tar... | [
"Returns",
"true",
"if",
"this",
"failure",
"scope",
"represents",
"the",
"same",
"general",
"recovery",
"scope",
"as",
"the",
"input",
"parameter",
".",
"For",
"instance",
"if",
"more",
"than",
"one",
"FailureScope",
"was",
"created",
"which",
"referenced",
"... | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.recoverylog/src/com/ibm/ws/recoverylog/spi/FileFailureScope.java#L257-L269 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.security.common/src/com/ibm/ws/security/common/web/WebUtils.java | WebUtils.encodeCookie | public static String encodeCookie(String string) {
if (string == null) {
return null;
}
string = string.replaceAll("%", "%25");
string = string.replaceAll(";", "%3B");
string = string.replaceAll(",", "%2C");
return string;
} | java | public static String encodeCookie(String string) {
if (string == null) {
return null;
}
string = string.replaceAll("%", "%25");
string = string.replaceAll(";", "%3B");
string = string.replaceAll(",", "%2C");
return string;
} | [
"public",
"static",
"String",
"encodeCookie",
"(",
"String",
"string",
")",
"{",
"if",
"(",
"string",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"string",
"=",
"string",
".",
"replaceAll",
"(",
"\"%\"",
",",
"\"%25\"",
")",
";",
"string",
"=",... | Encodes the given string so that it can be used as an HTTP cookie value.
@param string
the string to convert | [
"Encodes",
"the",
"given",
"string",
"so",
"that",
"it",
"can",
"be",
"used",
"as",
"an",
"HTTP",
"cookie",
"value",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.common/src/com/ibm/ws/security/common/web/WebUtils.java#L98-L106 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.security.common/src/com/ibm/ws/security/common/web/WebUtils.java | WebUtils.decodeCookie | public static String decodeCookie(String string) {
if (string == null) {
return null;
}
string = string.replaceAll("%2C", ",");
string = string.replaceAll("%3B", ";");
string = string.replaceAll("%25", "%");
return string;
} | java | public static String decodeCookie(String string) {
if (string == null) {
return null;
}
string = string.replaceAll("%2C", ",");
string = string.replaceAll("%3B", ";");
string = string.replaceAll("%25", "%");
return string;
} | [
"public",
"static",
"String",
"decodeCookie",
"(",
"String",
"string",
")",
"{",
"if",
"(",
"string",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"string",
"=",
"string",
".",
"replaceAll",
"(",
"\"%2C\"",
",",
"\",\"",
")",
";",
"string",
"=",... | Decodes the given string from percent encoding.
@param string
the string to convert | [
"Decodes",
"the",
"given",
"string",
"from",
"percent",
"encoding",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.common/src/com/ibm/ws/security/common/web/WebUtils.java#L114-L122 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.security.common/src/com/ibm/ws/security/common/web/WebUtils.java | WebUtils.getRequestStringForTrace | @Trivial
public static String getRequestStringForTrace(HttpServletRequest request, String[] secretStrings) {
if (request == null || request.getRequestURL() == null) {
return "[]";
}
StringBuffer sb = new StringBuffer("[" + stripSecretsFromUrl(request.getRequestURL().toString(), ... | java | @Trivial
public static String getRequestStringForTrace(HttpServletRequest request, String[] secretStrings) {
if (request == null || request.getRequestURL() == null) {
return "[]";
}
StringBuffer sb = new StringBuffer("[" + stripSecretsFromUrl(request.getRequestURL().toString(), ... | [
"@",
"Trivial",
"public",
"static",
"String",
"getRequestStringForTrace",
"(",
"HttpServletRequest",
"request",
",",
"String",
"[",
"]",
"secretStrings",
")",
"{",
"if",
"(",
"request",
"==",
"null",
"||",
"request",
".",
"getRequestURL",
"(",
")",
"==",
"null... | information and returns a string for tracing | [
"information",
"and",
"returns",
"a",
"string",
"for",
"tracing"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.common/src/com/ibm/ws/security/common/web/WebUtils.java#L431-L453 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/DynamicConfigManager.java | DynamicConfigManager.deleteAbstractAliasDestinationHandler | public void deleteAbstractAliasDestinationHandler(AbstractAliasDestinationHandler abstractAliasDestinationHandler)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "deleteAbstractAliasDestinationHandler");
//The destination is an alias or a foreign destination, so ... | java | public void deleteAbstractAliasDestinationHandler(AbstractAliasDestinationHandler abstractAliasDestinationHandler)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "deleteAbstractAliasDestinationHandler");
//The destination is an alias or a foreign destination, so ... | [
"public",
"void",
"deleteAbstractAliasDestinationHandler",
"(",
"AbstractAliasDestinationHandler",
"abstractAliasDestinationHandler",
")",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"SibTr",
... | Delete the abstract alias destination handler
@param abstractAliasDestinationHandler | [
"Delete",
"the",
"abstract",
"alias",
"destination",
"handler"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/DynamicConfigManager.java#L455-L473 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/HTODDependencyTable.java | HTODDependencyTable.add | public int add(Object dependency, ValueSet valueSet, Object entry) {
int returnCode = HTODDynacache.NO_EXCEPTION;
dependencyNotUpdatedTable.remove(dependency);
valueSet.add(entry);
if (valueSet.size() > this.delayOffloadEntriesLimit) {
if (this.type == DEP_ID_TABLE) {
... | java | public int add(Object dependency, ValueSet valueSet, Object entry) {
int returnCode = HTODDynacache.NO_EXCEPTION;
dependencyNotUpdatedTable.remove(dependency);
valueSet.add(entry);
if (valueSet.size() > this.delayOffloadEntriesLimit) {
if (this.type == DEP_ID_TABLE) {
... | [
"public",
"int",
"add",
"(",
"Object",
"dependency",
",",
"ValueSet",
"valueSet",
",",
"Object",
"entry",
")",
"{",
"int",
"returnCode",
"=",
"HTODDynacache",
".",
"NO_EXCEPTION",
";",
"dependencyNotUpdatedTable",
".",
"remove",
"(",
"dependency",
")",
";",
"v... | This adds a entry to the ValueSet for the specified dependency. The dependency is found
in the dependencyToEntryTable.
@param dependency The dependency.
@param valueSet containing all entries for this dependency.
@param entry The new entry to add. | [
"This",
"adds",
"a",
"entry",
"to",
"the",
"ValueSet",
"for",
"the",
"specified",
"dependency",
".",
"The",
"dependency",
"is",
"found",
"in",
"the",
"dependencyToEntryTable",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/HTODDependencyTable.java#L70-L95 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/HTODDependencyTable.java | HTODDependencyTable.add | public int add(Object dependency, ValueSet valueSet) {
int returnCode = HTODDynacache.NO_EXCEPTION;
if (dependencyToEntryTable.size() >= this.maxSize) {
returnCode = reduceTableSize();
}
dependencyNotUpdatedTable.put(dependency, valueSet);
dependencyToEntryTable.put(d... | java | public int add(Object dependency, ValueSet valueSet) {
int returnCode = HTODDynacache.NO_EXCEPTION;
if (dependencyToEntryTable.size() >= this.maxSize) {
returnCode = reduceTableSize();
}
dependencyNotUpdatedTable.put(dependency, valueSet);
dependencyToEntryTable.put(d... | [
"public",
"int",
"add",
"(",
"Object",
"dependency",
",",
"ValueSet",
"valueSet",
")",
"{",
"int",
"returnCode",
"=",
"HTODDynacache",
".",
"NO_EXCEPTION",
";",
"if",
"(",
"dependencyToEntryTable",
".",
"size",
"(",
")",
">=",
"this",
".",
"maxSize",
")",
... | This adds a new dependency with its valueSet to the DependencyToEntryTable.
@param dependency The dependency.
@param valueSet containing all entries for this dependency. | [
"This",
"adds",
"a",
"new",
"dependency",
"with",
"its",
"valueSet",
"to",
"the",
"DependencyToEntryTable",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/HTODDependencyTable.java#L103-L111 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/HTODDependencyTable.java | HTODDependencyTable.replace | public int replace(Object dependency, ValueSet valueSet) {
int returnCode = HTODDynacache.NO_EXCEPTION;
dependencyNotUpdatedTable.remove(dependency);
if (valueSet != null && valueSet.size() > this.delayOffloadEntriesLimit) {
dependencyToEntryTable.remove(dependency);
if (... | java | public int replace(Object dependency, ValueSet valueSet) {
int returnCode = HTODDynacache.NO_EXCEPTION;
dependencyNotUpdatedTable.remove(dependency);
if (valueSet != null && valueSet.size() > this.delayOffloadEntriesLimit) {
dependencyToEntryTable.remove(dependency);
if (... | [
"public",
"int",
"replace",
"(",
"Object",
"dependency",
",",
"ValueSet",
"valueSet",
")",
"{",
"int",
"returnCode",
"=",
"HTODDynacache",
".",
"NO_EXCEPTION",
";",
"dependencyNotUpdatedTable",
".",
"remove",
"(",
"dependency",
")",
";",
"if",
"(",
"valueSet",
... | This replaces the existing dependency with new valueSet in DependencyToEntryTable.
@param dependency The dependency.
@param valueSet containing new entries for this dependency. | [
"This",
"replaces",
"the",
"existing",
"dependency",
"with",
"new",
"valueSet",
"in",
"DependencyToEntryTable",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/HTODDependencyTable.java#L132-L160 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/HTODDependencyTable.java | HTODDependencyTable.removeEntry | public Result removeEntry(Object dependency, Object entry) {
Result result = this.htod.getFromResultPool();
ValueSet valueSet = (ValueSet) dependencyToEntryTable.get(dependency);
if (valueSet == null) {
return result;
}
result.bExist = HTODDynacache.EXIST;
va... | java | public Result removeEntry(Object dependency, Object entry) {
Result result = this.htod.getFromResultPool();
ValueSet valueSet = (ValueSet) dependencyToEntryTable.get(dependency);
if (valueSet == null) {
return result;
}
result.bExist = HTODDynacache.EXIST;
va... | [
"public",
"Result",
"removeEntry",
"(",
"Object",
"dependency",
",",
"Object",
"entry",
")",
"{",
"Result",
"result",
"=",
"this",
".",
"htod",
".",
"getFromResultPool",
"(",
")",
";",
"ValueSet",
"valueSet",
"=",
"(",
"ValueSet",
")",
"dependencyToEntryTable"... | This removes the specified entry from the specified dependency.
@param dependency The dependency.
@param result | [
"This",
"removes",
"the",
"specified",
"entry",
"from",
"the",
"specified",
"dependency",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/HTODDependencyTable.java#L179-L199 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/HTODDependencyTable.java | HTODDependencyTable.getEntries | public ValueSet getEntries(Object dependency) {
ValueSet valueSet = (ValueSet) dependencyToEntryTable.get(dependency);
return valueSet;
} | java | public ValueSet getEntries(Object dependency) {
ValueSet valueSet = (ValueSet) dependencyToEntryTable.get(dependency);
return valueSet;
} | [
"public",
"ValueSet",
"getEntries",
"(",
"Object",
"dependency",
")",
"{",
"ValueSet",
"valueSet",
"=",
"(",
"ValueSet",
")",
"dependencyToEntryTable",
".",
"get",
"(",
"dependency",
")",
";",
"return",
"valueSet",
";",
"}"
] | This returns the ValueSet for the specified dependency from the DependencyToEntryTable.
@param dependency The dependency to get the entries for.
@return The ValueSet containing all entries for this dependency. | [
"This",
"returns",
"the",
"ValueSet",
"for",
"the",
"specified",
"dependency",
"from",
"the",
"DependencyToEntryTable",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/HTODDependencyTable.java#L233-L237 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/HTODDependencyTable.java | HTODDependencyTable.reduceTableSize | private int reduceTableSize() {
int returnCode = HTODDynacache.NO_EXCEPTION;
int count = this.entryRemove;
if (count > 0) {
int removeSize = 5;
while (count > 0) {
int minSize = Integer.MAX_VALUE;
Iterator<Map.Entry<Object,Set<Object>>> e = dep... | java | private int reduceTableSize() {
int returnCode = HTODDynacache.NO_EXCEPTION;
int count = this.entryRemove;
if (count > 0) {
int removeSize = 5;
while (count > 0) {
int minSize = Integer.MAX_VALUE;
Iterator<Map.Entry<Object,Set<Object>>> e = dep... | [
"private",
"int",
"reduceTableSize",
"(",
")",
"{",
"int",
"returnCode",
"=",
"HTODDynacache",
".",
"NO_EXCEPTION",
";",
"int",
"count",
"=",
"this",
".",
"entryRemove",
";",
"if",
"(",
"count",
">",
"0",
")",
"{",
"int",
"removeSize",
"=",
"5",
";",
"... | This reduces the DependencyToEntryTable size by offloading some dependencies to the disk. | [
"This",
"reduces",
"the",
"DependencyToEntryTable",
"size",
"by",
"offloading",
"some",
"dependencies",
"to",
"the",
"disk",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/HTODDependencyTable.java#L265-L316 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.javaee.ddmetadata/src/com/ibm/ws/javaee/ddmetadata/generator/ComponentImplGenerator.java | ComponentImplGenerator.getClassName | private static String getClassName(String implClassName) {
implClassName = implClassName.substring(0, implClassName.length() - 4);
return implClassName + "ComponentImpl";
} | java | private static String getClassName(String implClassName) {
implClassName = implClassName.substring(0, implClassName.length() - 4);
return implClassName + "ComponentImpl";
} | [
"private",
"static",
"String",
"getClassName",
"(",
"String",
"implClassName",
")",
"{",
"implClassName",
"=",
"implClassName",
".",
"substring",
"(",
"0",
",",
"implClassName",
".",
"length",
"(",
")",
"-",
"4",
")",
";",
"return",
"implClassName",
"+",
"\"... | The model interface type has a name ending in 'Type'. For the moment, modify it here. | [
"The",
"model",
"interface",
"type",
"has",
"a",
"name",
"ending",
"in",
"Type",
".",
"For",
"the",
"moment",
"modify",
"it",
"here",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.javaee.ddmetadata/src/com/ibm/ws/javaee/ddmetadata/generator/ComponentImplGenerator.java#L45-L48 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/utils/StoppableThreadCache.java | StoppableThreadCache.registerThread | public void registerThread(StoppableThread thread)
{
if (tc.isEntryEnabled())
SibTr.entry(tc, "registerThread", thread);
synchronized (this)
{
_threadCache.add(thread);
}
if (tc.isEntryEnabled())
SibTr.exit(tc, "registerThread");
} | java | public void registerThread(StoppableThread thread)
{
if (tc.isEntryEnabled())
SibTr.entry(tc, "registerThread", thread);
synchronized (this)
{
_threadCache.add(thread);
}
if (tc.isEntryEnabled())
SibTr.exit(tc, "registerThread");
} | [
"public",
"void",
"registerThread",
"(",
"StoppableThread",
"thread",
")",
"{",
"if",
"(",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"SibTr",
".",
"entry",
"(",
"tc",
",",
"\"registerThread\"",
",",
"thread",
")",
";",
"synchronized",
"(",
"this",
")",
... | Registers a new thread for stopping | [
"Registers",
"a",
"new",
"thread",
"for",
"stopping"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/utils/StoppableThreadCache.java#L56-L68 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/utils/StoppableThreadCache.java | StoppableThreadCache.deregisterThread | public void deregisterThread(StoppableThread thread)
{
if (tc.isEntryEnabled())
SibTr.entry(tc, "deregisterThread", thread);
synchronized (this)
{
_threadCache.remove(thread);
}
if (tc.isEntryEnabled())
SibTr.exit(tc, "deregisterThread");
} | java | public void deregisterThread(StoppableThread thread)
{
if (tc.isEntryEnabled())
SibTr.entry(tc, "deregisterThread", thread);
synchronized (this)
{
_threadCache.remove(thread);
}
if (tc.isEntryEnabled())
SibTr.exit(tc, "deregisterThread");
} | [
"public",
"void",
"deregisterThread",
"(",
"StoppableThread",
"thread",
")",
"{",
"if",
"(",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"SibTr",
".",
"entry",
"(",
"tc",
",",
"\"deregisterThread\"",
",",
"thread",
")",
";",
"synchronized",
"(",
"this",
")... | Deregisters a thread for stopping | [
"Deregisters",
"a",
"thread",
"for",
"stopping"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/utils/StoppableThreadCache.java#L73-L85 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/utils/StoppableThreadCache.java | StoppableThreadCache.stopAllThreads | public void stopAllThreads()
{
if (tc.isEntryEnabled())
SibTr.entry(tc, "stopAllThreads");
synchronized (this)
{
Iterator iterator = ((ArrayList)_threadCache.clone()).iterator();
while (iterator.hasNext())
{
StoppableThread thread = (StoppableThread)iterator.... | java | public void stopAllThreads()
{
if (tc.isEntryEnabled())
SibTr.entry(tc, "stopAllThreads");
synchronized (this)
{
Iterator iterator = ((ArrayList)_threadCache.clone()).iterator();
while (iterator.hasNext())
{
StoppableThread thread = (StoppableThread)iterator.... | [
"public",
"void",
"stopAllThreads",
"(",
")",
"{",
"if",
"(",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"SibTr",
".",
"entry",
"(",
"tc",
",",
"\"stopAllThreads\"",
")",
";",
"synchronized",
"(",
"this",
")",
"{",
"Iterator",
"iterator",
"=",
"(",
"(... | Stops all the stoppable threads that haven't already been stopped | [
"Stops",
"all",
"the",
"stoppable",
"threads",
"that",
"haven",
"t",
"already",
"been",
"stopped"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/utils/StoppableThreadCache.java#L90-L117 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/utils/StoppableThreadCache.java | StoppableThreadCache.getThreads | public ArrayList getThreads()
{
if (tc.isEntryEnabled())
{
SibTr.entry(tc, "getThreads");
SibTr.exit(tc, "getThreads", _threadCache);
}
return _threadCache;
} | java | public ArrayList getThreads()
{
if (tc.isEntryEnabled())
{
SibTr.entry(tc, "getThreads");
SibTr.exit(tc, "getThreads", _threadCache);
}
return _threadCache;
} | [
"public",
"ArrayList",
"getThreads",
"(",
")",
"{",
"if",
"(",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"{",
"SibTr",
".",
"entry",
"(",
"tc",
",",
"\"getThreads\"",
")",
";",
"SibTr",
".",
"exit",
"(",
"tc",
",",
"\"getThreads\"",
",",
"_threadCach... | Unit test hook to check on connected threads | [
"Unit",
"test",
"hook",
"to",
"check",
"on",
"connected",
"threads"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/utils/StoppableThreadCache.java#L122-L130 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.logging.core/src/com/ibm/ws/collector/manager/buffer/SimpleRotatingSoftQueue.java | SimpleRotatingSoftQueue.getAndUpdateTail | private int getAndUpdateTail() {
int retMe;
do {
retMe = tailIndex.get();
} while (tailIndex.compareAndSet(retMe, getNext(retMe)) == false);
return retMe;
} | java | private int getAndUpdateTail() {
int retMe;
do {
retMe = tailIndex.get();
} while (tailIndex.compareAndSet(retMe, getNext(retMe)) == false);
return retMe;
} | [
"private",
"int",
"getAndUpdateTail",
"(",
")",
"{",
"int",
"retMe",
";",
"do",
"{",
"retMe",
"=",
"tailIndex",
".",
"get",
"(",
")",
";",
"}",
"while",
"(",
"tailIndex",
".",
"compareAndSet",
"(",
"retMe",
",",
"getNext",
"(",
"retMe",
")",
")",
"==... | Atomically update and return the tailIndex.
Guarantees that two threads won't simultaneously update the same slot
in the array. | [
"Atomically",
"update",
"and",
"return",
"the",
"tailIndex",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.logging.core/src/com/ibm/ws/collector/manager/buffer/SimpleRotatingSoftQueue.java#L60-L68 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.msgstore/src/com/ibm/ws/sib/msgstore/expiry/ExpiryIndex.java | ExpiryIndex.put | public boolean put(ExpirableReference expirable)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "put", "ObjId=" + expirable.getID() + " ET=" + expirable.getExpiryTime());
boolean reply = tree.insert(expirable);
if (reply)
{
size+... | java | public boolean put(ExpirableReference expirable)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "put", "ObjId=" + expirable.getID() + " ET=" + expirable.getExpiryTime());
boolean reply = tree.insert(expirable);
if (reply)
{
size+... | [
"public",
"boolean",
"put",
"(",
"ExpirableReference",
"expirable",
")",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"SibTr",
".",
"entry",
"(",
"this",
",",
"tc",
",",
"\"put\""... | Add an ExpirableReference to the expiry index.
@param expirable an ExpirableReference.
@return true if the object was added to the index successfully. | [
"Add",
"an",
"ExpirableReference",
"to",
"the",
"expiry",
"index",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.msgstore/src/com/ibm/ws/sib/msgstore/expiry/ExpiryIndex.java#L55-L67 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.product.utility/src/com/ibm/ws/product/utility/extension/VersionUtils.java | VersionUtils.getAllProductInfo | protected static Map<String, ProductInfo> getAllProductInfo(File wlpInstallationDirectory) throws VersionParsingException {
File versionPropertyDirectory = new File(wlpInstallationDirectory, ProductInfo.VERSION_PROPERTY_DIRECTORY);
if (!versionPropertyDirectory.exists()) {
throw new VersionP... | java | protected static Map<String, ProductInfo> getAllProductInfo(File wlpInstallationDirectory) throws VersionParsingException {
File versionPropertyDirectory = new File(wlpInstallationDirectory, ProductInfo.VERSION_PROPERTY_DIRECTORY);
if (!versionPropertyDirectory.exists()) {
throw new VersionP... | [
"protected",
"static",
"Map",
"<",
"String",
",",
"ProductInfo",
">",
"getAllProductInfo",
"(",
"File",
"wlpInstallationDirectory",
")",
"throws",
"VersionParsingException",
"{",
"File",
"versionPropertyDirectory",
"=",
"new",
"File",
"(",
"wlpInstallationDirectory",
",... | This method will create a map of product ID to the VersionProperties for that product.
@param ex The execution context that this is being run in
@return A map of product IDs to VersionProperties.
@throws VersionParsingException If something goes wrong parsing the version files | [
"This",
"method",
"will",
"create",
"a",
"map",
"of",
"product",
"ID",
"to",
"the",
"VersionProperties",
"for",
"that",
"product",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.product.utility/src/com/ibm/ws/product/utility/extension/VersionUtils.java#L33-L74 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.classloading/src/com/ibm/ws/classloading/internal/util/CanonicalStore.java | CanonicalStore.remove | public boolean remove(V value) {
// peek at what is in the map
K key = value.getKey();
Ref<V> ref = map.get(key);
// only try to remove the mapping if it matches the provided class loader
return (ref != null && ref.get() == value) ? map.remove(key, ref) : false;
} | java | public boolean remove(V value) {
// peek at what is in the map
K key = value.getKey();
Ref<V> ref = map.get(key);
// only try to remove the mapping if it matches the provided class loader
return (ref != null && ref.get() == value) ? map.remove(key, ref) : false;
} | [
"public",
"boolean",
"remove",
"(",
"V",
"value",
")",
"{",
"// peek at what is in the map",
"K",
"key",
"=",
"value",
".",
"getKey",
"(",
")",
";",
"Ref",
"<",
"V",
">",
"ref",
"=",
"map",
".",
"get",
"(",
"key",
")",
";",
"// only try to remove the map... | Remove any mapping for the provided id
@param id | [
"Remove",
"any",
"mapping",
"for",
"the",
"provided",
"id"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.classloading/src/com/ibm/ws/classloading/internal/util/CanonicalStore.java#L55-L61 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.classloading/src/com/ibm/ws/classloading/internal/util/CanonicalStore.java | CanonicalStore.retrieveOrCreate | public V retrieveOrCreate(K key, Factory<V> factory) {
// Clean up stale entries on every put.
// This should avoid a slow memory leak of reference objects.
this.cleanUpStaleEntries();
return retrieveOrCreate(key, factory, new FutureRef<V>());
} | java | public V retrieveOrCreate(K key, Factory<V> factory) {
// Clean up stale entries on every put.
// This should avoid a slow memory leak of reference objects.
this.cleanUpStaleEntries();
return retrieveOrCreate(key, factory, new FutureRef<V>());
} | [
"public",
"V",
"retrieveOrCreate",
"(",
"K",
"key",
",",
"Factory",
"<",
"V",
">",
"factory",
")",
"{",
"// Clean up stale entries on every put.",
"// This should avoid a slow memory leak of reference objects.",
"this",
".",
"cleanUpStaleEntries",
"(",
")",
";",
"return",... | Create a value for the given key iff one has not already been stored.
This method is safe to be called concurrently from multiple threads.
It will ensure that only one thread succeeds to create the value for the given key.
@return the created/retrieved {@link AppClassLoader} | [
"Create",
"a",
"value",
"for",
"the",
"given",
"key",
"iff",
"one",
"has",
"not",
"already",
"been",
"stored",
".",
"This",
"method",
"is",
"safe",
"to",
"be",
"called",
"concurrently",
"from",
"multiple",
"threads",
".",
"It",
"will",
"ensure",
"that",
... | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.classloading/src/com/ibm/ws/classloading/internal/util/CanonicalStore.java#L70-L75 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.classloading/src/com/ibm/ws/classloading/internal/util/CanonicalStore.java | CanonicalStore.cleanUpStaleEntries | void cleanUpStaleEntries() {
for (KeyedRef<K, V> ref = q.poll(); ref != null; ref = q.poll()) {
map.remove(ref.getKey(), ref); // CONCURRENT remove() operation
}
} | java | void cleanUpStaleEntries() {
for (KeyedRef<K, V> ref = q.poll(); ref != null; ref = q.poll()) {
map.remove(ref.getKey(), ref); // CONCURRENT remove() operation
}
} | [
"void",
"cleanUpStaleEntries",
"(",
")",
"{",
"for",
"(",
"KeyedRef",
"<",
"K",
",",
"V",
">",
"ref",
"=",
"q",
".",
"poll",
"(",
")",
";",
"ref",
"!=",
"null",
";",
"ref",
"=",
"q",
".",
"poll",
"(",
")",
")",
"{",
"map",
".",
"remove",
"(",... | clean up stale entries | [
"clean",
"up",
"stale",
"entries"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.classloading/src/com/ibm/ws/classloading/internal/util/CanonicalStore.java#L106-L110 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.webcontainer/src/com/ibm/ws/webcontainer/util/ArrayEnumeration.java | ArrayEnumeration.nextElement | public Object nextElement()
{
if (_array == null)
{
return null;
}
else
{
synchronized(this){
if (_index < _array.length)
{
Object obj = _array[_index];
_index++;
... | java | public Object nextElement()
{
if (_array == null)
{
return null;
}
else
{
synchronized(this){
if (_index < _array.length)
{
Object obj = _array[_index];
_index++;
... | [
"public",
"Object",
"nextElement",
"(",
")",
"{",
"if",
"(",
"_array",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"else",
"{",
"synchronized",
"(",
"this",
")",
"{",
"if",
"(",
"_index",
"<",
"_array",
".",
"length",
")",
"{",
"Object",
"o... | nextElement method comment. | [
"nextElement",
"method",
"comment",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webcontainer/src/com/ibm/ws/webcontainer/util/ArrayEnumeration.java#L48-L69 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.logging.hpel/src/com/ibm/ws/logging/hpel/viewer/LogViewer.java | LogViewer.execute | public int execute(String[] args) {
Map<String, LevelDetails> levels = readLevels(System.getProperty("logviewer.custom.levels"));
String[] header = readHeader(System.getProperty("logviewer.custom.header"));
return execute(args, levels, header);
} | java | public int execute(String[] args) {
Map<String, LevelDetails> levels = readLevels(System.getProperty("logviewer.custom.levels"));
String[] header = readHeader(System.getProperty("logviewer.custom.header"));
return execute(args, levels, header);
} | [
"public",
"int",
"execute",
"(",
"String",
"[",
"]",
"args",
")",
"{",
"Map",
"<",
"String",
",",
"LevelDetails",
">",
"levels",
"=",
"readLevels",
"(",
"System",
".",
"getProperty",
"(",
"\"logviewer.custom.levels\"",
")",
")",
";",
"String",
"[",
"]",
... | Runs LogViewer using values in System Properties to find custom levels and header.
@param args
- command line arguments to LogViewer
@return code indicating status of the execution: 0 on success, 1 otherwise. | [
"Runs",
"LogViewer",
"using",
"values",
"in",
"System",
"Properties",
"to",
"find",
"custom",
"levels",
"and",
"header",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.logging.hpel/src/com/ibm/ws/logging/hpel/viewer/LogViewer.java#L271-L276 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.logging.hpel/src/com/ibm/ws/logging/hpel/viewer/LogViewer.java | LogViewer.execute | public int execute(String[] args, Map<String, LevelDetails> levels, String[] header) {
levelString = getLevelsString(levels);
RepositoryReaderImpl logRepository;
try {
// Parse the command line arguments and validate arguments
if (parseCmdLineArgs(args) || validateSetti... | java | public int execute(String[] args, Map<String, LevelDetails> levels, String[] header) {
levelString = getLevelsString(levels);
RepositoryReaderImpl logRepository;
try {
// Parse the command line arguments and validate arguments
if (parseCmdLineArgs(args) || validateSetti... | [
"public",
"int",
"execute",
"(",
"String",
"[",
"]",
"args",
",",
"Map",
"<",
"String",
",",
"LevelDetails",
">",
"levels",
",",
"String",
"[",
"]",
"header",
")",
"{",
"levelString",
"=",
"getLevelsString",
"(",
"levels",
")",
";",
"RepositoryReaderImpl",... | Runs LogViewer.
@param args command line arguments to LogViewer
@param levels map of custom level names to their attributes
@param header custom header template as an array of strings
@return code indicating status of the execution: 0 on success, 1 otherwise. | [
"Runs",
"LogViewer",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.logging.hpel/src/com/ibm/ws/logging/hpel/viewer/LogViewer.java#L286-L349 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.logging.hpel/src/com/ibm/ws/logging/hpel/viewer/LogViewer.java | LogViewer.collectAllKids | private long collectAllKids(ArrayList<DisplayInstance> result, ServerInstanceLogRecordList list) {
long timestamp = -1;
RepositoryLogRecord first = list.iterator().next();
if (first != null) {
timestamp = first.getMillis();
}
for (Entry<String, ServerInstanceLogReco... | java | private long collectAllKids(ArrayList<DisplayInstance> result, ServerInstanceLogRecordList list) {
long timestamp = -1;
RepositoryLogRecord first = list.iterator().next();
if (first != null) {
timestamp = first.getMillis();
}
for (Entry<String, ServerInstanceLogReco... | [
"private",
"long",
"collectAllKids",
"(",
"ArrayList",
"<",
"DisplayInstance",
">",
"result",
",",
"ServerInstanceLogRecordList",
"list",
")",
"{",
"long",
"timestamp",
"=",
"-",
"1",
";",
"RepositoryLogRecord",
"first",
"=",
"list",
".",
"iterator",
"(",
")",
... | collects all descendant instances into an array and calculates largest timestamp
of their first records.
@param result array to add all descendant instances to.
@param list the root instance result.
@return largest timestamp among first record timestamps. | [
"collects",
"all",
"descendant",
"instances",
"into",
"an",
"array",
"and",
"calculates",
"largest",
"timestamp",
"of",
"their",
"first",
"records",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.logging.hpel/src/com/ibm/ws/logging/hpel/viewer/LogViewer.java#L1022-L1043 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.logging.hpel/src/com/ibm/ws/logging/hpel/viewer/LogViewer.java | LogViewer.createLevelByString | private Level createLevelByString(String levelString) throws IllegalArgumentException {
try {
return Level.parse(levelString.toUpperCase());
//return WsLevel.parse(levelString.toUpperCase());
} catch (Exception npe) {
throw new IllegalArgumentException(getLocalizedPar... | java | private Level createLevelByString(String levelString) throws IllegalArgumentException {
try {
return Level.parse(levelString.toUpperCase());
//return WsLevel.parse(levelString.toUpperCase());
} catch (Exception npe) {
throw new IllegalArgumentException(getLocalizedPar... | [
"private",
"Level",
"createLevelByString",
"(",
"String",
"levelString",
")",
"throws",
"IllegalArgumentException",
"{",
"try",
"{",
"return",
"Level",
".",
"parse",
"(",
"levelString",
".",
"toUpperCase",
"(",
")",
")",
";",
"//return WsLevel.parse(levelString.toUppe... | This method creates a java.util.Level object from a string with the level name.
@param levelString
- a String representing the name of the Level.
@return a Level object | [
"This",
"method",
"creates",
"a",
"java",
".",
"util",
".",
"Level",
"object",
"from",
"a",
"string",
"with",
"the",
"level",
"name",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.logging.hpel/src/com/ibm/ws/logging/hpel/viewer/LogViewer.java#L1409-L1417 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.logging.hpel/src/com/ibm/ws/logging/hpel/viewer/LogViewer.java | LogViewer.setInstanceId | void setInstanceId(String instanceId) throws IllegalArgumentException {
if (instanceId != null && !"".equals(instanceId)) {
subInstanceId = getSubProcessInstanceId(instanceId);
try {
long id = getProcessInstanceId(instanceId);
mainInstanceId = id < 0 ? n... | java | void setInstanceId(String instanceId) throws IllegalArgumentException {
if (instanceId != null && !"".equals(instanceId)) {
subInstanceId = getSubProcessInstanceId(instanceId);
try {
long id = getProcessInstanceId(instanceId);
mainInstanceId = id < 0 ? n... | [
"void",
"setInstanceId",
"(",
"String",
"instanceId",
")",
"throws",
"IllegalArgumentException",
"{",
"if",
"(",
"instanceId",
"!=",
"null",
"&&",
"!",
"\"\"",
".",
"equals",
"(",
"instanceId",
")",
")",
"{",
"subInstanceId",
"=",
"getSubProcessInstanceId",
"(",... | Parses the instanceId into the requested main process instanceId and the subprocess instanceid. The main
process instanceId must be a long value as the main instance Id is a timestamp.
@param instanceId - the instanceId requested by the user | [
"Parses",
"the",
"instanceId",
"into",
"the",
"requested",
"main",
"process",
"instanceId",
"and",
"the",
"subprocess",
"instanceid",
".",
"The",
"main",
"process",
"instanceId",
"must",
"be",
"a",
"long",
"value",
"as",
"the",
"main",
"instance",
"Id",
"is",
... | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.logging.hpel/src/com/ibm/ws/logging/hpel/viewer/LogViewer.java#L1425-L1437 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.logging.hpel/src/com/ibm/ws/logging/hpel/viewer/LogViewer.java | LogViewer.listRepositoryChoices | protected File[] listRepositoryChoices() {
// check current location
String currentDir = System.getProperty("log.repository.root");
if (currentDir == null)
currentDir = System.getProperty("user.dir");
File logDir = new File(currentDir);
if (logDir.isDirectory()) {
... | java | protected File[] listRepositoryChoices() {
// check current location
String currentDir = System.getProperty("log.repository.root");
if (currentDir == null)
currentDir = System.getProperty("user.dir");
File logDir = new File(currentDir);
if (logDir.isDirectory()) {
... | [
"protected",
"File",
"[",
"]",
"listRepositoryChoices",
"(",
")",
"{",
"// check current location",
"String",
"currentDir",
"=",
"System",
".",
"getProperty",
"(",
"\"log.repository.root\"",
")",
";",
"if",
"(",
"currentDir",
"==",
"null",
")",
"currentDir",
"=",
... | Lists directories containing HPEL repositories. It is called
when repository is not specified explicitly in the arguments
@return List of files which can be used as repositories | [
"Lists",
"directories",
"containing",
"HPEL",
"repositories",
".",
"It",
"is",
"called",
"when",
"repository",
"is",
"not",
"specified",
"explicitly",
"in",
"the",
"arguments"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.logging.hpel/src/com/ibm/ws/logging/hpel/viewer/LogViewer.java#L1764-L1780 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.transport.http/src/com/ibm/wsspi/http/channel/compression/GzipInputHandler.java | GzipInputHandler.skipPast | private int skipPast(byte[] data, int pos, byte target) {
int index = pos;
while (index < data.length) {
if (target == data[index++]) {
return index;
}
}
return index;
} | java | private int skipPast(byte[] data, int pos, byte target) {
int index = pos;
while (index < data.length) {
if (target == data[index++]) {
return index;
}
}
return index;
} | [
"private",
"int",
"skipPast",
"(",
"byte",
"[",
"]",
"data",
",",
"int",
"pos",
",",
"byte",
"target",
")",
"{",
"int",
"index",
"=",
"pos",
";",
"while",
"(",
"index",
"<",
"data",
".",
"length",
")",
"{",
"if",
"(",
"target",
"==",
"data",
"[",... | Skip until it runs out of input data or finds the target byte.
@param data
@param pos
@param target
@return pos | [
"Skip",
"until",
"it",
"runs",
"out",
"of",
"input",
"data",
"or",
"finds",
"the",
"target",
"byte",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/wsspi/http/channel/compression/GzipInputHandler.java#L166-L174 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.transport.http/src/com/ibm/wsspi/http/channel/compression/GzipInputHandler.java | GzipInputHandler.parseTrailer | private int parseTrailer(byte[] input, int inOffset, List<WsByteBuffer> list) throws DataFormatException {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "Parsing trailer, offset=" + this.parseOffset + " val=" + this.parseInt);
}
int offset = inOffset... | java | private int parseTrailer(byte[] input, int inOffset, List<WsByteBuffer> list) throws DataFormatException {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "Parsing trailer, offset=" + this.parseOffset + " val=" + this.parseInt);
}
int offset = inOffset... | [
"private",
"int",
"parseTrailer",
"(",
"byte",
"[",
"]",
"input",
",",
"int",
"inOffset",
",",
"List",
"<",
"WsByteBuffer",
">",
"list",
")",
"throws",
"DataFormatException",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",... | Parse past the GZIP trailer information. This is the two ints for the CRC32
checksum validation.
@param input
@param inOffset
@param list
@return new offset
@throws DataFormatException
- if the trailer data is wrong | [
"Parse",
"past",
"the",
"GZIP",
"trailer",
"information",
".",
"This",
"is",
"the",
"two",
"ints",
"for",
"the",
"CRC32",
"checksum",
"validation",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/wsspi/http/channel/compression/GzipInputHandler.java#L327-L386 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.channelfw/src/com/ibm/wsspi/channelfw/base/OutboundConnectorLink.java | OutboundConnectorLink.logClosedException | public void logClosedException(Exception e) {
// Note: this may be a normal occurance so don't log error, just debug.
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "Connection closed with exception: " + e.getMessage());
}
} | java | public void logClosedException(Exception e) {
// Note: this may be a normal occurance so don't log error, just debug.
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "Connection closed with exception: " + e.getMessage());
}
} | [
"public",
"void",
"logClosedException",
"(",
"Exception",
"e",
")",
"{",
"// Note: this may be a normal occurance so don't log error, just debug.",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isDebugEnabled",
"(",
")",
")",
"{",
... | This logs the error if the connection was closed by a higher level channel
with an error.
@param e | [
"This",
"logs",
"the",
"error",
"if",
"the",
"connection",
"was",
"closed",
"by",
"a",
"higher",
"level",
"channel",
"with",
"an",
"error",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.channelfw/src/com/ibm/wsspi/channelfw/base/OutboundConnectorLink.java#L129-L134 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.jms.2.0/src/com/ibm/ws/sib/ra/inbound/impl/SibRaAbstractConsumerSession.java | SibRaAbstractConsumerSession.outOfScope | void outOfScope() {
final String methodName = "outOfScope";
if (TRACE.isEntryEnabled()) {
SibTr.entry(this, TRACE, methodName);
}
_outOfScope = true;
try {
// Close cloned connection so that it, and any resource created
// from it, also thr... | java | void outOfScope() {
final String methodName = "outOfScope";
if (TRACE.isEntryEnabled()) {
SibTr.entry(this, TRACE, methodName);
}
_outOfScope = true;
try {
// Close cloned connection so that it, and any resource created
// from it, also thr... | [
"void",
"outOfScope",
"(",
")",
"{",
"final",
"String",
"methodName",
"=",
"\"outOfScope\"",
";",
"if",
"(",
"TRACE",
".",
"isEntryEnabled",
"(",
")",
")",
"{",
"SibTr",
".",
"entry",
"(",
"this",
",",
"TRACE",
",",
"methodName",
")",
";",
"}",
"_outOf... | Called to indicate that this session is now out of scope. | [
"Called",
"to",
"indicate",
"that",
"this",
"session",
"is",
"now",
"out",
"of",
"scope",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.jms.2.0/src/com/ibm/ws/sib/ra/inbound/impl/SibRaAbstractConsumerSession.java#L192-L237 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.security.appbnd/src/com/ibm/ws/security/appbnd/internal/delegation/DefaultDelegationProvider.java | DefaultDelegationProvider.createAppToSecurityRolesMapping | public void createAppToSecurityRolesMapping(String appName, Collection<SecurityRole> securityRoles) {
//only add it if we don't have a cached copy
appToSecurityRolesMap.putIfAbsent(appName, securityRoles);
} | java | public void createAppToSecurityRolesMapping(String appName, Collection<SecurityRole> securityRoles) {
//only add it if we don't have a cached copy
appToSecurityRolesMap.putIfAbsent(appName, securityRoles);
} | [
"public",
"void",
"createAppToSecurityRolesMapping",
"(",
"String",
"appName",
",",
"Collection",
"<",
"SecurityRole",
">",
"securityRoles",
")",
"{",
"//only add it if we don't have a cached copy",
"appToSecurityRolesMap",
".",
"putIfAbsent",
"(",
"appName",
",",
"security... | Creates the application to security roles mapping for a given application.
@param appName the name of the application for which the mappings belong to.
@param securityRoles the security roles of the application. | [
"Creates",
"the",
"application",
"to",
"security",
"roles",
"mapping",
"for",
"a",
"given",
"application",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.appbnd/src/com/ibm/ws/security/appbnd/internal/delegation/DefaultDelegationProvider.java#L196-L199 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.security.appbnd/src/com/ibm/ws/security/appbnd/internal/delegation/DefaultDelegationProvider.java | DefaultDelegationProvider.removeRoleToRunAsMapping | public void removeRoleToRunAsMapping(String appName) {
Map<String, RunAs> roleToRunAsMap = roleToRunAsMappingPerApp.get(appName);
if (roleToRunAsMap != null) {
roleToRunAsMap.clear();
}
appToSecurityRolesMap.remove(appName);
if (TraceComponent.isAnyTracingEnabled() &... | java | public void removeRoleToRunAsMapping(String appName) {
Map<String, RunAs> roleToRunAsMap = roleToRunAsMappingPerApp.get(appName);
if (roleToRunAsMap != null) {
roleToRunAsMap.clear();
}
appToSecurityRolesMap.remove(appName);
if (TraceComponent.isAnyTracingEnabled() &... | [
"public",
"void",
"removeRoleToRunAsMapping",
"(",
"String",
"appName",
")",
"{",
"Map",
"<",
"String",
",",
"RunAs",
">",
"roleToRunAsMap",
"=",
"roleToRunAsMappingPerApp",
".",
"get",
"(",
"appName",
")",
";",
"if",
"(",
"roleToRunAsMap",
"!=",
"null",
")",
... | Removes the role to RunAs mappings for a given application.
@param appName the name of the application for which the mappings belong to. | [
"Removes",
"the",
"role",
"to",
"RunAs",
"mappings",
"for",
"a",
"given",
"application",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.appbnd/src/com/ibm/ws/security/appbnd/internal/delegation/DefaultDelegationProvider.java#L206-L218 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.security.appbnd/src/com/ibm/ws/security/appbnd/internal/delegation/DefaultDelegationProvider.java | DefaultDelegationProvider.removeRoleToWarningMapping | public void removeRoleToWarningMapping(String appName) {
Map<String, Boolean> roleToWarningMap = roleToWarningMappingPerApp.get(appName);
if (roleToWarningMap != null) {
roleToWarningMap.clear();
}
roleToWarningMappingPerApp.remove(appName);
} | java | public void removeRoleToWarningMapping(String appName) {
Map<String, Boolean> roleToWarningMap = roleToWarningMappingPerApp.get(appName);
if (roleToWarningMap != null) {
roleToWarningMap.clear();
}
roleToWarningMappingPerApp.remove(appName);
} | [
"public",
"void",
"removeRoleToWarningMapping",
"(",
"String",
"appName",
")",
"{",
"Map",
"<",
"String",
",",
"Boolean",
">",
"roleToWarningMap",
"=",
"roleToWarningMappingPerApp",
".",
"get",
"(",
"appName",
")",
";",
"if",
"(",
"roleToWarningMap",
"!=",
"null... | Removes the role to warning mappings for a given application.
@param appName the name of the application for which the mappings belong to. | [
"Removes",
"the",
"role",
"to",
"warning",
"mappings",
"for",
"a",
"given",
"application",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.appbnd/src/com/ibm/ws/security/appbnd/internal/delegation/DefaultDelegationProvider.java#L225-L231 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.logging.hpel/src/com/ibm/ejs/ras/hpel/HpelSystemStream.java | HpelSystemStream.determineHandlers | private static void determineHandlers() {
/*
* find the handlers that we are dispatching to
*/
if (textHandler != null && !logRepositoryConfiguration.isTextEnabled())
textHandler = null ;
// Don't do this work if only text and text is not enabled (if so, it will always be nul... | java | private static void determineHandlers() {
/*
* find the handlers that we are dispatching to
*/
if (textHandler != null && !logRepositoryConfiguration.isTextEnabled())
textHandler = null ;
// Don't do this work if only text and text is not enabled (if so, it will always be nul... | [
"private",
"static",
"void",
"determineHandlers",
"(",
")",
"{",
"/*\n * find the handlers that we are dispatching to\n */",
"if",
"(",
"textHandler",
"!=",
"null",
"&&",
"!",
"logRepositoryConfiguration",
".",
"isTextEnabled",
"(",
")",
")",
"textHandler",
... | determine two handlers needed by the repository | [
"determine",
"two",
"handlers",
"needed",
"by",
"the",
"repository"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.logging.hpel/src/com/ibm/ejs/ras/hpel/HpelSystemStream.java#L1040-L1058 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/AnycastOutputHandler.java | AnycastOutputHandler.close | public void close()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "close");
Enumeration streams = null;
synchronized (this)
{
synchronized (streamTable)
{
closed = true;
closeBrowserSessionsInternal();
streams = streamTable.elem... | java | public void close()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "close");
Enumeration streams = null;
synchronized (this)
{
synchronized (streamTable)
{
closed = true;
closeBrowserSessionsInternal();
streams = streamTable.elem... | [
"public",
"void",
"close",
"(",
")",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"SibTr",
".",
"entry",
"(",
"tc",
",",
"\"close\"",
")",
";",
"Enumeration",
"streams",
"=",
... | Cleans up the non-persistent state. No methods on the ControlHandler interface should be called after this is called. | [
"Cleans",
"up",
"the",
"non",
"-",
"persistent",
"state",
".",
"No",
"methods",
"on",
"the",
"ControlHandler",
"interface",
"should",
"be",
"called",
"after",
"this",
"is",
"called",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/AnycastOutputHandler.java#L912-L944 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/AnycastOutputHandler.java | AnycastOutputHandler.cleanup | public boolean cleanup(boolean flushStreams, boolean redriveDeletionThread)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "cleanup",
new Object[]{Boolean.valueOf(flushStreams), Boolean.valueOf(redriveDeletionThread)});
boolean retvalue = false;
// first che... | java | public boolean cleanup(boolean flushStreams, boolean redriveDeletionThread)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "cleanup",
new Object[]{Boolean.valueOf(flushStreams), Boolean.valueOf(redriveDeletionThread)});
boolean retvalue = false;
// first che... | [
"public",
"boolean",
"cleanup",
"(",
"boolean",
"flushStreams",
",",
"boolean",
"redriveDeletionThread",
")",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"SibTr",
".",
"entry",
"(",
... | Cleanup the state in this AnycastOutputHandler. Called when this localisation is being
deleted.
@param flushStreams If true, need to flush the streams, else do not need to flush all streams. The cleanup
may be asynchronous in the former case.
@param redriveDeletionThread If the cleanup is asynchronous, this class needs... | [
"Cleanup",
"the",
"state",
"in",
"this",
"AnycastOutputHandler",
".",
"Called",
"when",
"this",
"localisation",
"is",
"being",
"deleted",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/AnycastOutputHandler.java#L998-L1034 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/AnycastOutputHandler.java | AnycastOutputHandler.getAOStream | public final AOStream getAOStream(String streamKey, SIBUuid12 streamId)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "getAOStream", new Object[]{streamKey, streamId});
StreamInfo streamInfo = getStreamInfo(streamKey, streamId);
if (streamInfo != null)
{
... | java | public final AOStream getAOStream(String streamKey, SIBUuid12 streamId)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "getAOStream", new Object[]{streamKey, streamId});
StreamInfo streamInfo = getStreamInfo(streamKey, streamId);
if (streamInfo != null)
{
... | [
"public",
"final",
"AOStream",
"getAOStream",
"(",
"String",
"streamKey",
",",
"SIBUuid12",
"streamId",
")",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"SibTr",
".",
"entry",
"(",... | for unit testing | [
"for",
"unit",
"testing"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/AnycastOutputHandler.java#L1108-L1122 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/AnycastOutputHandler.java | AnycastOutputHandler.handleControlBrowseStatus | private final void handleControlBrowseStatus(SIBUuid8 remoteME, SIBUuid12 gatheringTargetDestUuid, long browseId, int status)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "handleControlBrowseStatus",
new Object[] {remoteME, gatheringTargetDestUuid, Long.valueOf(br... | java | private final void handleControlBrowseStatus(SIBUuid8 remoteME, SIBUuid12 gatheringTargetDestUuid, long browseId, int status)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "handleControlBrowseStatus",
new Object[] {remoteME, gatheringTargetDestUuid, Long.valueOf(br... | [
"private",
"final",
"void",
"handleControlBrowseStatus",
"(",
"SIBUuid8",
"remoteME",
",",
"SIBUuid12",
"gatheringTargetDestUuid",
",",
"long",
"browseId",
",",
"int",
"status",
")",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc... | Method to handle a ControlBrowseStatus message from an RME
@param remoteME The UUID of the RME
@param browseId The unique browseId, relative to this RME
@param status The status | [
"Method",
"to",
"handle",
"a",
"ControlBrowseStatus",
"message",
"from",
"an",
"RME"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/AnycastOutputHandler.java#L1447-L1475 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/AnycastOutputHandler.java | AnycastOutputHandler.removeBrowserSession | public final void removeBrowserSession(AOBrowserSessionKey key)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "removeBrowserSession", key);
browserSessionTable.remove(key);
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.exit(tc, "r... | java | public final void removeBrowserSession(AOBrowserSessionKey key)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "removeBrowserSession", key);
browserSessionTable.remove(key);
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.exit(tc, "r... | [
"public",
"final",
"void",
"removeBrowserSession",
"(",
"AOBrowserSessionKey",
"key",
")",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"SibTr",
".",
"entry",
"(",
"tc",
",",
"\"rem... | Remove an AOBrowserSession that is already closed
@param key The key of the session | [
"Remove",
"an",
"AOBrowserSession",
"that",
"is",
"already",
"closed"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/AnycastOutputHandler.java#L1481-L1491 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/AnycastOutputHandler.java | AnycastOutputHandler.getStreamInfo | private final StreamInfo getStreamInfo(String streamKey, SIBUuid12 streamId)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "getStreamInfo", new Object[]{streamKey, streamId});
StreamInfo sinfo = streamTable.get(streamKey);
if ((sinfo != null) && sinfo.streamId.eq... | java | private final StreamInfo getStreamInfo(String streamKey, SIBUuid12 streamId)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "getStreamInfo", new Object[]{streamKey, streamId});
StreamInfo sinfo = streamTable.get(streamKey);
if ((sinfo != null) && sinfo.streamId.eq... | [
"private",
"final",
"StreamInfo",
"getStreamInfo",
"(",
"String",
"streamKey",
",",
"SIBUuid12",
"streamId",
")",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"SibTr",
".",
"entry",
... | Helper method used to dispatch a message received for a particular stream.
Handles its own synchronization
@param remoteMEId
@param streamId
@return the StreamInfo, if there is one that matches the parameters, else null | [
"Helper",
"method",
"used",
"to",
"dispatch",
"a",
"message",
"received",
"for",
"a",
"particular",
"stream",
".",
"Handles",
"its",
"own",
"synchronization"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/AnycastOutputHandler.java#L1944-L1957 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/AnycastOutputHandler.java | AnycastOutputHandler.streamIsFlushed | public final void streamIsFlushed(AOStream stream)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "streamIsFlushed", stream);
// we schedule an asynchronous removal of the persistent data
synchronized (streamTable)
{
String key = SIMPUtils.getRemoteGetK... | java | public final void streamIsFlushed(AOStream stream)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "streamIsFlushed", stream);
// we schedule an asynchronous removal of the persistent data
synchronized (streamTable)
{
String key = SIMPUtils.getRemoteGetK... | [
"public",
"final",
"void",
"streamIsFlushed",
"(",
"AOStream",
"stream",
")",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"SibTr",
".",
"entry",
"(",
"tc",
",",
"\"streamIsFlushed\... | Callback from a stream, that it has been flushed
@param stream | [
"Callback",
"from",
"a",
"stream",
"that",
"it",
"has",
"been",
"flushed"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/AnycastOutputHandler.java#L1963-L1986 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/AnycastOutputHandler.java | AnycastOutputHandler.persistLockAndTick | public final AOValue persistLockAndTick(TransactionCommon t, AOStream stream, long tick,
SIMPMessage msg, int storagePolicy, long waitTime, long prevTick) throws Exception
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "persistLockAndTick",
new Object[] {... | java | public final AOValue persistLockAndTick(TransactionCommon t, AOStream stream, long tick,
SIMPMessage msg, int storagePolicy, long waitTime, long prevTick) throws Exception
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "persistLockAndTick",
new Object[] {... | [
"public",
"final",
"AOValue",
"persistLockAndTick",
"(",
"TransactionCommon",
"t",
",",
"AOStream",
"stream",
",",
"long",
"tick",
",",
"SIMPMessage",
"msg",
",",
"int",
"storagePolicy",
",",
"long",
"waitTime",
",",
"long",
"prevTick",
")",
"throws",
"Exception... | Helper method called by the AOStream when to persistently lock a message and create a persistent
tick in the protocol stream
@param t the transaction
@param stream the stream making this call
@param tick the tick in the stream
@param msg the message to be persistently locked (it is already non-persitently locked)
@para... | [
"Helper",
"method",
"called",
"by",
"the",
"AOStream",
"when",
"to",
"persistently",
"lock",
"a",
"message",
"and",
"create",
"a",
"persistent",
"tick",
"in",
"the",
"protocol",
"stream"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/AnycastOutputHandler.java#L2626-L2662 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/AnycastOutputHandler.java | AnycastOutputHandler.cleanupTicks | public final void cleanupTicks(StreamInfo sinfo, TransactionCommon t, ArrayList valueTicks) throws MessageStoreException, SIResourceException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "cleanupTicks", new Object[]{sinfo, t, valueTicks});
try {
int length =... | java | public final void cleanupTicks(StreamInfo sinfo, TransactionCommon t, ArrayList valueTicks) throws MessageStoreException, SIResourceException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "cleanupTicks", new Object[]{sinfo, t, valueTicks});
try {
int length =... | [
"public",
"final",
"void",
"cleanupTicks",
"(",
"StreamInfo",
"sinfo",
",",
"TransactionCommon",
"t",
",",
"ArrayList",
"valueTicks",
")",
"throws",
"MessageStoreException",
",",
"SIResourceException",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",... | Helper method called by the AOStream when a persistent tick representing a persistently locked
message should be removed since we are flushing or cleaning up state.
@param t the transaction
@param sinfo the stream this msgs is on
@param storedTick the persistent tick
@throws SIResourceException
@throws Exception | [
"Helper",
"method",
"called",
"by",
"the",
"AOStream",
"when",
"a",
"persistent",
"tick",
"representing",
"a",
"persistently",
"locked",
"message",
"should",
"be",
"removed",
"since",
"we",
"are",
"flushing",
"or",
"cleaning",
"up",
"state",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/AnycastOutputHandler.java#L2673-L2731 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/AnycastOutputHandler.java | AnycastOutputHandler.writeStartedFlush | public final Item writeStartedFlush(TransactionCommon t, AOStream stream) throws Exception
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "writeStartedFlush");
String key =
SIMPUtils.getRemoteGetKey(stream.getRemoteMEUuid(), stream.getGatheringTargetDestUuid()... | java | public final Item writeStartedFlush(TransactionCommon t, AOStream stream) throws Exception
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "writeStartedFlush");
String key =
SIMPUtils.getRemoteGetKey(stream.getRemoteMEUuid(), stream.getGatheringTargetDestUuid()... | [
"public",
"final",
"Item",
"writeStartedFlush",
"(",
"TransactionCommon",
"t",
",",
"AOStream",
"stream",
")",
"throws",
"Exception",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"Sib... | Helper method used by AOStream to persistently record that flush has been started
@param t the transaction
@param stream the stream making this call
@return the Item written
@throws Exception | [
"Helper",
"method",
"used",
"by",
"AOStream",
"to",
"persistently",
"record",
"that",
"flush",
"has",
"been",
"started"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/AnycastOutputHandler.java#L2740-L2782 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/AnycastOutputHandler.java | AnycastOutputHandler.writtenStartedFlush | public final void writtenStartedFlush(AOStream stream, Item startedFlushItem)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "writtenStartedFlush");
String key =
SIMPUtils.getRemoteGetKey(stream.getRemoteMEUuid(), stream.getGatheringTargetDestUuid());
Stre... | java | public final void writtenStartedFlush(AOStream stream, Item startedFlushItem)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "writtenStartedFlush");
String key =
SIMPUtils.getRemoteGetKey(stream.getRemoteMEUuid(), stream.getGatheringTargetDestUuid());
Stre... | [
"public",
"final",
"void",
"writtenStartedFlush",
"(",
"AOStream",
"stream",
",",
"Item",
"startedFlushItem",
")",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"SibTr",
".",
"entry",
... | Callback when the Item that records that flush has been started has been committed to persistent storage
@param stream The stream making this call
@param startedFlushItem The item written | [
"Callback",
"when",
"the",
"Item",
"that",
"records",
"that",
"flush",
"has",
"been",
"started",
"has",
"been",
"committed",
"to",
"persistent",
"storage"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/AnycastOutputHandler.java#L2789-L2835 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/AnycastOutputHandler.java | AnycastOutputHandler.getItemStream | public SIMPItemStream getItemStream()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "getItemStream");
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.exit(tc, "getItemStream", containerItemStream);
return (SIMPItemStream) containerI... | java | public SIMPItemStream getItemStream()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "getItemStream");
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.exit(tc, "getItemStream", containerItemStream);
return (SIMPItemStream) containerI... | [
"public",
"SIMPItemStream",
"getItemStream",
"(",
")",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"SibTr",
".",
"entry",
"(",
"tc",
",",
"\"getItemStream\"",
")",
";",
"if",
"("... | Return the SIMPItemStream associated with this AOH. This method is needed
for proper cleanup of remote durable subscriptions since the usual
item stream owned by the DestinationHandler is not used.
@return The SIMPItemStream passed to this AOH during instantiation. | [
"Return",
"the",
"SIMPItemStream",
"associated",
"with",
"this",
"AOH",
".",
"This",
"method",
"is",
"needed",
"for",
"proper",
"cleanup",
"of",
"remote",
"durable",
"subscriptions",
"since",
"the",
"usual",
"item",
"stream",
"owned",
"by",
"the",
"DestinationHa... | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/AnycastOutputHandler.java#L2952-L2961 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/AnycastOutputHandler.java | AnycastOutputHandler.getDestName | public final String getDestName()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "getDestName");
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.exit(tc, "getDestName", destName);
return destName;
} | java | public final String getDestName()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "getDestName");
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.exit(tc, "getDestName", destName);
return destName;
} | [
"public",
"final",
"String",
"getDestName",
"(",
")",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"SibTr",
".",
"entry",
"(",
"tc",
",",
"\"getDestName\"",
")",
";",
"if",
"(",... | Return the destination name which this AOH is associated with.
@return The destination name passed to this AOH during instantiation. | [
"Return",
"the",
"destination",
"name",
"which",
"this",
"AOH",
"is",
"associated",
"with",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/AnycastOutputHandler.java#L2968-L2977 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/AnycastOutputHandler.java | AnycastOutputHandler.getDestUUID | public final SIBUuid12 getDestUUID()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
{
SibTr.entry(tc, "getDestUUID");
SibTr.exit(tc, "getDestUUID", destName);
}
return destUuid;
} | java | public final SIBUuid12 getDestUUID()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
{
SibTr.entry(tc, "getDestUUID");
SibTr.exit(tc, "getDestUUID", destName);
}
return destUuid;
} | [
"public",
"final",
"SIBUuid12",
"getDestUUID",
"(",
")",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"{",
"SibTr",
".",
"entry",
"(",
"tc",
",",
"\"getDestUUID\"",
")",
";",
"S... | Return the destination UUID which this AOH is associated with. This method
is needed for proper cleanup of remote durable subscriptions since pseudo
destinations are used, rather than the destination normally associated with the
DestinationHandler.
@return The destination name passed to this AOH during instantiation. | [
"Return",
"the",
"destination",
"UUID",
"which",
"this",
"AOH",
"is",
"associated",
"with",
".",
"This",
"method",
"is",
"needed",
"for",
"proper",
"cleanup",
"of",
"remote",
"durable",
"subscriptions",
"since",
"pseudo",
"destinations",
"are",
"used",
"rather",... | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/AnycastOutputHandler.java#L2987-L2996 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/AnycastOutputHandler.java | AnycastOutputHandler.forceFlushAtSource | public void forceFlushAtSource(SIBUuid8 remoteUuid, SIBUuid12 gatheringTargetDestUuid)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "forceFlushAtSource", new Object[] {remoteUuid, gatheringTargetDestUuid});
StreamInfo sinfo;
boolean success = false;
String ... | java | public void forceFlushAtSource(SIBUuid8 remoteUuid, SIBUuid12 gatheringTargetDestUuid)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "forceFlushAtSource", new Object[] {remoteUuid, gatheringTargetDestUuid});
StreamInfo sinfo;
boolean success = false;
String ... | [
"public",
"void",
"forceFlushAtSource",
"(",
"SIBUuid8",
"remoteUuid",
",",
"SIBUuid12",
"gatheringTargetDestUuid",
")",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"SibTr",
".",
"entr... | If the RME has been deleted then the stream needs to be flushed to unlock
any messaqes on this DME.
@param remoteME the uuid of the remote ME | [
"If",
"the",
"RME",
"has",
"been",
"deleted",
"then",
"the",
"stream",
"needs",
"to",
"be",
"flushed",
"to",
"unlock",
"any",
"messaqes",
"on",
"this",
"DME",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/AnycastOutputHandler.java#L3086-L3203 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/AnycastOutputHandler.java | AnycastOutputHandler.deleteAndUnlockPersistentStream | private void deleteAndUnlockPersistentStream(StreamInfo sinfo, ArrayList valueTicks) throws MessageStoreException, SIRollbackException, SIConnectionLostException, SIIncorrectCallException, SIResourceException, SIErrorException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc... | java | private void deleteAndUnlockPersistentStream(StreamInfo sinfo, ArrayList valueTicks) throws MessageStoreException, SIRollbackException, SIConnectionLostException, SIIncorrectCallException, SIResourceException, SIErrorException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc... | [
"private",
"void",
"deleteAndUnlockPersistentStream",
"(",
"StreamInfo",
"sinfo",
",",
"ArrayList",
"valueTicks",
")",
"throws",
"MessageStoreException",
",",
"SIRollbackException",
",",
"SIConnectionLostException",
",",
"SIIncorrectCallException",
",",
"SIResourceException",
... | remove the persistent ticks and the itemstream and started-flush item | [
"remove",
"the",
"persistent",
"ticks",
"and",
"the",
"itemstream",
"and",
"started",
"-",
"flush",
"item"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/AnycastOutputHandler.java#L3207-L3230 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/internal/BNFHeadersImpl.java | BNFHeadersImpl.init | protected void init(boolean useDirect, int outSize, int inSize, int cacheSize) {
this.useDirectBuffer = useDirect;
this.outgoingHdrBufferSize = outSize;
this.incomingBufferSize = inSize;
// if cache size has increased, then allocate the larger bytecache
// array, but don't chang... | java | protected void init(boolean useDirect, int outSize, int inSize, int cacheSize) {
this.useDirectBuffer = useDirect;
this.outgoingHdrBufferSize = outSize;
this.incomingBufferSize = inSize;
// if cache size has increased, then allocate the larger bytecache
// array, but don't chang... | [
"protected",
"void",
"init",
"(",
"boolean",
"useDirect",
",",
"int",
"outSize",
",",
"int",
"inSize",
",",
"int",
"cacheSize",
")",
"{",
"this",
".",
"useDirectBuffer",
"=",
"useDirect",
";",
"this",
".",
"outgoingHdrBufferSize",
"=",
"outSize",
";",
"this"... | Initialize this class instance with the chosen parse configuration
options.
@param useDirect -- use direct ByteBuffers or indirect
@param outSize -- size of buffers to use while marshalling headers
@param inSize -- size of buffers to use while parsing headers
@param cacheSize -- byte cache size of optimized parsing | [
"Initialize",
"this",
"class",
"instance",
"with",
"the",
"chosen",
"parse",
"configuration",
"options",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/internal/BNFHeadersImpl.java#L271-L282 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/internal/BNFHeadersImpl.java | BNFHeadersImpl.addParseBuffer | public void addParseBuffer(WsByteBuffer buffer) {
// increment where we're about to put the new buffer in
int index = ++this.parseIndex;
if (null == this.parseBuffers) {
// first parse buffer to track
this.parseBuffers = new WsByteBuffer[BUFFERS_INITIAL_SIZE];
... | java | public void addParseBuffer(WsByteBuffer buffer) {
// increment where we're about to put the new buffer in
int index = ++this.parseIndex;
if (null == this.parseBuffers) {
// first parse buffer to track
this.parseBuffers = new WsByteBuffer[BUFFERS_INITIAL_SIZE];
... | [
"public",
"void",
"addParseBuffer",
"(",
"WsByteBuffer",
"buffer",
")",
"{",
"// increment where we're about to put the new buffer in",
"int",
"index",
"=",
"++",
"this",
".",
"parseIndex",
";",
"if",
"(",
"null",
"==",
"this",
".",
"parseBuffers",
")",
"{",
"// f... | Save a reference to a new buffer with header parse information. This is
not part of the "created list" and will not be released by this message
class.
@param buffer | [
"Save",
"a",
"reference",
"to",
"a",
"new",
"buffer",
"with",
"header",
"parse",
"information",
".",
"This",
"is",
"not",
"part",
"of",
"the",
"created",
"list",
"and",
"will",
"not",
"be",
"released",
"by",
"this",
"message",
"class",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/internal/BNFHeadersImpl.java#L295-L324 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/internal/BNFHeadersImpl.java | BNFHeadersImpl.addToCreatedBuffer | public void addToCreatedBuffer(WsByteBuffer buffer) {
// increment where we're about to put the new buffer in
int index = ++this.createdIndex;
if (null == this.myCreatedBuffers) {
// first allocation
this.myCreatedBuffers = new WsByteBuffer[BUFFERS_INITIAL_SIZE];
... | java | public void addToCreatedBuffer(WsByteBuffer buffer) {
// increment where we're about to put the new buffer in
int index = ++this.createdIndex;
if (null == this.myCreatedBuffers) {
// first allocation
this.myCreatedBuffers = new WsByteBuffer[BUFFERS_INITIAL_SIZE];
... | [
"public",
"void",
"addToCreatedBuffer",
"(",
"WsByteBuffer",
"buffer",
")",
"{",
"// increment where we're about to put the new buffer in",
"int",
"index",
"=",
"++",
"this",
".",
"createdIndex",
";",
"if",
"(",
"null",
"==",
"this",
".",
"myCreatedBuffers",
")",
"{... | Add a buffer on the list that will be manually released later.
@param buffer | [
"Add",
"a",
"buffer",
"on",
"the",
"list",
"that",
"will",
"be",
"manually",
"released",
"later",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/internal/BNFHeadersImpl.java#L331-L348 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/internal/BNFHeadersImpl.java | BNFHeadersImpl.clear | public void clear() {
final boolean bTrace = TraceComponent.isAnyTracingEnabled();
if (bTrace && tc.isEntryEnabled()) {
Tr.entry(tc, "clear");
}
clearAllHeaders();
this.eohPosition = HeaderStorage.NOTSET;
this.currentElem = null;
this.stateOfParsing =... | java | public void clear() {
final boolean bTrace = TraceComponent.isAnyTracingEnabled();
if (bTrace && tc.isEntryEnabled()) {
Tr.entry(tc, "clear");
}
clearAllHeaders();
this.eohPosition = HeaderStorage.NOTSET;
this.currentElem = null;
this.stateOfParsing =... | [
"public",
"void",
"clear",
"(",
")",
"{",
"final",
"boolean",
"bTrace",
"=",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
";",
"if",
"(",
"bTrace",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"{",
"Tr",
".",
"entry",
"(",
"tc",
",",
... | Clear out information on this object so that it can be re-used. | [
"Clear",
"out",
"information",
"on",
"this",
"object",
"so",
"that",
"it",
"can",
"be",
"re",
"-",
"used",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/internal/BNFHeadersImpl.java#L533-L574 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/internal/BNFHeadersImpl.java | BNFHeadersImpl.clearBuffers | private void clearBuffers() {
// simply null out the parse buffers list, then release all the created buffers
final boolean bTrace = TraceComponent.isAnyTracingEnabled();
for (int i = 0; i <= this.parseIndex; i++) {
if (bTrace && tc.isDebugEnabled()) {
Tr.debug(tc, "R... | java | private void clearBuffers() {
// simply null out the parse buffers list, then release all the created buffers
final boolean bTrace = TraceComponent.isAnyTracingEnabled();
for (int i = 0; i <= this.parseIndex; i++) {
if (bTrace && tc.isDebugEnabled()) {
Tr.debug(tc, "R... | [
"private",
"void",
"clearBuffers",
"(",
")",
"{",
"// simply null out the parse buffers list, then release all the created buffers",
"final",
"boolean",
"bTrace",
"=",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
... | Clear the array of buffers used during the parsing or marshalling of
headers. | [
"Clear",
"the",
"array",
"of",
"buffers",
"used",
"during",
"the",
"parsing",
"or",
"marshalling",
"of",
"headers",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/internal/BNFHeadersImpl.java#L580-L599 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/internal/BNFHeadersImpl.java | BNFHeadersImpl.debug | public void debug() {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "*** Begin Header Debug ***");
HeaderElement elem = this.hdrSequence;
while (null != elem) {
Tr.debug(tc, elem.getName() + ": " + elem.getDebugValue());
... | java | public void debug() {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "*** Begin Header Debug ***");
HeaderElement elem = this.hdrSequence;
while (null != elem) {
Tr.debug(tc, elem.getName() + ": " + elem.getDebugValue());
... | [
"public",
"void",
"debug",
"(",
")",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isDebugEnabled",
"(",
")",
")",
"{",
"Tr",
".",
"debug",
"(",
"tc",
",",
"\"*** Begin Header Debug ***\"",
")",
";",
"HeaderEleme... | Print debug information on the headers to the RAS tracing log. | [
"Print",
"debug",
"information",
"on",
"the",
"headers",
"to",
"the",
"RAS",
"tracing",
"log",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/internal/BNFHeadersImpl.java#L604-L615 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/internal/BNFHeadersImpl.java | BNFHeadersImpl.destroy | protected void destroy() {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "Destroying these headers: " + this);
}
// if we have headers present, or reference parse buffers (i.e.
// the first header parsed threw an error perhaps), then clear
... | java | protected void destroy() {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "Destroying these headers: " + this);
}
// if we have headers present, or reference parse buffers (i.e.
// the first header parsed threw an error perhaps), then clear
... | [
"protected",
"void",
"destroy",
"(",
")",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isDebugEnabled",
"(",
")",
")",
"{",
"Tr",
".",
"debug",
"(",
"tc",
",",
"\"Destroying these headers: \"",
"+",
"this",
")",... | Completely clear out all the information on this object when it
is no longer used. | [
"Completely",
"clear",
"out",
"all",
"the",
"information",
"on",
"this",
"object",
"when",
"it",
"is",
"no",
"longer",
"used",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/internal/BNFHeadersImpl.java#L621-L638 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/internal/BNFHeadersImpl.java | BNFHeadersImpl.writeByteArray | protected void writeByteArray(ObjectOutput output, byte[] data) throws IOException {
if (null == data || 0 == data.length) {
output.writeInt(-1);
} else {
output.writeInt(data.length);
output.write(data);
}
} | java | protected void writeByteArray(ObjectOutput output, byte[] data) throws IOException {
if (null == data || 0 == data.length) {
output.writeInt(-1);
} else {
output.writeInt(data.length);
output.write(data);
}
} | [
"protected",
"void",
"writeByteArray",
"(",
"ObjectOutput",
"output",
",",
"byte",
"[",
"]",
"data",
")",
"throws",
"IOException",
"{",
"if",
"(",
"null",
"==",
"data",
"||",
"0",
"==",
"data",
".",
"length",
")",
"{",
"output",
".",
"writeInt",
"(",
"... | Write information for the input data to the output stream. If the input
data is null or empty, this will write a -1 length marker.
@param output
@param data
@throws IOException | [
"Write",
"information",
"for",
"the",
"input",
"data",
"to",
"the",
"output",
"stream",
".",
"If",
"the",
"input",
"data",
"is",
"null",
"or",
"empty",
"this",
"will",
"write",
"a",
"-",
"1",
"length",
"marker",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/internal/BNFHeadersImpl.java#L713-L720 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/internal/BNFHeadersImpl.java | BNFHeadersImpl.scribbleWhiteSpace | private void scribbleWhiteSpace(WsByteBuffer buffer, int start, int stop) {
if (buffer.hasArray()) {
// buffer has a backing array so directly update that
final byte[] data = buffer.array();
final int offset = buffer.arrayOffset();
int myStart = start + offset;
... | java | private void scribbleWhiteSpace(WsByteBuffer buffer, int start, int stop) {
if (buffer.hasArray()) {
// buffer has a backing array so directly update that
final byte[] data = buffer.array();
final int offset = buffer.arrayOffset();
int myStart = start + offset;
... | [
"private",
"void",
"scribbleWhiteSpace",
"(",
"WsByteBuffer",
"buffer",
",",
"int",
"start",
",",
"int",
"stop",
")",
"{",
"if",
"(",
"buffer",
".",
"hasArray",
"(",
")",
")",
"{",
"// buffer has a backing array so directly update that",
"final",
"byte",
"[",
"]... | Overlay whitespace into the input buffer using the provided starting and
stopping positions.
@param buffer
@param start
@param stop | [
"Overlay",
"whitespace",
"into",
"the",
"input",
"buffer",
"using",
"the",
"provided",
"starting",
"and",
"stopping",
"positions",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/internal/BNFHeadersImpl.java#L1196-L1227 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/internal/BNFHeadersImpl.java | BNFHeadersImpl.eraseValue | private void eraseValue(HeaderElement elem) {
// wipe out the removed value
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "Erasing existing header: " + elem.getName());
}
int next_index = this.lastCRLFBufferIndex;
int next_pos = this.... | java | private void eraseValue(HeaderElement elem) {
// wipe out the removed value
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "Erasing existing header: " + elem.getName());
}
int next_index = this.lastCRLFBufferIndex;
int next_pos = this.... | [
"private",
"void",
"eraseValue",
"(",
"HeaderElement",
"elem",
")",
"{",
"// wipe out the removed value",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isDebugEnabled",
"(",
")",
")",
"{",
"Tr",
".",
"debug",
"(",
"tc",
... | Method to completely erase the input header from the parse buffers.
@param elem | [
"Method",
"to",
"completely",
"erase",
"the",
"input",
"header",
"from",
"the",
"parse",
"buffers",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/internal/BNFHeadersImpl.java#L1234-L1255 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/internal/BNFHeadersImpl.java | BNFHeadersImpl.overlayBytes | private int overlayBytes(byte[] data, int inOffset, int inLength, int inIndex) {
int length = inLength;
int offset = inOffset;
int index = inIndex;
WsByteBuffer buffer = this.parseBuffers[index];
if (-1 == length) {
length = data.length;
}
while (index... | java | private int overlayBytes(byte[] data, int inOffset, int inLength, int inIndex) {
int length = inLength;
int offset = inOffset;
int index = inIndex;
WsByteBuffer buffer = this.parseBuffers[index];
if (-1 == length) {
length = data.length;
}
while (index... | [
"private",
"int",
"overlayBytes",
"(",
"byte",
"[",
"]",
"data",
",",
"int",
"inOffset",
",",
"int",
"inLength",
",",
"int",
"inIndex",
")",
"{",
"int",
"length",
"=",
"inLength",
";",
"int",
"offset",
"=",
"inOffset",
";",
"int",
"index",
"=",
"inInde... | Utility method to overlay the input bytes into the parse buffers,
starting at the input index and moving forward as needed.
@param data
@param inOffset
@param inLength
@param inIndex
@return index of last buffer updated | [
"Utility",
"method",
"to",
"overlay",
"the",
"input",
"bytes",
"into",
"the",
"parse",
"buffers",
"starting",
"at",
"the",
"input",
"index",
"and",
"moving",
"forward",
"as",
"needed",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/internal/BNFHeadersImpl.java#L1267-L1290 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/internal/BNFHeadersImpl.java | BNFHeadersImpl.overlayValue | private void overlayValue(HeaderElement elem) {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "Overlaying existing header: " + elem.getName());
}
int next_index = this.lastCRLFBufferIndex;
int next_pos = this.lastCRLFPosition;
if (nul... | java | private void overlayValue(HeaderElement elem) {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "Overlaying existing header: " + elem.getName());
}
int next_index = this.lastCRLFBufferIndex;
int next_pos = this.lastCRLFPosition;
if (nul... | [
"private",
"void",
"overlayValue",
"(",
"HeaderElement",
"elem",
")",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isDebugEnabled",
"(",
")",
")",
"{",
"Tr",
".",
"debug",
"(",
"tc",
",",
"\"Overlaying existing he... | Method to overlay the new header value onto the older value in the parse
buffers.
@param elem | [
"Method",
"to",
"overlay",
"the",
"new",
"header",
"value",
"onto",
"the",
"older",
"value",
"in",
"the",
"parse",
"buffers",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/internal/BNFHeadersImpl.java#L1298-L1326 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/internal/BNFHeadersImpl.java | BNFHeadersImpl.marshallAddedHeaders | private WsByteBuffer[] marshallAddedHeaders(WsByteBuffer[] inBuffers, int index) {
WsByteBuffer[] buffers = inBuffers;
buffers[index] = allocateBuffer(this.outgoingHdrBufferSize);
for (HeaderElement elem = this.hdrSequence; null != elem; elem = elem.nextSequence) {
if (elem.wasAdded(... | java | private WsByteBuffer[] marshallAddedHeaders(WsByteBuffer[] inBuffers, int index) {
WsByteBuffer[] buffers = inBuffers;
buffers[index] = allocateBuffer(this.outgoingHdrBufferSize);
for (HeaderElement elem = this.hdrSequence; null != elem; elem = elem.nextSequence) {
if (elem.wasAdded(... | [
"private",
"WsByteBuffer",
"[",
"]",
"marshallAddedHeaders",
"(",
"WsByteBuffer",
"[",
"]",
"inBuffers",
",",
"int",
"index",
")",
"{",
"WsByteBuffer",
"[",
"]",
"buffers",
"=",
"inBuffers",
";",
"buffers",
"[",
"index",
"]",
"=",
"allocateBuffer",
"(",
"thi... | Marshall the newly added headers from the sequence list to the output
buffers starting at the input index on the list.
@param inBuffers
@param index
@return WsByteBuffer[] | [
"Marshall",
"the",
"newly",
"added",
"headers",
"from",
"the",
"sequence",
"list",
"to",
"the",
"output",
"buffers",
"starting",
"at",
"the",
"input",
"index",
"on",
"the",
"list",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/internal/BNFHeadersImpl.java#L1336-L1350 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/internal/BNFHeadersImpl.java | BNFHeadersImpl.clearAllHeaders | private void clearAllHeaders() {
final boolean bTrace = TraceComponent.isAnyTracingEnabled();
if (bTrace && tc.isEntryEnabled()) {
Tr.entry(tc, "clearAllHeaders()");
}
HeaderElement elem = this.hdrSequence;
while (null != elem) {
final HeaderElement next ... | java | private void clearAllHeaders() {
final boolean bTrace = TraceComponent.isAnyTracingEnabled();
if (bTrace && tc.isEntryEnabled()) {
Tr.entry(tc, "clearAllHeaders()");
}
HeaderElement elem = this.hdrSequence;
while (null != elem) {
final HeaderElement next ... | [
"private",
"void",
"clearAllHeaders",
"(",
")",
"{",
"final",
"boolean",
"bTrace",
"=",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
";",
"if",
"(",
"bTrace",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"{",
"Tr",
".",
"entry",
"(",
"tc"... | Clear all traces of the headers from storage. | [
"Clear",
"all",
"traces",
"of",
"the",
"headers",
"from",
"storage",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/internal/BNFHeadersImpl.java#L1657-L1684 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/internal/BNFHeadersImpl.java | BNFHeadersImpl.removeSpecialHeader | public void removeSpecialHeader(HeaderKeys key) {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "removeSpecialHeader(h): " + key.getName());
}
removeHdrInstances(findHeader(key), FILTER_NO);
} | java | public void removeSpecialHeader(HeaderKeys key) {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "removeSpecialHeader(h): " + key.getName());
}
removeHdrInstances(findHeader(key), FILTER_NO);
} | [
"public",
"void",
"removeSpecialHeader",
"(",
"HeaderKeys",
"key",
")",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isDebugEnabled",
"(",
")",
")",
"{",
"Tr",
".",
"debug",
"(",
"tc",
",",
"\"removeSpecialHeader(... | Remove all instances of a special header that does
not require the headerkey filterRemove method to be called.
@param key | [
"Remove",
"all",
"instances",
"of",
"a",
"special",
"header",
"that",
"does",
"not",
"require",
"the",
"headerkey",
"filterRemove",
"method",
"to",
"be",
"called",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/internal/BNFHeadersImpl.java#L1778-L1783 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/internal/BNFHeadersImpl.java | BNFHeadersImpl.returnCurrentBuffer | public WsByteBuffer returnCurrentBuffer() {
WsByteBuffer buff = null;
if (HeaderStorage.NOTSET != this.parseIndex) {
buff = this.parseBuffers[this.parseIndex];
this.parseIndex--;
}
return buff;
} | java | public WsByteBuffer returnCurrentBuffer() {
WsByteBuffer buff = null;
if (HeaderStorage.NOTSET != this.parseIndex) {
buff = this.parseBuffers[this.parseIndex];
this.parseIndex--;
}
return buff;
} | [
"public",
"WsByteBuffer",
"returnCurrentBuffer",
"(",
")",
"{",
"WsByteBuffer",
"buff",
"=",
"null",
";",
"if",
"(",
"HeaderStorage",
".",
"NOTSET",
"!=",
"this",
".",
"parseIndex",
")",
"{",
"buff",
"=",
"this",
".",
"parseBuffers",
"[",
"this",
".",
"par... | Method to remove the current parsing buffer from this object's
ownership so it can be used by others.
@return WsByteBuffer (null if there is no current buffer) | [
"Method",
"to",
"remove",
"the",
"current",
"parsing",
"buffer",
"from",
"this",
"object",
"s",
"ownership",
"so",
"it",
"can",
"be",
"used",
"by",
"others",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/internal/BNFHeadersImpl.java#L1791-L1798 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/internal/BNFHeadersImpl.java | BNFHeadersImpl.createSingleHeader | private void createSingleHeader(HeaderKeys key, byte[] value, int offset, int length) {
HeaderElement elem = findHeader(key);
if (null != elem) {
// delete all secondary instances first
if (null != elem.nextInstance) {
HeaderElement temp = elem.nextInstance;
... | java | private void createSingleHeader(HeaderKeys key, byte[] value, int offset, int length) {
HeaderElement elem = findHeader(key);
if (null != elem) {
// delete all secondary instances first
if (null != elem.nextInstance) {
HeaderElement temp = elem.nextInstance;
... | [
"private",
"void",
"createSingleHeader",
"(",
"HeaderKeys",
"key",
",",
"byte",
"[",
"]",
"value",
",",
"int",
"offset",
",",
"int",
"length",
")",
"{",
"HeaderElement",
"elem",
"=",
"findHeader",
"(",
"key",
")",
";",
"if",
"(",
"null",
"!=",
"elem",
... | Utility method to create a single header instance with the given
information. If elements already exist, this will delete secondary
ones and overlay the value on the first element.
@param key
@param value
@param offset
@param length | [
"Utility",
"method",
"to",
"create",
"a",
"single",
"header",
"instance",
"with",
"the",
"given",
"information",
".",
"If",
"elements",
"already",
"exist",
"this",
"will",
"delete",
"secondary",
"ones",
"and",
"overlay",
"the",
"value",
"on",
"the",
"first",
... | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/internal/BNFHeadersImpl.java#L2044-L2077 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/internal/BNFHeadersImpl.java | BNFHeadersImpl.addHeader | private void addHeader(HeaderElement elem, boolean bFilter) {
final HeaderKeys key = elem.getKey();
if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
Tr.event(tc, "Adding header [" + key.getName()
+ "] with value [" + elem.getDebugValue() + "]");
... | java | private void addHeader(HeaderElement elem, boolean bFilter) {
final HeaderKeys key = elem.getKey();
if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
Tr.event(tc, "Adding header [" + key.getName()
+ "] with value [" + elem.getDebugValue() + "]");
... | [
"private",
"void",
"addHeader",
"(",
"HeaderElement",
"elem",
",",
"boolean",
"bFilter",
")",
"{",
"final",
"HeaderKeys",
"key",
"=",
"elem",
".",
"getKey",
"(",
")",
";",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
... | Add this new instance of a header to storage.
@param elem
@param bFilter - call filter on add? | [
"Add",
"this",
"new",
"instance",
"of",
"a",
"header",
"to",
"storage",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/internal/BNFHeadersImpl.java#L2085-L2129 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/internal/BNFHeadersImpl.java | BNFHeadersImpl.findHeader | private HeaderElement findHeader(HeaderKeys key, int instance) {
final int ord = key.getOrdinal();
if (!storage.containsKey(ord) && ord <= HttpHeaderKeys.ORD_MAX) {
return null;
}
HeaderElement elem = null;
//If the ordinal created for this key is larger than 1024,... | java | private HeaderElement findHeader(HeaderKeys key, int instance) {
final int ord = key.getOrdinal();
if (!storage.containsKey(ord) && ord <= HttpHeaderKeys.ORD_MAX) {
return null;
}
HeaderElement elem = null;
//If the ordinal created for this key is larger than 1024,... | [
"private",
"HeaderElement",
"findHeader",
"(",
"HeaderKeys",
"key",
",",
"int",
"instance",
")",
"{",
"final",
"int",
"ord",
"=",
"key",
".",
"getOrdinal",
"(",
")",
";",
"if",
"(",
"!",
"storage",
".",
"containsKey",
"(",
"ord",
")",
"&&",
"ord",
"<="... | Find the specific instance of this header in storage.
@param key
@param instance
@return HeaderElement | [
"Find",
"the",
"specific",
"instance",
"of",
"this",
"header",
"in",
"storage",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/internal/BNFHeadersImpl.java#L2196-L2230 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/internal/BNFHeadersImpl.java | BNFHeadersImpl.removeHdr | private void removeHdr(HeaderElement elem) {
if (null == elem) {
return;
}
HeaderKeys key = elem.getKey();
elem.remove();
if (key.useFilters()) {
filterRemove(key, elem.asBytes());
}
} | java | private void removeHdr(HeaderElement elem) {
if (null == elem) {
return;
}
HeaderKeys key = elem.getKey();
elem.remove();
if (key.useFilters()) {
filterRemove(key, elem.asBytes());
}
} | [
"private",
"void",
"removeHdr",
"(",
"HeaderElement",
"elem",
")",
"{",
"if",
"(",
"null",
"==",
"elem",
")",
"{",
"return",
";",
"}",
"HeaderKeys",
"key",
"=",
"elem",
".",
"getKey",
"(",
")",
";",
"elem",
".",
"remove",
"(",
")",
";",
"if",
"(",
... | Remove this single instance of a header.
@param elem | [
"Remove",
"this",
"single",
"instance",
"of",
"a",
"header",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/internal/BNFHeadersImpl.java#L2273-L2282 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/internal/BNFHeadersImpl.java | BNFHeadersImpl.removeHdrInstances | private void removeHdrInstances(HeaderElement root, boolean bFilter) {
if (null == root) {
return;
}
HeaderKeys key = root.getKey();
if (bFilter && key.useFilters()) {
filterRemove(key, null);
}
HeaderElement elem = root;
while (null != ele... | java | private void removeHdrInstances(HeaderElement root, boolean bFilter) {
if (null == root) {
return;
}
HeaderKeys key = root.getKey();
if (bFilter && key.useFilters()) {
filterRemove(key, null);
}
HeaderElement elem = root;
while (null != ele... | [
"private",
"void",
"removeHdrInstances",
"(",
"HeaderElement",
"root",
",",
"boolean",
"bFilter",
")",
"{",
"if",
"(",
"null",
"==",
"root",
")",
"{",
"return",
";",
"}",
"HeaderKeys",
"key",
"=",
"root",
".",
"getKey",
"(",
")",
";",
"if",
"(",
"bFilt... | Remove all instances of this header.
@param root
@param bFilter | [
"Remove",
"all",
"instances",
"of",
"this",
"header",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/internal/BNFHeadersImpl.java#L2290-L2303 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/internal/BNFHeadersImpl.java | BNFHeadersImpl.setSpecialHeader | protected void setSpecialHeader(HeaderKeys key, byte[] value) {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "setSpecialHeader(h,b[]): " + key.getName());
}
removeHdrInstances(findHeader(key), FILTER_NO);
HeaderElement elem = getElement(key)... | java | protected void setSpecialHeader(HeaderKeys key, byte[] value) {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "setSpecialHeader(h,b[]): " + key.getName());
}
removeHdrInstances(findHeader(key), FILTER_NO);
HeaderElement elem = getElement(key)... | [
"protected",
"void",
"setSpecialHeader",
"(",
"HeaderKeys",
"key",
",",
"byte",
"[",
"]",
"value",
")",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isDebugEnabled",
"(",
")",
")",
"{",
"Tr",
".",
"debug",
"("... | Set one of the special headers that does not require the headerkey
filterX methods to be called.
@param key
@param value | [
"Set",
"one",
"of",
"the",
"special",
"headers",
"that",
"does",
"not",
"require",
"the",
"headerkey",
"filterX",
"methods",
"to",
"be",
"called",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/internal/BNFHeadersImpl.java#L2312-L2320 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/internal/BNFHeadersImpl.java | BNFHeadersImpl.setHeaderChangeLimit | public void setHeaderChangeLimit(int limit) {
this.headerChangeLimit = limit;
this.bOverChangeLimit = false;
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "Setting header change limit to " + limit);
}
} | java | public void setHeaderChangeLimit(int limit) {
this.headerChangeLimit = limit;
this.bOverChangeLimit = false;
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "Setting header change limit to " + limit);
}
} | [
"public",
"void",
"setHeaderChangeLimit",
"(",
"int",
"limit",
")",
"{",
"this",
".",
"headerChangeLimit",
"=",
"limit",
";",
"this",
".",
"bOverChangeLimit",
"=",
"false",
";",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
"... | Set the limit on the number of allowed header changes before this message
must be remarshalled.
@param limit | [
"Set",
"the",
"limit",
"on",
"the",
"number",
"of",
"allowed",
"header",
"changes",
"before",
"this",
"message",
"must",
"be",
"remarshalled",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/internal/BNFHeadersImpl.java#L2360-L2366 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.